@azure-id/orc 1.9.2 → 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.
Files changed (172) hide show
  1. package/CHANGELOG.md +321 -0
  2. package/README-id.md +21 -36
  3. package/README.md +25 -36
  4. package/bin/build-agents.js +117 -20
  5. package/bin/cli.js +725 -29
  6. package/bin/gotcha-import.js +1081 -0
  7. package/bin/gotcha.js +1286 -0
  8. package/bin/graph-query.js +1 -1
  9. package/bin/graph.js +717 -717
  10. package/bin/habit.js +1453 -0
  11. package/bin/mockrun-catalog.js +281 -276
  12. package/bin/run-undo.js +398 -0
  13. package/bin/trace-write.js +657 -0
  14. package/bin/verify-contracts.js +525 -79
  15. package/bin/verify-package.js +51 -4
  16. package/bin/webui/api.js +26 -0
  17. package/bin/webui/app.html +239 -232
  18. package/bin/webui/css/00-tokens.css +110 -92
  19. package/bin/webui/css/04-motion.css +87 -0
  20. package/bin/webui/css/06-responsive.css +203 -178
  21. package/bin/webui/css/panels/behaviour.css +205 -0
  22. package/bin/webui/fixtures/behaviour.js +532 -0
  23. package/bin/webui/fixtures/index.js +34 -0
  24. package/bin/webui/fixtures/knowledge.js +7 -1
  25. package/bin/webui/fixtures/stats.js +16 -0
  26. package/bin/webui/i18n/en/behaviour.json +143 -0
  27. package/bin/webui/i18n/en/nav.json +25 -24
  28. package/bin/webui/i18n/en/tour.json +37 -35
  29. package/bin/webui/i18n/id/behaviour.json +143 -0
  30. package/bin/webui/i18n/id/nav.json +25 -24
  31. package/bin/webui/i18n/id/tour.json +37 -35
  32. package/bin/webui/js/01-i18n.js +155 -154
  33. package/bin/webui/js/90-tour.js +498 -494
  34. package/bin/webui/js/91-shortcuts.js +126 -126
  35. package/bin/webui/js/99-boot.js +121 -118
  36. package/bin/webui/js/panels/behaviour.js +1022 -0
  37. package/mock-run/INDEX.md +109 -107
  38. package/mock-run/gotcha-import.md +118 -0
  39. package/mock-run/habits.md +129 -0
  40. package/mock-run/orc-quick.md +6 -1
  41. package/package.json +1 -1
  42. package/templates/agents/MODEL-MAPPING.md +7 -7
  43. package/templates/agents/orc-advisor-opus-5-xhigh.md +1 -7
  44. package/templates/agents/orc-analyze-mini-opus-5-med.md +1 -6
  45. package/templates/agents/orc-analyze-mini-sonnet-5-high.md +1 -4
  46. package/templates/agents/orc-claude-writer-opus-4-8-high.md +48 -53
  47. package/templates/agents/orc-claude-writer-opus-5-med.md +1 -8
  48. package/templates/agents/orc-context-combiner-opus-5-high.md +1 -11
  49. package/templates/agents/orc-executor-haiku-4-5.md +14 -6
  50. package/templates/agents/orc-executor-opus-4-7-high.md +14 -6
  51. package/templates/agents/orc-executor-opus-4-7-med.md +14 -6
  52. package/templates/agents/orc-executor-opus-4-8-high.md +14 -6
  53. package/templates/agents/orc-executor-opus-5-high.md +14 -6
  54. package/templates/agents/orc-executor-opus-5-low.md +14 -6
  55. package/templates/agents/orc-executor-opus-5-med.md +14 -6
  56. package/templates/agents/orc-executor-sonnet-4-6-high.md +14 -6
  57. package/templates/agents/orc-executor-sonnet-4-6-med.md +14 -6
  58. package/templates/agents/orc-executor-sonnet-5-high.md +14 -6
  59. package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +1 -10
  60. package/templates/agents/orc-judge-opus-5-xhigh.md +5 -9
  61. package/templates/agents/orc-learn-writer-opus-5-low.md +1 -7
  62. package/templates/agents/orc-pattern-codifier-opus-5-med.md +1 -8
  63. package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +58 -63
  64. package/templates/agents/orc-planner-mini-opus-5-med.md +1 -4
  65. package/templates/agents/orc-planner-mini-sonnet-5-high.md +1 -2
  66. package/templates/agents/orc-planner-opus-5-med.md +1 -4
  67. package/templates/agents/orc-recon-opus-5-low.md +1 -8
  68. package/templates/agents/orc-recon-sonnet-4-6-med.md +1 -8
  69. package/templates/agents/orc-retro-opus-5-med.md +6 -8
  70. package/templates/agents/orc-retro-sonnet-5-high.md +6 -7
  71. package/templates/agents/orc-reviewer-opus-5-med.md +52 -16
  72. package/templates/agents/orc-scout-opus-5-low.md +1 -6
  73. package/templates/agents/orc-scout-sonnet-4-6-high.md +35 -39
  74. package/templates/agents/orc-system-analyst-opus-5-high.md +1 -6
  75. package/templates/agents/orc-test-author-opus-5-med.md +4 -5
  76. package/templates/agents/orc-trace-writer-haiku-4-5.md +3 -7
  77. package/templates/agents/orc-verifier-opus-5-med.md +16 -8
  78. package/templates/agents/orc-wiki-scanner-opus-4-8-high.md +74 -79
  79. package/templates/agents/orc-wiki-scanner-opus-5-med.md +1 -8
  80. package/templates/agents/orc-wiki-scanner-sonnet-5-high.md +97 -106
  81. package/templates/commands/orc-analyze.md +13 -21
  82. package/templates/commands/orc-fast.md +10 -15
  83. package/templates/commands/orc-poly.md +12 -21
  84. package/templates/commands/orc-pr-driver.md +11 -30
  85. package/templates/commands/orc-pr-setup.md +10 -31
  86. package/templates/commands/orc-route.md +11 -41
  87. package/templates/commands/orc-test.md +5 -60
  88. package/templates/hooks/README.md +34 -0
  89. package/templates/hooks/orc-session-hook.js +264 -0
  90. package/templates/hooks/orc-statusline.js +3 -1
  91. package/templates/skills/_shared/README.md +9 -0
  92. package/templates/skills/_shared/code-graph.md +47 -55
  93. package/templates/skills/_shared/config-precedence.md +3 -1
  94. package/templates/skills/_shared/extra-dispatch.md +73 -88
  95. package/templates/skills/_shared/gotchas.md +228 -177
  96. package/templates/skills/_shared/habits.md +101 -0
  97. package/templates/skills/_shared/lane-contract.md +84 -0
  98. package/templates/skills/_shared/phases/README.md +142 -83
  99. package/templates/skills/_shared/phases/analyst-gates.md +10 -21
  100. package/templates/skills/_shared/phases/execution.md +8 -14
  101. package/templates/skills/_shared/phases/house-rules.md +27 -32
  102. package/templates/skills/_shared/phases/intake.md +127 -133
  103. package/templates/skills/_shared/phases/mock-example.md +46 -56
  104. package/templates/skills/_shared/phases/plan-handoff.md +91 -97
  105. package/templates/skills/_shared/phases/planning.md +7 -17
  106. package/templates/skills/_shared/phases/preflight.md +19 -42
  107. package/templates/skills/_shared/phases/review.md +23 -27
  108. package/templates/skills/_shared/phases/rules.md +18 -42
  109. package/templates/skills/_shared/phases/scoring.md +55 -65
  110. package/templates/skills/_shared/phases/security-checklist.md +46 -50
  111. package/templates/skills/_shared/phases/security.md +45 -55
  112. package/templates/skills/_shared/phases/ship.md +6 -15
  113. package/templates/skills/_shared/phases/stop-resume.md +2 -5
  114. package/templates/skills/_shared/phases/summary.md +73 -48
  115. package/templates/skills/_shared/phases/testgen.md +41 -51
  116. package/templates/skills/_shared/phases/trace-verbs.md +433 -0
  117. package/templates/skills/_shared/phases/trace.md +136 -367
  118. package/templates/skills/_shared/phases/verify.md +62 -70
  119. package/templates/skills/_shared/phases/wave-grouping.md +128 -133
  120. package/templates/skills/_shared/phases/wiki-consult.md +10 -6
  121. package/templates/skills/_shared/read-ladder.md +2 -55
  122. package/templates/skills/_shared/return-validation.md +17 -70
  123. package/templates/skills/_shared/review-slice.md +79 -0
  124. package/templates/skills/_shared/smoke-gate.md +46 -28
  125. package/templates/skills/context-combiner/SKILL.md +15 -44
  126. package/templates/skills/orc/SKILL.md +34 -62
  127. package/templates/skills/orc/references/pattern-gate.md +89 -89
  128. package/templates/skills/orc/references/phases/intake.md +41 -47
  129. package/templates/skills/orc/references/phases/integration.md +13 -19
  130. package/templates/skills/orc/references/preflight-report.md +8 -9
  131. package/templates/skills/orc/references/ultra-mode.md +8 -6
  132. package/templates/skills/orc/subskills/orc-execution/SKILL.md +27 -73
  133. package/templates/skills/orc/subskills/orc-execution/core.md +12 -99
  134. package/templates/skills/orc/subskills/orc-execution/subagent.md +14 -13
  135. package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +11 -52
  136. package/templates/skills/orc/subskills/orc-review-verify/core.md +52 -135
  137. package/templates/skills/orc/subskills/orc-review-verify/subagent.md +7 -7
  138. package/templates/skills/orc/subskills/orc-testgen/SKILL.md +11 -22
  139. package/templates/skills/orc/subskills/orc-testgen/core.md +20 -59
  140. package/templates/skills/orc/subskills/orc-testgen/subagent.md +7 -7
  141. package/templates/skills/orc-advisor/SKILL.md +56 -60
  142. package/templates/skills/orc-analyze/SKILL.md +30 -66
  143. package/templates/skills/orc-analyze/schemas/report-audit.md +2 -1
  144. package/templates/skills/orc-analyze/schemas/report-prose.md +2 -1
  145. package/templates/skills/orc-analyze-mini/SKILL.md +35 -70
  146. package/templates/skills/orc-diy/README.md +31 -0
  147. package/templates/skills/orc-diy/SKILL.md +23 -74
  148. package/templates/skills/orc-diy/references/blocks/pattern.md +18 -18
  149. package/templates/skills/orc-fast/SKILL.md +44 -72
  150. package/templates/skills/orc-judge/SKILL.md +77 -82
  151. package/templates/skills/orc-mini/SKILL.md +61 -109
  152. package/templates/skills/orc-pattern/SKILL.md +27 -48
  153. package/templates/skills/orc-poly/SKILL.md +32 -61
  154. package/templates/skills/orc-pr-driver/SKILL.md +25 -51
  155. package/templates/skills/orc-pr-driver/references/green-gate.md +113 -105
  156. package/templates/skills/orc-pr-setup/SKILL.md +20 -45
  157. package/templates/skills/orc-quick/README.md +43 -2
  158. package/templates/skills/orc-quick/SKILL.md +76 -107
  159. package/templates/skills/orc-quick/references/dispatch-gate.md +16 -5
  160. package/templates/skills/orc-quick/references/gh-mode.md +48 -1
  161. package/templates/skills/orc-quick/references/look.md +3 -1
  162. package/templates/skills/orc-retro/SKILL.md +19 -18
  163. package/templates/skills/orc-retro/examples/retro-mock.md +1 -1
  164. package/templates/skills/orc-route/SKILL.md +25 -45
  165. package/templates/skills/orc-test/SKILL.md +16 -37
  166. package/templates/skills/orc-verify/SKILL.md +14 -32
  167. package/templates/skills/orc-wait/SKILL.md +156 -163
  168. package/templates/skills/orc-wiki/references/phases/phase-0.md +1 -6
  169. package/templates/skills/orc-wiki/references/phases/phase-1.md +1 -6
  170. package/templates/skills/orc-wiki/references/phases/phase-2.md +1 -6
  171. package/templates/skills/orc-wiki/references/phases/phase-3.md +1 -6
  172. package/templates/skills/orc-wiki/references/phases/phase-3c.md +1 -6
@@ -1,89 +1,89 @@
1
- # Reference — Code-Pattern Gate (orchestrator side)
2
-
3
- How the full lane resolves, injects, and enforces per-language code-patterns so
4
- executors MATCH the existing codebase instead of writing generic-template code.
5
- The engine (playbooks, codifier slice, reconcile rules) is the sibling skill
6
- `../../orc-pattern/SKILL.md`; this file is the orchestrator's gate + wiring.
7
- Load at Phase 2 (tagging) and Phase 3 (resolve gate + slice injection).
8
-
9
- Principle: **conventions defer to the project; security/correctness invariants
10
- are always enforced.**
11
-
12
- ## Phase 2 — Tag each task while scoring
13
-
14
- From its `declared_files` extensions + repo deps (see
15
- `../../orc-pattern/references/INDEX.md`):
16
- `{domain: FE|BE|null, lang: react|nextjs|vue|fastapi|nestjs|go|…|null}`.
17
- Tasks with no FE/BE language need no pattern.
18
-
19
- **Postgres secondary tag:** on a Postgres project (`pg`/`psycopg`/`asyncpg`/
20
- `pgx`/`lib/pq`/`Npgsql`/Prisma `postgresql`/`postgrex` in deps), add
21
- `db: postgres` to any task whose `declared_files` touch the data-access layer
22
- (repositories/dao/models/queries, `*.sql`, ORM entities/migrations). `db`
23
- co-applies WITH the framework `lang`, never instead of it — it pulls the
24
- cross-cutting `postgres` playbook into the same resolve gate.
25
-
26
- ## Phase 3 — Resolve gate (once, before the first wave)
27
-
28
- For each distinct tagged language (including `postgres` when any task is
29
- `db`-tagged), resolve against the cache `.claude/orc/patterns/<lang>-pattern.md`
30
- — test existence with the deterministic probe `orc pattern status <lang>`
31
- (exit 0 = cached; see `../../_shared/detecting-artifacts.md`), never an ad-hoc
32
- `find`, so a codified pattern is never missed:
33
-
34
- Every resolved language prints exactly ONE user-visible line (no cost, no ask —
35
- visibility only, so the user always knows which house style is in force):
36
-
37
- - **Cache hit, no drift** → no ask, no cost, but print
38
- `pattern: <lang>-pattern.md applied (cached)`.
39
- - **Cache miss** → apply config `pattern_findings` (default `ask`):
40
- - `ask` → ONE P0 prompt batched across ALL missing languages ("Learn
41
- conventions for {…} via orc-pattern, or proceed language-agnostic?");
42
- - `on` → codify without asking; print `pattern: <lang> — codifying (cache miss)`;
43
- - `off` → agnostic; print `pattern: <lang> — running language-agnostic (no cached pattern)`.
44
- - **On learn/`on`** → dispatch `orc-pattern-codifier-sonnet-5-high` per missing
45
- language (`orc-pattern-codifier-opus-5-med` when `opus5_only` — see
46
- `../../_shared/opus5-only.md`; slice per `../../orc-pattern/SKILL.md`
47
- Phase 1); YOU write the returned pattern to the cache.
48
- - **Agnostic fallback** (declined / `off` / no playbook for the language): no
49
- codifier, no scan — the executor enforces the universal invariants and
50
- imitates the neighbor files it already reads. ~Zero added cost.
51
-
52
- Hold the resolved pattern per language in run state (survives
53
- checkpoint/resume) — it is injected at dispatch and reused at Phase 5/6.
54
-
55
- ## Slice injection (anti-skip layer 1)
56
-
57
- Inject the resolved conventions + blocking invariants + the enforceable
58
- `validation_gate[]` lines LITERALLY into each FE/BE task's slice as `pattern` —
59
- never a file pointer. Agnostic tasks get the universal invariants only.
60
-
61
- **Gotchas ride BESIDE the pattern block, never inside it** (config `gotchas`;
62
- canonical `../../_shared/gotchas.md`). Same slice, same literal injection, one
63
- hard difference: the pattern applies to a LANGUAGE, so it goes to every task
64
- tagged with that language — a gotcha applies to a `scope` GLOB, so it goes only to
65
- tasks whose `declared_files` match it, capped at 3, highest `hits` first. Zero
66
- matches = no gotcha block at all. Never inject unfiltered: a pattern is what this
67
- project always does, a gotcha is what it got wrong ONCE, somewhere specific.
68
-
69
- For a `db:postgres`-tagged task, ALSO merge the resolved `postgres` pattern's
70
- Conventions + Invariants + gate lines into the SAME `pattern` block (appended
71
- to the framework pattern, or standalone if the task has no framework lang) —
72
- query invariants (bound params only, pooled connections, transactional
73
- multi-writes) ride the same anti-skip path. Record the postgres
74
- `pattern_version` in run state/log too.
75
-
76
- ## Return validation (anti-skip layer 2)
77
-
78
- A task that was given a `pattern` must return `invariants_checked: true` + a
79
- `pattern_version` matching what you injected — the single attestation covers a
80
- merged block. Missing/false attestation = malformed return (requeue). Record
81
- the applied `pattern_version` in the trace.
82
-
83
- ## Review/verify re-check (anti-skip layer 3)
84
-
85
- - **Phase 5 (review):** pass the resolved pattern as `code_pattern` AND its
86
- blocking `invariants[]` + `validation_gate[]` lines for the re-check — don't
87
- re-ask the user. An invariant violation or unmet gate line is P0.
88
- - **Phase 6 (verify):** pass the `validation_gate[]` lines in the slice — each
89
- line is an acceptance criterion; an unmet line is P0.
1
+ # Reference — Code-Pattern Gate (orchestrator side)
2
+
3
+ How the full lane resolves, injects, and enforces per-language code-patterns so
4
+ executors MATCH the existing codebase instead of writing generic-template code.
5
+ The engine (playbooks, codifier slice, reconcile rules) is the sibling skill
6
+ `../../orc-pattern/SKILL.md`; this file is the orchestrator's gate + wiring.
7
+ Load at Phase 2 (tagging) and Phase 3 (resolve gate + slice injection).
8
+
9
+ Principle: **conventions defer to the project; security/correctness invariants
10
+ are always enforced.**
11
+
12
+ ## Phase 2 — Tag each task while scoring
13
+
14
+ From its `declared_files` extensions + repo deps (see
15
+ `../../orc-pattern/references/INDEX.md`):
16
+ `{domain: FE|BE|null, lang: react|nextjs|vue|fastapi|nestjs|go|…|null}`.
17
+ Tasks with no FE/BE language need no pattern.
18
+
19
+ **Postgres secondary tag:** on a Postgres project (`pg`/`psycopg`/`asyncpg`/
20
+ `pgx`/`lib/pq`/`Npgsql`/Prisma `postgresql`/`postgrex` in deps), add
21
+ `db: postgres` to any task whose `declared_files` touch the data-access layer
22
+ (repositories/dao/models/queries, `*.sql`, ORM entities/migrations). `db`
23
+ co-applies WITH the framework `lang`, never instead of it — it pulls the
24
+ cross-cutting `postgres` playbook into the same resolve gate.
25
+
26
+ ## Phase 3 — Resolve gate (once, before the first wave)
27
+
28
+ For each distinct tagged language (including `postgres` when any task is
29
+ `db`-tagged), resolve against the cache `.claude/orc/patterns/<lang>-pattern.md`
30
+ — test existence with the deterministic probe `orc pattern status <lang>`
31
+ (exit 0 = cached; see `../../_shared/detecting-artifacts.md`), never an ad-hoc
32
+ `find`, so a codified pattern is never missed:
33
+
34
+ Every resolved language prints exactly ONE user-visible line (no cost, no ask —
35
+ visibility only, so the user always knows which house style is in force):
36
+
37
+ - **Cache hit, no drift** → no ask, no cost, but print
38
+ `pattern: <lang>-pattern.md applied (cached)`.
39
+ - **Cache miss** → apply config `pattern_findings` (default `ask`):
40
+ - `ask` → ONE P0 prompt (H `orc.phase-3.pattern`) batched across ALL missing languages ("Learn
41
+ conventions for {…} via orc-pattern, or proceed language-agnostic?");
42
+ - `on` → codify without asking; print `pattern: <lang> — codifying (cache miss)`;
43
+ - `off` → agnostic; print `pattern: <lang> — running language-agnostic (no cached pattern)`.
44
+ - **On learn/`on`** → dispatch `orc-pattern-codifier-sonnet-5-high` per missing
45
+ language (`orc-pattern-codifier-opus-5-med` when `opus5_only` — see
46
+ `../../_shared/opus5-only.md`; slice per `../../orc-pattern/SKILL.md`
47
+ Phase 1); YOU write the returned pattern to the cache.
48
+ - **Agnostic fallback** (declined / `off` / no playbook for the language): no
49
+ codifier, no scan — the executor enforces the universal invariants and
50
+ imitates the neighbor files it already reads. ~Zero added cost.
51
+
52
+ Hold the resolved pattern per language in run state (survives
53
+ checkpoint/resume) — it is injected at dispatch and reused at Phase 5/6.
54
+
55
+ ## Slice injection (anti-skip layer 1)
56
+
57
+ Inject the resolved conventions + blocking invariants + the enforceable
58
+ `validation_gate[]` lines LITERALLY into each FE/BE task's slice as `pattern` —
59
+ never a file pointer. Agnostic tasks get the universal invariants only.
60
+
61
+ **Gotchas ride BESIDE the pattern block, never inside it** (config `gotchas`;
62
+ canonical `../../_shared/gotchas.md`). Same slice, same literal injection, one
63
+ hard difference: the pattern applies to a LANGUAGE, so it goes to every task
64
+ tagged with that language — a gotcha applies to a `scope` GLOB, so it goes only to
65
+ tasks whose `declared_files` match it, capped at 3, highest `hits` first. Zero
66
+ matches = no gotcha block at all. Never inject unfiltered: a pattern is what this
67
+ project always does, a gotcha is what it got wrong ONCE, somewhere specific.
68
+
69
+ For a `db:postgres`-tagged task, ALSO merge the resolved `postgres` pattern's
70
+ Conventions + Invariants + gate lines into the SAME `pattern` block (appended
71
+ to the framework pattern, or standalone if the task has no framework lang) —
72
+ query invariants (bound params only, pooled connections, transactional
73
+ multi-writes) ride the same anti-skip path. Record the postgres
74
+ `pattern_version` in run state/log too.
75
+
76
+ ## Return validation (anti-skip layer 2)
77
+
78
+ A task that was given a `pattern` must return `invariants_checked: true` + a
79
+ `pattern_version` matching what you injected — the single attestation covers a
80
+ merged block. Missing/false attestation = malformed return (requeue). Record
81
+ the applied `pattern_version` in the trace.
82
+
83
+ ## Review/verify re-check (anti-skip layer 3)
84
+
85
+ - **Phase 5 (review):** pass the resolved pattern as `code_pattern` AND its
86
+ blocking `invariants[]` + `validation_gate[]` lines for the re-check — don't
87
+ re-ask the user. An invariant violation or unmet gate line is P0.
88
+ - **Phase 6 (verify):** pass the `validation_gate[]` lines in the slice — each
89
+ line is an acceptance criterion; an unmet line is P0.
@@ -1,47 +1,41 @@
1
- # Phase — Intake (id: `intake`)
2
-
3
- > **`/orc` phase file.** Moved out of `orc/SKILL.md` at v1.0.0 W12. The spine is
4
- > loaded IN FULL when the skill activates; this is loaded when the phase fires,
5
- > and most runs skip most phases. ONE consumer today, so it stays in this lane —
6
- > `../../../_shared/phases/README.md`'s rule: a file with one consumer stays home.
7
- > When a second lane reads it (W13 `orc-diy`, W14 `orc-mini`/`orc-fast`) it moves
8
- > to `_shared/phases/` and gains a `composed` or `trim` layer beside this one.
9
- > `orc lane phases orc --json` names the file and the layers.
10
-
11
- <!-- orc:layer full -->
12
-
13
- ## Intake (load ../../../_shared/phases/intake.md)
14
-
15
- **Plan-input trigger (check FIRST — load `../../../_shared/phases/plan-handoff.md`):** if the
16
- run input IS a plan (pasted planning-output, a `plan-{name}.md` path, or an
17
- `orc/planner/{name}/` checkpoint), follow that reference: bootstrap the trace,
18
- schema-validate, apply the `plan_head` staleness valve, RE-RUN the full Phase 1
19
- exit gate here (the deterministic catch for phantom-file drift), relay
20
- `open_questions[]`, then continue at Phase 2. A plan input never skips Phase 2/3
21
- nor executes task-by-task ad hoc.
22
-
23
- **Analyst auto-trigger:** on a document (PDF path, pasted doc, audit sheet)
24
- OR an ambiguous/underspecified requirement, FIRST dispatch the System Analyst
25
- (doc-optional — with no doc the request itself is the source). Offer
26
- standard/deep (`config.default_analysis_depth` presets it; mention `orc
27
- config set default_analysis_depth deep`); deep → you dispatch the scouts. On
28
- return run the analyst-return gates (analyst-gates.md); on build, continue at
29
- Phase 1 with the Requirement Planner.
30
-
31
- Emit `PHASE intake start` FIRST, then create `run/{run-slug}/` (slug from the
32
- intent). Then: rough-size →
33
- question tier (2/4/6) → ONE batched question round → draft the intent-spec
34
- (`../../schemas/intent-spec.md`) → **repo cross-check** (intake Step 3.5:
35
- Glob/Grep-confirm everything the spec names, or tag `UNVERIFIED`; tags become
36
- ONE batched sign-off question; >3 tags → recommend `orc-analyze`) → sign-off
37
- preference (gate/soft; DEFAULT GATE) → show spec → approval or edits. **No
38
- planning until approved (gate mode) and no unresolved `UNVERIFIED` tags
39
- either way.** On approval, emit `PHASE intake end`.
40
-
41
- The intent-spec's definition-of-done becomes Phase 6's acceptance criteria;
42
- its constraints become hard rules in every slice — at slice-assembly each
43
- task's `spec_invariants[]` is appended VERBATIM to that slice's
44
- `constraints[]`. Offer the opt-in **Test Authoring** (Phase 6.5; default
45
- `config.generate_tests`) in the sign-off round.
46
-
47
- <!-- /orc:layer -->
1
+ # Phase — Intake (id: `intake`)
2
+
3
+ > **`/orc` phase file** — read when the phase fires. One consumer, so it stays home (`../../../_shared/phases/README.md`). `orc lane phases orc --json` names the file and the layers.
4
+
5
+ <!-- orc:layer full -->
6
+
7
+ ## Intake (load ../../../_shared/phases/intake.md)
8
+
9
+ **Plan-input trigger (check FIRST — load `../../../_shared/phases/plan-handoff.md`):** if the
10
+ run input IS a plan (pasted planning-output, a `plan-{name}.md` path, or an
11
+ `orc/planner/{name}/` checkpoint), follow that reference: bootstrap the trace,
12
+ schema-validate, apply the `plan_head` staleness valve, RE-RUN the full Phase 1
13
+ exit gate here (the deterministic catch for phantom-file drift), relay
14
+ `open_questions[]`, then continue at Phase 2. A plan input never skips Phase 2/3
15
+ nor executes task-by-task ad hoc.
16
+
17
+ **Analyst auto-trigger:** on a document (PDF path, pasted doc, audit sheet)
18
+ OR an ambiguous/underspecified requirement, FIRST dispatch the System Analyst
19
+ (doc-optional — with no doc the request itself is the source). Offer
20
+ standard/deep (H `any.analysis.depth`; `config.default_analysis_depth` presets it; mention `orc
21
+ config set default_analysis_depth deep`); deep → you dispatch the scouts. On
22
+ return run the analyst-return gates (analyst-gates.md); on build, continue at
23
+ Phase 1 with the Requirement Planner.
24
+
25
+ Emit `PHASE intake start` FIRST, then create `run/{run-slug}/` (slug from the
26
+ intent). Then: rough-size →
27
+ question tier (2/4/6) → ONE batched question round → draft the intent-spec
28
+ (`../../schemas/intent-spec.md`) → **repo cross-check** (intake Step 3.5:
29
+ Glob/Grep-confirm everything the spec names, or tag `UNVERIFIED`; tags become
30
+ ONE batched sign-off question; >3 tags → recommend `orc-analyze`) → sign-off
31
+ preference (gate/soft; DEFAULT GATE) → show spec → approval or edits. **No
32
+ planning until approved (gate mode) and no unresolved `UNVERIFIED` tags
33
+ either way.** On approval, emit `PHASE intake end`.
34
+
35
+ The intent-spec's definition-of-done becomes Phase 6's acceptance criteria;
36
+ its constraints become hard rules in every slice — at slice-assembly each
37
+ task's `spec_invariants[]` is appended VERBATIM to that slice's
38
+ `constraints[]`. Offer the opt-in **Test Authoring** (H `orc.intake.testgen`; Phase 6.5; default
39
+ `config.generate_tests`) in the sign-off round.
40
+
41
+ <!-- /orc:layer -->
@@ -1,19 +1,13 @@
1
- # Phase — Integration (worktrees) (id: `integration`)
2
-
3
- > **`/orc` phase file.** Moved out of `orc/SKILL.md` at v1.0.0 W12. The spine is
4
- > loaded IN FULL when the skill activates; this is loaded when the phase fires,
5
- > and most runs skip most phases. ONE consumer today, so it stays in this lane —
6
- > `../../../_shared/phases/README.md`'s rule: a file with one consumer stays home.
7
- > When a second lane reads it (W13 `orc-diy`, W14 `orc-mini`/`orc-fast`) it moves
8
- > to `_shared/phases/` and gains a `composed` or `trim` layer beside this one.
9
- > `orc lane phases orc --json` names the file and the layers.
10
-
11
- <!-- orc:layer full -->
12
-
13
- ## Integration (worktrees only)
14
-
15
- Emit `PHASE integration start`. Merge worker branches; conflicts → resolver
16
- subagent (Opus 4.8 medium) given BOTH tasks' specs/intents, not just the diff.
17
- Record merge state in checkpoint; emit `PHASE integration end`.
18
-
19
- <!-- /orc:layer -->
1
+ # Phase — Integration (worktrees) (id: `integration`)
2
+
3
+ > **`/orc` phase file** — read when the phase fires. One consumer, so it stays home (`../../../_shared/phases/README.md`). `orc lane phases orc --json` names the file and the layers.
4
+
5
+ <!-- orc:layer full -->
6
+
7
+ ## Integration (worktrees only)
8
+
9
+ Emit `PHASE integration start`. Merge worker branches; conflicts → resolver
10
+ subagent (Opus 4.8 medium) given BOTH tasks' specs/intents, not just the diff.
11
+ Record merge state in checkpoint; emit `PHASE integration end`.
12
+
13
+ <!-- /orc:layer -->
@@ -4,11 +4,10 @@ One compact, user-visible block printed ONCE at Phase 1, after the planning
4
4
  input is settled (wiki consulted, crosslink probed, waves computed at Phase 2 —
5
5
  so print it at the point all inputs exist, typically end of Phase 1 / start of
6
6
  Phase 3). This is **presentation only** — no new probes; every value is already
7
- computed by the wiki consult (Change 3), the crosslink probe (Change 5), the
8
- pattern resolve gate (Change 4), and wave grouping.
7
+ computed by the wiki consult, the crosslink probe, the pattern resolve gate,
8
+ and wave grouping.
9
9
 
10
- The point is that the four knowledge gates the run used to keep silent are now
11
- always surfaced: the user always knows whether the run is grounded (wiki),
10
+ The point: the four knowledge gates are ALWAYS surfaced: the user always knows whether the run is grounded (wiki),
12
11
  whose house style is in force (pattern), whether peer contracts are in play
13
12
  (crosslink), where the trace is, and when the run will pause.
14
13
 
@@ -49,7 +48,7 @@ waves: 3 planned — will pause after wave 2 (batch_pause_every=2)
49
48
  that the run is not learning from its own repairs, and a user who did not should
50
49
  see that it is. Canonical: `../../_shared/gotchas.md`. `.claude/orc/gotchas.md`
51
50
  is where the entries live.
52
- - **wiki, the debt tail (v0.46.0):** append `· <n> docs pending refresh, <tok> /
51
+ - **wiki, the debt tail:** append `· <n> docs pending refresh, <tok> /
53
52
  <$>` from `orc wiki debt --json` **only when debt exists** (exit 1). Exit 0
54
53
  appends nothing — a tail that says "no debt" on every run is a tail people stop
55
54
  reading, and this one has to be legible the time it matters.
@@ -73,7 +72,7 @@ waves: 3 planned — will pause after wave 2 (batch_pause_every=2)
73
72
  - **crosslink:** the crosslink line from `wiki-consult.md` when a probe hit
74
73
  (`cached` or `configured-no-cache`); omit the whole line when crosslink is
75
74
  not in play (state `none`).
76
- - **extra:** (v0.50.0) printed on **every** run where `config.extra_enabled` is
75
+ - **extra:** printed on **every** run where `config.extra_enabled` is
77
76
  true — including a run where nothing routed foreign (`ON — 0 of 9 tasks
78
77
  foreign; no route row covers this plan's scores`). This is the P0 line
79
78
  (`a lane that sends work off Claude without saying so`), so unlike every other
@@ -115,7 +114,7 @@ waves: 3 planned — will pause after wave 2 (batch_pause_every=2)
115
114
  be naming the wrong half for every covered score.
116
115
  - **tdd:** ALWAYS printed on a lane whose TDD policy is on — BOTH branches, not
117
116
  only the exemption. Counted straight from the plan's `tdd_spec`, broken down
118
- by `disposition` so the user sees **what got no test and why** (v0.41.0):
117
+ by `disposition` so the user sees **what got no test and why**:
119
118
 
120
119
  ```
121
120
  tdd: 3 tasks with tests (T3, T6, T9) · 2 covered-by-existing · 2 no-behavior
@@ -150,10 +149,10 @@ block.
150
149
 
151
150
  ---
152
151
 
153
- # The `forecast:` block (v0.42.0) — printed EARLIER, and separately
152
+ # The `forecast:` block — printed EARLIER, and separately
154
153
 
155
154
  A second, shorter block. It is NOT part of the preflight block above and does not
156
- change it. It answers the one question ORC never answered: **what will this run
155
+ change it. It answers one question: **what will this run
157
156
  cost me in time, before it starts?**
158
157
 
159
158
  ## When
@@ -24,6 +24,8 @@ Apply at Phase 0, on top of the normal config resolution:
24
24
  low → medium, which makes both bands medium. It is still a floor — it never
25
25
  lowers a band, and it never raises `[90,100]` past medium.
26
26
  Show the remapped table with the Phase 2 scoring table.
27
+ - **Habits** (`habits{}` present) never answer a forced key or question here —
28
+ ultra wins; say so on the habits preflight line. Record those `ASK`s `by=config`.
27
29
 
28
30
  > Opus-5-only mode: if `opus5_only`, every role this lane dispatches is already
29
31
  > Opus 5.5 (advisor and judge are pinned there by default) and the scouts rise to
@@ -83,13 +85,13 @@ author's reasoning or self-assessment.
83
85
  evidence`. An R# with an EMPTY diff column is a deterministically caught
84
86
  missing implementation — dispatch the fix wave directly, no judge needed
85
87
  for that miss.
86
- 2. **Static analysis**: run the project's own tooling on the changed files
87
- when the stack detection found any (linter, sonar-scanner,
88
- type-checker) — never install tooling. Inject results into the slice;
89
- tool findings on changed lines are blocking input the judge triages.
88
+ 2. **Static analysis**: the shared R1 free check
89
+ (`../../_shared/review-slice.md` §1) — reuse Phase 5's `tool_findings[]`;
90
+ re-run it when a fix wave changed files. Never install tooling.
91
+ Tool findings on changed lines are blocking input the judge triages.
90
92
  Slice adds: matrix, changed-file LIST (never an inlined diff — the judge
91
- reads matrix-guided via its own Read/Grep), verify report, static-analysis
92
- results, the resolved pattern's blocking invariants. REVISE → scored
93
+ reads matrix-guided via its own Read/Grep), verify report, `tool_findings[]`,
94
+ `gotcha_card` (§2), the resolved pattern's blocking invariants. REVISE → scored
93
95
  executor **fix wave** for only the affected tasks (findings verbatim in
94
96
  slices) → re-verify → re-judge. All clear → Phase 7.
95
97
 
@@ -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
- One entry point: the orchestrator spawns a subagent via the Task tool,
19
- prepending `subagent.md` framing + the input slice, which points to `core.md`.
20
- `core.md` is the AUTHORITATIVE spec (full input slice, procedure, and return
21
- contract); the summary below orients — on any conflict, `core.md` wins.
22
-
23
- ## What the worker does (summary)
24
-
25
- 1. Absorb `log_digest` (prior DECISIONs/INTERFACEs/ANSWERs bind you); read `spec_ref`.
26
- 2. Implement EXACTLY the task in the slice, touching only `declared_files[]`,
27
- honoring every `constraints[]` hard rule AND the standing `house_rules` card
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 (mode-neutral)
1
+ # orc-execution — Core (the input slice)
2
2
 
3
- A procedure specification: inputs, steps, outputs. Executed by a spawned
4
- subagent; the orchestrator never runs this itself.
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` + cache. It is
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 — MATCH the field
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
- ## Procedure
79
-
80
- 1. Absorb log_digest — prior DECISIONs/INTERFACEs/ANSWERs bind you.
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.