Skip to content
CoronRing
All projects

gs_prompt_manager

A Python package for managing prompt templates, with auto-discovery, variable and macro substitution, and validation. Published on PyPI.

Placeholder gs_prompt_manager in use /media/projects/gs-prompt-manager/hero.webp

Auto-discovery loading a prompt directory.

gs_prompt_manager · live demo running
PROMPT STUDIO //
GROUP: manager.AssistantVALIDATED
DISCOVERED CLASS & TEMPLATE

Standard grouped system prompt with injected security macros and tool definitions.

1. DYNAMIC VARIABLES ({var})
2. MACRO INJECTIONS (<<MACRO>>)
Auto-discovery scans classes in directory without manual imports.
RENDERED PROMPT OUTPUT
~98 TOKENS
You are FeatherRing-Core, an autonomous agent operating within Linux Sandbox v2.4.
[GUARDRAILS ACTIVE: Never execute unsanitized bash commands outside the sandbox]
[AVAILABLE TOOLS: fourier_extract, wav_synth, memory_compress, bash_sandbox]

Current user goal: Analyze audio stems and generate harmonic accompaniment
Strict response schema: JSON (id, action, timestamp)
gs_prompt_manager @ PyPIValidation: 0 Missing Keys

Placeholder write-up. Replace this body with the real account.

Why it exists

Prompts in a production codebase drift toward the worst of both worlds: scattered f-strings that nobody can find, or a config system heavy enough that nobody wants to touch it. Neither survives a team.

The approach

Prompts are classes. Subclass PromptBase, return the template from set_prompt, and the manager discovers it. There is no registry to maintain and no import list to keep in sync. Related variants group automatically, and validation runs at load rather than at call time, so a missing variable is a startup error rather than a production one.

from gs_prompt_manager import PromptBase

class GreetingPrompt(PromptBase):
    def set_prompt(self):
        return "Hello, {name}! Welcome to {place}."

prompt = GreetingPrompt()
prompt({"name": "Alice", "place": "Wonderland"})

What I would do differently

To be written.

Gallery

  • Placeholder Prompt group structure /media/projects/gs-prompt-manager/01.webp

    Related variants bundled under one named group.