Skip to content

Prompt Engineering

Tool: prompt-engineering Model: Efficient

Triggered by: Requests to improve, chain, or systematize prompts at scale.

Intent: Iterative prompt refinement using feedback systems with stable and unstable regimes. Detects variance, applies hierarchy, and stabilizes outputs through reinforced chains.

Capability profile: prompting — requires iterative_refinement, prefers cost_sensitive, fan-out 2.

SkillRole
prompt-chainingSequential prompt dependency design
prompt-engineeringCore prompt construction methodology
prompt-hierarchyMulti-level prompt organization
prompt-refinementFeedback-driven prompt improvement
{
rawPrompts: string[];
targetBehavior: string;
}

If variance remains above threshold after 3 refinement cycles → escalates to govern for policy-level review of prompt language.

On successful completion chains to: evaluate · govern

FSM — Feedback system with stable and unstable regimes

Section titled “FSM — Feedback system with stable and unstable regimes”
stateDiagram-v2
    [*] --> InitialPrompt
    InitialPrompt --> FeedbackLoop

    FeedbackLoop --> OutputSampling
    OutputSampling --> VarianceDetection

    VarianceDetection --> StableRegime: variance below threshold
    VarianceDetection --> UnstableRegime: variance above threshold

    StableRegime --> PromptStore
    PromptStore --> [*]

    UnstableRegime --> Bifurcation
    Bifurcation --> RefinementA
    Bifurcation --> RefinementB

    RefinementA --> Convergence
    RefinementB --> Convergence
    Convergence --> StabilityCheck

    StabilityCheck --> StableRegime: convergence achieved
    StabilityCheck --> FeedbackLoop: more cycles needed
sequenceDiagram
    participant Orchestrator
    participant Pool (Analytical)
    participant Pool (Mechanical)
    participant Tool (Context)

    Orchestrator->>Pool (Analytical): Allocate Capability Profile
    activate Pool (Analytical)
    Pool (Analytical)->>Tool (Context): Issue Tool Calls (Parallel)
    Tool (Context)-->>Pool (Analytical): Return Data

    alt Shallow Loop
        Pool (Analytical)->>Pool (Analytical): Auto-correct Schema
    else Medium Loop
        Pool (Analytical)->>Pool (Mechanical): Delegate Fixes
    end

    Pool (Analytical)-->>Orchestrator: Synthesis Gate
    deactivate Pool (Analytical)

    opt Deep Loop
        Orchestrator->>Orchestrator: Complete Throw-back to Prior Stage
    end