@jterrats/open-orchestra 0.1.0 → 0.3.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 (208) hide show
  1. package/AGENTS.md +90 -0
  2. package/CHANGELOG.md +104 -0
  3. package/CLAUDE.md +103 -0
  4. package/README.md +173 -22
  5. package/dist/assets/web-console.js +743 -0
  6. package/dist/autonomous-workflow.d.ts +45 -0
  7. package/dist/autonomous-workflow.js +386 -0
  8. package/dist/autonomous-workflow.js.map +1 -0
  9. package/dist/benchmark.d.ts +8 -0
  10. package/dist/benchmark.js +193 -0
  11. package/dist/benchmark.js.map +1 -0
  12. package/dist/burndown.d.ts +3 -0
  13. package/dist/burndown.js +141 -0
  14. package/dist/burndown.js.map +1 -0
  15. package/dist/clarification.d.ts +6 -0
  16. package/dist/clarification.js +88 -0
  17. package/dist/clarification.js.map +1 -0
  18. package/dist/cli.js +221 -4
  19. package/dist/cli.js.map +1 -1
  20. package/dist/collaboration-flows.d.ts +5 -0
  21. package/dist/collaboration-flows.js +256 -0
  22. package/dist/collaboration-flows.js.map +1 -0
  23. package/dist/command-manifest.d.ts +11 -0
  24. package/dist/command-manifest.js +52 -0
  25. package/dist/command-manifest.js.map +1 -0
  26. package/dist/commands.d.ts +39 -0
  27. package/dist/commands.js +1069 -2
  28. package/dist/commands.js.map +1 -1
  29. package/dist/constants.d.ts +4 -0
  30. package/dist/constants.js +22 -0
  31. package/dist/constants.js.map +1 -1
  32. package/dist/defaults.d.ts +7 -11
  33. package/dist/defaults.js +7 -625
  34. package/dist/defaults.js.map +1 -1
  35. package/dist/delegation-decision.d.ts +14 -0
  36. package/dist/delegation-decision.js +391 -0
  37. package/dist/delegation-decision.js.map +1 -0
  38. package/dist/detect-commands.d.ts +3 -0
  39. package/dist/detect-commands.js +28 -0
  40. package/dist/detect-commands.js.map +1 -0
  41. package/dist/diagram-validation.d.ts +36 -0
  42. package/dist/diagram-validation.js +118 -0
  43. package/dist/diagram-validation.js.map +1 -0
  44. package/dist/fs-utils.d.ts +2 -0
  45. package/dist/fs-utils.js +75 -6
  46. package/dist/fs-utils.js.map +1 -1
  47. package/dist/github.d.ts +11 -0
  48. package/dist/github.js +48 -0
  49. package/dist/github.js.map +1 -0
  50. package/dist/health-checks.d.ts +28 -0
  51. package/dist/health-checks.js +219 -0
  52. package/dist/health-checks.js.map +1 -0
  53. package/dist/health-commands.d.ts +2 -0
  54. package/dist/health-commands.js +18 -0
  55. package/dist/health-commands.js.map +1 -0
  56. package/dist/instruction-apply.d.ts +34 -0
  57. package/dist/instruction-apply.js +150 -0
  58. package/dist/instruction-apply.js.map +1 -0
  59. package/dist/instruction-blocks.d.ts +22 -0
  60. package/dist/instruction-blocks.js +120 -0
  61. package/dist/instruction-blocks.js.map +1 -0
  62. package/dist/instruction-imports.d.ts +12 -0
  63. package/dist/instruction-imports.js +45 -0
  64. package/dist/instruction-imports.js.map +1 -0
  65. package/dist/instruction-stale.d.ts +9 -0
  66. package/dist/instruction-stale.js +106 -0
  67. package/dist/instruction-stale.js.map +1 -0
  68. package/dist/instruction-types.d.ts +66 -0
  69. package/dist/instruction-types.js +2 -0
  70. package/dist/instruction-types.js.map +1 -0
  71. package/dist/instruction-updates.d.ts +4 -0
  72. package/dist/instruction-updates.js +5 -0
  73. package/dist/instruction-updates.js.map +1 -0
  74. package/dist/knowledge-base.d.ts +10 -0
  75. package/dist/knowledge-base.js +117 -0
  76. package/dist/knowledge-base.js.map +1 -0
  77. package/dist/mcp-oauth-proxy.d.ts +39 -0
  78. package/dist/mcp-oauth-proxy.js +80 -0
  79. package/dist/mcp-oauth-proxy.js.map +1 -0
  80. package/dist/pr-review.d.ts +20 -0
  81. package/dist/pr-review.js +142 -0
  82. package/dist/pr-review.js.map +1 -0
  83. package/dist/project-detection.d.ts +22 -0
  84. package/dist/project-detection.js +174 -0
  85. package/dist/project-detection.js.map +1 -0
  86. package/dist/prompt-registry.d.ts +56 -0
  87. package/dist/prompt-registry.js +163 -0
  88. package/dist/prompt-registry.js.map +1 -0
  89. package/dist/release-candidate.d.ts +41 -0
  90. package/dist/release-candidate.js +196 -0
  91. package/dist/release-candidate.js.map +1 -0
  92. package/dist/release-commands.d.ts +4 -0
  93. package/dist/release-commands.js +50 -0
  94. package/dist/release-commands.js.map +1 -0
  95. package/dist/roles/ai-support-roles.d.ts +11 -0
  96. package/dist/roles/ai-support-roles.js +67 -0
  97. package/dist/roles/ai-support-roles.js.map +1 -0
  98. package/dist/roles/core-roles.d.ts +11 -0
  99. package/dist/roles/core-roles.js +144 -0
  100. package/dist/roles/core-roles.js.map +1 -0
  101. package/dist/roles/engineering-roles.d.ts +11 -0
  102. package/dist/roles/engineering-roles.js +176 -0
  103. package/dist/roles/engineering-roles.js.map +1 -0
  104. package/dist/roles/governance-roles.d.ts +11 -0
  105. package/dist/roles/governance-roles.js +117 -0
  106. package/dist/roles/governance-roles.js.map +1 -0
  107. package/dist/roles/index.d.ts +11 -0
  108. package/dist/roles/index.js +17 -0
  109. package/dist/roles/index.js.map +1 -0
  110. package/dist/roles/platform-ops-roles.d.ts +11 -0
  111. package/dist/roles/platform-ops-roles.js +158 -0
  112. package/dist/roles/platform-ops-roles.js.map +1 -0
  113. package/dist/roles/qa-ux-roles.d.ts +11 -0
  114. package/dist/roles/qa-ux-roles.js +193 -0
  115. package/dist/roles/qa-ux-roles.js.map +1 -0
  116. package/dist/roles/release-ops-roles.d.ts +11 -0
  117. package/dist/roles/release-ops-roles.js +109 -0
  118. package/dist/roles/release-ops-roles.js.map +1 -0
  119. package/dist/runtime-adapters.d.ts +6 -0
  120. package/dist/runtime-adapters.js +88 -0
  121. package/dist/runtime-adapters.js.map +1 -0
  122. package/dist/runtime-bootstrap.d.ts +12 -0
  123. package/dist/runtime-bootstrap.js +136 -0
  124. package/dist/runtime-bootstrap.js.map +1 -0
  125. package/dist/skills.d.ts +36 -0
  126. package/dist/skills.js +665 -0
  127. package/dist/skills.js.map +1 -0
  128. package/dist/subagent-protocol.d.ts +41 -0
  129. package/dist/subagent-protocol.js +179 -0
  130. package/dist/subagent-protocol.js.map +1 -0
  131. package/dist/telemetry-consent.d.ts +24 -0
  132. package/dist/telemetry-consent.js +95 -0
  133. package/dist/telemetry-consent.js.map +1 -0
  134. package/dist/telemetry-export.d.ts +14 -0
  135. package/dist/telemetry-export.js +126 -0
  136. package/dist/telemetry-export.js.map +1 -0
  137. package/dist/telemetry-records.d.ts +3 -0
  138. package/dist/telemetry-records.js +96 -0
  139. package/dist/telemetry-records.js.map +1 -0
  140. package/dist/telemetry-redaction.d.ts +9 -0
  141. package/dist/telemetry-redaction.js +55 -0
  142. package/dist/telemetry-redaction.js.map +1 -0
  143. package/dist/telemetry-types.d.ts +52 -0
  144. package/dist/telemetry-types.js +2 -0
  145. package/dist/telemetry-types.js.map +1 -0
  146. package/dist/telemetry.d.ts +4 -0
  147. package/dist/telemetry.js +4 -0
  148. package/dist/telemetry.js.map +1 -0
  149. package/dist/types.d.ts +304 -1
  150. package/dist/types.js +1 -1
  151. package/dist/types.js.map +1 -1
  152. package/dist/validation.d.ts +3 -1
  153. package/dist/validation.js +28 -5
  154. package/dist/validation.js.map +1 -1
  155. package/dist/web-api.js +167 -3
  156. package/dist/web-api.js.map +1 -1
  157. package/dist/web-console.js +6 -160
  158. package/dist/web-console.js.map +1 -1
  159. package/dist/workflow-gates.js +4 -2
  160. package/dist/workflow-gates.js.map +1 -1
  161. package/dist/workflow-services.js +143 -67
  162. package/dist/workflow-services.js.map +1 -1
  163. package/dist/workflow-templates.d.ts +10 -0
  164. package/dist/workflow-templates.js +141 -0
  165. package/dist/workflow-templates.js.map +1 -0
  166. package/dist/workspace-classification.d.ts +5 -0
  167. package/dist/workspace-classification.js +127 -0
  168. package/dist/workspace-classification.js.map +1 -0
  169. package/dist/workspace-validator.js +11 -1
  170. package/dist/workspace-validator.js.map +1 -1
  171. package/dist/workspace.d.ts +8 -4
  172. package/dist/workspace.js +111 -4
  173. package/dist/workspace.js.map +1 -1
  174. package/docs/autonomous-workflow.md +165 -0
  175. package/docs/benchmark.md +219 -0
  176. package/docs/dev-team-specialist-role-profiles.md +171 -0
  177. package/docs/mcp-oauth-proxy-evaluation.md +44 -0
  178. package/docs/multi-agent-orchestrator-backlog.md +413 -1
  179. package/docs/open-orchestra-dogfooding-findings.md +66 -0
  180. package/docs/orchestra-mvp.md +161 -3
  181. package/docs/runtime-adapters.md +86 -0
  182. package/docs/runtime-llm-flow.md +124 -0
  183. package/docs/setup-agents-dogfooding-findings.md +101 -0
  184. package/docs/skill-loading-strategy.md +114 -0
  185. package/docs/source-of-truth-and-agent-learning.md +83 -0
  186. package/package.json +9 -5
  187. package/rules/agent-roles.mdc +30 -0
  188. package/rules/ai-assisted-development.mdc +22 -0
  189. package/skills/agent-learning/SKILL.md +24 -0
  190. package/skills/agent-learning/manifest.json +40 -0
  191. package/skills/backlog-sync/SKILL.md +24 -0
  192. package/skills/backlog-sync/manifest.json +41 -0
  193. package/skills/diagram-export/SKILL.md +35 -0
  194. package/skills/diagram-export/manifest.json +40 -0
  195. package/skills/model-evaluation/SKILL.md +25 -0
  196. package/skills/model-evaluation/manifest.json +41 -0
  197. package/skills/playwright-evidence/SKILL.md +28 -0
  198. package/skills/playwright-evidence/manifest.json +46 -0
  199. package/skills/pr-review/SKILL.md +23 -0
  200. package/skills/pr-review/manifest.json +43 -0
  201. package/skills/prompt-registry/SKILL.md +24 -0
  202. package/skills/prompt-registry/manifest.json +45 -0
  203. package/skills/release-readiness/SKILL.md +25 -0
  204. package/skills/release-readiness/manifest.json +45 -0
  205. package/skills/source-of-truth/SKILL.md +24 -0
  206. package/skills/source-of-truth/manifest.json +47 -0
  207. package/skills/static-analysis/SKILL.md +26 -0
  208. package/skills/static-analysis/manifest.json +46 -0
package/AGENTS.md CHANGED
@@ -149,3 +149,93 @@
149
149
  - Ask for **Backlog Item ID** first. Use Conventional Commits with backlog scope: `type(ID): short description`.
150
150
  - Mark breaking changes with `!` and a `BREAKING CHANGE:` footer.
151
151
  - Keep PRs <400 lines. Review your own diff before requesting review.
152
+
153
+ <!-- open-orchestra:start block-id="runtime-bootstrap" generator="open-orchestra runtime bootstrap" version="1" target="codex" source-manifest="open-orchestra command-manifest,runtime-bootstrap" content-sha256="c215b82bf89b09651384dbee3c7bd8c4e66cab148adc844b4979788848017be5" updated-at="2026-05-06T22:12:02.623Z" -->
154
+ # Open Orchestra Runtime Bootstrap
155
+
156
+ Runtime target: Codex. Reference Open Orchestra from AGENTS.md so local CLI work follows workflow gates.
157
+
158
+ Use Open Orchestra as the local control plane when `.agent-workflow/` exists.
159
+ The active LLM runtime is the parent agent. Do not assume automatic real subagent spawning or real provider execution.
160
+
161
+ ## Orchestra Workflow — Required for All Work
162
+
163
+ Every piece of work — feature, bug fix, architecture decision, stack definition, PO refinement, or research spike —
164
+ MUST go through the Orchestra workflow. Do not start any work without a registered task and a running workflow.
165
+
166
+ ### Step 1 — Register the task
167
+ ```
168
+ orchestra task add --id <ID> --title "<title>" --owner <role> --paths "<files>" --goal "<goal>"
169
+ ```
170
+ Use the correct owner role for the type of work:
171
+ - Architecture / stack decisions → `architect`
172
+ - Product strategy / roadmap → `product_manager`
173
+ - Backlog refinement / acceptance criteria → `product_owner`
174
+ - Implementation → `developer`
175
+ - Verification / QA → `qa`
176
+ - Release / deploy → `release_manager`
177
+
178
+ ### Step 2 — Declare effort baseline
179
+ ```
180
+ orchestra estimate --task <ID> --sizing <xs|s|m|l|xl> --solo-days <N> --ai-unguided-days <N>
181
+ ```
182
+
183
+ ### Step 3 — Run the autonomous workflow
184
+ ```
185
+ orchestra workflow run --task <ID> --gates phase
186
+ ```
187
+ The workflow sequences PM → PO → Architect → Developer → QA → Release.
188
+ Gates pause at `po→architect` and `qa→release` for human review.
189
+ The architect phase requires a sizing decision before proceeding:
190
+ ```
191
+ orchestra decision add --task <ID> --owner architect --title "Story sizing" \
192
+ --decision "<xs|s|m|l|xl> [N points]" --context "..." --consequences "..." --status accepted
193
+ ```
194
+
195
+ ### Step 4 — Collaborate through the phases
196
+ Each phase routes work to the right role. Pass your comments, requirements, or context via:
197
+ - `orchestra decision add` — architecture decisions, stack choices, accepted trade-offs
198
+ - `orchestra review` — review findings from any role
199
+ - `orchestra workflow clarify` — blocking questions from developer/QA to PO or architect
200
+ - `orchestra evidence add` — artifacts, commands run, test results
201
+
202
+ ### Step 5 — Resume after gates
203
+ ```
204
+ orchestra workflow run --task <ID> --resume <run-id>
205
+ ```
206
+
207
+ ### Step 6 — Benchmark after completion
208
+ ```
209
+ orchestra benchmark --task <ID>
210
+ ```
211
+
212
+ ## Active Work
213
+ - Run `orchestra health --json`.
214
+ - Run `orchestra task list --json` and identify the active task.
215
+ - For the active task, run context, delegation, plan, skills, protocol, and workflow render commands.
216
+
217
+ ## Task Loop
218
+ - `orchestra health` - Check local tools and workflow readiness.
219
+ - `orchestra task list` - List local workflow tasks.
220
+ - `orchestra context --task <id>` - Read task context bundle.
221
+ - `orchestra delegation decide --task <id>` - Decide whether to delegate.
222
+ - `orchestra plan --task <id>` - Render role execution plan.
223
+ - `orchestra skills plan --task <id>` - Select task-scoped skills.
224
+ - `orchestra skills render --target <target>` - Render skills for a runtime.
225
+ - `orchestra protocol render` - Render subagent protocol.
226
+ - `orchestra workflow render --task <id>` - Render workflow templates.
227
+ - `orchestra evidence add --task <id> --role <role> --type <type> --summary <text>` - Record delivery evidence.
228
+ - `orchestra review --task <id> --role <role> --result <approve|block|changes> --findings <text> --recommendation <text>` - Record reviewer outcome.
229
+ - `orchestra gate --gate <id> --task <id>` - Evaluate workflow gate.
230
+ - `orchestra summary` - Summarize workspace state.
231
+
232
+ ## Completion
233
+ - Run the project validation gate.
234
+ - Record command/file/browser evidence with `orchestra evidence add`.
235
+ - Record review outcome with `orchestra review`.
236
+ - Update task status only after evidence and review are present.
237
+
238
+ ## Command Discovery
239
+ - Use `orchestra commands manifest --json` for command metadata.
240
+ - Use `orchestra --help` for human-readable help.
241
+ <!-- open-orchestra:end block-id="runtime-bootstrap" -->
package/CHANGELOG.md ADDED
@@ -0,0 +1,104 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ ## 0.3.0 - 2026-05-06
6
+
7
+ ### Added
8
+
9
+ - **Autonomous workflow engine** (`workflow run`) executes a full story lifecycle as a governed multi-phase sequence: PM → PO → Architect → Developer → QA → Release. State is persisted in `.agent-workflow/workflow-runs.jsonl` (append-only).
10
+ - `--gates none|phase|all` controls how many human approval checkpoints are required. `phase` mode gates at `po→architect` and `qa→release`; `all` gates every transition; `none` runs fully autonomously.
11
+ - `--dry-run` prints the phase graph with gate annotations without creating any records.
12
+ - `--resume <run-id>` continues a paused or clarification-suspended run from the correct phase.
13
+ - **Architect sizing gate**: always enforced regardless of `--gates` mode. The architect must record a sizing decision (`xs/s/m/l/xl`) before the developer phase starts. If missing, the run fails with the exact `orchestra decision add` command to resolve it.
14
+ - `orchestra workflow runs` lists all runs with status and phase trace.
15
+ - **Clarification loop** (`workflow clarify`, `workflow clarify-respond`, `workflow clarify-list`): developer and QA phases can surface blocking questions to the PO or architect mid-phase. The active phase is suspended until the answer is recorded, then resumed with `--resume`. Records persisted in `.agent-workflow/clarifications.jsonl`.
16
+ - **Effectiveness benchmark** (`orchestra estimate` + `orchestra benchmark`): PM declares solo and AI-unguided baselines once at story start; actual cycle time is computed automatically from autonomous run timestamps after the release phase completes. `orchestra benchmark --summary` prints a sortable table across all stories.
17
+ - **Quality signals** automatically collected from the event log per story: review count, blocking reviews, evidence artifacts, gate blocks, lessons generated, model tokens, and estimated cost. Appear in `orchestra benchmark` output with no additional input.
18
+ - **Sprint burndown** (`orchestra burndown --sprint <task-ids-csv>`): computes ideal vs actual lines from story point estimates. Developer points take priority over architect sizing; falls back gracefully. ASCII chart + `--json` output.
19
+ - **Developer story point estimation**: developer records implementation effort via `orchestra decision add` with `actor=developer` and `metadata.points` — same pattern as architect sizing, distinguishable by `actor` field. Used as primary input for burndown; creates a calibration signal when both architect and developer estimates exist.
20
+ - **QA→Developer retry loop**: when a QA phase closes with `qa_fail`, the workflow routes back to the developer phase with failure notes as context. Each retry creates a numbered sub-task (`TASK-developer-<run-suffix>-retry1`). The `maxIterations` cap prevents infinite loops.
21
+ - **GitHub PR auto-creation** (`github.autoCreatePr: true` in config): after the release phase completes, automatically creates a PR via `gh pr create` with title and body generated from `pr-summary` data. PR URL is recorded as an evidence artifact. Failure is non-fatal — the run completes with a warning.
22
+ - **Enriched runtime bootstrap block**: `orchestra init` now injects an "Orchestra Workflow — Required for All Work" section into `CLAUDE.md`, `AGENTS.md`, Cursor rules, Windsurf rules, and VS Code files covering any work type: architecture decisions, stack definition, PO refinement, product strategy, implementation, QA, and release. Correct owner role guidance included per work type.
23
+
24
+ ### Fixed
25
+
26
+ - `resumePhaseIndex` now scans past `gate_paused` phases instead of returning immediately, preventing re-execution of already-completed phases on runs with multiple sequential gates.
27
+ - `recordDecision` now extracts `sizing` and `points` from the `--decision` text for architect decisions (pattern: `"<xs|s|m|l|xl> [N points]"`), so the architect sizing gate reads them correctly via the standard CLI flow.
28
+ - Phase sub-task IDs are now run-scoped (`TASK-phase-<run-suffix>`) preventing collisions when multiple workflow runs target the same task.
29
+
30
+ ### Documentation
31
+
32
+ - README rewritten to lead with the autonomous workflow feature, clarification loop, benchmark, and burndown sections.
33
+ - `docs/autonomous-workflow.md`: new reference page for the workflow engine, gate modes, sizing gate, clarification loop, and run/phase state reference.
34
+ - `docs/benchmark.md`: new reference page for estimate, benchmark, burndown, quality signals, and developer story points.
35
+ - `docs/orchestra-mvp.md` updated with all new sections, command examples, revised workflow files layout, and current scope.
36
+
37
+ ### Validation
38
+
39
+ - Dogfooded using Orchestra itself: ORCH-017 and ORCH-022 were developed as autonomous workflow runs, surfacing and fixing the sizing extraction and task ID collision bugs during the process.
40
+
41
+ ## 0.2.2 - 2026-05-06
42
+
43
+ ### Changed
44
+
45
+ - Added `orchestra --version`, `orchestra -v`, and `orchestra version --json`
46
+ for install and release verification.
47
+ - Release automation now creates GitHub Releases from CI-created tags.
48
+ - CI workflows use Node 24-compatible official GitHub Actions.
49
+
50
+ ### Validation
51
+
52
+ - Validates the automated tag, GitHub Release, and npm publication chain.
53
+
54
+ ## 0.2.1 - 2026-05-06
55
+
56
+ ### Fixed
57
+
58
+ - Generated runtime bootstrap guidance now uses the portable installed
59
+ executable form, `orchestra ...`, instead of repo-local
60
+ `node bin/orchestra.js ...` examples.
61
+ - Skill render no longer creates partial `.agent-workflow/` state before
62
+ `orchestra init`, preventing CI validation failures in freshly cloned repos.
63
+ - File-lock writes now create missing parent directories before locking, making
64
+ event recording safer in new workspaces.
65
+ - Concurrent `evidence add` calls now create collision-resistant artifact
66
+ filenames instead of overwriting evidence recorded in the same millisecond.
67
+
68
+ ### Validation
69
+
70
+ - Added regression coverage for portable bootstrap command examples, missing
71
+ lock parent directories, avoiding partial workflow state before init, and
72
+ concurrent evidence artifact creation.
73
+
74
+ ## 0.2.0 - 2026-05-06
75
+
76
+ ### Added
77
+
78
+ - Runtime adapter catalog for `generic`, `claude`, `cursor`, `codex`, `vscode`,
79
+ and `windsurf`.
80
+ - `orchestra runtime adapters --json` for clients and LLM runtimes that need
81
+ stable adapter metadata.
82
+ - Target-specific init support with `orchestra init --target <csv>`.
83
+ - Advisory init support for explicit runtime targets without default root
84
+ instruction writes.
85
+ - Workspace classification and runtime adapter visibility in the web console.
86
+ - Runtime adapter documentation covering Claude, Codex, Cursor, VS Code,
87
+ Windsurf, and generic LLM flows.
88
+
89
+ ### Changed
90
+
91
+ - Runtime bootstrap and subagent protocol guidance now read from the runtime
92
+ adapter catalog instead of hardcoded target text.
93
+ - Workspace classification uses the adapter catalog for supported target lists.
94
+ - VS Code extension package version aligned with the CLI package.
95
+
96
+ ### Security
97
+
98
+ - Extended workspace-local write guards to instruction apply/block paths.
99
+ - Continued blocking unsafe workspace roots before init writes.
100
+
101
+ ### Validation
102
+
103
+ - Added tests for runtime adapters, target-specific init, advisory target init,
104
+ workspace classification, and instruction path escape rejection.
package/CLAUDE.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  > Stack-agnostic guardrails for all projects. Managed by Open Orchestra.
4
4
 
5
+ ## Orchestra Workflow — REQUIRED
6
+
7
+ This repo uses Open Orchestra for all development work. Every feature or fix MUST go through the workflow:
8
+
9
+ 1. **Task registration**: `orchestra task add --id <ID> --title "..." --owner <role> --paths "..." --goal "..."` before any code is written.
10
+ 2. **Effort baseline**: `orchestra estimate --task <ID> --sizing <xs|s|m|l|xl> --solo-days N --ai-unguided-days N` before starting implementation.
11
+ 3. **Autonomous run**: `orchestra workflow run --task <ID> --gates phase` to execute the PM→PO→Architect→Developer→QA→Release phase sequence.
12
+ 4. **Sizing decision**: `orchestra decision add --task <ID> --owner architect --title "Story sizing" --decision "<sizing> [N points]" ...` is required before the developer phase proceeds.
13
+ 5. **Architect sizing format**: always use `"<xs|s|m|l|xl> [N points]"` in `--decision` so the sizing gate reads it correctly (e.g. `"m [5 points]"`).
14
+ 6. **Benchmark**: `orchestra benchmark --task <ID>` after completion to record actual vs declared effort.
15
+
16
+ Do NOT start implementation without a registered task and workflow run. Use `orchestra workflow runs` to check active runs. Use `orchestra benchmark --summary` to review effectiveness.
17
+
5
18
  ## Rule Composition
6
19
 
7
20
  - Keep root files concise. Put detailed guidance in focused `rules/*.mdc` files and reference only the operating principles here.
@@ -155,3 +168,93 @@
155
168
  - Concise, but detailed in architectural justifications.
156
169
  - Correct mistakes directly without apologizing.
157
170
  - **No Ninja Edits.** Summarize proposed changes and get agreement before modifying files.
171
+
172
+ <!-- open-orchestra:start block-id="runtime-bootstrap" generator="open-orchestra runtime bootstrap" version="1" target="claude" source-manifest="open-orchestra command-manifest,runtime-bootstrap" content-sha256="af9e26eb55d14bc7d504c357f6fe6e996eaa2ea1ffb45a830afa15b1885fff8a" updated-at="2026-05-06T22:12:14.883Z" -->
173
+ # Open Orchestra Runtime Bootstrap
174
+
175
+ Runtime target: Claude. Reference compact Open Orchestra blocks from CLAUDE.md and load task skills on demand.
176
+
177
+ Use Open Orchestra as the local control plane when `.agent-workflow/` exists.
178
+ The active LLM runtime is the parent agent. Do not assume automatic real subagent spawning or real provider execution.
179
+
180
+ ## Orchestra Workflow — Required for All Work
181
+
182
+ Every piece of work — feature, bug fix, architecture decision, stack definition, PO refinement, or research spike —
183
+ MUST go through the Orchestra workflow. Do not start any work without a registered task and a running workflow.
184
+
185
+ ### Step 1 — Register the task
186
+ ```
187
+ orchestra task add --id <ID> --title "<title>" --owner <role> --paths "<files>" --goal "<goal>"
188
+ ```
189
+ Use the correct owner role for the type of work:
190
+ - Architecture / stack decisions → `architect`
191
+ - Product strategy / roadmap → `product_manager`
192
+ - Backlog refinement / acceptance criteria → `product_owner`
193
+ - Implementation → `developer`
194
+ - Verification / QA → `qa`
195
+ - Release / deploy → `release_manager`
196
+
197
+ ### Step 2 — Declare effort baseline
198
+ ```
199
+ orchestra estimate --task <ID> --sizing <xs|s|m|l|xl> --solo-days <N> --ai-unguided-days <N>
200
+ ```
201
+
202
+ ### Step 3 — Run the autonomous workflow
203
+ ```
204
+ orchestra workflow run --task <ID> --gates phase
205
+ ```
206
+ The workflow sequences PM → PO → Architect → Developer → QA → Release.
207
+ Gates pause at `po→architect` and `qa→release` for human review.
208
+ The architect phase requires a sizing decision before proceeding:
209
+ ```
210
+ orchestra decision add --task <ID> --owner architect --title "Story sizing" \
211
+ --decision "<xs|s|m|l|xl> [N points]" --context "..." --consequences "..." --status accepted
212
+ ```
213
+
214
+ ### Step 4 — Collaborate through the phases
215
+ Each phase routes work to the right role. Pass your comments, requirements, or context via:
216
+ - `orchestra decision add` — architecture decisions, stack choices, accepted trade-offs
217
+ - `orchestra review` — review findings from any role
218
+ - `orchestra workflow clarify` — blocking questions from developer/QA to PO or architect
219
+ - `orchestra evidence add` — artifacts, commands run, test results
220
+
221
+ ### Step 5 — Resume after gates
222
+ ```
223
+ orchestra workflow run --task <ID> --resume <run-id>
224
+ ```
225
+
226
+ ### Step 6 — Benchmark after completion
227
+ ```
228
+ orchestra benchmark --task <ID>
229
+ ```
230
+
231
+ ## Active Work
232
+ - Run `orchestra health --json`.
233
+ - Run `orchestra task list --json` and identify the active task.
234
+ - For the active task, run context, delegation, plan, skills, protocol, and workflow render commands.
235
+
236
+ ## Task Loop
237
+ - `orchestra health` - Check local tools and workflow readiness.
238
+ - `orchestra task list` - List local workflow tasks.
239
+ - `orchestra context --task <id>` - Read task context bundle.
240
+ - `orchestra delegation decide --task <id>` - Decide whether to delegate.
241
+ - `orchestra plan --task <id>` - Render role execution plan.
242
+ - `orchestra skills plan --task <id>` - Select task-scoped skills.
243
+ - `orchestra skills render --target <target>` - Render skills for a runtime.
244
+ - `orchestra protocol render` - Render subagent protocol.
245
+ - `orchestra workflow render --task <id>` - Render workflow templates.
246
+ - `orchestra evidence add --task <id> --role <role> --type <type> --summary <text>` - Record delivery evidence.
247
+ - `orchestra review --task <id> --role <role> --result <approve|block|changes> --findings <text> --recommendation <text>` - Record reviewer outcome.
248
+ - `orchestra gate --gate <id> --task <id>` - Evaluate workflow gate.
249
+ - `orchestra summary` - Summarize workspace state.
250
+
251
+ ## Completion
252
+ - Run the project validation gate.
253
+ - Record command/file/browser evidence with `orchestra evidence add`.
254
+ - Record review outcome with `orchestra review`.
255
+ - Update task status only after evidence and review are present.
256
+
257
+ ## Command Discovery
258
+ - Use `orchestra commands manifest --json` for command metadata.
259
+ - Use `orchestra --help` for human-readable help.
260
+ <!-- open-orchestra:end block-id="runtime-bootstrap" -->
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Open Orchestra is a local-first, provider-agnostic framework for governed multi-agent software delivery.
4
4
 
5
- It coordinates agents through task graphs, durable workflow files, handoffs, reviews, evidence, gates, locks, model routing, model provenance, and budget controls. The public CLI is `orchestra`.
5
+ It coordinates agents through task graphs, durable workflow files, handoffs, reviews, evidence, gates, locks, model routing, model provenance, budget controls, and an autonomous multi-phase workflow engine. The public CLI is `orchestra`.
6
6
 
7
7
  ## Quick Start
8
8
 
@@ -14,40 +14,191 @@ node bin/orchestra.js status
14
14
  node bin/orchestra.js roles list --json
15
15
  ```
16
16
 
17
+ For Claude, Codex, Cursor, VS Code, Windsurf, and generic LLM usage, see
18
+ [docs/runtime-llm-flow.md](docs/runtime-llm-flow.md) and
19
+ [docs/runtime-adapters.md](docs/runtime-adapters.md).
20
+
21
+ ## Autonomous Workflow
22
+
23
+ The `workflow run` command executes a full story lifecycle as a governed multi-phase sequence without manual step-by-step commands. Each phase creates a sub-task, generates handoff artifacts, and persists state in an append-only run log.
24
+
25
+ ```
26
+ PM → PO [gate] → Architect [sizing gate] → Developer → QA [gate] → Release
27
+ ```
28
+
29
+ ```bash
30
+ # Dry run — inspect the phase graph and gate annotations without persisting state
31
+ orchestra workflow run --task FEAT-001 --dry-run --gates phase
32
+
33
+ # Full autonomous run, no human gates
34
+ orchestra workflow run --task FEAT-001 --gates none
35
+
36
+ # Run with human approval gates at po→architect and qa→release
37
+ orchestra workflow run --task FEAT-001 --gates phase
38
+
39
+ # Resume a paused or clarification-suspended run
40
+ orchestra workflow run --task FEAT-001 --resume <run-id>
41
+
42
+ # List all runs with status and phase trace
43
+ orchestra workflow runs
44
+ ```
45
+
46
+ **Gate modes:**
47
+
48
+ | Mode | Gates |
49
+ |------|-------|
50
+ | `none` | Fully autonomous — no human approval required |
51
+ | `phase` | Pauses at `po→architect` and `qa→release` |
52
+ | `all` | Pauses at every phase transition |
53
+
54
+ **Architect sizing gate** is always enforced regardless of `--gates` mode. The architect must record a sizing decision (`xs/s/m/l/xl`) before the developer phase starts. If missing, the run fails with the exact command to resolve it.
55
+
56
+ ### Clarification Loop
57
+
58
+ Developers or QA engineers can surface blocking questions to the PO or architect mid-phase without stopping the workflow or making unvalidated assumptions.
59
+
60
+ ```bash
61
+ # Developer asks PO a question (suspends the current phase)
62
+ orchestra workflow clarify --run <run-id> --from developer --to po \
63
+ --question "Should empty input return null or throw?"
64
+
65
+ # PO answers (resumes the phase)
66
+ orchestra workflow clarify-respond --run <run-id> --clarification <id> \
67
+ --answer "Return null — downstream code handles it."
68
+
69
+ # Resume execution after the answer is recorded
70
+ orchestra workflow run --task FEAT-001 --resume <run-id>
71
+
72
+ # Inspect all clarifications for a run
73
+ orchestra workflow clarify-list --run <run-id>
74
+ ```
75
+
76
+ Clarifications are persisted in `.agent-workflow/clarifications.jsonl` and visible in task context.
77
+
78
+ ## Benchmark & Sprint Burndown
79
+
80
+ Open Orchestra measures effectiveness across three development modes and generates a sprint burndown from story point estimates.
81
+
82
+ ### Estimate (declare baselines once, at story start)
83
+
84
+ ```bash
85
+ orchestra estimate \
86
+ --task FEAT-001 \
87
+ --sizing m \
88
+ --solo-days 5 \
89
+ --ai-unguided-days 3 \
90
+ --confidence high
91
+ ```
92
+
93
+ ### Benchmark (auto-computed after run completes)
94
+
95
+ ```bash
96
+ # Per-story report: cycle time, savings %, quality signals
97
+ orchestra benchmark --task FEAT-001
98
+
99
+ # Sprint summary table
100
+ orchestra benchmark --summary
101
+ ```
102
+
103
+ Example output:
104
+ ```
105
+ Benchmark: FEAT-001 [complete]
106
+ Sizing: m
107
+ Solo: 5d (declared)
108
+ AI-unguided: 3d (declared)
109
+ Actual: 1.4d
110
+ vs Solo: -72%
111
+ vs AI: -53%
112
+ QA loops: 1
113
+ Reviews: 3 (0 blocking)
114
+ Evidence: 5 artifacts
115
+ Lessons: 2
116
+ Tokens: 17500in / 5000out
117
+ Cost: $0.0257
118
+ ```
119
+
120
+ Quality signals (reviews, evidence, lessons, gate blocks, token usage, cost) are read automatically from the event log — no manual input after the initial estimate.
121
+
122
+ ### Sprint Burndown
123
+
124
+ Developer story points take priority over architect sizing; falls back to architect if developer hasn't estimated yet.
125
+
126
+ ```bash
127
+ # ASCII chart + task breakdown
128
+ orchestra burndown --sprint FEAT-001,FEAT-002,FEAT-003
129
+
130
+ # JSON series for dashboards
131
+ orchestra burndown --sprint FEAT-001,FEAT-002,FEAT-003 --json
132
+ ```
133
+
134
+ Developer records their own estimate with:
135
+ ```bash
136
+ orchestra decision add \
137
+ --task FEAT-001 \
138
+ --owner developer \
139
+ --title "Dev estimate" \
140
+ --decision "M / 8 points" \
141
+ --context "..." --consequences "..." --status accepted
142
+ ```
143
+
144
+ See [docs/benchmark.md](docs/benchmark.md) for the full reference.
17
145
 
18
146
  ## Role Catalog
19
147
 
20
148
  Open Orchestra treats roles as capabilities and governance responsibilities, not only human job titles. Projects can keep roles inactive until risk, scope, impact area, or a workflow gate requires them.
21
149
 
22
- Core delivery roles remain available: Product Manager, Product Owner, Business Analyst, Architect, Developer, QA, Security, DevOps, SRE, DBA, UX/UI Designer, Release Manager, Compliance/Privacy, and Technical Writer.
150
+ Core delivery roles: Product Manager, Product Owner, Business Analyst, Architect, Developer, QA, Security, DevOps, SRE, DBA, Data Engineer, UX/UI Designer, Accessibility Reviewer, Release Manager, Compliance/Privacy, Technical Writer, Tech Lead, SDET, Platform Engineer, Frontend Specialist, Backend Specialist, Mobile Specialist, AI Evaluation Engineer, and Support/Customer Operations.
151
+
152
+ Orchestration roles for modern multi-agent systems:
153
+
154
+ - Parent Agent / Orchestrator — sequencing, handoffs, locks, escalation, integration.
155
+ - Planner — work breakdown, dependency mapping, role activation rationale.
156
+ - Reviewer / Critic — independent review before gates or handoffs.
157
+ - Toolsmith / Integration Engineer — tools, MCPs, providers, adapters, automation contracts.
158
+ - Context Curator / Memory Manager — decisions, assumptions, stale context, shared memory hygiene.
159
+ - Policy / Governance Agent — approvals, budgets, workflow rules, compliance gates.
160
+ - Observability / Incident Response — telemetry, alerts, runbooks, incident readiness.
161
+ - Data / Privacy Officer — PII, retention, encryption, access, data compliance.
162
+ - Domain Expert — project-specific business or industry judgment.
163
+ - Performance Engineer — load, latency, scalability, caching, concurrency, graceful degradation.
164
+ - Game Designer — gameplay loops, tutorialization, player feedback, balance risk.
165
+
166
+ Each default role declares activation criteria, expected evidence, and gate participation so a parent agent can select only the roles needed for a task. See [docs/dev-team-specialist-role-profiles.md](docs/dev-team-specialist-role-profiles.md) for specialist profiles.
167
+
168
+ ## Workflow Files
169
+
170
+ ```text
171
+ .agent-workflow/
172
+ config.json
173
+ roles.json
174
+ tasks.json
175
+ locks.json
176
+ events.jsonl
177
+ workflow-runs.jsonl ← autonomous run state (append-only)
178
+ clarifications.jsonl ← clarification loop records (append-only)
179
+ estimates.jsonl ← declared effort baselines (append-only)
180
+ approvals/
181
+ decisions/
182
+ handoffs/
183
+ evidence/
184
+ reviews/
185
+ runs/
186
+ ```
23
187
 
24
- State-of-the-art orchestration roles are also included:
188
+ ## Skills and Context Loading
25
189
 
26
- - Parent Agent / Orchestrator for sequencing, handoffs, locks, escalation, and integration.
27
- - Planner for work breakdown, dependency mapping, and role activation rationale.
28
- - Reviewer / Critic for independent review before gates or handoffs.
29
- - Toolsmith / Integration Engineer for tools, MCPs, providers, adapters, and automation contracts.
30
- - Context Curator / Memory Manager for decisions, assumptions, stale context, and shared memory hygiene.
31
- - Policy / Governance Agent for approvals, budgets, workflow rules, and compliance gates.
32
- - Observability / Incident Response for telemetry, alerts, runbooks, and incident readiness.
33
- - Data / Privacy Officer for PII, retention, encryption, access, and data compliance.
34
- - Domain Expert for project-specific business or industry judgment.
35
- - UX Researcher / Accessibility Reviewer for mobile-first UX, accessibility, onboarding, and game/player guidance.
36
- - Performance Engineer for load, latency, scalability, caching, concurrency, and graceful degradation.
37
- - Game Designer for gameplay loops, tutorialization, player feedback, and balance risk.
190
+ Primary instruction files should stay short. Detailed procedures live in task-scoped skills loaded only when needed. See [docs/skill-loading-strategy.md](docs/skill-loading-strategy.md) for the manifest, loading flow, and built-in skill candidates.
38
191
 
39
- Each default role declares activation criteria, expected evidence, and gate participation so a parent agent can select only the roles needed for a task.
192
+ ## Prompt Registry
40
193
 
41
- ## VS Code Control Center
194
+ Open Orchestra scaffolds a stack-agnostic `.generated-prompts/` registry during `orchestra init`. Agents use it to preserve prompt intent and generation conventions without bloating main instruction files. Split by artifact type: code, UI, services, tests, CI/CD, docs, diagrams, and evals.
42
195
 
43
- The first VS Code extension scaffold lives in `extensions/vscode-open-orchestra`. It provides an Open Orchestra activity bar view that consumes stable CLI JSON contracts for status, validation, graph plan, roles, approvals, evidence, config inspection, and Playwright evidence attachment. The CLI remains the source of truth; the extension does not parse human-readable terminal output or duplicate workflow file logic.
196
+ ## VS Code Control Center
44
197
 
45
- Initial local usage:
198
+ The VS Code extension scaffold lives in `extensions/vscode-open-orchestra`. It consumes stable CLI JSON contracts for status, validation, graph plan, roles, approvals, evidence, and config inspection. The CLI remains the source of truth.
46
199
 
47
200
  ```bash
48
- # From this repo, build the CLI first
49
201
  npm run build
50
- # Open the extension folder in VS Code and run the extension host
51
202
  code extensions/vscode-open-orchestra
52
203
  ```
53
204
 
@@ -57,4 +208,4 @@ code extensions/vscode-open-orchestra
57
208
  - Existing `AGENTS.md`, `CLAUDE.md`, Cursor rules, and generated instruction files remain supported.
58
209
  - `ORCHESTRA.md` is the intended future primary guide name and can coexist with current agent instruction files.
59
210
 
60
- See [docs/orchestra-mvp.md](docs/orchestra-mvp.md) for the current command reference.
211
+ See [docs/orchestra-mvp.md](docs/orchestra-mvp.md) for the full command reference.