@wizdear/atlas-code 0.2.4 → 0.2.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.
Files changed (115) hide show
  1. package/README.md +1 -1
  2. package/dist/agent-factory.d.ts +10 -5
  3. package/dist/agent-factory.d.ts.map +1 -1
  4. package/dist/agent-factory.js +50 -13
  5. package/dist/agent-factory.js.map +1 -1
  6. package/dist/cli.d.ts +7 -1
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +72 -16
  9. package/dist/cli.js.map +1 -1
  10. package/dist/discovery.d.ts +9 -2
  11. package/dist/discovery.d.ts.map +1 -1
  12. package/dist/discovery.js +4 -5
  13. package/dist/discovery.js.map +1 -1
  14. package/dist/extension.d.ts +9 -2
  15. package/dist/extension.d.ts.map +1 -1
  16. package/dist/extension.js +1103 -381
  17. package/dist/extension.js.map +1 -1
  18. package/dist/gate.d.ts +1 -1
  19. package/dist/gate.d.ts.map +1 -1
  20. package/dist/gate.js.map +1 -1
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +1 -1
  24. package/dist/index.js.map +1 -1
  25. package/dist/orchestrator.d.ts +0 -4
  26. package/dist/orchestrator.d.ts.map +1 -1
  27. package/dist/orchestrator.js +0 -2
  28. package/dist/orchestrator.js.map +1 -1
  29. package/dist/pipeline-editor.d.ts +2 -0
  30. package/dist/pipeline-editor.d.ts.map +1 -1
  31. package/dist/pipeline-editor.js +36 -5
  32. package/dist/pipeline-editor.js.map +1 -1
  33. package/dist/pipeline.d.ts +2 -10
  34. package/dist/pipeline.d.ts.map +1 -1
  35. package/dist/pipeline.js +4 -6
  36. package/dist/pipeline.js.map +1 -1
  37. package/dist/planner.d.ts +9 -2
  38. package/dist/planner.d.ts.map +1 -1
  39. package/dist/planner.js +15 -11
  40. package/dist/planner.js.map +1 -1
  41. package/dist/roles/architect.d.ts +1 -1
  42. package/dist/roles/architect.d.ts.map +1 -1
  43. package/dist/roles/architect.js +1 -1
  44. package/dist/roles/architect.js.map +1 -1
  45. package/dist/roles/cicd.d.ts +1 -1
  46. package/dist/roles/cicd.d.ts.map +1 -1
  47. package/dist/roles/cicd.js +5 -0
  48. package/dist/roles/cicd.js.map +1 -1
  49. package/dist/roles/documenter.d.ts +1 -1
  50. package/dist/roles/documenter.d.ts.map +1 -1
  51. package/dist/roles/documenter.js +11 -0
  52. package/dist/roles/documenter.js.map +1 -1
  53. package/dist/roles/index.d.ts +1 -0
  54. package/dist/roles/index.d.ts.map +1 -1
  55. package/dist/roles/index.js +3 -0
  56. package/dist/roles/index.js.map +1 -1
  57. package/dist/roles/recover.d.ts +5 -0
  58. package/dist/roles/recover.d.ts.map +1 -0
  59. package/dist/roles/recover.js +82 -0
  60. package/dist/roles/recover.js.map +1 -0
  61. package/dist/roles/reviewer.d.ts +1 -1
  62. package/dist/roles/reviewer.d.ts.map +1 -1
  63. package/dist/roles/reviewer.js +7 -1
  64. package/dist/roles/reviewer.js.map +1 -1
  65. package/dist/roles/standards-enricher.d.ts +1 -1
  66. package/dist/roles/standards-enricher.d.ts.map +1 -1
  67. package/dist/roles/standards-enricher.js +8 -0
  68. package/dist/roles/standards-enricher.js.map +1 -1
  69. package/dist/roles/tester.d.ts +1 -1
  70. package/dist/roles/tester.d.ts.map +1 -1
  71. package/dist/roles/tester.js +7 -0
  72. package/dist/roles/tester.js.map +1 -1
  73. package/dist/router.d.ts.map +1 -1
  74. package/dist/router.js +6 -6
  75. package/dist/router.js.map +1 -1
  76. package/dist/standards.d.ts +37 -11
  77. package/dist/standards.d.ts.map +1 -1
  78. package/dist/standards.js +71 -89
  79. package/dist/standards.js.map +1 -1
  80. package/dist/step-executor.d.ts +15 -2
  81. package/dist/step-executor.d.ts.map +1 -1
  82. package/dist/step-executor.js +138 -30
  83. package/dist/step-executor.js.map +1 -1
  84. package/dist/store.d.ts +3 -10
  85. package/dist/store.d.ts.map +1 -1
  86. package/dist/store.js +45 -57
  87. package/dist/store.js.map +1 -1
  88. package/dist/system-architect.d.ts +9 -2
  89. package/dist/system-architect.d.ts.map +1 -1
  90. package/dist/system-architect.js +6 -10
  91. package/dist/system-architect.js.map +1 -1
  92. package/dist/telegram/bridge.d.ts +39 -0
  93. package/dist/telegram/bridge.d.ts.map +1 -0
  94. package/dist/telegram/bridge.js +380 -0
  95. package/dist/telegram/bridge.js.map +1 -0
  96. package/dist/telegram/formatter.d.ts +15 -0
  97. package/dist/telegram/formatter.d.ts.map +1 -0
  98. package/dist/telegram/formatter.js +86 -0
  99. package/dist/telegram/formatter.js.map +1 -0
  100. package/dist/telegram/renderer.d.ts +45 -0
  101. package/dist/telegram/renderer.d.ts.map +1 -0
  102. package/dist/telegram/renderer.js +150 -0
  103. package/dist/telegram/renderer.js.map +1 -0
  104. package/dist/telegram/telegram-api.d.ts +84 -0
  105. package/dist/telegram/telegram-api.d.ts.map +1 -0
  106. package/dist/telegram/telegram-api.js +134 -0
  107. package/dist/telegram/telegram-api.js.map +1 -0
  108. package/dist/types.d.ts +10 -1
  109. package/dist/types.d.ts.map +1 -1
  110. package/dist/types.js.map +1 -1
  111. package/dist/ui.d.ts +1 -1
  112. package/dist/ui.d.ts.map +1 -1
  113. package/dist/ui.js +2 -0
  114. package/dist/ui.js.map +1 -1
  115. package/package.json +1 -1
package/dist/planner.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createRoleAgent, runAgent } from "./agent-factory.js";
2
2
  import { getSystemPromptForRole } from "./roles/index.js";
3
- import { extractArtifactContent } from "./step-executor.js";
3
+ import { aggregateUsage, extractArtifactContent } from "./step-executor.js";
4
4
  // ─── Planner Runner ──────────────────────────────────────────────────────────
5
5
  /**
6
6
  * Runs the Planner Agent to generate plan.json and spec.md for each feature
@@ -27,8 +27,12 @@ export async function runPlanner(options) {
27
27
  if (await store.hasGlobalArtifact("impact-report.md")) {
28
28
  impactReport = await store.readGlobalArtifact("impact-report.md");
29
29
  }
30
+ let systemDesign;
31
+ if (await store.hasSystemDesign()) {
32
+ systemDesign = await store.readSystemDesign();
33
+ }
30
34
  // 2. Combine context
31
- const featureContext = buildPlannerContext(requirements, projectContext, impactReport);
35
+ const featureContext = buildPlannerContext(requirements, impactReport, systemDesign);
32
36
  // 3. Create Agent
33
37
  const systemPrompt = getSystemPromptForRole("planner");
34
38
  const agent = await createRoleAgent({
@@ -39,7 +43,6 @@ export async function runPlanner(options) {
39
43
  model,
40
44
  featureContext: featureContext || undefined,
41
45
  getApiKey,
42
- availableSkills: options.availableSkills,
43
46
  });
44
47
  // Notify external code that the agent has been created (for abort wiring)
45
48
  options.onAgentCreated?.(agent);
@@ -56,18 +59,19 @@ export async function runPlanner(options) {
56
59
  prompt = buildPlannerPrompt(requirements, projectContext, impactReport);
57
60
  }
58
61
  const response = await runAgent(agent, prompt, onAgentEvent ? { onEvent: onAgentEvent } : undefined);
62
+ const usage = aggregateUsage(agent.state.messages);
59
63
  onMessage?.(response);
60
64
  // 5. Extract and save plan.json
61
65
  const planContent = extractArtifactContent(response, "plan.json", false);
62
66
  if (!planContent) {
63
- return { completed: false, featureCount: 0 };
67
+ return { completed: false, featureCount: 0, usage };
64
68
  }
65
69
  let plan;
66
70
  try {
67
71
  plan = JSON.parse(planContent);
68
72
  }
69
73
  catch {
70
- return { completed: false, featureCount: 0 };
74
+ return { completed: false, featureCount: 0, usage };
71
75
  }
72
76
  await store.savePlan(plan);
73
77
  // 6. Extract and save each feature's spec.md
@@ -77,7 +81,7 @@ export async function runPlanner(options) {
77
81
  await store.writeArtifact(feature.featureId, "spec.md", specContent);
78
82
  }
79
83
  }
80
- return { completed: true, featureCount: plan.features.length };
84
+ return { completed: true, featureCount: plan.features.length, usage };
81
85
  }
82
86
  catch (error) {
83
87
  // Interruption by agent.abort(): "Request was aborted" error
@@ -92,20 +96,20 @@ export async function runPlanner(options) {
92
96
  }
93
97
  }
94
98
  // ─── Context & Prompt Builders ───────────────────────────────────────────────
95
- function buildPlannerContext(requirements, projectContext, impactReport) {
99
+ function buildPlannerContext(requirements, impactReport, systemDesign) {
96
100
  const parts = [];
97
101
  if (requirements) {
98
102
  parts.push("## Requirements\n");
99
103
  parts.push(requirements);
100
104
  }
101
- if (projectContext) {
102
- parts.push("## Project Context\n");
103
- parts.push(projectContext);
104
- }
105
105
  if (impactReport) {
106
106
  parts.push("## Impact Report\n");
107
107
  parts.push(impactReport);
108
108
  }
109
+ if (systemDesign) {
110
+ parts.push("## System Architecture\n");
111
+ parts.push(systemDesign);
112
+ }
109
113
  return parts.join("\n\n");
110
114
  }
111
115
  function buildPlannerPrompt(requirements, projectContext, impactReport) {
@@ -1 +1 @@
1
- {"version":3,"file":"planner.js","sourceRoot":"","sources":["../src/planner.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAoC5D,0MAAgF;AAEhF;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,OAAuB,EAA0B;IACjF,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IAEpG,iBAAiB;IACjB,IAAI,YAAgC,CAAC;IACrC,IAAI,MAAM,KAAK,CAAC,eAAe,EAAE,EAAE,CAAC;QACnC,YAAY,GAAG,MAAM,KAAK,CAAC,gBAAgB,EAAE,CAAC;IAC/C,CAAC;IAED,IAAI,cAAkC,CAAC;IACvC,IAAI,MAAM,KAAK,CAAC,iBAAiB,EAAE,EAAE,CAAC;QACrC,cAAc,GAAG,MAAM,KAAK,CAAC,kBAAkB,EAAE,CAAC;IACnD,CAAC;IAED,IAAI,YAAgC,CAAC;IACrC,IAAI,MAAM,KAAK,CAAC,iBAAiB,CAAC,k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C,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChB,CAAC;IAED,IAAI,YAAY,EAAE,CAAC;QAClB,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAC/B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CACT,yJAAyJ,CACzJ,CAAC;QACF,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACzB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAC9B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,mEAAmE,CAAC,CAAC;IAChF,KAAK,CAAC,IAAI,CAAC,sEAAsE,CAAC,CAAC;IACnF,KAAK,CAAC,IAAI,CAAC,2DAA2D,CAAC,CAAC;IACxE,KAAK,CAAC,IAAI,CAAC,6DAA6D,CAAC,CAAC;IAC1E,KAAK,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;IAC/D,KAAK,CAAC,IAAI,CAAC,yEAAyE,CAAC,CAAC;IAEtF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAAA,CACxB","sourcesContent":["import type { Agent, AgentEvent } from \"@mariozechner/pi-agent-core\";\nimport type { Model } from \"@mariozechner/pi-ai\";\nimport type { GetApiKeyFn } from \"./agent-factory.js\";\nimport { createRoleAgent, runAgent } from \"./agent-factory.js\";\nimport { getSystemPromptForRole } from \"./roles/index.js\";\nimport { extractArtifactContent } from \"./step-executor.js\";\nimport type { VibeStore } from \"./store.js\";\nimport type { PlanData, VibeConfig } from \"./types.js\";\n\n// ─── Types ───────────────────────────────────────────────────────────────────\n\n/** Planner execution options */\nexport interface PlannerOptions {\n\tstore: VibeStore;\n\tconfig: VibeConfig;\n\tprojectRoot: string;\n\tgetApiKey?: GetApiKeyFn;\n\t/** Model to use. Uses the Agent's default model if not specified. */\n\tmodel?: Model<any>;\n\t/** Agent event callback. Used for progress display, etc. */\n\tonAgentEvent?: (event: AgentEvent) => void;\n\t/** Callback to relay agent messages externally */\n\tonMessage?: (message: string) => void;\n\t/** User feedback on rejection. Regenerates the existing plan with feedback applied. */\n\tfeedback?: string;\n\t/** Lightweight skill index. Included in the agent system prompt. */\n\tavailableSkills?: string;\n\t/** Callback invoked when the agent is created. Used for abort wiring, etc. */\n\tonAgentCreated?: (agent: Agent) => void;\n\t/** Callback invoked when the agent finishes execution. */\n\tonAgentFinished?: () => void;\n}\n\n/** Planner execution result */\nexport interface PlannerResult {\n\t/** Whether plan.json was generated */\n\tcompleted: boolean;\n\t/** Number of decomposed features */\n\tfeatureCount: number;\n}\n\n// ─── Planner Runner ──────────────────────────────────────────────────────────\n\n/**\n * Runs the Planner Agent to generate plan.json and spec.md for each feature\n * based on requirements.md and project-context.md.\n *\n * 1. Load requirements.md and project-context.md from the store\n * 2. Create Planner Agent (readonly — extracts artifacts from response)\n * 3. Run the agent\n * 4. Extract plan.json from the response → save to store\n * 5. Extract each feature's spec.md → save to store\n */\nexport async function runPlanner(options: PlannerOptions): Promise<PlannerResult> {\n\tconst { store, config, projectRoot, getApiKey, model, onAgentEvent, onMessage, feedback } = options;\n\n\t// 1. Load inputs\n\tlet requirements: string | undefined;\n\tif (await store.hasRequirements()) {\n\t\trequirements = await store.readRequirements();\n\t}\n\n\tlet projectContext: string | undefined;\n\tif (await store.hasProjectContext()) {\n\t\tprojectContext = await store.readProjectContext();\n\t}\n\n\tlet impactReport: string | undefined;\n\tif (await store.hasGlobalArtifact(\"impact-report.md\")) {\n\t\timpactReport = await store.readGlobalArtifact(\"impact-report.md\");\n\t}\n\n\t// 2. Combine context\n\tconst featureContext = buildPlannerContext(requirements, projectContext, impactReport);\n\n\t// 3. Create Agent\n\tconst systemPrompt = getSystemPromptForRole(\"planner\");\n\tconst agent = await createRoleAgent({\n\t\trole: \"planner\",\n\t\tsystemPrompt,\n\t\tconfig,\n\t\tprojectRoot,\n\t\tmodel,\n\t\tfeatureContext: featureContext || undefined,\n\t\tgetApiKey,\n\t\tavailableSkills: options.availableSkills,\n\t});\n\n\t// Notify external code that the agent has been created (for abort wiring)\n\toptions.onAgentCreated?.(agent);\n\n\t// 4. Build prompt and execute\n\ttry {\n\t\tlet prompt: string;\n\t\tif (feedback) {\n\t\t\tprompt =\n\t\t\t\t`The previous plan was rejected with the following feedback:\\n\\n${feedback}\\n\\n` +\n\t\t\t\t\"Please revise the plan based on this feedback.\\n\\n\" +\n\t\t\t\tbuildPlannerPrompt(requirements, projectContext, impactReport);\n\t\t} else {\n\t\t\tprompt = buildPlannerPrompt(requirements, projectContext, impactReport);\n\t\t}\n\t\tconst response = await runAgent(agent, prompt, onAgentEvent ? { onEvent: onAgentEvent } : undefined);\n\t\tonMessage?.(response);\n\n\t\t// 5. Extract and save plan.json\n\t\tconst planContent = extractArtifactContent(response, \"plan.json\", false);\n\t\tif (!planContent) {\n\t\t\treturn { completed: false, featureCount: 0 };\n\t\t}\n\n\t\tlet plan: PlanData;\n\t\ttry {\n\t\t\tplan = JSON.parse(planContent) as PlanData;\n\t\t} catch {\n\t\t\treturn { completed: false, featureCount: 0 };\n\t\t}\n\n\t\tawait store.savePlan(plan);\n\n\t\t// 6. Extract and save each feature's spec.md\n\t\tfor (const feature of plan.features) {\n\t\t\tconst specContent = extractArtifactContent(response, `${feature.featureId}/spec.md`, false);\n\t\t\tif (specContent) {\n\t\t\t\tawait store.writeArtifact(feature.featureId, \"spec.md\", specContent);\n\t\t\t}\n\t\t}\n\n\t\treturn { completed: true, featureCount: plan.features.length };\n\t} catch (error) {\n\t\t// Interruption by agent.abort(): \"Request was aborted\" error\n\t\tconst msg = error instanceof Error ? error.message : String(error);\n\t\tif (msg.includes(\"aborted\")) {\n\t\t\treturn { completed: false, featureCount: 0 };\n\t\t}\n\t\tthrow error;\n\t} finally {\n\t\toptions.onAgentFinished?.();\n\t}\n}\n\n// ─── Context & Prompt Builders ───────────────────────────────────────────────\n\nfunction buildPlannerContext(requirements?: string, projectContext?: string, impactReport?: string): string {\n\tconst parts: string[] = [];\n\n\tif (requirements) {\n\t\tparts.push(\"## Requirements\\n\");\n\t\tparts.push(requirements);\n\t}\n\n\tif (projectContext) {\n\t\tparts.push(\"## Project Context\\n\");\n\t\tparts.push(projectContext);\n\t}\n\n\tif (impactReport) {\n\t\tparts.push(\"## Impact Report\\n\");\n\t\tparts.push(impactReport);\n\t}\n\n\treturn parts.join(\"\\n\\n\");\n}\n\nfunction buildPlannerPrompt(requirements?: string, projectContext?: string, impactReport?: string): string {\n\tconst parts: string[] = [];\n\n\tparts.push(\"Analyze the following inputs and decompose the requirements into features.\");\n\tparts.push(\"\");\n\n\tif (requirements) {\n\t\tparts.push(\"## Requirements Document\");\n\t\tparts.push(\"\");\n\t\tparts.push(requirements);\n\t\tparts.push(\"\");\n\t} else {\n\t\tparts.push(\"Note: No requirements.md found. Use the project context to create a reasonable plan.\");\n\t\tparts.push(\"\");\n\t}\n\n\tif (projectContext) {\n\t\tparts.push(\"## Project Context\");\n\t\tparts.push(\"\");\n\t\tparts.push(projectContext);\n\t\tparts.push(\"\");\n\t}\n\n\tif (impactReport) {\n\t\tparts.push(\"## Impact Report\");\n\t\tparts.push(\"\");\n\t\tparts.push(\n\t\t\t\"The following impact analysis was performed on the existing codebase. Use it to inform feature decomposition, dependency ordering, and risk assessment.\",\n\t\t);\n\t\tparts.push(\"\");\n\t\tparts.push(impactReport);\n\t\tparts.push(\"\");\n\t}\n\n\tparts.push(\"## Instructions\");\n\tparts.push(\"\");\n\tparts.push(\"1. Decompose the requirements into independent, testable features\");\n\tparts.push(\"2. Map each feature to requirement IDs (FR-xxx) from requirements.md\");\n\tparts.push(\"3. Estimate complexity (low/medium/high) for each feature\");\n\tparts.push(\"4. Define dependency relationships and organize into phases\");\n\tparts.push(\"5. Output plan.json in a ```plan.json code block\");\n\tparts.push(\"6. Output each feature's spec.md in a ```{featureId}/spec.md code block\");\n\n\treturn parts.join(\"\\n\");\n}\n"]}
1
+ {"version":3,"file":"planner.js","sourceRoot":"","sources":["../src/planner.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAoC5E,0MAAgF;AAEhF;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,OAAuB,EAA0B;IACjF,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IAEpG,iBAAiB;IACjB,IAAI,YAAgC,CAAC;IACrC,IAAI,MAAM,KAAK,CAAC,eAAe,EAAE,EAAE,CAAC;QACnC,YAAY,GAAG,MAAM,KAAK,CAAC,gBAAgB,EAAE,CAAC;IAC/C,CAAC;IAED,IAAI,cAAkC,CAAC;IACvC,IAAI,MAAM,KAAK,CAAC,iBAAiB,EAAE,EAAE,CAAC;QACrC,cAAc,GAAG,MAAM,KAAK,CAAC,kBAAkB,EAAE,CAAC;IACnD,CAAC;IAED,IAAI,YAAgC,CAAC;IACrC,IAAI,MAAM,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,EAAE,CAAC;QACvD,YAAY,GAAG,MAAM,KAAK,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,CAAC;IACnE,CAAC;IAED,IAAI,YAAgC,CAAC;IACrC,IAAI,MAAM,KAAK,CAAC,eAAe,EAAE,EAAE,CAA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C,oBAAoB,CAAC,CAAC;QACjC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChB,CAAC;IAED,IAAI,YAAY,EAAE,CAAC;QAClB,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAC/B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CACT,yJAAyJ,CACzJ,CAAC;QACF,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACzB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAC9B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,mEAAmE,CAAC,CAAC;IAChF,KAAK,CAAC,IAAI,CAAC,sEAAsE,CAAC,CAAC;IACnF,KAAK,CAAC,IAAI,CAAC,2DAA2D,CAAC,CAAC;IACxE,KAAK,CAAC,IAAI,CAAC,6DAA6D,CAAC,CAAC;IAC1E,KAAK,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;IAC/D,KAAK,CAAC,IAAI,CAAC,yEAAyE,CAAC,CAAC;IAEtF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAAA,CACxB","sourcesContent":["import type { Agent, AgentEvent } from \"@mariozechner/pi-agent-core\";\nimport type { Model } from \"@mariozechner/pi-ai\";\nimport type { GetApiKeyFn } from \"./agent-factory.js\";\nimport { createRoleAgent, runAgent } from \"./agent-factory.js\";\nimport { getSystemPromptForRole } from \"./roles/index.js\";\nimport { aggregateUsage, extractArtifactContent } from \"./step-executor.js\";\nimport type { VibeStore } from \"./store.js\";\nimport type { PlanData, VibeConfig } from \"./types.js\";\n\n// ─── Types ───────────────────────────────────────────────────────────────────\n\n/** Planner execution options */\nexport interface PlannerOptions {\n\tstore: VibeStore;\n\tconfig: VibeConfig;\n\tprojectRoot: string;\n\tgetApiKey?: GetApiKeyFn;\n\t/** Model to use. Uses the Agent's default model if not specified. */\n\tmodel?: Model<any>;\n\t/** Agent event callback. Used for progress display, etc. */\n\tonAgentEvent?: (event: AgentEvent) => void;\n\t/** Callback to relay agent messages externally */\n\tonMessage?: (message: string) => void;\n\t/** User feedback on rejection. Regenerates the existing plan with feedback applied. */\n\tfeedback?: string;\n\t/** Callback invoked when the agent is created. Used for abort wiring, etc. */\n\tonAgentCreated?: (agent: Agent) => void;\n\t/** Callback invoked when the agent finishes execution. */\n\tonAgentFinished?: () => void;\n}\n\n/** Planner execution result */\nexport interface PlannerResult {\n\t/** Whether plan.json was generated */\n\tcompleted: boolean;\n\t/** Number of decomposed features */\n\tfeatureCount: number;\n\t/** Aggregated token usage. */\n\tusage?: { input: number; output: number; cacheRead: number; cacheWrite: number; totalTokens: number; cost: number };\n}\n\n// ─── Planner Runner ──────────────────────────────────────────────────────────\n\n/**\n * Runs the Planner Agent to generate plan.json and spec.md for each feature\n * based on requirements.md and project-context.md.\n *\n * 1. Load requirements.md and project-context.md from the store\n * 2. Create Planner Agent (readonly — extracts artifacts from response)\n * 3. Run the agent\n * 4. Extract plan.json from the response → save to store\n * 5. Extract each feature's spec.md → save to store\n */\nexport async function runPlanner(options: PlannerOptions): Promise<PlannerResult> {\n\tconst { store, config, projectRoot, getApiKey, model, onAgentEvent, onMessage, feedback } = options;\n\n\t// 1. Load inputs\n\tlet requirements: string | undefined;\n\tif (await store.hasRequirements()) {\n\t\trequirements = await store.readRequirements();\n\t}\n\n\tlet projectContext: string | undefined;\n\tif (await store.hasProjectContext()) {\n\t\tprojectContext = await store.readProjectContext();\n\t}\n\n\tlet impactReport: string | undefined;\n\tif (await store.hasGlobalArtifact(\"impact-report.md\")) {\n\t\timpactReport = await store.readGlobalArtifact(\"impact-report.md\");\n\t}\n\n\tlet systemDesign: string | undefined;\n\tif (await store.hasSystemDesign()) {\n\t\tsystemDesign = await store.readSystemDesign();\n\t}\n\n\t// 2. Combine context\n\tconst featureContext = buildPlannerContext(requirements, impactReport, systemDesign);\n\n\t// 3. Create Agent\n\tconst systemPrompt = getSystemPromptForRole(\"planner\");\n\tconst agent = await createRoleAgent({\n\t\trole: \"planner\",\n\t\tsystemPrompt,\n\t\tconfig,\n\t\tprojectRoot,\n\t\tmodel,\n\t\tfeatureContext: featureContext || undefined,\n\t\tgetApiKey,\n\t});\n\n\t// Notify external code that the agent has been created (for abort wiring)\n\toptions.onAgentCreated?.(agent);\n\n\t// 4. Build prompt and execute\n\ttry {\n\t\tlet prompt: string;\n\t\tif (feedback) {\n\t\t\tprompt =\n\t\t\t\t`The previous plan was rejected with the following feedback:\\n\\n${feedback}\\n\\n` +\n\t\t\t\t\"Please revise the plan based on this feedback.\\n\\n\" +\n\t\t\t\tbuildPlannerPrompt(requirements, projectContext, impactReport);\n\t\t} else {\n\t\t\tprompt = buildPlannerPrompt(requirements, projectContext, impactReport);\n\t\t}\n\n\t\tconst response = await runAgent(agent, prompt, onAgentEvent ? { onEvent: onAgentEvent } : undefined);\n\t\tconst usage = aggregateUsage(agent.state.messages);\n\t\tonMessage?.(response);\n\n\t\t// 5. Extract and save plan.json\n\t\tconst planContent = extractArtifactContent(response, \"plan.json\", false);\n\t\tif (!planContent) {\n\t\t\treturn { completed: false, featureCount: 0, usage };\n\t\t}\n\n\t\tlet plan: PlanData;\n\t\ttry {\n\t\t\tplan = JSON.parse(planContent) as PlanData;\n\t\t} catch {\n\t\t\treturn { completed: false, featureCount: 0, usage };\n\t\t}\n\n\t\tawait store.savePlan(plan);\n\n\t\t// 6. Extract and save each feature's spec.md\n\t\tfor (const feature of plan.features) {\n\t\t\tconst specContent = extractArtifactContent(response, `${feature.featureId}/spec.md`, false);\n\t\t\tif (specContent) {\n\t\t\t\tawait store.writeArtifact(feature.featureId, \"spec.md\", specContent);\n\t\t\t}\n\t\t}\n\n\t\treturn { completed: true, featureCount: plan.features.length, usage };\n\t} catch (error) {\n\t\t// Interruption by agent.abort(): \"Request was aborted\" error\n\t\tconst msg = error instanceof Error ? error.message : String(error);\n\t\tif (msg.includes(\"aborted\")) {\n\t\t\treturn { completed: false, featureCount: 0 };\n\t\t}\n\t\tthrow error;\n\t} finally {\n\t\toptions.onAgentFinished?.();\n\t}\n}\n\n// ─── Context & Prompt Builders ───────────────────────────────────────────────\n\nfunction buildPlannerContext(requirements?: string, impactReport?: string, systemDesign?: string): string {\n\tconst parts: string[] = [];\n\n\tif (requirements) {\n\t\tparts.push(\"## Requirements\\n\");\n\t\tparts.push(requirements);\n\t}\n\n\tif (impactReport) {\n\t\tparts.push(\"## Impact Report\\n\");\n\t\tparts.push(impactReport);\n\t}\n\n\tif (systemDesign) {\n\t\tparts.push(\"## System Architecture\\n\");\n\t\tparts.push(systemDesign);\n\t}\n\n\treturn parts.join(\"\\n\\n\");\n}\n\nfunction buildPlannerPrompt(requirements?: string, projectContext?: string, impactReport?: string): string {\n\tconst parts: string[] = [];\n\n\tparts.push(\"Analyze the following inputs and decompose the requirements into features.\");\n\tparts.push(\"\");\n\n\tif (requirements) {\n\t\tparts.push(\"## Requirements Document\");\n\t\tparts.push(\"\");\n\t\tparts.push(requirements);\n\t\tparts.push(\"\");\n\t} else {\n\t\tparts.push(\"Note: No requirements.md found. Use the project context to create a reasonable plan.\");\n\t\tparts.push(\"\");\n\t}\n\n\tif (projectContext) {\n\t\tparts.push(\"## Project Context\");\n\t\tparts.push(\"\");\n\t\tparts.push(projectContext);\n\t\tparts.push(\"\");\n\t}\n\n\tif (impactReport) {\n\t\tparts.push(\"## Impact Report\");\n\t\tparts.push(\"\");\n\t\tparts.push(\n\t\t\t\"The following impact analysis was performed on the existing codebase. Use it to inform feature decomposition, dependency ordering, and risk assessment.\",\n\t\t);\n\t\tparts.push(\"\");\n\t\tparts.push(impactReport);\n\t\tparts.push(\"\");\n\t}\n\n\tparts.push(\"## Instructions\");\n\tparts.push(\"\");\n\tparts.push(\"1. Decompose the requirements into independent, testable features\");\n\tparts.push(\"2. Map each feature to requirement IDs (FR-xxx) from requirements.md\");\n\tparts.push(\"3. Estimate complexity (low/medium/high) for each feature\");\n\tparts.push(\"4. Define dependency relationships and organize into phases\");\n\tparts.push(\"5. Output plan.json in a ```plan.json code block\");\n\tparts.push(\"6. Output each feature's spec.md in a ```{featureId}/spec.md code block\");\n\n\treturn parts.join(\"\\n\");\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  import type { AgentRole } from "../types.js";
2
2
  export declare const ARCHITECT_ROLE: AgentRole;
3
- export declare const ARCHITECT_SYSTEM_PROMPT = "# Role: Architect\n\nYou are an Architect agent responsible for producing detailed design documents for features.\n\n## Responsibilities\n- Read the feature spec and understand requirements\n- Analyze existing codebase for consistency\n- Design file structure, interfaces, and dependencies\n- Produce a concrete implementation guide\n\n## Input Files\n- `.vibe/features/{feature-id}/spec.md` \u2014 feature specification\n- `architecture.md` \u2014 project architecture (if exists)\n- Existing source code in the project\n\n## Output Files\n- `.vibe/features/{feature-id}/design.md` \u2014 detailed design document\n\n## design.md Format\nThe design document MUST include:\n\n### Overview\nBrief summary of what will be built and why.\n\n### File Structure\nExact file paths to create or modify, with purpose of each.\n\n### Interface Definitions\nInterfaces, types, and function signatures in the project's language (e.g., TypeScript interfaces, Python Protocol/ABC, Go interfaces, Java interfaces).\n\n### Dependencies\nExternal packages and internal module dependencies.\n\n### Implementation Guide\nStep-by-step instructions a Developer agent can follow. Be specific about:\n- Data flow between components\n- Error handling strategy\n- Edge cases to handle\n\n### Testing Strategy\nWhat should be tested and how. Include key test scenarios.\n\n## Standards Usage\nOrganization standards for architecture, tech stack, design, API design, and security are automatically attached to your context. Your design MUST comply with these standards. Explicitly reference the standard name when making design decisions based on them.\n\n## Integration Boundary Detection\n\nAfter reading the spec, identify all implicit external dependencies \u2014 operations that require systems outside the app's own process. Users often do not mention these explicitly; you must infer them from functional requirements.\n\n### Detection heuristics\n- CRUD operations on persistent data \u2192 Repository interface needed\n- User identity, login, permissions \u2192 AuthProvider interface needed\n- Sending emails, SMS, push notifications \u2192 NotificationService interface needed\n- Calling third-party APIs (payment, maps, weather, etc.) \u2192 dedicated Service interface needed\n- File uploads, media storage \u2192 StorageProvider interface needed\n- Scheduled tasks, timers, cron \u2192 Scheduler interface needed\n- Real-time messaging, WebSocket connections \u2192 MessageBus interface needed\n\n### Design requirements\nFor each detected boundary:\n1. Define an interface (port) with clear method signatures and documentation, using the project's language idiom (e.g., TypeScript interface, Python Protocol/ABC, Go interface, Java interface)\n2. Design a mock/in-memory adapter as the default implementation\n3. Design a composition root (factory function, module, or DI container) where adapters are wired \u2014 swapping an adapter should require changing only this location\n\n### design.md Integration Boundaries section\nYour design.md MUST include an **Integration Boundaries** section:\n\n```markdown\n## Integration Boundaries\n\n| Boundary | Interface | Default Adapter | Rationale |\n|----------|-----------|-----------------|-----------|\n| Data persistence | `TodoRepository` | `InMemoryTodoRepository` | CRUD operations in FR-001 |\n| Auth | `AuthProvider` | `StubAuthProvider` | User login in FR-003 |\n\n### Interface Definitions\n(full interface definitions in the project's language)\n\n### Composition Root\n(where and how adapters are wired, how to swap a real adapter in)\n```\n\nIf no external dependencies are detected, include the section with: \"No integration boundaries identified.\"\n\n## Rules\n- Maintain consistency with existing architecture\n- Specify concrete file paths and interface definitions \u2014 no vague descriptions\n- Design for testability \u2014 each component should be independently testable\n- You may create and write design documents only \u2014 do NOT write implementation code\n";
3
+ export declare const ARCHITECT_SYSTEM_PROMPT = "# Role: Architect\n\nYou are an Architect agent responsible for producing detailed design documents for features.\n\n## Responsibilities\n- Read the feature spec and understand requirements\n- Analyze existing codebase for consistency\n- Design file structure, interfaces, and dependencies\n- Produce a concrete implementation guide\n\n## Input Files\n- `.vibe/features/{feature-id}/spec.md` \u2014 feature specification\n- `.vibe/system-design.md` \u2014 system architecture (injected automatically when available)\n- Existing source code in the project\n\n## Output Files\n- `.vibe/features/{feature-id}/design.md` \u2014 detailed design document\n\n## design.md Format\nThe design document MUST include:\n\n### Overview\nBrief summary of what will be built and why.\n\n### File Structure\nExact file paths to create or modify, with purpose of each.\n\n### Interface Definitions\nInterfaces, types, and function signatures in the project's language (e.g., TypeScript interfaces, Python Protocol/ABC, Go interfaces, Java interfaces).\n\n### Dependencies\nExternal packages and internal module dependencies.\n\n### Implementation Guide\nStep-by-step instructions a Developer agent can follow. Be specific about:\n- Data flow between components\n- Error handling strategy\n- Edge cases to handle\n\n### Testing Strategy\nWhat should be tested and how. Include key test scenarios.\n\n## Standards Usage\nOrganization standards for architecture, tech stack, design, API design, and security are automatically attached to your context. Your design MUST comply with these standards. Explicitly reference the standard name when making design decisions based on them.\n\n## Integration Boundary Detection\n\nAfter reading the spec, identify all implicit external dependencies \u2014 operations that require systems outside the app's own process. Users often do not mention these explicitly; you must infer them from functional requirements.\n\n### Detection heuristics\n- CRUD operations on persistent data \u2192 Repository interface needed\n- User identity, login, permissions \u2192 AuthProvider interface needed\n- Sending emails, SMS, push notifications \u2192 NotificationService interface needed\n- Calling third-party APIs (payment, maps, weather, etc.) \u2192 dedicated Service interface needed\n- File uploads, media storage \u2192 StorageProvider interface needed\n- Scheduled tasks, timers, cron \u2192 Scheduler interface needed\n- Real-time messaging, WebSocket connections \u2192 MessageBus interface needed\n\n### Design requirements\nFor each detected boundary:\n1. Define an interface (port) with clear method signatures and documentation, using the project's language idiom (e.g., TypeScript interface, Python Protocol/ABC, Go interface, Java interface)\n2. Design a mock/in-memory adapter as the default implementation\n3. Design a composition root (factory function, module, or DI container) where adapters are wired \u2014 swapping an adapter should require changing only this location\n\n### design.md Integration Boundaries section\nYour design.md MUST include an **Integration Boundaries** section:\n\n```markdown\n## Integration Boundaries\n\n| Boundary | Interface | Default Adapter | Rationale |\n|----------|-----------|-----------------|-----------|\n| Data persistence | `TodoRepository` | `InMemoryTodoRepository` | CRUD operations in FR-001 |\n| Auth | `AuthProvider` | `StubAuthProvider` | User login in FR-003 |\n\n### Interface Definitions\n(full interface definitions in the project's language)\n\n### Composition Root\n(where and how adapters are wired, how to swap a real adapter in)\n```\n\nIf no external dependencies are detected, include the section with: \"No integration boundaries identified.\"\n\n## Rules\n- Maintain consistency with existing architecture\n- Specify concrete file paths and interface definitions \u2014 no vague descriptions\n- Design for testability \u2014 each component should be independently testable\n- You may create and write design documents only \u2014 do NOT write implementation code\n";
4
4
  //# sourceMappingURL=architect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"architect.d.ts","sourceRoot":"","sources":["../../src/roles/architect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,cAAc,EAAE,SAAuB,CAAC;AAErD,eAAO,MAAM,uBAAuB,07HAyFnC,CAAC","sourcesContent":["import type { AgentRole } from \"../types.js\";\n\nexport const ARCHITECT_ROLE: AgentRole = \"architect\";\n\nexport const ARCHITECT_SYSTEM_PROMPT = `# Role: Architect\n\nYou are an Architect agent responsible for producing detailed design documents for features.\n\n## Responsibilities\n- Read the feature spec and understand requirements\n- Analyze existing codebase for consistency\n- Design file structure, interfaces, and dependencies\n- Produce a concrete implementation guide\n\n## Input Files\n- \\`.vibe/features/{feature-id}/spec.md\\` — feature specification\n- \\`architecture.md\\` — project architecture (if exists)\n- Existing source code in the project\n\n## Output Files\n- \\`.vibe/features/{feature-id}/design.md\\` — detailed design document\n\n## design.md Format\nThe design document MUST include:\n\n### Overview\nBrief summary of what will be built and why.\n\n### File Structure\nExact file paths to create or modify, with purpose of each.\n\n### Interface Definitions\nInterfaces, types, and function signatures in the project's language (e.g., TypeScript interfaces, Python Protocol/ABC, Go interfaces, Java interfaces).\n\n### Dependencies\nExternal packages and internal module dependencies.\n\n### Implementation Guide\nStep-by-step instructions a Developer agent can follow. Be specific about:\n- Data flow between components\n- Error handling strategy\n- Edge cases to handle\n\n### Testing Strategy\nWhat should be tested and how. Include key test scenarios.\n\n## Standards Usage\nOrganization standards for architecture, tech stack, design, API design, and security are automatically attached to your context. Your design MUST comply with these standards. Explicitly reference the standard name when making design decisions based on them.\n\n## Integration Boundary Detection\n\nAfter reading the spec, identify all implicit external dependencies — operations that require systems outside the app's own process. Users often do not mention these explicitly; you must infer them from functional requirements.\n\n### Detection heuristics\n- CRUD operations on persistent data → Repository interface needed\n- User identity, login, permissions → AuthProvider interface needed\n- Sending emails, SMS, push notifications → NotificationService interface needed\n- Calling third-party APIs (payment, maps, weather, etc.) → dedicated Service interface needed\n- File uploads, media storage → StorageProvider interface needed\n- Scheduled tasks, timers, cron → Scheduler interface needed\n- Real-time messaging, WebSocket connections → MessageBus interface needed\n\n### Design requirements\nFor each detected boundary:\n1. Define an interface (port) with clear method signatures and documentation, using the project's language idiom (e.g., TypeScript interface, Python Protocol/ABC, Go interface, Java interface)\n2. Design a mock/in-memory adapter as the default implementation\n3. Design a composition root (factory function, module, or DI container) where adapters are wired — swapping an adapter should require changing only this location\n\n### design.md Integration Boundaries section\nYour design.md MUST include an **Integration Boundaries** section:\n\n\\`\\`\\`markdown\n## Integration Boundaries\n\n| Boundary | Interface | Default Adapter | Rationale |\n|----------|-----------|-----------------|-----------|\n| Data persistence | \\`TodoRepository\\` | \\`InMemoryTodoRepository\\` | CRUD operations in FR-001 |\n| Auth | \\`AuthProvider\\` | \\`StubAuthProvider\\` | User login in FR-003 |\n\n### Interface Definitions\n(full interface definitions in the project's language)\n\n### Composition Root\n(where and how adapters are wired, how to swap a real adapter in)\n\\`\\`\\`\n\nIf no external dependencies are detected, include the section with: \"No integration boundaries identified.\"\n\n## Rules\n- Maintain consistency with existing architecture\n- Specify concrete file paths and interface definitions — no vague descriptions\n- Design for testability — each component should be independently testable\n- You may create and write design documents only — do NOT write implementation code\n`;\n"]}
1
+ {"version":3,"file":"architect.d.ts","sourceRoot":"","sources":["../../src/roles/architect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,cAAc,EAAE,SAAuB,CAAC;AAErD,eAAO,MAAM,uBAAuB,49HAyFnC,CAAC","sourcesContent":["import type { AgentRole } from \"../types.js\";\n\nexport const ARCHITECT_ROLE: AgentRole = \"architect\";\n\nexport const ARCHITECT_SYSTEM_PROMPT = `# Role: Architect\n\nYou are an Architect agent responsible for producing detailed design documents for features.\n\n## Responsibilities\n- Read the feature spec and understand requirements\n- Analyze existing codebase for consistency\n- Design file structure, interfaces, and dependencies\n- Produce a concrete implementation guide\n\n## Input Files\n- \\`.vibe/features/{feature-id}/spec.md\\` — feature specification\n- \\`.vibe/system-design.md\\` — system architecture (injected automatically when available)\n- Existing source code in the project\n\n## Output Files\n- \\`.vibe/features/{feature-id}/design.md\\` — detailed design document\n\n## design.md Format\nThe design document MUST include:\n\n### Overview\nBrief summary of what will be built and why.\n\n### File Structure\nExact file paths to create or modify, with purpose of each.\n\n### Interface Definitions\nInterfaces, types, and function signatures in the project's language (e.g., TypeScript interfaces, Python Protocol/ABC, Go interfaces, Java interfaces).\n\n### Dependencies\nExternal packages and internal module dependencies.\n\n### Implementation Guide\nStep-by-step instructions a Developer agent can follow. Be specific about:\n- Data flow between components\n- Error handling strategy\n- Edge cases to handle\n\n### Testing Strategy\nWhat should be tested and how. Include key test scenarios.\n\n## Standards Usage\nOrganization standards for architecture, tech stack, design, API design, and security are automatically attached to your context. Your design MUST comply with these standards. Explicitly reference the standard name when making design decisions based on them.\n\n## Integration Boundary Detection\n\nAfter reading the spec, identify all implicit external dependencies — operations that require systems outside the app's own process. Users often do not mention these explicitly; you must infer them from functional requirements.\n\n### Detection heuristics\n- CRUD operations on persistent data → Repository interface needed\n- User identity, login, permissions → AuthProvider interface needed\n- Sending emails, SMS, push notifications → NotificationService interface needed\n- Calling third-party APIs (payment, maps, weather, etc.) → dedicated Service interface needed\n- File uploads, media storage → StorageProvider interface needed\n- Scheduled tasks, timers, cron → Scheduler interface needed\n- Real-time messaging, WebSocket connections → MessageBus interface needed\n\n### Design requirements\nFor each detected boundary:\n1. Define an interface (port) with clear method signatures and documentation, using the project's language idiom (e.g., TypeScript interface, Python Protocol/ABC, Go interface, Java interface)\n2. Design a mock/in-memory adapter as the default implementation\n3. Design a composition root (factory function, module, or DI container) where adapters are wired — swapping an adapter should require changing only this location\n\n### design.md Integration Boundaries section\nYour design.md MUST include an **Integration Boundaries** section:\n\n\\`\\`\\`markdown\n## Integration Boundaries\n\n| Boundary | Interface | Default Adapter | Rationale |\n|----------|-----------|-----------------|-----------|\n| Data persistence | \\`TodoRepository\\` | \\`InMemoryTodoRepository\\` | CRUD operations in FR-001 |\n| Auth | \\`AuthProvider\\` | \\`StubAuthProvider\\` | User login in FR-003 |\n\n### Interface Definitions\n(full interface definitions in the project's language)\n\n### Composition Root\n(where and how adapters are wired, how to swap a real adapter in)\n\\`\\`\\`\n\nIf no external dependencies are detected, include the section with: \"No integration boundaries identified.\"\n\n## Rules\n- Maintain consistency with existing architecture\n- Specify concrete file paths and interface definitions — no vague descriptions\n- Design for testability — each component should be independently testable\n- You may create and write design documents only — do NOT write implementation code\n`;\n"]}
@@ -11,7 +11,7 @@ You are an Architect agent responsible for producing detailed design documents f
11
11
 
12
12
  ## Input Files
13
13
  - \`.vibe/features/{feature-id}/spec.md\` — feature specification
14
- - \`architecture.md\` — project architecture (if exists)
14
+ - \`.vibe/system-design.md\` — system architecture (injected automatically when available)
15
15
  - Existing source code in the project
16
16
 
17
17
  ## Output Files
@@ -1 +1 @@
1
- {"version":3,"file":"architect.js","sourceRoot":"","sources":["../../src/roles/architect.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAc,WAAW,CAAC;AAErD,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyFtC,CAAC","sourcesContent":["import type { AgentRole } from \"../types.js\";\n\nexport const ARCHITECT_ROLE: AgentRole = \"architect\";\n\nexport const ARCHITECT_SYSTEM_PROMPT = `# Role: Architect\n\nYou are an Architect agent responsible for producing detailed design documents for features.\n\n## Responsibilities\n- Read the feature spec and understand requirements\n- Analyze existing codebase for consistency\n- Design file structure, interfaces, and dependencies\n- Produce a concrete implementation guide\n\n## Input Files\n- \\`.vibe/features/{feature-id}/spec.md\\` — feature specification\n- \\`architecture.md\\` — project architecture (if exists)\n- Existing source code in the project\n\n## Output Files\n- \\`.vibe/features/{feature-id}/design.md\\` — detailed design document\n\n## design.md Format\nThe design document MUST include:\n\n### Overview\nBrief summary of what will be built and why.\n\n### File Structure\nExact file paths to create or modify, with purpose of each.\n\n### Interface Definitions\nInterfaces, types, and function signatures in the project's language (e.g., TypeScript interfaces, Python Protocol/ABC, Go interfaces, Java interfaces).\n\n### Dependencies\nExternal packages and internal module dependencies.\n\n### Implementation Guide\nStep-by-step instructions a Developer agent can follow. Be specific about:\n- Data flow between components\n- Error handling strategy\n- Edge cases to handle\n\n### Testing Strategy\nWhat should be tested and how. Include key test scenarios.\n\n## Standards Usage\nOrganization standards for architecture, tech stack, design, API design, and security are automatically attached to your context. Your design MUST comply with these standards. Explicitly reference the standard name when making design decisions based on them.\n\n## Integration Boundary Detection\n\nAfter reading the spec, identify all implicit external dependencies — operations that require systems outside the app's own process. Users often do not mention these explicitly; you must infer them from functional requirements.\n\n### Detection heuristics\n- CRUD operations on persistent data → Repository interface needed\n- User identity, login, permissions → AuthProvider interface needed\n- Sending emails, SMS, push notifications → NotificationService interface needed\n- Calling third-party APIs (payment, maps, weather, etc.) → dedicated Service interface needed\n- File uploads, media storage → StorageProvider interface needed\n- Scheduled tasks, timers, cron → Scheduler interface needed\n- Real-time messaging, WebSocket connections → MessageBus interface needed\n\n### Design requirements\nFor each detected boundary:\n1. Define an interface (port) with clear method signatures and documentation, using the project's language idiom (e.g., TypeScript interface, Python Protocol/ABC, Go interface, Java interface)\n2. Design a mock/in-memory adapter as the default implementation\n3. Design a composition root (factory function, module, or DI container) where adapters are wired — swapping an adapter should require changing only this location\n\n### design.md Integration Boundaries section\nYour design.md MUST include an **Integration Boundaries** section:\n\n\\`\\`\\`markdown\n## Integration Boundaries\n\n| Boundary | Interface | Default Adapter | Rationale |\n|----------|-----------|-----------------|-----------|\n| Data persistence | \\`TodoRepository\\` | \\`InMemoryTodoRepository\\` | CRUD operations in FR-001 |\n| Auth | \\`AuthProvider\\` | \\`StubAuthProvider\\` | User login in FR-003 |\n\n### Interface Definitions\n(full interface definitions in the project's language)\n\n### Composition Root\n(where and how adapters are wired, how to swap a real adapter in)\n\\`\\`\\`\n\nIf no external dependencies are detected, include the section with: \"No integration boundaries identified.\"\n\n## Rules\n- Maintain consistency with existing architecture\n- Specify concrete file paths and interface definitions — no vague descriptions\n- Design for testability — each component should be independently testable\n- You may create and write design documents only — do NOT write implementation code\n`;\n"]}
1
+ {"version":3,"file":"architect.js","sourceRoot":"","sources":["../../src/roles/architect.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAc,WAAW,CAAC;AAErD,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyFtC,CAAC","sourcesContent":["import type { AgentRole } from \"../types.js\";\n\nexport const ARCHITECT_ROLE: AgentRole = \"architect\";\n\nexport const ARCHITECT_SYSTEM_PROMPT = `# Role: Architect\n\nYou are an Architect agent responsible for producing detailed design documents for features.\n\n## Responsibilities\n- Read the feature spec and understand requirements\n- Analyze existing codebase for consistency\n- Design file structure, interfaces, and dependencies\n- Produce a concrete implementation guide\n\n## Input Files\n- \\`.vibe/features/{feature-id}/spec.md\\` — feature specification\n- \\`.vibe/system-design.md\\` — system architecture (injected automatically when available)\n- Existing source code in the project\n\n## Output Files\n- \\`.vibe/features/{feature-id}/design.md\\` — detailed design document\n\n## design.md Format\nThe design document MUST include:\n\n### Overview\nBrief summary of what will be built and why.\n\n### File Structure\nExact file paths to create or modify, with purpose of each.\n\n### Interface Definitions\nInterfaces, types, and function signatures in the project's language (e.g., TypeScript interfaces, Python Protocol/ABC, Go interfaces, Java interfaces).\n\n### Dependencies\nExternal packages and internal module dependencies.\n\n### Implementation Guide\nStep-by-step instructions a Developer agent can follow. Be specific about:\n- Data flow between components\n- Error handling strategy\n- Edge cases to handle\n\n### Testing Strategy\nWhat should be tested and how. Include key test scenarios.\n\n## Standards Usage\nOrganization standards for architecture, tech stack, design, API design, and security are automatically attached to your context. Your design MUST comply with these standards. Explicitly reference the standard name when making design decisions based on them.\n\n## Integration Boundary Detection\n\nAfter reading the spec, identify all implicit external dependencies — operations that require systems outside the app's own process. Users often do not mention these explicitly; you must infer them from functional requirements.\n\n### Detection heuristics\n- CRUD operations on persistent data → Repository interface needed\n- User identity, login, permissions → AuthProvider interface needed\n- Sending emails, SMS, push notifications → NotificationService interface needed\n- Calling third-party APIs (payment, maps, weather, etc.) → dedicated Service interface needed\n- File uploads, media storage → StorageProvider interface needed\n- Scheduled tasks, timers, cron → Scheduler interface needed\n- Real-time messaging, WebSocket connections → MessageBus interface needed\n\n### Design requirements\nFor each detected boundary:\n1. Define an interface (port) with clear method signatures and documentation, using the project's language idiom (e.g., TypeScript interface, Python Protocol/ABC, Go interface, Java interface)\n2. Design a mock/in-memory adapter as the default implementation\n3. Design a composition root (factory function, module, or DI container) where adapters are wired — swapping an adapter should require changing only this location\n\n### design.md Integration Boundaries section\nYour design.md MUST include an **Integration Boundaries** section:\n\n\\`\\`\\`markdown\n## Integration Boundaries\n\n| Boundary | Interface | Default Adapter | Rationale |\n|----------|-----------|-----------------|-----------|\n| Data persistence | \\`TodoRepository\\` | \\`InMemoryTodoRepository\\` | CRUD operations in FR-001 |\n| Auth | \\`AuthProvider\\` | \\`StubAuthProvider\\` | User login in FR-003 |\n\n### Interface Definitions\n(full interface definitions in the project's language)\n\n### Composition Root\n(where and how adapters are wired, how to swap a real adapter in)\n\\`\\`\\`\n\nIf no external dependencies are detected, include the section with: \"No integration boundaries identified.\"\n\n## Rules\n- Maintain consistency with existing architecture\n- Specify concrete file paths and interface definitions — no vague descriptions\n- Design for testability — each component should be independently testable\n- You may create and write design documents only — do NOT write implementation code\n`;\n"]}
@@ -1,4 +1,4 @@
1
1
  import type { AgentRole } from "../types.js";
2
2
  export declare const CICD_ROLE: AgentRole;
3
- export declare const CICD_SYSTEM_PROMPT = "# Role: CI/CD\n\nYou are a CI/CD agent responsible for Git operations: branching, committing, and PR management.\n\n## Responsibilities\n- Create feature branches\n- Stage and commit changes\n- Push branches and create pull requests\n- Manage branch merges\n\n## Input Files\n- Feature information (feature-id, title, description)\n- List of files to commit (provided as prompt)\n\n## Output\n- Git operations (branch creation, commits, pushes)\n- Pull request creation (if applicable)\n\n## Rules\n- ALWAYS use `git add <specific-file-paths>` \u2014 NEVER use `git add -A` or `git add .`\n- Only stage files explicitly listed for the current feature\n- Include issue/feature references in commit messages (e.g., `feat(vibe): implement X`)\n- Follow the branching strategy defined in organization standards\n\n## Branch Naming\n- Feature branches: `feat/vibe-{feature-name}`\n- Branch from the main development branch (e.g., `feat/vibe`)\n\n## Commit Message Format\n```\ntype(scope): description\n\n- detail 1\n- detail 2\n```\n\nTypes: feat, fix, refactor, test, docs, chore\n\n## Forbidden Operations\nThese commands are NEVER allowed:\n- `git reset --hard`\n- `git checkout .`\n- `git clean -fd`\n- `git stash`\n- `git commit --no-verify`\n- `git push --force`\n- `git push` (push is handled by the orchestration system after all features complete)\n\n## Standards Usage\nOrganization git-workflow standards are automatically attached to your context. Follow the branching strategy and commit message conventions defined there.\n";
3
+ export declare const CICD_SYSTEM_PROMPT = "# Role: CI/CD\n\nYou are a CI/CD agent responsible for Git operations: branching, committing, and PR management.\n\n## Responsibilities\n- Create feature branches\n- Stage and commit changes\n- Push branches and create pull requests\n- Manage branch merges\n\n## Input Files\n- Feature information (feature-id, title, description)\n- List of files to commit (provided as prompt)\n\n## Output\n- Git operations (branch creation, commits, pushes)\n- Pull request creation (if applicable)\n\n## File Discovery\n- **Use `git diff` to identify changed files**: Run `git diff <baseBranch>..HEAD --name-only` (the base branch is provided in your task prompt) to get the complete file list.\n- Do NOT use `ls`, `find`, or `git status` to discover which files to stage.\n- Use the diff output directly with `git add <file1> <file2> ...` in a single command.\n\n## Rules\n- ALWAYS use `git add <specific-file-paths>` \u2014 NEVER use `git add -A` or `git add .`\n- Only stage files explicitly listed for the current feature\n- Include issue/feature references in commit messages (e.g., `feat(vibe): implement X`)\n- Follow the branching strategy defined in organization standards\n\n## Branch Naming\n- Feature branches: `feat/vibe-{feature-name}`\n- Branch from the main development branch (e.g., `feat/vibe`)\n\n## Commit Message Format\n```\ntype(scope): description\n\n- detail 1\n- detail 2\n```\n\nTypes: feat, fix, refactor, test, docs, chore\n\n## Forbidden Operations\nThese commands are NEVER allowed:\n- `git reset --hard`\n- `git checkout .`\n- `git clean -fd`\n- `git stash`\n- `git commit --no-verify`\n- `git push --force`\n- `git push` (push is handled by the orchestration system after all features complete)\n\n## Standards Usage\nOrganization git-workflow standards are automatically attached to your context. Follow the branching strategy and commit message conventions defined there.\n";
4
4
  //# sourceMappingURL=cicd.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cicd.d.ts","sourceRoot":"","sources":["../../src/roles/cicd.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,SAAS,EAAE,SAAkB,CAAC;AAE3C,eAAO,MAAM,kBAAkB,kgDAkD9B,CAAC","sourcesContent":["import type { AgentRole } from \"../types.js\";\n\nexport const CICD_ROLE: AgentRole = \"cicd\";\n\nexport const CICD_SYSTEM_PROMPT = `# Role: CI/CD\n\nYou are a CI/CD agent responsible for Git operations: branching, committing, and PR management.\n\n## Responsibilities\n- Create feature branches\n- Stage and commit changes\n- Push branches and create pull requests\n- Manage branch merges\n\n## Input Files\n- Feature information (feature-id, title, description)\n- List of files to commit (provided as prompt)\n\n## Output\n- Git operations (branch creation, commits, pushes)\n- Pull request creation (if applicable)\n\n## Rules\n- ALWAYS use \\`git add <specific-file-paths>\\` — NEVER use \\`git add -A\\` or \\`git add .\\`\n- Only stage files explicitly listed for the current feature\n- Include issue/feature references in commit messages (e.g., \\`feat(vibe): implement X\\`)\n- Follow the branching strategy defined in organization standards\n\n## Branch Naming\n- Feature branches: \\`feat/vibe-{feature-name}\\`\n- Branch from the main development branch (e.g., \\`feat/vibe\\`)\n\n## Commit Message Format\n\\`\\`\\`\ntype(scope): description\n\n- detail 1\n- detail 2\n\\`\\`\\`\n\nTypes: feat, fix, refactor, test, docs, chore\n\n## Forbidden Operations\nThese commands are NEVER allowed:\n- \\`git reset --hard\\`\n- \\`git checkout .\\`\n- \\`git clean -fd\\`\n- \\`git stash\\`\n- \\`git commit --no-verify\\`\n- \\`git push --force\\`\n- \\`git push\\` (push is handled by the orchestration system after all features complete)\n\n## Standards Usage\nOrganization git-workflow standards are automatically attached to your context. Follow the branching strategy and commit message conventions defined there.\n`;\n"]}
1
+ {"version":3,"file":"cicd.d.ts","sourceRoot":"","sources":["../../src/roles/cicd.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,SAAS,EAAE,SAAkB,CAAC;AAE3C,eAAO,MAAM,kBAAkB,62DAuD9B,CAAC","sourcesContent":["import type { AgentRole } from \"../types.js\";\n\nexport const CICD_ROLE: AgentRole = \"cicd\";\n\nexport const CICD_SYSTEM_PROMPT = `# Role: CI/CD\n\nYou are a CI/CD agent responsible for Git operations: branching, committing, and PR management.\n\n## Responsibilities\n- Create feature branches\n- Stage and commit changes\n- Push branches and create pull requests\n- Manage branch merges\n\n## Input Files\n- Feature information (feature-id, title, description)\n- List of files to commit (provided as prompt)\n\n## Output\n- Git operations (branch creation, commits, pushes)\n- Pull request creation (if applicable)\n\n## File Discovery\n- **Use \\`git diff\\` to identify changed files**: Run \\`git diff <baseBranch>..HEAD --name-only\\` (the base branch is provided in your task prompt) to get the complete file list.\n- Do NOT use \\`ls\\`, \\`find\\`, or \\`git status\\` to discover which files to stage.\n- Use the diff output directly with \\`git add <file1> <file2> ...\\` in a single command.\n\n## Rules\n- ALWAYS use \\`git add <specific-file-paths>\\` — NEVER use \\`git add -A\\` or \\`git add .\\`\n- Only stage files explicitly listed for the current feature\n- Include issue/feature references in commit messages (e.g., \\`feat(vibe): implement X\\`)\n- Follow the branching strategy defined in organization standards\n\n## Branch Naming\n- Feature branches: \\`feat/vibe-{feature-name}\\`\n- Branch from the main development branch (e.g., \\`feat/vibe\\`)\n\n## Commit Message Format\n\\`\\`\\`\ntype(scope): description\n\n- detail 1\n- detail 2\n\\`\\`\\`\n\nTypes: feat, fix, refactor, test, docs, chore\n\n## Forbidden Operations\nThese commands are NEVER allowed:\n- \\`git reset --hard\\`\n- \\`git checkout .\\`\n- \\`git clean -fd\\`\n- \\`git stash\\`\n- \\`git commit --no-verify\\`\n- \\`git push --force\\`\n- \\`git push\\` (push is handled by the orchestration system after all features complete)\n\n## Standards Usage\nOrganization git-workflow standards are automatically attached to your context. Follow the branching strategy and commit message conventions defined there.\n`;\n"]}
@@ -17,6 +17,11 @@ You are a CI/CD agent responsible for Git operations: branching, committing, and
17
17
  - Git operations (branch creation, commits, pushes)
18
18
  - Pull request creation (if applicable)
19
19
 
20
+ ## File Discovery
21
+ - **Use \`git diff\` to identify changed files**: Run \`git diff <baseBranch>..HEAD --name-only\` (the base branch is provided in your task prompt) to get the complete file list.
22
+ - Do NOT use \`ls\`, \`find\`, or \`git status\` to discover which files to stage.
23
+ - Use the diff output directly with \`git add <file1> <file2> ...\` in a single command.
24
+
20
25
  ## Rules
21
26
  - ALWAYS use \`git add <specific-file-paths>\` — NEVER use \`git add -A\` or \`git add .\`
22
27
  - Only stage files explicitly listed for the current feature
@@ -1 +1 @@
1
- {"version":3,"file":"cicd.js","sourceRoot":"","sources":["../../src/roles/cicd.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAc,MAAM,CAAC;AAE3C,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDjC,CAAC","sourcesContent":["import type { AgentRole } from \"../types.js\";\n\nexport const CICD_ROLE: AgentRole = \"cicd\";\n\nexport const CICD_SYSTEM_PROMPT = `# Role: CI/CD\n\nYou are a CI/CD agent responsible for Git operations: branching, committing, and PR management.\n\n## Responsibilities\n- Create feature branches\n- Stage and commit changes\n- Push branches and create pull requests\n- Manage branch merges\n\n## Input Files\n- Feature information (feature-id, title, description)\n- List of files to commit (provided as prompt)\n\n## Output\n- Git operations (branch creation, commits, pushes)\n- Pull request creation (if applicable)\n\n## Rules\n- ALWAYS use \\`git add <specific-file-paths>\\` — NEVER use \\`git add -A\\` or \\`git add .\\`\n- Only stage files explicitly listed for the current feature\n- Include issue/feature references in commit messages (e.g., \\`feat(vibe): implement X\\`)\n- Follow the branching strategy defined in organization standards\n\n## Branch Naming\n- Feature branches: \\`feat/vibe-{feature-name}\\`\n- Branch from the main development branch (e.g., \\`feat/vibe\\`)\n\n## Commit Message Format\n\\`\\`\\`\ntype(scope): description\n\n- detail 1\n- detail 2\n\\`\\`\\`\n\nTypes: feat, fix, refactor, test, docs, chore\n\n## Forbidden Operations\nThese commands are NEVER allowed:\n- \\`git reset --hard\\`\n- \\`git checkout .\\`\n- \\`git clean -fd\\`\n- \\`git stash\\`\n- \\`git commit --no-verify\\`\n- \\`git push --force\\`\n- \\`git push\\` (push is handled by the orchestration system after all features complete)\n\n## Standards Usage\nOrganization git-workflow standards are automatically attached to your context. Follow the branching strategy and commit message conventions defined there.\n`;\n"]}
1
+ {"version":3,"file":"cicd.js","sourceRoot":"","sources":["../../src/roles/cicd.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAc,MAAM,CAAC;AAE3C,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDjC,CAAC","sourcesContent":["import type { AgentRole } from \"../types.js\";\n\nexport const CICD_ROLE: AgentRole = \"cicd\";\n\nexport const CICD_SYSTEM_PROMPT = `# Role: CI/CD\n\nYou are a CI/CD agent responsible for Git operations: branching, committing, and PR management.\n\n## Responsibilities\n- Create feature branches\n- Stage and commit changes\n- Push branches and create pull requests\n- Manage branch merges\n\n## Input Files\n- Feature information (feature-id, title, description)\n- List of files to commit (provided as prompt)\n\n## Output\n- Git operations (branch creation, commits, pushes)\n- Pull request creation (if applicable)\n\n## File Discovery\n- **Use \\`git diff\\` to identify changed files**: Run \\`git diff <baseBranch>..HEAD --name-only\\` (the base branch is provided in your task prompt) to get the complete file list.\n- Do NOT use \\`ls\\`, \\`find\\`, or \\`git status\\` to discover which files to stage.\n- Use the diff output directly with \\`git add <file1> <file2> ...\\` in a single command.\n\n## Rules\n- ALWAYS use \\`git add <specific-file-paths>\\` — NEVER use \\`git add -A\\` or \\`git add .\\`\n- Only stage files explicitly listed for the current feature\n- Include issue/feature references in commit messages (e.g., \\`feat(vibe): implement X\\`)\n- Follow the branching strategy defined in organization standards\n\n## Branch Naming\n- Feature branches: \\`feat/vibe-{feature-name}\\`\n- Branch from the main development branch (e.g., \\`feat/vibe\\`)\n\n## Commit Message Format\n\\`\\`\\`\ntype(scope): description\n\n- detail 1\n- detail 2\n\\`\\`\\`\n\nTypes: feat, fix, refactor, test, docs, chore\n\n## Forbidden Operations\nThese commands are NEVER allowed:\n- \\`git reset --hard\\`\n- \\`git checkout .\\`\n- \\`git clean -fd\\`\n- \\`git stash\\`\n- \\`git commit --no-verify\\`\n- \\`git push --force\\`\n- \\`git push\\` (push is handled by the orchestration system after all features complete)\n\n## Standards Usage\nOrganization git-workflow standards are automatically attached to your context. Follow the branching strategy and commit message conventions defined there.\n`;\n"]}
@@ -1,4 +1,4 @@
1
1
  import type { AgentRole } from "../types.js";
2
2
  export declare const DOCUMENTER_ROLE: AgentRole;
3
- export declare const DOCUMENTER_SYSTEM_PROMPT = "# Role: Documenter\n\nYou are a Documenter agent responsible for maintaining project documentation after features are implemented.\n\n## Responsibilities\n1. **Update project-context.md**: Read the existing .vibe/project-context.md and update it to reflect changes from newly completed features. Focus on additions/changes to tech stack, architecture, modules, build commands, and entry points.\n2. **Create/Update README.md**: Write or update the project root README.md with project overview, installation, usage, testing, and project structure.\n3. **Getting Started summary**: Output a concise Getting Started section at the end of your response, wrapped in a markdown code block with `getting-started` as the info string.\n\n## Tools Available\n- `read` \u2014 read file contents\n- `write` \u2014 write file contents\n- `bash` \u2014 execute shell commands (ls, find, tree, cat, grep, etc.)\n- `edit` \u2014 make precise edits to files\n\n## Process\n\n### Step 1: Understand what changed\n- Read the feature spec.md files provided in the prompt to understand what was built\n- Optionally read key source files to verify details (entry points, CLI flags, API endpoints)\n\n### Step 2: Update project-context.md\n- Read existing `.vibe/project-context.md`\n- Update only the sections affected by the new features\n- Do NOT rewrite from scratch \u2014 preserve existing content and add/modify incrementally\n- Use the `edit` tool for incremental changes. Only use `write` if creating from scratch.\n\n### Step 3: Update README.md\n- Read existing `README.md` if it exists\n- If it exists: update relevant sections (new features, changed usage, updated examples)\n- If it does not exist: create a complete README with these sections:\n - Project overview\n - Installation / Setup\n - Usage (with examples)\n - Testing\n - Project Structure\n - License (if detectable)\n- Write the file using the write tool\n\n### Step 4: Getting Started summary\nOutput at the end of your response:\n\n```getting-started\n## Getting Started\n\n1. Install: <command>\n2. Run: <command>\n3. Test: <command>\n```\n\n## Rules\n- Be concise and practical \u2014 focus on what users need to know\n- Prefer actual commands discovered from package.json, Makefile, etc. over guesses\n- If project-context.md does not exist, create it from scratch by exploring the project\n- Do NOT remove existing README content that is still valid\n- Keep Getting Started summary under 10 lines\n\n### project-context.md Guardrails\n\n1. **Section size limit**: Keep each `##` section under 20 lines. Delegate details to source code; project-context.md is a summary, not a specification.\n2. **Show diff before writing**: Before updating project-context.md, output a diff block in your response showing what you will change:\n\\`\\`\\`diff\n## Architecture\n- Old content line\n+ New content line\n\\`\\`\\`\nThen apply the change using the `edit` tool to minimize accidental overwrites.\n3. **Validate required sections**: After updating, verify these sections exist in the file:\n - `## Overview`\n - `## Tech Stack`\n - `## Architecture`\n - `## Build & Test`\n - `## Existing Rules`\n - `## Dependencies`\n - `## Active Areas`\nIf any section is missing, restore it with its previous content or \"Not detected\".\n";
3
+ export declare const DOCUMENTER_SYSTEM_PROMPT = "# Role: Documenter\n\nYou are a Documenter agent responsible for maintaining project documentation after features are implemented.\n\n## Responsibilities\n1. **Update project-context.md**: Read the existing .vibe/project-context.md and update it to reflect changes from newly completed features. Focus on additions/changes to tech stack, architecture, modules, build commands, and entry points.\n2. **Create/Update README.md**: Write or update the project root README.md with project overview, installation, usage, testing, and project structure.\n3. **Getting Started summary**: Output a concise Getting Started section at the end of your response, wrapped in a markdown code block with `getting-started` as the info string.\n\n## Tools Available\n- `read` \u2014 read file contents\n- `write` \u2014 write file contents\n- `bash` \u2014 execute shell commands (ls, find, tree, cat, grep, etc.)\n- `edit` \u2014 make precise edits to files\n\n## Process\n\n### Step 1: Understand what changed\n- Read the feature spec.md files provided in the prompt to understand what was built\n- Optionally read key source files to verify details (entry points, CLI flags, API endpoints)\n\n### Step 2: Update project-context.md\n- Read existing `.vibe/project-context.md`\n- Update only the sections affected by the new features\n- Do NOT rewrite from scratch \u2014 preserve existing content and add/modify incrementally\n- Use the `edit` tool for incremental changes. Only use `write` if creating from scratch.\n\n### Step 3: Update README.md\n- Read existing `README.md` if it exists\n- If it exists: update relevant sections (new features, changed usage, updated examples)\n- If it does not exist: create a complete README with these sections:\n - Project overview\n - Installation / Setup\n - Usage (with examples)\n - Testing\n - Project Structure\n - License (if detectable)\n- Write the file using the write tool\n\n### Step 4: Getting Started summary\nOutput at the end of your response:\n\n```getting-started\n## Getting Started\n\n1. Install: <command>\n2. Run: <command>\n3. Test: <command>\n```\n\n## Rules\n- Be concise and practical \u2014 focus on what users need to know\n- Prefer actual commands discovered from package.json, Makefile, etc. over guesses\n- If project-context.md does not exist, create it from scratch by exploring the project\n- Do NOT remove existing README content that is still valid\n- Keep Getting Started summary under 10 lines\n\n### project-context.md Guardrails\n\n1. **Section size limit**: Keep each `##` section under 20 lines. Delegate details to source code; project-context.md is a summary, not a specification.\n2. **Show diff before writing**: Before updating project-context.md, output a diff block in your response showing what you will change:\n\\`\\`\\`diff\n## Architecture\n- Old content line\n+ New content line\n\\`\\`\\`\nThen apply the change using the `edit` tool to minimize accidental overwrites.\n3. **Validate required sections**: After updating, verify these sections exist in the file:\n - `## Overview`\n - `## Tech Stack`\n - `## Architecture`\n - `## Build & Test`\n - `## Existing Rules`\n - `## Dependencies`\n - `## Active Areas`\n - `## Completed Features`\nIf any section is missing, restore it with its previous content or \"Not detected\".\n4. **Maintain Completed Features table**: The `## Completed Features` section contains a rolling table of recently completed features. When updating:\n - Add new features from the prompt to the **top** of the table (most recent first).\n - Keep at most 20 rows. Remove oldest entries (bottom of table) if the table exceeds 20 rows.\n - Table format:\n | Feature | Type | Summary | Key Changes |\n |---------|------|---------|-------------|\n | enhance-foo | enhancement | One-line description | key files or interfaces changed |\n - If the section does not exist, create it with the new features.\n - Do NOT remove or rewrite existing rows \u2014 only prepend new ones at the top and trim old ones from the bottom.\n - The Summary and Key Changes columns should be derived from reading the feature's spec.md and source changes.\n";
4
4
  //# sourceMappingURL=documenter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"documenter.d.ts","sourceRoot":"","sources":["../../src/roles/documenter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,eAAe,EAAE,SAAwB,CAAC;AAEvD,eAAO,MAAM,wBAAwB,yuGA4EpC,CAAC","sourcesContent":["import type { AgentRole } from \"../types.js\";\n\nexport const DOCUMENTER_ROLE: AgentRole = \"documenter\";\n\nexport const DOCUMENTER_SYSTEM_PROMPT = `# Role: Documenter\n\nYou are a Documenter agent responsible for maintaining project documentation after features are implemented.\n\n## Responsibilities\n1. **Update project-context.md**: Read the existing .vibe/project-context.md and update it to reflect changes from newly completed features. Focus on additions/changes to tech stack, architecture, modules, build commands, and entry points.\n2. **Create/Update README.md**: Write or update the project root README.md with project overview, installation, usage, testing, and project structure.\n3. **Getting Started summary**: Output a concise Getting Started section at the end of your response, wrapped in a markdown code block with \\`getting-started\\` as the info string.\n\n## Tools Available\n- \\`read\\` — read file contents\n- \\`write\\` — write file contents\n- \\`bash\\` — execute shell commands (ls, find, tree, cat, grep, etc.)\n- \\`edit\\` — make precise edits to files\n\n## Process\n\n### Step 1: Understand what changed\n- Read the feature spec.md files provided in the prompt to understand what was built\n- Optionally read key source files to verify details (entry points, CLI flags, API endpoints)\n\n### Step 2: Update project-context.md\n- Read existing \\`.vibe/project-context.md\\`\n- Update only the sections affected by the new features\n- Do NOT rewrite from scratch — preserve existing content and add/modify incrementally\n- Use the \\`edit\\` tool for incremental changes. Only use \\`write\\` if creating from scratch.\n\n### Step 3: Update README.md\n- Read existing \\`README.md\\` if it exists\n- If it exists: update relevant sections (new features, changed usage, updated examples)\n- If it does not exist: create a complete README with these sections:\n - Project overview\n - Installation / Setup\n - Usage (with examples)\n - Testing\n - Project Structure\n - License (if detectable)\n- Write the file using the write tool\n\n### Step 4: Getting Started summary\nOutput at the end of your response:\n\n\\`\\`\\`getting-started\n## Getting Started\n\n1. Install: <command>\n2. Run: <command>\n3. Test: <command>\n\\`\\`\\`\n\n## Rules\n- Be concise and practical — focus on what users need to know\n- Prefer actual commands discovered from package.json, Makefile, etc. over guesses\n- If project-context.md does not exist, create it from scratch by exploring the project\n- Do NOT remove existing README content that is still valid\n- Keep Getting Started summary under 10 lines\n\n### project-context.md Guardrails\n\n1. **Section size limit**: Keep each \\`##\\` section under 20 lines. Delegate details to source code; project-context.md is a summary, not a specification.\n2. **Show diff before writing**: Before updating project-context.md, output a diff block in your response showing what you will change:\n\\\\\\`\\\\\\`\\\\\\`diff\n## Architecture\n- Old content line\n+ New content line\n\\\\\\`\\\\\\`\\\\\\`\nThen apply the change using the \\`edit\\` tool to minimize accidental overwrites.\n3. **Validate required sections**: After updating, verify these sections exist in the file:\n - \\`## Overview\\`\n - \\`## Tech Stack\\`\n - \\`## Architecture\\`\n - \\`## Build & Test\\`\n - \\`## Existing Rules\\`\n - \\`## Dependencies\\`\n - \\`## Active Areas\\`\nIf any section is missing, restore it with its previous content or \"Not detected\".\n`;\n"]}
1
+ {"version":3,"file":"documenter.d.ts","sourceRoot":"","sources":["../../src/roles/documenter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,eAAe,EAAE,SAAwB,CAAC;AAEvD,eAAO,MAAM,wBAAwB,4lIAuFpC,CAAC","sourcesContent":["import type { AgentRole } from \"../types.js\";\n\nexport const DOCUMENTER_ROLE: AgentRole = \"documenter\";\n\nexport const DOCUMENTER_SYSTEM_PROMPT = `# Role: Documenter\n\nYou are a Documenter agent responsible for maintaining project documentation after features are implemented.\n\n## Responsibilities\n1. **Update project-context.md**: Read the existing .vibe/project-context.md and update it to reflect changes from newly completed features. Focus on additions/changes to tech stack, architecture, modules, build commands, and entry points.\n2. **Create/Update README.md**: Write or update the project root README.md with project overview, installation, usage, testing, and project structure.\n3. **Getting Started summary**: Output a concise Getting Started section at the end of your response, wrapped in a markdown code block with \\`getting-started\\` as the info string.\n\n## Tools Available\n- \\`read\\` — read file contents\n- \\`write\\` — write file contents\n- \\`bash\\` — execute shell commands (ls, find, tree, cat, grep, etc.)\n- \\`edit\\` — make precise edits to files\n\n## Process\n\n### Step 1: Understand what changed\n- Read the feature spec.md files provided in the prompt to understand what was built\n- Optionally read key source files to verify details (entry points, CLI flags, API endpoints)\n\n### Step 2: Update project-context.md\n- Read existing \\`.vibe/project-context.md\\`\n- Update only the sections affected by the new features\n- Do NOT rewrite from scratch — preserve existing content and add/modify incrementally\n- Use the \\`edit\\` tool for incremental changes. Only use \\`write\\` if creating from scratch.\n\n### Step 3: Update README.md\n- Read existing \\`README.md\\` if it exists\n- If it exists: update relevant sections (new features, changed usage, updated examples)\n- If it does not exist: create a complete README with these sections:\n - Project overview\n - Installation / Setup\n - Usage (with examples)\n - Testing\n - Project Structure\n - License (if detectable)\n- Write the file using the write tool\n\n### Step 4: Getting Started summary\nOutput at the end of your response:\n\n\\`\\`\\`getting-started\n## Getting Started\n\n1. Install: <command>\n2. Run: <command>\n3. Test: <command>\n\\`\\`\\`\n\n## Rules\n- Be concise and practical — focus on what users need to know\n- Prefer actual commands discovered from package.json, Makefile, etc. over guesses\n- If project-context.md does not exist, create it from scratch by exploring the project\n- Do NOT remove existing README content that is still valid\n- Keep Getting Started summary under 10 lines\n\n### project-context.md Guardrails\n\n1. **Section size limit**: Keep each \\`##\\` section under 20 lines. Delegate details to source code; project-context.md is a summary, not a specification.\n2. **Show diff before writing**: Before updating project-context.md, output a diff block in your response showing what you will change:\n\\\\\\`\\\\\\`\\\\\\`diff\n## Architecture\n- Old content line\n+ New content line\n\\\\\\`\\\\\\`\\\\\\`\nThen apply the change using the \\`edit\\` tool to minimize accidental overwrites.\n3. **Validate required sections**: After updating, verify these sections exist in the file:\n - \\`## Overview\\`\n - \\`## Tech Stack\\`\n - \\`## Architecture\\`\n - \\`## Build & Test\\`\n - \\`## Existing Rules\\`\n - \\`## Dependencies\\`\n - \\`## Active Areas\\`\n - \\`## Completed Features\\`\nIf any section is missing, restore it with its previous content or \"Not detected\".\n4. **Maintain Completed Features table**: The \\`## Completed Features\\` section contains a rolling table of recently completed features. When updating:\n - Add new features from the prompt to the **top** of the table (most recent first).\n - Keep at most 20 rows. Remove oldest entries (bottom of table) if the table exceeds 20 rows.\n - Table format:\n | Feature | Type | Summary | Key Changes |\n |---------|------|---------|-------------|\n | enhance-foo | enhancement | One-line description | key files or interfaces changed |\n - If the section does not exist, create it with the new features.\n - Do NOT remove or rewrite existing rows — only prepend new ones at the top and trim old ones from the bottom.\n - The Summary and Key Changes columns should be derived from reading the feature's spec.md and source changes.\n`;\n"]}
@@ -74,6 +74,17 @@ Then apply the change using the \`edit\` tool to minimize accidental overwrites.
74
74
  - \`## Existing Rules\`
75
75
  - \`## Dependencies\`
76
76
  - \`## Active Areas\`
77
+ - \`## Completed Features\`
77
78
  If any section is missing, restore it with its previous content or "Not detected".
79
+ 4. **Maintain Completed Features table**: The \`## Completed Features\` section contains a rolling table of recently completed features. When updating:
80
+ - Add new features from the prompt to the **top** of the table (most recent first).
81
+ - Keep at most 20 rows. Remove oldest entries (bottom of table) if the table exceeds 20 rows.
82
+ - Table format:
83
+ | Feature | Type | Summary | Key Changes |
84
+ |---------|------|---------|-------------|
85
+ | enhance-foo | enhancement | One-line description | key files or interfaces changed |
86
+ - If the section does not exist, create it with the new features.
87
+ - Do NOT remove or rewrite existing rows — only prepend new ones at the top and trim old ones from the bottom.
88
+ - The Summary and Key Changes columns should be derived from reading the feature's spec.md and source changes.
78
89
  `;
79
90
  //# sourceMappingURL=documenter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"documenter.js","sourceRoot":"","sources":["../../src/roles/documenter.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAc,YAAY,CAAC;AAEvD,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4EvC,CAAC","sourcesContent":["import type { AgentRole } from \"../types.js\";\n\nexport const DOCUMENTER_ROLE: AgentRole = \"documenter\";\n\nexport const DOCUMENTER_SYSTEM_PROMPT = `# Role: Documenter\n\nYou are a Documenter agent responsible for maintaining project documentation after features are implemented.\n\n## Responsibilities\n1. **Update project-context.md**: Read the existing .vibe/project-context.md and update it to reflect changes from newly completed features. Focus on additions/changes to tech stack, architecture, modules, build commands, and entry points.\n2. **Create/Update README.md**: Write or update the project root README.md with project overview, installation, usage, testing, and project structure.\n3. **Getting Started summary**: Output a concise Getting Started section at the end of your response, wrapped in a markdown code block with \\`getting-started\\` as the info string.\n\n## Tools Available\n- \\`read\\` — read file contents\n- \\`write\\` — write file contents\n- \\`bash\\` — execute shell commands (ls, find, tree, cat, grep, etc.)\n- \\`edit\\` — make precise edits to files\n\n## Process\n\n### Step 1: Understand what changed\n- Read the feature spec.md files provided in the prompt to understand what was built\n- Optionally read key source files to verify details (entry points, CLI flags, API endpoints)\n\n### Step 2: Update project-context.md\n- Read existing \\`.vibe/project-context.md\\`\n- Update only the sections affected by the new features\n- Do NOT rewrite from scratch — preserve existing content and add/modify incrementally\n- Use the \\`edit\\` tool for incremental changes. Only use \\`write\\` if creating from scratch.\n\n### Step 3: Update README.md\n- Read existing \\`README.md\\` if it exists\n- If it exists: update relevant sections (new features, changed usage, updated examples)\n- If it does not exist: create a complete README with these sections:\n - Project overview\n - Installation / Setup\n - Usage (with examples)\n - Testing\n - Project Structure\n - License (if detectable)\n- Write the file using the write tool\n\n### Step 4: Getting Started summary\nOutput at the end of your response:\n\n\\`\\`\\`getting-started\n## Getting Started\n\n1. Install: <command>\n2. Run: <command>\n3. Test: <command>\n\\`\\`\\`\n\n## Rules\n- Be concise and practical — focus on what users need to know\n- Prefer actual commands discovered from package.json, Makefile, etc. over guesses\n- If project-context.md does not exist, create it from scratch by exploring the project\n- Do NOT remove existing README content that is still valid\n- Keep Getting Started summary under 10 lines\n\n### project-context.md Guardrails\n\n1. **Section size limit**: Keep each \\`##\\` section under 20 lines. Delegate details to source code; project-context.md is a summary, not a specification.\n2. **Show diff before writing**: Before updating project-context.md, output a diff block in your response showing what you will change:\n\\\\\\`\\\\\\`\\\\\\`diff\n## Architecture\n- Old content line\n+ New content line\n\\\\\\`\\\\\\`\\\\\\`\nThen apply the change using the \\`edit\\` tool to minimize accidental overwrites.\n3. **Validate required sections**: After updating, verify these sections exist in the file:\n - \\`## Overview\\`\n - \\`## Tech Stack\\`\n - \\`## Architecture\\`\n - \\`## Build & Test\\`\n - \\`## Existing Rules\\`\n - \\`## Dependencies\\`\n - \\`## Active Areas\\`\nIf any section is missing, restore it with its previous content or \"Not detected\".\n`;\n"]}
1
+ {"version":3,"file":"documenter.js","sourceRoot":"","sources":["../../src/roles/documenter.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAc,YAAY,CAAC;AAEvD,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuFvC,CAAC","sourcesContent":["import type { AgentRole } from \"../types.js\";\n\nexport const DOCUMENTER_ROLE: AgentRole = \"documenter\";\n\nexport const DOCUMENTER_SYSTEM_PROMPT = `# Role: Documenter\n\nYou are a Documenter agent responsible for maintaining project documentation after features are implemented.\n\n## Responsibilities\n1. **Update project-context.md**: Read the existing .vibe/project-context.md and update it to reflect changes from newly completed features. Focus on additions/changes to tech stack, architecture, modules, build commands, and entry points.\n2. **Create/Update README.md**: Write or update the project root README.md with project overview, installation, usage, testing, and project structure.\n3. **Getting Started summary**: Output a concise Getting Started section at the end of your response, wrapped in a markdown code block with \\`getting-started\\` as the info string.\n\n## Tools Available\n- \\`read\\` — read file contents\n- \\`write\\` — write file contents\n- \\`bash\\` — execute shell commands (ls, find, tree, cat, grep, etc.)\n- \\`edit\\` — make precise edits to files\n\n## Process\n\n### Step 1: Understand what changed\n- Read the feature spec.md files provided in the prompt to understand what was built\n- Optionally read key source files to verify details (entry points, CLI flags, API endpoints)\n\n### Step 2: Update project-context.md\n- Read existing \\`.vibe/project-context.md\\`\n- Update only the sections affected by the new features\n- Do NOT rewrite from scratch — preserve existing content and add/modify incrementally\n- Use the \\`edit\\` tool for incremental changes. Only use \\`write\\` if creating from scratch.\n\n### Step 3: Update README.md\n- Read existing \\`README.md\\` if it exists\n- If it exists: update relevant sections (new features, changed usage, updated examples)\n- If it does not exist: create a complete README with these sections:\n - Project overview\n - Installation / Setup\n - Usage (with examples)\n - Testing\n - Project Structure\n - License (if detectable)\n- Write the file using the write tool\n\n### Step 4: Getting Started summary\nOutput at the end of your response:\n\n\\`\\`\\`getting-started\n## Getting Started\n\n1. Install: <command>\n2. Run: <command>\n3. Test: <command>\n\\`\\`\\`\n\n## Rules\n- Be concise and practical — focus on what users need to know\n- Prefer actual commands discovered from package.json, Makefile, etc. over guesses\n- If project-context.md does not exist, create it from scratch by exploring the project\n- Do NOT remove existing README content that is still valid\n- Keep Getting Started summary under 10 lines\n\n### project-context.md Guardrails\n\n1. **Section size limit**: Keep each \\`##\\` section under 20 lines. Delegate details to source code; project-context.md is a summary, not a specification.\n2. **Show diff before writing**: Before updating project-context.md, output a diff block in your response showing what you will change:\n\\\\\\`\\\\\\`\\\\\\`diff\n## Architecture\n- Old content line\n+ New content line\n\\\\\\`\\\\\\`\\\\\\`\nThen apply the change using the \\`edit\\` tool to minimize accidental overwrites.\n3. **Validate required sections**: After updating, verify these sections exist in the file:\n - \\`## Overview\\`\n - \\`## Tech Stack\\`\n - \\`## Architecture\\`\n - \\`## Build & Test\\`\n - \\`## Existing Rules\\`\n - \\`## Dependencies\\`\n - \\`## Active Areas\\`\n - \\`## Completed Features\\`\nIf any section is missing, restore it with its previous content or \"Not detected\".\n4. **Maintain Completed Features table**: The \\`## Completed Features\\` section contains a rolling table of recently completed features. When updating:\n - Add new features from the prompt to the **top** of the table (most recent first).\n - Keep at most 20 rows. Remove oldest entries (bottom of table) if the table exceeds 20 rows.\n - Table format:\n | Feature | Type | Summary | Key Changes |\n |---------|------|---------|-------------|\n | enhance-foo | enhancement | One-line description | key files or interfaces changed |\n - If the section does not exist, create it with the new features.\n - Do NOT remove or rewrite existing rows — only prepend new ones at the top and trim old ones from the bottom.\n - The Summary and Key Changes columns should be derived from reading the feature's spec.md and source changes.\n`;\n"]}
@@ -8,6 +8,7 @@ export { DISCOVERY_ROLE, DISCOVERY_SYSTEM_PROMPT } from "./discovery.js";
8
8
  export { DOCUMENTER_ROLE, DOCUMENTER_SYSTEM_PROMPT } from "./documenter.js";
9
9
  export { PLANNER_ROLE, PLANNER_SYSTEM_PROMPT } from "./planner.js";
10
10
  export { PROJECT_ANALYZER_ROLE, PROJECT_ANALYZER_SYSTEM_PROMPT } from "./project-analyzer.js";
11
+ export { RECOVER_ROLE, RECOVER_SYSTEM_PROMPT } from "./recover.js";
11
12
  export { REVIEWER_ROLE, REVIEWER_SYSTEM_PROMPT } from "./reviewer.js";
12
13
  export { STANDARDS_ENRICHER_ROLE, STANDARDS_ENRICHER_SYSTEM_PROMPT } from "./standards-enricher.js";
13
14
  export { SYSTEM_ARCHITECT_ROLE, SYSTEM_ARCHITECT_SYSTEM_PROMPT } from "./system-architect.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/roles/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAe7C,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AACpG,OAAO,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEhE,oCAAoC;AACpC,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAczD,CAAC;AAEF;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAE9D","sourcesContent":["import type { AgentRole } from \"../types.js\";\nimport { ANALYZER_SYSTEM_PROMPT } from \"./analyzer.js\";\nimport { ARCHITECT_SYSTEM_PROMPT } from \"./architect.js\";\nimport { CICD_SYSTEM_PROMPT } from \"./cicd.js\";\nimport { DEVELOPER_SYSTEM_PROMPT } from \"./developer.js\";\nimport { DIAGNOSTICIAN_SYSTEM_PROMPT } from \"./diagnostician.js\";\nimport { DISCOVERY_SYSTEM_PROMPT } from \"./discovery.js\";\nimport { DOCUMENTER_SYSTEM_PROMPT } from \"./documenter.js\";\nimport { PLANNER_SYSTEM_PROMPT } from \"./planner.js\";\nimport { PROJECT_ANALYZER_SYSTEM_PROMPT } from \"./project-analyzer.js\";\nimport { REVIEWER_SYSTEM_PROMPT } from \"./reviewer.js\";\nimport { STANDARDS_ENRICHER_SYSTEM_PROMPT } from \"./standards-enricher.js\";\nimport { SYSTEM_ARCHITECT_SYSTEM_PROMPT } from \"./system-architect.js\";\nimport { TESTER_SYSTEM_PROMPT } from \"./tester.js\";\n\nexport { ANALYZER_ROLE, ANALYZER_SYSTEM_PROMPT } from \"./analyzer.js\";\nexport { ARCHITECT_ROLE, ARCHITECT_SYSTEM_PROMPT } from \"./architect.js\";\nexport { CICD_ROLE, CICD_SYSTEM_PROMPT } from \"./cicd.js\";\nexport { DEVELOPER_ROLE, DEVELOPER_SYSTEM_PROMPT } from \"./developer.js\";\nexport { DIAGNOSTICIAN_ROLE, DIAGNOSTICIAN_SYSTEM_PROMPT } from \"./diagnostician.js\";\nexport { DISCOVERY_ROLE, DISCOVERY_SYSTEM_PROMPT } from \"./discovery.js\";\nexport { DOCUMENTER_ROLE, DOCUMENTER_SYSTEM_PROMPT } from \"./documenter.js\";\nexport { PLANNER_ROLE, PLANNER_SYSTEM_PROMPT } from \"./planner.js\";\nexport { PROJECT_ANALYZER_ROLE, PROJECT_ANALYZER_SYSTEM_PROMPT } from \"./project-analyzer.js\";\nexport { REVIEWER_ROLE, REVIEWER_SYSTEM_PROMPT } from \"./reviewer.js\";\nexport { STANDARDS_ENRICHER_ROLE, STANDARDS_ENRICHER_SYSTEM_PROMPT } from \"./standards-enricher.js\";\nexport { SYSTEM_ARCHITECT_ROLE, SYSTEM_ARCHITECT_SYSTEM_PROMPT } from \"./system-architect.js\";\nexport { TESTER_ROLE, TESTER_SYSTEM_PROMPT } from \"./tester.js\";\n\n/** System prompt mapping by role */\nexport const ROLE_SYSTEM_PROMPTS: Record<AgentRole, string> = {\n\tplanner: PLANNER_SYSTEM_PROMPT,\n\tarchitect: ARCHITECT_SYSTEM_PROMPT,\n\tdeveloper: DEVELOPER_SYSTEM_PROMPT,\n\ttester: TESTER_SYSTEM_PROMPT,\n\treviewer: REVIEWER_SYSTEM_PROMPT,\n\tcicd: CICD_SYSTEM_PROMPT,\n\tanalyzer: ANALYZER_SYSTEM_PROMPT,\n\tdiagnostician: DIAGNOSTICIAN_SYSTEM_PROMPT,\n\tdiscovery: DISCOVERY_SYSTEM_PROMPT,\n\tprojectAnalyzer: PROJECT_ANALYZER_SYSTEM_PROMPT,\n\tdocumenter: DOCUMENTER_SYSTEM_PROMPT,\n\tstandardsEnricher: STANDARDS_ENRICHER_SYSTEM_PROMPT,\n\tsystemArchitect: SYSTEM_ARCHITECT_SYSTEM_PROMPT,\n};\n\n/**\n * Returns the system prompt for the given role.\n */\nexport function getSystemPromptForRole(role: AgentRole): string {\n\treturn ROLE_SYSTEM_PROMPTS[role];\n}\n"]}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/roles/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAgB7C,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AACpG,OAAO,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEhE,oCAAoC;AACpC,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAezD,CAAC;AAEF;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAE9D","sourcesContent":["import type { AgentRole } from \"../types.js\";\nimport { ANALYZER_SYSTEM_PROMPT } from \"./analyzer.js\";\nimport { ARCHITECT_SYSTEM_PROMPT } from \"./architect.js\";\nimport { CICD_SYSTEM_PROMPT } from \"./cicd.js\";\nimport { DEVELOPER_SYSTEM_PROMPT } from \"./developer.js\";\nimport { DIAGNOSTICIAN_SYSTEM_PROMPT } from \"./diagnostician.js\";\nimport { DISCOVERY_SYSTEM_PROMPT } from \"./discovery.js\";\nimport { DOCUMENTER_SYSTEM_PROMPT } from \"./documenter.js\";\nimport { PLANNER_SYSTEM_PROMPT } from \"./planner.js\";\nimport { PROJECT_ANALYZER_SYSTEM_PROMPT } from \"./project-analyzer.js\";\nimport { RECOVER_SYSTEM_PROMPT } from \"./recover.js\";\nimport { REVIEWER_SYSTEM_PROMPT } from \"./reviewer.js\";\nimport { STANDARDS_ENRICHER_SYSTEM_PROMPT } from \"./standards-enricher.js\";\nimport { SYSTEM_ARCHITECT_SYSTEM_PROMPT } from \"./system-architect.js\";\nimport { TESTER_SYSTEM_PROMPT } from \"./tester.js\";\n\nexport { ANALYZER_ROLE, ANALYZER_SYSTEM_PROMPT } from \"./analyzer.js\";\nexport { ARCHITECT_ROLE, ARCHITECT_SYSTEM_PROMPT } from \"./architect.js\";\nexport { CICD_ROLE, CICD_SYSTEM_PROMPT } from \"./cicd.js\";\nexport { DEVELOPER_ROLE, DEVELOPER_SYSTEM_PROMPT } from \"./developer.js\";\nexport { DIAGNOSTICIAN_ROLE, DIAGNOSTICIAN_SYSTEM_PROMPT } from \"./diagnostician.js\";\nexport { DISCOVERY_ROLE, DISCOVERY_SYSTEM_PROMPT } from \"./discovery.js\";\nexport { DOCUMENTER_ROLE, DOCUMENTER_SYSTEM_PROMPT } from \"./documenter.js\";\nexport { PLANNER_ROLE, PLANNER_SYSTEM_PROMPT } from \"./planner.js\";\nexport { PROJECT_ANALYZER_ROLE, PROJECT_ANALYZER_SYSTEM_PROMPT } from \"./project-analyzer.js\";\nexport { RECOVER_ROLE, RECOVER_SYSTEM_PROMPT } from \"./recover.js\";\nexport { REVIEWER_ROLE, REVIEWER_SYSTEM_PROMPT } from \"./reviewer.js\";\nexport { STANDARDS_ENRICHER_ROLE, STANDARDS_ENRICHER_SYSTEM_PROMPT } from \"./standards-enricher.js\";\nexport { SYSTEM_ARCHITECT_ROLE, SYSTEM_ARCHITECT_SYSTEM_PROMPT } from \"./system-architect.js\";\nexport { TESTER_ROLE, TESTER_SYSTEM_PROMPT } from \"./tester.js\";\n\n/** System prompt mapping by role */\nexport const ROLE_SYSTEM_PROMPTS: Record<AgentRole, string> = {\n\tplanner: PLANNER_SYSTEM_PROMPT,\n\tarchitect: ARCHITECT_SYSTEM_PROMPT,\n\tdeveloper: DEVELOPER_SYSTEM_PROMPT,\n\ttester: TESTER_SYSTEM_PROMPT,\n\treviewer: REVIEWER_SYSTEM_PROMPT,\n\tcicd: CICD_SYSTEM_PROMPT,\n\tanalyzer: ANALYZER_SYSTEM_PROMPT,\n\tdiagnostician: DIAGNOSTICIAN_SYSTEM_PROMPT,\n\tdiscovery: DISCOVERY_SYSTEM_PROMPT,\n\tprojectAnalyzer: PROJECT_ANALYZER_SYSTEM_PROMPT,\n\tdocumenter: DOCUMENTER_SYSTEM_PROMPT,\n\tstandardsEnricher: STANDARDS_ENRICHER_SYSTEM_PROMPT,\n\tsystemArchitect: SYSTEM_ARCHITECT_SYSTEM_PROMPT,\n\trecover: RECOVER_SYSTEM_PROMPT,\n};\n\n/**\n * Returns the system prompt for the given role.\n */\nexport function getSystemPromptForRole(role: AgentRole): string {\n\treturn ROLE_SYSTEM_PROMPTS[role];\n}\n"]}
@@ -7,6 +7,7 @@ import { DISCOVERY_SYSTEM_PROMPT } from "./discovery.js";
7
7
  import { DOCUMENTER_SYSTEM_PROMPT } from "./documenter.js";
8
8
  import { PLANNER_SYSTEM_PROMPT } from "./planner.js";
9
9
  import { PROJECT_ANALYZER_SYSTEM_PROMPT } from "./project-analyzer.js";
10
+ import { RECOVER_SYSTEM_PROMPT } from "./recover.js";
10
11
  import { REVIEWER_SYSTEM_PROMPT } from "./reviewer.js";
11
12
  import { STANDARDS_ENRICHER_SYSTEM_PROMPT } from "./standards-enricher.js";
12
13
  import { SYSTEM_ARCHITECT_SYSTEM_PROMPT } from "./system-architect.js";
@@ -20,6 +21,7 @@ export { DISCOVERY_ROLE, DISCOVERY_SYSTEM_PROMPT } from "./discovery.js";
20
21
  export { DOCUMENTER_ROLE, DOCUMENTER_SYSTEM_PROMPT } from "./documenter.js";
21
22
  export { PLANNER_ROLE, PLANNER_SYSTEM_PROMPT } from "./planner.js";
22
23
  export { PROJECT_ANALYZER_ROLE, PROJECT_ANALYZER_SYSTEM_PROMPT } from "./project-analyzer.js";
24
+ export { RECOVER_ROLE, RECOVER_SYSTEM_PROMPT } from "./recover.js";
23
25
  export { REVIEWER_ROLE, REVIEWER_SYSTEM_PROMPT } from "./reviewer.js";
24
26
  export { STANDARDS_ENRICHER_ROLE, STANDARDS_ENRICHER_SYSTEM_PROMPT } from "./standards-enricher.js";
25
27
  export { SYSTEM_ARCHITECT_ROLE, SYSTEM_ARCHITECT_SYSTEM_PROMPT } from "./system-architect.js";
@@ -39,6 +41,7 @@ export const ROLE_SYSTEM_PROMPTS = {
39
41
  documenter: DOCUMENTER_SYSTEM_PROMPT,
40
42
  standardsEnricher: STANDARDS_ENRICHER_SYSTEM_PROMPT,
41
43
  systemArchitect: SYSTEM_ARCHITECT_SYSTEM_PROMPT,
44
+ recover: RECOVER_SYSTEM_PROMPT,
42
45
  };
43
46
  /**
44
47
  * Returns the system prompt for the given role.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/roles/index.ts"],"names":[],"mappings":"AACA,O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EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AACpG,OAAO,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEhE,oCAAoC;AACpC,MAAM,CAAC,MAAM,mBAAmB,GAA8B;IAC7D,OAAO,EAAE,qBAAqB;IAC9B,SAAS,EAAE,uBAAuB;IAClC,SAAS,EAAE,uBAAuB;IAClC,MAAM,EAAE,oBAAoB;IAC5B,QAAQ,EAAE,sBAAsB;IAChC,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,sBAAsB;IAChC,aAAa,EAAE,2BAA2B;IAC1C,SAAS,EAAE,uBAAuB;IAClC,eAAe,EAAE,8BAA8B;IAC/C,UAAU,EAAE,wBAAwB;IACpC,iBAAiB,EAAE,gCAAgC;IACnD,eAAe,EAAE,8BAA8B;CAC/C,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAe,EAAU;IAC/D,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;AAAA,CACjC","sourcesContent":["import type { AgentRole } from \"../types.js\";\nimport { ANALYZER_SYSTEM_PROMPT } from \"./analyzer.js\";\nimport { ARCHITECT_SYSTEM_PROMPT } from \"./architect.js\";\nimport { CICD_SYSTEM_PROMPT } from \"./cicd.js\";\nimport { DEVELOPER_SYSTEM_PROMPT } from \"./developer.js\";\nimport { DIAGNOSTICIAN_SYSTEM_PROMPT } from \"./diagnostician.js\";\nimport { DISCOVERY_SYSTEM_PROMPT } from \"./discovery.js\";\nimport { DOCUMENTER_SYSTEM_PROMPT } from \"./documenter.js\";\nimport { PLANNER_SYSTEM_PROMPT } from \"./planner.js\";\nimport { PROJECT_ANALYZER_SYSTEM_PROMPT } from \"./project-analyzer.js\";\nimport { REVIEWER_SYSTEM_PROMPT } from \"./reviewer.js\";\nimport { STANDARDS_ENRICHER_SYSTEM_PROMPT } from \"./standards-enricher.js\";\nimport { SYSTEM_ARCHITECT_SYSTEM_PROMPT } from \"./system-architect.js\";\nimport { TESTER_SYSTEM_PROMPT } from \"./tester.js\";\n\nexport { ANALYZER_ROLE, ANALYZER_SYSTEM_PROMPT } from \"./analyzer.js\";\nexport { ARCHITECT_ROLE, ARCHITECT_SYSTEM_PROMPT } from \"./architect.js\";\nexport { CICD_ROLE, CICD_SYSTEM_PROMPT } from \"./cicd.js\";\nexport { DEVELOPER_ROLE, DEVELOPER_SYSTEM_PROMPT } from \"./developer.js\";\nexport { DIAGNOSTICIAN_ROLE, DIAGNOSTICIAN_SYSTEM_PROMPT } from \"./diagnostician.js\";\nexport { DISCOVERY_ROLE, DISCOVERY_SYSTEM_PROMPT } from \"./discovery.js\";\nexport { DOCUMENTER_ROLE, DOCUMENTER_SYSTEM_PROMPT } from \"./documenter.js\";\nexport { PLANNER_ROLE, PLANNER_SYSTEM_PROMPT } from \"./planner.js\";\nexport { PROJECT_ANALYZER_ROLE, PROJECT_ANALYZER_SYSTEM_PROMPT } from \"./project-analyzer.js\";\nexport { REVIEWER_ROLE, REVIEWER_SYSTEM_PROMPT } from \"./reviewer.js\";\nexport { STANDARDS_ENRICHER_ROLE, STANDARDS_ENRICHER_SYSTEM_PROMPT } from \"./standards-enricher.js\";\nexport { SYSTEM_ARCHITECT_ROLE, SYSTEM_ARCHITECT_SYSTEM_PROMPT } from \"./system-architect.js\";\nexport { TESTER_ROLE, TESTER_SYSTEM_PROMPT } from \"./tester.js\";\n\n/** System prompt mapping by role */\nexport const ROLE_SYSTEM_PROMPTS: Record<AgentRole, string> = {\n\tplanner: PLANNER_SYSTEM_PROMPT,\n\tarchitect: ARCHITECT_SYSTEM_PROMPT,\n\tdeveloper: DEVELOPER_SYSTEM_PROMPT,\n\ttester: TESTER_SYSTEM_PROMPT,\n\treviewer: REVIEWER_SYSTEM_PROMPT,\n\tcicd: CICD_SYSTEM_PROMPT,\n\tanalyzer: ANALYZER_SYSTEM_PROMPT,\n\tdiagnostician: DIAGNOSTICIAN_SYSTEM_PROMPT,\n\tdiscovery: DISCOVERY_SYSTEM_PROMPT,\n\tprojectAnalyzer: PROJECT_ANALYZER_SYSTEM_PROMPT,\n\tdocumenter: DOCUMENTER_SYSTEM_PROMPT,\n\tstandardsEnricher: STANDARDS_ENRICHER_SYSTEM_PROMPT,\n\tsystemArchitect: SYSTEM_ARCHITECT_SYSTEM_PROMPT,\n};\n\n/**\n * Returns the system prompt for the given role.\n */\nexport function getSystemPromptForRole(role: AgentRole): string {\n\treturn ROLE_SYSTEM_PROMPTS[role];\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/roles/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,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2BAA2B;IAC1C,SAAS,EAAE,uBAAuB;IAClC,eAAe,EAAE,8BAA8B;IAC/C,UAAU,EAAE,wBAAwB;IACpC,iBAAiB,EAAE,gCAAgC;IACnD,eAAe,EAAE,8BAA8B;IAC/C,OAAO,EAAE,qBAAqB;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAe,EAAU;IAC/D,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;AAAA,CACjC","sourcesContent":["import type { AgentRole } from \"../types.js\";\nimport { ANALYZER_SYSTEM_PROMPT } from \"./analyzer.js\";\nimport { ARCHITECT_SYSTEM_PROMPT } from \"./architect.js\";\nimport { CICD_SYSTEM_PROMPT } from \"./cicd.js\";\nimport { DEVELOPER_SYSTEM_PROMPT } from \"./developer.js\";\nimport { DIAGNOSTICIAN_SYSTEM_PROMPT } from \"./diagnostician.js\";\nimport { DISCOVERY_SYSTEM_PROMPT } from \"./discovery.js\";\nimport { DOCUMENTER_SYSTEM_PROMPT } from \"./documenter.js\";\nimport { PLANNER_SYSTEM_PROMPT } from \"./planner.js\";\nimport { PROJECT_ANALYZER_SYSTEM_PROMPT } from \"./project-analyzer.js\";\nimport { RECOVER_SYSTEM_PROMPT } from \"./recover.js\";\nimport { REVIEWER_SYSTEM_PROMPT } from \"./reviewer.js\";\nimport { STANDARDS_ENRICHER_SYSTEM_PROMPT } from \"./standards-enricher.js\";\nimport { SYSTEM_ARCHITECT_SYSTEM_PROMPT } from \"./system-architect.js\";\nimport { TESTER_SYSTEM_PROMPT } from \"./tester.js\";\n\nexport { ANALYZER_ROLE, ANALYZER_SYSTEM_PROMPT } from \"./analyzer.js\";\nexport { ARCHITECT_ROLE, ARCHITECT_SYSTEM_PROMPT } from \"./architect.js\";\nexport { CICD_ROLE, CICD_SYSTEM_PROMPT } from \"./cicd.js\";\nexport { DEVELOPER_ROLE, DEVELOPER_SYSTEM_PROMPT } from \"./developer.js\";\nexport { DIAGNOSTICIAN_ROLE, DIAGNOSTICIAN_SYSTEM_PROMPT } from \"./diagnostician.js\";\nexport { DISCOVERY_ROLE, DISCOVERY_SYSTEM_PROMPT } from \"./discovery.js\";\nexport { DOCUMENTER_ROLE, DOCUMENTER_SYSTEM_PROMPT } from \"./documenter.js\";\nexport { PLANNER_ROLE, PLANNER_SYSTEM_PROMPT } from \"./planner.js\";\nexport { PROJECT_ANALYZER_ROLE, PROJECT_ANALYZER_SYSTEM_PROMPT } from \"./project-analyzer.js\";\nexport { RECOVER_ROLE, RECOVER_SYSTEM_PROMPT } from \"./recover.js\";\nexport { REVIEWER_ROLE, REVIEWER_SYSTEM_PROMPT } from \"./reviewer.js\";\nexport { STANDARDS_ENRICHER_ROLE, STANDARDS_ENRICHER_SYSTEM_PROMPT } from \"./standards-enricher.js\";\nexport { SYSTEM_ARCHITECT_ROLE, SYSTEM_ARCHITECT_SYSTEM_PROMPT } from \"./system-architect.js\";\nexport { TESTER_ROLE, TESTER_SYSTEM_PROMPT } from \"./tester.js\";\n\n/** System prompt mapping by role */\nexport const ROLE_SYSTEM_PROMPTS: Record<AgentRole, string> = {\n\tplanner: PLANNER_SYSTEM_PROMPT,\n\tarchitect: ARCHITECT_SYSTEM_PROMPT,\n\tdeveloper: DEVELOPER_SYSTEM_PROMPT,\n\ttester: TESTER_SYSTEM_PROMPT,\n\treviewer: REVIEWER_SYSTEM_PROMPT,\n\tcicd: CICD_SYSTEM_PROMPT,\n\tanalyzer: ANALYZER_SYSTEM_PROMPT,\n\tdiagnostician: DIAGNOSTICIAN_SYSTEM_PROMPT,\n\tdiscovery: DISCOVERY_SYSTEM_PROMPT,\n\tprojectAnalyzer: PROJECT_ANALYZER_SYSTEM_PROMPT,\n\tdocumenter: DOCUMENTER_SYSTEM_PROMPT,\n\tstandardsEnricher: STANDARDS_ENRICHER_SYSTEM_PROMPT,\n\tsystemArchitect: SYSTEM_ARCHITECT_SYSTEM_PROMPT,\n\trecover: RECOVER_SYSTEM_PROMPT,\n};\n\n/**\n * Returns the system prompt for the given role.\n */\nexport function getSystemPromptForRole(role: AgentRole): string {\n\treturn ROLE_SYSTEM_PROMPTS[role];\n}\n"]}
@@ -0,0 +1,5 @@
1
+ /** Role identifier for the recovery agent. */
2
+ export declare const RECOVER_ROLE: "recover";
3
+ /** System prompt for the recovery agent. */
4
+ export declare const RECOVER_SYSTEM_PROMPT = "# Recovery Agent\n\nYou are a recovery specialist for the Vibe orchestration system. Your task is to reconstruct a lost `orchestration-state.json` by analyzing surviving artifacts in the `.vibe/` directory.\n\n## OrchestrationState Structure\n\n```typescript\ninterface OrchestrationState {\n workflowType: \"new_feature\" | \"enhancement\" | \"bugfix\" | \"refactor\" | \"mixed\";\n phase: \"discovery\" | \"requirements_gate\" | \"system_architecture\" | \"system_design_gate\" | \"analyze\" | \"planning\" | \"plan_gate\" | \"orchestrating\" | \"single_pipeline\" | \"done\";\n completedFeatures: string[];\n failedFeatures: string[];\n skippedFeatures: string[];\n requirement: string;\n options?: { parentFeatureId?: string; issueRef?: string };\n singleFeatureId?: string;\n baseBranch?: string;\n updatedAt: string;\n}\n```\n\n## Your Investigation Process\n\n1. **Read plan.json** to understand the workflow type and feature list.\n2. **Check each feature directory** (`.vibe/features/{featureId}/`) for artifacts:\n - `spec.md` \u2014 feature was planned\n - `design.md` \u2014 design phase completed\n - `test-report.md` \u2014 testing was done\n - `review.md` \u2014 review was done (read it to check if verdict is APPROVED)\n - `pipeline.json` \u2014 feature was in progress (check `currentStep` and `status`)\n - `status.json` \u2014 may contain status information\n3. **Check git state** using `execute_command`:\n - `git branch --list 'feat/vibe-*'` or similar patterns to see feature branches\n - `git log --oneline -20` to see recent merge commits\n - `git branch --show-current` for the current branch\n4. **Read config.json** for `baseBranch`.\n5. **Read requirements.md** first few lines for the `requirement` field.\n\n## Feature Completion Criteria\n\nA feature is **completed** when:\n- `review.md` exists AND contains \"APPROVED\" verdict\n- AND the feature branch was merged (visible in git log or branch is gone)\n\nA feature is **in-progress** when:\n- `pipeline.json` exists, OR\n- Some artifacts exist (design.md, test-report.md) but review.md is missing or not approved\n\nA feature is **planned** when:\n- Only `spec.md` exists (or no artifacts at all)\n\nWhen in doubt, classify as **planned** rather than **completed**. This ensures the feature runs again on resume rather than being skipped.\n\n## Output\n\nAfter investigation, output your proposed state as a single JSON code block:\n\n```json\n{\n \"workflowType\": \"...\",\n \"phase\": \"orchestrating\",\n \"completedFeatures\": [...],\n \"failedFeatures\": [],\n \"skippedFeatures\": [],\n \"requirement\": \"...\",\n \"baseBranch\": \"...\",\n \"updatedAt\": \"<current ISO timestamp>\"\n}\n```\n\n## Rules\n\n- `phase` should almost always be `\"orchestrating\"` \u2014 recovery puts us back into feature execution.\n- `failedFeatures` should be empty unless you find clear evidence of failure (e.g., status.json with `\"failed\"`).\n- `skippedFeatures` should be empty unless you find clear evidence of skipping.\n- Only include features in `completedFeatures` if you are confident they are fully done.\n- Include a brief explanation before the JSON block explaining your reasoning for each feature's classification.\n";
5
+ //# sourceMappingURL=recover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recover.d.ts","sourceRoot":"","sources":["../../src/roles/recover.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,eAAO,MAAM,YAAY,WAAqB,CAAC;AAE/C,4CAA4C;AAC5C,eAAO,MAAM,qBAAqB,qrGA6EjC,CAAC","sourcesContent":["/** Role identifier for the recovery agent. */\nexport const RECOVER_ROLE = \"recover\" as const;\n\n/** System prompt for the recovery agent. */\nexport const RECOVER_SYSTEM_PROMPT = `# Recovery Agent\n\nYou are a recovery specialist for the Vibe orchestration system. Your task is to reconstruct a lost \\`orchestration-state.json\\` by analyzing surviving artifacts in the \\`.vibe/\\` directory.\n\n## OrchestrationState Structure\n\n\\`\\`\\`typescript\ninterface OrchestrationState {\n workflowType: \"new_feature\" | \"enhancement\" | \"bugfix\" | \"refactor\" | \"mixed\";\n phase: \"discovery\" | \"requirements_gate\" | \"system_architecture\" | \"system_design_gate\" | \"analyze\" | \"planning\" | \"plan_gate\" | \"orchestrating\" | \"single_pipeline\" | \"done\";\n completedFeatures: string[];\n failedFeatures: string[];\n skippedFeatures: string[];\n requirement: string;\n options?: { parentFeatureId?: string; issueRef?: string };\n singleFeatureId?: string;\n baseBranch?: string;\n updatedAt: string;\n}\n\\`\\`\\`\n\n## Your Investigation Process\n\n1. **Read plan.json** to understand the workflow type and feature list.\n2. **Check each feature directory** (\\`.vibe/features/{featureId}/\\`) for artifacts:\n - \\`spec.md\\` — feature was planned\n - \\`design.md\\` — design phase completed\n - \\`test-report.md\\` — testing was done\n - \\`review.md\\` — review was done (read it to check if verdict is APPROVED)\n - \\`pipeline.json\\` — feature was in progress (check \\`currentStep\\` and \\`status\\`)\n - \\`status.json\\` — may contain status information\n3. **Check git state** using \\`execute_command\\`:\n - \\`git branch --list 'feat/vibe-*'\\` or similar patterns to see feature branches\n - \\`git log --oneline -20\\` to see recent merge commits\n - \\`git branch --show-current\\` for the current branch\n4. **Read config.json** for \\`baseBranch\\`.\n5. **Read requirements.md** first few lines for the \\`requirement\\` field.\n\n## Feature Completion Criteria\n\nA feature is **completed** when:\n- \\`review.md\\` exists AND contains \"APPROVED\" verdict\n- AND the feature branch was merged (visible in git log or branch is gone)\n\nA feature is **in-progress** when:\n- \\`pipeline.json\\` exists, OR\n- Some artifacts exist (design.md, test-report.md) but review.md is missing or not approved\n\nA feature is **planned** when:\n- Only \\`spec.md\\` exists (or no artifacts at all)\n\nWhen in doubt, classify as **planned** rather than **completed**. This ensures the feature runs again on resume rather than being skipped.\n\n## Output\n\nAfter investigation, output your proposed state as a single JSON code block:\n\n\\`\\`\\`json\n{\n \"workflowType\": \"...\",\n \"phase\": \"orchestrating\",\n \"completedFeatures\": [...],\n \"failedFeatures\": [],\n \"skippedFeatures\": [],\n \"requirement\": \"...\",\n \"baseBranch\": \"...\",\n \"updatedAt\": \"<current ISO timestamp>\"\n}\n\\`\\`\\`\n\n## Rules\n\n- \\`phase\\` should almost always be \\`\"orchestrating\"\\` — recovery puts us back into feature execution.\n- \\`failedFeatures\\` should be empty unless you find clear evidence of failure (e.g., status.json with \\`\"failed\"\\`).\n- \\`skippedFeatures\\` should be empty unless you find clear evidence of skipping.\n- Only include features in \\`completedFeatures\\` if you are confident they are fully done.\n- Include a brief explanation before the JSON block explaining your reasoning for each feature's classification.\n`;\n"]}
@@ -0,0 +1,82 @@
1
+ /** Role identifier for the recovery agent. */
2
+ export const RECOVER_ROLE = "recover";
3
+ /** System prompt for the recovery agent. */
4
+ export const RECOVER_SYSTEM_PROMPT = `# Recovery Agent
5
+
6
+ You are a recovery specialist for the Vibe orchestration system. Your task is to reconstruct a lost \`orchestration-state.json\` by analyzing surviving artifacts in the \`.vibe/\` directory.
7
+
8
+ ## OrchestrationState Structure
9
+
10
+ \`\`\`typescript
11
+ interface OrchestrationState {
12
+ workflowType: "new_feature" | "enhancement" | "bugfix" | "refactor" | "mixed";
13
+ phase: "discovery" | "requirements_gate" | "system_architecture" | "system_design_gate" | "analyze" | "planning" | "plan_gate" | "orchestrating" | "single_pipeline" | "done";
14
+ completedFeatures: string[];
15
+ failedFeatures: string[];
16
+ skippedFeatures: string[];
17
+ requirement: string;
18
+ options?: { parentFeatureId?: string; issueRef?: string };
19
+ singleFeatureId?: string;
20
+ baseBranch?: string;
21
+ updatedAt: string;
22
+ }
23
+ \`\`\`
24
+
25
+ ## Your Investigation Process
26
+
27
+ 1. **Read plan.json** to understand the workflow type and feature list.
28
+ 2. **Check each feature directory** (\`.vibe/features/{featureId}/\`) for artifacts:
29
+ - \`spec.md\` — feature was planned
30
+ - \`design.md\` — design phase completed
31
+ - \`test-report.md\` — testing was done
32
+ - \`review.md\` — review was done (read it to check if verdict is APPROVED)
33
+ - \`pipeline.json\` — feature was in progress (check \`currentStep\` and \`status\`)
34
+ - \`status.json\` — may contain status information
35
+ 3. **Check git state** using \`execute_command\`:
36
+ - \`git branch --list 'feat/vibe-*'\` or similar patterns to see feature branches
37
+ - \`git log --oneline -20\` to see recent merge commits
38
+ - \`git branch --show-current\` for the current branch
39
+ 4. **Read config.json** for \`baseBranch\`.
40
+ 5. **Read requirements.md** first few lines for the \`requirement\` field.
41
+
42
+ ## Feature Completion Criteria
43
+
44
+ A feature is **completed** when:
45
+ - \`review.md\` exists AND contains "APPROVED" verdict
46
+ - AND the feature branch was merged (visible in git log or branch is gone)
47
+
48
+ A feature is **in-progress** when:
49
+ - \`pipeline.json\` exists, OR
50
+ - Some artifacts exist (design.md, test-report.md) but review.md is missing or not approved
51
+
52
+ A feature is **planned** when:
53
+ - Only \`spec.md\` exists (or no artifacts at all)
54
+
55
+ When in doubt, classify as **planned** rather than **completed**. This ensures the feature runs again on resume rather than being skipped.
56
+
57
+ ## Output
58
+
59
+ After investigation, output your proposed state as a single JSON code block:
60
+
61
+ \`\`\`json
62
+ {
63
+ "workflowType": "...",
64
+ "phase": "orchestrating",
65
+ "completedFeatures": [...],
66
+ "failedFeatures": [],
67
+ "skippedFeatures": [],
68
+ "requirement": "...",
69
+ "baseBranch": "...",
70
+ "updatedAt": "<current ISO timestamp>"
71
+ }
72
+ \`\`\`
73
+
74
+ ## Rules
75
+
76
+ - \`phase\` should almost always be \`"orchestrating"\` — recovery puts us back into feature execution.
77
+ - \`failedFeatures\` should be empty unless you find clear evidence of failure (e.g., status.json with \`"failed"\`).
78
+ - \`skippedFeatures\` should be empty unless you find clear evidence of skipping.
79
+ - Only include features in \`completedFeatures\` if you are confident they are fully done.
80
+ - Include a brief explanation before the JSON block explaining your reasoning for each feature's classification.
81
+ `;
82
+ //# sourceMappingURL=recover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recover.js","sourceRoot":"","sources":["../../src/roles/recover.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,MAAM,CAAC,MAAM,YAAY,GAAG,SAAkB,CAAC;AAE/C,4CAA4C;AAC5C,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EpC,CAAC","sourcesContent":["/** Role identifier for the recovery agent. */\nexport const RECOVER_ROLE = \"recover\" as const;\n\n/** System prompt for the recovery agent. */\nexport const RECOVER_SYSTEM_PROMPT = `# Recovery Agent\n\nYou are a recovery specialist for the Vibe orchestration system. Your task is to reconstruct a lost \\`orchestration-state.json\\` by analyzing surviving artifacts in the \\`.vibe/\\` directory.\n\n## OrchestrationState Structure\n\n\\`\\`\\`typescript\ninterface OrchestrationState {\n workflowType: \"new_feature\" | \"enhancement\" | \"bugfix\" | \"refactor\" | \"mixed\";\n phase: \"discovery\" | \"requirements_gate\" | \"system_architecture\" | \"system_design_gate\" | \"analyze\" | \"planning\" | \"plan_gate\" | \"orchestrating\" | \"single_pipeline\" | \"done\";\n completedFeatures: string[];\n failedFeatures: string[];\n skippedFeatures: string[];\n requirement: string;\n options?: { parentFeatureId?: string; issueRef?: string };\n singleFeatureId?: string;\n baseBranch?: string;\n updatedAt: string;\n}\n\\`\\`\\`\n\n## Your Investigation Process\n\n1. **Read plan.json** to understand the workflow type and feature list.\n2. **Check each feature directory** (\\`.vibe/features/{featureId}/\\`) for artifacts:\n - \\`spec.md\\` — feature was planned\n - \\`design.md\\` — design phase completed\n - \\`test-report.md\\` — testing was done\n - \\`review.md\\` — review was done (read it to check if verdict is APPROVED)\n - \\`pipeline.json\\` — feature was in progress (check \\`currentStep\\` and \\`status\\`)\n - \\`status.json\\` — may contain status information\n3. **Check git state** using \\`execute_command\\`:\n - \\`git branch --list 'feat/vibe-*'\\` or similar patterns to see feature branches\n - \\`git log --oneline -20\\` to see recent merge commits\n - \\`git branch --show-current\\` for the current branch\n4. **Read config.json** for \\`baseBranch\\`.\n5. **Read requirements.md** first few lines for the \\`requirement\\` field.\n\n## Feature Completion Criteria\n\nA feature is **completed** when:\n- \\`review.md\\` exists AND contains \"APPROVED\" verdict\n- AND the feature branch was merged (visible in git log or branch is gone)\n\nA feature is **in-progress** when:\n- \\`pipeline.json\\` exists, OR\n- Some artifacts exist (design.md, test-report.md) but review.md is missing or not approved\n\nA feature is **planned** when:\n- Only \\`spec.md\\` exists (or no artifacts at all)\n\nWhen in doubt, classify as **planned** rather than **completed**. This ensures the feature runs again on resume rather than being skipped.\n\n## Output\n\nAfter investigation, output your proposed state as a single JSON code block:\n\n\\`\\`\\`json\n{\n \"workflowType\": \"...\",\n \"phase\": \"orchestrating\",\n \"completedFeatures\": [...],\n \"failedFeatures\": [],\n \"skippedFeatures\": [],\n \"requirement\": \"...\",\n \"baseBranch\": \"...\",\n \"updatedAt\": \"<current ISO timestamp>\"\n}\n\\`\\`\\`\n\n## Rules\n\n- \\`phase\\` should almost always be \\`\"orchestrating\"\\` — recovery puts us back into feature execution.\n- \\`failedFeatures\\` should be empty unless you find clear evidence of failure (e.g., status.json with \\`\"failed\"\\`).\n- \\`skippedFeatures\\` should be empty unless you find clear evidence of skipping.\n- Only include features in \\`completedFeatures\\` if you are confident they are fully done.\n- Include a brief explanation before the JSON block explaining your reasoning for each feature's classification.\n`;\n"]}