@azure-id/orc 1.9.1 → 2.0.2
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 +390 -0
- package/README-id.md +20 -36
- package/README.md +24 -34
- package/bin/build-agents.js +206 -109
- package/bin/cli.js +760 -62
- package/bin/gotcha-import.js +1081 -0
- package/bin/gotcha.js +1286 -0
- package/bin/graph-query.js +1 -1
- package/bin/graph.js +717 -717
- package/bin/habit.js +1453 -0
- package/bin/mockrun-catalog.js +281 -276
- package/bin/onboarding-content.js +4 -4
- package/bin/pricing.json +207 -200
- package/bin/run-undo.js +398 -0
- package/bin/trace-write.js +657 -0
- package/bin/verify-contracts.js +527 -81
- package/bin/verify-package.js +58 -11
- package/bin/webui/api.js +26 -0
- package/bin/webui/app.html +239 -232
- package/bin/webui/css/00-tokens.css +110 -92
- package/bin/webui/css/04-motion.css +249 -152
- package/bin/webui/css/06-responsive.css +203 -178
- package/bin/webui/css/panels/behaviour.css +205 -0
- package/bin/webui/css/panels/knowledge.css +563 -116
- package/bin/webui/fixtures/behaviour.js +532 -0
- package/bin/webui/fixtures/extra.js +2036 -2036
- package/bin/webui/fixtures/hookui.js +5 -5
- package/bin/webui/fixtures/index.js +34 -0
- package/bin/webui/fixtures/knowledge.js +7 -1
- package/bin/webui/fixtures/settings.js +305 -305
- package/bin/webui/fixtures/stats.js +16 -0
- package/bin/webui/i18n/en/behaviour.json +143 -0
- package/bin/webui/i18n/en/knowledge.json +117 -2
- package/bin/webui/i18n/en/nav.json +25 -24
- package/bin/webui/i18n/en/tour.json +37 -35
- package/bin/webui/i18n/id/behaviour.json +143 -0
- package/bin/webui/i18n/id/knowledge.json +117 -2
- package/bin/webui/i18n/id/nav.json +25 -24
- package/bin/webui/i18n/id/tour.json +37 -35
- package/bin/webui/js/01-i18n.js +155 -154
- 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 +1022 -0
- package/bin/webui/js/panels/knowledge.js +552 -7
- package/bin/webui/js/panels/overview.js +13 -4
- package/mock-run/INDEX.md +109 -107
- package/mock-run/context-combiner.md +100 -100
- package/mock-run/gotcha-import.md +118 -0
- package/mock-run/habits.md +129 -0
- package/mock-run/orc-budget.md +534 -534
- package/mock-run/orc-challenge-council.md +262 -262
- package/mock-run/orc-quick.md +6 -1
- package/mock-run/orc-ultra.md +103 -103
- package/package.json +1 -1
- package/templates/agents/MODEL-MAPPING.md +49 -49
- package/templates/agents/orc-advisor-opus-5-xhigh.md +50 -56
- package/templates/agents/orc-analyze-mini-opus-5-med.md +55 -60
- package/templates/agents/orc-analyze-mini-sonnet-5-high.md +55 -58
- package/templates/agents/orc-challenge-advisor-opus-5-med.md +75 -75
- package/templates/agents/orc-challenge-contrarian-opus-5-high.md +110 -110
- package/templates/agents/orc-challenge-executor-opus-5-med.md +114 -114
- package/templates/agents/orc-challenge-expansionist-opus-5-med.md +112 -112
- package/templates/agents/orc-challenge-judge-opus-5-high.md +132 -132
- package/templates/agents/orc-challenge-outsider-opus-5-low.md +109 -109
- package/templates/agents/orc-challenge-principles-opus-5-high.md +109 -109
- package/templates/agents/orc-challenge-reader-opus-5-low.md +90 -90
- package/templates/agents/orc-claude-writer-opus-4-8-high.md +48 -53
- package/templates/agents/orc-claude-writer-opus-5-med.md +48 -55
- package/templates/agents/orc-context-combiner-opus-5-high.md +78 -88
- package/templates/agents/orc-doc-checker-opus-5-low.md +108 -108
- package/templates/agents/orc-doc-writer-opus-5-med.md +134 -134
- 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 +15 -7
- package/templates/agents/orc-executor-opus-5-low.md +15 -7
- package/templates/agents/orc-executor-opus-5-med.md +15 -7
- 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 +14 -6
- package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +1 -10
- package/templates/agents/orc-judge-opus-5-xhigh.md +81 -85
- package/templates/agents/orc-learn-writer-opus-5-low.md +67 -73
- package/templates/agents/orc-pattern-codifier-opus-5-med.md +58 -65
- package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +58 -63
- package/templates/agents/orc-planner-mini-opus-5-med.md +4 -7
- package/templates/agents/orc-planner-mini-sonnet-5-high.md +2 -3
- package/templates/agents/orc-planner-opus-5-med.md +157 -160
- package/templates/agents/orc-recon-opus-5-low.md +3 -10
- package/templates/agents/orc-recon-sonnet-4-6-med.md +1 -8
- package/templates/agents/orc-retro-opus-5-med.md +8 -10
- package/templates/agents/orc-retro-sonnet-5-high.md +6 -7
- package/templates/agents/orc-reviewer-opus-5-med.md +96 -60
- package/templates/agents/orc-scout-opus-5-low.md +35 -40
- package/templates/agents/orc-scout-sonnet-4-6-high.md +35 -39
- package/templates/agents/orc-system-analyst-opus-5-high.md +115 -120
- package/templates/agents/orc-test-author-opus-5-med.md +70 -71
- package/templates/agents/orc-test-designer-opus-5-high.md +158 -158
- package/templates/agents/orc-test-interpreter-opus-5-low.md +130 -130
- package/templates/agents/orc-trace-writer-haiku-4-5.md +3 -7
- package/templates/agents/orc-verifier-opus-5-med.md +77 -69
- package/templates/agents/orc-wiki-scanner-opus-4-8-high.md +74 -79
- package/templates/agents/orc-wiki-scanner-opus-5-med.md +74 -81
- 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-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-ultra.md +17 -17
- package/templates/commands/orc-verify.md +11 -11
- package/templates/hooks/README.md +36 -2
- package/templates/hooks/orc-effort-guard.js +178 -178
- package/templates/hooks/orc-session-hook.js +264 -0
- package/templates/hooks/orc-statusline.js +9 -7
- package/templates/skills/_shared/README.md +9 -0
- package/templates/skills/_shared/code-graph.md +48 -56
- package/templates/skills/_shared/config-precedence.md +200 -198
- package/templates/skills/_shared/extra-dispatch.md +1331 -1346
- package/templates/skills/_shared/gotchas.md +228 -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 +8 -8
- package/templates/skills/_shared/phases/README.md +142 -83
- package/templates/skills/_shared/phases/analyst-gates.md +125 -136
- 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 +23 -27
- 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 +433 -0
- package/templates/skills/_shared/phases/trace.md +136 -367
- 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 +79 -0
- package/templates/skills/_shared/smoke-gate.md +46 -28
- package/templates/skills/context-combiner/SKILL.md +16 -45
- package/templates/skills/context-combiner/schemas/combined-report.md +78 -78
- package/templates/skills/orc/README.md +2 -2
- package/templates/skills/orc/SKILL.md +41 -69
- package/templates/skills/orc/config.md +9 -9
- package/templates/skills/orc/examples/full-run-mock.md +73 -73
- package/templates/skills/orc/references/effort-and-mode.md +222 -222
- 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 +10 -11
- package/templates/skills/orc/references/ultra-mode.md +11 -9
- 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-planner/SKILL.md +2 -2
- package/templates/skills/orc/subskills/orc-planner-mini/SKILL.md +121 -121
- package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +35 -76
- 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 +34 -45
- 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 +32 -68
- package/templates/skills/orc-analyze/examples/analyze-mock.md +42 -42
- package/templates/skills/orc-analyze/schemas/report-audit.md +84 -83
- package/templates/skills/orc-analyze/schemas/report-prose.md +64 -63
- package/templates/skills/orc-analyze/schemas/report-requirement.md +78 -78
- package/templates/skills/orc-analyze-mini/SKILL.md +35 -70
- package/templates/skills/orc-challenge/README.md +142 -142
- package/templates/skills/orc-challenge/examples/council-full-roster.md +273 -273
- package/templates/skills/orc-challenge/references/council.md +315 -315
- package/templates/skills/orc-challenge/references/intake.md +171 -171
- package/templates/skills/orc-claude/SKILL.md +14 -14
- package/templates/skills/orc-diy/README.md +174 -143
- package/templates/skills/orc-diy/SKILL.md +23 -74
- package/templates/skills/orc-diy/references/blocks/pattern.md +18 -18
- package/templates/skills/orc-diy/references/flow-schema.md +1 -1
- package/templates/skills/orc-doc/README.md +229 -229
- package/templates/skills/orc-doc/examples/orc-doc-prd-run.md +325 -325
- package/templates/skills/orc-doc/references/chunking.md +527 -527
- package/templates/skills/orc-fast/SKILL.md +45 -73
- package/templates/skills/orc-judge/SKILL.md +77 -82
- package/templates/skills/orc-learn/SKILL.md +14 -14
- package/templates/skills/orc-learn/examples/learn-run-mock.md +61 -61
- package/templates/skills/orc-mini/SKILL.md +65 -113
- 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 +43 -2
- package/templates/skills/orc-quick/SKILL.md +76 -107
- package/templates/skills/orc-quick/references/dispatch-gate.md +16 -5
- package/templates/skills/orc-quick/references/gh-mode.md +48 -1
- package/templates/skills/orc-quick/references/look.md +3 -1
- package/templates/skills/orc-retro/SKILL.md +19 -18
- package/templates/skills/orc-retro/examples/retro-mock.md +1 -1
- 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 +21 -39
- package/templates/skills/orc-verify/examples/verify-mock.md +33 -33
- package/templates/skills/orc-wait/SKILL.md +156 -163
- package/templates/skills/orc-wiki/references/extra.md +1 -1
- package/templates/skills/orc-wiki/references/phases/phase-0.md +1 -6
- package/templates/skills/orc-wiki/references/phases/phase-1.md +1 -6
- package/templates/skills/orc-wiki/references/phases/phase-2.md +1 -6
- package/templates/skills/orc-wiki/references/phases/phase-3.md +1 -6
- package/templates/skills/orc-wiki/references/phases/phase-3c.md +1 -6
|
@@ -1,70 +1,62 @@
|
|
|
1
|
-
# Phase — Verify — TDD gate + adversarial review (id: `verify`)
|
|
2
|
-
|
|
3
|
-
> **Shared phase file
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<!--
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
<!--
|
|
63
|
-
TDD gate (rides the verify slot): the verifier slice carries the plan's
|
|
64
|
-
`tdd_suite[]`; green is the definition-of-done for non-exempt requirements,
|
|
65
|
-
red → the repair loop capped at `tdd_loop_max` (cap hit → STOP + honest red
|
|
66
|
-
report). The adversarial half of the verify pass applies as the full lane
|
|
67
|
-
defines it.
|
|
68
|
-
<!-- /diy:when -->
|
|
69
|
-
|
|
70
|
-
<!-- /orc:layer -->
|
|
1
|
+
# Phase — Verify — TDD gate + adversarial review (id: `verify`)
|
|
2
|
+
|
|
3
|
+
> **Shared phase file** — read when the phase fires. A lane reads ONE layer: `full` (`/orc`) or `composed` (the `<!-- diy:when -->` variants `orc diy compile` stitches). `orc lane phases <lane> --json` names it.
|
|
4
|
+
|
|
5
|
+
<!-- orc:layer full -->
|
|
6
|
+
|
|
7
|
+
## Verify: TDD gate + adversarial review (same subskill, phase=verify)
|
|
8
|
+
|
|
9
|
+
Emit `PHASE verify start`. TWO halves in the SAME dispatched verifier slot
|
|
10
|
+
(../../orc/subskills/orc-review-verify/ — Phase 5's reviewer stays separate):
|
|
11
|
+
**1) TDD gate (deterministic):** run the plan's TDD suite — green IS the
|
|
12
|
+
definition-of-done for non-exempt requirements; red → the flaky check
|
|
13
|
+
(`../smoke-gate.md` §Flaky: exit 0 = not red, no round), then the repair loop (implement→
|
|
14
|
+
test→repair, cap `tdd_loop_max`; cap hit → STOP SEQUENCE + honest red report).
|
|
15
|
+
**2) Adversarial review:** attack the green implementation — edge cases the
|
|
16
|
+
spec missed, error paths, contract violations, race/ordering, workflow breaks
|
|
17
|
+
(dead wiring, broken commands) — findings on the existing P0–P3 ladder. The
|
|
18
|
+
verifier also checks the intent-spec's
|
|
19
|
+
definition-of-done PLUS the pattern's `validation_gate[]` lines (each a
|
|
20
|
+
criterion; unmet = P0). The return carries `criteria[]` {criterion, pass|fail,
|
|
21
|
+
evidence} — every criterion needs evidence. Quote spot-check P0/P1 first, then:
|
|
22
|
+
P0 → auto-fix once → re-verify once → second failure STOPS; P1 → ask before the
|
|
23
|
+
one fix attempt, then re-verify (same single-retry cap).
|
|
24
|
+
**Pact recheck (`pact_recheck_on_verify`, default true; emit `PACT recheck`):**
|
|
25
|
+
after GREEN, run `orc pact check` scoped to the promises whose anchors intersect
|
|
26
|
+
this run's CHANGED files. A promise that flips to BROKEN is a **P1 finding with its
|
|
27
|
+
check output** — reported, never an automatic abort: the ledger may simply have
|
|
28
|
+
outgrown the code, and that is the user's call. Emit
|
|
29
|
+
`VERDICT pass|fail :: <detail>`, then `PHASE verify end`.
|
|
30
|
+
|
|
31
|
+
<!-- /orc:layer -->
|
|
32
|
+
|
|
33
|
+
<!-- orc:layer composed -->
|
|
34
|
+
|
|
35
|
+
## Phase: Verify
|
|
36
|
+
|
|
37
|
+
<!-- diy:when verify=off -->
|
|
38
|
+
Verification is DISABLED in this flow. The build+test evidence in each
|
|
39
|
+
executor return is the only green signal; say "verify skipped by flow
|
|
40
|
+
config" in the summary. Never claim criteria were verified.
|
|
41
|
+
<!-- /diy:when -->
|
|
42
|
+
<!-- diy:when verify=smoke -->
|
|
43
|
+
Run a SMOKE verify only: dispatch the verifier
|
|
44
|
+
(`orc-verifier-opus-5-med`) with an explicitly narrowed scope — build +
|
|
45
|
+
full test suite, red/green verdict, NO per-criterion definition-of-done
|
|
46
|
+
sweep. Red blocks ship exactly as a full verify would.
|
|
47
|
+
<!-- /diy:when -->
|
|
48
|
+
<!-- diy:when verify=full -->
|
|
49
|
+
Dispatch verification exactly as the full lane does — follow the verify half
|
|
50
|
+
of `.claude/skills/orc/subskills/orc-review-verify/SKILL.md` (build + tests +
|
|
51
|
+
every acceptance criterion checked against the definition of done).
|
|
52
|
+
<!-- /diy:when -->
|
|
53
|
+
<!-- diy:when tdd=on -->
|
|
54
|
+
TDD gate (rides the verify slot): the verifier slice carries the plan's
|
|
55
|
+
`tdd_suite[]`; green is the definition-of-done for non-exempt requirements,
|
|
56
|
+
red → the flaky check
|
|
57
|
+
(`.claude/skills/_shared/smoke-gate.md` §Flaky), then the repair loop capped at `tdd_loop_max` (cap hit → STOP + honest red
|
|
58
|
+
report). The adversarial half of the verify pass applies as the full lane
|
|
59
|
+
defines it.
|
|
60
|
+
<!-- /diy:when -->
|
|
61
|
+
|
|
62
|
+
<!-- /orc:layer -->
|
|
@@ -1,133 +1,128 @@
|
|
|
1
|
-
# Phase — Wave grouping (id: `wave-grouping`)
|
|
2
|
-
|
|
3
|
-
> **Library file
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
- they
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
task
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
- **
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
`git status` is the AUDIT — same instruction → contract → attestation →
|
|
130
|
-
spot-check pattern the plan applies to `grounding[]`.
|
|
131
|
-
- Canonical cross-lane wording: `_shared/return-validation.md` §6.
|
|
132
|
-
|
|
133
|
-
<!-- /orc:layer -->
|
|
1
|
+
# Phase — Wave grouping (id: `wave-grouping`)
|
|
2
|
+
|
|
3
|
+
> **Library file** (`orc`, `orc-diy`), `core` only: the conflict graph is arithmetic, and every lane that groups waves groups them this way.
|
|
4
|
+
|
|
5
|
+
<!-- orc:layer core -->
|
|
6
|
+
## Reference — Wave Grouping & Conflict Graph
|
|
7
|
+
|
|
8
|
+
Turn the tagged task list into conflict-free waves. Load during Phase 3.
|
|
9
|
+
|
|
10
|
+
## Waves are computed for EVERY run — dispatch style is intra-wave only
|
|
11
|
+
|
|
12
|
+
Wave computation is NOT a parallel-mode concern. It runs for **every run with ≥2
|
|
13
|
+
tasks, sequential included** (dependency layers + conflict graph +
|
|
14
|
+
`max_wave_tasks` cap). **Dispatch style controls only INTRA-WAVE concurrency:**
|
|
15
|
+
|
|
16
|
+
- **parallel** → a wave's non-conflicting tasks dispatch at once (up to
|
|
17
|
+
`max_wave_tasks`);
|
|
18
|
+
- **sequential** → the SAME waves, but a wave's tasks dispatch one at a time, in
|
|
19
|
+
order; the wave still closes only when all its tasks close.
|
|
20
|
+
|
|
21
|
+
Either way the **wave-boundary gate fires identically** (the deterministic batch
|
|
22
|
+
pause below binds to wave numbers, not to a dispatch style). A sequential run
|
|
23
|
+
therefore never degenerates to "no waves / per-task pauses" — a 5-task plan
|
|
24
|
+
becomes e.g. `[T1] [T2 T3 T4] [T5]`, not five ad-hoc stops. **Show the wave plan
|
|
25
|
+
(wave → tasks → pause marks) to the user BEFORE wave 1 in BOTH styles.**
|
|
26
|
+
|
|
27
|
+
## The principle
|
|
28
|
+
|
|
29
|
+
Two tasks may share a wave ONLY if their `declared_files` don't overlap AND
|
|
30
|
+
neither depends on the other. Conflicts are designed out by scheduling — never
|
|
31
|
+
negotiated at runtime.
|
|
32
|
+
|
|
33
|
+
## Algorithm
|
|
34
|
+
|
|
35
|
+
1. **Dependency edges:** a task's earliest wave = max(wave of its deps) + 1.
|
|
36
|
+
2. **Conflict edges:** for every pair, mark conflict if `declared_files` globs
|
|
37
|
+
intersect (expand against the repo tree; unresolvable globs conflict on
|
|
38
|
+
their literal prefix).
|
|
39
|
+
3. **Assign greedily in topological order:** place each task in the earliest
|
|
40
|
+
wave where (a) all deps are earlier and (b) nothing in that wave conflicts.
|
|
41
|
+
Otherwise open a new wave.
|
|
42
|
+
4. **Cap concurrency at `config.max_wave_tasks`** (default 3): a wave NEVER
|
|
43
|
+
exceeds this many tasks, even if more are conflict-free. Overflow moves to the
|
|
44
|
+
next wave. This is the efficiency cap — 3 parallel subagents by default.
|
|
45
|
+
5. **Mark batch pauses:** compute the pause schedule from the user's Phase 2
|
|
46
|
+
answer — mark `is_batch_pause: true` on wave W when `W % N == 0` AND a later
|
|
47
|
+
wave exists (`W < total_waves`); the last wave is NEVER a pause (nothing
|
|
48
|
+
remains to gate). The resulting wave indices are the `pause_schedule` stored
|
|
49
|
+
in the checkpoint. A pause so marked is a HARD gate (stop-resume.md), not
|
|
50
|
+
an orchestrator judgment call.
|
|
51
|
+
|
|
52
|
+
## Same-feature collision
|
|
53
|
+
|
|
54
|
+
If two tasks own the same feature/files with no dependency between them, the
|
|
55
|
+
graph auto-serializes them — but that's a planning smell. Surface it: suggest
|
|
56
|
+
merging them into one task rather than silently serializing duplicate work.
|
|
57
|
+
|
|
58
|
+
## TDD tasks are ORDINARY tasks (v0.41.0)
|
|
59
|
+
|
|
60
|
+
TDD red proofs are **planner-emitted tasks**, not an orchestrator-synthesized
|
|
61
|
+
Wave 0. Each one materializes the `tdd_spec` entries of the implementation task
|
|
62
|
+
it guards, and that task lists it in `depends_on`. Nothing here special-cases
|
|
63
|
+
them:
|
|
64
|
+
|
|
65
|
+
- they enter the same conflict graph via their `declared_files` (their test
|
|
66
|
+
files), so **independent TDD tasks share a wave and run in parallel** — the
|
|
67
|
+
red proofs for two unrelated features are one wave, not two;
|
|
68
|
+
- `depends_on` guarantees **a red proof is always in an earlier wave than the
|
|
69
|
+
code it proves** — a proof can never land beside its implementation;
|
|
70
|
+
- they are scored from **their own planner-emitted `facets`**, like any task, so
|
|
71
|
+
no derived-vector rule is needed;
|
|
72
|
+
- `max_wave_tasks`, `is_batch_pause` and `pause_schedule` bind to them unchanged.
|
|
73
|
+
|
|
74
|
+
**A TDD task does NOT inherit the risk floor** of the task it guards: it
|
|
75
|
+
transcribes planner-authored skeletons, writes no production code, and its output
|
|
76
|
+
is asserted RED before anything is believed. The planner reflects that in the
|
|
77
|
+
task's own facets (`novelty: mechanical`, `logic: none`, `risk: []`). Stated here
|
|
78
|
+
so it is not re-litigated per run — the alternative is a Haiku-sized
|
|
79
|
+
transcription job dispatched at floor 70 because the requirement it proves is
|
|
80
|
+
auth-flavoured.
|
|
81
|
+
|
|
82
|
+
**If no task carries `new-surface` or `behavior-change` entries, no TDD task
|
|
83
|
+
exists and no extra wave is created.**
|
|
84
|
+
|
|
85
|
+
## Orchestrator-synthesized tasks (the mock example, any future one)
|
|
86
|
+
|
|
87
|
+
Some dispatched tasks appear in no `tasks[]` because the ORCHESTRATOR synthesized
|
|
88
|
+
them — the mock example (`_shared/drift-recovery.md`). They still obey hard rule
|
|
89
|
+
1: **dispatched like any other task, never done by you.** But they have no
|
|
90
|
+
planner-emitted `facets`, and the orchestrator is by definition the party that
|
|
91
|
+
did NOT read the code — inventing a vector for them is judgment wearing
|
|
92
|
+
arithmetic's clothes, the exact thing the facet redesign removed.
|
|
93
|
+
|
|
94
|
+
So their vector is **DERIVED, never judged**:
|
|
95
|
+
|
|
96
|
+
| Facet | Value |
|
|
97
|
+
|---|---|
|
|
98
|
+
| `breadth` | `len(files the synthesized task will touch)` |
|
|
99
|
+
| `novelty` | `mechanical` — it transcribes planner-authored material |
|
|
100
|
+
| `logic` | `none` |
|
|
101
|
+
| `test_surface` | per the task |
|
|
102
|
+
| `risk` | `[]` — unless the synthesized task itself inherits a CITED risk |
|
|
103
|
+
|
|
104
|
+
## Post-wave worktree audit (a GATE, not a report)
|
|
105
|
+
|
|
106
|
+
Declarations can be wrong, and a return can be honest and still miss what
|
|
107
|
+
happened. Capture `git status --short` BEFORE the wave dispatches and again
|
|
108
|
+
after every task returns, then diff the two:
|
|
109
|
+
- **Any path whose state changed and is in NO task's `declared_files`** → name
|
|
110
|
+
the path and the likely task, and get an explicit user decision BEFORE the
|
|
111
|
+
wave closes. A wave never closes over an unexplained worktree delta.
|
|
112
|
+
- **A file that became LESS modified is as much a violation as one that became
|
|
113
|
+
more modified.** That is the revert signature — an executor made an
|
|
114
|
+
unsatisfiable assertion true by `git checkout`-ing another task's completed
|
|
115
|
+
work, returned a literally-true report, and left a CLEAN tree. Nothing that
|
|
116
|
+
reads returns can see it.
|
|
117
|
+
- **Stray files count** — a path that appears at the repo root (a stdout dump, a
|
|
118
|
+
mangled-path artifact) is undeclared output, not noise to ignore.
|
|
119
|
+
- Two agents in one wave touched the same undeclared file → record
|
|
120
|
+
`failure_reason: "file-collision:<file> with <agent>"`, set the
|
|
121
|
+
later-finishing task to `requeued`, re-dispatch in a later wave so it sees
|
|
122
|
+
the other's committed changes.
|
|
123
|
+
- Declarations are the plan, `actual_files` is the ATTESTATION, and
|
|
124
|
+
`git status` is the AUDIT — same instruction → contract → attestation →
|
|
125
|
+
spot-check pattern the plan applies to `grounding[]`.
|
|
126
|
+
- Canonical cross-lane wording: `_shared/return-validation.md` §6.
|
|
127
|
+
|
|
128
|
+
<!-- /orc:layer -->
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
# Phase — Wiki consult (id: `wiki-consult`)
|
|
2
2
|
|
|
3
|
-
> **Library file
|
|
4
|
-
> private `references/`, and other lanes already reached across into it. Read
|
|
5
|
-
> by `orc`, `orc-mini`, `orc-fast`, `orc-wiki`. Layers declared: `core` only —
|
|
6
|
-
> single-layer because the precedence ladder (`code > fresh wiki > stale wiki
|
|
7
|
-
> > model priors`) does not bend for a faster lane. `orc lane phases <lane>
|
|
8
|
-
> --json` names the file and the layers to read.
|
|
3
|
+
> **Library file** (`orc`, `orc-mini`, `orc-fast`, `orc-wiki`), `core` only: the ladder `code > fresh wiki > stale wiki > model priors` does not bend for a faster lane.
|
|
9
4
|
|
|
10
5
|
<!-- orc:layer core -->
|
|
11
6
|
## Reference — Wiki Consult (shared by orc / orc-mini / orc-fast)
|
|
@@ -148,6 +143,15 @@ actually read, or `none`. `none` on a slice that carried docs is a REAL signal
|
|
|
148
143
|
It is the only thing that distinguishes a wiki that is working from one that is
|
|
149
144
|
merely being shipped.
|
|
150
145
|
|
|
146
|
+
**orc-mini only** (moved here from its spine at v2.0.0):
|
|
147
|
+
|
|
148
|
+
**`none` is an answer — record it, never drop it.** `wiki_used: none` and
|
|
149
|
+
`graph_used: none` from ANY return go into the checkpoint and the ship line
|
|
150
|
+
(`knowledge: wiki 2 pages offered · used none · graph card 2 targets · used
|
|
151
|
+
none`). Two runs in a row with `wiki_used: none` on FRESH pages → one line:
|
|
152
|
+
`wiki: the selected pages were not used in 2 runs — check their TL;DRs
|
|
153
|
+
(/orc-wiki)`. A signal, never a gate, never dropped for looking null.
|
|
154
|
+
|
|
151
155
|
## Scoring bonus (full lane, Phase 2)
|
|
152
156
|
|
|
153
157
|
If a non-empty `wiki/` is present, use its overviews' "Notes for planning" to
|
|
@@ -5,14 +5,6 @@ about to edit: scouts, wiki scan-tasks, the analyst, the reviewer, and every
|
|
|
5
5
|
executor reading a file for context rather than for change. Load this wherever
|
|
6
6
|
a slice tells an agent to go read something.
|
|
7
7
|
|
|
8
|
-
## Why this exists
|
|
9
|
-
|
|
10
|
-
ORC's cost is dominated by parallel reading, not by thinking: up to `max_scouts`
|
|
11
|
-
scouts at once, a wiki scan that is expensive by design, and every executor in a
|
|
12
|
-
wave opening its declared files. A role that opens a 900-line file to learn one
|
|
13
|
-
function's shape has spent the run's budget on bytes nobody needed. Reading more
|
|
14
|
-
is not understanding more.
|
|
15
|
-
|
|
16
8
|
## The ladder
|
|
17
9
|
|
|
18
10
|
Escalate one step at a time. Stop at the step that answers the question.
|
|
@@ -88,50 +80,6 @@ is a `needs_context` return, not permission to keep going.
|
|
|
88
80
|
lint results — the smoke gate, the TDD gate, the verifier and orc-quick's
|
|
89
81
|
build loop decide red vs green from those exact bytes. Read them whole.
|
|
90
82
|
|
|
91
|
-
## Reading ORC's own payload — the partial-read discipline (v1.0.0 W10)
|
|
92
|
-
|
|
93
|
-
Everything above is about reading the PROJECT. It applies unchanged to reading
|
|
94
|
-
ORC's own files, and it has to: a lane manifest of pointers that every lane
|
|
95
|
-
dutifully reads whole is MORE round-trips than the prose it replaced, for the
|
|
96
|
-
same bytes. Centralizing prose and then reading all of it is a slower payload,
|
|
97
|
-
not a smaller one.
|
|
98
|
-
|
|
99
|
-
So every pointer a lane carries declares three things.
|
|
100
|
-
|
|
101
|
-
| Declaration | Values | Means |
|
|
102
|
-
|---|---|---|
|
|
103
|
-
| `when` | `always` · `on-phase` · `on-state` · `on-demand` · `compile-time` | WHETHER to open it at all |
|
|
104
|
-
| `read` | `layer` · `section` · `whole` | HOW MUCH to open |
|
|
105
|
-
| `layers` | `core` · `full` · `trim` · `composed` | WHICH part, when `read: layer` |
|
|
106
|
-
|
|
107
|
-
### The four rules that make it honest
|
|
108
|
-
|
|
109
|
-
1. **`on-phase` is the default, and `always` must be justified.** A file every
|
|
110
|
-
lane always loads has saved nothing by moving. Each `always` pointer is
|
|
111
|
-
named in the wave that adds it.
|
|
112
|
-
2. **`read: section` names a HEADING, never a line number.** A stored line
|
|
113
|
-
number is a wrong line number one edit later; a heading anchor survives an
|
|
114
|
-
edit above it. This is why a shared file's headings are part of its
|
|
115
|
-
contract — renaming one breaks every pointer into it.
|
|
116
|
-
3. **A trimmed lane reads `core` plus its OWN layer, and never the `full`
|
|
117
|
-
layer.** Reading a neighbouring layer "for context" is the bleed this rule
|
|
118
|
-
exists to stop: the layer boundary is the product promise, not a suggestion.
|
|
119
|
-
4. **The two exceptions above carry over unchanged.** A file you will EDIT is
|
|
120
|
-
read in full, first, always; and output a gate parses is read whole.
|
|
121
|
-
5. **`compile-time` is not a run-time read at all.** `orc-diy` is a declared
|
|
122
|
-
reader of ten shared phases and opens none of them during a run: the `orc
|
|
123
|
-
diy compile` CLI reads their `composed` layer once and stitches it into
|
|
124
|
-
`FLOW-COMPILED.md`, which is the only spine that run then follows. Saying
|
|
125
|
-
`on-phase` there would describe a read that never happens, and a manifest
|
|
126
|
-
that describes a run nobody performs is the drift it exists to prevent
|
|
127
|
-
(v1.0.0 W13).
|
|
128
|
-
|
|
129
|
-
### The honest limit
|
|
130
|
-
|
|
131
|
-
A partial read saves round-trips and bytes for the lanes that SKIP a phase. It
|
|
132
|
-
does **not** make a phase cheaper for the lane that runs it — that lane reads
|
|
133
|
-
its layers whole. Any claim otherwise has to show the measurement.
|
|
134
|
-
|
|
135
83
|
## Handoff
|
|
136
84
|
|
|
137
85
|
The ladder governs HOW MUCH to read. It never decides WHETHER knowledge exists —
|
|
@@ -140,6 +88,5 @@ that is `detecting-artifacts.md` — and it never overrides precedence:
|
|
|
140
88
|
the same order gains two rungs and loses none:
|
|
141
89
|
`code > graph structure (current blob) > fresh wiki > stale wiki (hints) > graph notes and doc notes > model priors`.
|
|
142
90
|
|
|
143
|
-
|
|
144
|
-
`
|
|
145
|
-
two or more lanes share.
|
|
91
|
+
An orchestrator reading ORC's OWN payload follows the partial-read rules in
|
|
92
|
+
`phases/README.md` (§Pointer discipline).
|