@ikon85/agent-workflow-kit 0.33.0 → 0.34.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/.agents/skills/ask-matt/SKILL.md +4 -3
  2. package/.agents/skills/audit-skills/SKILL.md +6 -0
  3. package/.agents/skills/board-to-waves/SKILL.md +6 -2
  4. package/.agents/skills/code-review/SKILL.md +6 -0
  5. package/.agents/skills/codebase-design/DESIGN-IT-TWICE.md +11 -1
  6. package/.agents/skills/codex-adapter-sync/SKILL.md +23 -19
  7. package/.agents/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +6 -0
  8. package/.agents/skills/improve-codebase-architecture/SKILL.md +10 -1
  9. package/.agents/skills/kit-release/SKILL.md +29 -4
  10. package/.agents/skills/kit-update/SKILL.md +13 -0
  11. package/.agents/skills/orchestrate-wave/SKILL.md +1 -1
  12. package/.agents/skills/orchestrate-wave/references/dispatch-subagents.md +23 -11
  13. package/.agents/skills/orchestrate-wave/references/dispatch-workflow.md +8 -0
  14. package/.agents/skills/research/SKILL.md +6 -0
  15. package/.agents/skills/scale-check/SKILL.md +9 -7
  16. package/.agents/skills/setup-workflow/SKILL.md +47 -1
  17. package/.agents/skills/setup-workflow/board-sync.md +7 -2
  18. package/.agents/skills/setup-workflow/workflow-overview.md +1 -2
  19. package/.agents/skills/to-issues/SKILL.md +66 -8
  20. package/.agents/skills/to-waves/SKILL.md +24 -12
  21. package/.claude/skills/ask-matt/SKILL.md +4 -3
  22. package/.claude/skills/audit-skills/SKILL.md +6 -0
  23. package/.claude/skills/board-to-waves/SKILL.md +6 -2
  24. package/.claude/skills/code-review/SKILL.md +6 -0
  25. package/.claude/skills/codebase-design/DESIGN-IT-TWICE.md +8 -0
  26. package/.claude/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +6 -0
  27. package/.claude/skills/improve-codebase-architecture/SKILL.md +6 -0
  28. package/.claude/skills/kit-release/SKILL.md +29 -4
  29. package/.claude/skills/kit-update/SKILL.md +13 -0
  30. package/.claude/skills/orchestrate-wave/SKILL.md +1 -1
  31. package/.claude/skills/orchestrate-wave/references/dispatch-subagents.md +23 -11
  32. package/.claude/skills/orchestrate-wave/references/dispatch-workflow.md +8 -0
  33. package/.claude/skills/research/SKILL.md +6 -0
  34. package/.claude/skills/scale-check/SKILL.md +9 -7
  35. package/.claude/skills/setup-workflow/SKILL.md +47 -1
  36. package/.claude/skills/setup-workflow/board-sync.md +7 -2
  37. package/.claude/skills/setup-workflow/workflow-overview.md +1 -2
  38. package/.claude/skills/to-issues/SKILL.md +66 -8
  39. package/.claude/skills/to-waves/SKILL.md +24 -12
  40. package/README.md +89 -13
  41. package/agent-workflow-kit.package.json +204 -44
  42. package/docs/adr/0004-release-intent-is-a-version-tag.md +42 -0
  43. package/docs/adr/0005-to-issues-is-the-planning-facade.md +42 -0
  44. package/docs/adr/0006-routing-knowledge-access-and-policy-are-separate.md +91 -0
  45. package/docs/agents/skills/local-ci.md +89 -0
  46. package/docs/agents/wave-anchor-template.md +2 -2
  47. package/docs/methodology.html +1 -1
  48. package/docs/methodology.svg +1 -1
  49. package/docs/workflow.html +2 -2
  50. package/docs/workflow.png +0 -0
  51. package/package.json +1 -1
  52. package/scripts/codex-exec.sh +47 -8
  53. package/scripts/codex-exec.test.mjs +56 -0
  54. package/scripts/kit-release.test.mjs +178 -0
  55. package/scripts/release-state.mjs +35 -5
  56. package/scripts/release-state.test.mjs +122 -5
  57. package/scripts/test_codex_adapter_sync_contract.py +30 -15
  58. package/scripts/test_orchestrate_wave_contract.py +73 -0
  59. package/scripts/test_program_planning_contract.py +70 -0
  60. package/scripts/test_skill_portability_lint.py +54 -0
  61. package/src/cli.mjs +109 -2
  62. package/src/commands/init.mjs +17 -1
  63. package/src/commands/routing-policy-update.mjs +204 -0
  64. package/src/commands/update.mjs +22 -0
  65. package/src/lib/agentSurfaceRegistry.mjs +60 -0
  66. package/src/lib/bundle.mjs +24 -0
  67. package/src/lib/capabilityMatrix.mjs +85 -0
  68. package/src/lib/dispatchReceipt.mjs +162 -0
  69. package/src/lib/frontendWorkloads.mjs +170 -0
  70. package/src/lib/routeDispatcher.mjs +158 -0
  71. package/src/lib/routingAccessGraph.mjs +105 -0
  72. package/src/lib/routingAdapters/claude.mjs +62 -0
  73. package/src/lib/routingAdapters/codex.mjs +136 -0
  74. package/src/lib/routingCatalog.mjs +123 -0
  75. package/src/lib/routingEvidenceCache.mjs +222 -0
  76. package/src/lib/routingIntent.mjs +93 -0
  77. package/src/lib/routingPolicy.mjs +67 -0
  78. package/src/lib/routingProfile.mjs +334 -0
  79. package/src/lib/routingResolver.mjs +176 -0
  80. package/src/lib/routingSources/artificialAnalysis.mjs +129 -0
  81. package/src/lib/routingSources/benchlm.mjs +151 -0
  82. package/src/lib/routingSources/codeArena.mjs +162 -0
  83. package/src/lib/routingSources/deepswe.mjs +106 -0
  84. package/src/lib/routingSources/openhands.mjs +102 -0
  85. package/src/lib/routingSources/openhandsFrontend.mjs +135 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: to-issues
3
- description: "Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices. Use when user wants to convert a plan into issues, create implementation tickets, or break down work into issues."
3
+ description: "Break a Feature or Program plan, spec, or PRD into independently-grabbable issues on the project issue tracker. This is the single public Planning facade: explicit Feature identity uses tracer-bullet decomposition; explicit Program identity delegates to the internal graph engine."
4
4
  ---
5
5
 
6
6
  # To Issues
@@ -23,6 +23,39 @@ node scripts/readiness.mjs check --skill to-issues --json
23
23
  - `managedBoard=not-applicable`: `STOP` and report that `/to-issues` is **inapplicable** for a project that deliberately has no managed board. This is a terminal project decision, not invalid evidence and not a partially active mode.
24
24
  <!-- readiness:required-preflight:end -->
25
25
 
26
+ ## Planning facade — select by explicit identity only
27
+
28
+ `to-issues` is the **single public Planning facade**. After the readiness
29
+ preflight and before any remote write, classify the source from its explicit PRD
30
+ identity:
31
+
32
+ - **Feature identity → `planning-mode=feature`.** The body carries
33
+ `<!-- prd: awaiting-decomposition -->` and its one `type:*` label is not the
34
+ configured Program type. Run the existing Feature decomposition path below:
35
+ one slice stays ATOMIC; two or more slices PROMOTE to a wave anchor.
36
+ - **Program identity → `planning-mode=program`.** The body carries
37
+ `<!-- prd: program -->` and its one `type:*` label is the board profile's
38
+ `labels.programType` value. Preserve the source and delegate to the internal
39
+ `to-waves` graph engine. That engine still validates the graph, shows the
40
+ complete Program preview, waits for the single explicit approval, and performs
41
+ zero remote writes before approval.
42
+
43
+ **Missing or contradictory identity is a hard stop before a remote write.**
44
+ Missing means neither marker is present, including a raw issue, file bundle, or
45
+ external PRD without an explicit identity. Contradictory means both markers are
46
+ present, the marker disagrees with the `type:*` label, or the source carries
47
+ multiple type labels. Report the observed markers and type labels, then ask the
48
+ user to establish exactly one identity. A cold-entry source may receive a
49
+ Feature or Program identity only after that explicit choice; rerun this
50
+ classification before any normalization or publication.
51
+
52
+ **Size, prose, and model judgment never select the mode.** A `## Wellenplan`
53
+ heading, estimated file count, wording such as “large program”, or an agent's
54
+ inference may validate or contradict an already explicit identity, but none may
55
+ create or switch it. A Program identity without the graph grammar is a blocking
56
+ contract error, not a fallback to Feature. A Feature identity with Program-only
57
+ graph grammar is likewise contradictory and stops.
58
+
26
59
  ## Process
27
60
 
28
61
  ### 1. Gather context
@@ -110,7 +143,8 @@ Ask the user:
110
143
 
111
144
  Iterate until the user approves the breakdown.
112
145
 
113
- **Program batch handoff.** When `to-waves` invokes this skill for a Stufe-1p stub,
146
+ **Program batch handoff.** When the internal Program graph engine invokes this
147
+ skill for a Stufe-1p stub,
114
148
  the complete Program preview has already shown and approved every wave's slice
115
149
  contract. Reuse that approval when this pass preserves the approved cut: do not
116
150
  pause again merely because the internal pipeline crossed a skill boundary. Run
@@ -122,9 +156,21 @@ newly discovered gate invalidates the inherited approval and returns to §4.
122
156
 
123
157
  **Cluster/Wave discriminator (identical wording — `to-prd` §2 / `to-issues` §5):** `type:cluster` (label) always stops. A Wave number also stops, **unless** the target carries the `wave-stub` label — a Wave-stamped `wave-stub` issue is a **Stufe-1p Program-stub** (`to-waves`-published, native parent = a Program-PRD) and remains a **valid target**. A Wave-stamped issue **without** `wave-stub` (an already-assigned leaf, or a drifted item) is still a hard stop.
124
158
 
125
- The canonical source is a **Draft-PRD** issue from `to-prd` (carries `plan_revision`, `<!-- prd: awaiting-decomposition -->`, exactly one `type:*` + one `priority:*`, **no** `type:cluster`, and no Wave **unless** the discriminator's `wave-stub` exception applies — a Program-stub's per-wave-start content pass writes this same shape into an already Wave-stamped stub, `to-prd` §2). But `to-issues` is **provenance-independent**: it re-derives readiness from the **artefact** (§3b), never from which tool produced it.
126
-
127
- **Cold entry on an already-existing issue.** The source can also be a **raw issue**, an **external PRD embedded in an issue**, or a **mechanical file bundle** — without the `to-prd` markers. Then a **cold-entry preflight applies before anything is mutated:**
159
+ The canonical Feature source is a **Draft-PRD** issue from `to-prd` (carries
160
+ `plan_revision`, `<!-- prd: awaiting-decomposition -->`, exactly one `type:*` +
161
+ one `priority:*`, **no** `type:cluster`, and no Wave **unless** the
162
+ discriminator's `wave-stub` exception applies — a Program-stub's per-wave-start
163
+ content pass writes this same shape into an already Wave-stamped stub, `to-prd`
164
+ §2). The facade is provenance-independent but not identity-optional: it
165
+ re-derives readiness from the **artefact** (§3b), never from which tool produced
166
+ it, only after the explicit identity classification above selected the mode.
167
+
168
+ **Cold entry on an already-existing issue.** The source can also be a **raw
169
+ issue**, an **external PRD embedded in an issue**, or a **mechanical file
170
+ bundle** — without the `to-prd` markers. That absence first triggers the
171
+ facade's identity hard stop above. Only after the user explicitly establishes
172
+ Feature identity may this **cold-entry preflight apply before anything is
173
+ mutated:**
128
174
  - **Hard-stop per the discriminator above** — `type:cluster` always; Wave only when the issue is **not** a `wave-stub` (the exception is already an intended promote target — `promote` reuses its pre-stamped Wave number, §5a below).
129
175
  - **Normalize labels** (mirroring `to-prd`'s normalization): exactly **one `type:*` + one `priority:*`**; `needs-info`/`ready-for-agent` **stripped** until the final bucket assignment (§5c).
130
176
  - **Synthesize missing `to-prd` markers in place** (never assume them): `plan_revision r1` at the body head, render the Tier-2 anchor body from the template. Surface `source`/`synthesized` in the §7 audit.
@@ -389,7 +435,8 @@ Reference the blocking ticket(s), or "None - can start immediately".
389
435
  <!-- mirror-xform:start codex-escalation -->
390
436
  ```
391
437
  Welle <N> · Slice <X> (<closes #x | refs #<prd#>, Parent #<prd#>>). Read #<prd#> for decisions.
392
- Start skill: 🧭 Design Grill → /grill-with-docs · 🔬 Verify Spike → /verify-spike · 📐 Trade-off/Research → /decision-gate · AFK → /implement · HITL → /grill-me → /implement. Recommended model: <Model [Effort]>.
438
+ Start skill: 🧭 Design Grill → /grill-with-docs · 🔬 Verify Spike → /verify-spike · 📐 Trade-off/Research → /decision-gate · AFK → /implement · HITL → /grill-me → /implement.
439
+ Routing intent: `routing-intent: <judgment | development | mechanical>` · `reasoning-intent: <deep | balanced | light>`. The dispatching surface resolves the current executable route; never persist that provider route here.
393
440
  Worktree: your project's worktree helper, or `git worktree add`
394
441
  Scope (<N> files) — REQUIRED FIELD, blast-radius estimate at cut time; the build session checks it against its own recon findings, >2x deviation → STOP:
395
442
  - <concrete file + change>
@@ -397,6 +444,12 @@ Live-verify: <user outcome, DB/UI value with comparison>
397
444
  PR: <closes #x | Part of #<prd#> — NEVER closes on the anchor>.
398
445
  ```
399
446
  <!-- mirror-xform:end -->
447
+
448
+ At execution time, consume that provider-neutral intent only through
449
+ `src/lib/routeDispatcher.mjs` and its shared spawn guard. The active Claude or
450
+ Codex adapter must produce Dispatch receipt v2 with requested/applied route,
451
+ model/effort enforcement, precedence, and catalog/access/policy revisions
452
+ before an AFK subagent starts; the durable issue never claims that proof.
400
453
  </issue-template>
401
454
 
402
455
  **Blast-radius reconciliation (build session):** the stamped `**Blast-Radius:**` is the estimate *at the cut* — the build session compares it against its own recon finding. A real finding **> 2× the estimate → STOP + report** (re-cut at the anchor), do NOT keep building silently.
@@ -430,12 +483,17 @@ It asserts, for the rooted local graph:
430
483
 
431
484
  If the source was a `wave-stub` stub, briefly confirm the label is gone (the publish mechanic strips it automatically — see §5): `gh issue view <anchor-or-leaf#> --json labels -q '.labels[].name'` shows **no** `wave-stub`. (Not part of `execute-ready-check.py` — its own quick check.)
432
485
 
433
- `--mode audit` is **non-blocking** — a mismatch is a **loud warning** here; the **hard block** is `.claude/hooks/drift-guard.py` at handoff-creation. Emit a visible audit two-liner:
486
+ `--mode audit` is **non-blocking** — a mismatch is a **loud warning** here; the
487
+ **hard block** is `.claude/hooks/drift-guard.py` at handoff-creation. Emit a
488
+ visible audit that names the selected facade mode:
434
489
 
435
490
  ```
436
- to-issues: anchor=#<X> mode=<promote|atomic> slices=<n> rev <old>→<new>
491
+ to-issues: planning-mode=feature anchor=#<X> mode=<promote|atomic> slices=<n> rev <old>→<new>
437
492
  source=<draft-prd|raw-issue|external-prd|bundle> synthesized=<marker-list | none>
438
493
  AFK=[#a #b] HITL=[#c] · drift=<none | …> shape=<ok | warn:…>
439
494
  ```
440
495
 
496
+ The Program graph engine emits `planning-mode=program` in its own counted audit
497
+ after the complete preview gate; the facade relays that audit unchanged.
498
+
441
499
  Do NOT close or modify any parent issue beyond the promote stamp.
@@ -1,17 +1,25 @@
1
1
  ---
2
2
  name: to-waves
3
3
  disable-model-invocation: true
4
- description: "Turn a Program-PRD's wave plan into fully planned, execute-ready wave anchors and slice leaves after one complete chat preview. Validates the graph, publishes every wave, runs the to-prd/spec-self-critique/to-issues maturity contract for each wave, models unresolved work as explicit gates, and audits counted readiness. Idempotent and crash-recoverable. Use on a Program-PRD over several waves. NOT for a single-wave feature (to-issues) or backlog clustering (board-to-waves)."
4
+ description: "Internal Program graph engine behind the public to-issues Planning facade. Turns an explicitly identified Program-PRD into execute-ready wave anchors and slice leaves after one complete chat preview. Kept as a disabled compatibility entrypoint for existing explicit invocations; normal routing always selects to-issues."
5
5
  ---
6
6
 
7
- # to-waves — Unfold a Program-PRD's wave plan onto the board
7
+ # to-waves — Internal Program graph engine
8
+
9
+ This skill is an **Internal Program graph engine**, selected by `to-issues` only
10
+ when the source carries explicit, coherent Program identity. It is not a second
11
+ public Planning route. The disabled `/to-waves` invocation remains only as a
12
+ compatibility entrypoint for existing callers and tests; it applies this same
13
+ contract and should direct future normal use to `/to-issues`.
8
14
 
9
15
  Takes a **Program-PRD** — the native Sub-Issue anchor over a multi-wave program
10
16
  (Programm → Phase → Welle → Slice) — and turns its `## Wellenplan` chapter into
11
17
  **fully planned wave anchors + slice leaves** on the board. Pipeline position:
12
- `scale-check → grill → to-prd (program mode) → to-waves`, with the per-wave
13
- `to-prd → spec-self-critique → to-issues` maturity pass owned inside this run.
14
- The **grill and to-prd sit upstream**; to-waves runs once the Program-PRD exists.
18
+ `scale-check → grill → to-prd (program mode) → to-issues`, with this internal
19
+ engine owning the per-wave `to-prd → spec-self-critique → to-issues` maturity
20
+ pass inside this run.
21
+ The **grill and to-prd sit upstream**; the facade dispatches here once the
22
+ Program-PRD exists and its identity is coherent.
15
23
  It **never invents structure** — it only unfolds what the plan already decided.
16
24
 
17
25
  <!-- readiness:required-preflight:start -->
@@ -24,8 +32,8 @@ node scripts/readiness.mjs check --skill to-waves --json
24
32
  ```
25
33
 
26
34
  - `verdict=ready`: continue with the existing workflow without announcing the check. **Ready is silent.**
27
- - `verdict=blocked`: `STOP` before any mutation. Report every required capability as `<capability>=<state>` so `issueTracker`, `managedBoard`, and `specCompleteness` failures — including distinct `missing`, `pending`, and `invalid` states — stay visible, then give exactly one recovery path: **Run `/setup-workflow`, then rerun `/to-waves`.** Do not fall back to bare tracker or board commands.
28
- - `managedBoard=not-applicable`: `STOP` and report that `/to-waves` is **inapplicable** for a project that deliberately has no managed board. This is a terminal project decision, not invalid evidence and not a partially active mode.
35
+ - `verdict=blocked`: `STOP` before any mutation. Report every required capability as `<capability>=<state>` so `issueTracker`, `managedBoard`, and `specCompleteness` failures — including distinct `missing`, `pending`, and `invalid` states — stay visible, then give exactly one recovery path: **Run `/setup-workflow`, then rerun `/to-issues`.** Do not fall back to bare tracker or board commands.
36
+ - `managedBoard=not-applicable`: `STOP` and report that Program planning through `/to-issues` is **inapplicable** for a project that deliberately has no managed board. This is a terminal project decision, not invalid evidence and not a partially active mode.
29
37
  <!-- readiness:required-preflight:end -->
30
38
 
31
39
  Board constants (project node, field/status IDs) + helpers live **consumer-side**:
@@ -43,10 +51,14 @@ is the parser.
43
51
 
44
52
  ## 1. Input — a Program-PRD
45
53
 
46
- The target is a Program-PRD issue: it carries the `<!-- prd: program -->` marker (or
47
- the program-type label) and a `## Wellenplan` table. Passed in / from context. If the
48
- issue is a plain feature-PRD or a Welle-Anchor, stop a feature-PRD is `to-issues`'
49
- target, an anchor is already a single wave.
54
+ The target is a Program-PRD issue: it carries both the
55
+ `<!-- prd: program -->` marker and the configured Program-type label, plus a
56
+ `## Wellenplan` table. Passed in from the facade or explicit compatibility
57
+ invocation. If either identity half is missing, they disagree, or Feature
58
+ identity is also present, stop before preview or write and return to
59
+ `to-issues`; never infer Program mode from the table, prose, size, or model
60
+ judgment. A plain Feature-PRD remains on the facade's Feature path; a
61
+ Wave-Anchor is already a single wave.
50
62
 
51
63
  ## 2. Parse + validate — the graph preflight
52
64
 
@@ -316,7 +328,7 @@ python3 scripts/board-sync.py program-sync <prd#>
316
328
  ## Audit block (visible output)
317
329
 
318
330
  ```
319
- to-waves: prd=#<n> preview=<approved|rejected>
331
+ to-issues: planning-mode=program engine=to-waves prd=#<n> preview=<approved|rejected>
320
332
  created=<stubs X von Y, leaves X von Y> adopted=<#a #b … | none>
321
333
  stamped=<N von M Wave/Phase> phase=<stamped | skipped (profile lacks fields.phase)>
322
334
  matured=<X von Y> execute-ready=<X von Y Wellen ausführungsreif>
@@ -49,7 +49,8 @@ Prefer the smallest depth that produces a clear next action.
49
49
  undertaking, several independently-shippable stages. Run `/scale-check`
50
50
  first (it owns the altitude criteria catalog — this router only names it);
51
51
  two or more criteria tripped routes to a program grill → `/to-prd` →
52
- `/to-waves`.
52
+ `/to-issues`. The explicit Program identity makes the Planning facade select
53
+ its internal graph engine; the user never chooses that engine.
53
54
  - **Deep:** `/grill-with-docs` followed by `/to-prd` and `/to-issues` when
54
55
  terminology, contracts, rollout order, or ownership are still uncertain.
55
56
  - **Medium:** `/to-issues` for a ready artefact that needs slicing.
@@ -73,9 +74,9 @@ A starting situation that generates work, then merges onto the main flow.
73
74
 
74
75
  - **Bugs and requests piling up** → **`/triage`**. Moves issues through triage and produces agent-ready issues that `/implement` later picks up. Only for issues **you didn't create** — `/to-issues` output is already agent-ready, don't triage it.
75
76
  - **Something's broken** → **`/diagnose`**. For the hard ones: the bug that resists a first glance, the intermittent flake, the regression between two known-good states. Refuses to theorise until it has a **tight feedback loop** — one command that already goes red on *this* bug — then fixes with a regression test. Its post-mortem hands off to **`/improve-codebase-architecture`** when the finding is that there's no good seam.
76
- - **A huge, foggy effort too big for one agent session** — a greenfield build or a sprawling feature where the way from here to the destination isn't yet visible, and it's still **pre-spec** (before any grill or PRD) → **`/wayfinder`** (user-invoked). It charts a **shared map** of investigation slices on the tracker and resolves them one at a time — producing **decisions, not deliverables** — until the fog lifts and the route is clear, then merges onto the main flow at **`/to-prd`** (or, if the effort turned out small enough, straight to **`/implement`**). Where `/grill-with-docs` sharpens an idea you can hold in one session, wayfinder is for the one you can't. Once an undertaking has already resolved into several independently-shippable waves, `/scale-check` → `/to-waves` stays the primary route.
77
+ - **A huge, foggy effort too big for one agent session** — a greenfield build or a sprawling feature where the way from here to the destination isn't yet visible, and it's still **pre-spec** (before any grill or PRD) → **`/wayfinder`** (user-invoked). It charts a **shared map** of investigation slices on the tracker and resolves them one at a time — producing **decisions, not deliverables** — until the fog lifts and the route is clear, then merges onto the main flow at **`/to-prd`** (or, if the effort turned out small enough, straight to **`/implement`**). Where `/grill-with-docs` sharpens an idea you can hold in one session, wayfinder is for the one you can't. Once an undertaking has already resolved into several independently-shippable waves, `/scale-check` → `/to-issues` stays the primary route.
77
78
  - **A backlog to cluster** → **`/board-to-waves`**. Groups an existing board into themed waves when you need to *find* the next wave rather than start fresh.
78
- - **A whole wave to LAND** → **`/orchestrate-wave`**. When a wave anchor (file-disjoint slices, specs already locked) is ready to build, verify and land end-to-end — often AFK: it dispatches an implementer per slice in its own worktree, integrates serially, verifies centrally, and lands the wave. The execute-and-land node of the wave ladder (`scale-check` → `to-waves`/`board-to-waves` → `orchestrate-wave`). A single slice just goes to `/implement`.
79
+ - **A whole wave to LAND** → **`/orchestrate-wave`**. When a wave anchor (file-disjoint slices, specs already locked) is ready to build, verify and land end-to-end — often AFK: it dispatches an implementer per slice in its own worktree, integrates serially, verifies centrally, and lands the wave. The execute-and-land node of the wave ladder (`scale-check` → `to-issues`/`board-to-waves` → `orchestrate-wave`). A single slice just goes to `/implement`.
79
80
 
80
81
  ## Cross-model review (Codex)
81
82
 
@@ -114,6 +114,12 @@ otherwise stay invisible.
114
114
 
115
115
  ### 2. Audit in parallel — one subagent per skill
116
116
 
117
+ Before dispatch, resolve a provider-neutral Routing intent through
118
+ `src/lib/routeDispatcher.mjs` and require a Dispatch receipt from the shared
119
+ spawn guard. A detected transport is not authorization; AFK dispatch stops
120
+ unless requested/applied route, model/effort enforcement, environment
121
+ precedence, and catalog/access/policy revisions are proved.
122
+
117
123
  Run **one read-only research subagent per skill** — several in parallel in a
118
124
  SINGLE message (they are independent and read-only, so they don't contend for the
119
125
  git index). Per subagent prompt:
@@ -49,7 +49,11 @@ to-issues slices + promotes (sets type:cluster + Wave at ≥2 slices)
49
49
 
50
50
  **Stops at stubs.** No slice plan, no PRD, no sub-issue link, no promotion. Whether/when a stub becomes a real wave = separate step (`to-prd → to-issues`), <maintainer>'s call.
51
51
 
52
- **S4 exit — no stub at all.** A candidate that trips the `scale-check` altitude criteria (Splitter S4 below) skips the stub step entirely — it is reported as an escalation, pointing at `scale-check` (→ a program grill → `to-prd` program mode → `to-waves`), never at `to-prd`/`to-issues` directly. Still <maintainer>'s call, still no board write here.
52
+ **S4 exit — no stub at all.** A candidate that trips the `scale-check` altitude
53
+ criteria (Splitter S4 below) skips the stub step entirely — it is reported as
54
+ an escalation, pointing at `scale-check` (→ a program grill → `to-prd` Program
55
+ mode → `to-issues`), never straight into ordinary Feature decomposition. Still
56
+ <maintainer>'s call, still no board write here.
53
57
 
54
58
  Model: **strongest available reasoning model for board-wide judgment calls** (survey/plan/brainstorm — cross-board judgment, <maintainer>'s table).
55
59
 
@@ -77,7 +81,7 @@ Model: **strongest available reasoning model for board-wide judgment calls** (su
77
81
  - **S1 Too big** — > ~7 slices / not shippable in a manageable sequence → split into two waves.
78
82
  - **S2 Foreign parent** — issue already hangs under another wave (GitHub 1-parent; `to-issues` link check is the final word).
79
83
  - **S3 "Same type alone" ≠ wave** — type is a booster, never a gate. Otherwise "all refactors" becomes a junk drawer.
80
- - **S4 Programm-Verdacht** — the candidate trips the `scale-check` altitude criteria (`.claude/skills/scale-check/SKILL.md` § "Altitude criteria (the single source of truth)" — referenced here, **never** re-forked; e.g. staged delivery + several subsystems that each stand on their own) → **escalate to the Program route instead of creating a candidate stub**: report it in the candidate list (§3/§5) pointing at `scale-check` (grill once into a Program-PRD with a Wellenplan, then `to-waves` unfolds it), not `to-prd`/`to-issues`. The bottom-up Wave-stamping rule above is unaffected — an escalated candidate is still just a proposal, not yet a committed wave, exactly like any other candidate.
84
+ - **S4 Programm-Verdacht** — the candidate trips the `scale-check` altitude criteria (`.claude/skills/scale-check/SKILL.md` § "Altitude criteria (the single source of truth)" — referenced here, **never** re-forked; e.g. staged delivery + several subsystems that each stand on their own) → **escalate to the Program route instead of creating a candidate stub**: report it in the candidate list (§3/§5) pointing at `scale-check` (grill once into a Program-PRD with a Wellenplan, then `to-issues` selects the Program graph path from that explicit identity), not directly to a hidden engine. The bottom-up Wave-stamping rule above is unaffected — an escalated candidate is still just a proposal, not yet a committed wave, exactly like any other candidate.
81
85
 
82
86
  **Rule:** issue → candidate X if **Gate(X) satisfied AND ≥1 booster fires** and no splitter applies. Otherwise: own candidate or leftover bucket "unclustered / standalone issue".
83
87
 
@@ -73,6 +73,12 @@ When `projectEnrichment` is active, read `docs/agents/code-review.md` first. App
73
73
 
74
74
  ## Execution
75
75
 
76
+ Before dispatch, resolve a provider-neutral Routing intent through
77
+ `src/lib/routeDispatcher.mjs` and require a Dispatch receipt from the shared
78
+ spawn guard. A detected transport is not authorization; AFK dispatch stops
79
+ unless requested/applied route, model/effort enforcement, environment
80
+ precedence, and catalog/access/policy revisions are proved.
81
+
76
82
  - Run both axes as **parallel sub-agents** — separate context each, so neither poisons the other's read. Give the Standards sub-agent the Standards sources **plus** the full Fowler baseline in its prompt; it has no other way to see the baseline.
77
83
  - Report **side by side**, under `## Standards` and `## Spec` headers, verbatim or lightly cleaned — never merge or re-rank the two into one combined verdict.
78
84
  - Cap each sub-agent's report under 400 words — findings, not padding.
@@ -18,7 +18,15 @@ Show this to the user, then immediately proceed to Step 2. The user reads and th
18
18
 
19
19
  ### 2. Spawn sub-agents
20
20
 
21
+ Before dispatch, resolve a provider-neutral Routing intent through
22
+ `src/lib/routeDispatcher.mjs` and require a Dispatch receipt from the shared
23
+ spawn guard. A detected transport is not authorization; AFK dispatch stops
24
+ unless requested/applied route, model/effort enforcement, environment
25
+ precedence, and catalog/access/policy revisions are proved.
26
+
27
+ <!-- mirror-xform:start codex-parallel-subagent-dispatch -->
21
28
  Spawn 3+ sub-agents in parallel using the Agent tool. Each must produce a **radically different** interface for the deepened module.
29
+ <!-- mirror-xform:end -->
22
30
 
23
31
  Prompt each sub-agent with a separate technical brief (file paths, coupling details, dependency category from [DEEPENING.md](DEEPENING.md), what sits behind the seam). The brief is independent of the user-facing problem-space explanation in Step 1. Give each agent a different design constraint:
24
32
 
@@ -18,6 +18,12 @@ Show this to the user, then immediately proceed to Step 2. The user reads and th
18
18
 
19
19
  ### 2. Spawn sub-agents
20
20
 
21
+ Before dispatch, resolve a provider-neutral Routing intent through
22
+ `src/lib/routeDispatcher.mjs` and require a Dispatch receipt from the shared
23
+ spawn guard. A detected transport is not authorization; AFK dispatch stops
24
+ unless requested/applied route, model/effort enforcement, environment
25
+ precedence, and catalog/access/policy revisions are proved.
26
+
21
27
  <!-- mirror-xform:start codex-parallel-subagent-dispatch -->
22
28
  Spawn 3+ sub-agents in parallel using the Agent tool. Each must produce a **radically different** interface for the deepened module.
23
29
  <!-- mirror-xform:end -->
@@ -35,6 +35,12 @@ This skill is _informed_ by the project's domain model. The domain language give
35
35
 
36
36
  Read the project's domain glossary and any ADRs in the area you're touching first.
37
37
 
38
+ Before dispatch, resolve a provider-neutral Routing intent through
39
+ `src/lib/routeDispatcher.mjs` and require a Dispatch receipt from the shared
40
+ spawn guard. A detected transport is not authorization; AFK dispatch stops
41
+ unless requested/applied route, model/effort enforcement, environment
42
+ precedence, and catalog/access/policy revisions are proved.
43
+
38
44
  <!-- mirror-xform:start codex-explorer-dispatch -->
39
45
  Then use the Agent tool with `subagent_type=Explore` to walk the codebase. Don't follow rigid heuristics — explore organically and note where you experience friction:
40
46
  <!-- mirror-xform:end -->
@@ -1,13 +1,14 @@
1
1
  ---
2
2
  name: kit-release
3
- description: "Prepare a verified release PR for agent-workflow-kit, delegate landing to wrapup, then monitor the trusted post-merge publishing flow through npm/GitHub parity."
3
+ description: "Prepare and integrate a verified agent-workflow-kit release, then record separately confirmed publication intent with an annotated version tag and monitor npm/GitHub parity."
4
4
  ---
5
5
 
6
6
  # Kit Release
7
7
 
8
8
  Prepare a release deterministically. This skill owns the shipped-delta decision,
9
- metadata preparation, and verification. It does not implement commit, push, PR,
10
- merge, registry publishing, tags, or release creation.
9
+ metadata preparation, verification, and the separate post-merge publication
10
+ gate. It delegates commit, branch push, PR, merge, and cleanup to wrapup. It
11
+ never publishes to a registry or creates a GitHub release directly.
11
12
 
12
13
  ## Workflow
13
14
 
@@ -42,7 +43,20 @@ merge, registry publishing, tags, or release creation.
42
43
  `scripts/wrapup-land.py` exclusively own commit, push, PR creation, merge,
43
44
  and cleanup. Do not reproduce those operations here.
44
45
 
45
- 5. After merge, monitor the `release.yml` workflow and inspect its externally
46
+ 5. After merge, report the exact integrated version and commit as
47
+ `awaiting-tag`. Merging integrates the prepared release; it cannot start
48
+ publication. Ask the user for a second, explicit confirmation to publish
49
+ that exact `v<version>`. The earlier Semver confirmation authorized metadata
50
+ preparation, not publication.
51
+
52
+ 6. After that confirmation, verify that the package version on current
53
+ `origin/main` is exactly `<version>`. Create a matching annotated
54
+ `v<version>` tag on that commit and push only that tag. A lightweight tag,
55
+ mismatching version, or commit outside canonical `main` is invalid release
56
+ intent. Never infer a tag target, move an existing tag, or tag an unmerged
57
+ commit.
58
+
59
+ 7. Monitor the tag-triggered `release.yml` workflow and inspect its externally
46
60
  reconstructable state:
47
61
 
48
62
  ```sh
@@ -56,6 +70,17 @@ merge, registry publishing, tags, or release creation.
56
70
  release asset have identical version, manifest hash, and tarball integrity.
57
71
  The release is complete only at `released`.
58
72
 
73
+ Manual dispatch is recovery only. It requires the explicit existing
74
+ annotated tag and runs the same idempotent reconciler:
75
+
76
+ ```sh
77
+ gh workflow run release.yml -f tag=v<version>
78
+ ```
79
+
80
+ Use it only after reconstructing the release state for that tag. Never use
81
+ dispatch as the normal publication route or substitute a new version for a
82
+ partial release.
83
+
59
84
  The registry identity is **`@ikon85/agent-workflow-kit`**. The unscoped
60
85
  `agent-workflow-kit` package is owned by another publisher and must never be
61
86
  queried, published, or treated as this repository's release.
@@ -57,6 +57,19 @@ release contain the same artifact.
57
57
  (`missing-file`, `missing-section`, `empty-section`, or
58
58
  `divergent-section`); it never echoes consumer content.
59
59
 
60
+ Independently, run the routing-profile read-only preflight before applying
61
+ the package candidate. A valid unchanged user-local profile reports
62
+ `still valid` and causes zero prompts. Ask after successful Kit activation
63
+ only when the profile is missing, invalid, materially stale, references a
64
+ removed route, or a newly detected surface creates a meaningful choice.
65
+ Re-inspect after package activation, present a typed delta containing only
66
+ that changed choice, and preserve unaffected personal fields. Fingerprint
67
+ and exclusively lock the destination before writing; a concurrent personal
68
+ edit blocks reconciliation and remains untouched. Unattended update records
69
+ `needs-reconcile`; it never invents a personal answer. Declining the
70
+ routing reconcile leaves the successful Kit update applied because package
71
+ installation and personal policy are separate transactions.
72
+
60
73
  3. Read the terminal report. `aktuell` proves a second run found no upstream
61
74
  delta or pending readiness migration. A conflict report names and counts
62
75
  every category and leaves every consumer file untouched. Follow its
@@ -100,7 +100,7 @@ node scripts/readiness.mjs check --skill orchestrate-wave --json
100
100
  Pass only host-supplied inventory through `capabilityAdapter.claude` or `.codex`,
101
101
  then call the selector. It returns exactly one target; missing or `unknown` evidence
102
102
  degrades A → B → C. A model claim is not evidence; do not emulate a missing primitive.
103
-
103
+ Before any spawn, resolve the provider-neutral Routing intent through the shared resolver and spawn guard, then use the active Claude or Codex adapter. Codex contributes only its dated host attestation through `routingAdapters/codex.mjs`; it does not create a second catalog, Access graph, or Routing policy. A detected transport is not authorization. The Dispatch receipt must show requested and applied route, model/effort enforcement, environment precedence on mismatch, and catalog/access/policy revisions. AFK blocks unverified, unauthorized, overridden, unenforced, or silently degraded routes; a Codex host without model and effort selectors blocks differentiated AFK before spawn, and unreachable routes follow policy handoff/inherit/block exactly.
104
104
  - **Path A:** requires the literal `Workflow` tool, callable and permitted, plus
105
105
  individually proven named phases, run identity, runtime output validation,
106
106
  journal, and resume. Then read [its recipe](references/dispatch-workflow.md).
@@ -5,13 +5,14 @@ requires proven native spawn, wait, and aggregate primitives plus effective
5
5
  concurrency and thread capacity ≥2. Route from proven capabilities only, never
6
6
  from a surface name, and do not emulate a missing primitive.
7
7
 
8
- This recipe is **dormant on the current Codex host.** A verify spike against
9
- codex-cli 0.144.6 (2026-07-21) proved native start plus bounded wait, and an
10
- effective concurrency of 4, but the host exposes tool entries carrying only a
11
- name and a description: no tool schema, no callable or permitted flags, no
12
- thread capacity. The adapter therefore emits `unknown` for those fields and the
13
- selector fails closed to Path C. Only a future host that supplies the complete
14
- normalized inventory selects this path.
8
+ This recipe is **dormant unless the current host's complete orchestration
9
+ inventory proves Path B.** The dated Codex routing attestation is a separate
10
+ gate: the observed explicit-spawn schema exposes only `task_name`, `message`,
11
+ and `fork_turns`, with no model or effort selector. Therefore
12
+ `routingAdapters/codex.mjs` blocks differentiated AFK before spawn even when
13
+ native start/wait/aggregate evidence is otherwise sufficient for Path B. A
14
+ future host may enable the route only by attesting both orchestration primitives
15
+ and applied model/effort controls; neither is inferred from the surface name.
15
16
 
16
17
  ## Main-thread preparation
17
18
 
@@ -55,10 +56,21 @@ Reconciliation is never delegated to a subagent.
55
56
 
56
57
  For the current reconciled batch, spawn **one builder per slice**, again as one
57
58
  concurrent batch joined by an explicit wait. Give each builder the verbatim
58
- builder contract, its reconciled allowlist, and its required commands. The host
59
- exposes no per-agent role, model, or reasoning selector, so routing falls back
60
- to the parent session configuration — record the tier you intended in the
61
- prompt itself rather than assuming the host honoured it.
59
+ builder contract, its reconciled allowlist, and its required commands. Resolve
60
+ the provider-neutral Routing intent immediately before each spawn. Pass the
61
+ decision through `routeDispatcher.mjs` and the active surface adapter. Claude
62
+ uses its native or explicitly policy-approved transport attestation; Codex uses
63
+ only its dated `routingAdapters/codex.mjs` host attestation. Both must prove
64
+ their requested and applied model and effort controls before invocation.
65
+ Detection alone never authorizes a transport.
66
+
67
+ The spawn guard compares the requested route with the adapter's applied route
68
+ and environment precedence. It emits the shared Dispatch receipt with
69
+ catalog/access/policy revisions. An unverified control, unauthorized transport,
70
+ override mismatch, or unenforced effort blocks AFK before spawn. A genuinely
71
+ unreachable route follows the policy's handoff, inherit, or block result; never
72
+ silently inherit. A host without a proved per-agent selector remains on its
73
+ existing parent-session fallback only when explicit non-AFK policy permits it.
62
74
 
63
75
  Each builder returns exactly one builder report. Validate it against the builder
64
76
  schema and then run `semanticVerify` on it in the main thread. A subagent's own
@@ -48,6 +48,14 @@ current reconciled batch, make one `agent()` call per slice with explicit
48
48
  the reconciled allowlist and required commands in each verbatim builder prompt;
49
49
  the main thread still performs `semanticVerify` on every returned report.
50
50
 
51
+ Before each `agent()` call, resolve its provider-neutral Routing intent and pass
52
+ the decision through the shared spawn guard and active surface adapter. The
53
+ Claude adapter must attest Workflow model/effort precedence in the current
54
+ environment; a future Codex host may use this path only when its dated
55
+ `routingAdapters/codex.mjs` attestation proves the same controls. Create the
56
+ Dispatch receipt before invocation; any requested/applied mismatch, unverified
57
+ control, or unauthorized transport blocks AFK rather than silently degrading.
58
+
51
59
  ## Resume exactly once
52
60
 
53
61
  Resume an interrupted Recon or Build run with its recorded `resumeFromRunId`
@@ -3,6 +3,12 @@ name: research
3
3
  description: Investigate a question against high-trust primary sources and capture the findings as a Markdown file in the repo. Use when the user wants a topic researched, docs or API facts gathered, or reading legwork delegated to a background agent.
4
4
  ---
5
5
 
6
+ Before dispatch, resolve a provider-neutral Routing intent through
7
+ `src/lib/routeDispatcher.mjs` and require a Dispatch receipt from the shared
8
+ spawn guard. A detected transport is not authorization; AFK dispatch stops
9
+ unless requested/applied route, model/effort enforcement, environment
10
+ precedence, and catalog/access/policy revisions are proved.
11
+
6
12
  Spin up a **background agent** to do the research, so you keep working while it reads.
7
13
 
8
14
  Its job:
@@ -87,8 +87,9 @@ skills — this skill only picks the entry point.
87
87
 
88
88
  ### Program (≥2 criteria)
89
89
 
90
- A multi-wave undertaking: grill it once into a Program-PRD with a wave plan, then
91
- unfold that plan onto the board after a chat preview gate.
90
+ A multi-wave undertaking: grill it once into a Program-PRD with a wave plan,
91
+ then hand that explicit Program identity to the public Planning facade. The
92
+ facade unfolds the plan onto the board after a chat preview gate.
92
93
 
93
94
  ```
94
95
  New program: <one-sentence outcome from Q2>.
@@ -97,10 +98,11 @@ Tripped altitude criteria: <e.g. C1 staged delivery, C2 multiple subsystems, C4
97
98
  structure-bearing decisions (escalate a single bounded choice to `decision-gate`).
98
99
  2. `to-prd` — it auto-detects the program mode from the Wellenplan chapter and writes
99
100
  a Program-PRD (native anchor over the waves).
100
- 3. `to-waves` — after one complete chat preview, materialize the whole Program with
101
- **all waves execute-ready by default**: complete slice contracts, buckets,
102
- dependencies and handoffs. Decision Gates, Verify Spikes and Design-Grill waves
103
- are explicit planned exceptions; generic late-binding cleanup is not.
101
+ 3. `to-issues` — its explicit Program identity selects the internal graph path.
102
+ After one complete chat preview, materialize the whole Program with **all
103
+ waves execute-ready by default**: complete slice contracts, buckets,
104
+ dependencies and handoffs. Decision Gates, Verify Spikes and Design-Grill
105
+ waves are explicit planned exceptions; generic late-binding cleanup is not.
104
106
  ```
105
107
 
106
108
  ### Feature (0–1 criteria, or any doubt)
@@ -134,7 +136,7 @@ Bug: <what's broken — expected vs. actual>.
134
136
  ```
135
137
  scale-check: verdict=<Program | Feature | Direct-Slice | Bug>
136
138
  criteria tripped=<C1,C2,… | none | n/a (bug/direct)>
137
- route=<program grill → to-prd → to-waves (all waves execute-ready by default) | grill-with-docs → to-prd → to-issues | implement | diagnose>
139
+ route=<program grill → to-prd → to-issues (Program mode; all waves execute-ready by default) | grill-with-docs → to-prd → to-issues (Feature mode) | implement | diagnose>
138
140
  start-prompt: <the paste-ready block above, filled in>
139
141
  ```
140
142
 
@@ -28,6 +28,7 @@ This is a prompt-driven skill, not a deterministic script. Explore, present what
28
28
  | `docs/agents/census.md` | optional-census choice, paths, state, and safe disable contract seeded from [census.md](./census.md) (Section A3) |
29
29
  | `docs/agents/workflow-capabilities.json` + capability assets | consumer-owned Worktree Lifecycle, Memory Lifecycle, Workflow Advisories, and Safety Guardrails choices (Sections A4–A7) |
30
30
  | `.claude/settings.json` | additive activation of the advisory kit-origin Edit/Write hint (Section A8) |
31
+ | user-local routing profile | familiar agent surfaces + switching autonomy (Section A9; never package- or repository-owned) |
31
32
 
32
33
  ## Idempotency contract — read before writing anything
33
34
 
@@ -60,6 +61,9 @@ Read the current state; don't assume. For every target file, read its first line
60
61
  - `docs/agents/census.md`, `.census/profile.json`, `.census/active.json` — an existing census choice or consumer-owned census to adopt.
61
62
  - `docs/agents/workflow-capabilities.json`, `.claude/settings.json`, `git config --get core.hooksPath` — existing capability choices/profile plus Worktree Lifecycle, Workflow Advisories, Safety Guardrails, and kit-origin hint wiring to adopt.
62
63
  - `.memory/active/`, `.memory/archive/`, and `.memory/receipts/` — consumer-owned Memory Lifecycle policies or recovery evidence to adopt without normalization.
64
+ - The Kit routing-profile preflight — adopt a valid user-local choice without
65
+ printing or copying it into the repository. Never infer personal routing
66
+ policy from instruction files, credentials, or package-owned metadata.
63
67
  - `gh auth status` (if GitHub) — is `gh` authenticated, and with which scopes?
64
68
 
65
69
  ### 2. Section A — Issue tracker
@@ -280,6 +284,41 @@ This is an additive, idempotent settings edit, not a settings rewrite:
280
284
  `PreToolUse`, are consumer-owned conflicts: leave the file untouched and
281
285
  report the skipped activation. Never replace or normalize them.
282
286
 
287
+ ### 2h. Section A9 — Agent surfaces and switching autonomy
288
+
289
+ > Routing setup asks which familiar agent apps you use and whether the Kit may
290
+ > switch between them. Surface adapters establish providers, transports,
291
+ > selectors, and enforcement capabilities; the default interview never asks
292
+ > the user to describe those technical facts.
293
+
294
+ Read the versioned agent-surface registry and detection result. Show its
295
+ multi-select labels with detected entries preselected; never embed a separate
296
+ list in prompt prose. Then ask only one plain-language autonomy question:
297
+
298
+ - **Switch automatically** — record `automatic`.
299
+ - **Ask before switching** — record `ask`.
300
+ - **Stay in the current app** — record `current-surface-only`.
301
+
302
+ When exactly one surface is selected, skip the autonomy question and use
303
+ `current-surface-only`. Show an activation summary with explicit **Back**,
304
+ **Advanced**, **Approve**, and **Safe current surface** actions. Back revisits
305
+ the simple choices. Advanced is the only flow that may collect model
306
+ preferences or optimization overrides, but those values remain a draft and
307
+ return to the activation summary; Advanced alone never writes. Only a later
308
+ Approve or Safe current surface action activates the draft. Safe current
309
+ surface activates the selection with `current-surface-only`.
310
+
311
+ Store the answer through `src/lib/routingProfile.mjs` in its user-local state
312
+ location, outside the consumer repository and package manifest. Never print
313
+ credentials or derive personal choices from detected transports. A valid
314
+ existing profile is terminal and reports `still valid`; do not prompt again.
315
+ Missing or invalid profiles receive one migration interview. Reconcile a
316
+ materially stale profile, a removed route, or a newly detected meaningful
317
+ surface with a typed delta that names only the changed choice and preserves
318
+ unaffected surfaces, autonomy, and advanced values. Re-read the profile before
319
+ activation and use its fingerprint plus the exclusive profile lock; a
320
+ concurrent user-local change blocks activation and remains byte-preserved.
321
+
283
322
  ### 3. Section B — Triage labels
284
323
 
285
324
  > When `triage` processes an incoming issue it applies labels (or your tracker's equivalent). It needs strings you've actually configured, or it creates duplicates.
@@ -309,7 +348,14 @@ Seed `docs/agents/domain.md` from [domain.md](./domain.md).
309
348
 
310
349
  **Fallback (the single catch-all — no board / >1 / ambiguous / scope error / read failure):** do **not** auto-create a board (`gh project create` alone cannot provision the Status options + workflow fields a board needs). Write `board-sync.md` with `state=stub`, `mode=github-projects-v2`, and inline **instructions**: which fields the workflow profile needs (a Status single-select with your stage options; optionally a Wave number, a Cluster text, a Spec-Path / Plan-Path text), how to create the board in the GitHub UI / `gh`, and "then run `/setup-workflow` again — it will discover and fill the IDs." Retryable.
311
350
 
312
- **Optional — Phase field + saved Views (Program route only):** never auto-discovered or auto-created, unlike the fields above — a Phase field's option set is plan-specific. If this project plans to use the Program route (`scale-check` → `to-waves` → `validate-graph`), point the user at the seeded [board-sync.md](./board-sync.md)'s "Optional: the Program route" section for the `gh project field-create` command, the optional `fields.phase` / `labels.programType` profile keys, and the two saved Views to create by hand.
351
+ **Optional — Phase field + saved Views (Program route only):** never
352
+ auto-discovered or auto-created, unlike the fields above — a Phase field's
353
+ option set is plan-specific. If this project plans to use the Program route
354
+ (`scale-check` → `to-issues` with explicit Program identity → internal graph
355
+ validation), point the user at the seeded [board-sync.md](./board-sync.md)'s
356
+ "Optional: the Program route" section for the `gh project field-create`
357
+ command, the optional `fields.phase` / `labels.programType` profile keys, and
358
+ the two saved Views to create by hand.
313
359
 
314
360
  ### 6. Section E — Spec-layer seeds (non-interactive)
315
361