@aperant/framework 0.8.1 → 0.8.4

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 (248) hide show
  1. package/CHANGELOG.md +287 -1
  2. package/agents/apt-planner.md +5 -4
  3. package/dist/cli/commands/adr.mjs +1 -1
  4. package/dist/cli/commands/audit-branch-current.d.mts +25 -0
  5. package/dist/cli/commands/audit-branch-current.d.mts.map +1 -0
  6. package/dist/cli/commands/audit-branch-current.mjs +252 -0
  7. package/dist/cli/commands/audit-branch-current.mjs.map +1 -0
  8. package/dist/cli/commands/audit.d.mts.map +1 -1
  9. package/dist/cli/commands/audit.mjs +13 -2
  10. package/dist/cli/commands/audit.mjs.map +1 -1
  11. package/dist/cli/commands/check-version.d.mts.map +1 -1
  12. package/dist/cli/commands/check-version.mjs +19 -1
  13. package/dist/cli/commands/check-version.mjs.map +1 -1
  14. package/dist/cli/commands/context.mjs +3 -3
  15. package/dist/cli/commands/context.mjs.map +1 -1
  16. package/dist/cli/commands/detect-runtime.d.mts +6 -0
  17. package/dist/cli/commands/detect-runtime.d.mts.map +1 -0
  18. package/dist/cli/commands/detect-runtime.mjs +136 -0
  19. package/dist/cli/commands/detect-runtime.mjs.map +1 -0
  20. package/dist/cli/commands/driver-doctor.d.mts +29 -0
  21. package/dist/cli/commands/driver-doctor.d.mts.map +1 -0
  22. package/dist/cli/commands/driver-doctor.mjs +291 -0
  23. package/dist/cli/commands/driver-doctor.mjs.map +1 -0
  24. package/dist/cli/commands/gate.mjs +14 -0
  25. package/dist/cli/commands/gate.mjs.map +1 -1
  26. package/dist/cli/commands/init.d.mts.map +1 -1
  27. package/dist/cli/commands/init.mjs +9 -6
  28. package/dist/cli/commands/init.mjs.map +1 -1
  29. package/dist/cli/commands/install-from-source.d.mts +2 -0
  30. package/dist/cli/commands/install-from-source.d.mts.map +1 -0
  31. package/dist/cli/commands/install-from-source.mjs +2 -0
  32. package/dist/cli/commands/install-from-source.mjs.map +1 -0
  33. package/dist/cli/commands/modes.mjs +1 -1
  34. package/dist/cli/commands/route.d.mts.map +1 -1
  35. package/dist/cli/commands/route.mjs +38 -1
  36. package/dist/cli/commands/route.mjs.map +1 -1
  37. package/dist/cli/commands/triage.mjs +1 -1
  38. package/dist/cli/config/load.d.mts.map +1 -1
  39. package/dist/cli/config/load.mjs +9 -3
  40. package/dist/cli/config/load.mjs.map +1 -1
  41. package/dist/cli/coordination/auto-emit-artifact-ready.mjs +1 -1
  42. package/dist/cli/coordination/event-schema.d.mts.map +1 -1
  43. package/dist/cli/coordination/event-schema.mjs +18 -0
  44. package/dist/cli/coordination/event-schema.mjs.map +1 -1
  45. package/dist/cli/dispatch.d.mts.map +1 -1
  46. package/dist/cli/dispatch.mjs +18 -1
  47. package/dist/cli/dispatch.mjs.map +1 -1
  48. package/dist/cli/gate/context.d.mts +1 -0
  49. package/dist/cli/gate/context.d.mts.map +1 -1
  50. package/dist/cli/gate/context.mjs +14 -1
  51. package/dist/cli/gate/context.mjs.map +1 -1
  52. package/dist/cli/gate/gates/consistency-check.d.mts +1 -0
  53. package/dist/cli/gate/gates/consistency-check.d.mts.map +1 -1
  54. package/dist/cli/gate/gates/consistency-check.mjs +1 -0
  55. package/dist/cli/gate/gates/consistency-check.mjs.map +1 -1
  56. package/dist/cli/gate/gates/review-clean.d.mts +1 -0
  57. package/dist/cli/gate/gates/review-clean.d.mts.map +1 -1
  58. package/dist/cli/gate/gates/review-clean.mjs +1 -0
  59. package/dist/cli/gate/gates/review-clean.mjs.map +1 -1
  60. package/dist/cli/gate/gates/verify-approved.d.mts +1 -0
  61. package/dist/cli/gate/gates/verify-approved.d.mts.map +1 -1
  62. package/dist/cli/gate/gates/verify-approved.mjs +1 -0
  63. package/dist/cli/gate/gates/verify-approved.mjs.map +1 -1
  64. package/dist/cli/gate/registry.d.mts.map +1 -1
  65. package/dist/cli/gate/registry.mjs +9 -1
  66. package/dist/cli/gate/registry.mjs.map +1 -1
  67. package/dist/cli/install/find-workspace-framework-version.d.mts +16 -0
  68. package/dist/cli/install/find-workspace-framework-version.d.mts.map +1 -0
  69. package/dist/cli/install/find-workspace-framework-version.mjs +85 -0
  70. package/dist/cli/install/find-workspace-framework-version.mjs.map +1 -0
  71. package/dist/cli/install/install-from-source.d.mts +10 -0
  72. package/dist/cli/install/install-from-source.d.mts.map +1 -0
  73. package/dist/cli/install/install-from-source.mjs +271 -0
  74. package/dist/cli/install/install-from-source.mjs.map +1 -0
  75. package/dist/cli/install/install-kernel.d.mts.map +1 -1
  76. package/dist/cli/install/install-kernel.mjs +24 -0
  77. package/dist/cli/install/install-kernel.mjs.map +1 -1
  78. package/dist/cli/install/legacy-paths.d.mts +33 -11
  79. package/dist/cli/install/legacy-paths.d.mts.map +1 -1
  80. package/dist/cli/install/legacy-paths.mjs +161 -39
  81. package/dist/cli/install/legacy-paths.mjs.map +1 -1
  82. package/dist/cli/install/runtime-detect.mjs +1 -1
  83. package/dist/cli/install/runtime-detect.mjs.map +1 -1
  84. package/dist/cli/install/runtime-migrate.d.mts +34 -14
  85. package/dist/cli/install/runtime-migrate.d.mts.map +1 -1
  86. package/dist/cli/install/runtime-migrate.mjs +63 -30
  87. package/dist/cli/install/runtime-migrate.mjs.map +1 -1
  88. package/dist/cli/install/transforms/codex.d.mts.map +1 -1
  89. package/dist/cli/install/transforms/codex.mjs +28 -17
  90. package/dist/cli/install/transforms/codex.mjs.map +1 -1
  91. package/dist/cli/skill-author/contract.mjs +2 -2
  92. package/dist/cli/skill-author/contract.mjs.map +1 -1
  93. package/dist/cli/verify-proof/audit.d.mts +34 -0
  94. package/dist/cli/verify-proof/audit.d.mts.map +1 -0
  95. package/dist/cli/verify-proof/audit.mjs +53 -0
  96. package/dist/cli/verify-proof/audit.mjs.map +1 -0
  97. package/dist/cli/verify-proof/exec.d.mts +20 -0
  98. package/dist/cli/verify-proof/exec.d.mts.map +1 -0
  99. package/dist/cli/verify-proof/exec.mjs +74 -0
  100. package/dist/cli/verify-proof/exec.mjs.map +1 -0
  101. package/dist/cli/verify-proof/idl/index.d.mts +2 -0
  102. package/dist/cli/verify-proof/idl/index.d.mts.map +1 -0
  103. package/dist/cli/verify-proof/idl/index.mjs +14 -0
  104. package/dist/cli/verify-proof/idl/index.mjs.map +1 -0
  105. package/dist/cli/verify-proof/idl/types.d.ts +9 -0
  106. package/dist/cli/verify-proof/idl/types.d.ts.map +1 -0
  107. package/dist/cli/verify-proof/idl/types.js +9 -0
  108. package/dist/cli/verify-proof/idl/types.js.map +1 -0
  109. package/dist/cli/verify-proof/manifest-validator.d.mts +19 -0
  110. package/dist/cli/verify-proof/manifest-validator.d.mts.map +1 -0
  111. package/dist/cli/verify-proof/manifest-validator.mjs +182 -0
  112. package/dist/cli/verify-proof/manifest-validator.mjs.map +1 -0
  113. package/dist/cli/verify-proof/resolver.d.mts +43 -0
  114. package/dist/cli/verify-proof/resolver.d.mts.map +1 -0
  115. package/dist/cli/verify-proof/resolver.mjs +160 -0
  116. package/dist/cli/verify-proof/resolver.mjs.map +1 -0
  117. package/dist/cli/verify-proof/runtime-detect.d.mts +27 -0
  118. package/dist/cli/verify-proof/runtime-detect.d.mts.map +1 -0
  119. package/dist/cli/verify-proof/runtime-detect.mjs +116 -0
  120. package/dist/cli/verify-proof/runtime-detect.mjs.map +1 -0
  121. package/dist/cli/verify-proof/trust.d.mts +70 -0
  122. package/dist/cli/verify-proof/trust.d.mts.map +1 -0
  123. package/dist/cli/verify-proof/trust.mjs +174 -0
  124. package/dist/cli/verify-proof/trust.mjs.map +1 -0
  125. package/dist/plugin/.claude-plugin/plugin.json +3 -1
  126. package/dist/plugin/agents/apt-planner.md +5 -4
  127. package/dist/plugin/skills/apt/SKILL.md +75 -6
  128. package/dist/plugin/skills/apt-caveman/SKILL.md +64 -0
  129. package/dist/plugin/skills/apt-debug/SKILL.md +36 -4
  130. package/dist/plugin/skills/apt-debug/appendices/diagnose-discipline.md +2 -11
  131. package/dist/plugin/skills/apt-discuss/SKILL.md +4 -4
  132. package/dist/plugin/skills/apt-discuss/appendices/grill-discipline.md +2 -11
  133. package/dist/plugin/skills/apt-discuss/appendices/zoom-out-helper.md +0 -8
  134. package/dist/plugin/skills/apt-execute/SKILL.md +27 -4
  135. package/dist/plugin/skills/apt-execute/appendices/tdd-mode.md +2 -10
  136. package/dist/plugin/skills/apt-fan-out/SKILL.md +36 -1
  137. package/dist/plugin/skills/apt-handoff/SKILL.md +228 -0
  138. package/dist/plugin/skills/apt-improve/DEEPENING.md +0 -8
  139. package/dist/plugin/skills/apt-improve/INTERFACE-DESIGN.md +0 -8
  140. package/dist/plugin/skills/apt-improve/LANGUAGE.md +0 -8
  141. package/dist/plugin/skills/apt-improve/SKILL.md +4 -4
  142. package/dist/plugin/skills/apt-plan/SKILL.md +23 -5
  143. package/dist/plugin/skills/apt-plan/adapters/conductor.md +1 -1
  144. package/dist/plugin/skills/apt-prototype/LOGIC.md +0 -8
  145. package/dist/plugin/skills/apt-prototype/SKILL.md +4 -4
  146. package/dist/plugin/skills/apt-prototype/UI.md +0 -8
  147. package/dist/plugin/skills/apt-quick/SKILL.md +31 -1
  148. package/dist/plugin/skills/apt-resume/SKILL.md +54 -31
  149. package/dist/plugin/skills/apt-run/SKILL.md +114 -16
  150. package/dist/plugin/skills/apt-setup/SKILL.md +97 -8
  151. package/dist/plugin/skills/apt-ship/SKILL.md +165 -9
  152. package/dist/plugin/skills/apt-spar/SKILL.md +65 -16
  153. package/dist/plugin/skills/apt-triage/AGENT-BRIEF.md +0 -8
  154. package/dist/plugin/skills/apt-triage/OUT-OF-SCOPE.md +0 -7
  155. package/dist/plugin/skills/apt-triage/SKILL.md +2 -2
  156. package/dist/plugin/skills/apt-update/SKILL.md +74 -17
  157. package/dist/plugin/skills/apt-verify-proof/SKILL.md +48 -1
  158. package/dist/plugin/skills/apt-zoom-out/SKILL.md +3 -3
  159. package/dist/schemas/quick-task.d.ts.map +1 -1
  160. package/dist/schemas/quick-task.js +2 -2
  161. package/dist/schemas/quick-task.js.map +1 -1
  162. package/dist/types/config.d.ts +33 -0
  163. package/dist/types/config.d.ts.map +1 -1
  164. package/dist/types/state.d.ts +1 -1
  165. package/dist/types/state.d.ts.map +1 -1
  166. package/dist/types/task-record.d.ts +1 -1
  167. package/dist/types/task-record.d.ts.map +1 -1
  168. package/package.json +134 -133
  169. package/prompts/planner.md +1 -1
  170. package/prompts/spec_writer.md +1 -1
  171. package/skills/apt/SKILL.md +75 -6
  172. package/skills/apt-caveman/SKILL.md +64 -0
  173. package/skills/apt-debug/SKILL.md +36 -4
  174. package/skills/apt-debug/appendices/diagnose-discipline.md +2 -11
  175. package/skills/apt-discuss/SKILL.md +4 -4
  176. package/skills/apt-discuss/appendices/grill-discipline.md +2 -11
  177. package/skills/apt-discuss/appendices/zoom-out-helper.md +0 -8
  178. package/skills/apt-execute/SKILL.md +27 -4
  179. package/skills/apt-execute/appendices/tdd-mode.md +2 -10
  180. package/skills/apt-fan-out/SKILL.md +36 -1
  181. package/skills/apt-handoff/SKILL.md +228 -0
  182. package/skills/apt-improve/DEEPENING.md +0 -8
  183. package/skills/apt-improve/INTERFACE-DESIGN.md +0 -8
  184. package/skills/apt-improve/LANGUAGE.md +0 -8
  185. package/skills/apt-improve/SKILL.md +4 -4
  186. package/skills/apt-plan/SKILL.md +23 -5
  187. package/skills/apt-plan/adapters/conductor.md +1 -1
  188. package/skills/apt-planner.md +1 -1
  189. package/skills/apt-prototype/LOGIC.md +0 -8
  190. package/skills/apt-prototype/SKILL.md +4 -4
  191. package/skills/apt-prototype/UI.md +0 -8
  192. package/skills/apt-quick/SKILL.md +31 -1
  193. package/skills/apt-resume/SKILL.md +54 -31
  194. package/skills/apt-run/SKILL.md +114 -16
  195. package/skills/apt-setup/SKILL.md +97 -8
  196. package/skills/apt-ship/SKILL.md +165 -9
  197. package/skills/apt-spar/SKILL.md +65 -16
  198. package/skills/apt-triage/AGENT-BRIEF.md +0 -8
  199. package/skills/apt-triage/OUT-OF-SCOPE.md +0 -7
  200. package/skills/apt-triage/SKILL.md +2 -2
  201. package/skills/apt-update/SKILL.md +74 -17
  202. package/skills/apt-verify-proof/SKILL.md +48 -1
  203. package/skills/apt-zoom-out/SKILL.md +3 -3
  204. package/src/cli/commands/adr.mjs +1 -1
  205. package/src/cli/commands/audit-branch-current.mjs +250 -0
  206. package/src/cli/commands/audit.mjs +13 -2
  207. package/src/cli/commands/check-version.mjs +20 -1
  208. package/src/cli/commands/context.mjs +3 -3
  209. package/src/cli/commands/detect-runtime.mjs +134 -0
  210. package/src/cli/commands/driver-doctor.mjs +294 -0
  211. package/src/cli/commands/gate.mjs +15 -0
  212. package/src/cli/commands/init.mjs +9 -6
  213. package/src/cli/commands/install-from-source.mjs +1 -0
  214. package/src/cli/commands/modes.mjs +1 -1
  215. package/src/cli/commands/route.mjs +42 -1
  216. package/src/cli/commands/triage.mjs +1 -1
  217. package/src/cli/config/load.mjs +9 -3
  218. package/src/cli/coordination/auto-emit-artifact-ready.mjs +1 -1
  219. package/src/cli/coordination/event-schema.mjs +19 -0
  220. package/src/cli/dispatch.mjs +17 -1
  221. package/src/cli/gate/context.mjs +20 -1
  222. package/src/cli/gate/gates/consistency-check.mjs +1 -0
  223. package/src/cli/gate/gates/review-clean.mjs +1 -0
  224. package/src/cli/gate/gates/verify-approved.mjs +1 -0
  225. package/src/cli/gate/registry.mjs +11 -1
  226. package/src/cli/install/find-workspace-framework-version.mjs +88 -0
  227. package/src/cli/install/install-from-source.mjs +276 -0
  228. package/src/cli/install/install-kernel.mjs +24 -0
  229. package/src/cli/install/legacy-paths.mjs +162 -39
  230. package/src/cli/install/runtime-detect.mjs +1 -1
  231. package/src/cli/install/runtime-migrate.mjs +63 -30
  232. package/src/cli/install/transforms/codex.mjs +26 -17
  233. package/src/cli/skill-author/contract.mjs +2 -2
  234. package/src/cli/verify-proof/.gitkeep +0 -0
  235. package/src/cli/verify-proof/audit.mjs +55 -0
  236. package/src/cli/verify-proof/exec.mjs +74 -0
  237. package/src/cli/verify-proof/idl/index.mjs +24 -0
  238. package/src/cli/verify-proof/idl/types.ts +41 -0
  239. package/src/cli/verify-proof/manifest-schema.json +211 -0
  240. package/src/cli/verify-proof/manifest-validator.mjs +184 -0
  241. package/src/cli/verify-proof/resolver.mjs +163 -0
  242. package/src/cli/verify-proof/runtime-detect.mjs +122 -0
  243. package/src/cli/verify-proof/trust.mjs +187 -0
  244. package/templates/adr-format.md +0 -8
  245. package/templates/aperant-claude-md-appendix.md +1 -1
  246. package/templates/context-format.md +1 -9
  247. package/templates/proof-verification.md +19 -5
  248. package/workflows/verify-proof.md +56 -14
@@ -1,12 +1,3 @@
1
- <!--
2
- Adapted from Matt Pocock's MIT-licensed skill suite:
3
- https://github.com/mattpocock/skills/blob/main/skills/engineering/grill-with-docs
4
- Licensed under MIT. Modifications: ported as an apt:discuss posture loader,
5
- extended with the validated 100-token reframe sentence and the
6
- autonomy-aware degradation table from the Pocock adoption brainstorm
7
- (Architectural principles to lock §2).
8
- -->
9
-
10
1
  # Grill Discipline — apt:discuss posture loader
11
2
 
12
3
  This appendix loads into `apt:discuss`'s reasoning context whenever the
@@ -15,7 +6,7 @@ skill is invoked in decision-lock posture (or as a sub-step inside
15
6
  artifacts:
16
7
 
17
8
  1. The 100-token **reframe sentence** validated by the V2 grill-comparison
18
- experiment (43/44 vs 38/44 blind-judge score against Pocock's verbatim
9
+ experiment (43/44 vs 38/44 blind-judge score against the verbatim
19
10
  `grill-with-docs`).
20
11
  2. The **autonomy-aware degradation table** that prevents full-auto runs
21
12
  from grinding to a halt grilling every gray area.
@@ -98,7 +89,7 @@ where the user has a concrete task with implicit gray areas). The
98
89
  options) does NOT load this appendix; brainstorm has its own posture
99
90
  encoded in apt:discuss's `<objective>` block.
100
91
 
101
- `apt:zoom-out` (a sibling skill, also Pocock-adopted) does NOT load
92
+ `apt:zoom-out` (a sibling skill, also adopted) does NOT load
102
93
  this appendix. Zoom-out is descriptive ("show me the broader picture"),
103
94
  not normative ("lock this decision"). Loading grill-discipline there
104
95
  would mis-fire the reframe sentence on a read-only operation.
@@ -1,11 +1,3 @@
1
- <!--
2
- Adapted from Matt Pocock's MIT-licensed skill suite:
3
- https://github.com/mattpocock/skills/blob/main/skills/engineering/zoom-out
4
- Licensed under MIT. Modifications: ported as a loaded-helper for apt:discuss
5
- brainstorm mode so the discipline activates without spawning the full
6
- apt:zoom-out skill (the latter is a router-invocable verb on its own).
7
- -->
8
-
9
1
  # Zoom-Out Helper — apt:discuss brainstorm mode loaded helper
10
2
 
11
3
  This appendix loads into `apt:discuss` brainstorm mode when the user's
@@ -15,7 +15,7 @@ execution_modes:
15
15
  - auto
16
16
  - step
17
17
  allowed-tools: "Read, Write, Edit, Bash, Grep, Glob"
18
- argument-hint: "apt:execute [--continue] [--subtask <id>] [--parallel] [--wave <N>] [--tdd] [--no-tdd]"
18
+ argument-hint: "apt:execute [--continue] [--subtask <id>] [--parallel] [--wave <N>] [--tdd] [--no-tdd] [--spar]"
19
19
  gates:
20
20
  - constitution-read
21
21
  - constitution-coverage
@@ -139,7 +139,7 @@ Before loading context, determine execution mode:
139
139
 
140
140
  4. **If Sequential Mode:** proceed to Section 1 below (existing behavior, unchanged).
141
141
 
142
- ### 0a.1. TDD Discipline Detection (Pocock adoption AC3)
142
+ ### 0a.1. TDD Discipline Detection
143
143
 
144
144
  Compute whether the vertical-tracer-bullet TDD discipline is active for
145
145
  this run. The `<tdd_iron_law>` block in Section 3c is gated on this
@@ -168,13 +168,13 @@ else:
168
168
 
169
169
  Carry `tdd_active` forward to Section 3c. When `tdd_active === false`,
170
170
  the iron-law block is skipped entirely and execute behaves identically
171
- to the pre-Pocock single-commit flow. When `tdd_active === true`, the
171
+ to the pre-vertical-slice single-commit flow. When `tdd_active === true`, the
172
172
  red-green-refactor sequence is mandatory and audited by gate G9.
173
173
 
174
174
  **The QUICK exemption is a constraint, not a toggle.** A user who passes
175
175
  `--tdd` on a QUICK-routed task gets `tdd_active = false` and a one-line
176
176
  note in the run report: "TDD requested but skipped — QUICK Fast Path
177
- Guarantee (ID-05)". The Pocock appendix
177
+ Guarantee (ID-05)". The Aperant appendix
178
178
  `appendices/tdd-mode.md` carries the rationale.
179
179
 
180
180
  ## 1. Load Context
@@ -476,6 +476,29 @@ Execution complete:
476
476
  Next: /apt:verify
477
477
  ```
478
478
 
479
+ ### 4a. --spar flag (FRAMEWORK-RFC-001)
480
+
481
+ If `$ARGUMENTS` contained `--spar`, dispatch `/apt:spar` against the
482
+ just-completed implementation before reporting Next.
483
+
484
+ Topic frame: 1-2 sentences derived from `build-progress.json` summarizing
485
+ the diff that just landed (e.g. "N subtasks completed against the M-file
486
+ plan; the largest change touched <path>"). If `build-progress.json` is
487
+ missing or empty (corner case), use the task description from
488
+ `.aperant/state.json` as a graceful fallback.
489
+
490
+ Same `--timeout-ms 120000` pipeline-mode budget and NO `--rounds` flag
491
+ (per FRAMEWORK-BUG-038 — pipeline gates always defer to the skill
492
+ default). When merged-config `spar.partner` is set, append `--with <partner>`.
493
+
494
+ ```
495
+ /apt:spar --timeout-ms 120000 [--with <partner>] <topic-frame-from-build-progress.json>
496
+ ```
497
+
498
+ After spar returns, append the termination headline + Layer 2 path
499
+ (`.aperant/spar/<slug>-<ts>.md`) into the report output so the user can
500
+ review findings before invoking `/apt:verify`.
501
+
479
502
  ## 5. Wave-Parallel Execution
480
503
 
481
504
  When wave mode is active (determined in Section 0), execution follows the wave structure instead of flat sequential order. This is the throughput multiplier — independent subtasks run in parallel across multiple agent contexts.
@@ -1,16 +1,8 @@
1
- <!--
2
- Adapted from Matt Pocock's MIT-licensed skill suite:
3
- https://github.com/mattpocock/skills/blob/main/skills/engineering/tdd
4
- Licensed under MIT. Modifications: ported as an apt:execute appendix
5
- gated by `tdd_active` (config.coding.tdd_default || --tdd flag) and
6
- made QUICK-exempt per Aperant's Fast Path Guarantee (ID-05).
7
- -->
8
-
9
1
  # TDD Mode — Vertical Tracer-Bullet Discipline (apt:execute appendix)
10
2
 
11
3
  This appendix loads into `apt:execute`'s context when `tdd_active === true`
12
4
  (see SKILL.md §0a.1). It carries the vertical-tracer-bullet discipline
13
- Pocock's `tdd` skill captured. The audit gate G9 (`tdd-iron-law`) enforces
5
+ the `tdd` skill captured. The audit gate G9 (`tdd-iron-law`) enforces
14
6
  the commit order; this prose explains the **why**.
15
7
 
16
8
  ## Why vertical tracer bullets, not horizontal layers
@@ -90,7 +82,7 @@ that their flag was overridden by the constraint.
90
82
  ## Backward-compat alias
91
83
 
92
84
  The legacy `config.tdd.iron_law` key continues to enable TDD for
93
- projects that adopted Aperant before the Pocock content-format
85
+ projects that adopted Aperant before content-format
94
86
  upgrade. The new computation rolls it into `tdd_active`:
95
87
 
96
88
  ```
@@ -106,9 +106,44 @@ node packages/framework/bin/apt-tools.mjs team list .
106
106
 
107
107
  Each worker's row uses its `APT_AGENT_ID=fanout-${batch_id}-${task_id}`. A worker is "done" when its corresponding task's `lifecycle_phase` is one of `closed`, `shipped-pending-merge`, or `blocked`.
108
108
 
109
+ **On each poll, re-render the multi-task phase rail verbatim** — one boxed panel per worker, branch glyphs `┌─ │ └─` separating panels, status glyphs `✓` (done) / `●` (active) / `○` (pending), inline metrics on completed rows. Pull metrics from each worker's `build-progress.json` / `qa_signoff.json` / `review.json` (see paths in `.aperant/tasks/{task_id}/`):
110
+
111
+ ```
112
+ [APT] Fan-out status: {N} workers
113
+ ┌─ {task 1 short name} ─────────────────────────────
114
+ │ Phase 1 Plan ✓
115
+ │ Phase 2 Execute ✓ 7 commits, 81 tests
116
+ │ Phase 3 Verify ✓ APPROVED 9/10/9/9
117
+ │ Phase 4 Review ✓ APPROVE 9/9/9/10/10, 5 findings fixed
118
+ │ Phase 5 Ship ● opening PR
119
+
120
+ └─ {task 2 short name} ─────────────────────────────
121
+ Phase 1 Plan ✓
122
+ Phase 2 Execute ✓ 14 commits, 129 tests
123
+ Phase 3 Verify ● running
124
+ Phase 4 Review ○
125
+ Phase 5 Ship ○
126
+
127
+ Churned for {Xm Ys} · {K} local agents still running
128
+ ```
129
+
130
+ The first panel uses `┌─ ... │` (top-with-stem); the LAST panel uses `└─ ... ` (bottom corner). Footer line: "Churned" = elapsed since the most recent lifecycle event across all in-flight workers; "K local agents still running" = count of workers whose `lifecycle_phase` is non-terminal AND `assigned_to` is non-null.
131
+
109
132
  ## 5. Report
110
133
 
111
- When all workers reach a terminal state, emit one consolidated summary: which tasks closed (verdict + PR URL), which are awaiting merge, which blocked. Recommend `/apt:close-task --all` for the post-merge sweep.
134
+ When all workers reach a terminal state, render the rail one final time. For each shipped worker (lifecycle `shipped-pending-merge` + `pr_url` set), collapse that panel to the SHIPPED variant:
135
+
136
+ ```
137
+ [APT] Fan-out complete
138
+ ┌─ {task 1 short name} ────────────────────── ✅ SHIPPED
139
+ │ Plan ✓ Execute ✓ Verify ✓ Review ✓ Ship ✓
140
+ │ PR #{N}: {url}
141
+
142
+ └─ {task 2 short name} ─────────────────────── ⚠ BLOCKED
143
+ {one-line reason}
144
+ ```
145
+
146
+ Mix SHIPPED / BLOCKED / in-flight variants in the same rail. Below the panel, emit one consolidated summary: which tasks closed (verdict + PR URL), which are awaiting merge, which blocked. Recommend `/apt:close-task --all` for the post-merge sweep. The `[APT] Fan-out` header lines above each rail are the backward-compat markers for external log-grep tooling — keep them.
112
147
 
113
148
  </process>
114
149
 
@@ -0,0 +1,228 @@
1
+ ---
2
+ name: apt:handoff
3
+ description: "Agent-to-agent handoff — compact current conversation into a HANDOFF artifact in the repo for a fresh agent to pick up"
4
+ apt-skill-version: {{APT_VERSION}}
5
+ stage: pause
6
+ intent: capture
7
+ when_to_use: "An agent (not a human) needs to transfer in-flight work to a different agent — different model, different CLI, a fan-out peer, or a fresh context window. Writes a HANDOFF artifact under .aperant/ so the receiver picks up exactly where the sender left off. NOT for human end-of-day stops (use /apt:pause) and NOT for harness auto-compact (the query loop handles that itself)."
8
+ user_invocable: true
9
+ internal: false
10
+ spawns_agent: false
11
+ agent_name: null
12
+ task_context: none
13
+ default_execution_mode: auto
14
+ execution_modes:
15
+ - auto
16
+ - step
17
+ allowed-tools: "Bash, Read, Write"
18
+ argument-hint: "apt:handoff [what the next session will focus on]"
19
+ gates: []
20
+ ---
21
+ <objective>
22
+ Compact the current conversation into a HANDOFF document so a different agent — different model, different CLI, fan-out peer, or fresh context window — can pick up the work without re-discovering everything you already know.
23
+
24
+ Writes the handoff to `.aperant/handoffs/{id}/HANDOFF.md` (or `{task_dir}/handoffs/{id}/HANDOFF.md` when inside a routed task) so the artifact lives with the repo, survives across machines, and is discoverable by `/apt:resume` and team-status tooling.
25
+
26
+ **Use when:** an agent decides to transfer the work mid-flight. Examples — sender hit context-budget cap, the next phase needs a different model (e.g. Codex for a heavy refactor), a fan-out conductor is sharding scope to peers, or a planning agent is handing a locked plan to an executor.
27
+
28
+ **Do NOT use when:**
29
+ - The human operator wants to stop — use `/apt:pause` (it stashes uncommitted work and updates `CONTINUE_INDEX.md`).
30
+ - The harness is about to auto-compact — the query loop handles that itself; agents executing plans must checkpoint to `build-progress.json` instead.
31
+ - A new task is starting fresh — use `/apt` (router) or `/apt:plan`.
32
+ </objective>
33
+
34
+ <your_environment>
35
+ - **Working directory:** The project root (or current task worktree if `state.active_tasks[taskId].worktree_path` is set)
36
+ - **apt-tools path:** `node packages/framework/bin/apt-tools.mjs` or the locally installed `apt-tools` binary
37
+ - **Constitution:** Read `AGENTS.md` in the project root if it exists
38
+ - **Handoff index:** `.aperant/HANDOFFS_INDEX.md`
39
+ - **Sibling skills:** `/apt:pause` (human stop), `/apt:resume` (restore from CONTINUE *or* HANDOFF), `/apt:fan-out` (parallel peers)
40
+ </your_environment>
41
+
42
+ <state_files>
43
+ ## State Files
44
+
45
+ **Reads:**
46
+ - `AGENTS.md` — Project constitution
47
+ - Active Aperant artifacts for the current task, if any:
48
+ - `{task_dir}/spec.md`, `{task_dir}/implementation_plan.json`, `{task_dir}/build-progress.json`
49
+ - `{task_dir}/qa_signoff.json`, `{task_dir}/review.json`
50
+ - `.aperant/debug/*/DEBUG.md`, `.aperant/quick/*/TASK.md`
51
+ - Git state (branch, uncommitted changes, recent commits)
52
+ - `.aperant/state.json` — active tasks, worktree paths
53
+
54
+ **Writes:**
55
+ - `{task_dir}/handoffs/{handoff-id}/HANDOFF.md` — if inside a routed task
56
+ - `.aperant/handoffs/{handoff-id}/HANDOFF.md` — if ad-hoc work outside any task
57
+ - `.aperant/HANDOFFS_INDEX.md` — index of all open handoffs
58
+
59
+ **Does NOT touch:**
60
+ - The git working tree. Handoffs are read-only against code. If there are uncommitted changes the sender intends the receiver to keep working on, reference them in the HANDOFF (path + status from `git status --short`) — do NOT stash. Stashing is `/apt:pause` semantics, not `/apt:handoff`.
61
+ </state_files>
62
+
63
+ <process>
64
+
65
+ ## 1. Determine Handoff Location
66
+
67
+ Generate a handoff id: `handoff-{YYYYMMDD-HHMM}-{short-slug-of-next-focus}` (e.g. `handoff-20260522-1430-finish-mcp-token-rotation`).
68
+
69
+ **If inside a routed task** (task_dir is known from the conversation, or `state.json` has an active task for the current branch):
70
+ - Write to `{task_dir}/handoffs/{handoff-id}/HANDOFF.md`
71
+
72
+ **If ad-hoc work** (manual coding, not routed through /apt):
73
+ - Write to `.aperant/handoffs/{handoff-id}/HANDOFF.md`
74
+
75
+ ```bash
76
+ mkdir -p {handoff_dir}
77
+ ```
78
+
79
+ ## 2. Gather Current State
80
+
81
+ ### 2a. Git State
82
+ ```bash
83
+ git branch --show-current
84
+ git status --short
85
+ git log --oneline -5
86
+ git stash list
87
+ ```
88
+
89
+ ### 2b. Active Aperant Artifacts
90
+ Check and read status of any of: `implementation_plan.json`, `build-progress.json`, `qa_signoff.json`, `review.json`, `.aperant/debug/*/DEBUG.md`.
91
+
92
+ ### 2c. Conversation Context
93
+ From the current conversation, extract:
94
+ - What task was being worked on and the user's framing of why
95
+ - Key decisions made + rationale (especially decisions NOT obvious from the diff)
96
+ - What was tried, what worked, what failed and why
97
+ - Live blockers and open questions
98
+ - Any external state the receiver must check (running processes, deployed previews, CI runs, MCP server sessions)
99
+
100
+ ## 3. Write HANDOFF.md
101
+
102
+ Create `{handoff_dir}/HANDOFF.md`:
103
+
104
+ ```markdown
105
+ # Handoff: {one-line summary of what the next agent should focus on}
106
+
107
+ ## Session Info
108
+ - **Date:** {ISO datetime}
109
+ - **Sender:** {model + CLI, e.g. "Claude Opus 4.7 / Claude Code"}
110
+ - **Suggested receiver:** {model + CLI hint, or "any agent"}
111
+ - **Branch:** {current branch}
112
+ - **Worktree:** {worktree_path if task-isolated, else repo root}
113
+ - **Last commit:** {hash} — {message}
114
+ - **Task ID:** {task-id, if routed task; else "ad-hoc"}
115
+
116
+ ## Focus For The Receiver
117
+ {The single most important paragraph — what is the receiver supposed to DO next, in concrete terms. If the user passed args to /apt:handoff, that text drives this section.}
118
+
119
+ ## What Was Being Done
120
+ {Plain-language description of the current activity and how it fits the broader task.}
121
+
122
+ ## Decisions Made (do NOT relitigate)
123
+ - {decision 1} — {rationale}
124
+ - {decision 2} — {rationale}
125
+
126
+ ## Existing Artifacts (read these, do not duplicate)
127
+ - `{path or URL}` — {what it contains, why it matters}
128
+ - `{path or URL}` — {what it contains, why it matters}
129
+
130
+ > Reference paths and URLs instead of pasting content. PRDs, plans, ADRs, issues, commits, diffs, /apt:debug DEBUG.md, /apt:design DESIGN.md — link, don't copy.
131
+
132
+ ## Current State
133
+ - **Pipeline stage:** {plan | execute | verify | review | debug | design | quick | none}
134
+ - **Subtask progress:** {n}/{total} (if applicable, with the in-flight subtask id)
135
+ - **Uncommitted changes:** {yes/no — list files, do not stash}
136
+ - **External state the receiver must check:** {running dev servers, open PRs, MCP sessions, etc.}
137
+
138
+ ## Blockers
139
+ - {blocker 1 — what's needed to unblock, and which file/person/check resolves it}
140
+ - (none)
141
+
142
+ ## What Was Tried
143
+ - {approach 1} — {outcome}
144
+ - {approach 2} — {outcome}
145
+
146
+ ## Next Steps (ordered)
147
+ 1. {immediate next action}
148
+ 2. {following action}
149
+ 3. {…}
150
+
151
+ ## Suggested Skills
152
+ Tell the receiver which Aperant skills are likely to fire next. Map verbs to the live `/apt:*` registry — do NOT invent skill names.
153
+
154
+ - `/apt:resume` — first thing the receiver should run to load this handoff into context.
155
+ - `/apt:execute` — if a plan exists and subtasks remain.
156
+ - `/apt:debug` — if the open blocker is a reproducible bug without a known cause.
157
+ - `/apt:spar` — if the next decision wants a second-LLM challenge before committing.
158
+ - `/apt:plan` — if scope changed and the existing plan is stale.
159
+ - (omit any that don't apply)
160
+
161
+ ## Redaction Checklist
162
+ Before saving, scrub the HANDOFF for:
163
+ - [ ] API keys, bearer tokens, OAuth secrets (Anthropic, Stripe, Convex, GitHub, etc.)
164
+ - [ ] Database connection strings with passwords
165
+ - [ ] Personally identifiable information not already in the repo
166
+ - [ ] Internal URLs that should not leave the team
167
+ ```
168
+
169
+ ## 4. Update Handoff Index
170
+
171
+ Update `.aperant/HANDOFFS_INDEX.md`. Create with this header if it does not exist:
172
+ ```markdown
173
+ # Open Handoffs
174
+
175
+ | Focus | Branch | Date | Suggested receiver | Location |
176
+ |-------|--------|------|--------------------|----------|
177
+ ```
178
+
179
+ Append one row:
180
+ ```
181
+ | {focus (truncated to 60 chars)} | {branch} | {YYYY-MM-DD HH:MM} | {model hint or "any"} | {relative path to HANDOFF.md} |
182
+ ```
183
+
184
+ If a row already exists for this handoff path, update it instead of appending.
185
+
186
+ ## 5. Report
187
+
188
+ ```
189
+ Handoff written: {handoff_dir}/HANDOFF.md
190
+
191
+ Summary:
192
+ Focus: {one-line}
193
+ Branch: {branch}
194
+ Pipeline stage: {stage}
195
+ Suggested next skill: {/apt:resume → /apt:{stage}}
196
+ Open handoffs: {total count from index}
197
+
198
+ Receiver picks up with:
199
+ /apt:resume # discovers this handoff via HANDOFFS_INDEX.md
200
+ OR read {handoff_dir}/HANDOFF.md directly
201
+ ```
202
+
203
+ </process>
204
+
205
+ <notes>
206
+ ## Why this skill exists separately from /apt:pause
207
+
208
+ `/apt:pause` and `/apt:handoff` write the same shape of artifact but have different triggers and side effects:
209
+
210
+ | | `/apt:pause` | `/apt:handoff` |
211
+ |---|---|---|
212
+ | Trigger | Human types it | Agent decides mid-work |
213
+ | Audience | Future-you (same human) | A different agent |
214
+ | Uncommitted work | Stashes via `git stash` | Does NOT stash — references in-place |
215
+ | Index file | `.aperant/CONTINUE_INDEX.md` | `.aperant/HANDOFFS_INDEX.md` |
216
+ | Artifact name | `CONTINUE.md` | `HANDOFF.md` |
217
+ | Typical follow-up | Human runs `/apt:resume` hours/days later | Receiver agent runs `/apt:resume` immediately |
218
+
219
+ Keeping the index files separate lets `/apt:resume` distinguish "the human stopped here" from "another agent dropped this in your lap" when presenting recovery options.
220
+
221
+ ## Receiver contract
222
+
223
+ The receiver is expected to:
224
+ 1. Run `/apt:resume` (or read HANDOFF.md directly).
225
+ 2. Load the referenced artifacts (paths under "Existing Artifacts").
226
+ 3. Verify the listed external state still holds (e.g. dev server still running, PR still open).
227
+ 4. Delete the HANDOFF.md and its index row after picking up. `/apt:resume` handles the cleanup automatically; manual readers should do it themselves to keep `HANDOFFS_INDEX.md` from drifting.
228
+ </notes>
@@ -1,11 +1,3 @@
1
- <!--
2
- Adapted from Matt Pocock's MIT-licensed skill suite:
3
- https://github.com/mattpocock/skills/blob/main/skills/engineering/improve-codebase-architecture/DEEPENING.md
4
- Licensed under MIT. Modifications: scoped to Aperant's apt:improve
5
- Phase-1 explore step and aligned with the deletion-test priority
6
- rubric in Phase 2.
7
- -->
8
-
9
1
  # DEEPENING — Domain-modeling depth lens
10
2
 
11
3
  This lens asks: **does this area model the domain at the right depth?**
@@ -1,11 +1,3 @@
1
- <!--
2
- Adapted from Matt Pocock's MIT-licensed skill suite:
3
- https://github.com/mattpocock/skills/blob/main/skills/engineering/improve-codebase-architecture/INTERFACE-DESIGN.md
4
- Licensed under MIT. Modifications: scoped to Aperant's apt:improve
5
- Phase-1 explore step and aligned with apt:review Pass 4's boundary
6
- audit semantics (this lens is proactive; Pass 4 is reactive).
7
- -->
8
-
9
1
  # INTERFACE-DESIGN — Boundary-shape lens
10
2
 
11
3
  This lens asks: **are the boundaries between modules well-shaped?** Are
@@ -1,11 +1,3 @@
1
- <!--
2
- Adapted from Matt Pocock's MIT-licensed skill suite:
3
- https://github.com/mattpocock/skills/blob/main/skills/engineering/improve-codebase-architecture/LANGUAGE.md
4
- Licensed under MIT. Modifications: scoped to Aperant's apt:improve
5
- Phase-1 explore step and aligned with CONTEXT.md's aliases-to-avoid
6
- field — this lens reads that field to catch term conflations.
7
- -->
8
-
9
1
  # LANGUAGE — Naming-consistency lens
10
2
 
11
3
  This lens asks: **does the codebase use the same word for the same
@@ -22,15 +22,15 @@ gates: []
22
22
 
23
23
  # Improve — Proactive Refactor Discovery
24
24
 
25
- Open question #2 in the Pocock adoption spec was answered concretely:
25
+ Open question #2 in adoption spec was answered concretely:
26
26
  `apt:review` Pass 4 (architecture) is strictly **reactive** — it audits
27
27
  the current diff for boundary violations. The work-intent "look at this
28
28
  codebase and tell me what to refactor proactively" has no home today
29
29
  (users retrofit it onto `apt:discuss --brainstorm` or `/apt:roundtable`,
30
30
  both scope-mismatched). This skill is that home.
31
31
 
32
- **Pocock adoption attribution.** 3-phase workflow + DEEPENING /
33
- INTERFACE-DESIGN / LANGUAGE lenses ported from Matt Pocock's MIT-licensed
32
+ **Aperant adoption attribution.** 3-phase workflow + DEEPENING /
33
+ INTERFACE-DESIGN / LANGUAGE lenses ported from
34
34
  `improve-codebase-architecture` skill. Aperant-specific: spawns the
35
35
  `apt-improver` agent and references `apt-discuss/appendices/grill-discipline.md`
36
36
  as the canonical source for the autonomy-aware deepening loop rather than
@@ -118,7 +118,7 @@ The deepening loop produces a concrete refactor plan (which becomes
118
118
  - `INTERFACE-DESIGN.md` — boundary-shape lens
119
119
  - `LANGUAGE.md` — naming-consistency lens
120
120
 
121
- All three are ported from Matt Pocock's improve-codebase-architecture
121
+ All three are ported from 's improve-codebase-architecture
122
122
  skill with MIT attribution per AC15.
123
123
 
124
124
  ## Agent spawned
@@ -19,7 +19,7 @@ execution_modes:
19
19
  - plan-only
20
20
  - research
21
21
  allowed-tools: "Read, Grep, Glob, Write, Bash, WebSearch"
22
- argument-hint: "apt:plan [task description]"
22
+ argument-hint: "apt:plan [task description] [--spar]"
23
23
  gates:
24
24
  - constitution-read
25
25
  - constitution-coverage
@@ -33,7 +33,7 @@ Analyze a task, assess complexity, investigate the codebase, and produce a struc
33
33
  - **apt-tools path:** `node packages/framework/bin/apt-tools.mjs` or the locally installed `apt-tools` binary
34
34
  - **Prompts directory:** Installed alongside this command in the @aperant/framework package
35
35
  - **Constitution:** Read `AGENTS.md` in the project root if it exists — it defines project principles, tech stack, and conventions that override defaults
36
- - **Task directory:** `{task_dir}` — passed from the router. All plan artifacts (spec.md, implementation_plan.json) are written here, NOT to project root.
36
+ - **Task directory:** `{task_dir}` — passed from the router as an absolute main-repo path. All plan artifacts (spec.md, implementation_plan.json) are written here, NOT to project root and NOT to a worktree-local `.aperant/tasks/` directory.
37
37
  </your_environment>
38
38
 
39
39
  <state_files>
@@ -122,9 +122,9 @@ If `{task_dir}/design.md` exists (emitted by a prior `/apt:design` run), load it
122
122
 
123
123
  ## 5. Write Specification
124
124
 
125
- Create `spec.md` in the task directory (`{task_dir}` passed from the router, e.g. `.aperant/tasks/{task-id}/spec.md`).
125
+ Create `spec.md` in the task directory (`{task_dir}` passed from the router, e.g. `/abs/main/repo/.aperant/tasks/{task-id}/spec.md`). Do not use a relative `.aperant/tasks/{task-id}/spec.md` path when the agent is running in a worktree.
126
126
 
127
- **Content format branches on track (Fast Path Guarantee — Pocock adoption ID-05):**
127
+ **Content format branches on track (Fast Path Guarantee — ID-05):**
128
128
 
129
129
  ### 5.A. QUICK track — legacy 4-section format (hard-exempt from PRD upgrade)
130
130
 
@@ -309,7 +309,7 @@ When `status: warn` (non-blocking enforcement) and the user is in **auto mode**
309
309
 
310
310
  Create `implementation_plan.json` in the task directory (`{task_dir}/implementation_plan.json`).
311
311
 
312
- **Subtask schema branches on track (Pocock adoption ID-05 — Fast Path Guarantee).**
312
+ **Subtask schema branches on track.**
313
313
 
314
314
  ### 6.A. QUICK track / SIMPLE complexity — legacy flat subtask schema
315
315
 
@@ -454,6 +454,24 @@ Plan created:
454
454
  Next: /apt:execute
455
455
  ```
456
456
 
457
+ ### 9b. --spar flag (FRAMEWORK-RFC-001)
458
+
459
+ If `$ARGUMENTS` contained `--spar`, dispatch `/apt:spar` against the
460
+ just-written `spec.md` + `implementation_plan.json` before reporting Next.
461
+
462
+ Topic frame: the §1 Scope paragraph from `spec.md` (1-2 sentences). Same
463
+ `--timeout-ms 120000` pipeline-mode budget and NO `--rounds` flag (per
464
+ FRAMEWORK-BUG-038 — pipeline gates always defer to the skill default).
465
+ When merged-config `spar.partner` is set, append `--with <partner>`.
466
+
467
+ ```
468
+ /apt:spar --timeout-ms 120000 [--with <partner>] <topic-frame-from-spec.md-§Scope>
469
+ ```
470
+
471
+ After spar returns, append the termination headline + Layer 2 path
472
+ (`.aperant/spar/<slug>-<ts>.md`) into the report output so the user can
473
+ review findings before invoking `/apt:execute`.
474
+
457
475
  ### 9a. Mode-Aware Compact Suggestion (Human-in-the-Loop Only)
458
476
 
459
477
  Decide whether to show a compact suggestion by reading the **per-task autonomy** from state — not the global default, because the router asks per-task and stores the answer on the task record.
@@ -42,7 +42,7 @@ auto-stamped `terminal_id`.
42
42
 
43
43
  This replaces the earlier markdown-discipline emit step. The earlier
44
44
  step was correctly skipped on QUICK / SIMPLE classified tasks (Fast
45
- Path Guarantee, Pocock adoption ID-05) — moving the emit to a
45
+ Path Guarantee, ID-05) — moving the emit to a
46
46
  framework postcondition makes it work uniformly across QUICK, STANDARD,
47
47
  DEEP, and COMPLEX without violating the Fast Path Guarantee.
48
48
 
@@ -1,11 +1,3 @@
1
- <!--
2
- Adapted from Matt Pocock's MIT-licensed skill suite:
3
- https://github.com/mattpocock/skills/blob/main/skills/engineering/prototype/LOGIC.md
4
- Licensed under MIT. Modifications: scoped to terminal-app prototypes
5
- that validate state machines, protocols, and control flow. Aligned with
6
- the 5 universal rules in apt-prototype/SKILL.md.
7
- -->
8
-
9
1
  # LOGIC branch — Terminal app for state-machine validation
10
2
 
11
3
  When the user's question is about **behavior**, the prototype is a
@@ -29,7 +29,7 @@ planning artifact, NOT a feature, and NOT something to merge. The output
29
29
  is a single-command-runnable prototype that lets the user feel whether
30
30
  the question's answer is "yes" or "no", then gets thrown away.
31
31
 
32
- **Pocock adoption attribution.** Discipline ported from Matt Pocock's
32
+ **Aperant adoption attribution.** Discipline ported from 's
33
33
  MIT-licensed `prototype` skill. Routes between two branches by
34
34
  question-type; the UI branch delegates to Aperant's existing
35
35
  `/apt:mockup` skill for HTML+Tailwind variants. The LOGIC branch and
@@ -70,7 +70,7 @@ If the question is genuinely ambiguous, ask ONE clarifying question
70
70
  ("are you asking about behavior or appearance?") — do NOT enter a long
71
71
  interview.
72
72
 
73
- ## The 5 Universal Rules (Pocock discipline, applies to both branches)
73
+ ## The 5 Universal Rules (Aperant discipline, applies to both branches)
74
74
 
75
75
  These five rules apply to EVERY prototype this skill produces. They are
76
76
  load-bearing — violating them collapses the prototype into ceremony
@@ -109,7 +109,7 @@ disguised as a question.
109
109
  When the question is about behavior / control flow / state machines /
110
110
  protocols:
111
111
 
112
- 1. Read `LOGIC.md` for the discipline (ported from Pocock's
112
+ 1. Read `LOGIC.md` for the discipline (ported from 's
113
113
  `prototype/LOGIC.md` with MIT attribution).
114
114
  2. Write ONE file (e.g., `prototype.mjs`, `prototype.ts`, or
115
115
  `prototype.py`) that:
@@ -126,7 +126,7 @@ protocols:
126
126
 
127
127
  When the question is about layout / aesthetics / flow / discoverability:
128
128
 
129
- 1. Read `UI.md` for the discipline (ported from Pocock's
129
+ 1. Read `UI.md` for the discipline (ported from 's
130
130
  `prototype/UI.md` with MIT attribution).
131
131
  2. Invoke `/apt:mockup --variants 3` as a sub-step. apt:mockup already
132
132
  enforces the UI-specific universal rules (zero-dep Tailwind CDN, no
@@ -1,11 +1,3 @@
1
- <!--
2
- Adapted from Matt Pocock's MIT-licensed skill suite:
3
- https://github.com/mattpocock/skills/blob/main/skills/engineering/prototype/UI.md
4
- Licensed under MIT. Modifications: routed through Aperant's existing
5
- apt:mockup skill rather than a freestanding HTML+Tailwind generator;
6
- aligned with the 5 universal rules in apt-prototype/SKILL.md.
7
- -->
8
-
9
1
  # UI branch — Delegates to apt:mockup
10
2
 
11
3
  When the user's question is about **appearance / layout / flow /
@@ -52,7 +52,37 @@ Execute a small task quickly without full pipeline overhead. For small fixes, do
52
52
 
53
53
  Extract the task description from `$ARGUMENTS`.
54
54
 
55
- Generate a task ID: `quick-{YYYYMMDD}-{short-slug}` (e.g., `quick-20260410-fix-typo`).
55
+ ### 1a. Resolve canonical task id (idempotent)
56
+
57
+ QUICK now produces a canonical state.active_tasks record so `/apt:ship` can find the task via the lite ship profile. The body owns idempotency because `apt-tools task create` does NOT guard against existing ids (see spec §3 R8).
58
+
59
+ Two invocation paths converge here:
60
+
61
+ - **Router path** (`/apt` → `/apt:quick`): the router has already called `task create` and injected `task_id` into your skill context.
62
+ - **Direct path** (`/apt:quick foo`): no `task_id` in context — you create one now.
63
+
64
+ Sequence:
65
+
66
+ 1. **If `task_id` is present in skill context** (router path):
67
+ ```bash
68
+ apt-tools task get . --id {task_id}
69
+ ```
70
+ - If exit 0 AND the returned record has `track === "QUICK"` → reuse, skip the create call.
71
+ - Else (record missing OR wrong track) → call:
72
+ ```bash
73
+ apt-tools task create . --description "$ARGUMENTS" --track QUICK --id {task_id}
74
+ ```
75
+ Parse `task_id` from the returned envelope (it will match the id you passed).
76
+
77
+ 2. **If no `task_id` in skill context** (direct path):
78
+ ```bash
79
+ apt-tools task create . --description "$ARGUMENTS" --track QUICK
80
+ ```
81
+ Parse the generated `task_id` from the envelope — it will be the canonical `{slug}_YY-MM-DD` shape.
82
+
83
+ The task id is now canonical (no more `quick-YYYYMMDD-*` invention). `QuickTaskSchema` accepts both the canonical `{slug}_YY-MM-DD` form and the legacy `quick-YYYYMMDD-{slug}` form for back-compat with already-shipped task records on disk.
84
+
85
+ ### 1b. Create QUICK working directory
56
86
 
57
87
  ```bash
58
88
  mkdir -p .aperant/quick/{task-id}