| name | coding-agents-prompting-flow |
| description | Workflow for authoring and adapting AI-agent prompts: skills, agents, workflows, rules, etc. |
| tags | ["workflow"] |
| baseSchema | docs/schemas/workflow.md |
<description_and_purpose>
Orchestrates prompt authoring/adaptation via discover -> extract+intake -> blueprint -> for_each_prompt_loop(draft -> hardening -> edit) -> simulate -> validate. Every phase logs status in coding-agents-prompting-flow-state.md, Prompt Brief carries through all phases, and final output traces to request intent.
</description_and_purpose>
<workflow_phases>
- Orchestrator must trust the system and skills; coordinate only sequence, artifacts, state, and approvals.
- Load only references needed for the current phase.
- Execute phases sequentially, do not skip!
- All Rosetta prep steps MUST be FULLY completed
- USE SKILL
load-project-context, orchestration, hitl
- MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel.
- MUST just-in-time load/execute/update each phase's: instructions, definitions, skills, state file.
- Orchestrator and subagents MUST USE SKILL
coding-agents-prompt-authoring.
- No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping.
- This workflow MUST be used with Fable, Opus, GPT-5.5+ class models => IF NOT - DEMAND USER TO SWITCH MODEL.
- Workflow state MUST be saved to
agents/TEMP/<FEATURE>/coding-agents-prompting-flow-state file.
- Discover project-local context, relevant prompt-family artifacts, and required references for this request.
- Input: request + optional existing prompt. Output:
Discovery Notes + Reference Set.
- Update
coding-agents-prompting-flow-state.md.
- HITL when discovered context conflicts with user intent or critical references are missing.
<extract_intake step="2" subagent="prompt-engineer" role="Intent extractor" subagent_required_model="claude-opus-4-8, gpt-5.5-high, gemini-3.1-pro-high, gpt-5.6-sol">
- Extract requirements from source prompt when present and intake clarifications from user.
- Input: request + optional existing prompt +
Discovery Notes + Reference Set. Output: Prompt Brief + Open Questions.
- Update
coding-agents-prompting-flow-state.md.
- HITL explicit approval required for
Prompt Brief.
</extract_intake>
- Design blueprint: structure, actors, contracts, and boundaries for target prompt set.
- Input: approved
Prompt Brief. Output: Blueprint.
- Update
coding-agents-prompting-flow-state.md.
- HITL approval when architecture or tradeoffs are ambiguous.
<for_each_prompt_loop step="4" subagent="prompt-engineer" role="Prompt Author" subagent_required_model="claude-opus-4-8, gpt-5.5-high, gemini-3.1-pro-high, gpt-5.6-sol">
- Scope:
draft target prompts. Subagents must draft one individual prompt file or surgical changes to one file at-a-time: it must think thoroughly about each file first, then it provides the full structure of the file with specific grounded points each section should contain or change, then it validates with schemas requirements/suggestions, and only then it can generate actual file. Repeat for each file. ALSO draft means fully ready for review prompt, just not reviewed and approved! Aim newly created files to have small extensive coverage, clear concerns, while each rules is very small
- Input: approved
Prompt Brief + Blueprint. Output: Draft Prompt Set + optional change-log.md in FEATURE PLAN folder.
- Update
coding-agents-prompting-flow-state.md.
- HITL when loop stalls, conflicts appear, or intent becomes unclear.
</for_each_prompt_loop>
<for_each_prompt_loop step="5" subagent="prompt-engineer" role="Prompt reviewer and hardening" subagent_required_model="claude-opus-4-8, gpt-5.5-high, gemini-3.1-pro-high, gpt-5.6-sol">
- Run loop for each target prompt:
hardening -> edit until pass criteria or HITL decision.
- This is automated review by subagent, this is not HITL review!
- Input: approved
Prompt Brief + Blueprint + Draft Prompt Set + prompt family information. Output: Prompt Set + optional change-log.md in FEATURE PLAN folder.
- Update
coding-agents-prompting-flow-state.md.
- HITL when loop stalls, conflicts appear, or intent becomes unclear.
</for_each_prompt_loop>
- Simulate realistic runs and trace context/cognitive load across the prompt chain.
- Input:
Prompt Brief + Prompt Set. Output: Simulation Notes.
- Update
coding-agents-prompting-flow-state.md.
- HITL when simulation exposes major behavioral risk.
- Validate final artifacts against intent, contracts, failure modes, and traceability.
- Input:
Prompt Brief + Blueprint + Candidate Prompt Set + Simulation Notes. Output: Final Prompt Set + Validation Pack (Checklist Results, Tests, Failure Modes, Traceability; persistent report optional in FEATURE PLAN folder as validation-report.md).
- Update
coding-agents-prompting-flow-state.md and mark complete.
- HITL final approval required before persistence; small tasks may stay in-memory and be returned in message.
</workflow_phases>
<validation_checklist>
discover runs first and produces Discovery Notes + Reference Set.
Prompt Brief is approved before blueprint starts.
- Adaptation requests load
pa-adapt.md and keep source intent traceable through the target artifact.
Prompt Brief is present as input in loop, simulation, and validation phases.
- Loop explicitly runs
draft -> hardening -> edit for each target prompt.
- Every phase has artifact evidence and state update in coding-agents-prompting-flow-state.md in FEATURE TEMP folder.
Validation Pack includes checklist results, tests, failure modes, and traceability.
- Workflow stays thin: no skill-internal templates or execution internals are embedded.
- Final outputs map to request intent with explicit traceability.
</validation_checklist>
- Orchestrator executes skill internals instead of coordinating contracts.
discover is skipped or delayed after intake.
Prompt Brief is treated as optional in downstream phases.
- Loop is collapsed into one draft pass without hardening/edit.
- Too many references are loaded; phase-scoped loading is skipped.
- State file in FEATURE TEMP folder is stale or missing phase artifact evidence.