@azure-id/orc 1.9.2 → 2.1.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.
- package/CHANGELOG.md +722 -0
- package/README-id.md +56 -42
- package/README.md +58 -41
- package/bin/build-agents.js +125 -29
- package/bin/clear-logs.js +620 -0
- package/bin/cli.js +1873 -180
- package/bin/fix.js +459 -0
- package/bin/gotcha-import.js +1081 -0
- package/bin/gotcha.js +1566 -0
- package/bin/graph-query.js +1 -1
- package/bin/graph.js +717 -717
- package/bin/habit.js +1538 -0
- package/bin/mockrun-catalog.js +284 -276
- package/bin/onboarding-content.js +2 -1
- package/bin/pricing.json +28 -21
- package/bin/run-undo.js +398 -0
- package/bin/trace-write.js +869 -0
- package/bin/verify-contracts.js +627 -100
- package/bin/verify-package.js +68 -10
- package/bin/webui/api.js +151 -6
- package/bin/webui/app.html +239 -232
- package/bin/webui/css/00-tokens.css +110 -92
- package/bin/webui/css/04-motion.css +87 -0
- package/bin/webui/css/06-responsive.css +203 -178
- package/bin/webui/css/panels/behaviour.css +205 -0
- package/bin/webui/css/panels/hookui.css +79 -0
- package/bin/webui/fixtures/behaviour.js +562 -0
- package/bin/webui/fixtures/extra.js +9 -9
- package/bin/webui/fixtures/flow.js +81 -81
- package/bin/webui/fixtures/hookui.js +506 -431
- package/bin/webui/fixtures/index.js +66 -3
- package/bin/webui/fixtures/knowledge.js +9 -3
- package/bin/webui/fixtures/maintenance.js +123 -42
- package/bin/webui/fixtures/rules.js +1007 -1002
- package/bin/webui/fixtures/settings.js +6 -7
- package/bin/webui/fixtures/stats.js +25 -6
- package/bin/webui/fixtures/wait.js +98 -97
- package/bin/webui/i18n/en/behaviour.json +156 -0
- package/bin/webui/i18n/en/hookui.json +290 -194
- package/bin/webui/i18n/en/maintenance.json +71 -52
- package/bin/webui/i18n/en/nav.json +25 -24
- package/bin/webui/i18n/en/settings.json +60 -60
- package/bin/webui/i18n/en/tour.json +37 -35
- package/bin/webui/i18n/id/behaviour.json +156 -0
- package/bin/webui/i18n/id/hookui.json +290 -194
- package/bin/webui/i18n/id/maintenance.json +71 -52
- package/bin/webui/i18n/id/nav.json +25 -24
- package/bin/webui/i18n/id/settings.json +60 -60
- package/bin/webui/i18n/id/tour.json +37 -35
- package/bin/webui/js/01-i18n.js +155 -154
- package/bin/webui/js/05-banners.js +181 -172
- package/bin/webui/js/06-edit.js +193 -183
- package/bin/webui/js/90-tour.js +498 -494
- package/bin/webui/js/91-shortcuts.js +126 -126
- package/bin/webui/js/99-boot.js +121 -118
- package/bin/webui/js/panels/behaviour.js +1087 -0
- package/bin/webui/js/panels/hookui.js +2196 -1691
- package/bin/webui/js/panels/maintenance.js +336 -235
- package/bin/webui/js/panels/settings.js +726 -719
- package/mock-run/INDEX.md +110 -107
- package/mock-run/extra-slots.md +1 -1
- package/mock-run/gotcha-import.md +118 -0
- package/mock-run/habits.md +129 -0
- package/mock-run/orc-aftermath.md +392 -392
- package/mock-run/orc-budget.md +29 -33
- package/mock-run/orc-cli.md +200 -200
- package/mock-run/orc-explain.md +86 -86
- package/mock-run/orc-extra.md +389 -392
- package/mock-run/orc-fix.md +87 -0
- package/mock-run/orc-pattern.md +112 -112
- package/mock-run/orc-quick.md +6 -1
- package/mock-run/orc.md +157 -157
- package/package.json +1 -1
- package/templates/agents/MODEL-MAPPING.md +37 -34
- package/templates/agents/orc-advisor-opus-5-xhigh.md +1 -7
- package/templates/agents/orc-analyze-mini-opus-5-med.md +1 -6
- package/templates/agents/orc-analyze-mini-sonnet-5-high.md +2 -5
- package/templates/agents/{orc-claude-writer-opus-4-8-high.md → orc-claude-writer-opus-5-low.md} +48 -53
- package/templates/agents/orc-context-combiner-opus-5-high.md +1 -11
- package/templates/agents/orc-executor-haiku-4-5.md +14 -6
- package/templates/agents/orc-executor-opus-4-7-high.md +14 -6
- package/templates/agents/orc-executor-opus-4-7-med.md +14 -6
- package/templates/agents/orc-executor-opus-4-8-high.md +14 -6
- package/templates/agents/orc-executor-opus-5-high.md +14 -6
- package/templates/agents/orc-executor-opus-5-low.md +14 -6
- package/templates/agents/orc-executor-opus-5-med.md +14 -6
- package/templates/agents/orc-executor-sonnet-4-6-high.md +14 -6
- package/templates/agents/orc-executor-sonnet-4-6-med.md +14 -6
- package/templates/agents/orc-executor-sonnet-5-high.md +15 -7
- package/templates/agents/orc-executor-sonnet-5-low.md +155 -0
- package/templates/agents/orc-executor-sonnet-5-med.md +155 -0
- package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +1 -10
- package/templates/agents/orc-judge-opus-5-xhigh.md +5 -9
- package/templates/agents/orc-learn-writer-opus-5-low.md +1 -7
- package/templates/agents/orc-pattern-codifier-opus-5-med.md +1 -8
- package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +58 -63
- package/templates/agents/orc-planner-mini-opus-5-med.md +1 -4
- package/templates/agents/orc-planner-mini-sonnet-5-high.md +2 -3
- package/templates/agents/orc-planner-opus-5-med.md +1 -4
- package/templates/agents/orc-recon-opus-5-low.md +1 -8
- package/templates/agents/orc-recon-sonnet-4-6-med.md +1 -8
- package/templates/agents/orc-retro-opus-5-med.md +6 -8
- package/templates/agents/orc-retro-sonnet-5-high.md +7 -8
- package/templates/agents/orc-reviewer-opus-5-low.md +96 -0
- package/templates/agents/orc-scout-opus-5-low.md +1 -6
- package/templates/agents/orc-scout-sonnet-4-6-high.md +35 -39
- package/templates/agents/orc-system-analyst-opus-5-high.md +1 -6
- package/templates/agents/orc-test-author-opus-5-med.md +4 -5
- package/templates/agents/orc-trace-writer-haiku-4-5.md +3 -7
- package/templates/agents/orc-verifier-opus-5-med.md +16 -8
- package/templates/agents/{orc-wiki-scanner-opus-4-8-high.md → orc-wiki-scanner-opus-5-low.md} +74 -79
- package/templates/agents/orc-wiki-scanner-sonnet-5-high.md +97 -106
- package/templates/commands/orc-analyze.md +13 -21
- package/templates/commands/orc-fast.md +10 -15
- package/templates/commands/orc-fix.md +18 -0
- package/templates/commands/orc-poly.md +12 -21
- package/templates/commands/orc-pr-driver.md +11 -30
- package/templates/commands/orc-pr-setup.md +10 -31
- package/templates/commands/orc-route.md +11 -41
- package/templates/commands/orc-test.md +5 -60
- package/templates/commands/orc-wiki.md +64 -64
- package/templates/hooks/README.md +109 -7
- package/templates/hooks/orc-session-hook.js +339 -0
- package/templates/hooks/orc-statusline-render.js +317 -23
- package/templates/hooks/orc-statusline.js +165 -50
- package/templates/hooks/orc-subagent-line.js +23 -5
- package/templates/hooks/orc-weather-fetch.js +123 -0
- package/templates/skills/_shared/README.md +9 -0
- package/templates/skills/_shared/code-graph.md +47 -55
- package/templates/skills/_shared/config-precedence.md +3 -1
- package/templates/skills/_shared/extra-dispatch.md +78 -93
- package/templates/skills/_shared/gotchas.md +248 -177
- package/templates/skills/_shared/habits.md +101 -0
- package/templates/skills/_shared/lane-contract.md +84 -0
- package/templates/skills/_shared/opus5-only.md +14 -14
- package/templates/skills/_shared/phases/README.md +142 -83
- package/templates/skills/_shared/phases/analyst-gates.md +10 -21
- package/templates/skills/_shared/phases/execution.md +8 -14
- package/templates/skills/_shared/phases/house-rules.md +27 -32
- package/templates/skills/_shared/phases/intake.md +127 -133
- package/templates/skills/_shared/phases/mock-example.md +46 -56
- package/templates/skills/_shared/phases/plan-handoff.md +91 -97
- package/templates/skills/_shared/phases/planning.md +7 -17
- package/templates/skills/_shared/phases/preflight.md +19 -42
- package/templates/skills/_shared/phases/review.md +24 -28
- package/templates/skills/_shared/phases/rules.md +18 -42
- package/templates/skills/_shared/phases/scoring.md +55 -65
- package/templates/skills/_shared/phases/security-checklist.md +46 -50
- package/templates/skills/_shared/phases/security.md +45 -55
- package/templates/skills/_shared/phases/ship.md +6 -15
- package/templates/skills/_shared/phases/stop-resume.md +2 -5
- package/templates/skills/_shared/phases/summary.md +73 -48
- package/templates/skills/_shared/phases/testgen.md +41 -51
- package/templates/skills/_shared/phases/trace-verbs.md +447 -0
- package/templates/skills/_shared/phases/trace.md +66 -297
- package/templates/skills/_shared/phases/verify.md +62 -70
- package/templates/skills/_shared/phases/wave-grouping.md +128 -133
- package/templates/skills/_shared/phases/wiki-consult.md +10 -6
- package/templates/skills/_shared/read-ladder.md +2 -55
- package/templates/skills/_shared/return-validation.md +17 -70
- package/templates/skills/_shared/review-slice.md +106 -0
- package/templates/skills/_shared/smoke-gate.md +46 -28
- package/templates/skills/_shared/wait.md +1 -0
- package/templates/skills/context-combiner/SKILL.md +15 -44
- package/templates/skills/orc/README.md +2 -2
- package/templates/skills/orc/SKILL.md +35 -63
- package/templates/skills/orc/config.md +25 -27
- package/templates/skills/orc/examples/full-run-mock.md +2 -1
- package/templates/skills/orc/references/effort-and-mode.md +17 -17
- package/templates/skills/orc/references/pattern-gate.md +89 -89
- package/templates/skills/orc/references/phases/intake.md +41 -47
- package/templates/skills/orc/references/phases/integration.md +13 -19
- package/templates/skills/orc/references/preflight-report.md +11 -12
- package/templates/skills/orc/references/ultra-mode.md +9 -7
- package/templates/skills/orc/schemas/checkpoint.md +122 -122
- package/templates/skills/orc/subskills/orc-execution/SKILL.md +27 -73
- package/templates/skills/orc/subskills/orc-execution/core.md +12 -99
- package/templates/skills/orc/subskills/orc-execution/subagent.md +14 -13
- package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +12 -53
- package/templates/skills/orc/subskills/orc-review-verify/core.md +52 -135
- package/templates/skills/orc/subskills/orc-review-verify/subagent.md +7 -7
- package/templates/skills/orc/subskills/orc-testgen/SKILL.md +11 -22
- package/templates/skills/orc/subskills/orc-testgen/core.md +20 -59
- package/templates/skills/orc/subskills/orc-testgen/subagent.md +7 -7
- package/templates/skills/orc-advisor/SKILL.md +56 -60
- package/templates/skills/orc-analyze/SKILL.md +33 -67
- package/templates/skills/orc-analyze/schemas/report-audit.md +2 -1
- package/templates/skills/orc-analyze/schemas/report-prose.md +2 -1
- package/templates/skills/orc-analyze-mini/SKILL.md +35 -70
- package/templates/skills/orc-claude/SKILL.md +14 -14
- package/templates/skills/orc-claude/examples/claude-run-mock.md +65 -65
- package/templates/skills/orc-diy/README.md +31 -0
- package/templates/skills/orc-diy/SKILL.md +27 -78
- package/templates/skills/orc-diy/references/blocks/pattern.md +18 -18
- package/templates/skills/orc-fast/SKILL.md +49 -75
- package/templates/skills/orc-fix/SKILL.md +110 -0
- package/templates/skills/orc-judge/SKILL.md +77 -82
- package/templates/skills/orc-mini/SKILL.md +64 -112
- package/templates/skills/orc-mini/examples/mini-run-mock.md +4 -2
- package/templates/skills/orc-pattern/SKILL.md +27 -48
- package/templates/skills/orc-poly/SKILL.md +32 -61
- package/templates/skills/orc-pr-driver/SKILL.md +25 -51
- package/templates/skills/orc-pr-driver/references/green-gate.md +113 -105
- package/templates/skills/orc-pr-setup/SKILL.md +20 -45
- package/templates/skills/orc-quick/README.md +44 -3
- package/templates/skills/orc-quick/SKILL.md +77 -108
- package/templates/skills/orc-quick/references/dispatch-gate.md +18 -6
- package/templates/skills/orc-quick/references/gh-mode.md +50 -1
- package/templates/skills/orc-quick/references/look.md +3 -1
- package/templates/skills/orc-retro/SKILL.md +20 -19
- package/templates/skills/orc-retro/examples/retro-mock.md +17 -17
- package/templates/skills/orc-route/SKILL.md +25 -45
- package/templates/skills/orc-test/SKILL.md +16 -37
- package/templates/skills/orc-verify/SKILL.md +14 -32
- package/templates/skills/orc-wait/SKILL.md +156 -163
- package/templates/skills/orc-wiki/README.md +325 -325
- package/templates/skills/orc-wiki/SKILL.md +195 -195
- package/templates/skills/orc-wiki/examples/wiki-run-mock.md +37 -37
- package/templates/skills/orc-wiki/references/extra.md +2 -2
- package/templates/skills/orc-wiki/references/partial-refresh.md +276 -271
- package/templates/skills/orc-wiki/references/phases/phase-0.md +2 -7
- package/templates/skills/orc-wiki/references/phases/phase-1.md +1 -6
- package/templates/skills/orc-wiki/references/phases/phase-2.md +4 -9
- package/templates/skills/orc-wiki/references/phases/phase-3.md +1 -6
- package/templates/skills/orc-wiki/references/phases/phase-3c.md +4 -8
- package/templates/agents/orc-claude-writer-opus-5-med.md +0 -55
- package/templates/agents/orc-reviewer-opus-5-med.md +0 -60
- package/templates/agents/orc-wiki-scanner-opus-5-med.md +0 -81
|
@@ -1,122 +1,122 @@
|
|
|
1
|
-
# Schema — Durable Checkpoint + State-of-Play
|
|
2
|
-
|
|
3
|
-
Two files, two jobs:
|
|
4
|
-
- `run/{run-slug}/checkpoint.json` — machine truth. Orchestrator-only writes.
|
|
5
|
-
Survives pause, compaction, crash, fresh sessions. KEPT after success (audit).
|
|
6
|
-
- `run/{run-slug}/state-of-play.md` — 10-line human-readable re-anchor. Read FIRST on any
|
|
7
|
-
resume, then the checkpoint for detail.
|
|
8
|
-
|
|
9
|
-
## run/{run-slug}/checkpoint.json
|
|
10
|
-
|
|
11
|
-
```jsonc
|
|
12
|
-
{
|
|
13
|
-
"run_id": "run-020726-1422",
|
|
14
|
-
"schema_version": "0.2",
|
|
15
|
-
"phase": "execution", // intake|planning|scoring|execution|integration|review|verify|summary|ship|done
|
|
16
|
-
"planner": "openspec",
|
|
17
|
-
"effort": "medium",
|
|
18
|
-
"execution_model": "parallel", // sequential | parallel | parallel_worktrees
|
|
19
|
-
"source_branch": "feat/notifications",
|
|
20
|
-
"intent_spec": "run/merchant-notifications/intent-spec.md",
|
|
21
|
-
"batch_pause_every": 2,
|
|
22
|
-
"pause_schedule": [2], // wave indices where a MANDATORY batch stop fires
|
|
23
|
-
// (computed from the Phase 2 answer; last wave never included) —
|
|
24
|
-
// a resumed session enforces the same hard boundaries
|
|
25
|
-
"logging_enabled": true, // logging is PERMANENT (always on) — re-anchor the behavior trace on resume
|
|
26
|
-
"trace_path": null, // "<log_dir>/run-<lane>-<slug>-<DDMMYY>-<HHMMSS>.txt" — the run's trace file
|
|
27
|
-
"ultra_mode": false, // true only on /orc-ultra runs; gates the "ultra" block below
|
|
28
|
-
"ultra": null, /* when ultra_mode — a resumed run continues mid-gate/mid-loop:
|
|
29
|
-
{ "brief_path": "run/…/ultra/advisory-brief.md",
|
|
30
|
-
"ledger_path": "run/…/ultra/assumption-ledger.md",
|
|
31
|
-
"matrix_path": null, // set before gate 3
|
|
32
|
-
"gates": { // per-gate judgment state
|
|
33
|
-
"analysis": { "verdict": "approve", "round": 1, "loops_used": 0 },
|
|
34
|
-
"plan": { "verdict": "revise", "round": 2, "loops_used": 1 },
|
|
35
|
-
"implementation": { "verdict": null, "round": 0, "loops_used": 0 } } } */
|
|
36
|
-
"current_wave": 2,
|
|
37
|
-
"paused": true,
|
|
38
|
-
"pause_trigger": "batch_pause", // batch_pause | token_limit | phase_transition | crash_guard
|
|
39
|
-
|
|
40
|
-
"plan": { /* full planning-output object */ },
|
|
41
|
-
|
|
42
|
-
// fast-resume mirror; kept in sync on every task state change
|
|
43
|
-
"task_state": {
|
|
44
|
-
"T1": { "status": "done", "retry_count": 0, "context_requests": 0,
|
|
45
|
-
"failure_reason": null, "progress": null,
|
|
46
|
-
"actual_files": ["db/migrations/0001.sql", "models/notification.x", "models/notification.test.x"] },
|
|
47
|
-
"T3": { "status": "partial", "retry_count": 0, "context_requests": 1,
|
|
48
|
-
"failure_reason": null,
|
|
49
|
-
"progress": { "percent": 60, "files_written": ["services/email_digest/scheduler.x"],
|
|
50
|
-
"notes": "daily path done; weekly cron pending" } }
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
// every spawn, for the usage report + rubric audit
|
|
54
|
-
"dispatch_log": [
|
|
55
|
-
{ "task_id": "T1", "computed_score": 72, "override_score": null,
|
|
56
|
-
"override_reason": null, "model": "sonnet-5", "effort": "medium",
|
|
57
|
-
"spawned_at": "020726 14:24:01.100",
|
|
58
|
-
// claimed-vs-actual (only when logging_enabled): what the worker reported
|
|
59
|
-
"actual_model": "claude-sonnet-5", "actual_effort": "medium",
|
|
60
|
-
"verify": "match" }, // match | downgrade
|
|
61
|
-
|
|
62
|
-
{ "task_id": "T6", "computed_score": 88, "override_score": 62,
|
|
63
|
-
"override_reason": "rubric over-weighted file count; isolated leaf UI",
|
|
64
|
-
"model": "sonnet-5", "effort": "high", "spawned_at": "020726 15:01:22.040" }
|
|
65
|
-
],
|
|
66
|
-
|
|
67
|
-
"worktrees": { /* subagent_worktrees mode: agent → {path, branch, merged} */ },
|
|
68
|
-
"merge_state": null, // null | pending_verify | merged | conflict_resolving
|
|
69
|
-
|
|
70
|
-
"escalations": [
|
|
71
|
-
{ "id": "E1", "agent": "Agent-C", "task": "T3",
|
|
72
|
-
"question": "Digest send time?", "answer": "07:00 fixed",
|
|
73
|
-
"at": "020726 14:28:41.507",
|
|
74
|
-
"affected_tasks": [], "downstream_flagged": [] }
|
|
75
|
-
],
|
|
76
|
-
|
|
77
|
-
"review": { "ran": false }, // when ran: p0[], p1[], p2[], p3[], model, effort
|
|
78
|
-
// (v1 checkpoints used blocking[]/nits[] — on resume
|
|
79
|
-
// map blocking→p1, nits→p3; never rewrite the old file.
|
|
80
|
-
// v0.7.0+: each recorded P0–P2 finding keeps its
|
|
81
|
-
// file:line + verbatim quote so a resumed run can
|
|
82
|
-
// re-run the quote spot-check before acting)
|
|
83
|
-
"verify": { "ran": false }, // result, autofix_used, autofix_remaining (starts 1)
|
|
84
|
-
"ship": { "commit": null, "push": null, "create_pr": null,
|
|
85
|
-
"ticket": null, "pr_title": null, "target_branch": null, "pr_file": null },
|
|
86
|
-
|
|
87
|
-
"decision_log": "run/merchant-notifications/decision-log.md",
|
|
88
|
-
"created_at": "020726 14:22:01.000",
|
|
89
|
-
"updated_at": "020726 15:02:00.331"
|
|
90
|
-
}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
## run/{run-slug}/state-of-play.md (regenerated at every checkpoint write)
|
|
94
|
-
|
|
95
|
-
```markdown
|
|
96
|
-
# State of Play — run-020726-1422
|
|
97
|
-
Phase: execution · Wave 2 of 3 · PAUSED (batch)
|
|
98
|
-
Done: T1 T2 T4 · Partial: T3 (60%, weekly cron pending) · Pending: T5 T6
|
|
99
|
-
Mode: subagent · Planner: openspec · Branch: feat/notifications
|
|
100
|
-
Last decision: digest send 07:00 fixed (user, via Agent-C)
|
|
101
|
-
Next action on resume: finish T3 from milestone, then dispatch wave 3
|
|
102
|
-
Intent: merchant notifications (in-app + email digest + prefs) — no push, no admin
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
## Write discipline
|
|
106
|
-
|
|
107
|
-
- Orchestrator-only. Atomic write (temp file + rename). `updated_at` bumped to
|
|
108
|
-
ms on every write.
|
|
109
|
-
- Write EAGERLY: after every wave, escalation answer, phase transition, and
|
|
110
|
-
before any risky operation — so surprise compaction never catches
|
|
111
|
-
conversation-only state.
|
|
112
|
-
- A failed/malformed checkpoint write is a FAILURE: do not stop the session on
|
|
113
|
-
it; surface it.
|
|
114
|
-
|
|
115
|
-
## Resume contract
|
|
116
|
-
|
|
117
|
-
1. Read state-of-play (orientation) → newest checkpoint (`updated_at` wins).
|
|
118
|
-
2. Fresh session: one-line intent reconfirm from the Intent line.
|
|
119
|
-
3. task_state: done stays done · partial resumes from progress.files_written ·
|
|
120
|
-
pending awaits wave · requeued/failed re-dispatch reading failure_reason ·
|
|
121
|
-
stale_review gets a review pass.
|
|
122
|
-
4. Re-attach decision log, regenerate digest, continue from `phase`.
|
|
1
|
+
# Schema — Durable Checkpoint + State-of-Play
|
|
2
|
+
|
|
3
|
+
Two files, two jobs:
|
|
4
|
+
- `run/{run-slug}/checkpoint.json` — machine truth. Orchestrator-only writes.
|
|
5
|
+
Survives pause, compaction, crash, fresh sessions. KEPT after success (audit).
|
|
6
|
+
- `run/{run-slug}/state-of-play.md` — 10-line human-readable re-anchor. Read FIRST on any
|
|
7
|
+
resume, then the checkpoint for detail.
|
|
8
|
+
|
|
9
|
+
## run/{run-slug}/checkpoint.json
|
|
10
|
+
|
|
11
|
+
```jsonc
|
|
12
|
+
{
|
|
13
|
+
"run_id": "run-020726-1422",
|
|
14
|
+
"schema_version": "0.2",
|
|
15
|
+
"phase": "execution", // intake|planning|scoring|execution|integration|review|verify|summary|ship|done
|
|
16
|
+
"planner": "openspec",
|
|
17
|
+
"effort": "medium",
|
|
18
|
+
"execution_model": "parallel", // sequential | parallel | parallel_worktrees
|
|
19
|
+
"source_branch": "feat/notifications",
|
|
20
|
+
"intent_spec": "run/merchant-notifications/intent-spec.md",
|
|
21
|
+
"batch_pause_every": 2,
|
|
22
|
+
"pause_schedule": [2], // wave indices where a MANDATORY batch stop fires
|
|
23
|
+
// (computed from the Phase 2 answer; last wave never included) —
|
|
24
|
+
// a resumed session enforces the same hard boundaries
|
|
25
|
+
"logging_enabled": true, // logging is PERMANENT (always on) — re-anchor the behavior trace on resume
|
|
26
|
+
"trace_path": null, // "<log_dir>/run-<lane>-<slug>-<DDMMYY>-<HHMMSS>.txt" — the run's trace file
|
|
27
|
+
"ultra_mode": false, // true only on /orc-ultra runs; gates the "ultra" block below
|
|
28
|
+
"ultra": null, /* when ultra_mode — a resumed run continues mid-gate/mid-loop:
|
|
29
|
+
{ "brief_path": "run/…/ultra/advisory-brief.md",
|
|
30
|
+
"ledger_path": "run/…/ultra/assumption-ledger.md",
|
|
31
|
+
"matrix_path": null, // set before gate 3
|
|
32
|
+
"gates": { // per-gate judgment state
|
|
33
|
+
"analysis": { "verdict": "approve", "round": 1, "loops_used": 0 },
|
|
34
|
+
"plan": { "verdict": "revise", "round": 2, "loops_used": 1 },
|
|
35
|
+
"implementation": { "verdict": null, "round": 0, "loops_used": 0 } } } */
|
|
36
|
+
"current_wave": 2,
|
|
37
|
+
"paused": true,
|
|
38
|
+
"pause_trigger": "batch_pause", // batch_pause | token_limit | phase_transition | crash_guard
|
|
39
|
+
|
|
40
|
+
"plan": { /* full planning-output object */ },
|
|
41
|
+
|
|
42
|
+
// fast-resume mirror; kept in sync on every task state change
|
|
43
|
+
"task_state": {
|
|
44
|
+
"T1": { "status": "done", "retry_count": 0, "context_requests": 0,
|
|
45
|
+
"failure_reason": null, "progress": null,
|
|
46
|
+
"actual_files": ["db/migrations/0001.sql", "models/notification.x", "models/notification.test.x"] },
|
|
47
|
+
"T3": { "status": "partial", "retry_count": 0, "context_requests": 1,
|
|
48
|
+
"failure_reason": null,
|
|
49
|
+
"progress": { "percent": 60, "files_written": ["services/email_digest/scheduler.x"],
|
|
50
|
+
"notes": "daily path done; weekly cron pending" } }
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
// every spawn, for the usage report + rubric audit
|
|
54
|
+
"dispatch_log": [
|
|
55
|
+
{ "task_id": "T1", "computed_score": 72, "override_score": null,
|
|
56
|
+
"override_reason": null, "model": "sonnet-5", "effort": "medium",
|
|
57
|
+
"spawned_at": "020726 14:24:01.100",
|
|
58
|
+
// claimed-vs-actual (only when logging_enabled): what the worker reported
|
|
59
|
+
"actual_model": "claude-sonnet-5-5", "actual_effort": "medium",
|
|
60
|
+
"verify": "match" }, // match | downgrade
|
|
61
|
+
|
|
62
|
+
{ "task_id": "T6", "computed_score": 88, "override_score": 62,
|
|
63
|
+
"override_reason": "rubric over-weighted file count; isolated leaf UI",
|
|
64
|
+
"model": "sonnet-5", "effort": "high", "spawned_at": "020726 15:01:22.040" }
|
|
65
|
+
],
|
|
66
|
+
|
|
67
|
+
"worktrees": { /* subagent_worktrees mode: agent → {path, branch, merged} */ },
|
|
68
|
+
"merge_state": null, // null | pending_verify | merged | conflict_resolving
|
|
69
|
+
|
|
70
|
+
"escalations": [
|
|
71
|
+
{ "id": "E1", "agent": "Agent-C", "task": "T3",
|
|
72
|
+
"question": "Digest send time?", "answer": "07:00 fixed",
|
|
73
|
+
"at": "020726 14:28:41.507",
|
|
74
|
+
"affected_tasks": [], "downstream_flagged": [] }
|
|
75
|
+
],
|
|
76
|
+
|
|
77
|
+
"review": { "ran": false }, // when ran: p0[], p1[], p2[], p3[], model, effort
|
|
78
|
+
// (v1 checkpoints used blocking[]/nits[] — on resume
|
|
79
|
+
// map blocking→p1, nits→p3; never rewrite the old file.
|
|
80
|
+
// v0.7.0+: each recorded P0–P2 finding keeps its
|
|
81
|
+
// file:line + verbatim quote so a resumed run can
|
|
82
|
+
// re-run the quote spot-check before acting)
|
|
83
|
+
"verify": { "ran": false }, // result, autofix_used, autofix_remaining (starts 1)
|
|
84
|
+
"ship": { "commit": null, "push": null, "create_pr": null,
|
|
85
|
+
"ticket": null, "pr_title": null, "target_branch": null, "pr_file": null },
|
|
86
|
+
|
|
87
|
+
"decision_log": "run/merchant-notifications/decision-log.md",
|
|
88
|
+
"created_at": "020726 14:22:01.000",
|
|
89
|
+
"updated_at": "020726 15:02:00.331"
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## run/{run-slug}/state-of-play.md (regenerated at every checkpoint write)
|
|
94
|
+
|
|
95
|
+
```markdown
|
|
96
|
+
# State of Play — run-020726-1422
|
|
97
|
+
Phase: execution · Wave 2 of 3 · PAUSED (batch)
|
|
98
|
+
Done: T1 T2 T4 · Partial: T3 (60%, weekly cron pending) · Pending: T5 T6
|
|
99
|
+
Mode: subagent · Planner: openspec · Branch: feat/notifications
|
|
100
|
+
Last decision: digest send 07:00 fixed (user, via Agent-C)
|
|
101
|
+
Next action on resume: finish T3 from milestone, then dispatch wave 3
|
|
102
|
+
Intent: merchant notifications (in-app + email digest + prefs) — no push, no admin
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Write discipline
|
|
106
|
+
|
|
107
|
+
- Orchestrator-only. Atomic write (temp file + rename). `updated_at` bumped to
|
|
108
|
+
ms on every write.
|
|
109
|
+
- Write EAGERLY: after every wave, escalation answer, phase transition, and
|
|
110
|
+
before any risky operation — so surprise compaction never catches
|
|
111
|
+
conversation-only state.
|
|
112
|
+
- A failed/malformed checkpoint write is a FAILURE: do not stop the session on
|
|
113
|
+
it; surface it.
|
|
114
|
+
|
|
115
|
+
## Resume contract
|
|
116
|
+
|
|
117
|
+
1. Read state-of-play (orientation) → newest checkpoint (`updated_at` wins).
|
|
118
|
+
2. Fresh session: one-line intent reconfirm from the Intent line.
|
|
119
|
+
3. task_state: done stays done · partial resumes from progress.files_written ·
|
|
120
|
+
pending awaits wave · requeued/failed re-dispatch reading failure_reason ·
|
|
121
|
+
stale_review gets a review pass.
|
|
122
|
+
4. Re-attach decision log, regenerate digest, continue from `phase`.
|
|
@@ -1,73 +1,27 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: orc-execution
|
|
3
|
-
description: >
|
|
4
|
-
Executor worker for ORC — the single-task implementer. Given one task slice
|
|
5
|
-
(task_id, declared_files, constraints, spec_ref, log_digest), it implements
|
|
6
|
-
EXACTLY that task within its declared files, honors every hard-rule constraint,
|
|
7
|
-
creates/updates tests, emits milestone progress pings, and returns a strict
|
|
8
|
-
contract (status done|failed|partial|needs_context, actual_files, log_entries,
|
|
9
|
-
and claimed-vs-actual model/effort so the caller can catch a silent tier
|
|
10
|
-
downgrade). Dispatched once per task in an execution wave, on the scored model
|
|
11
|
-
pinned by its executor agent. Distinct from the review/verify/test-author
|
|
12
|
-
workers — this one writes the implementation. ALWAYS a spawned subagent; the
|
|
13
|
-
orchestrator never implements. Not for direct user invocation.
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
# orc-execution
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
prepending `subagent.md` framing + the input slice
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
(surgical changes, simplicity-first, no unrequested scope, never claim
|
|
29
|
-
unobserved results, honest partial over false done), then the `rules_card`
|
|
30
|
-
under it (project rules beat ORC rules; return the three `rules_*` fields); create/update
|
|
31
|
-
tests for what you build.
|
|
32
|
-
3. Run the proof: build/test for your changes, capturing `evidence`
|
|
33
|
-
{command, exit_code, tail} VERBATIM (no runner → `no_runner_detected: true`);
|
|
34
|
-
self-check the diff against the slice's `acceptance[]` + `constraints[]` —
|
|
35
|
-
anything unsatisfied goes in `unmet[]` (non-empty = partial/failed, never done).
|
|
36
|
-
4. Emit milestone pings ({percent, files_written[], notes}) as you go.
|
|
37
|
-
5. Stay in your slice — need outside context? emit `needs_context`, don't fetch it.
|
|
38
|
-
|
|
39
|
-
## Return shape (summary — full contract in `core.md`)
|
|
40
|
-
|
|
41
|
-
`{ task_id, actual_model, actual_effort, status: done|failed|partial|needs_context,
|
|
42
|
-
actual_files[], evidence, no_runner_detected, unmet[], log_entries[],
|
|
43
|
-
failure_reason, progress, context_request,
|
|
44
|
-
pattern_version, invariants_checked, tdd_state }`
|
|
45
|
-
|
|
46
|
-
When the slice carries a `pattern`, MATCH its conventions, satisfy every BLOCKING
|
|
47
|
-
invariant AND every enforceable `validation_gate[]` line (advisory gate lines are
|
|
48
|
-
informational); echo the `pattern_version` and set `invariants_checked: true` only after
|
|
49
|
-
re-checking your diff. A pattern task that returns false/absent here is malformed.
|
|
50
|
-
|
|
51
|
-
When the slice carries a `tdd_spec` (v0.33.0), run its materialized tests and
|
|
52
|
-
implement to green — implement→test→repair, capped at the slice's
|
|
53
|
-
`tdd_loop_max`; never edit a TDD test to make it pass (a wrong-looking test is
|
|
54
|
-
a spec bug — return it). Return `tdd_state: green|red` (green needs the passing
|
|
55
|
-
run in `evidence`; `done` with red is malformed).
|
|
56
|
-
|
|
57
|
-
**Crosslink injection (orchestrator-side, advisory).** At slice assembly, if a
|
|
58
|
-
task's declared files include a call site that matches an entry in
|
|
59
|
-
`.claude/orc/crosslink/needs.json`, prepend the cached tag contract (from
|
|
60
|
-
`.claude/orc/crosslink/cache/`) to the slice as `crosslink`, labeled with its
|
|
61
|
-
effective cross-repo tier + "hints, not verified". The executor MATCHES the
|
|
62
|
-
stated field names/types but never lets it override local code — it is advisory,
|
|
63
|
-
so there is NO return field and nothing to attest (unlike `pattern`). A task with
|
|
64
|
-
no boundary carries no `crosslink`.
|
|
65
|
-
On a UI task, if the environment ships a `frontend-design` skill, read and apply
|
|
66
|
-
it (skip silently when absent).
|
|
67
|
-
|
|
68
|
-
**Validation checkpoint before returning:** `status=failed` REQUIRES a
|
|
69
|
-
`failure_reason`; `needs_context` REQUIRES a `context_request` (capped at 2/task);
|
|
70
|
-
`actual_model` is quoted VERBATIM from your system prompt, never inferred;
|
|
71
|
-
`status=done` REQUIRES `evidence` when a runner exists (else
|
|
72
|
-
`no_runner_detected: true`) and an EMPTY `unmet[]`. A
|
|
73
|
-
malformed return is treated as failure by the caller.
|
|
1
|
+
---
|
|
2
|
+
name: orc-execution
|
|
3
|
+
description: >
|
|
4
|
+
Executor worker for ORC — the single-task implementer. Given one task slice
|
|
5
|
+
(task_id, declared_files, constraints, spec_ref, log_digest), it implements
|
|
6
|
+
EXACTLY that task within its declared files, honors every hard-rule constraint,
|
|
7
|
+
creates/updates tests, emits milestone progress pings, and returns a strict
|
|
8
|
+
contract (status done|failed|partial|needs_context, actual_files, log_entries,
|
|
9
|
+
and claimed-vs-actual model/effort so the caller can catch a silent tier
|
|
10
|
+
downgrade). Dispatched once per task in an execution wave, on the scored model
|
|
11
|
+
pinned by its executor agent. Distinct from the review/verify/test-author
|
|
12
|
+
workers — this one writes the implementation. ALWAYS a spawned subagent; the
|
|
13
|
+
orchestrator never implements. Not for direct user invocation.
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# orc-execution
|
|
17
|
+
|
|
18
|
+
A pointer. The orchestrator spawns the scored executor agent via the Task tool,
|
|
19
|
+
prepending `subagent.md` framing + the input slice. The orchestrator never
|
|
20
|
+
implements.
|
|
21
|
+
|
|
22
|
+
- **Input slice** (the orchestrator builds it): `core.md`.
|
|
23
|
+
- **Procedure + return contract** (the ONE source): the executor agent file,
|
|
24
|
+
`.claude/agents/orc-executor-*.md`.
|
|
25
|
+
- **Validator** (the caller checks every return against it):
|
|
26
|
+
`../../../_shared/return-validation.md`. A malformed return is treated as
|
|
27
|
+
failure by the caller.
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
# orc-execution — Core (
|
|
1
|
+
# orc-execution — Core (the input slice)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
The INPUT SLICE the orchestrator builds for ONE executor dispatch. The
|
|
4
|
+
procedure and the return contract live in ONE place: the executor agent file
|
|
5
|
+
(`.claude/agents/orc-executor-*.md`). The caller validates the return against
|
|
6
|
+
`../../../_shared/return-validation.md`. The orchestrator never implements.
|
|
5
7
|
|
|
6
8
|
## Input slice (you receive exactly this; you cannot pull more)
|
|
7
9
|
|
|
@@ -31,9 +33,11 @@ subagent; the orchestrator never runs this itself.
|
|
|
31
33
|
- crosslink — the cross-repo boundary contract for a call site in
|
|
32
34
|
this task, or null. Present ONLY when a declared file
|
|
33
35
|
touches a boundary the orchestrator resolved from
|
|
34
|
-
`.claude/orc/crosslink/needs.json` +
|
|
36
|
+
`.claude/orc/crosslink/needs.json` + the cached tag
|
|
37
|
+
contract in `.claude/orc/crosslink/cache/`. It is
|
|
35
38
|
ADVISORY hints ("cross-repo fresh/aging/stale wiki")
|
|
36
|
-
labeled with an effective tier
|
|
39
|
+
labeled with an effective tier + "hints, not
|
|
40
|
+
verified" — MATCH the field
|
|
37
41
|
names/types/errors it states, but it never overrides
|
|
38
42
|
local code and there is nothing to attest (no return
|
|
39
43
|
field). Absent on any task with no boundary.
|
|
@@ -75,97 +79,6 @@ subagent; the orchestrator never runs this itself.
|
|
|
75
79
|
- worktree_path — null unless worktrees mode
|
|
76
80
|
- model, effort — informational (already applied by the caller)
|
|
77
81
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
2. Read spec_ref if provided.
|
|
82
|
-
2a. **Read on the ladder** (`../../../_shared/read-ladder.md`): locate
|
|
83
|
-
(Grep/Glob) → outline → the ±40 lines around the anchor → full. Stop at the
|
|
84
|
-
step that answers the question; two full reads with no answer is
|
|
85
|
-
`needs_context`, not a third. TWO EXCEPTIONS — every `declared_files` path is
|
|
86
|
-
a FULL read before you edit it (an `old_string` rebuilt from an outline is a
|
|
87
|
-
corruption bug), and build/test output is always read whole.
|
|
88
|
-
3. Perform the task within `worktree_path` (or the current tree if null).
|
|
89
|
-
Obey every `house_rules` line, then every `rules_card` rule (two rules that
|
|
90
|
-
disagree go in `rules_conflicts[]`, never a silent choice). Follow every constraint. If `pattern` is present, MATCH its conventions,
|
|
91
|
-
satisfy every BLOCKING invariant, and satisfy every enforceable
|
|
92
|
-
`validation_gate[]` line (re-read your diff to confirm before returning;
|
|
93
|
-
advisory gate lines are informational — never add tooling to meet one);
|
|
94
|
-
if `pattern` is null but carries invariants (agnostic), still satisfy them and
|
|
95
|
-
imitate the neighboring files you read. Create/update tests for what you build.
|
|
96
|
-
**UI task + a `frontend-design` skill present in the environment** (check
|
|
97
|
-
`.claude/skills/frontend-design/` or the plugin dir): read its SKILL.md and
|
|
98
|
-
apply its guidance to the UI work — skip silently when absent.
|
|
99
|
-
4. **Run the proof, capture the evidence:** if the project has a runnable build
|
|
100
|
-
or test setup, run it for your changes and capture {command, exit_code, the
|
|
101
|
-
last ~5 output lines} — QUOTED VERBATIM, never paraphrased, never predicted.
|
|
102
|
-
No runner → set `no_runner_detected: true` instead. Never claim green you
|
|
103
|
-
did not observe. With a `tdd_spec`: run ITS tests too — implement → test →
|
|
104
|
-
repair up to `tdd_loop_max` iterations; still red at the cap → stop and
|
|
105
|
-
return `tdd_state: red` honestly (the failing tests listed in unmet[]).
|
|
106
|
-
5. **Self-check before returning:** re-read your diff against every
|
|
107
|
-
`acceptance[]` line and every `constraints[]` rule. Anything you could not
|
|
108
|
-
satisfy goes in `unmet[]` — and a non-empty `unmet[]` means status `partial`
|
|
109
|
-
(or `failed`), never `done`. An honest partial beats a false done.
|
|
110
|
-
6. **Milestone pings:** after each declared file completed or logical subtask
|
|
111
|
-
done, emit a brief progress ping: {percent, files_written[], notes}. These
|
|
112
|
-
bound what a mid-wave stop can save — do not skip them.
|
|
113
|
-
7. Stay within your task. Discovering needed context outside your slice →
|
|
114
|
-
emit the needs_context return (below). Do NOT fetch it yourself.
|
|
115
|
-
|
|
116
|
-
## Return contract (emit EXACTLY this structure; the caller validates)
|
|
117
|
-
|
|
118
|
-
- task_id
|
|
119
|
-
- actual_model — the model id quoted VERBATIM from your system prompt
|
|
120
|
-
("The exact model ID is …"); NEVER inferred from priors;
|
|
121
|
-
`unknown` if no such line exists. Lets the caller catch
|
|
122
|
-
a silent tier downgrade (claimed-vs-actual model check)
|
|
123
|
-
- actual_effort — the value of $CLAUDE_EFFORT (read via Bash at start)
|
|
124
|
-
- status: done | failed | partial | needs_context
|
|
125
|
-
- actual_files[] — every file you truly touched (audited vs declared)
|
|
126
|
-
- evidence — {command, exit_code, tail} of the build/test you ran,
|
|
127
|
-
quoted VERBATIM (like actual_model — never invented).
|
|
128
|
-
REQUIRED when status=done and the project has a
|
|
129
|
-
runnable build/test; null when it has none
|
|
130
|
-
- no_runner_detected — true ONLY when the project exposes no runnable
|
|
131
|
-
build/test (explains a null evidence); else absent
|
|
132
|
-
- unmet[] — acceptance[]/constraints[] lines you could NOT
|
|
133
|
-
satisfy. MUST be empty when status=done — a
|
|
134
|
-
non-empty unmet[] forces partial/failed
|
|
135
|
-
- log_entries[] — cross-cutting decisions for the decision log,
|
|
136
|
-
tagged DECISION | CONSTRAINT | INTERFACE
|
|
137
|
-
- failure_reason — REQUIRED when status=failed (the why); else null
|
|
138
|
-
- progress — {percent, files_written[], notes} when partial; else null
|
|
139
|
-
- context_request — REQUIRED when status=needs_context: what you need
|
|
140
|
-
and why (e.g. "needs T1's type enum interface");
|
|
141
|
-
else null
|
|
142
|
-
- pattern_version — the `pattern.pattern_version` you applied; null if no
|
|
143
|
-
pattern was supplied
|
|
144
|
-
- invariants_checked — true ONLY if you verified every BLOCKING invariant in
|
|
145
|
-
`pattern` against your diff; false/null if no invariants
|
|
146
|
-
were supplied. A pattern task returning false/absent here
|
|
147
|
-
is a malformed return
|
|
148
|
-
- tdd_state — green | red | null. REQUIRED when the slice carried a
|
|
149
|
-
`tdd_spec`: green ONLY after its tests pass (run quoted
|
|
150
|
-
in `evidence`); red = cap hit/unresolved (failing tests
|
|
151
|
-
in unmet[]); null only without a tdd_spec. status=done
|
|
152
|
-
with red is malformed
|
|
153
|
-
- repro — REQUIRED when the slice carried
|
|
154
|
-
`repro.required: true`; else absent. {command, before:
|
|
155
|
-
{exit_code, tail}, after: {exit_code, tail}} quoted
|
|
156
|
-
VERBATIM, or `none` + a one-line reason. status=done
|
|
157
|
-
with before.exit_code 0 (never red) or a non-zero
|
|
158
|
-
after.exit_code (still red) is malformed. Canonical:
|
|
159
|
-
`.claude/skills/_shared/return-validation.md` §5d
|
|
160
|
-
- gotcha_recorded — REQUIRED when this return CLOSES a repair loop (you
|
|
161
|
-
drove a tdd_spec test red → green): the entry body
|
|
162
|
-
{trigger, symptom, cause, fix, scope}, or `none` + a
|
|
163
|
-
one-line reason. Absent on a repair-closing return is
|
|
164
|
-
malformed; not required when nothing was repaired. A
|
|
165
|
-
loop that hit `tdd_loop_max` and STOPPED returns
|
|
166
|
-
`none` — an unsolved failure is not a gotcha. You
|
|
167
|
-
RETURN it; the caller writes the file
|
|
168
|
-
|
|
169
|
-
Malformed returns are treated as failure by the caller. needs_context is
|
|
170
|
-
capped at 2 per task — a third means the slice or plan is wrong and escalates
|
|
171
|
-
to the user.
|
|
82
|
+
A task with no boundary carries no `crosslink`. Malformed returns are treated
|
|
83
|
+
as failure by the caller. needs_context is capped at 2 per task — a third means
|
|
84
|
+
the slice or plan is wrong and escalates to the user.
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
# orc-execution — Subagent wrapper (orchestrator prepends this at spawn)
|
|
2
|
-
|
|
3
|
-
You are an isolated execution worker. You have no memory of the wider run
|
|
4
|
-
beyond the slice below. Do exactly one task.
|
|
5
|
-
|
|
6
|
-
- Work only within your slice's declared_files and worktree_path (if set).
|
|
7
|
-
- Do not touch the checkpoint, state-of-play, or the raw decision log — your
|
|
8
|
-
log_entries are returned, and the orchestrator appends them.
|
|
9
|
-
- Emit milestone pings as you progress.
|
|
10
|
-
- When done (or blocked), emit the return structure
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
# orc-execution — Subagent wrapper (orchestrator prepends this at spawn)
|
|
2
|
+
|
|
3
|
+
You are an isolated execution worker. You have no memory of the wider run
|
|
4
|
+
beyond the slice below. Do exactly one task.
|
|
5
|
+
|
|
6
|
+
- Work only within your slice's declared_files and worktree_path (if set).
|
|
7
|
+
- Do not touch the checkpoint, state-of-play, or the raw decision log — your
|
|
8
|
+
log_entries are returned, and the orchestrator appends them.
|
|
9
|
+
- Emit milestone pings as you progress.
|
|
10
|
+
- When done (or blocked), emit the return structure your agent file defines
|
|
11
|
+
and STOP.
|
|
12
|
+
Do not continue past your task.
|
|
13
|
+
|
|
14
|
+
[Orchestrator: append the input slice here at spawn time.]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: orc-review-verify
|
|
3
3
|
description: >
|
|
4
|
-
Review/verify worker for ORC Phases 5–6 (Opus 5.5 medium). Two modes: a REVIEW
|
|
4
|
+
Review/verify worker for ORC Phases 5–6 (review Opus 5.5 low, verify medium). Two modes: a REVIEW
|
|
5
5
|
pass — examine the changed files against the code pattern + constraints,
|
|
6
6
|
create/update tests, and classify EVERY finding on the P0–P3 severity
|
|
7
7
|
ladder (P0/P1 gate ship, P2/P3 advisory); a VERIFY
|
|
@@ -17,60 +17,19 @@ description: >
|
|
|
17
17
|
|
|
18
18
|
# orc-review-verify
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
conflict, `core.md` wins.
|
|
20
|
+
A pointer. The orchestrator spawns the agent via the Task tool, prepending
|
|
21
|
+
`subagent.md` framing + the input slice. The worker reports; the orchestrator
|
|
22
|
+
owns the auto-fix-once loop.
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
finding on the ladder — **P0** (failing tests/build, unmet acceptance
|
|
33
|
-
criteria, runtime errors, invariant violations — caller auto-fixes, no ask),
|
|
34
|
-
**P1** (correctness/security risk, constraint violations — caller asks the
|
|
35
|
-
user before fixing), **P2** (maintainability — advisory fix-batch offer),
|
|
36
|
-
**P3** (cosmetic — advisory, counted). Never fix P2/P3; P0/P1 fixes are the
|
|
37
|
-
caller's call. **Evidence-or-advisory:** every P0–P2 finding carries
|
|
38
|
-
`file:line` + the offending line(s) quoted VERBATIM; an unanchored finding is
|
|
39
|
-
AUTO-P3 (never gates, never triggers a fix) — the caller spot-checks quotes
|
|
40
|
-
before acting on P0/P1.
|
|
41
|
-
- **phase=verify (two halves, v0.33.0):** FIRST the **TDD gate** — run the
|
|
42
|
-
plan's TDD suite (`tdd_suite[]` in the slice) plus the build + full test
|
|
43
|
-
suite; green is the definition-of-done for non-exempt requirements, and each
|
|
44
|
-
red TDD test is a P0 tied to its requirement (the caller owns the
|
|
45
|
-
`tdd_loop_max` repair loop). THEN the **adversarial review** — attack the
|
|
46
|
-
green implementation: edge cases the spec missed, error paths, contract
|
|
47
|
-
violations, race/ordering, workflow breaks (dead wiring, broken commands) —
|
|
48
|
-
findings on the same P0–P3 ladder. Also fold the enforceable
|
|
49
|
-
`validation_gate[]` lines into the criteria set, then check EACH criterion
|
|
50
|
-
individually (pass/fail, nothing invented; an unmet gate line = unmet
|
|
51
|
-
criterion = P0), each with per-criterion `evidence` (the test/output line or
|
|
52
|
-
file:line that proves it); report failures precisely. You don't fix — the
|
|
53
|
-
caller owns the auto-fix-once loop.
|
|
54
|
-
- **phase=security (opt-in):** sweep only `changed_files[]` against the supplied
|
|
55
|
-
`security_checklist[]` (wrap Semgrep if installed, never install it); findings
|
|
56
|
-
on the same ladder (exploitable-in-diff = P0, hardening gap = P1,
|
|
57
|
-
defense-in-depth = P2/P3). Report-only, no `result` verdict.
|
|
58
|
-
|
|
59
|
-
## Return shape (summary — full contract in `core.md`)
|
|
60
|
-
|
|
61
|
-
`{ phase, findings[]{severity: P0|P1|P2|P3, location "file:line", quote (verbatim,
|
|
62
|
-
required P0–P2; unanchored ⇒ AUTO-P3), description, criterion},
|
|
63
|
-
criteria[] (verify only){criterion, result, evidence}, tests{added,updated,passing},
|
|
64
|
-
result (verify only): passed|failed, actual_model, actual_effort, failure_reason }`
|
|
65
|
-
|
|
66
|
-
**Validation checkpoint before returning:** every finding carries a `severity`
|
|
67
|
-
from the P0–P3 ladder; every P0–P2 finding carries `file:line` + a VERBATIM
|
|
68
|
-
`quote` (else downgrade it to P3 yourself);
|
|
69
|
-
verify sets `result` + per-criterion `evidence`; `actual_model` is quoted
|
|
70
|
-
VERBATIM (never inferred). A
|
|
71
|
-
malformed return is treated as failure by the caller.
|
|
24
|
+
- **Input slice** (the orchestrator builds it): `core.md`.
|
|
25
|
+
- **Procedure + return contract** (the ONE source): the agent file —
|
|
26
|
+
`phase=review` and `phase=security` → `.claude/agents/orc-reviewer-opus-5-low.md`;
|
|
27
|
+
`phase=verify` → `.claude/agents/orc-verifier-opus-5-med.md`.
|
|
28
|
+
- **Validator** (the caller checks every return against it):
|
|
29
|
+
`../../../_shared/return-validation.md`. A malformed return is treated as
|
|
30
|
+
failure by the caller.
|
|
72
31
|
|
|
73
32
|
Fixed models (from `../../references/effort-and-mode.md`): review on the OpenSpec/self
|
|
74
|
-
path = Opus 5.5
|
|
33
|
+
path = Opus 5.5 low; review on the Superpowers path is delegated to the
|
|
75
34
|
Superpowers review skill instead (Sonnet 4.6 medium). Verify = Opus 5.5 medium,
|
|
76
35
|
always this subskill.
|