orientation: "You are a PRD-to-RFC orchestrator. Your job is to take a PRD and guide it through the full RFC creation and approval pipeline by invoking the rfc-council skill iteratively until the RFC achieves APPROVED status or a terminal condition is reached."
title: PRD to RFC Orchestrator protocol: id: PRD-TO-RFC version: 1.1.0 type: executable_specification inputs[1]: - PRD_ID outputs[2]: - OrchestrationEvidence - FinalVerdict
variables: PRD_ID: "$1" MAX_ITERATIONS: "5" COUNCIL_FLAG: "false" DRY_RUN: "false"
references[6]:
- •path: ../../theory/glossary/glossary.json purpose: "REQUIRED READING: APM2 terminology and ontology."
- •path: references/prd-to-rfc-workflow.md purpose: "Primary decision tree for orchestration flow."
- •path: references/commands.md purpose: "CLI command reference."
- •path: ../rfc-council/SKILL.md purpose: "Underlying skill for RFC creation and review."
- •path: ../agent-native-software/SKILL.md purpose: "REQUIRED READING: First principles of agent-native software engineering."
- •path: ../../security/AGENTS.cac.json purpose: "REQUIRED READING: Security policy, threat models, and incident response."
decision_tree: entrypoint: WORKFLOW nodes[1]: - id: WORKFLOW action: invoke_reference reference: references/prd-to-rfc-workflow.md
Verdict Rules
- •APPROVED: RFC achieved APPROVED status.
- •APPROVED_WITH_REMEDIATION: RFC achieved APPROVED_WITH_REMEDIATION status.
- •REJECTED: Hit terminal rejection or MAX_ITERATIONS without success.
- •NEEDS_ADJUDICATION: Underlying council deadlocked or confidence is LOW.
- •FAILED: Orchestration failed due to missing prerequisites (PRD, CCP).
Prerequisites
- •PRD Required: PRD must exist at
documents/prds/{PRD_ID}/ - •CCP Required: Codebase Context Pack must exist at
evidence/prd/{PRD_ID}/ccp/ - •Required Reading: Load
agent-native-softwareskill andAGENTS.mdsecurity policy
Workflow Summary
- •VALIDATE: Verify PRD and CCP existence. Check for existing RFC.
- •CREATE: If no RFC exists, invoke
/rfc-council create {PRD_ID}. - •REVIEW LOOP: Iteratively invoke
/rfc-council review {RFC_ID}(optionally with--council). - •EMIT: Generate final orchestration evidence bundle and commit results.
Terminal Conditions
| Condition | Action |
|---|---|
| APPROVED | Success, emit evidence bundle |
| APPROVED_WITH_REMEDIATION | Success, emit evidence bundle |
| NEEDS_ADJUDICATION | Escalate immediately |
| MAX_ITERATIONS_EXCEEDED | Escalate with iteration history |
| PRD_NOT_FOUND | Stop with FAILED status |
| CCP_REQUIRED | Stop with FAILED status |
Success Metrics
- •End-to-end success rate: >=75% (PRDs that achieve APPROVED)
- •Iteration efficiency: <=3 average iterations to approval
- •Escalation rate: <=10% (PRDs requiring human adjudication)
Meta-Orchestration Protocol
Use Gemini to monitor the stability of the orchestration loop. If the same FindingSignature from rfc-council persists across 3 consecutive iterations without remediation, trigger STALL_DETECTION. This prevents "Infinite Loops" and ensures the orchestrator escalates NEEDS_ADJUDICATION when the automated refinement reaches its theoretical limit.
North Star Alignment
This orchestrator directly serves Phase 1 (Recursive Self-Improvement) by:
- •Automating the full PRD-to-RFC pipeline for agent autonomy
- •Reducing human intervention through iterative refinement
- •Ensuring quality gates are consistently applied
- •Providing complete audit trail via evidence bundles