@jterrats/open-orchestra 0.2.1 → 0.3.1

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.
@@ -122,6 +122,86 @@ node bin/orchestra.js model set-role --role developer --provider openai --model
122
122
  node bin/orchestra.js model complete-fake --provider primary --model fake-model --prompt "hello" --fallbacks backup --fail-provider primary
123
123
  node bin/orchestra.js model provenance add --task TASK-1 --role developer --provider openai --model gpt-example --prompt-id prompt-1 --response-id response-1 --finish-reason stop
124
124
  node bin/orchestra.js model provenance list --task TASK-1 --json
125
+
126
+ # Autonomous workflow
127
+ node bin/orchestra.js workflow run --task TASK-1 --dry-run --gates phase
128
+ node bin/orchestra.js workflow run --task TASK-1 --gates none
129
+ node bin/orchestra.js workflow run --task TASK-1 --gates phase
130
+ node bin/orchestra.js workflow run --task TASK-1 --gates all
131
+ node bin/orchestra.js workflow run --task TASK-1 --resume <run-id>
132
+ node bin/orchestra.js workflow runs
133
+ node bin/orchestra.js workflow runs --json
134
+
135
+ # Clarification loop
136
+ node bin/orchestra.js workflow clarify --run <run-id> --from developer --to po --question "..."
137
+ node bin/orchestra.js workflow clarify --run <run-id> --from developer --to architect --question "..."
138
+ node bin/orchestra.js workflow clarify --run <run-id> --from qa --to po --question "..."
139
+ node bin/orchestra.js workflow clarify-respond --run <run-id> --clarification <id> --answer "..."
140
+ node bin/orchestra.js workflow clarify-list --run <run-id>
141
+ node bin/orchestra.js workflow clarify-list --run <run-id> --json
142
+
143
+ # Benchmark & burndown
144
+ node bin/orchestra.js estimate --task TASK-1 --sizing m --solo-days 5 --ai-unguided-days 3
145
+ node bin/orchestra.js estimate --task TASK-1 --sizing l --solo-days 8 --ai-unguided-days 5 --confidence high --declared-by pm --json
146
+ node bin/orchestra.js benchmark --task TASK-1
147
+ node bin/orchestra.js benchmark --task TASK-1 --json
148
+ node bin/orchestra.js benchmark --summary
149
+ node bin/orchestra.js benchmark --summary --json
150
+ node bin/orchestra.js burndown --sprint TASK-1,TASK-2,TASK-3
151
+ node bin/orchestra.js burndown --sprint TASK-1,TASK-2,TASK-3 --json
152
+ ```
153
+
154
+ ## Autonomous Workflow Engine
155
+
156
+ `orchestra workflow run` executes a full story lifecycle as a governed multi-phase sequence. Each phase creates a sub-task, generates handoff artifacts, and persists state in an append-only run log.
157
+
158
+ ```
159
+ PM → PO [gate] → Architect [sizing gate] → Developer → QA [gate] → Release
160
+ ```
161
+
162
+ ```bash
163
+ # Inspect the phase graph without persisting state
164
+ orchestra workflow run --task FEAT-001 --dry-run --gates phase
165
+
166
+ # Fully autonomous — no human approval required
167
+ orchestra workflow run --task FEAT-001 --gates none
168
+
169
+ # Gate-controlled — pauses at po→architect and qa→release
170
+ orchestra workflow run --task FEAT-001 --gates phase
171
+
172
+ # Resume a paused or clarification-suspended run
173
+ orchestra workflow run --task FEAT-001 --resume <run-id>
174
+
175
+ # List all runs with status and phase trace
176
+ orchestra workflow runs
177
+ ```
178
+
179
+ **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 command to resolve it:
180
+
181
+ ```bash
182
+ orchestra decision add --task FEAT-001 --owner architect \
183
+ --title "Story sizing" --decision "m [5 points]" \
184
+ --context "..." --consequences "..." --status accepted
185
+ ```
186
+
187
+ ### Clarification Loop
188
+
189
+ Developers or QA engineers can surface blocking questions to the PO or architect mid-phase without abandoning the run.
190
+
191
+ ```bash
192
+ # Open a clarification (suspends the active developer/qa phase)
193
+ orchestra workflow clarify --run <run-id> --from developer --to po \
194
+ --question "Should empty input return null or throw?"
195
+
196
+ # Answer the clarification (resumes the phase)
197
+ orchestra workflow clarify-respond --run <run-id> --clarification <id> \
198
+ --answer "Return null — downstream handles it."
199
+
200
+ # Resume execution after the answer
201
+ orchestra workflow run --task FEAT-001 --resume <run-id>
202
+
203
+ # Inspect all clarifications for a run
204
+ orchestra workflow clarify-list --run <run-id>
125
205
  ```
126
206
 
127
207
  ## Workflow Files
@@ -133,6 +213,9 @@ node bin/orchestra.js model provenance list --task TASK-1 --json
133
213
  tasks.json
134
214
  locks.json
135
215
  events.jsonl
216
+ workflow-runs.jsonl ← autonomous run state (append-only)
217
+ clarifications.jsonl ← clarification loop records (append-only)
218
+ estimates.jsonl ← declared effort baselines (append-only)
136
219
  source-of-truth.json
137
220
  agent-lessons.jsonl
138
221
  approvals/
@@ -212,10 +295,40 @@ The VS Code Control Center scaffold is under `extensions/vscode-open-orchestra`.
212
295
  - `src/commands.ts` is the CLI adapter: it parses command options, delegates to services, and renders terminal output.
213
296
  - Services accept an explicit repo root, so future web, GitHub Actions, Playwright, or multi-model orchestration layers can reuse the same core without depending on `process.cwd()`.
214
297
 
298
+ ## Benchmark & Sprint Burndown
299
+
300
+ `orchestra estimate` declares the three-mode effort baseline at story start. After the autonomous run completes, `orchestra benchmark` joins the declared estimate with the actual cycle time and quality signals automatically computed from the event log.
301
+
302
+ Quality signals collected automatically:
303
+ - `REVIEW_RECORDED` events → review count, blocking reviews (result=block or severity high/critical)
304
+ - `EVIDENCE_ADDED` events → evidence artifact count
305
+ - `LESSON_RECORDED` events → lesson count
306
+ - `GATE_BLOCKED` events → gate block count
307
+ - `MODEL_PROVENANCE_RECORDED` events → total tokens, estimated cost
308
+
309
+ ```bash
310
+ # Declare baseline at story start (once per story)
311
+ orchestra estimate --task TASK-1 --sizing m --solo-days 5 --ai-unguided-days 3
312
+
313
+ # Per-story benchmark after run completes
314
+ orchestra benchmark --task TASK-1
315
+
316
+ # Sprint summary table across all stories with estimates
317
+ orchestra benchmark --summary
318
+
319
+ # Sprint burndown (developer points > architect points as fallback)
320
+ orchestra burndown --sprint TASK-1,TASK-2,TASK-3
321
+ ```
322
+
323
+ See [benchmark.md](benchmark.md) for the full reference.
324
+
215
325
  ## Current Scope
216
326
 
217
- - No real LLM calls.
327
+ - Autonomous workflow engine (`workflow run`) executes the full PM→PO→Architect→Developer→QA→Release phase sequence with configurable human gates and an architect sizing gate.
328
+ - Clarification loop (`workflow clarify`) allows developer and QA phases to surface blocking questions to PO or architect without abandoning the run.
329
+ - Benchmark (`orchestra estimate` + `orchestra benchmark`) compares declared effort baselines against actual cycle time and automatically collected quality signals from the event log.
330
+ - Sprint burndown (`orchestra burndown`) computes ideal vs actual lines from developer or architect story point estimates.
331
+ - No real LLM calls in the autonomous engine — phases complete deterministically and generate handoff artifacts; LLM execution per phase is a future layer.
218
332
  - No automatic code editing.
219
- - No Playwright generation yet.
220
333
  - Python workers are represented in config only and disabled by default.
221
334
  - Static analysis is enforced locally through `.githooks/pre-commit` after running `npm run hooks:install`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jterrats/open-orchestra",
3
- "version": "0.2.1",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "orchestra": "bin/orchestra.js"
@@ -27,11 +27,10 @@
27
27
  "eslint": "^10.2.1",
28
28
  "prettier": "^3.8.3",
29
29
  "typescript": "^6.0.3",
30
- "typescript-eslint": "^8.59.0"
31
- },
32
- "dependencies": {
30
+ "typescript-eslint": "^8.59.0",
33
31
  "chart.js": "^4.5.1"
34
32
  },
33
+ "dependencies": {},
35
34
  "description": "Local control plane for AI-assisted development orchestration, evidence gates, and agent workflows.",
36
35
  "repository": {
37
36
  "type": "git",