@s_s/harmonia 1.2.0 → 1.4.0

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 (180) hide show
  1. package/README.md +140 -392
  2. package/build/cli/setup.d.ts +4 -2
  3. package/build/cli/setup.js +44 -18
  4. package/build/cli/setup.js.map +1 -1
  5. package/build/core/action-registry.d.ts +36 -0
  6. package/build/core/action-registry.js +53 -0
  7. package/build/core/action-registry.js.map +1 -0
  8. package/build/core/artifacts.d.ts +66 -0
  9. package/build/core/artifacts.js +178 -0
  10. package/build/core/artifacts.js.map +1 -0
  11. package/build/core/dispatch.d.ts +18 -11
  12. package/build/core/dispatch.js +43 -33
  13. package/build/core/dispatch.js.map +1 -1
  14. package/build/core/issues.d.ts +37 -0
  15. package/build/core/issues.js +100 -0
  16. package/build/core/issues.js.map +1 -0
  17. package/build/core/overrides.d.ts +19 -26
  18. package/build/core/overrides.js +32 -98
  19. package/build/core/overrides.js.map +1 -1
  20. package/build/core/plugin.d.ts +86 -0
  21. package/build/core/plugin.js +332 -0
  22. package/build/core/plugin.js.map +1 -0
  23. package/build/core/registry.d.ts +36 -3
  24. package/build/core/registry.js +63 -5
  25. package/build/core/registry.js.map +1 -1
  26. package/build/core/reviews.d.ts +13 -13
  27. package/build/core/reviews.js +31 -32
  28. package/build/core/reviews.js.map +1 -1
  29. package/build/core/schema.d.ts +43 -15
  30. package/build/core/schema.js +124 -20
  31. package/build/core/schema.js.map +1 -1
  32. package/build/core/state.d.ts +29 -22
  33. package/build/core/state.js +49 -81
  34. package/build/core/state.js.map +1 -1
  35. package/build/core/steps.d.ts +15 -15
  36. package/build/core/steps.js +32 -33
  37. package/build/core/steps.js.map +1 -1
  38. package/build/core/tree-utils.d.ts +52 -0
  39. package/build/core/tree-utils.js +226 -0
  40. package/build/core/tree-utils.js.map +1 -0
  41. package/build/core/types.d.ts +417 -117
  42. package/build/core/types.js +15 -1
  43. package/build/core/types.js.map +1 -1
  44. package/build/core/workflow-engine.d.ts +68 -0
  45. package/build/core/workflow-engine.js +821 -0
  46. package/build/core/workflow-engine.js.map +1 -0
  47. package/build/core/workflow-validator.d.ts +22 -0
  48. package/build/core/workflow-validator.js +489 -0
  49. package/build/core/workflow-validator.js.map +1 -0
  50. package/build/index.js +28 -25
  51. package/build/index.js.map +1 -1
  52. package/build/setup/inject.d.ts +4 -4
  53. package/build/setup/inject.js +6 -6
  54. package/build/setup/inject.js.map +1 -1
  55. package/build/setup/templates.d.ts +9 -7
  56. package/build/setup/templates.js +68 -103
  57. package/build/setup/templates.js.map +1 -1
  58. package/build/tools/artifact-approve.d.ts +8 -0
  59. package/build/tools/artifact-approve.js +94 -0
  60. package/build/tools/artifact-approve.js.map +1 -0
  61. package/build/tools/artifact-schema.d.ts +12 -0
  62. package/build/tools/artifact-schema.js +148 -0
  63. package/build/tools/artifact-schema.js.map +1 -0
  64. package/build/tools/artifact-tools.d.ts +18 -0
  65. package/build/tools/artifact-tools.js +465 -0
  66. package/build/tools/artifact-tools.js.map +1 -0
  67. package/build/tools/{report-dispatch.d.ts → dispatch-report.d.ts} +7 -3
  68. package/build/tools/dispatch-report.js +261 -0
  69. package/build/tools/dispatch-report.js.map +1 -0
  70. package/build/tools/engine-helpers.d.ts +41 -0
  71. package/build/tools/engine-helpers.js +182 -0
  72. package/build/tools/engine-helpers.js.map +1 -0
  73. package/build/tools/get-project-status.d.ts +6 -4
  74. package/build/tools/get-project-status.js +308 -246
  75. package/build/tools/get-project-status.js.map +1 -1
  76. package/build/tools/get-role-prompt.d.ts +1 -1
  77. package/build/tools/get-role-prompt.js +7 -41
  78. package/build/tools/get-role-prompt.js.map +1 -1
  79. package/build/tools/issue-tools.d.ts +10 -0
  80. package/build/tools/issue-tools.js +169 -0
  81. package/build/tools/issue-tools.js.map +1 -0
  82. package/build/tools/iteration-start.d.ts +7 -4
  83. package/build/tools/iteration-start.js +51 -20
  84. package/build/tools/iteration-start.js.map +1 -1
  85. package/build/tools/loop-done.d.ts +11 -0
  86. package/build/tools/loop-done.js +109 -0
  87. package/build/tools/loop-done.js.map +1 -0
  88. package/build/tools/patch-start.d.ts +16 -0
  89. package/build/tools/patch-start.js +122 -0
  90. package/build/tools/patch-start.js.map +1 -0
  91. package/build/tools/project-init.d.ts +5 -5
  92. package/build/tools/project-init.js +47 -18
  93. package/build/tools/project-init.js.map +1 -1
  94. package/build/tools/role-dispatch.d.ts +55 -0
  95. package/build/tools/role-dispatch.js +508 -0
  96. package/build/tools/role-dispatch.js.map +1 -0
  97. package/build/tools/utils.d.ts +40 -0
  98. package/build/tools/utils.js +97 -0
  99. package/build/tools/utils.js.map +1 -0
  100. package/package.json +1 -1
  101. package/{build/hooks/claude-code.js → workflows/dev/hooks/claude.js} +34 -23
  102. package/{build → workflows/dev}/hooks/content.js +27 -18
  103. package/workflows/dev/hooks/index.js +52 -0
  104. package/{build → workflows/dev}/hooks/openclaw.js +31 -20
  105. package/{build → workflows/dev}/hooks/opencode.js +31 -20
  106. package/workflows/dev/roles/architect.md +68 -28
  107. package/workflows/dev/roles/coordinator.md +103 -0
  108. package/workflows/dev/roles/developer.md +5 -5
  109. package/workflows/dev/roles/tester.md +19 -19
  110. package/workflows/dev/schemas/api-contract.json +42 -0
  111. package/workflows/dev/schemas/api-design.json +30 -13
  112. package/workflows/dev/schemas/data-model.json +20 -7
  113. package/workflows/dev/schemas/prd.completeness-check.json +6 -5
  114. package/workflows/dev/schemas/prd.draft.json +13 -5
  115. package/workflows/dev/schemas/prd.final.json +34 -11
  116. package/workflows/dev/schemas/prd.json +29 -11
  117. package/workflows/dev/schemas/prd.requirements.json +6 -5
  118. package/workflows/dev/schemas/prototype.json +6 -2
  119. package/workflows/dev/schemas/task-breakdown.coarse.json +4 -3
  120. package/workflows/dev/schemas/task-breakdown.dependencies.json +5 -4
  121. package/workflows/dev/schemas/task-breakdown.detailed.json +8 -3
  122. package/workflows/dev/schemas/task-breakdown.final.json +8 -3
  123. package/workflows/dev/schemas/task-breakdown.json +8 -3
  124. package/workflows/dev/schemas/tech-design.analysis.json +6 -5
  125. package/workflows/dev/schemas/tech-design.draft.json +14 -5
  126. package/workflows/dev/schemas/tech-design.final.json +39 -13
  127. package/workflows/dev/schemas/tech-design.json +34 -13
  128. package/workflows/dev/schemas/tech-design.research.json +21 -0
  129. package/workflows/dev/schemas/test-plan.json +17 -7
  130. package/workflows/dev/schemas/test-report.json +26 -9
  131. package/workflows/dev/schemas/user-stories.json +7 -3
  132. package/workflows/dev/tools/index.js +23 -0
  133. package/workflows/dev/workflow.json +234 -101
  134. package/build/core/docs.d.ts +0 -32
  135. package/build/core/docs.js +0 -91
  136. package/build/core/docs.js.map +0 -1
  137. package/build/core/workflow.d.ts +0 -33
  138. package/build/core/workflow.js +0 -140
  139. package/build/core/workflow.js.map +0 -1
  140. package/build/hooks/claude-code.d.ts +0 -20
  141. package/build/hooks/claude-code.js.map +0 -1
  142. package/build/hooks/content.d.ts +0 -43
  143. package/build/hooks/content.js.map +0 -1
  144. package/build/hooks/install.d.ts +0 -40
  145. package/build/hooks/install.js +0 -63
  146. package/build/hooks/install.js.map +0 -1
  147. package/build/hooks/openclaw.d.ts +0 -24
  148. package/build/hooks/openclaw.js.map +0 -1
  149. package/build/hooks/opencode.d.ts +0 -29
  150. package/build/hooks/opencode.js.map +0 -1
  151. package/build/tools/approve-doc.d.ts +0 -6
  152. package/build/tools/approve-doc.js +0 -108
  153. package/build/tools/approve-doc.js.map +0 -1
  154. package/build/tools/dispatch-role.d.ts +0 -16
  155. package/build/tools/dispatch-role.js +0 -277
  156. package/build/tools/dispatch-role.js.map +0 -1
  157. package/build/tools/doc-tools.d.ts +0 -16
  158. package/build/tools/doc-tools.js +0 -389
  159. package/build/tools/doc-tools.js.map +0 -1
  160. package/build/tools/override-tools.d.ts +0 -6
  161. package/build/tools/override-tools.js +0 -129
  162. package/build/tools/override-tools.js.map +0 -1
  163. package/build/tools/report-dispatch.js +0 -194
  164. package/build/tools/report-dispatch.js.map +0 -1
  165. package/build/tools/set-scale.d.ts +0 -6
  166. package/build/tools/set-scale.js +0 -107
  167. package/build/tools/set-scale.js.map +0 -1
  168. package/build/tools/setup-project.d.ts +0 -8
  169. package/build/tools/setup-project.js +0 -116
  170. package/build/tools/setup-project.js.map +0 -1
  171. package/build/tools/update-phase.d.ts +0 -12
  172. package/build/tools/update-phase.js +0 -159
  173. package/build/tools/update-phase.js.map +0 -1
  174. package/workflows/dev/roles/pm.md +0 -99
  175. package/workflows/dev/schemas/deploy.json +0 -20
  176. package/workflows/dev/schemas/fsd.json +0 -25
  177. package/workflows/dev/schemas/project-plan.json +0 -20
  178. package/workflows/dev/schemas/retrospective.json +0 -20
  179. package/workflows/dev/schemas/risk-assessment.json +0 -15
  180. package/workflows/dev/schemas/tech-design.api-contract.json +0 -20
package/build/index.js CHANGED
@@ -10,11 +10,9 @@
10
10
  * Project source directories contain code only — no Harmonia artifacts.
11
11
  */
12
12
  import { fileURLToPath } from 'node:url';
13
- import { dirname, join, resolve } from 'node:path';
13
+ import { dirname, join } from 'node:path';
14
14
  const __filename = fileURLToPath(import.meta.url);
15
15
  const __dirname = dirname(__filename);
16
- // Built-in workflows directory (package root, sibling to build/)
17
- const BUILTIN_WORKFLOWS_DIR = resolve(join(__dirname, '..', 'workflows'));
18
16
  const subcommand = process.argv[2];
19
17
  if (subcommand === 'setup') {
20
18
  // CLI mode — human-facing project setup
@@ -57,7 +55,7 @@ Harmonia — Multi-agent orchestration MCP server
57
55
 
58
56
  Usage:
59
57
  harmonia Start MCP stdio server
60
- harmonia setup Inject PM prompt + install hooks in current directory
58
+ harmonia setup Inject coordinator prompt + install hooks in current directory
61
59
  harmonia unregister <name> Remove project from registry and delete data (default)
62
60
  harmonia unregister <name> --keep-data Remove from registry but keep data files
63
61
  harmonia --help Show this help message
@@ -83,38 +81,43 @@ else if (subcommand === '--version' || subcommand === '-v') {
83
81
  }
84
82
  else {
85
83
  // Default: MCP stdio server mode
84
+ const { readFile } = await import('node:fs/promises');
86
85
  const { McpServer } = await import('@modelcontextprotocol/sdk/server/mcp.js');
87
86
  const { StdioServerTransport } = await import('@modelcontextprotocol/sdk/server/stdio.js');
88
87
  const { getGlobalDir } = await import('./core/registry.js');
89
88
  const { registerProjectInit } = await import('./tools/project-init.js');
90
89
  const { registerIterationStart } = await import('./tools/iteration-start.js');
91
- const { registerSetScale } = await import('./tools/set-scale.js');
92
90
  const { registerGetRolePrompt } = await import('./tools/get-role-prompt.js');
93
- const { registerUpdatePhase } = await import('./tools/update-phase.js');
94
- const { registerDocTools } = await import('./tools/doc-tools.js');
91
+ const { registerArtifactTools } = await import('./tools/artifact-tools.js');
95
92
  const { registerGetProjectStatus } = await import('./tools/get-project-status.js');
96
- const { registerApproveDoc } = await import('./tools/approve-doc.js');
97
- const { registerOverrideTools } = await import('./tools/override-tools.js');
98
- const { registerDispatchRole } = await import('./tools/dispatch-role.js');
99
- const { registerReportDispatch } = await import('./tools/report-dispatch.js');
100
- // Custom workflows directory: <data_dir>/.workflows
101
- const CUSTOM_WORKFLOWS_DIR = join(getGlobalDir(), '.workflows');
93
+ const { registerApproveArtifact } = await import('./tools/artifact-approve.js');
94
+ const { registerDispatchRole } = await import('./tools/role-dispatch.js');
95
+ const { registerReportDispatch } = await import('./tools/dispatch-report.js');
96
+ const { registerPatchStart } = await import('./tools/patch-start.js');
97
+ const { registerIssueTools } = await import('./tools/issue-tools.js');
98
+ const { registerArtifactSchema } = await import('./tools/artifact-schema.js');
99
+ const { registerLoopDone } = await import('./tools/loop-done.js');
100
+ // Read version from package.json (single source of truth)
101
+ const pkg = JSON.parse(await readFile(join(__dirname, '..', 'package.json'), 'utf-8'));
102
+ // Workflows directory: <data_dir>/harmonia/.workflows
103
+ const WORKFLOWS_DIR = join(getGlobalDir(), '.workflows');
102
104
  const server = new McpServer({
103
105
  name: 'harmonia',
104
- version: '0.1.0',
106
+ version: pkg.version,
105
107
  });
106
108
  // Register all tools
107
- registerProjectInit(server, BUILTIN_WORKFLOWS_DIR, CUSTOM_WORKFLOWS_DIR);
108
- registerIterationStart(server, BUILTIN_WORKFLOWS_DIR, CUSTOM_WORKFLOWS_DIR);
109
- registerSetScale(server, BUILTIN_WORKFLOWS_DIR, CUSTOM_WORKFLOWS_DIR);
110
- registerGetRolePrompt(server, BUILTIN_WORKFLOWS_DIR, CUSTOM_WORKFLOWS_DIR);
111
- registerUpdatePhase(server, BUILTIN_WORKFLOWS_DIR, CUSTOM_WORKFLOWS_DIR);
112
- registerDocTools(server, BUILTIN_WORKFLOWS_DIR, CUSTOM_WORKFLOWS_DIR);
113
- registerGetProjectStatus(server, BUILTIN_WORKFLOWS_DIR, CUSTOM_WORKFLOWS_DIR);
114
- registerApproveDoc(server);
115
- registerOverrideTools(server);
116
- registerDispatchRole(server, BUILTIN_WORKFLOWS_DIR, CUSTOM_WORKFLOWS_DIR);
117
- registerReportDispatch(server, BUILTIN_WORKFLOWS_DIR, CUSTOM_WORKFLOWS_DIR);
109
+ registerProjectInit(server, WORKFLOWS_DIR);
110
+ registerIterationStart(server, WORKFLOWS_DIR);
111
+ registerGetRolePrompt(server, WORKFLOWS_DIR);
112
+ registerArtifactTools(server, WORKFLOWS_DIR);
113
+ registerGetProjectStatus(server, WORKFLOWS_DIR);
114
+ registerApproveArtifact(server, WORKFLOWS_DIR);
115
+ registerDispatchRole(server, WORKFLOWS_DIR);
116
+ registerReportDispatch(server, WORKFLOWS_DIR);
117
+ registerPatchStart(server, WORKFLOWS_DIR);
118
+ registerIssueTools(server);
119
+ registerArtifactSchema(server, WORKFLOWS_DIR);
120
+ registerLoopDone(server, WORKFLOWS_DIR);
118
121
  // Connect via stdio
119
122
  const transport = new StdioServerTransport();
120
123
  await server.connect(transport);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,O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M,EAAE,aAAa,CAAC,CAAC;IAC1C,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC3B,sBAAsB,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC9C,gBAAgB,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAExC,oBAAoB;IACpB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AACpC,CAAC"}
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Setup injection — detect host agent type and inject PM guidance into config.
2
+ * Setup injection — detect host agent type and inject coordinator guidance into config.
3
3
  *
4
4
  * Delegates to @s_s/agent-kit for agent detection, prompt injection, and
5
5
  * marker management. Harmonia provides the prompt content via templates.ts.
6
6
  *
7
- * Always uses global scope — PM prompt is project-agnostic and should be
7
+ * Always uses global scope — coordinator prompt is project-agnostic and should be
8
8
  * written to the agent's global config directory (e.g. ~/.openclaw/workspace/AGENTS.md).
9
9
  */
10
10
  import { type AgentType } from '@s_s/agent-kit';
@@ -20,11 +20,11 @@ export declare const HARMONIA_MARKER_END = "<!-- harmonia:end -->";
20
20
  */
21
21
  export declare function detectHostAgent(projectDir: string): Promise<AgentType>;
22
22
  /**
23
- * Inject the Harmonia PM guidance block into the agent's **global** config file.
23
+ * Inject the Harmonia coordinator guidance block into the agent's **global** config file.
24
24
  * If a harmonia block already exists, it is replaced (idempotent).
25
25
  * If the file doesn't exist, it is created.
26
26
  *
27
- * Uses global scope because PM prompt is project-agnostic.
27
+ * Uses global scope because coordinator prompt is project-agnostic.
28
28
  * This writes to the agent's global config directory:
29
29
  * - opencode: ~/.config/opencode/AGENTS.md
30
30
  * - claude-code: ~/.claude/CLAUDE.md
@@ -1,15 +1,15 @@
1
1
  /**
2
- * Setup injection — detect host agent type and inject PM guidance into config.
2
+ * Setup injection — detect host agent type and inject coordinator guidance into config.
3
3
  *
4
4
  * Delegates to @s_s/agent-kit for agent detection, prompt injection, and
5
5
  * marker management. Harmonia provides the prompt content via templates.ts.
6
6
  *
7
- * Always uses global scope — PM prompt is project-agnostic and should be
7
+ * Always uses global scope — coordinator prompt is project-agnostic and should be
8
8
  * written to the agent's global config directory (e.g. ~/.openclaw/workspace/AGENTS.md).
9
9
  */
10
10
  import { createKit, detectAgent } from '@s_s/agent-kit';
11
11
  import { readFile } from 'node:fs/promises';
12
- import { generatePmPrompt } from './templates.js';
12
+ import { generateCoordinatorPrompt } from './templates.js';
13
13
  /** Shared kit instance — binds all marker tags to "harmonia" */
14
14
  const kit = createKit('harmonia');
15
15
  /** Marker constants for external use (tests, etc.) */
@@ -27,11 +27,11 @@ export async function detectHostAgent(projectDir) {
27
27
  return detected ?? 'opencode';
28
28
  }
29
29
  /**
30
- * Inject the Harmonia PM guidance block into the agent's **global** config file.
30
+ * Inject the Harmonia coordinator guidance block into the agent's **global** config file.
31
31
  * If a harmonia block already exists, it is replaced (idempotent).
32
32
  * If the file doesn't exist, it is created.
33
33
  *
34
- * Uses global scope because PM prompt is project-agnostic.
34
+ * Uses global scope because coordinator prompt is project-agnostic.
35
35
  * This writes to the agent's global config directory:
36
36
  * - opencode: ~/.config/opencode/AGENTS.md
37
37
  * - claude-code: ~/.claude/CLAUDE.md
@@ -39,7 +39,7 @@ export async function detectHostAgent(projectDir) {
39
39
  * - codex: ~/.codex/AGENTS.md
40
40
  */
41
41
  export async function injectPrompt(agentType) {
42
- const prompt = generatePmPrompt();
42
+ const prompt = generateCoordinatorPrompt();
43
43
  const globalScope = { scope: 'global' };
44
44
  // Check pre-existing state for return value
45
45
  const hasExisting = await kit.hasPromptInjected(agentType, globalScope);
@@ -1 +1 @@
1
- {"version":3,"file":"inject.js","sourceRoot":"","sources":["../../src/setup/inject.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAkB,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,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;IACxE,MAAM,GAAG,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;IAEvD,OAAO;QACH,QAAQ;QACR,OAAO,EAAE,CAAC,UAAU;QACpB,QAAQ,EAAE,WAAW;KACxB,CAAC;AACN,CAAC"}
@@ -1,17 +1,19 @@
1
1
  /**
2
- * PM guidance prompt template.
2
+ * Coordinator guidance prompt template.
3
3
  *
4
- * This template is injected into the project's agent config file to guide the
5
- * host agent to act as the PM role in a Harmonia-managed project.
4
+ * This template is injected into the agent's global config file to guide the
5
+ * host agent to act as the coordinator role in a Harmonia-managed project.
6
6
  * The target file (AGENTS.md / CLAUDE.md) is determined by @s_s/agent-kit.
7
7
  *
8
- * The prompt is project-agnostic — no project name, directory, or scale.
9
- * PM discovers project info at runtime via project_status.
8
+ * IMPORTANT: This prompt is GENERIC — no workflow-specific operations manual.
9
+ * Workflow-specific guidance (phases, document types, role names) is provided
10
+ * by the workflow plugin's coordinator.md role prompt, delivered via nextAction
11
+ * at runtime.
10
12
  */
11
13
  /**
12
- * Generate the PM guidance prompt content.
14
+ * Generate the coordinator guidance prompt content.
13
15
  *
14
16
  * Returns raw prompt content WITHOUT marker tags — markers are managed
15
17
  * by @s_s/agent-kit's injectPrompt (<!-- harmonia:start/end -->).
16
18
  */
17
- export declare function generatePmPrompt(): string;
19
+ export declare function generateCoordinatorPrompt(): string;
@@ -1,167 +1,132 @@
1
1
  /**
2
- * PM guidance prompt template.
2
+ * Coordinator guidance prompt template.
3
3
  *
4
- * This template is injected into the project's agent config file to guide the
5
- * host agent to act as the PM role in a Harmonia-managed project.
4
+ * This template is injected into the agent's global config file to guide the
5
+ * host agent to act as the coordinator role in a Harmonia-managed project.
6
6
  * The target file (AGENTS.md / CLAUDE.md) is determined by @s_s/agent-kit.
7
7
  *
8
- * The prompt is project-agnostic — no project name, directory, or scale.
9
- * PM discovers project info at runtime via project_status.
8
+ * IMPORTANT: This prompt is GENERIC — no workflow-specific operations manual.
9
+ * Workflow-specific guidance (phases, document types, role names) is provided
10
+ * by the workflow plugin's coordinator.md role prompt, delivered via nextAction
11
+ * at runtime.
10
12
  */
11
13
  /**
12
- * Generate the PM guidance prompt content.
14
+ * Generate the coordinator guidance prompt content.
13
15
  *
14
16
  * Returns raw prompt content WITHOUT marker tags — markers are managed
15
17
  * by @s_s/agent-kit's injectPrompt (<!-- harmonia:start/end -->).
16
18
  */
17
- export function generatePmPrompt() {
18
- return `## Harmonia — Project Manager Mode
19
+ export function generateCoordinatorPrompt() {
20
+ return `## Harmonia — Project Coordinator Mode
19
21
 
20
- You are the **PM (Project Manager)** for a Harmonia-managed project.
21
- Harmonia is managing the project workflow. You are the central coordinator — the only role that talks directly to the user.
22
+ You are the **Coordinator** for a Harmonia-managed project.
23
+ Harmonia is a multi-agent collaboration framework. You are the central coordinator — the only role that talks directly to the user.
22
24
 
23
25
  ### Getting Started
24
26
 
25
27
  1. **Check for existing projects**: Call \`project_status()\` (no params) to list registered projects
26
28
  2. **If resuming**: Call \`project_status(project_name)\` to see current state and next steps
27
29
  3. **If new project**: Talk to user, then call \`project_init(project_name, project_dir)\` to register, followed by \`iteration_start(project_name)\` to begin the first iteration
28
- 4. **If starting a new iteration on an existing project**: Call \`iteration_start(project_name)\` — this creates a fresh iteration with clean phases and documents
29
- 5. **After PRD approved**: Call \`project_set_scale(project_name, scale)\` to set project scale
30
+ 4. **If starting a new iteration on an existing project**: Call \`iteration_start(project_name)\` — this creates a fresh iteration with clean state and artifacts
30
31
 
31
- ### Project Init vs Iteration Start
32
+ ### Core Concepts
32
33
 
33
- - **\`project_init\`** — One-time registration. Creates the project entry in the registry. Does NOT create any iteration data.
34
- - **\`iteration_start\`** — Creates a new iteration (iter-1, iter-2, ...) with fresh state, phases, and docs directory. Must be called after \`project_init\` before any other tools will work.
35
- - For existing projects that have completed all phases, \`project_status\` will suggest calling \`iteration_start\` to begin the next iteration.
34
+ - **\`project_init\`** — One-time registration. Creates the project entry in the global registry.
35
+ - **\`iteration_start\`** — Creates a new iteration (iter-1, iter-2, ...) with fresh workflow state. Must be called after \`project_init\`.
36
+ - **\`patch_start\`** Creates a lightweight patch cycle for bug fixes (patch-1, patch-2, ...).
36
37
 
37
38
  ### Your Responsibilities
38
39
 
39
- 1. **Communicate with the user** — clarify requirements, present documents for review, report progress
40
- 2. **Drive the workflow** — advance phases, produce documents, dispatch tasks to team members
40
+ 1. **Communicate with the user** — clarify requirements, present artifacts for review, report progress
41
+ 2. **Drive the workflow** — follow nextAction guidance, produce artifacts, dispatch tasks
41
42
  3. **Coordinate the team** — dispatch roles, track sessions and dispatch progress, manage outputs
42
- 4. **Ensure quality** — review documents, handle review cycles, verify deliverables
43
+ 4. **Ensure quality** — review artifacts, handle review cycles, verify deliverables
43
44
 
44
- ### Workflow Guide
45
+ ### nextAction — Your Workflow Guide
45
46
 
46
- #### Phase 1: Requirements Clarification (\`clarify\`)
47
+ Every Harmonia tool returns a \`nextAction\` field that tells you exactly what to do next:
48
+ - **type: "dispatch"** — dispatch a role to execute a task node
49
+ - **type: "write_artifact"** — write an artifact document
50
+ - **type: "approve_artifact"** — present an artifact for user approval
51
+ - **type: "wait"** — wait for a running dispatch to complete
52
+ - **type: "completed"** — workflow is finished
53
+ - **type: "failed"** — workflow has failed (check instructions for details)
47
54
 
48
- 1. Talk to the user to understand their needs
49
- 2. Write the PRD: \`doc_write(project_name, "prd", content)\`
50
- 3. Write user stories: \`doc_write(project_name, "user-stories", content)\`
51
- 4. Handle review cycles — when \`doc_write\` returns "REVIEW REQUIRED", present the document to the user and wait for confirmation
52
- 5. After PRD is approved, evaluate the project scale and call \`project_set_scale(project_name, scale)\`
53
- 6. Based on scale, write additional documents if needed (FSD, prototype, project plan for medium/large)
54
- 7. After all clarify-phase documents are approved, advance: \`phase_update(project_name, "clarify", "completed")\`
55
+ Always follow the \`instructions\` in nextAction. The workflow engine determines the correct next step based on the workflow definition and current state.
55
56
 
56
- #### Phase 2: Design (\`design\`)
57
+ ### Artifact Management
57
58
 
58
- 1. Dispatch the architect: \`role_dispatch(project_name, "architect", task_brief)\`
59
- 2. Follow the dispatch workflow (see below) to launch and track the architect
60
- 3. The architect will produce: tech-design, task-breakdown (and optionally: data-model, api-design, risk-assessment)
61
- 4. Review the architect's output, ask user for feedback if needed
62
- 5. Advance: \`phase_update(project_name, "design", "completed")\`
59
+ Before writing any artifact, call \`artifact_schema(project_name, artifact_id)\` to query the structure requirements. For step-based artifacts, query individual steps: \`artifact_schema(project_name, artifact_id, step)\`.
63
60
 
64
- #### Phase 3: Development (\`develop\`)
65
-
66
- 1. Read the task breakdown: \`doc_read(project_name, "task-breakdown")\`
67
- 2. Dispatch developers for each task (or batch): \`role_dispatch(project_name, "developer", task_brief)\`
68
- 3. Developers can work in parallel if tasks are independent — each gets their own dispatch and session
69
- 4. Track progress with \`project_status\` it shows all active sessions and dispatch records
70
- 5. Advance when all tasks are complete: \`phase_update(project_name, "develop", "completed")\`
71
-
72
- #### Phase 4: Testing (\`test\`)
73
-
74
- 1. Dispatch the tester: \`role_dispatch(project_name, "tester", task_brief)\`
75
- 2. Follow the dispatch workflow to launch and track the tester
76
- 3. Tester writes test plan, executes tests, produces test report
77
- 4. If bugs are found, coordinate fixes with developers (re-dispatch as needed)
78
- 5. Advance: \`phase_update(project_name, "test", "completed")\`
79
-
80
- #### Phase 5: Delivery (\`deliver\`)
81
-
82
- 1. Review all deliverables against user stories and acceptance criteria
83
- 2. Present final results to the user
84
- 3. Write retrospective: \`doc_write(project_name, "retrospective", content)\`
85
- 4. Advance: \`phase_update(project_name, "deliver", "completed")\`
61
+ When \`artifact_write\` returns "REVIEW REQUIRED":
62
+ 1. Present the full artifact to the user
63
+ 2. Ask if they approve or want changes
64
+ 3. If approved call \`artifact_approve(project_name, artifact_id, true)\`
65
+ 4. If changes needed revise and call \`artifact_write\` again
66
+ 5. **Never skip review.** Unapproved artifacts block workflow progress.
86
67
 
87
68
  ### Dispatch Workflow (Critical — follow every time)
88
69
 
89
- Dispatching a team member follows three steps:
90
-
91
70
  #### Step 1: Dispatch
92
71
  \`\`\`
93
72
  role_dispatch(project_name, role, task_brief)
94
- → Returns: data package + dispatch_id + session guidance
73
+ → Returns: data package + dispatch_id + session guidance + rolePrompt
95
74
  \`\`\`
96
- Harmonia automatically:
97
- - Creates a dispatch record for tracking
98
- - Checks for reusable idle sessions and tells you whether to resume or launch new
99
75
 
100
76
  #### Step 2: Launch & Report
101
- Launch the agent based on the session guidance:
102
- - **If reusable session found**: Resume the existing agent session (use the agent session ID provided)
103
- - **If no reusable session**: Launch a new agent
104
-
77
+ Launch the agent with the rolePrompt as system instructions.
105
78
  After launching, immediately report:
106
79
  \`\`\`
107
- dispatch_report(project_name, dispatch_id, agent_session_id="<id from agent>", agent_type="opencode")
80
+ dispatch_report(project_name, dispatch_id, agent_session_id="<id>", agent_type="opencode")
108
81
  \`\`\`
109
- This registers the session and marks the dispatch as running.
110
82
 
111
83
  #### Step 3: Completion
112
- When the agent finishes (process exits or session ends):
84
+ When the agent finishes:
113
85
  \`\`\`
114
86
  dispatch_report(project_name, dispatch_id, status="completed")
115
87
  \`\`\`
116
- Or if it failed:
117
- \`\`\`
118
- dispatch_report(project_name, dispatch_id, status="failed", note="reason")
119
- \`\`\`
120
- Then check: \`project_status\` to verify outputs and determine next steps.
88
+ Or if failed: \`dispatch_report(project_name, dispatch_id, status="failed", note="reason")\`
89
+ Then check \`project_status\` for next steps.
121
90
 
122
91
  ### Launching Agents
123
92
 
124
- #### If you are an OpenClaw agent (sessions_spawn)
125
- Use \`sessions_spawn\` to launch a sub-agent. The sub-agent automatically shares the gateway-level MCP configuration, so it can use all Harmonia tools (doc_write, doc_read, etc.) without additional setup.
126
-
93
+ #### OpenClaw (sessions_spawn)
127
94
  \`\`\`
128
95
  sessions_spawn with:
129
- - system prompt = the role prompt from role_dispatch
96
+ - system prompt = the rolePrompt from role_dispatch
130
97
  - task = the task brief
131
- - The sub-agent has access to all configured MCP servers including Harmonia
98
+ - Sub-agent has access to all configured MCP servers including Harmonia
132
99
  \`\`\`
133
100
 
134
- #### For other agents (shell exec)
135
- Launch the agent via shell command (\`exec\`). You need to:
136
- 1. Start the agent process with the role prompt as system instructions
137
- 2. Pass the task brief and input documents as the initial message
101
+ #### Other agents (shell exec)
102
+ 1. Start the agent process with rolePrompt as system instructions
103
+ 2. Pass the task brief and input artifacts as the initial message
138
104
  3. Wait for the process to exit
139
105
 
140
- ### Session Recovery (after interruption)
106
+ ### Session Recovery
141
107
 
142
- If you were interrupted or are resuming from a previous session:
108
+ If resuming from a previous session:
109
+ 1. Call \`project_status()\` — shows workflow tree, active sessions, dispatch records, pending reviews
110
+ 2. Check dispatch records — any "running" dispatches may need verification
111
+ 3. Check sessions — "active" may still be running; "idle" can be reused; "lost" need re-dispatch
112
+ 4. Follow the next steps suggested by \`project_status\`
143
113
 
144
- 1. **Start with** \`project_status()\` — it shows everything: phases, active sessions, dispatch records, pending reviews
145
- 2. **Check dispatch records** — any "running" dispatches may need verification (did the agent finish?)
146
- 3. **Check sessions** — "active" sessions may have agents still running; "idle" sessions can be reused; "lost" sessions need re-dispatch
147
- 4. **Follow the next steps** suggested by \`project_status\`
114
+ ### Available Tools
148
115
 
149
- ### Document Review Flow
150
-
151
- Some documents require user approval (PRD, prototype by default).
152
- When \`doc_write\` returns "REVIEW REQUIRED":
153
-
154
- 1. Present the full document to the user
155
- 2. Ask if they approve or want changes
156
- 3. If approved → call \`doc_approve(project_name, doc_id, true)\`
157
- 4. If changes needed → revise and call \`doc_write\` again
158
- 5. **Never skip review.** Unapproved documents must not be used as input for subsequent phases.
116
+ - \`project_init\` / \`project_status\` — project lifecycle
117
+ - \`iteration_start\` / \`patch_start\` — start iteration or patch
118
+ - \`role_dispatch\` / \`dispatch_report\` dispatch and track team members
119
+ - \`artifact_write\` / \`artifact_read\` / \`artifact_list\` — manage artifacts
120
+ - \`artifact_approve\` / \`review_list\` — artifact review
121
+ - \`artifact_schema\` / \`role_prompt\` query schemas and role prompts
122
+ - \`issue_create\` / \`issue_list\` / \`issue_update\` issue tracking
159
123
 
160
124
  ### Important Rules
161
125
 
162
- 1. **Always check status first** — start each session with \`project_status()\` to understand where you are
163
- 2. **Always report dispatch lifecycle** — dispatch report launch report completion. Never skip dispatch_report.
164
- 3. **You are the coordinator, not the executor** — dispatch technical work to the appropriate roles (architect, developer, tester). Harmonia enforces this via hooks and guards.
165
- 4. **Always check scale** use \`project_status(project_name)\` to check scale before deciding which documents to produce`;
126
+ 1. **Always check status first** — start each session with \`project_status()\`
127
+ 2. **Always follow nextAction** — the workflow engine knows the correct next step
128
+ 3. **Always report dispatch lifecycle** — dispatch report launch report completion
129
+ 4. **You are the coordinator, not the executor** dispatch technical work to the appropriate roles
130
+ 5. **Cross-context access**: Use \`artifact_read(project_name, id, context="iter-1")\` to read artifacts from other iterations or patches`;
166
131
  }
167
132
  //# sourceMappingURL=templates.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/setup/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB;IAC5B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2HAmJgH,CAAC;AAC5H,CAAC"}
1
+ {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/setup/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB;IACrC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0IA8G+H,CAAC;AAC3I,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * MCP Tool: artifact_approve / review_list
3
+ * Approve or reject an artifact that is pending review.
4
+ *
5
+ * After approval, triggers engine event `artifact_approved` to evaluate gates.
6
+ */
7
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
8
+ export declare function registerApproveArtifact(server: McpServer, workflowsDir: string): void;
@@ -0,0 +1,94 @@
1
+ /**
2
+ * MCP Tool: artifact_approve / review_list
3
+ * Approve or reject an artifact that is pending review.
4
+ *
5
+ * After approval, triggers engine event `artifact_approved` to evaluate gates.
6
+ */
7
+ import { z } from 'zod';
8
+ import { resolveReview, getPendingReviews } from '../core/reviews.js';
9
+ import { resolveActive, isError } from './utils.js';
10
+ import { processWorkflowEvent, formatNextAction } from './engine-helpers.js';
11
+ export function registerApproveArtifact(server, workflowsDir) {
12
+ server.tool('artifact_approve', 'Approve or reject an artifact pending review. Call this after the user has reviewed the artifact and confirmed (or requested changes).', {
13
+ project_name: z.string().describe('Project name'),
14
+ artifact_id: z.string().describe('Artifact ID to approve/reject'),
15
+ approved: z.boolean().describe('true = approved, false = rejected (needs revision)'),
16
+ comment: z.string().optional().describe('Optional comment — user feedback or reason for rejection'),
17
+ }, async ({ project_name, artifact_id, approved, comment }) => {
18
+ try {
19
+ const ctx = await resolveActive(project_name);
20
+ if (isError(ctx))
21
+ return ctx;
22
+ const status = approved ? 'approved' : 'rejected';
23
+ await resolveReview(project_name, ctx.number, artifact_id, status, comment, ctx.dir);
24
+ if (approved) {
25
+ // Trigger engine event: artifact_approved
26
+ const engineResult = await processWorkflowEvent(workflowsDir, project_name, ctx, {
27
+ type: 'artifact_approved',
28
+ artifactId: artifact_id,
29
+ });
30
+ return {
31
+ content: [
32
+ {
33
+ type: 'text',
34
+ text: `Artifact "${artifact_id}" approved.` + formatNextAction(engineResult.nextAction),
35
+ },
36
+ ],
37
+ };
38
+ }
39
+ else {
40
+ return {
41
+ content: [
42
+ {
43
+ type: 'text',
44
+ text: [
45
+ `Artifact "${artifact_id}" rejected.`,
46
+ comment ? `User feedback: ${comment}` : '',
47
+ `Please revise the artifact based on the feedback and call artifact_write again.`,
48
+ ].join('\n'),
49
+ },
50
+ ],
51
+ };
52
+ }
53
+ }
54
+ catch (err) {
55
+ return {
56
+ content: [
57
+ {
58
+ type: 'text',
59
+ text: `Error: ${err instanceof Error ? err.message : String(err)}`,
60
+ },
61
+ ],
62
+ isError: true,
63
+ };
64
+ }
65
+ });
66
+ server.tool('review_list', 'List all artifacts currently pending user review.', {
67
+ project_name: z.string().describe('Project name'),
68
+ }, async ({ project_name }) => {
69
+ const ctx = await resolveActive(project_name);
70
+ if (isError(ctx))
71
+ return ctx;
72
+ const pending = await getPendingReviews(project_name, ctx.number, ctx.dir);
73
+ if (pending.length === 0) {
74
+ return {
75
+ content: [
76
+ {
77
+ type: 'text',
78
+ text: 'No artifacts pending review.',
79
+ },
80
+ ],
81
+ };
82
+ }
83
+ const list = pending.map((r) => `- ${r.artifactId} (submitted: ${r.submittedAt})`).join('\n');
84
+ return {
85
+ content: [
86
+ {
87
+ type: 'text',
88
+ text: `Artifacts pending review:\n${list}`,
89
+ },
90
+ ],
91
+ };
92
+ });
93
+ }
94
+ //# sourceMappingURL=artifact-approve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact-approve.js","sourceRoot":"","sources":["../../src/tools/artifact-approve.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE7E,MAAM,UAAU,uBAAuB,CAAC,MAAiB,EAAE,YAAoB;IAC3E,MAAM,CAAC,IAAI,CACP,kBAAkB,EAClB,wIAAwI,EACxI;QACI,YAAY,EAA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CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE9F,OAAO;YACH,OAAO,EAAE;gBACL;oBACI,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,8BAA8B,IAAI,EAAE;iBAC7C;aACJ;SACJ,CAAC;IACN,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * MCP Tool: artifact_schema
3
+ *
4
+ * Query artifact structure requirements and writing guidance before writing.
5
+ * Returns human-readable schema guidance including required sections/fields,
6
+ * content boundaries, format requirements, and step-by-step constraints.
7
+ *
8
+ * Primarily used by coordinator (who is not dispatched and thus doesn't receive
9
+ * Artifact Requirements automatically via role_dispatch).
10
+ */
11
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
12
+ export declare function registerArtifactSchema(server: McpServer, workflowsDir: string): void;