olympus-ai 4.4.4 → 4.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/dist/features/workflow-engine/claude-md-merger.js +2 -2
- package/dist/features/workflow-engine/claude-md-merger.js.map +1 -1
- package/dist/hooks/olympus-hooks.cjs +2 -2
- package/dist/installer/index.d.ts +1 -1
- package/dist/installer/index.js +1 -1
- package/package.json +100 -100
- package/resources/rules/common/question-format-guide.md +27 -0
- package/resources/rules/inception/user-stories.md +40 -23
- package/resources/skills/brief/SKILL.md +223 -0
|
@@ -102,8 +102,8 @@ export function getAidlcRulesContent(workflowId, pathwayType) {
|
|
|
102
102
|
- **Audit log**: \`aidlc-docs/${workflowId}/audit.md\`
|
|
103
103
|
|
|
104
104
|
All workflow stages, agent delegation, directory layout, and rules are defined in the
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
global \`~/.claude/CLAUDE.md\` (installed by Olympus). This block only tracks the active
|
|
106
|
+
workflow identity — do NOT search for a separate core-workflow.md file.`;
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
109
|
* Read and return the core-workflow.md content installed by olympus-ai.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-md-merger.js","sourceRoot":"","sources":["../../../src/features/workflow-engine/claude-md-merger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAG7B,MAAM,CAAC,MAAM,cAAc,GAAG,4BAA4B,CAAC;AAC3D,MAAM,CAAC,MAAM,YAAY,GAAG,0BAA0B,CAAC;AAEvD;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,OAAO,OAAO,CAAC,Q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d,CAAC;IACD,OAAO,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -925,8 +925,8 @@ ${r}`:o||r||""}function Vd(e,t){return`# AI-DLC Workflow Rules (Olympus-Native)
|
|
|
925
925
|
- **Audit log**: \`aidlc-docs/${e}/audit.md\`
|
|
926
926
|
|
|
927
927
|
All workflow stages, agent delegation, directory layout, and rules are defined in the
|
|
928
|
-
|
|
929
|
-
the active workflow identity above.`}var fs=["intent","unit","code-generation","complete"];function VS(e){let t=fs.indexOf(e);return t===-1||t>=fs.length-1?"complete":fs[t+1]}var mr=class{projectPath;featureName;workflowId;interruptHandler=null;constructor(t,n){this.projectPath=t,this.featureName=n;let o=n.toLowerCase().replace(/\.[a-z]{1,4}$/,"").replace(/[_\s]+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"");if(o.length>80&&(o=o.substring(0,80).replace(/-$/,"")),!o)throw new Error("Feature name produced an empty workflow ID after sanitization");if(o==="completed")throw new Error("'completed' is a reserved directory name and cannot be used as a workflow ID");this.workflowId=o}async start(t){let n={schema_version:"3.0.0",workflow_id:this.workflowId,feature_name:this.featureName,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),current_phase:"inception",current_stage:"intent",status:"in_progress",origin:"hook-init",phases:{discovery:{status:"not_started",started_at:null,completed_at:null,gate_result:null,gate_bypassed:!1,bypass_reason:null},inception:{status:"in_progress",started_at:new Date().toISOString(),completed_at:null,gate_result:null,gate_bypassed:!1,bypass_reason:null},construction:{status:"not_started",started_at:null,completed_at:null,gate_result:null,gate_bypassed:!1,bypass_reason:null},operations:{status:"not_started",started_at:null,completed_at:null,gate_result:null,gate_bypassed:!1,bypass_reason:null}},manifest_path:`aidlc-docs/${this.workflowId}/manifest.json`,trust_state_path:".olympus/trust-state.json",resume_context:{initial_prompt:t}};try{await Ju(this.projectPath,this.workflowId)}catch(r){let i=r;throw console.error(`[WorkflowEngine] Failed to initialize workflow directory: ${i.message}`),new Error(`Failed to start workflow: Could not create directory structure - ${i.message}`)}let o=co.join(this.projectPath,"aidlc-docs",this.workflowId,"manifest.json");if(!Re.existsSync(o))try{Mi(this.workflowId,this.featureName,this.projectPath)}catch(r){console.warn(`[WorkflowEngine] Failed to create manifest: ${r.message}`)}try{await $(this.projectPath,n)}catch(r){let i=r;throw console.error(`[WorkflowEngine] Failed to save initial checkpoint: ${i.message}`),new Error(`Failed to start workflow: Could not save checkpoint - ${i.message}`)}try{let i=(await Tn(this.projectPath)).sourceFileCount??0,s=await Ld(this.projectPath,t),a=ur(t),c=await Fd({projectPath:this.projectPath,workflowId:this.workflowId,intentText:t,depthAssessment:a,pathwayType:s,sourceFileCount:i}),l=await ts(this.projectPath,this.workflowId,c),u=await C(this.projectPath,this.workflowId);if(u){u.workflow_routing_path=l,u.pathway_type=s;let d=["discovery","inception","construction","operations"];u.skipped_phases=d.filter(f=>!ns(c,f)),await $(this.projectPath,u)}if(console.log(`[WorkflowEngine] Generated Workflow Routing: pathway=${s}, depth=${c.estimated_depth}, code-generations=${c.estimated_code_generations}`),c.stages.some(d=>!d.included)){let d=c.stages.filter(f=>!f.included).map(f=>`${f.phase}/${f.stage}`);console.log(`[WorkflowEngine] Stages excluded by plan: ${d.join(", ")}`)}}catch(r){console.warn(`[WorkflowEngine] Failed to generate Workflow Routing: ${r.message}`),console.warn("[WorkflowEngine] Workflow will proceed without adaptive phase selection")}try{let i=(await C(this.projectPath,this.workflowId))?.pathway_type;if(!i){let{isBrownfield:u}=await Tn(this.projectPath);i=u?"brownfield-enhancement":"greenfield"}let s=co.join(this.projectPath,".claude","CLAUDE.md"),a=Re.existsSync(s)?Re.readFileSync(s,"utf-8"):"",c=Vd(this.workflowId,i),l=Bd(a,c);Re.mkdirSync(co.join(this.projectPath,".claude"),{recursive:!0}),Re.writeFileSync(s,l,"utf-8"),console.log("[WorkflowEngine] Injected AI-DLC rules into .claude/CLAUDE.md")}catch(r){console.error("[WorkflowEngine] Failed to inject AI-DLC rules into CLAUDE.md:",r)}}async resume(){let t;try{t=await C(this.projectPath,this.workflowId)}catch(o){let r=o;throw console.error(`[WorkflowEngine] Failed to load checkpoint for resume: ${r.message}`),new Error(`Failed to resume workflow: Could not load checkpoint - ${r.message}`)}if(!t)throw console.error(`[WorkflowEngine] No checkpoint found for workflow: ${this.workflowId}`),console.error("[WorkflowEngine] Available workflows: Run 'olympus workflow list' to see workflows"),new Error(`No checkpoint found for workflow: ${this.workflowId}`);if(t.status==="complete")return"Workflow already complete";if(t.status==="paused"){t.status="in_progress";try{await $(this.projectPath,t)}catch(o){let r=o;throw console.error(`[WorkflowEngine] Failed to update checkpoint status: ${r.message}`),new Error(`Failed to resume workflow: Could not save checkpoint - ${r.message}`)}}this.setupInterruptHandler();let n=t.current_stage;try{await this.executeStage(n)}catch(o){let r=o;console.error(`[WorkflowEngine] Failed to execute ${n} stage: ${r.message}`);try{let i=await C(this.projectPath,this.workflowId);i&&(i.status="paused",i.resume_context={...i.resume_context,error_message:r.message,failed_stage:n},await $(this.projectPath,i),console.log("[WorkflowEngine] Workflow saved as paused. Fix the issue and resume with `/continue`"))}catch(i){console.warn("[WorkflowEngine] Failed to save error checkpoint:",i.message)}throw new Error(`Failed to execute ${n} stage: ${r.message}`)}finally{this.cleanupInterruptHandler()}return`Resumed workflow from stage: ${n}`}async pause(){let t;try{t=await C(this.projectPath,this.workflowId)}catch(n){let o=n;throw console.error(`[WorkflowEngine] Failed to load checkpoint for pause: ${o.message}`),new Error(`Failed to pause workflow: Could not load checkpoint - ${o.message}`)}if(!t)throw console.error(`[WorkflowEngine] No checkpoint found for workflow: ${this.workflowId}`),new Error(`No checkpoint found for workflow: ${this.workflowId}`);t.status="paused";try{await $(this.projectPath,t)}catch(n){let o=n;throw console.error(`[WorkflowEngine] Failed to save paused checkpoint: ${o.message}`),new Error(`Failed to pause workflow: Could not save checkpoint - ${o.message}`)}return`aidlc-docs/${this.workflowId}/checkpoint.json`}async executeStage(t){if(t==="complete")throw new Error("No execution for complete stage");let n=await C(this.projectPath,this.workflowId);if(!n)throw new Error(`No checkpoint found for workflow: ${this.workflowId}`);switch(t){case"intent":await this.executeIntentStage(n);break;case"unit":await this.executeUnitStage(n);break;case"code-generation":await this.executeCodeGenerationStage(n);break}let o=VS(t);n.current_stage=o,o==="complete"?await this.completeWorkflow(n):await $(this.projectPath,n)}async getStatus(){let t;try{t=await C(this.projectPath,this.workflowId)}catch(o){let r=o;throw console.error(`[WorkflowEngine] Failed to load checkpoint for status: ${r.message}`),new Error(`Failed to get workflow status: Could not load checkpoint - ${r.message}`)}if(!t)throw console.error(`[WorkflowEngine] No checkpoint found for workflow: ${this.workflowId}`),new Error(`No checkpoint found for workflow: ${this.workflowId}`);let n=[];return{workflow_id:t.workflow_id,feature_name:t.feature_name,current_stage:t.current_stage,status:t.status,artifacts:n,updated_at:t.updated_at}}async executePhase(t){let n=lr(this.projectPath,this.workflowId);if(n&&!ns(n,t)){console.log(`[WorkflowEngine] Skipping ${t} phase (excluded by Workflow Routing: ${n.phases[t]?.rationale||"no rationale"})`);let o=await C(this.projectPath,this.workflowId);if(o){let i=o;i.phases&&i.phases[t]&&(i.phases[t].status="complete",i.phases[t].completed_at=new Date().toISOString(),i.phases[t].gate_bypassed=!0,i.phases[t].bypass_reason="Excluded by Workflow Routing"),await $(this.projectPath,o)}let r=`${this.projectPath}/aidlc-docs/${this.workflowId}/manifest.json`;try{Ce(r,{phase:t,action:"bypassed",actor:"config",reason:`Excluded by Workflow Routing (pathway: ${n.pathway})`})}catch{}return}switch(t){case"discovery":{let o=`${this.projectPath}/aidlc-docs/${this.workflowId}/manifest.json`,r=await $d({projectPath:this.projectPath,workflowId:this.workflowId,featureName:this.featureName,manifestPath:o});r.gateRequired&&(console.log(`[WorkflowEngine] Discovery phase: ${r.artifactsGenerated.length} artifacts generated (${r.sourceFileCount} source files detected)`),console.log(`[WorkflowEngine] Discovery Gate: Review findings in aidlc-docs/${this.workflowId}/discovery/ before proceeding to Inception`));try{let i={type:"phase_complete",phase:"discovery",details:`${r.artifactsGenerated.length} artifacts generated, ${r.sourceFileCount} source files`},s={workflowId:this.workflowId,featureName:this.featureName,projectPath:this.projectPath,sessionId:"engine",phase:"discovery"},a=$e(i,s);ie(a)}catch(i){console.error("[WorkflowEngine] Failed to capture discovery phase discovery:",i)}break}case"inception":{let{InceptionOrchestrator:o}=await Promise.resolve().then(()=>(dp(),up)),r=new o,i=await C(this.projectPath,this.workflowId);if(!i)throw new Error(`No checkpoint found for workflow: ${this.workflowId}`);if(i.current_stage!=="intent"){console.log(`[WorkflowEngine] Skipping inception orchestrator \u2014 checkpoint already at stage '${i.current_stage}'`);break}if(!i.inception_stages){let s=lr(this.projectPath,this.workflowId),a=i;await r.initialize(this.projectPath,this.workflowId,a.pathway_type||"greenfield",s)}for(;!await r.isComplete(this.projectPath,this.workflowId);){let s=await r.executeNextStage(this.projectPath,this.workflowId);if(s.status==="awaiting_answers"||s.status==="review_required")break}try{let s={type:"phase_complete",phase:"inception",details:"Inception stages completed"},a={workflowId:this.workflowId,featureName:this.featureName,projectPath:this.projectPath,sessionId:"engine",phase:"inception"},c=$e(s,a);ie(c)}catch(s){console.error("[WorkflowEngine] Failed to capture inception phase discovery:",s)}break}case"construction":{let o=await C(this.projectPath,this.workflowId);if(o&&o.status==="awaiting_dev_review"){console.log("[WorkflowEngine] Waiting for developer review of technical specification (Risk Tier 3).");return}let r=Ot(this.projectPath,this.workflowId,"intent"),i;try{i=Re.readFileSync(r,"utf-8")}catch{}let a=await new tr(this.projectPath,this.workflowId).execute(i);if(!a.passed)throw console.error("[WorkflowEngine] Construction phase validation failed:",a.blocking_issues),new Error(`Construction phase validation failed: ${a.blocking_issues.join(", ")}`);try{let c={type:"phase_complete",phase:"construction",details:"Construction phase completed"},l={workflowId:this.workflowId,featureName:this.featureName,projectPath:this.projectPath,sessionId:"engine",phase:"construction"},u=$e(c,l);ie(u)}catch(c){console.error("[WorkflowEngine] Failed to capture construction phase discovery:",c)}break}case"operations":{let{generateOperationsArtifacts:o}=await Promise.resolve().then(()=>(kp(),yp)),{loadManifest:r,registerArtifact:i,updatePhaseStatus:s}=await Promise.resolve().then(()=>(J(),Vt)),a=`${this.projectPath}/aidlc-docs/${this.workflowId}/manifest.json`,c=r(a),l=null;try{l=Re.readFileSync(Ot(this.projectPath,this.workflowId,"intent"),"utf-8")}catch{}let u=await C(this.projectPath,this.workflowId),d="MEDIUM";if(c?.depth_assessment){let p=c.depth_assessment.total_score;p<=10?d="SHALLOW":p>=21&&(d="DEEP")}let f={workflowId:this.workflowId,featureName:this.featureName,manifest:c,specContent:l,buildLogContent:null,depthLevel:d},m=await o(f,this.projectPath);if(c){s(a,"operations","complete");for(let p of m.artifactsGenerated){let g=`aidlc-docs/${this.workflowId}/operations/${p}`,h=p.replace(/\.(md|json)$/,"").toUpperCase().replace(/-/g,"_");i(a,{id:`OPS-${h}`,type:h,phase:"operations",stage:"code-generation",path:g,validation_passed:!0,write_complete:!0,checksum:null})}}u&&(u.current_phase="operations",u.updated_at=new Date().toISOString(),await $(this.projectPath,u)),console.log(`[WorkflowEngine] Operations phase: Generated ${m.artifactsGenerated.length} artifacts (depth: ${d})`),console.log(`[WorkflowEngine] Operations artifacts: ${m.artifactsGenerated.join(", ")}`);try{let p={type:"phase_complete",phase:"operations",details:`${m.artifactsGenerated.length} artifacts generated (depth: ${d})`},g={workflowId:this.workflowId,featureName:this.featureName,projectPath:this.projectPath,sessionId:"engine",phase:"operations"},h=$e(p,g);ie(h)}catch(p){console.error("[WorkflowEngine] Failed to capture operations phase discovery:",p)}break}}}async completeWorkflow(t){t.status="complete";try{let n=co.join(this.projectPath,".claude","CLAUDE.md");if(Re.existsSync(n)){let o=Re.readFileSync(n,"utf-8"),r=qd(o);Re.writeFileSync(n,r,"utf-8"),console.log("[WorkflowEngine] Removed AI-DLC rules from .claude/CLAUDE.md (workflow complete)")}}catch(n){console.error("[WorkflowEngine] Failed to remove AI-DLC rules from CLAUDE.md:",n)}await $(this.projectPath,t),await Uu(this.projectPath,this.workflowId)}async approveWorkflowRouting(t){let n=lr(this.projectPath,this.workflowId);if(!n)throw new Error(`No Workflow Routing found for workflow: ${this.workflowId}`);n.approved_at=new Date().toISOString(),n.approved_by="human",await ts(this.projectPath,this.workflowId,n);let o=await C(this.projectPath,this.workflowId);if(o){let i=o;if(i.inception_stages?.["workflow-planning"]){let s=i.inception_stages["workflow-planning"];s.status!=="completed"&&s.status!=="skipped"&&(s.status="completed",s.completed_at=new Date().toISOString(),await $(this.projectPath,o))}}let r=`${this.projectPath}/aidlc-docs/${this.workflowId}/manifest.json`;try{Ce(r,{phase:"inception",action:"approved",actor:"human",reason:t||"Workflow Routing approved"})}catch{}console.log("[WorkflowEngine] Workflow Routing approved")}setupInterruptHandler(){this.interruptHandler=async()=>{console.log(`
|
|
928
|
+
global \`~/.claude/CLAUDE.md\` (installed by Olympus). This block only tracks the active
|
|
929
|
+
workflow identity \u2014 do NOT search for a separate core-workflow.md file.`}var fs=["intent","unit","code-generation","complete"];function VS(e){let t=fs.indexOf(e);return t===-1||t>=fs.length-1?"complete":fs[t+1]}var mr=class{projectPath;featureName;workflowId;interruptHandler=null;constructor(t,n){this.projectPath=t,this.featureName=n;let o=n.toLowerCase().replace(/\.[a-z]{1,4}$/,"").replace(/[_\s]+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"");if(o.length>80&&(o=o.substring(0,80).replace(/-$/,"")),!o)throw new Error("Feature name produced an empty workflow ID after sanitization");if(o==="completed")throw new Error("'completed' is a reserved directory name and cannot be used as a workflow ID");this.workflowId=o}async start(t){let n={schema_version:"3.0.0",workflow_id:this.workflowId,feature_name:this.featureName,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),current_phase:"inception",current_stage:"intent",status:"in_progress",origin:"hook-init",phases:{discovery:{status:"not_started",started_at:null,completed_at:null,gate_result:null,gate_bypassed:!1,bypass_reason:null},inception:{status:"in_progress",started_at:new Date().toISOString(),completed_at:null,gate_result:null,gate_bypassed:!1,bypass_reason:null},construction:{status:"not_started",started_at:null,completed_at:null,gate_result:null,gate_bypassed:!1,bypass_reason:null},operations:{status:"not_started",started_at:null,completed_at:null,gate_result:null,gate_bypassed:!1,bypass_reason:null}},manifest_path:`aidlc-docs/${this.workflowId}/manifest.json`,trust_state_path:".olympus/trust-state.json",resume_context:{initial_prompt:t}};try{await Ju(this.projectPath,this.workflowId)}catch(r){let i=r;throw console.error(`[WorkflowEngine] Failed to initialize workflow directory: ${i.message}`),new Error(`Failed to start workflow: Could not create directory structure - ${i.message}`)}let o=co.join(this.projectPath,"aidlc-docs",this.workflowId,"manifest.json");if(!Re.existsSync(o))try{Mi(this.workflowId,this.featureName,this.projectPath)}catch(r){console.warn(`[WorkflowEngine] Failed to create manifest: ${r.message}`)}try{await $(this.projectPath,n)}catch(r){let i=r;throw console.error(`[WorkflowEngine] Failed to save initial checkpoint: ${i.message}`),new Error(`Failed to start workflow: Could not save checkpoint - ${i.message}`)}try{let i=(await Tn(this.projectPath)).sourceFileCount??0,s=await Ld(this.projectPath,t),a=ur(t),c=await Fd({projectPath:this.projectPath,workflowId:this.workflowId,intentText:t,depthAssessment:a,pathwayType:s,sourceFileCount:i}),l=await ts(this.projectPath,this.workflowId,c),u=await C(this.projectPath,this.workflowId);if(u){u.workflow_routing_path=l,u.pathway_type=s;let d=["discovery","inception","construction","operations"];u.skipped_phases=d.filter(f=>!ns(c,f)),await $(this.projectPath,u)}if(console.log(`[WorkflowEngine] Generated Workflow Routing: pathway=${s}, depth=${c.estimated_depth}, code-generations=${c.estimated_code_generations}`),c.stages.some(d=>!d.included)){let d=c.stages.filter(f=>!f.included).map(f=>`${f.phase}/${f.stage}`);console.log(`[WorkflowEngine] Stages excluded by plan: ${d.join(", ")}`)}}catch(r){console.warn(`[WorkflowEngine] Failed to generate Workflow Routing: ${r.message}`),console.warn("[WorkflowEngine] Workflow will proceed without adaptive phase selection")}try{let i=(await C(this.projectPath,this.workflowId))?.pathway_type;if(!i){let{isBrownfield:u}=await Tn(this.projectPath);i=u?"brownfield-enhancement":"greenfield"}let s=co.join(this.projectPath,".claude","CLAUDE.md"),a=Re.existsSync(s)?Re.readFileSync(s,"utf-8"):"",c=Vd(this.workflowId,i),l=Bd(a,c);Re.mkdirSync(co.join(this.projectPath,".claude"),{recursive:!0}),Re.writeFileSync(s,l,"utf-8"),console.log("[WorkflowEngine] Injected AI-DLC rules into .claude/CLAUDE.md")}catch(r){console.error("[WorkflowEngine] Failed to inject AI-DLC rules into CLAUDE.md:",r)}}async resume(){let t;try{t=await C(this.projectPath,this.workflowId)}catch(o){let r=o;throw console.error(`[WorkflowEngine] Failed to load checkpoint for resume: ${r.message}`),new Error(`Failed to resume workflow: Could not load checkpoint - ${r.message}`)}if(!t)throw console.error(`[WorkflowEngine] No checkpoint found for workflow: ${this.workflowId}`),console.error("[WorkflowEngine] Available workflows: Run 'olympus workflow list' to see workflows"),new Error(`No checkpoint found for workflow: ${this.workflowId}`);if(t.status==="complete")return"Workflow already complete";if(t.status==="paused"){t.status="in_progress";try{await $(this.projectPath,t)}catch(o){let r=o;throw console.error(`[WorkflowEngine] Failed to update checkpoint status: ${r.message}`),new Error(`Failed to resume workflow: Could not save checkpoint - ${r.message}`)}}this.setupInterruptHandler();let n=t.current_stage;try{await this.executeStage(n)}catch(o){let r=o;console.error(`[WorkflowEngine] Failed to execute ${n} stage: ${r.message}`);try{let i=await C(this.projectPath,this.workflowId);i&&(i.status="paused",i.resume_context={...i.resume_context,error_message:r.message,failed_stage:n},await $(this.projectPath,i),console.log("[WorkflowEngine] Workflow saved as paused. Fix the issue and resume with `/continue`"))}catch(i){console.warn("[WorkflowEngine] Failed to save error checkpoint:",i.message)}throw new Error(`Failed to execute ${n} stage: ${r.message}`)}finally{this.cleanupInterruptHandler()}return`Resumed workflow from stage: ${n}`}async pause(){let t;try{t=await C(this.projectPath,this.workflowId)}catch(n){let o=n;throw console.error(`[WorkflowEngine] Failed to load checkpoint for pause: ${o.message}`),new Error(`Failed to pause workflow: Could not load checkpoint - ${o.message}`)}if(!t)throw console.error(`[WorkflowEngine] No checkpoint found for workflow: ${this.workflowId}`),new Error(`No checkpoint found for workflow: ${this.workflowId}`);t.status="paused";try{await $(this.projectPath,t)}catch(n){let o=n;throw console.error(`[WorkflowEngine] Failed to save paused checkpoint: ${o.message}`),new Error(`Failed to pause workflow: Could not save checkpoint - ${o.message}`)}return`aidlc-docs/${this.workflowId}/checkpoint.json`}async executeStage(t){if(t==="complete")throw new Error("No execution for complete stage");let n=await C(this.projectPath,this.workflowId);if(!n)throw new Error(`No checkpoint found for workflow: ${this.workflowId}`);switch(t){case"intent":await this.executeIntentStage(n);break;case"unit":await this.executeUnitStage(n);break;case"code-generation":await this.executeCodeGenerationStage(n);break}let o=VS(t);n.current_stage=o,o==="complete"?await this.completeWorkflow(n):await $(this.projectPath,n)}async getStatus(){let t;try{t=await C(this.projectPath,this.workflowId)}catch(o){let r=o;throw console.error(`[WorkflowEngine] Failed to load checkpoint for status: ${r.message}`),new Error(`Failed to get workflow status: Could not load checkpoint - ${r.message}`)}if(!t)throw console.error(`[WorkflowEngine] No checkpoint found for workflow: ${this.workflowId}`),new Error(`No checkpoint found for workflow: ${this.workflowId}`);let n=[];return{workflow_id:t.workflow_id,feature_name:t.feature_name,current_stage:t.current_stage,status:t.status,artifacts:n,updated_at:t.updated_at}}async executePhase(t){let n=lr(this.projectPath,this.workflowId);if(n&&!ns(n,t)){console.log(`[WorkflowEngine] Skipping ${t} phase (excluded by Workflow Routing: ${n.phases[t]?.rationale||"no rationale"})`);let o=await C(this.projectPath,this.workflowId);if(o){let i=o;i.phases&&i.phases[t]&&(i.phases[t].status="complete",i.phases[t].completed_at=new Date().toISOString(),i.phases[t].gate_bypassed=!0,i.phases[t].bypass_reason="Excluded by Workflow Routing"),await $(this.projectPath,o)}let r=`${this.projectPath}/aidlc-docs/${this.workflowId}/manifest.json`;try{Ce(r,{phase:t,action:"bypassed",actor:"config",reason:`Excluded by Workflow Routing (pathway: ${n.pathway})`})}catch{}return}switch(t){case"discovery":{let o=`${this.projectPath}/aidlc-docs/${this.workflowId}/manifest.json`,r=await $d({projectPath:this.projectPath,workflowId:this.workflowId,featureName:this.featureName,manifestPath:o});r.gateRequired&&(console.log(`[WorkflowEngine] Discovery phase: ${r.artifactsGenerated.length} artifacts generated (${r.sourceFileCount} source files detected)`),console.log(`[WorkflowEngine] Discovery Gate: Review findings in aidlc-docs/${this.workflowId}/discovery/ before proceeding to Inception`));try{let i={type:"phase_complete",phase:"discovery",details:`${r.artifactsGenerated.length} artifacts generated, ${r.sourceFileCount} source files`},s={workflowId:this.workflowId,featureName:this.featureName,projectPath:this.projectPath,sessionId:"engine",phase:"discovery"},a=$e(i,s);ie(a)}catch(i){console.error("[WorkflowEngine] Failed to capture discovery phase discovery:",i)}break}case"inception":{let{InceptionOrchestrator:o}=await Promise.resolve().then(()=>(dp(),up)),r=new o,i=await C(this.projectPath,this.workflowId);if(!i)throw new Error(`No checkpoint found for workflow: ${this.workflowId}`);if(i.current_stage!=="intent"){console.log(`[WorkflowEngine] Skipping inception orchestrator \u2014 checkpoint already at stage '${i.current_stage}'`);break}if(!i.inception_stages){let s=lr(this.projectPath,this.workflowId),a=i;await r.initialize(this.projectPath,this.workflowId,a.pathway_type||"greenfield",s)}for(;!await r.isComplete(this.projectPath,this.workflowId);){let s=await r.executeNextStage(this.projectPath,this.workflowId);if(s.status==="awaiting_answers"||s.status==="review_required")break}try{let s={type:"phase_complete",phase:"inception",details:"Inception stages completed"},a={workflowId:this.workflowId,featureName:this.featureName,projectPath:this.projectPath,sessionId:"engine",phase:"inception"},c=$e(s,a);ie(c)}catch(s){console.error("[WorkflowEngine] Failed to capture inception phase discovery:",s)}break}case"construction":{let o=await C(this.projectPath,this.workflowId);if(o&&o.status==="awaiting_dev_review"){console.log("[WorkflowEngine] Waiting for developer review of technical specification (Risk Tier 3).");return}let r=Ot(this.projectPath,this.workflowId,"intent"),i;try{i=Re.readFileSync(r,"utf-8")}catch{}let a=await new tr(this.projectPath,this.workflowId).execute(i);if(!a.passed)throw console.error("[WorkflowEngine] Construction phase validation failed:",a.blocking_issues),new Error(`Construction phase validation failed: ${a.blocking_issues.join(", ")}`);try{let c={type:"phase_complete",phase:"construction",details:"Construction phase completed"},l={workflowId:this.workflowId,featureName:this.featureName,projectPath:this.projectPath,sessionId:"engine",phase:"construction"},u=$e(c,l);ie(u)}catch(c){console.error("[WorkflowEngine] Failed to capture construction phase discovery:",c)}break}case"operations":{let{generateOperationsArtifacts:o}=await Promise.resolve().then(()=>(kp(),yp)),{loadManifest:r,registerArtifact:i,updatePhaseStatus:s}=await Promise.resolve().then(()=>(J(),Vt)),a=`${this.projectPath}/aidlc-docs/${this.workflowId}/manifest.json`,c=r(a),l=null;try{l=Re.readFileSync(Ot(this.projectPath,this.workflowId,"intent"),"utf-8")}catch{}let u=await C(this.projectPath,this.workflowId),d="MEDIUM";if(c?.depth_assessment){let p=c.depth_assessment.total_score;p<=10?d="SHALLOW":p>=21&&(d="DEEP")}let f={workflowId:this.workflowId,featureName:this.featureName,manifest:c,specContent:l,buildLogContent:null,depthLevel:d},m=await o(f,this.projectPath);if(c){s(a,"operations","complete");for(let p of m.artifactsGenerated){let g=`aidlc-docs/${this.workflowId}/operations/${p}`,h=p.replace(/\.(md|json)$/,"").toUpperCase().replace(/-/g,"_");i(a,{id:`OPS-${h}`,type:h,phase:"operations",stage:"code-generation",path:g,validation_passed:!0,write_complete:!0,checksum:null})}}u&&(u.current_phase="operations",u.updated_at=new Date().toISOString(),await $(this.projectPath,u)),console.log(`[WorkflowEngine] Operations phase: Generated ${m.artifactsGenerated.length} artifacts (depth: ${d})`),console.log(`[WorkflowEngine] Operations artifacts: ${m.artifactsGenerated.join(", ")}`);try{let p={type:"phase_complete",phase:"operations",details:`${m.artifactsGenerated.length} artifacts generated (depth: ${d})`},g={workflowId:this.workflowId,featureName:this.featureName,projectPath:this.projectPath,sessionId:"engine",phase:"operations"},h=$e(p,g);ie(h)}catch(p){console.error("[WorkflowEngine] Failed to capture operations phase discovery:",p)}break}}}async completeWorkflow(t){t.status="complete";try{let n=co.join(this.projectPath,".claude","CLAUDE.md");if(Re.existsSync(n)){let o=Re.readFileSync(n,"utf-8"),r=qd(o);Re.writeFileSync(n,r,"utf-8"),console.log("[WorkflowEngine] Removed AI-DLC rules from .claude/CLAUDE.md (workflow complete)")}}catch(n){console.error("[WorkflowEngine] Failed to remove AI-DLC rules from CLAUDE.md:",n)}await $(this.projectPath,t),await Uu(this.projectPath,this.workflowId)}async approveWorkflowRouting(t){let n=lr(this.projectPath,this.workflowId);if(!n)throw new Error(`No Workflow Routing found for workflow: ${this.workflowId}`);n.approved_at=new Date().toISOString(),n.approved_by="human",await ts(this.projectPath,this.workflowId,n);let o=await C(this.projectPath,this.workflowId);if(o){let i=o;if(i.inception_stages?.["workflow-planning"]){let s=i.inception_stages["workflow-planning"];s.status!=="completed"&&s.status!=="skipped"&&(s.status="completed",s.completed_at=new Date().toISOString(),await $(this.projectPath,o))}}let r=`${this.projectPath}/aidlc-docs/${this.workflowId}/manifest.json`;try{Ce(r,{phase:"inception",action:"approved",actor:"human",reason:t||"Workflow Routing approved"})}catch{}console.log("[WorkflowEngine] Workflow Routing approved")}setupInterruptHandler(){this.interruptHandler=async()=>{console.log(`
|
|
930
930
|
[WorkflowEngine] Workflow interrupted - saving checkpoint...`);try{let t=await C(this.projectPath,this.workflowId);t&&(t.status="paused",t.updated_at=new Date().toISOString(),t.resume_context={...t.resume_context,interrupted_at:new Date().toISOString(),current_stage:t.current_stage,message:`Workflow interrupted during ${t.current_stage} stage`},await $(this.projectPath,t),console.log("[WorkflowEngine] Checkpoint saved. Resume with `/continue`"))}catch(t){console.error("[WorkflowEngine] Failed to save checkpoint on interrupt:",t)}process.exit(0)},process.on("SIGINT",this.interruptHandler)}cleanupInterruptHandler(){this.interruptHandler&&(process.off("SIGINT",this.interruptHandler),this.interruptHandler=null)}async executeIntentStage(t){let n=t.resume_context?.initial_prompt||"No initial prompt provided";console.log(`[WorkflowEngine] Executing INTENT stage for feature: ${this.featureName}`),console.log(`[WorkflowEngine] Initial prompt: ${n}`),console.log("[WorkflowEngine] Generating merged INTENT artifact with full inception content");let o=`intent-${this.workflowId}`,r=new Date().toISOString(),i=`---
|
|
931
931
|
id: ${o}
|
|
932
932
|
title: ${this.featureName}
|
|
@@ -24,7 +24,7 @@ export declare const HOOKS_DIR: string;
|
|
|
24
24
|
export declare const SETTINGS_FILE: string;
|
|
25
25
|
export declare const VERSION_FILE: string;
|
|
26
26
|
/** Current version - MUST match package.json */
|
|
27
|
-
export declare const VERSION = "4.4.
|
|
27
|
+
export declare const VERSION = "4.4.6";
|
|
28
28
|
/** Installation result */
|
|
29
29
|
export interface InstallResult {
|
|
30
30
|
success: boolean;
|
package/dist/installer/index.js
CHANGED
|
@@ -40,7 +40,7 @@ export const HOOKS_DIR = join(CLAUDE_CONFIG_DIR, 'hooks');
|
|
|
40
40
|
export const SETTINGS_FILE = join(CLAUDE_CONFIG_DIR, 'settings.json');
|
|
41
41
|
export const VERSION_FILE = join(CLAUDE_CONFIG_DIR, '.olympus-version.json');
|
|
42
42
|
/** Current version - MUST match package.json */
|
|
43
|
-
export const VERSION = '4.4.
|
|
43
|
+
export const VERSION = '4.4.6';
|
|
44
44
|
/**
|
|
45
45
|
* Read a content file from the resources/ directory.
|
|
46
46
|
*
|
package/package.json
CHANGED
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "olympus-ai",
|
|
3
|
-
"version": "4.4.
|
|
4
|
-
"description": "Olympus: Multi-agent orchestration for Claude Code. Summon the gods of code.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"import": "./dist/index.js",
|
|
11
|
-
"types": "./dist/index.d.ts"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"bin": {
|
|
15
|
-
"olympus-ai": "dist/cli/index.js"
|
|
16
|
-
},
|
|
17
|
-
"files": [
|
|
18
|
-
"dist",
|
|
19
|
-
"resources",
|
|
20
|
-
"scripts",
|
|
21
|
-
".claude-plugin",
|
|
22
|
-
"README.md",
|
|
23
|
-
"LICENSE",
|
|
24
|
-
"COPYRIGHT",
|
|
25
|
-
"NOTICE"
|
|
26
|
-
],
|
|
27
|
-
"scripts": {
|
|
28
|
-
"build": "node node_modules/typescript/bin/tsc",
|
|
29
|
-
"build:hooks": "node scripts/esbuild.hooks.mjs",
|
|
30
|
-
"build:all": "npm run build && npm run build:hooks",
|
|
31
|
-
"dev": "node node_modules/typescript/bin/tsc --watch",
|
|
32
|
-
"start": "node dist/index.js",
|
|
33
|
-
"test": "vitest",
|
|
34
|
-
"test:ui": "vitest --ui",
|
|
35
|
-
"test:run": "vitest run",
|
|
36
|
-
"test:coverage": "vitest run --coverage",
|
|
37
|
-
"lint": "eslint src",
|
|
38
|
-
"format": "prettier --write src/**/*.ts",
|
|
39
|
-
"prepare": "npm run build:all",
|
|
40
|
-
"prepublishOnly": "npm run build:all",
|
|
41
|
-
"postinstall": "node dist/cli/index.js postinstall || true",
|
|
42
|
-
"preuninstall": "node dist/cli/index.js uninstall --verbose || true"
|
|
43
|
-
},
|
|
44
|
-
"dependencies": {
|
|
45
|
-
"@anthropic-ai/claude-agent-sdk": "^0.1.0",
|
|
46
|
-
"@ast-grep/napi": "^0.31.0",
|
|
47
|
-
"chalk": "^5.3.0",
|
|
48
|
-
"commander": "^12.1.0",
|
|
49
|
-
"fs-extra": "^11.3.3",
|
|
50
|
-
"gpt-tokenizer": "^3.4.0",
|
|
51
|
-
"jsonc-parser": "^3.3.1",
|
|
52
|
-
"vscode-languageserver-protocol": "^3.17.5",
|
|
53
|
-
"zod": "^3.23.8"
|
|
54
|
-
},
|
|
55
|
-
"devDependencies": {
|
|
56
|
-
"@eslint/js": "^9.39.2",
|
|
57
|
-
"@types/fs-extra": "^11.0.4",
|
|
58
|
-
"@types/node": "^22.10.2",
|
|
59
|
-
"@typescript-eslint/eslint-plugin": "^8.18.2",
|
|
60
|
-
"@typescript-eslint/parser": "^8.18.2",
|
|
61
|
-
"@vitest/coverage-v8": "^4.0.18",
|
|
62
|
-
"@vitest/ui": "^4.0.17",
|
|
63
|
-
"esbuild": "^0.25.0",
|
|
64
|
-
"eslint": "^9.17.0",
|
|
65
|
-
"prettier": "^3.4.2",
|
|
66
|
-
"typescript": "^5.7.2",
|
|
67
|
-
"typescript-eslint": "^8.53.0",
|
|
68
|
-
"vitest": "^4.0.17"
|
|
69
|
-
},
|
|
70
|
-
"engines": {
|
|
71
|
-
"node": ">=20.0.0"
|
|
72
|
-
},
|
|
73
|
-
"repository": {
|
|
74
|
-
"type": "git",
|
|
75
|
-
"url": "git+https://github.com/mikev10/olympus.git"
|
|
76
|
-
},
|
|
77
|
-
"homepage": "https://github.com/mikev10/olympus#readme",
|
|
78
|
-
"bugs": {
|
|
79
|
-
"url": "https://github.com/mikev10/olympus/issues"
|
|
80
|
-
},
|
|
81
|
-
"author": {
|
|
82
|
-
"name": "Michael Vidal",
|
|
83
|
-
"url": "https://github.com/mikev10"
|
|
84
|
-
},
|
|
85
|
-
"license": "MIT",
|
|
86
|
-
"keywords": [
|
|
87
|
-
"claude",
|
|
88
|
-
"claude-code",
|
|
89
|
-
"ai",
|
|
90
|
-
"agent",
|
|
91
|
-
"multi-agent",
|
|
92
|
-
"orchestration",
|
|
93
|
-
"olympus",
|
|
94
|
-
"anthropic",
|
|
95
|
-
"llm"
|
|
96
|
-
],
|
|
97
|
-
"publishConfig": {
|
|
98
|
-
"access": "public"
|
|
99
|
-
}
|
|
100
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "olympus-ai",
|
|
3
|
+
"version": "4.4.6",
|
|
4
|
+
"description": "Olympus: Multi-agent orchestration for Claude Code. Summon the gods of code.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"bin": {
|
|
15
|
+
"olympus-ai": "dist/cli/index.js"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"resources",
|
|
20
|
+
"scripts",
|
|
21
|
+
".claude-plugin",
|
|
22
|
+
"README.md",
|
|
23
|
+
"LICENSE",
|
|
24
|
+
"COPYRIGHT",
|
|
25
|
+
"NOTICE"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "node node_modules/typescript/bin/tsc",
|
|
29
|
+
"build:hooks": "node scripts/esbuild.hooks.mjs",
|
|
30
|
+
"build:all": "npm run build && npm run build:hooks",
|
|
31
|
+
"dev": "node node_modules/typescript/bin/tsc --watch",
|
|
32
|
+
"start": "node dist/index.js",
|
|
33
|
+
"test": "vitest",
|
|
34
|
+
"test:ui": "vitest --ui",
|
|
35
|
+
"test:run": "vitest run",
|
|
36
|
+
"test:coverage": "vitest run --coverage",
|
|
37
|
+
"lint": "eslint src",
|
|
38
|
+
"format": "prettier --write src/**/*.ts",
|
|
39
|
+
"prepare": "npm run build:all",
|
|
40
|
+
"prepublishOnly": "npm run build:all",
|
|
41
|
+
"postinstall": "node dist/cli/index.js postinstall || true",
|
|
42
|
+
"preuninstall": "node dist/cli/index.js uninstall --verbose || true"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@anthropic-ai/claude-agent-sdk": "^0.1.0",
|
|
46
|
+
"@ast-grep/napi": "^0.31.0",
|
|
47
|
+
"chalk": "^5.3.0",
|
|
48
|
+
"commander": "^12.1.0",
|
|
49
|
+
"fs-extra": "^11.3.3",
|
|
50
|
+
"gpt-tokenizer": "^3.4.0",
|
|
51
|
+
"jsonc-parser": "^3.3.1",
|
|
52
|
+
"vscode-languageserver-protocol": "^3.17.5",
|
|
53
|
+
"zod": "^3.23.8"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@eslint/js": "^9.39.2",
|
|
57
|
+
"@types/fs-extra": "^11.0.4",
|
|
58
|
+
"@types/node": "^22.10.2",
|
|
59
|
+
"@typescript-eslint/eslint-plugin": "^8.18.2",
|
|
60
|
+
"@typescript-eslint/parser": "^8.18.2",
|
|
61
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
62
|
+
"@vitest/ui": "^4.0.17",
|
|
63
|
+
"esbuild": "^0.25.0",
|
|
64
|
+
"eslint": "^9.17.0",
|
|
65
|
+
"prettier": "^3.4.2",
|
|
66
|
+
"typescript": "^5.7.2",
|
|
67
|
+
"typescript-eslint": "^8.53.0",
|
|
68
|
+
"vitest": "^4.0.17"
|
|
69
|
+
},
|
|
70
|
+
"engines": {
|
|
71
|
+
"node": ">=20.0.0"
|
|
72
|
+
},
|
|
73
|
+
"repository": {
|
|
74
|
+
"type": "git",
|
|
75
|
+
"url": "git+https://github.com/mikev10/olympus.git"
|
|
76
|
+
},
|
|
77
|
+
"homepage": "https://github.com/mikev10/olympus#readme",
|
|
78
|
+
"bugs": {
|
|
79
|
+
"url": "https://github.com/mikev10/olympus/issues"
|
|
80
|
+
},
|
|
81
|
+
"author": {
|
|
82
|
+
"name": "Michael Vidal",
|
|
83
|
+
"url": "https://github.com/mikev10"
|
|
84
|
+
},
|
|
85
|
+
"license": "MIT",
|
|
86
|
+
"keywords": [
|
|
87
|
+
"claude",
|
|
88
|
+
"claude-code",
|
|
89
|
+
"ai",
|
|
90
|
+
"agent",
|
|
91
|
+
"multi-agent",
|
|
92
|
+
"orchestration",
|
|
93
|
+
"olympus",
|
|
94
|
+
"anthropic",
|
|
95
|
+
"llm"
|
|
96
|
+
],
|
|
97
|
+
"publishConfig": {
|
|
98
|
+
"access": "public"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -352,6 +352,33 @@ E) Other (please describe after [Answer]: tag below)
|
|
|
352
352
|
[Answer]:
|
|
353
353
|
```
|
|
354
354
|
|
|
355
|
+
## Post-Answer Consolidation
|
|
356
|
+
|
|
357
|
+
### MANDATORY: Update Plan After Answers Are Collected
|
|
358
|
+
|
|
359
|
+
**CRITICAL**: After collecting and analyzing user answers, you MUST consolidate the finalized decisions back into the plan or deliverable file BEFORE requesting approval. The user approves the PLAN FILE, not a chat summary.
|
|
360
|
+
|
|
361
|
+
### Consolidation Rules
|
|
362
|
+
|
|
363
|
+
1. **Questions and plans are ALWAYS separate files** — questions go in dedicated `{stage}-questions.md` files. Do NOT embed questions in plan files, deliverable files, or any other artifact.
|
|
364
|
+
2. **After answers are analyzed**, update the plan file with a "Finalized Approach" section that synthesizes the user's decisions into clear, actionable directives.
|
|
365
|
+
3. **The plan file must be self-contained** — someone reading only the plan file should understand the complete approach without needing to cross-reference the questions file.
|
|
366
|
+
4. **Present the updated plan file for approval** — never summarize decisions only in chat. The artifact is the source of truth.
|
|
367
|
+
|
|
368
|
+
### Consolidation Workflow
|
|
369
|
+
|
|
370
|
+
1. Collect answers in the dedicated questions file
|
|
371
|
+
2. Analyze answers for contradictions/ambiguities (resolve if found)
|
|
372
|
+
3. **Write finalized decisions into the plan file** (new section or update existing sections)
|
|
373
|
+
4. Present the **updated plan file path** for user approval
|
|
374
|
+
5. Wait for explicit approval before proceeding
|
|
375
|
+
|
|
376
|
+
### What NOT to Do
|
|
377
|
+
|
|
378
|
+
- Do NOT present a plan summary in chat while the plan file still contains raw unanswered questions
|
|
379
|
+
- Do NOT ask the user to approve a file that hasn't been updated with their decisions
|
|
380
|
+
- Do NOT embed questions inside plan files — always use separate dedicated question files
|
|
381
|
+
|
|
355
382
|
## Summary
|
|
356
383
|
|
|
357
384
|
**Remember**:
|
|
@@ -22,12 +22,12 @@ User Stories focus on:
|
|
|
22
22
|
**Execution mode**: Foreground sequential — single coherent story generation task requiring Sonnet-level reasoning for story quality.
|
|
23
23
|
|
|
24
24
|
**Delegation scope**:
|
|
25
|
-
- **Orchestrator retains**: Part 1 (Planning) — Steps 1-
|
|
26
|
-
- **Delegated to `oracle-medium`**: Part 2 (Generation) — Steps
|
|
25
|
+
- **Orchestrator retains**: Part 1 (Planning) — Steps 1-15. The orchestrator performs the intelligent assessment, creates the story plan, manages Q&A, resolves ambiguities, and obtains user approval.
|
|
26
|
+
- **Delegated to `oracle-medium`**: Part 2 (Generation) — Steps 16-19. The agent executes the approved plan to produce stories.md and personas.md following INVEST criteria.
|
|
27
27
|
|
|
28
28
|
**If an agent task fails**: Follow the Agent Task Failure Recovery procedure in `error-handling.md` — retry the delegation, never silently do the work yourself.
|
|
29
29
|
|
|
30
|
-
**After agent completes**: The orchestrator reviews the generated stories, presents the completion message (Step
|
|
30
|
+
**After agent completes**: The orchestrator reviews the generated stories, presents the completion message (Step 21), and manages the approval gate (Steps 22-24).
|
|
31
31
|
|
|
32
32
|
## Intelligent Assessment Guidelines
|
|
33
33
|
|
|
@@ -142,7 +142,8 @@ For medium priority cases, execute user stories if ANY of these apply:
|
|
|
142
142
|
|
|
143
143
|
**See `common/question-format-guide.md` for question formatting rules**
|
|
144
144
|
|
|
145
|
-
-
|
|
145
|
+
- Create a SEPARATE question file: `aidlc-docs/{workflow-id}/inception/user-stories/story-planning-questions.md`
|
|
146
|
+
- Do NOT embed questions in the story generation plan — questions and plans are always separate files
|
|
146
147
|
- Focus on ANY ambiguities, missing information, or areas needing clarification
|
|
147
148
|
- Generate questions wherever user input would improve story creation decisions
|
|
148
149
|
- **When in doubt, ask the question** - overconfidence leads to poor stories
|
|
@@ -176,13 +177,13 @@ For medium priority cases, execute user stories if ANY of these apply:
|
|
|
176
177
|
- Allow for hybrid approaches with clear decision criteria
|
|
177
178
|
|
|
178
179
|
## Step 6: Store Story Plan
|
|
179
|
-
- Save the
|
|
180
|
-
-
|
|
181
|
-
-
|
|
180
|
+
- Save the story plan in `aidlc-docs/{workflow-id}/inception/plans/story-generation-plan.md`
|
|
181
|
+
- The plan contains: overview, personas, execution steps, mandatory artifacts, story approach options
|
|
182
|
+
- Do NOT include questions in this file — questions are in the separate `story-planning-questions.md`
|
|
182
183
|
- Ensure plan is comprehensive and covers all story development aspects
|
|
183
184
|
|
|
184
185
|
## Step 7: Request User Input
|
|
185
|
-
- Ask user to fill in all [Answer]: tags
|
|
186
|
+
- Ask user to fill in all [Answer]: tags in the questions file (`story-planning-questions.md`)
|
|
186
187
|
- Emphasize importance of audit trail and decision documentation
|
|
187
188
|
- Provide clear instructions on how to fill in the [Answer]: tags
|
|
188
189
|
- Explain that all questions must be answered before proceeding
|
|
@@ -216,23 +217,39 @@ If the analysis in step 9 reveals ANY ambiguous answers, you MUST:
|
|
|
216
217
|
- "You said 'probably X' - what factors would make it definitely X vs definitely not X?"
|
|
217
218
|
- "You referenced 'standard practice' - can you define what that standard practice is?"
|
|
218
219
|
|
|
219
|
-
## Step 11:
|
|
220
|
+
## Step 11: MANDATORY: Consolidate Answers Into Plan
|
|
221
|
+
|
|
222
|
+
**See `common/question-format-guide.md` Post-Answer Consolidation rules**
|
|
223
|
+
|
|
224
|
+
After all answers are collected and ambiguities resolved, you MUST update the story generation plan file:
|
|
225
|
+
1. Read all finalized answers from `story-planning-questions.md`
|
|
226
|
+
2. Add a "Finalized Approach" section to `story-generation-plan.md` that synthesizes the user's decisions:
|
|
227
|
+
- Story organization approach (with rationale from user's choice)
|
|
228
|
+
- Acceptance criteria format
|
|
229
|
+
- Priority system
|
|
230
|
+
- Persona decisions
|
|
231
|
+
- Any other methodology decisions from the Q&A
|
|
232
|
+
3. Update the execution steps if needed to reflect the chosen approach
|
|
233
|
+
4. The plan file must be self-contained — readable without cross-referencing the questions file
|
|
234
|
+
5. **Do NOT present for approval until the plan file contains the finalized approach**
|
|
235
|
+
|
|
236
|
+
## Step 12: Avoid Implementation Details
|
|
220
237
|
- Focus on story creation methodology, not prioritization or development tasks
|
|
221
238
|
- Do not discuss technical generation at this stage
|
|
222
239
|
- Avoid creating development timelines or sprint planning
|
|
223
240
|
- Keep focus on story structure and format decisions
|
|
224
241
|
|
|
225
|
-
## Step
|
|
242
|
+
## Step 13: Log Approval Prompt
|
|
226
243
|
- Before asking for approval, log the prompt with timestamp in `aidlc-docs/audit.md`
|
|
227
244
|
- Include the complete approval prompt text
|
|
228
245
|
- Use ISO 8601 timestamp format
|
|
229
246
|
|
|
230
|
-
## Step
|
|
247
|
+
## Step 14: Wait for Explicit Approval of Plan
|
|
231
248
|
- Do not proceed until the user explicitly approves the story approach
|
|
232
249
|
- Approval must be clear and unambiguous
|
|
233
250
|
- If user requests changes, update the plan and repeat the approval process
|
|
234
251
|
|
|
235
|
-
## Step
|
|
252
|
+
## Step 15: Record Approval Response
|
|
236
253
|
- Log the user's approval response with timestamp in `aidlc-docs/audit.md`
|
|
237
254
|
- Include the exact user response text
|
|
238
255
|
- Mark the approval status clearly
|
|
@@ -241,35 +258,35 @@ If the analysis in step 9 reveals ANY ambiguous answers, you MUST:
|
|
|
241
258
|
|
|
242
259
|
# PART 2: GENERATION
|
|
243
260
|
|
|
244
|
-
## Step
|
|
245
|
-
- [ ] Read the complete story plan from `aidlc-docs/inception/plans/story-generation-plan.md`
|
|
261
|
+
## Step 16: Load Story Generation Plan
|
|
262
|
+
- [ ] Read the complete story plan from `aidlc-docs/{workflow-id}/inception/plans/story-generation-plan.md`
|
|
246
263
|
- [ ] Identify the next uncompleted step (first [ ] checkbox)
|
|
247
264
|
- [ ] Load the context and requirements for that step
|
|
248
265
|
|
|
249
|
-
## Step
|
|
266
|
+
## Step 17: Execute Current Step
|
|
250
267
|
- [ ] Perform exactly what the current step describes
|
|
251
268
|
- [ ] Generate story artifacts as specified in the plan
|
|
252
269
|
- [ ] Follow the approved methodology and format from Planning
|
|
253
270
|
- [ ] Use the story breakdown approach specified in the plan
|
|
254
271
|
|
|
255
|
-
## Step
|
|
272
|
+
## Step 18: MANDATORY: Update Progress
|
|
256
273
|
- [ ] Mark the completed step as [x] in the story generation plan
|
|
257
274
|
- [ ] **MANDATORY**: Update `aidlc-docs/{workflow-id}/aidlc-state.md` current status
|
|
258
275
|
- [ ] **MANDATORY**: Update `aidlc-docs/{workflow-id}/checkpoint.json` current status
|
|
259
276
|
- [ ] Save all generated artifacts
|
|
260
277
|
- **Do NOT proceed without completing state updates**
|
|
261
278
|
|
|
262
|
-
## Step
|
|
263
|
-
- [ ] If more steps remain, return to Step
|
|
279
|
+
## Step 19: Continue or Complete Generation
|
|
280
|
+
- [ ] If more steps remain, return to Step 16
|
|
264
281
|
- [ ] If all steps complete, verify stories are ready for next stage
|
|
265
282
|
- [ ] Ensure all mandatory artifacts are generated
|
|
266
283
|
|
|
267
|
-
## Step
|
|
284
|
+
## Step 20: Log Approval Prompt
|
|
268
285
|
- Before asking for approval, log the prompt with timestamp in `aidlc-docs/audit.md`
|
|
269
286
|
- Include the complete approval prompt text
|
|
270
287
|
- Use ISO 8601 timestamp format
|
|
271
288
|
|
|
272
|
-
## Step
|
|
289
|
+
## Step 21: Present Completion Message
|
|
273
290
|
- Present completion message in this structure:
|
|
274
291
|
1. **Completion Announcement** (mandatory): Always start with this:
|
|
275
292
|
|
|
@@ -302,17 +319,17 @@ If the analysis in step 9 reveals ANY ambiguous answers, you MUST:
|
|
|
302
319
|
---
|
|
303
320
|
```
|
|
304
321
|
|
|
305
|
-
## Step
|
|
322
|
+
## Step 22: Wait for Explicit Approval of Generated Stories
|
|
306
323
|
- Do not proceed until the user explicitly approves the generated stories
|
|
307
324
|
- Approval must be clear and unambiguous
|
|
308
325
|
- If user requests changes, update stories and repeat the approval process
|
|
309
326
|
|
|
310
|
-
## Step
|
|
327
|
+
## Step 23: Record Approval Response
|
|
311
328
|
- Log the user's approval response with timestamp in `aidlc-docs/audit.md`
|
|
312
329
|
- Include the exact user response text
|
|
313
330
|
- Mark the approval status clearly
|
|
314
331
|
|
|
315
|
-
## Step
|
|
332
|
+
## Step 24: MANDATORY: Update State Tracking
|
|
316
333
|
- **MANDATORY**: Update BOTH state files in the SAME interaction:
|
|
317
334
|
1. Mark User Stories stage complete in `aidlc-docs/{workflow-id}/aidlc-state.md`
|
|
318
335
|
2. Update `aidlc-docs/{workflow-id}/checkpoint.json` — set user-stories status to "completed" with completed_at timestamp, update current_inception_stage to next stage
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate structured intent briefs as pre-elaboration inputs for /plan workflows and Mob Elaboration sessions. Use this skill when users want to create intent briefs, prepare inputs for /plan, document what needs to be built before starting AI-DLC, prepare for Mob Elaboration, create pre-elaboration documents, capture feature intent, or scope work items. Trigger on phrases like "create a brief", "intent brief", "prepare for /plan", "pre-elaborate", "what should we build", "capture intent", "scope this work", "prepare for elaboration", or when users want to document a feature or change request before starting a full planning workflow. Also trigger when users have a list of items they want to inventory, prioritize, and prepare for team review — even if they don't use the word "brief" explicitly.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Intent Brief Generator
|
|
6
|
+
|
|
7
|
+
You help teams capture the "what" and "why" before diving into the "how." Intent briefs are lightweight, structured documents that serve as high-quality inputs to `/plan` workflows and Mob Elaboration sessions. They live in `.olympus/briefs/` as pre-workflow artifacts — created before any AI-DLC workflow exists.
|
|
8
|
+
|
|
9
|
+
## Input
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
$ARGUMENTS
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Mode Detection
|
|
18
|
+
|
|
19
|
+
Determine which mode to run based on the input:
|
|
20
|
+
|
|
21
|
+
- **`--batch`** flag or input contains a list of items → **Batch Mode**
|
|
22
|
+
- Everything else → **Single Mode**
|
|
23
|
+
|
|
24
|
+
If the input already contains substantial context (e.g., the user pasted a feature description, a ticket, or a problem statement), extract what you can from it and confirm rather than re-asking. The goal is a conversation, not a questionnaire.
|
|
25
|
+
|
|
26
|
+
### Thin-Context Handling
|
|
27
|
+
|
|
28
|
+
When the input is vague or minimal (e.g., "we need password reset" with no further detail), don't generate a brief full of assumptions. Instead:
|
|
29
|
+
|
|
30
|
+
1. **Generate the brief anyway** — a brief with "Unknown" sections is better than no brief. Fill in what you can reasonably infer from the request itself.
|
|
31
|
+
2. **Mark unknowns explicitly** — for each unknown section, include the specific questions you would have asked. This turns the brief into a structured interview guide for the next conversation. Example: "Unknown — Who is requesting this? What is the business impact? Is there a deadline?"
|
|
32
|
+
3. **Invest in Notes for Elaboration** — when context is thin, this section becomes the most valuable part of the brief. List the open questions, risks, and decisions the elaboration team needs to resolve.
|
|
33
|
+
|
|
34
|
+
The goal is that even a thin-context brief is useful — it captures what is known, makes the unknowns visible, and gives the team a structured starting point for discussion.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Single Mode
|
|
39
|
+
|
|
40
|
+
### The Interview
|
|
41
|
+
|
|
42
|
+
Have a natural conversation to understand the user's intent. You're trying to fill in these sections, but don't march through them like a checklist — let the conversation flow and ask follow-ups where it matters most.
|
|
43
|
+
|
|
44
|
+
**Core questions (ask these):**
|
|
45
|
+
|
|
46
|
+
1. **What needs to change?** — The problem or opportunity. What's broken, missing, or possible? Get specific enough that someone unfamiliar with the context could understand.
|
|
47
|
+
|
|
48
|
+
2. **Why does it matter?** — Who's asking for this, what's the business impact, and why now? This is what separates a brief from a sticky note. If the user mentions a stakeholder request, capture the name and context.
|
|
49
|
+
|
|
50
|
+
3. **What does "done" look like?** — The desired outcome, described in terms of what should be true when this work is complete. Keep it outcome-focused ("customers can self-serve password resets") not implementation-focused ("add a /reset-password endpoint").
|
|
51
|
+
|
|
52
|
+
**Contextual questions (ask as needed — skip what's obvious or irrelevant):**
|
|
53
|
+
|
|
54
|
+
4. **What's in scope and what's not?** — Boundaries prevent scope creep during elaboration. Especially useful when a problem could be interpreted broadly.
|
|
55
|
+
|
|
56
|
+
5. **Known constraints?** — Technical limitations, deadlines, dependencies on other work, team availability. Anything the elaboration team should know upfront.
|
|
57
|
+
|
|
58
|
+
6. **Priority relative to other work?** — Where does this sit? Is it urgent, important-but-not-urgent, or nice-to-have? If other briefs exist, how does this one rank?
|
|
59
|
+
|
|
60
|
+
7. **Any references?** — Tickets, designs, prior art, related features, stakeholder emails. Links and pointers that give the elaboration team a head start.
|
|
61
|
+
|
|
62
|
+
**Things to listen for and capture even if not explicitly asked:**
|
|
63
|
+
- Stakeholder names and their relationship to the request
|
|
64
|
+
- Implicit constraints ("we're on .NET 6" or "this is a legacy iFrame")
|
|
65
|
+
- Dependencies between this work and other known work
|
|
66
|
+
- Urgency signals ("Mario asked for this", "blocking 3 accounts")
|
|
67
|
+
|
|
68
|
+
### Generating the Brief
|
|
69
|
+
|
|
70
|
+
Once you have enough context, generate the brief. Don't wait for perfect information — a brief with a few "Unknown" sections is better than no brief.
|
|
71
|
+
|
|
72
|
+
Create the directory if needed, then write the brief:
|
|
73
|
+
|
|
74
|
+
**File location:** `.olympus/briefs/{kebab-case-name}.md`
|
|
75
|
+
|
|
76
|
+
**Template:**
|
|
77
|
+
|
|
78
|
+
```markdown
|
|
79
|
+
# Intent Brief: [Name]
|
|
80
|
+
|
|
81
|
+
**Date:** [ISO date]
|
|
82
|
+
**Author:** [who created it — ask if not obvious, default to "Unknown" if not provided]
|
|
83
|
+
**Status:** Draft
|
|
84
|
+
|
|
85
|
+
## Problem
|
|
86
|
+
|
|
87
|
+
[Clear problem statement — what's wrong or what opportunity exists. 2-4 sentences that someone unfamiliar with the context could understand.]
|
|
88
|
+
|
|
89
|
+
## Business Motivation
|
|
90
|
+
|
|
91
|
+
[Who wants this, why it matters, business impact. Include stakeholder names if known. Capture urgency signals.]
|
|
92
|
+
|
|
93
|
+
## Desired Outcome
|
|
94
|
+
|
|
95
|
+
[What "done" looks like — outcome-focused, not implementation-focused. Describe the end state, not the steps to get there.]
|
|
96
|
+
|
|
97
|
+
## Scope
|
|
98
|
+
|
|
99
|
+
### In Scope
|
|
100
|
+
- [Specific items this work covers]
|
|
101
|
+
|
|
102
|
+
### Out of Scope
|
|
103
|
+
- [What this work explicitly does NOT cover — prevents scope creep during elaboration]
|
|
104
|
+
|
|
105
|
+
## Known Constraints
|
|
106
|
+
|
|
107
|
+
- [Technical, timeline, dependency, or team constraints]
|
|
108
|
+
- [Include anything that would surprise the elaboration team if they didn't know it upfront]
|
|
109
|
+
|
|
110
|
+
## References
|
|
111
|
+
|
|
112
|
+
- [Links to tickets, designs, prior art, stakeholder communications]
|
|
113
|
+
|
|
114
|
+
## Notes for Elaboration
|
|
115
|
+
|
|
116
|
+
[Anything the team should discuss during Mob Elaboration — open questions, risks you can see, areas where the team's expertise is needed to make decisions. This section is where you flag things the brief can't answer alone.]
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
After writing, confirm the file path and offer:
|
|
120
|
+
- "Want to adjust anything before we finalize?"
|
|
121
|
+
- "Ready to create another brief, or is this the only one?"
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Batch Mode
|
|
126
|
+
|
|
127
|
+
Batch mode is for when the user has a list of work items they want to turn into briefs — like a set of pages to update, features to scope, or tickets to prepare for elaboration.
|
|
128
|
+
|
|
129
|
+
### Step 1: Accept the List
|
|
130
|
+
|
|
131
|
+
The user provides their list — pasted text, a file reference, or typed out. Accept any reasonable format. Your job is to parse it into discrete items.
|
|
132
|
+
|
|
133
|
+
Confirm the list back: "I see N items. Here's what I've got: [list]. Does this look right, or did I miss/misinterpret anything?"
|
|
134
|
+
|
|
135
|
+
### Step 2: Lightweight Interview
|
|
136
|
+
|
|
137
|
+
Don't run the full 7-question interview for each item — that would take forever with a large list. Instead:
|
|
138
|
+
|
|
139
|
+
1. **Ask shared context questions once** — things that apply to all items (e.g., "Who's the stakeholder for all of these?", "What's the common motivation?", "Are there shared constraints?")
|
|
140
|
+
|
|
141
|
+
2. **For each item, ask only what's unique** — the problem statement and any item-specific context. If items are similar (e.g., "update iFrame for billing page" and "update iFrame for schedule page"), you can template the brief structure and ask about differences.
|
|
142
|
+
|
|
143
|
+
3. **Infer where possible** — if the user says "Mario requested the first 5", you don't need to ask about stakeholder for each of those 5.
|
|
144
|
+
|
|
145
|
+
### Step 3: Prioritize
|
|
146
|
+
|
|
147
|
+
Help the user sequence the items. Ask about:
|
|
148
|
+
|
|
149
|
+
- **Business value** — Which items deliver the most impact?
|
|
150
|
+
- **Urgency** — Are any time-sensitive or blocking other work?
|
|
151
|
+
- **Dependencies** — Do any items need to be done before others?
|
|
152
|
+
- **Stakeholder priority** — Has anyone already indicated an order?
|
|
153
|
+
|
|
154
|
+
If the user already has a priority order, confirm it rather than re-deriving it.
|
|
155
|
+
|
|
156
|
+
**Partial priority ordering:** When some items have an explicit priority (e.g., "Mario requested the first 3") but others don't, preserve the explicit ordering for those items and sequence the remaining items using dependency analysis and risk assessment. Explain your reasoning for the inferred positions — the user should understand why item 4 comes before item 5.
|
|
157
|
+
|
|
158
|
+
### Step 4: Generate All Briefs
|
|
159
|
+
|
|
160
|
+
Write each brief to `.olympus/briefs/{kebab-case-name}.md` using the same template as single mode. Include the priority position in each brief's metadata.
|
|
161
|
+
|
|
162
|
+
### Step 5: Generate the Index
|
|
163
|
+
|
|
164
|
+
Write the priority-sequenced index:
|
|
165
|
+
|
|
166
|
+
**File location:** `.olympus/briefs/index.md`
|
|
167
|
+
|
|
168
|
+
```markdown
|
|
169
|
+
# Intent Briefs — [Collection Name]
|
|
170
|
+
|
|
171
|
+
**Created:** [ISO date]
|
|
172
|
+
**Author:** [who created them]
|
|
173
|
+
**Total items:** [N]
|
|
174
|
+
|
|
175
|
+
## Priority Sequence
|
|
176
|
+
|
|
177
|
+
| # | Brief | Summary | Stakeholder | Status |
|
|
178
|
+
|---|-------|---------|-------------|--------|
|
|
179
|
+
| 1 | [Name](./kebab-name.md) | One-line summary | Who asked | Draft |
|
|
180
|
+
| 2 | ... | ... | ... | Draft |
|
|
181
|
+
|
|
182
|
+
## Shared Context
|
|
183
|
+
|
|
184
|
+
[Any context that applies across all briefs — common motivation, constraints, timeline, etc.]
|
|
185
|
+
|
|
186
|
+
## Notes
|
|
187
|
+
|
|
188
|
+
[How this collection should be used — e.g., "Feed into March 30th Mob Elaboration session" or "Input for /plan runs on the EZFacility codebase"]
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Step 6: Identify Cross-Brief Dependencies
|
|
192
|
+
|
|
193
|
+
After generating all briefs, review the full set and identify items that share components, data models, or user flows. Document these in the index under a dedicated section:
|
|
194
|
+
|
|
195
|
+
```markdown
|
|
196
|
+
## Cross-Brief Dependencies
|
|
197
|
+
|
|
198
|
+
- **[Brief A] ↔ [Brief B]** — Share [component/data model/user flow]. Elaborate together or sequence A before B.
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
This prevents the team from elaborating overlapping items in isolation, which leads to conflicting designs and rework during construction.
|
|
202
|
+
|
|
203
|
+
After generating all briefs, the index, and cross-brief dependencies, summarize what was created and offer next steps.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Integration with /plan
|
|
208
|
+
|
|
209
|
+
When briefs exist in `.olympus/briefs/`, they're designed to be consumed by the `/plan` workflow. Document this in the brief output:
|
|
210
|
+
|
|
211
|
+
> These briefs are saved to `.olympus/briefs/` and are ready to be used as input for `/plan`. When you start a planning workflow, reference the brief: `/plan — see intent brief at .olympus/briefs/{name}.md`
|
|
212
|
+
|
|
213
|
+
This integration point will be formalized in a future update to the `/plan` skill, where it will automatically detect and offer to use existing briefs.
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Principles
|
|
218
|
+
|
|
219
|
+
- **Capture intent, not design.** Briefs describe problems and outcomes. Solutions, architecture, and implementation details belong to `/plan` and Mob Elaboration.
|
|
220
|
+
- **Good enough beats perfect.** A brief with an "Unknown" section is better than no brief. The elaboration team will fill gaps — that's their job.
|
|
221
|
+
- **Respect the user's time.** In batch mode especially, don't ask questions you can infer the answers to. Template similar items. Be efficient.
|
|
222
|
+
- **Standalone value.** A brief should be useful even if `/plan` is never run — it's a communication artifact that helps teams align on what needs to be built and why.
|
|
223
|
+
- **No codebase analysis.** Briefs are business-context documents. Technical discovery, reverse engineering, and architecture decisions happen in `/plan`. Don't read source code or suggest implementations.
|