@aperant/framework 0.16.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/CHANGELOG.md +185 -1
  2. package/dist/cli/commands/ci-watch.mjs +49 -2
  3. package/dist/cli/commands/ci-watch.mjs.map +1 -1
  4. package/dist/cli/commands/commit.mjs +3 -3
  5. package/dist/cli/commands/commit.mjs.map +1 -1
  6. package/dist/cli/commands/event.mjs +16 -16
  7. package/dist/cli/commands/event.mjs.map +1 -1
  8. package/dist/cli/commands/merge-integrate.mjs +3 -3
  9. package/dist/cli/commands/merge-integrate.mjs.map +1 -1
  10. package/dist/cli/commands/produce.d.mts +9 -0
  11. package/dist/cli/commands/produce.d.mts.map +1 -0
  12. package/dist/cli/commands/produce.mjs +1345 -0
  13. package/dist/cli/commands/produce.mjs.map +1 -0
  14. package/dist/cli/commands/spar-resolve-partner.d.mts +9 -0
  15. package/dist/cli/commands/spar-resolve-partner.d.mts.map +1 -0
  16. package/dist/cli/commands/spar-resolve-partner.mjs +82 -0
  17. package/dist/cli/commands/spar-resolve-partner.mjs.map +1 -0
  18. package/dist/cli/commands/task.d.mts +16 -1
  19. package/dist/cli/commands/task.d.mts.map +1 -1
  20. package/dist/cli/commands/task.mjs +434 -266
  21. package/dist/cli/commands/task.mjs.map +1 -1
  22. package/dist/cli/config/gitignore-drift.d.mts.map +1 -1
  23. package/dist/cli/config/gitignore-drift.mjs +1 -0
  24. package/dist/cli/config/gitignore-drift.mjs.map +1 -1
  25. package/dist/cli/config/post-merge-sweep.d.mts.map +1 -1
  26. package/dist/cli/config/post-merge-sweep.mjs +1 -0
  27. package/dist/cli/config/post-merge-sweep.mjs.map +1 -1
  28. package/dist/cli/coordination/auto-emit-artifact-ready.mjs +5 -5
  29. package/dist/cli/coordination/auto-emit-artifact-ready.mjs.map +1 -1
  30. package/dist/cli/coordination/event-schema.d.mts +5 -3
  31. package/dist/cli/coordination/event-schema.d.mts.map +1 -1
  32. package/dist/cli/coordination/event-schema.mjs +245 -21
  33. package/dist/cli/coordination/event-schema.mjs.map +1 -1
  34. package/dist/cli/coordination/store.d.mts +2 -2
  35. package/dist/cli/coordination/store.mjs +4 -4
  36. package/dist/cli/coordination/store.mjs.map +1 -1
  37. package/dist/cli/dispatch.d.mts.map +1 -1
  38. package/dist/cli/dispatch.mjs +4 -0
  39. package/dist/cli/dispatch.mjs.map +1 -1
  40. package/dist/cli/help.d.mts.map +1 -1
  41. package/dist/cli/help.mjs +31 -0
  42. package/dist/cli/help.mjs.map +1 -1
  43. package/dist/cli/host/codex-config.d.mts +78 -0
  44. package/dist/cli/host/codex-config.d.mts.map +1 -0
  45. package/dist/cli/host/codex-config.mjs +169 -0
  46. package/dist/cli/host/codex-config.mjs.map +1 -0
  47. package/dist/cli/install/legacy-paths.d.mts.map +1 -1
  48. package/dist/cli/install/legacy-paths.mjs +2 -0
  49. package/dist/cli/install/legacy-paths.mjs.map +1 -1
  50. package/dist/cli/produce/blind-probe.d.mts +85 -0
  51. package/dist/cli/produce/blind-probe.d.mts.map +1 -0
  52. package/dist/cli/produce/blind-probe.mjs +217 -0
  53. package/dist/cli/produce/blind-probe.mjs.map +1 -0
  54. package/dist/cli/produce/claim.d.mts +188 -0
  55. package/dist/cli/produce/claim.d.mts.map +1 -0
  56. package/dist/cli/produce/claim.mjs +518 -0
  57. package/dist/cli/produce/claim.mjs.map +1 -0
  58. package/dist/cli/produce/done-gate.d.mts +87 -0
  59. package/dist/cli/produce/done-gate.d.mts.map +1 -0
  60. package/dist/cli/produce/done-gate.mjs +200 -0
  61. package/dist/cli/produce/done-gate.mjs.map +1 -0
  62. package/dist/cli/produce/events.d.mts +77 -0
  63. package/dist/cli/produce/events.d.mts.map +1 -0
  64. package/dist/cli/produce/events.mjs +126 -0
  65. package/dist/cli/produce/events.mjs.map +1 -0
  66. package/dist/cli/produce/evidence-oracle.d.mts +63 -0
  67. package/dist/cli/produce/evidence-oracle.d.mts.map +1 -0
  68. package/dist/cli/produce/evidence-oracle.mjs +122 -0
  69. package/dist/cli/produce/evidence-oracle.mjs.map +1 -0
  70. package/dist/cli/produce/ledger.d.mts +140 -0
  71. package/dist/cli/produce/ledger.d.mts.map +1 -0
  72. package/dist/cli/produce/ledger.mjs +272 -0
  73. package/dist/cli/produce/ledger.mjs.map +1 -0
  74. package/dist/cli/produce/probe-family.d.mts +53 -0
  75. package/dist/cli/produce/probe-family.d.mts.map +1 -0
  76. package/dist/cli/produce/probe-family.mjs +160 -0
  77. package/dist/cli/produce/probe-family.mjs.map +1 -0
  78. package/dist/cli/produce/projection.d.mts +55 -0
  79. package/dist/cli/produce/projection.d.mts.map +1 -0
  80. package/dist/cli/produce/projection.mjs +97 -0
  81. package/dist/cli/produce/projection.mjs.map +1 -0
  82. package/dist/cli/produce/run-id.d.mts +42 -0
  83. package/dist/cli/produce/run-id.d.mts.map +1 -0
  84. package/dist/cli/produce/run-id.mjs +79 -0
  85. package/dist/cli/produce/run-id.mjs.map +1 -0
  86. package/dist/cli/produce/saga.d.mts +180 -0
  87. package/dist/cli/produce/saga.d.mts.map +1 -0
  88. package/dist/cli/produce/saga.mjs +290 -0
  89. package/dist/cli/produce/saga.mjs.map +1 -0
  90. package/dist/cli/produce/scheduler.d.mts +165 -0
  91. package/dist/cli/produce/scheduler.d.mts.map +1 -0
  92. package/dist/cli/produce/scheduler.mjs +399 -0
  93. package/dist/cli/produce/scheduler.mjs.map +1 -0
  94. package/dist/cli/produce/setpoint.d.mts +52 -0
  95. package/dist/cli/produce/setpoint.d.mts.map +1 -0
  96. package/dist/cli/produce/setpoint.mjs +113 -0
  97. package/dist/cli/produce/setpoint.mjs.map +1 -0
  98. package/dist/cli/produce/verification-ttl.d.mts +75 -0
  99. package/dist/cli/produce/verification-ttl.d.mts.map +1 -0
  100. package/dist/cli/produce/verification-ttl.mjs +169 -0
  101. package/dist/cli/produce/verification-ttl.mjs.map +1 -0
  102. package/dist/cli/roadmap/{conductor-view.d.mts → showrunner-view.d.mts} +3 -3
  103. package/dist/cli/roadmap/showrunner-view.d.mts.map +1 -0
  104. package/dist/cli/roadmap/{conductor-view.mjs → showrunner-view.mjs} +7 -7
  105. package/dist/cli/roadmap/showrunner-view.mjs.map +1 -0
  106. package/dist/cli/wfrun/run.d.mts.map +1 -1
  107. package/dist/cli/wfrun/run.mjs +1 -0
  108. package/dist/cli/wfrun/run.mjs.map +1 -1
  109. package/dist/plugin/.claude-plugin/plugin.json +2 -1
  110. package/dist/plugin/skills/apt/SKILL.md +112 -38
  111. package/dist/plugin/skills/apt-debug/SKILL.md +14 -24
  112. package/dist/plugin/skills/apt-fan-out/SKILL.md +4 -4
  113. package/dist/plugin/skills/apt-handoff/SKILL.md +1 -1
  114. package/dist/plugin/skills/apt-plan/SKILL.md +5 -5
  115. package/dist/plugin/skills/apt-plan/adapters/{conductor.md → showrunner.md} +16 -16
  116. package/dist/plugin/skills/apt-produce/SKILL.md +606 -0
  117. package/dist/plugin/skills/apt-quick/SKILL.md +14 -22
  118. package/dist/plugin/skills/apt-run/SKILL.md +126 -3
  119. package/dist/plugin/skills/apt-ship/SKILL.md +2 -0
  120. package/dist/plugin/skills/apt-spar/SKILL.md +19 -9
  121. package/dist/plugin/skills/apt-watch-ci/SKILL.md +4 -4
  122. package/package.json +4 -4
  123. package/prompts/{conductor-framework-context.md → showrunner-framework-context.md} +1 -1
  124. package/prompts/{conductor-status-check.md → showrunner-status-check.md} +1 -1
  125. package/prompts/{conductor-sub-agent.md → showrunner-sub-agent.md} +6 -6
  126. package/prompts/{conductor-system.md → showrunner-system.md} +8 -8
  127. package/skills/apt/SKILL.md +112 -38
  128. package/skills/apt-debug/SKILL.md +14 -24
  129. package/skills/apt-fan-out/SKILL.md +4 -4
  130. package/skills/apt-handoff/SKILL.md +1 -1
  131. package/skills/apt-plan/SKILL.md +5 -5
  132. package/skills/apt-plan/adapters/{conductor.md → showrunner.md} +16 -16
  133. package/skills/apt-produce/SKILL.md +606 -0
  134. package/skills/apt-quick/SKILL.md +14 -22
  135. package/skills/apt-run/SKILL.md +126 -3
  136. package/skills/apt-ship/SKILL.md +2 -0
  137. package/skills/apt-spar/SKILL.md +19 -9
  138. package/skills/apt-watch-ci/SKILL.md +4 -4
  139. package/src/cli/commands/ci-watch.mjs +51 -2
  140. package/src/cli/commands/commit.mjs +3 -3
  141. package/src/cli/commands/event.mjs +16 -16
  142. package/src/cli/commands/merge-integrate.mjs +3 -3
  143. package/src/cli/commands/produce.mjs +1466 -0
  144. package/src/cli/commands/spar-resolve-partner.mjs +85 -0
  145. package/src/cli/commands/task.mjs +482 -285
  146. package/src/cli/config/gitignore-drift.mjs +1 -0
  147. package/src/cli/config/post-merge-sweep.mjs +1 -0
  148. package/src/cli/coordination/auto-emit-artifact-ready.mjs +5 -5
  149. package/src/cli/coordination/event-schema.d.ts +4 -2
  150. package/src/cli/coordination/event-schema.mjs +276 -21
  151. package/src/cli/coordination/store.mjs +4 -4
  152. package/src/cli/dispatch.mjs +4 -0
  153. package/src/cli/help.mjs +31 -0
  154. package/src/cli/host/codex-config.mjs +165 -0
  155. package/src/cli/install/legacy-paths.mjs +2 -0
  156. package/src/cli/produce/blind-probe.mjs +245 -0
  157. package/src/cli/produce/claim.mjs +543 -0
  158. package/src/cli/produce/done-gate.mjs +238 -0
  159. package/src/cli/produce/events.mjs +131 -0
  160. package/src/cli/produce/evidence-oracle.mjs +133 -0
  161. package/src/cli/produce/ledger.mjs +284 -0
  162. package/src/cli/produce/probe-family.mjs +168 -0
  163. package/src/cli/produce/projection.mjs +105 -0
  164. package/src/cli/produce/run-id.mjs +84 -0
  165. package/src/cli/produce/saga.mjs +303 -0
  166. package/src/cli/produce/scheduler.mjs +423 -0
  167. package/src/cli/produce/setpoint.mjs +122 -0
  168. package/src/cli/produce/verification-ttl.mjs +191 -0
  169. package/src/cli/roadmap/showrunner-view.d.ts +10 -0
  170. package/src/cli/roadmap/{conductor-view.mjs → showrunner-view.mjs} +6 -6
  171. package/src/cli/wfrun/run.mjs +1 -0
  172. package/dist/cli/roadmap/conductor-view.d.mts.map +0 -1
  173. package/dist/cli/roadmap/conductor-view.mjs.map +0 -1
  174. package/src/cli/roadmap/conductor-view.d.ts +0 -10
@@ -0,0 +1,169 @@
1
+ /**
2
+ * @internal
3
+ * produce/verification-ttl.mjs — verification-TTL: a rotating sample of OLD done
4
+ * milestones re-verified against HEAD each tick, regressions flagged +
5
+ * compensated (M4, ID-M4-03 / AC13).
6
+ *
7
+ * Verification is not permanent — a milestone marked `done` at HEAD-sha `A` can
8
+ * silently regress as HEAD advances to `B` (a later milestone's change breaks an
9
+ * earlier one). This module gives verification a TTL:
10
+ *
11
+ * - `selectTtlReverifySample` REUSES M2's `selectSweepSample` for the rotating
12
+ * done-milestone candidates (do NOT invent a parallel rotation) and annotates
13
+ * staleness against the supplied HEAD sha — a done milestone is STALE when its
14
+ * last recorded `produce.ttl.reverified`/`produce.probe.run` head_sha ≠ the
15
+ * current HEAD (or it has never been re-verified since done); a milestone last
16
+ * re-verified against the current HEAD is EXCLUDED as FRESH.
17
+ * - `recordTtlReverify` REUSES the M2 cross-family guard (refuses a same-family
18
+ * re-verify), appends `produce.ttl.reverified`, and on `fail` ALSO appends
19
+ * `produce.ttl.regression_detected` AND fires the FORWARD compensator via
20
+ * saga.mjs::compensatePhase({phase:'verify'}) — a revert-branch + reopen +
21
+ * re-plan, NEVER a merged-PR rollback (ID-M4-03).
22
+ *
23
+ * `ttl.reverified` is a DISTINCT op from `probe.run` (a scheduled post-`done` TTL
24
+ * re-check vs a first-time done-gate probe) so the forensic trail stays clean —
25
+ * only the ROTATION and the CROSS-FAMILY GUARD are reused. This module records +
26
+ * computes; the actual re-verify RUN + the revert-ship/reopen/re-plan EXECUTION
27
+ * is the OOS dispatch layer.
28
+ */
29
+ import { selectSweepSample } from './blind-probe.mjs';
30
+ import { appendProduceEvent, readImplementerFamily, readProduceRunEventsMatching, } from './events.mjs';
31
+ import { normalizeFamily } from './probe-family.mjs';
32
+ import { projectRoadmap } from './projection.mjs';
33
+ import { compensatePhase } from './saga.mjs';
34
+ /**
35
+ * Build the per-milestone latest-recorded head_sha map from the
36
+ * `produce.ttl.reverified` + `produce.probe.run` events (both carry `head_sha`).
37
+ * Chronological fold — the last recorded run for a milestone wins.
38
+ *
39
+ * @param {string} projectDir
40
+ * @param {string} runId
41
+ * @returns {Map<string, { head_sha: string, at: string | null }>}
42
+ */
43
+ function latestReverifyByMilestone(projectDir, runId) {
44
+ const events = readProduceRunEventsMatching(projectDir, runId, (op) => op === 'produce.ttl.reverified' || op === 'produce.probe.run');
45
+ const map = new Map();
46
+ for (const e of events) {
47
+ const d = e.data || {};
48
+ const id = typeof d.milestone_id === 'string' ? d.milestone_id : null;
49
+ const sha = typeof d.head_sha === 'string' ? d.head_sha : null;
50
+ if (!id || !sha)
51
+ continue;
52
+ map.set(id, { head_sha: sha, at: typeof e.t === 'string' ? e.t : null });
53
+ }
54
+ return map;
55
+ }
56
+ /**
57
+ * Select a DETERMINISTIC rotating sample of already-`done` milestones STALE
58
+ * against HEAD (ID-M4-03 / AC7). REUSES `selectSweepSample` for the rotation
59
+ * order (fewest/oldest last-probe-run first), then annotates each candidate with
60
+ * staleness against `headSha` and FILTERS OUT the FRESH ones (last re-verified
61
+ * against the current HEAD). Returns the first `sample` STALE candidates. An
62
+ * absent HEAD sha fails closed (nothing selected).
63
+ *
64
+ * @param {string} projectDir
65
+ * @param {string} runId
66
+ * @param {{ headSha: string, sample?: number }} args
67
+ * @returns {{ run_id: string, head_sha: string | null, sample_size: number,
68
+ * selected: Array<{ milestone_id: string, title: string, last_reverify_head_sha: string | null, last_reverify_at: string | null, stale: boolean }> }}
69
+ */
70
+ export function selectTtlReverifySample(projectDir, runId, { headSha, sample = 1 } = {}) {
71
+ if (!headSha)
72
+ return { run_id: runId, head_sha: null, sample_size: 0, selected: [] };
73
+ // The FULL rotation-ordered pool of done milestones (reuse selectSweepSample;
74
+ // pass the done count so it returns every done milestone in rotation order).
75
+ const doneCount = projectRoadmap(projectDir, runId).milestones.filter((m) => m.status === 'done').length;
76
+ const pool = selectSweepSample(projectDir, runId, { sample: doneCount || 1 }).selected;
77
+ const latest = latestReverifyByMilestone(projectDir, runId);
78
+ const n = Number.isFinite(sample) && sample > 0 ? Math.floor(sample) : 1;
79
+ const stale = [];
80
+ for (const candidate of pool) {
81
+ const last = latest.get(candidate.milestone_id) || null;
82
+ // STALE when never re-verified since done, or last re-verified against a sha
83
+ // ≠ the current HEAD. FRESH (last re-verify head_sha === HEAD) is excluded.
84
+ const isStale = !last || last.head_sha !== headSha;
85
+ if (!isStale)
86
+ continue;
87
+ stale.push({
88
+ milestone_id: candidate.milestone_id,
89
+ title: candidate.title,
90
+ last_reverify_head_sha: last?.head_sha ?? null,
91
+ last_reverify_at: last?.at ?? null,
92
+ stale: true,
93
+ });
94
+ }
95
+ const selected = stale.slice(0, n);
96
+ return { run_id: runId, head_sha: headSha, sample_size: selected.length, selected };
97
+ }
98
+ /**
99
+ * Record a scheduled TTL re-verify RUN against HEAD (ID-M4-03). REUSES the M2
100
+ * cross-family guard (refuses a same-family re-verify, or when no implementer
101
+ * family is recorded). Appends `produce.ttl.reverified {run_id, milestone_id,
102
+ * head_sha, result}`; on `result === 'fail'` ALSO appends
103
+ * `produce.ttl.regression_detected` AND fires the FORWARD compensator via
104
+ * saga.mjs::compensatePhase({phase:'verify', reason:'ttl_regression@<sha>'}) — a
105
+ * revert-branch + reopen + re-plan, NEVER a merged-PR rollback. A `pass`
106
+ * refreshes verification against the new HEAD and logs no regression.
107
+ *
108
+ * @param {string} projectDir
109
+ * @param {{ runId: string, milestoneId: string, result: string, probeFamily: string, headSha: string }} args
110
+ * @returns {{ ok: true, result: string, probe_family: string, head_sha: string, regression: boolean, compensator: object | null }
111
+ * | { ok: false, reason: string }}
112
+ */
113
+ export function recordTtlReverify(projectDir, { runId, milestoneId, result, probeFamily, headSha }) {
114
+ if (result !== 'pass' && result !== 'fail')
115
+ return { ok: false, reason: 'invalid_result' };
116
+ if (!headSha)
117
+ return { ok: false, reason: 'no_head_sha' };
118
+ if (!probeFamily)
119
+ return { ok: false, reason: 'no_probe_family' };
120
+ const implementerFamily = readImplementerFamily(projectDir, runId, milestoneId);
121
+ if (!implementerFamily)
122
+ return { ok: false, reason: 'no_recorded_implementer' };
123
+ // Cross-family enforcement (normalized so claude-code === claude).
124
+ if (normalizeFamily(probeFamily) === normalizeFamily(implementerFamily))
125
+ return { ok: false, reason: 'same_family_reverify' };
126
+ appendProduceEvent(projectDir, 'produce.ttl.reverified', {
127
+ run_id: runId,
128
+ milestone_id: milestoneId,
129
+ head_sha: headSha,
130
+ result,
131
+ });
132
+ let regression = false;
133
+ let compensator = null;
134
+ if (result === 'fail') {
135
+ // The regression flags the milestone AND fires the FORWARD compensator — a
136
+ // revert-branch + reopen + re-plan, never a merged-PR rollback (ID-M4-03).
137
+ appendProduceEvent(projectDir, 'produce.ttl.regression_detected', {
138
+ run_id: runId,
139
+ milestone_id: milestoneId,
140
+ head_sha: headSha,
141
+ });
142
+ const comp = compensatePhase(projectDir, {
143
+ runId,
144
+ milestoneId,
145
+ phase: 'verify',
146
+ reason: `ttl_regression@${headSha}`,
147
+ });
148
+ regression = true;
149
+ compensator = comp.ok ? comp.compensator : null;
150
+ }
151
+ return { ok: true, result, probe_family: probeFamily, head_sha: headSha, regression, compensator };
152
+ }
153
+ /**
154
+ * Read-only fold of the run's `produce.ttl.regression_detected` events (for saga
155
+ * status / canary context). Chronological order.
156
+ *
157
+ * @param {string} projectDir
158
+ * @param {string} runId
159
+ * @returns {Array<{ milestone_id: string | null, head_sha: string | null, t: string | null }>}
160
+ */
161
+ export function listRegressions(projectDir, runId) {
162
+ const events = readProduceRunEventsMatching(projectDir, runId, (op) => op === 'produce.ttl.regression_detected');
163
+ return events.map((e) => ({
164
+ milestone_id: e.data && typeof e.data.milestone_id === 'string' ? e.data.milestone_id : null,
165
+ head_sha: e.data && typeof e.data.head_sha === 'string' ? e.data.head_sha : null,
166
+ t: typeof e.t === 'string' ? e.t : null,
167
+ }));
168
+ }
169
+ //# sourceMappingURL=verification-ttl.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification-ttl.mjs","sourceRoot":"","sources":["../../../src/cli/produce/verification-ttl.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EACN,kBAAkB,EAClB,qBAAqB,EACrB,4BAA4B,GAC5B,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAE5C;;;;;;;;GAQG;AACH,SAAS,yBAAyB,CAAC,UAAU,EAAE,KAAK;IACnD,MAAM,MAAM,GAAG,4BAA4B,CAC1C,UAAU,EACV,KAAK,EACL,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,wBAAwB,IAAI,EAAE,KAAK,mBAAmB,CACrE,CAAA;IACD,MAAM,GAAG,GAAG,IAAI,GAAG,EAAE,CAAA;IACrB,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;QACxB,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,EAAE,CAAA;QACtB,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,YAAY,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAA;QACrE,MAAM,GAAG,GAAG,OAAO,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAA;QAC9D,IAAI,CAAC,EAAE,IAAI,CAAC,GAAG;YAAE,SAAQ;QACzB,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,E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K,iCAAiC,CAChD,CAAA;IACD,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACzB,YAAY,EAAE,CAAC,CAAC,IAAI,IAAI,OAAO,CAAC,CAAC,IAAI,CAAC,YAAY,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI;QAC5F,QAAQ,EAAE,CAAC,CAAC,IAAI,IAAI,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI;QAChF,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;KACvC,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -1,13 +1,13 @@
1
1
  /**
2
- * Build a flat per-scope roadmap snapshot for the Conductor.
2
+ * Build a flat per-scope roadmap snapshot for the Showrunner.
3
3
  *
4
4
  * @param {string} projectRoot
5
5
  * @returns {{ scopes: Array<{ scope: string, roadmap: unknown }> }}
6
6
  */
7
- export function buildConductorRoadmapView(projectRoot: string): {
7
+ export function buildShowrunnerRoadmapView(projectRoot: string): {
8
8
  scopes: Array<{
9
9
  scope: string;
10
10
  roadmap: unknown;
11
11
  }>;
12
12
  };
13
- //# sourceMappingURL=conductor-view.d.mts.map
13
+ //# sourceMappingURL=showrunner-view.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"showrunner-view.d.mts","sourceRoot":"","sources":["../../../src/cli/roadmap/showrunner-view.mjs"],"names":[],"mappings":"AAgBA;;;;;GAKG;AACH,wDAHW,MAAM,GACJ;IAAE,MAAM,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;CAAE,CAUlE"}
@@ -1,24 +1,24 @@
1
1
  /**
2
- * conductor-view.mjs — read-only roadmap surface for the Aperant
3
- * Conductor's `getRoadmap` tool.
2
+ * showrunner-view.mjs — read-only roadmap surface for the Aperant
3
+ * Showrunner's `getRoadmap` tool.
4
4
  *
5
- * Wraps `loadRoadmapForScope` + `listRoadmapScopes` so the Conductor sees
5
+ * Wraps `loadRoadmapForScope` + `listRoadmapScopes` so the Showrunner sees
6
6
  * the same overlay-aware view every framework command sees. Direct reads
7
7
  * of `.aperant/roadmap/*\/phases/*.json` or `milestones.json` would miss
8
8
  * the dual-write overlay (seed_id from legacy blob, etc.) — Codex
9
9
  * roundtable correction #3.
10
10
  *
11
- * Step 5 of Conductor v2 ship order.
11
+ * Step 5 of Showrunner v2 ship order.
12
12
  */
13
13
  import { loadRoadmapForScope } from './io.mjs';
14
14
  import { listRoadmapScopes } from './paths.mjs';
15
15
  /**
16
- * Build a flat per-scope roadmap snapshot for the Conductor.
16
+ * Build a flat per-scope roadmap snapshot for the Showrunner.
17
17
  *
18
18
  * @param {string} projectRoot
19
19
  * @returns {{ scopes: Array<{ scope: string, roadmap: unknown }> }}
20
20
  */
21
- export function buildConductorRoadmapView(projectRoot) {
21
+ export function buildShowrunnerRoadmapView(projectRoot) {
22
22
  const scopes = listRoadmapScopes(projectRoot);
23
23
  const out = [];
24
24
  for (const scope of scopes) {
@@ -28,4 +28,4 @@ export function buildConductorRoadmapView(projectRoot) {
28
28
  }
29
29
  return { scopes: out };
30
30
  }
31
- //# sourceMappingURL=conductor-view.mjs.map
31
+ //# sourceMappingURL=showrunner-view.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"showrunner-view.mjs","sourceRoot":"","sources":["../../../src/cli/roadmap/showrunner-view.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;A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M,mBAAmB"}
1
+ {"version":3,"file":"run.d.mts","sourceRoot":"","sources":["../../../src/cli/wfrun/run.mjs"],"names":[],"mappings":"AAoFA;;;;;;;GAOG;AACH,2CAHW,MAAM,EAAE,GACN;IAAC,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAC,GAAG;IAAC,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAC,CAuBtF;AA8GD;;GAEG;AACH,kDAMC;AA0CD;;;;GAIG;AACH,2EAHW;IAAC,UAAU,EAAE,UAAU,GAAC,MAAM,GAAC,KAAK,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAC,MAAM,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,GAAG,CAAC,MAAM,EAAC,GAAG,CAAC,CAAA;CAAC,GACrI;IAAC,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,GAAG;IAAC,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,GAAG,EAAE,CAAA;CAAC,CA0NnE;;4BA7cM,mBAAmB"}
@@ -58,6 +58,7 @@ const TOOL_COMMAND_ALLOWLIST = new Set([
58
58
  'audit',
59
59
  'toolchain-detect',
60
60
  'host-detect',
61
+ 'spar-resolve-partner',
61
62
  'reconcile',
62
63
  'team',
63
64
  'active',
@@ -1 +1 @@
1
- {"version":3,"file":"run.mjs","sourceRoot":"","sources":["../../../src/cli/wfrun/run.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,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,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QAChF,OAAO,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,CAAA;IAC7B,CAAC;IAED,MAAM,MAAM,GAAG;QACd,MAAM,EAAE,KAAK;QACb,WAAW,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE;QACjC,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACtC,iBAAiB,EAAE,IAAI;QACvB,KAAK,EAAE,OAAO;KACd,CAAA;IACD,eAAe,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,CAAC,CAAA;IAEvD,OAAO;QACN,EAAE,EAAE,IAAI;QACR,MAAM,EAAE;YACP,MAAM,EAAE,IAAI;YACZ,OAAO,EAAE,WAAW;YACpB,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE;YACjC,iBAAiB,EAAE,IAAI;YACvB,KAAK,EAAE,OAAO;YACd,SAAS,EAAE;gBACV,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,eAAe,CAAC;gBAC1C,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,WAAW,CAAC;gBAClC,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC;aACtC;SACD;KACD,CAAA;AACF,CAAC;AAED,gDAAgD;AAChD,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aperant",
3
- "version": "0.16.0",
3
+ "version": "0.19.0",
4
4
  "description": "AI coding framework — composable skills for planning, executing, verifying, and reviewing code with any LLM provider. Works as Claude Code commands, Codex tasks, or programmatically.",
5
5
  "author": {
6
6
  "name": "Mikalsen AI",
@@ -45,6 +45,7 @@
45
45
  "skills/apt-personas",
46
46
  "skills/apt-plan",
47
47
  "skills/apt-pr-review",
48
+ "skills/apt-produce",
48
49
  "skills/apt-prototype",
49
50
  "skills/apt-quick",
50
51
  "skills/apt-release-notes",
@@ -17,7 +17,7 @@ execution_modes:
17
17
  - plan-mode
18
18
  - plan-only
19
19
  - research
20
- allowed-tools: "Bash, Read, Grep, Glob, Write, Edit, Task"
20
+ allowed-tools: "Bash, Read, Grep, Glob, Task"
21
21
  argument-hint: "[free-text task or /apt <skill> …]"
22
22
  gates: []
23
23
  ---
@@ -234,12 +234,19 @@ Resolve the track, then create a fresh task record before invoking the skill.
234
234
  - `plan` → `STANDARD`
235
235
  - everything else with `task_context: create-new` → `STANDARD`
236
236
 
237
- Then run:
237
+ Then run the deterministic allocator (NOT raw `task create`):
238
238
 
239
239
  ```bash
240
- node packages/framework/bin/apt-tools.mjs task create . --description "{slug}" --track {track} --autonomy {autonomy} [--scope {scope}]
240
+ node packages/framework/bin/apt-tools.mjs task ensure . --description "{slug}" --intent create-new --track {track} --autonomy {autonomy} [--scope {scope}]
241
241
  ```
242
242
 
243
+ `task ensure --intent create-new` is idempotent (re-running the same
244
+ input returns the SAME task + worktree, `reused: true`) and resolves the
245
+ effective autonomy from `config.autonomy.default` BEFORE provisioning the
246
+ worktree — so allocation is host-agnostic and never depends on this prose
247
+ being followed. The `allocation_intent` here is `create-new` because the
248
+ skill's `task_context` is `create-new` (the four-value taxonomy maps 1:1).
249
+
243
250
  **Security note:** Do NOT interpolate `{skill_args}` directly into `--description "..."`. `skill_args` is verbatim user input and can contain double-quote characters that break out of the argument boundary and inject extra flags (e.g. `--autonomy`, `--scope`). The task slug is sufficient as the description; `skill_args` is passed to the skill separately after the task record is created.
244
251
 
245
252
  (Use `--scope framework` only when the user is on a framework-scoped task —
@@ -300,29 +307,41 @@ The router emitted a `classify` envelope. This is the main routing path —
300
307
  all free-text input and every flag-override (--quick/--deep/--debug) lands
301
308
  here.
302
309
 
303
- ### Brainstorm hand-off (check FIRST, before picking a skill)
304
-
305
- **Before picking a skill from the envelope,** scan the user's input for
306
- signals that they want to *explore a vision* rather than *commit to a task*.
307
- If present, dispatch to `apt:discuss --brainstorm` and stop. Don't inline
308
- the exploration the brainstorm posture lives in its own skill with its
309
- own fresh context and its own artifact shape.
310
-
311
- Signals — any one triggers the hand-off:
312
- - Vision statements: *"here's what I want to build"*, *"my goal is..."*, *"the idea is..."*
313
- - Open invitations: *"let's think about"*, *"let's brainstorm"*, *"help me figure out"*, *"what's the best way..."*
314
- - Paragraph-shaped input describing an outcome or direction, not a single work item
315
- - Explicit "before we plan, let's explore / think / brainstorm..."
316
-
317
- How to hand off:
318
- ```
319
- [APT] Detected brainstorm intent routing to /apt:discuss --brainstorm
320
- ```
321
- Then invoke the `/apt:discuss --brainstorm` skill with the user's input and stop.
322
-
323
- **Task-shaped input (continue to Step 0):** concrete work item, specific
324
- deliverable, or existing task being continued. Examples: *"add OAuth login"*,
325
- *"fix the view-tracking bug"*, *"migrate reports to JSONB"*.
310
+ ### allocation_intent the single LLM bit (decide FIRST, before picking a skill)
311
+
312
+ The ONLY allocation judgment you make on the free-text path is a single
313
+ schema-bounded `allocation_intent {create-new | require-existing |
314
+ self-managed | none}` (the SAME four-value taxonomy as skill `task_context`).
315
+ **Fail-closed default is `none`** when in doubt, allocate nothing. There is
316
+ no separate prose-only brainstorm gate that can bypass allocation; the
317
+ brainstorm decision is just the `none` outcome of this one judgment.
318
+
319
+ Map the user's input to one bit:
320
+
321
+ - **`none`** vision / exploration / investigation / status / help. The user
322
+ wants to *explore a vision* or *ask a question*, not commit to a work item.
323
+ Allocate NOTHING (no task, no worktree) and dispatch to `apt:discuss
324
+ --brainstorm` (or the picked investigative skill). Signals — any one →
325
+ `none`:
326
+ - Vision statements: *"here's what I want to build"*, *"my goal is..."*, *"the idea is..."*
327
+ - Open invitations: *"let's think about"*, *"let's brainstorm"*, *"help me figure out"*, *"what's the best way..."*
328
+ - Paragraph-shaped input describing an outcome or direction, not a single work item
329
+ - Explicit "before we plan, let's explore / think / brainstorm..."
330
+
331
+ How to hand off:
332
+ ```
333
+ [APT] allocation_intent=none (brainstorm/investigation) — routing to /apt:discuss --brainstorm
334
+ ```
335
+ Then invoke `/apt:discuss --brainstorm` with the user's input and stop.
336
+
337
+ - **`self-managed`** — the picked skill owns its own task/worktree lifecycle
338
+ (e.g. `apt:run`, `apt:pr-review`). Allocate nothing here; let the skill do it.
339
+ - **`require-existing`** — the user is continuing an existing task. Do NOT mint;
340
+ resolve the active task (Step 2 uses `task ensure --intent require-existing`).
341
+ - **`create-new`** — concrete work item / specific deliverable that needs a
342
+ fresh task + worktree. Examples: *"add OAuth login"*, *"fix the view-tracking
343
+ bug"*, *"migrate reports to JSONB"*. Continue to Step 0; Step 2 provisions
344
+ deterministically via `task ensure --intent create-new`.
326
345
 
327
346
  ### Step 0a: Flag-override fast path (envelope.track is set)
328
347
 
@@ -332,6 +351,15 @@ carries `track`, `primary_skill`, `spawn_agent`, `agent`, and `options`.
332
351
  **Skip Step 0b and Step 0c — go straight to Step 1.** These were locked
333
352
  by the user typing `--quick` / `--deep` / `--debug`, not by the host LLM.
334
353
 
354
+ **allocation_intent (flag-override is deterministic — no LLM judgment):**
355
+ map `primary_skill` → `allocation_intent`:
356
+ - `quick` → `create-new`
357
+ - `debug` → `create-new`
358
+ - `plan` → `create-new` (STANDARD / DEEP)
359
+ - a skill whose `task_context` is `self-managed` (e.g. `run`) → `self-managed`
360
+
361
+ Step 2 forwards this bit to `task ensure --intent <bit>`.
362
+
335
363
  ### Step 0b: Classify the skill (envelope.skills[] inline pick)
336
364
 
337
365
  When `classification.source: "host-model-deferred"` (free-text path),
@@ -405,15 +433,31 @@ Map choice: full auto → `execution_mode = "auto"`, step by step → `"step"`,
405
433
 
406
434
  If `needs_autonomy_prompt` is false (user passed --yolo/--autonomous), skip this — use `execution_mode` from route result.
407
435
 
408
- ### Step 2: Register Task
436
+ ### Step 2: Register Task (deterministic allocation)
437
+
438
+ Forward the `allocation_intent` decided above (Step 0a flag-override map,
439
+ or the free-text bit from the allocation_intent section) to the
440
+ deterministic, idempotent allocator — NOT raw `task create`:
409
441
 
410
442
  ```bash
411
- node packages/framework/bin/apt-tools.mjs task create . --description "{task_description}" --track {track} --autonomy {autonomy}
443
+ node packages/framework/bin/apt-tools.mjs task ensure . --description "{task_description}" --intent {allocation_intent} --track {track} --autonomy {autonomy}
412
444
  ```
413
445
 
446
+ - `--intent create-new` provisions a fresh task + worktree, idempotent on
447
+ re-run (`reused: true` returns the SAME task/worktree — re-issuing `/apt`
448
+ never duplicates). Effective autonomy is resolved from
449
+ `config.autonomy.default` BEFORE the worktree hook, so a
450
+ `from_branch: current` base is not spuriously deferred.
451
+ - `--intent require-existing` resolves the active task WITHOUT minting
452
+ (returns `requires_input` on ambiguity — fall back to the
453
+ skill-passthrough resolution chain prompt).
454
+ - `--intent none` / `--intent self-managed` allocate nothing
455
+ (`allocated: false`) — you should already have dispatched per the
456
+ allocation_intent section above and not reached Step 2.
457
+
414
458
  Parse `task_id`, `task_dir`, and (if present) `worktree.worktree_path` / `worktree.branch` / `worktree.base_branch` from the result.
415
459
 
416
- **Task-level worktree isolation:** when `task_isolation.worktree_per_task` is enabled (check via `host_capabilities.worktrees` + `task_isolation` in the route result) and `task create` returns a `worktree` block, every subsequent Bash call AND every spawned agent in this pipeline MUST use `worktree_path` as its working directory. Print:
460
+ **Task-level worktree isolation:** when `task_isolation.worktree_per_task` is enabled (check via `host_capabilities.worktrees` + `task_isolation` in the route result) and `task ensure` returns a `worktree` block, every subsequent Bash call AND every spawned agent in this pipeline MUST use `worktree_path` as its working directory. Print:
417
461
 
418
462
  ```
419
463
  [APT] Working in isolated worktree: {worktree_path}
@@ -424,7 +468,7 @@ Important nuances:
424
468
  - `task_dir` is an **absolute path** under the main repo's `.aperant/tasks/{task-id}/`. All spec/plan/progress artifacts live there and are shared across worktrees.
425
469
  - `apt-tools` commands still receive the **project root** as `<project-dir>` — they coordinate state through the main repo's `.aperant/`. The worktree only affects *code editing* cwd.
426
470
  - When spawning an agent, set its `cwd` (or prefix its Bash calls with `cd {worktree_path} &&`) to the worktree for code reads/edits. Pass `worktree_path` in the agent's context so it knows where code work happens.
427
- - Planner artifact safety: do **not** spawn `apt-planner` with host-level worktree isolation that gives it a separate copied repo. The planner must write `spec.md` and `implementation_plan.json` to the absolute main-repo `task_dir` from `task create`; `.aperant/tasks/**` is gitignored, so artifacts written under a disposable worktree can be invisible to git and lost when that worktree is cleaned.
471
+ - Planner artifact safety: do **not** spawn `apt-planner` with host-level worktree isolation that gives it a separate copied repo. The planner must write `spec.md` and `implementation_plan.json` to the absolute main-repo `task_dir` from `task ensure`; `.aperant/tasks/**` is gitignored, so artifacts written under a disposable worktree can be invisible to git and lost when that worktree is cleaned.
428
472
  - If no `worktree` block is returned, proceed in the project root as before.
429
473
 
430
474
  ### Step 3: Spawn Planner Agent
@@ -482,14 +526,44 @@ tally output. Skip silently if tokens tally errors — never block the
482
526
  pipeline on telemetry.
483
527
 
484
528
  **If `spawn_agent` is false (QUICK or DEBUG):**
485
- Both QUICK and DEBUG resolve here (single-shot, no spawned phase agent). Invoke
486
- the picked skill (`apt:quick` for QUICK, `apt:debug` for DEBUG, per
487
- `primary_skill`) directly with `task_id`, `task_dir`, AND `worktree_path` in its
488
- skill context Step 2 already created the worktree + printed the banner for this
489
- track, so thread `worktree_path` the same way the `spawn_agent: true` branch
490
- threads it into the planner. No phase marker QUICK and DEBUG are both
491
- single-shot here. (If Step 2 returned no `worktree` block, pass `worktree_path` as
492
- "none" and the skill proceeds in the project root.)
529
+ Both QUICK and DEBUG resolve here (single-shot, no spawned phase agent).
530
+
531
+ **The router itself CANNOT edit code.** Its frontmatter `allowed-tools` is
532
+ `Bash, Read, Grep, Glob, Task` it has NO `Write` / `Edit` tool. This is the
533
+ load-bearing boundary (ID-05): the router can classify, allocate
534
+ (`task ensure`), and dispatch, but it can never edit a file on `main`.
535
+
536
+ So do NOT edit inline. **INVOKE the `apt:quick` / `apt:debug` SKILL** (per
537
+ `primary_skill`) AFTER Step 2's `task ensure --intent create-new` has
538
+ provisioned the worktree. Invoking the skill establishes that skill's OWN
539
+ `allowed-tools` scope (`apt-quick` / `apt-debug` both carry
540
+ `Read, Write, Edit, Bash, Grep, Glob`), which RE-GRANTS the edit affordance —
541
+ but only once a worktree exists, so editing can never land on `main` through
542
+ the router. Pass `task_id`, `task_dir`, AND `worktree_path` into the invoked
543
+ skill's context (thread `worktree_path` the same way the `spawn_agent: true`
544
+ branch threads it into the planner). This is a SKILL invocation, NOT a `Task`
545
+ sub-agent spawn — QUICK/DEBUG stay single-agent/single-context, so the Fast
546
+ Path Guarantee is preserved. No phase marker. (If Step 2 returned no `worktree`
547
+ block, pass `worktree_path` as "none" and the skill proceeds in the project
548
+ root.)
549
+
550
+ > **inline vs skill-scope (read this).** "Inline" here means the OLD behavior:
551
+ > the router editing within its own `/apt` turn under the router's allowlist.
552
+ > That is gone — the router has no edit tool. "Skill-scope" is the NEW
553
+ > behavior: a genuine `apt:quick` / `apt:debug` invocation whose own
554
+ > `allowed-tools` re-grants `Write, Edit` for the edit work, after the worktree
555
+ > exists.
556
+ >
557
+ > **Residual (host-runtime, not CI-provable — founder smoke-test gate).**
558
+ > Whether Claude Code treats a nested skill's `allowed-tools` as a REPLACEMENT
559
+ > (re-grants edit — design holds) or as an INTERSECTION/ceiling (the parent
560
+ > router allowlist caps the child — Fast Path breaks) is a host-implementation
561
+ > property that cannot be unit-tested from the framework. CI proves the
562
+ > frontmatter/prose structure; a founder in-app smoke-test is the residual gate.
563
+ > **Fallback if the smoke-test shows breakage:** revert ONLY the
564
+ > router-frontmatter line (re-add `Write, Edit`). The host-agnostic
565
+ > `task ensure` boundary (ID-02) still fixes the on-`main`-edit bug; the
566
+ > allowed-tools removal is hardening, not the fix.
493
567
 
494
568
  ### Step 4: Chain Pipeline (based on selected option)
495
569
 
@@ -42,7 +42,7 @@ reproduction, so loading this appendix is non-trivial.
42
42
  - **apt-tools path:** `node packages/framework/bin/apt-tools.mjs` or the locally installed `apt-tools` binary
43
43
  - **Constitution:** Read `AGENTS.md` in the project root if it exists
44
44
  - **Debug sessions:** `.aperant/debug/{session-id}/DEBUG.md`
45
- - **Task-level worktree isolation:** A worktree is provisioned at session start by `task create` (track-agnostic — DEBUG gets one too; parsed + banner-announced in §1a) when `task_isolation.worktree_per_task` is enabled. Read-only investigation (Sections 2-3 Observe / Hypothesize — `git log`, `git diff`, Grep, Read) may run from EITHER cwd; they only read. But once code changes begin — Section 4 (Checkpoint), Section 5b (Execute Test — the minimal change), Section 6b (Implement Fix + commit) — run those Bash commands with `cd {worktree_path} &&` so the fix + checkpoint commits land on the worktree's task branch. Use the `worktree_path` the router passed in skill context or that §1a parsed from `task create`'s envelope. `apt-tools` calls always take the project root as `<project-dir>`. If no `worktree` block was returned, proceed in the project root as before.
45
+ - **Task-level worktree isolation:** A worktree is provisioned at session start by `task ensure` (track-agnostic — DEBUG gets one too; parsed + banner-announced in §1a) when `task_isolation.worktree_per_task` is enabled. Read-only investigation (Sections 2-3 Observe / Hypothesize — `git log`, `git diff`, Grep, Read) may run from EITHER cwd; they only read. But once code changes begin — Section 4 (Checkpoint), Section 5b (Execute Test — the minimal change), Section 6b (Implement Fix + commit) — run those Bash commands with `cd {worktree_path} &&` so the fix + checkpoint commits land on the worktree's task branch. Use the `worktree_path` the router passed in skill context or that §1a parsed from `task ensure`'s envelope. `apt-tools` calls always take the project root as `<project-dir>`. If no `worktree` block was returned, proceed in the project root as before.
46
46
  </your_environment>
47
47
 
48
48
  <state_files>
@@ -71,35 +71,25 @@ If resuming, read DEBUG.md and skip to the current phase (observe/hypothesize/te
71
71
 
72
72
  ### 1a. Resolve canonical task id (idempotent — new sessions only)
73
73
 
74
- DEBUG now produces a canonical state.active_tasks record so `/apt:ship` can find the task via the lite ship profile once the fix is committed. The body owns idempotency because `apt-tools task create` does NOT guard against existing ids (see spec §3 R8).
74
+ DEBUG now produces a canonical state.active_tasks record so `/apt:ship` can find the task via the lite ship profile once the fix is committed. Idempotency is owned by the deterministic allocator `apt-tools task ensure --intent create-new` (NOT raw `task create`) re-running returns the SAME task + worktree (`reused: true`), so the old `task get` guard dance is gone.
75
75
 
76
76
  Two invocation paths converge here:
77
77
 
78
- - **Router path** (`/apt` → `/apt:debug`): the router has already called `task create` and injected `task_id` into your skill context.
79
- - **Direct path** (`/apt:debug foo`): no `task_id` in context — you create one now.
78
+ - **Router path** (`/apt` → `/apt:debug`): the router has already run `task ensure --intent create-new` and injected `task_id` (+ `worktree_path`) into your skill context. Re-affirm idempotently with the same id and adopt `task_id` as `{session-id}`:
79
+ ```bash
80
+ apt-tools task ensure . --description "$ARGUMENTS" --intent create-new --track DEBUG --id {task_id}
81
+ ```
82
+ The `--id {task_id}` makes ensure resolve to the EXACT record the router just provisioned (`reused: true`) — no second task, no second worktree.
80
83
 
81
- Sequence:
84
+ - **Direct path** (`/apt:debug foo`): no `task_id` in context — allocate now:
85
+ ```bash
86
+ apt-tools task ensure . --description "$ARGUMENTS" --intent create-new --track DEBUG
87
+ ```
88
+ Parse the generated `task_id` from the envelope and adopt it as `{session-id}`. ensure is keyed on the normalized description + scope, so a retry returns the SAME canonical id (replacing the legacy `debug-YYYYMMDD-HHmm` form).
82
89
 
83
- 1. **If `task_id` is present in skill context** (router path):
84
- ```bash
85
- apt-tools task get . --id {task_id}
86
- ```
87
- - If exit 0 AND the returned record has `track === "DEBUG"` → reuse, skip the create call. Adopt `task_id` as `{session-id}`.
88
- - Else (record missing OR wrong track) → call:
89
- ```bash
90
- apt-tools task create . --description "$ARGUMENTS" --track DEBUG --id {task_id}
91
- ```
92
- Adopt the id as `{session-id}`.
93
-
94
- 2. **If no `task_id` in skill context** (direct path):
95
- ```bash
96
- apt-tools task create . --description "$ARGUMENTS" --track DEBUG
97
- ```
98
- Parse the generated `task_id` from the envelope and adopt it as `{session-id}`. The canonical id replaces the legacy `debug-YYYYMMDD-HHmm` form.
99
-
100
- The debug working dir at `.aperant/debug/{session-id}/` stays — that working artifact is preserved (per spec §3 R7). The canonical task record at `.aperant/tasks/{task-id}/` is created in parallel by `task create`, and both share the same id.
90
+ The debug working dir at `.aperant/debug/{session-id}/` stays — that working artifact is preserved (per spec §3 R7). The canonical task record at `.aperant/tasks/{task-id}/` is created in parallel by `task ensure`, and both share the same id.
101
91
 
102
- **Worktree isolation (both paths).** `task create` provisions a worktree when `task_isolation.worktree_per_task` is enabled (track-agnostic — DEBUG gets one too). Parse `worktree.worktree_path`, `worktree.branch`, and `worktree.base_branch` from the `task create` envelope (direct path); on the router path the orchestrator already passed `worktree_path` into your skill context — use that. When a `worktree` block is present, print the banner:
92
+ **Worktree isolation (both paths).** `task ensure --intent create-new` provisions a worktree when `task_isolation.worktree_per_task` is enabled (track-agnostic — DEBUG gets one too). Parse `worktree.worktree_path`, `worktree.branch`, and `worktree.base_branch` from the `task ensure` envelope (direct path); on the router path the orchestrator already passed `worktree_path` into your skill context — use that. When a `worktree` block is present, print the banner:
103
93
 
104
94
  ```
105
95
  [APT] Working in isolated worktree: {worktree_path}