@aperant/framework 0.6.3 → 0.6.5

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 (244) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/README.md +64 -10
  3. package/agents/apt-improver.md +99 -0
  4. package/agents/apt-planner.md +115 -10
  5. package/dist/__test-helpers/run-cmd.d.mts +4 -2
  6. package/dist/__test-helpers/run-cmd.d.mts.map +1 -1
  7. package/dist/__test-helpers/run-cmd.mjs +56 -15
  8. package/dist/__test-helpers/run-cmd.mjs.map +1 -1
  9. package/dist/cli/artifacts/classification.d.mts.map +1 -1
  10. package/dist/cli/artifacts/classification.mjs +10 -0
  11. package/dist/cli/artifacts/classification.mjs.map +1 -1
  12. package/dist/cli/ci-watch/lock.d.mts +53 -0
  13. package/dist/cli/ci-watch/lock.d.mts.map +1 -0
  14. package/dist/cli/ci-watch/lock.mjs +172 -0
  15. package/dist/cli/ci-watch/lock.mjs.map +1 -0
  16. package/dist/cli/ci-watch/state.d.mts +36 -0
  17. package/dist/cli/ci-watch/state.d.mts.map +1 -0
  18. package/dist/cli/ci-watch/state.mjs +103 -0
  19. package/dist/cli/ci-watch/state.mjs.map +1 -0
  20. package/dist/cli/ci-watch/stop-matrix.d.mts +58 -0
  21. package/dist/cli/ci-watch/stop-matrix.d.mts.map +1 -0
  22. package/dist/cli/ci-watch/stop-matrix.mjs +164 -0
  23. package/dist/cli/ci-watch/stop-matrix.mjs.map +1 -0
  24. package/dist/cli/cli-wrappers/ci-watch.d.mts +2 -0
  25. package/dist/cli/cli-wrappers/ci-watch.d.mts.map +1 -0
  26. package/dist/cli/cli-wrappers/ci-watch.mjs +9 -0
  27. package/dist/cli/cli-wrappers/ci-watch.mjs.map +1 -0
  28. package/dist/cli/commands/adr.d.mts +5 -0
  29. package/dist/cli/commands/adr.d.mts.map +1 -0
  30. package/dist/cli/commands/adr.mjs +228 -0
  31. package/dist/cli/commands/adr.mjs.map +1 -0
  32. package/dist/cli/commands/ci-watch.d.mts +7 -0
  33. package/dist/cli/commands/ci-watch.d.mts.map +1 -0
  34. package/dist/cli/commands/ci-watch.mjs +465 -0
  35. package/dist/cli/commands/ci-watch.mjs.map +1 -0
  36. package/dist/cli/commands/context.d.mts +7 -0
  37. package/dist/cli/commands/context.d.mts.map +1 -0
  38. package/dist/cli/commands/context.mjs +224 -0
  39. package/dist/cli/commands/context.mjs.map +1 -0
  40. package/dist/cli/commands/event.d.mts.map +1 -1
  41. package/dist/cli/commands/event.mjs +59 -24
  42. package/dist/cli/commands/event.mjs.map +1 -1
  43. package/dist/cli/commands/host-detect.d.mts +1 -1
  44. package/dist/cli/commands/host-detect.d.mts.map +1 -1
  45. package/dist/cli/commands/host-detect.mjs +30 -3
  46. package/dist/cli/commands/host-detect.mjs.map +1 -1
  47. package/dist/cli/commands/init.d.mts.map +1 -1
  48. package/dist/cli/commands/init.mjs +73 -5
  49. package/dist/cli/commands/init.mjs.map +1 -1
  50. package/dist/cli/commands/modes.d.mts +13 -0
  51. package/dist/cli/commands/modes.d.mts.map +1 -0
  52. package/dist/cli/commands/modes.mjs +220 -0
  53. package/dist/cli/commands/modes.mjs.map +1 -0
  54. package/dist/cli/commands/pr-review-audit-fixer.d.mts +41 -2
  55. package/dist/cli/commands/pr-review-audit-fixer.d.mts.map +1 -1
  56. package/dist/cli/commands/pr-review-audit-fixer.mjs +91 -14
  57. package/dist/cli/commands/pr-review-audit-fixer.mjs.map +1 -1
  58. package/dist/cli/commands/route.d.mts.map +1 -1
  59. package/dist/cli/commands/route.mjs +11 -2
  60. package/dist/cli/commands/route.mjs.map +1 -1
  61. package/dist/cli/commands/task.d.mts.map +1 -1
  62. package/dist/cli/commands/task.mjs +136 -6
  63. package/dist/cli/commands/task.mjs.map +1 -1
  64. package/dist/cli/commands/tokens.d.mts.map +1 -1
  65. package/dist/cli/commands/tokens.mjs +150 -6
  66. package/dist/cli/commands/tokens.mjs.map +1 -1
  67. package/dist/cli/commands/triage.d.mts +8 -0
  68. package/dist/cli/commands/triage.d.mts.map +1 -0
  69. package/dist/cli/commands/triage.mjs +259 -0
  70. package/dist/cli/commands/triage.mjs.map +1 -0
  71. package/dist/cli/config/post-merge-sweep.d.mts +18 -0
  72. package/dist/cli/config/post-merge-sweep.d.mts.map +1 -1
  73. package/dist/cli/config/post-merge-sweep.mjs +48 -3
  74. package/dist/cli/config/post-merge-sweep.mjs.map +1 -1
  75. package/dist/cli/consistency/registry.d.mts +11 -0
  76. package/dist/cli/consistency/registry.d.mts.map +1 -1
  77. package/dist/cli/consistency/registry.mjs +13 -0
  78. package/dist/cli/consistency/registry.mjs.map +1 -1
  79. package/dist/cli/coordination/agent-identity.d.mts +9 -0
  80. package/dist/cli/coordination/agent-identity.d.mts.map +1 -1
  81. package/dist/cli/coordination/agent-identity.mjs +11 -0
  82. package/dist/cli/coordination/agent-identity.mjs.map +1 -1
  83. package/dist/cli/coordination/event-log.d.mts +27 -0
  84. package/dist/cli/coordination/event-log.d.mts.map +1 -1
  85. package/dist/cli/coordination/event-log.mjs +72 -2
  86. package/dist/cli/coordination/event-log.mjs.map +1 -1
  87. package/dist/cli/design/frontmatter-schema.d.mts +3 -3
  88. package/dist/cli/design/frontmatter-schema.d.mts.map +1 -1
  89. package/dist/cli/design/frontmatter-schema.mjs +3 -1
  90. package/dist/cli/design/frontmatter-schema.mjs.map +1 -1
  91. package/dist/cli/dispatch.d.mts.map +1 -1
  92. package/dist/cli/dispatch.mjs +14 -1
  93. package/dist/cli/dispatch.mjs.map +1 -1
  94. package/dist/cli/gate/registry.d.mts +11 -0
  95. package/dist/cli/gate/registry.d.mts.map +1 -1
  96. package/dist/cli/gate/registry.mjs +13 -0
  97. package/dist/cli/gate/registry.mjs.map +1 -1
  98. package/dist/cli/help.d.mts.map +1 -1
  99. package/dist/cli/help.mjs +1 -0
  100. package/dist/cli/help.mjs.map +1 -1
  101. package/dist/cli/host/detect.d.mts +1 -0
  102. package/dist/cli/host/detect.d.mts.map +1 -1
  103. package/dist/cli/host/detect.mjs +5 -0
  104. package/dist/cli/host/detect.mjs.map +1 -1
  105. package/dist/cli/route/envelope.d.mts +68 -4
  106. package/dist/cli/route/envelope.d.mts.map +1 -1
  107. package/dist/cli/route/envelope.mjs +140 -103
  108. package/dist/cli/route/envelope.mjs.map +1 -1
  109. package/dist/cli/route/skill-discover.d.mts +11 -0
  110. package/dist/cli/route/skill-discover.d.mts.map +1 -1
  111. package/dist/cli/route/skill-discover.mjs +46 -1
  112. package/dist/cli/route/skill-discover.mjs.map +1 -1
  113. package/dist/cli/skill-author/contract.d.mts +20 -0
  114. package/dist/cli/skill-author/contract.d.mts.map +1 -1
  115. package/dist/cli/skill-author/contract.mjs +27 -0
  116. package/dist/cli/skill-author/contract.mjs.map +1 -1
  117. package/dist/cli/skill-author/skill-template.d.mts.map +1 -1
  118. package/dist/cli/skill-author/skill-template.mjs +4 -3
  119. package/dist/cli/skill-author/skill-template.mjs.map +1 -1
  120. package/dist/cli/task/worktree-cleanup.d.mts +9 -1
  121. package/dist/cli/task/worktree-cleanup.d.mts.map +1 -1
  122. package/dist/cli/task/worktree-cleanup.mjs +190 -9
  123. package/dist/cli/task/worktree-cleanup.mjs.map +1 -1
  124. package/dist/plugin/.claude-plugin/plugin.json +1 -1
  125. package/dist/plugin/agents/apt-planner.md +1 -1
  126. package/dist/plugin/skills/apt/SKILL.md +111 -5
  127. package/dist/plugin/skills/apt-author-skill/SKILL.md +11 -0
  128. package/dist/plugin/skills/apt-bootstrap/SKILL.md +1 -0
  129. package/dist/plugin/skills/apt-classify/SKILL.md +1 -0
  130. package/dist/plugin/skills/apt-close-task/SKILL.md +1 -0
  131. package/dist/plugin/skills/apt-create-docs/SKILL.md +1 -0
  132. package/dist/plugin/skills/apt-debug/SKILL.md +2 -0
  133. package/dist/plugin/skills/apt-design/SKILL.md +2 -0
  134. package/dist/plugin/skills/apt-discuss/SKILL.md +2 -0
  135. package/dist/plugin/skills/apt-docs/SKILL.md +2 -0
  136. package/dist/plugin/skills/apt-execute/SKILL.md +1 -0
  137. package/dist/plugin/skills/apt-mockup/SKILL.md +2 -0
  138. package/dist/plugin/skills/apt-pause/SKILL.md +1 -0
  139. package/dist/plugin/skills/apt-personas/SKILL.md +1 -0
  140. package/dist/plugin/skills/apt-plan/SKILL.md +2 -0
  141. package/dist/plugin/skills/apt-pr-review/SKILL.md +1 -0
  142. package/dist/plugin/skills/apt-quick/SKILL.md +2 -0
  143. package/dist/plugin/skills/apt-resume/SKILL.md +1 -0
  144. package/dist/plugin/skills/apt-review/SKILL.md +1 -0
  145. package/dist/plugin/skills/apt-roadmap/SKILL.md +1 -0
  146. package/dist/plugin/skills/apt-roundtable/SKILL.md +2 -0
  147. package/dist/plugin/skills/apt-run/SKILL.md +1 -0
  148. package/dist/plugin/skills/apt-scan/SKILL.md +1 -0
  149. package/dist/plugin/skills/apt-setup/SKILL.md +1 -0
  150. package/dist/plugin/skills/apt-ship/SKILL.md +6 -5
  151. package/dist/plugin/skills/apt-stress-test/SKILL.md +1 -0
  152. package/dist/plugin/skills/apt-terminal/SKILL.md +1 -0
  153. package/dist/plugin/skills/apt-update/SKILL.md +5 -0
  154. package/dist/plugin/skills/apt-verify/SKILL.md +1 -0
  155. package/dist/plugin/skills/apt-verify-proof/SKILL.md +1 -0
  156. package/dist/types/config.d.ts +85 -0
  157. package/dist/types/config.d.ts.map +1 -1
  158. package/package.json +125 -122
  159. package/prompts/coder.md +2 -0
  160. package/prompts/planner.md +12 -0
  161. package/prompts/spec_writer.md +9 -0
  162. package/skills/apt/SKILL.md +112 -5
  163. package/skills/apt-author-skill/SKILL.md +11 -0
  164. package/skills/apt-bootstrap/SKILL.md +1 -0
  165. package/skills/apt-classify/SKILL.md +1 -0
  166. package/skills/apt-close-task/SKILL.md +33 -1
  167. package/skills/apt-create-docs/SKILL.md +1 -0
  168. package/skills/apt-debug/SKILL.md +41 -6
  169. package/skills/apt-debug/appendices/diagnose-discipline.md +119 -0
  170. package/skills/apt-design/SKILL.md +2 -0
  171. package/skills/apt-diagram/SKILL.md +342 -0
  172. package/skills/apt-diagram/appendices/design-discipline.md +97 -0
  173. package/skills/apt-discuss/SKILL.md +27 -0
  174. package/skills/apt-discuss/appendices/grill-discipline.md +104 -0
  175. package/skills/apt-discuss/appendices/zoom-out-helper.md +79 -0
  176. package/skills/apt-docs/SKILL.md +2 -0
  177. package/skills/apt-execute/SKILL.md +49 -5
  178. package/skills/apt-execute/appendices/tdd-mode.md +107 -0
  179. package/skills/apt-improve/DEEPENING.md +84 -0
  180. package/skills/apt-improve/INTERFACE-DESIGN.md +97 -0
  181. package/skills/apt-improve/LANGUAGE.md +104 -0
  182. package/skills/apt-improve/SKILL.md +141 -0
  183. package/skills/apt-mockup/SKILL.md +2 -0
  184. package/skills/apt-pause/SKILL.md +1 -0
  185. package/skills/apt-personas/SKILL.md +1 -0
  186. package/skills/apt-plan/SKILL.md +149 -4
  187. package/skills/apt-planner.md +42 -1
  188. package/skills/apt-pr-review/SKILL.md +47 -16
  189. package/skills/apt-prototype/LOGIC.md +109 -0
  190. package/skills/apt-prototype/SKILL.md +143 -0
  191. package/skills/apt-prototype/UI.md +90 -0
  192. package/skills/apt-quick/SKILL.md +32 -0
  193. package/skills/apt-resume/SKILL.md +1 -0
  194. package/skills/apt-review/SKILL.md +3 -0
  195. package/skills/apt-roadmap/SKILL.md +1 -0
  196. package/skills/apt-roundtable/SKILL.md +2 -0
  197. package/skills/apt-run/SKILL.md +33 -4
  198. package/skills/apt-scan/SKILL.md +1 -0
  199. package/skills/apt-setup/SKILL.md +129 -2
  200. package/skills/apt-ship/SKILL.md +52 -4
  201. package/skills/apt-stress-test/SKILL.md +1 -0
  202. package/skills/apt-terminal/SKILL.md +1 -0
  203. package/skills/apt-triage/AGENT-BRIEF.md +84 -0
  204. package/skills/apt-triage/OUT-OF-SCOPE.md +75 -0
  205. package/skills/apt-triage/SKILL.md +169 -0
  206. package/skills/apt-update/SKILL.md +3 -0
  207. package/skills/apt-verify/SKILL.md +4 -0
  208. package/skills/apt-verify-proof/SKILL.md +4 -0
  209. package/skills/apt-watch-ci/SKILL.md +163 -0
  210. package/skills/apt-zoom-out/SKILL.md +130 -0
  211. package/src/cli/artifacts/classification.mjs +10 -0
  212. package/src/cli/ci-watch/lock.mjs +178 -0
  213. package/src/cli/ci-watch/state.mjs +103 -0
  214. package/src/cli/ci-watch/stop-matrix.mjs +181 -0
  215. package/src/cli/cli-wrappers/ci-watch.mjs +9 -0
  216. package/src/cli/commands/adr.mjs +243 -0
  217. package/src/cli/commands/ci-watch.mjs +503 -0
  218. package/src/cli/commands/context.mjs +244 -0
  219. package/src/cli/commands/event.mjs +63 -24
  220. package/src/cli/commands/host-detect.mjs +33 -7
  221. package/src/cli/commands/init.mjs +83 -5
  222. package/src/cli/commands/modes.mjs +215 -0
  223. package/src/cli/commands/pr-review-audit-fixer.mjs +95 -16
  224. package/src/cli/commands/route.mjs +11 -2
  225. package/src/cli/commands/task.mjs +152 -18
  226. package/src/cli/commands/tokens.mjs +157 -6
  227. package/src/cli/commands/triage.mjs +277 -0
  228. package/src/cli/config/post-merge-sweep.mjs +49 -3
  229. package/src/cli/consistency/registry.mjs +14 -0
  230. package/src/cli/coordination/agent-identity.mjs +12 -0
  231. package/src/cli/coordination/event-log.mjs +73 -2
  232. package/src/cli/design/frontmatter-schema.mjs +3 -1
  233. package/src/cli/dispatch.mjs +15 -1
  234. package/src/cli/gate/registry.mjs +14 -0
  235. package/src/cli/help.mjs +1 -0
  236. package/src/cli/host/detect.mjs +5 -0
  237. package/src/cli/route/envelope.mjs +140 -106
  238. package/src/cli/route/skill-discover.mjs +46 -1
  239. package/src/cli/skill-author/contract.mjs +29 -0
  240. package/src/cli/skill-author/skill-template.mjs +4 -3
  241. package/src/cli/task/worktree-cleanup.mjs +191 -9
  242. package/templates/adr-format.md +56 -0
  243. package/templates/config.json +4 -0
  244. package/templates/context-format.md +34 -0
@@ -9,6 +9,7 @@ user_invocable: true
9
9
  internal: false
10
10
  spawns_agent: false
11
11
  agent_name: null
12
+ task_context: none
12
13
  default_execution_mode: auto
13
14
  execution_modes:
14
15
  - auto
@@ -9,6 +9,7 @@ user_invocable: true
9
9
  internal: false
10
10
  spawns_agent: false
11
11
  agent_name: null
12
+ task_context: none
12
13
  default_execution_mode: step
13
14
  execution_modes:
14
15
  - auto
@@ -9,6 +9,7 @@ user_invocable: true
9
9
  internal: false
10
10
  spawns_agent: false
11
11
  agent_name: null
12
+ task_context: require-existing
12
13
  default_execution_mode: auto
13
14
  execution_modes:
14
15
  - auto
@@ -288,6 +289,8 @@ Capture the PR URL from the output into `pr_url` (for example, the last line of
288
289
  node packages/framework/bin/apt-tools.mjs task update . --id {task-id} --pr-url {PR_URL}
289
290
  ```
290
291
 
292
+ This same call **atomically flips `lifecycle_phase` from `reviewing` to `shipped-pending-merge`** when the task is in `reviewing` and no explicit `--lifecycle-phase` flag is passed. Section 6 is now the single load-bearing step that both records the PR and transitions the lifecycle; Section 8 below documents the semantics but no longer issues a separate command.
293
+
291
294
  Display the resolution so users see which branch/base was used:
292
295
 
293
296
  ```
@@ -338,7 +341,7 @@ suggest_mode=$(jq -r '.pr_review.suggest_after_ship // "always"' .aperant/config
338
341
  ```
339
342
  [APT:ship] Run /apt:pr-review --pr {pr_number} now for deep multi-agent review? [Y/n]
340
343
  ```
341
- On `Y` (or empty enter), invoke `/apt:pr-review --pr {pr_number}` inline after Section 8 flips the task to `shipped-pending-merge` do NOT block the lifecycle transition. On `N` or any other response, proceed silently to Section 8.
344
+ On `Y` (or empty enter), invoke `/apt:pr-review --pr {pr_number}` inline the task has already been flipped to `shipped-pending-merge` atomically by the `--pr-url` recording in Section 6, so the deep-review hint does NOT need to block on Section 8. On `N` or any other response, proceed silently to Section 8.
342
345
 
343
346
  - **`never`** — silent. Proceed directly to Section 8.
344
347
 
@@ -346,11 +349,9 @@ suggest_mode=$(jq -r '.pr_review.suggest_after_ship // "always"' .aperant/config
346
349
 
347
350
  ## 8. Transition lifecycle to `shipped-pending-merge` (C56 B5)
348
351
 
349
- Ship is NOT the final closer. The PR has just been opened — it won't merge for minutes, hours, or days, and no agent will be present on merge. Instead of closing the task now, flip its lifecycle to `shipped-pending-merge` — the intermediate state between `reviewing` and `completed`. `/apt:close-task` runs post-merge (either manually via `/apt:close-task --all` or by the user when they return to the repo) and performs the actual closeout: phase flip, documentation narration, worktree GC, per-PR config strip, task archive.
352
+ Ship is NOT the final closer. The PR has just been opened — it won't merge for minutes, hours, or days, and no agent will be present on merge. The task lifecycle is now `shipped-pending-merge` — the intermediate state between `reviewing` and `completed`. `/apt:close-task` runs post-merge (either manually via `/apt:close-task --all` or by the user when they return to the repo) and performs the actual closeout: phase flip, documentation narration, worktree GC, per-PR config strip, task archive.
350
353
 
351
- ```bash
352
- node packages/framework/bin/apt-tools.mjs task update . --id {task-id} --lifecycle-phase shipped-pending-merge
353
- ```
354
+ Section 6 already performed this transition atomically as part of `task update --pr-url`. This section documents the semantics; no separate command is required.
354
355
 
355
356
  The task stays in `state.active_tasks[*]` with `lifecycle_phase: "shipped-pending-merge"`. Do NOT call `task close` here — that would mark it `completed` before the PR is actually merged, producing the same artifact drift C56 was built to eliminate.
356
357
 
@@ -9,6 +9,7 @@ user_invocable: true
9
9
  internal: false
10
10
  spawns_agent: false
11
11
  agent_name: null
12
+ task_context: require-existing
12
13
  default_execution_mode: step
13
14
  execution_modes:
14
15
  - auto
@@ -9,6 +9,7 @@ user_invocable: true
9
9
  internal: false
10
10
  spawns_agent: false
11
11
  agent_name: null
12
+ task_context: none
12
13
  default_execution_mode: step
13
14
  execution_modes:
14
15
  - auto
@@ -9,6 +9,7 @@ user_invocable: true
9
9
  internal: false
10
10
  spawns_agent: false
11
11
  agent_name: null
12
+ task_context: none
12
13
  default_execution_mode: auto
13
14
  execution_modes:
14
15
  - auto
@@ -33,6 +34,8 @@ The user invoked `/apt:update` because the statusline showed one of:
33
34
  - `? /apt:update` (dim): package not yet published — you can still re-run the install to refresh from source.
34
35
 
35
36
  The cache file is at `~/.cache/aperant/apt-update-check.json`. It contains `runtimes`, `framework.installed_version`, `framework.latest_version`, `update_available`, `dev_install_ahead`, `not_published`, `stale_files_total`, and per-runtime `stale_files`.
37
+
38
+ **Scope boundary (0.6.1).** `apt:update` refreshes installed runtime files (skills, agents, hooks) only — it does NOT reconcile `.aperant/config.json` against the shipped template. Schema drift (new keys added between framework versions, deprecated values, etc.) is detected and handled at the next `apt-tools init` call: in non-TTY mode `init` exits 2 with a `requires_input` envelope when a Class A setting is unresolved; in TTY mode the upgrade gate prompts for the missing keys before running the runtime install. If you suspect the user's config is out of date, point them at `apt-tools init . --accept-new-defaults` (Class B fills) or `apt-tools init . --yes` (full silent fill); a no-drift run returns `{"status":"up_to_date"}` without re-installing anything.
36
39
  </context>
37
40
 
38
41
  <process>
@@ -67,6 +70,8 @@ Build the flags list from the runtime ids (e.g. `--claude --codex`) and run:
67
70
  node .aperant/deps/node_modules/@aperant/framework/bin/apt-tools.mjs init . <flags>
68
71
  ```
69
72
 
73
+ **Do NOT add `--yes`, `--solo`, `--team`, or any other Class A flag.** This command is meant to refresh runtime files only — adding `--yes` triggers a config schema migration that can silently flip `share.visibility` to `solo` and re-write `.gitignore`, which is exactly the 0.6.0/0.6.1 dogfood bug. If `init` returns a `requires_input` envelope (schema drift), surface it to the user verbatim and stop; let them decide team vs solo with the explicit flag. From 0.6.4 onward `--yes` infers visibility from existing git tracking, but the skill must still not add it — keep this command scoped to runtime refresh.
74
+
70
75
  Parse the init JSON. Capture for each runtime:
71
76
  - `install_root` (shortened to the basename, e.g. `.claude`)
72
77
  - `file_count`
@@ -9,6 +9,7 @@ user_invocable: true
9
9
  internal: false
10
10
  spawns_agent: true
11
11
  agent_name: "apt-verifier"
12
+ task_context: require-existing
12
13
  default_execution_mode: auto
13
14
  execution_modes:
14
15
  - auto
@@ -9,6 +9,7 @@ user_invocable: true
9
9
  internal: false
10
10
  spawns_agent: false
11
11
  agent_name: null
12
+ task_context: require-existing
12
13
  default_execution_mode: auto
13
14
  execution_modes:
14
15
  - auto
@@ -6,6 +6,15 @@
6
6
  */
7
7
  /** Orchestration mode — how the framework delegates work across phases */
8
8
  export type OrchestrationMode = 'auto' | 'agent-team' | 'sub-agents' | 'sequential';
9
+ /** Track-specific orchestration overrides — roundtable 2026-05-14 R7 */
10
+ export interface PerTrackOrchestrationConfig {
11
+ /** QUICK track: small fix / typo / single-file edit. Default 'sequential'. */
12
+ quick?: OrchestrationMode;
13
+ /** STANDARD track: normal feature work. Default 'sequential' per R2. */
14
+ standard?: OrchestrationMode;
15
+ /** DEEP track: multi-package refactor, schema, security. Default 'auto'. */
16
+ deep?: OrchestrationMode;
17
+ }
9
18
  /** Orchestration preferences — how multi-agent workflows are executed */
10
19
  export interface OrchestrationConfig {
11
20
  /** How pipeline phases are delegated (plan → execute → verify → review) */
@@ -14,6 +23,23 @@ export interface OrchestrationConfig {
14
23
  review_mode: OrchestrationMode;
15
24
  /** How roundtable debates are orchestrated (apt:roundtable 10 agents) */
16
25
  debate_mode: OrchestrationMode;
26
+ /**
27
+ * Per-track phase_delegation overrides. When a `--track <quick|standard|deep>`
28
+ * flag is passed to `apt-tools reconcile` AND `per_track[track]` is set, the
29
+ * reconciler uses that value as the requested mode for `phase_delegation`.
30
+ * When unset (the default), the resolver falls back to the global
31
+ * `phase_delegation` field — backward-compatible.
32
+ *
33
+ * Initial defaults (roundtable 2026-05-14 R7):
34
+ * per_track.quick = 'sequential'
35
+ * per_track.standard = 'sequential' (R2 — verify uses de-anchored re-read)
36
+ * per_track.deep = 'auto' (R4 status quo, resolves to agent-team)
37
+ *
38
+ * Exit condition documented in REPORT.md: if STANDARD verify quality drops
39
+ * >0.5 points across 10+ tasks, flip `per_track.standard` to `'sub-agents'`
40
+ * (R3 — the named fallback).
41
+ */
42
+ per_track?: PerTrackOrchestrationConfig;
17
43
  }
18
44
  /** Capabilities reported by host-detect */
19
45
  export interface HostCapabilities {
@@ -144,8 +170,12 @@ export interface AperantConfig {
144
170
  router?: RouterConfig;
145
171
  /** PR-review authorship + round budget (R4 + R5) */
146
172
  pr_review?: PrReviewConfig;
173
+ /** Post-ship CI watcher — `/apt:watch-ci` (C28 / D-07) */
174
+ ci_watch?: CiWatchConfig;
147
175
  /** TDD Iron Law — opt-in red-green-refactor enforcement (C3) */
148
176
  tdd?: TddConfig;
177
+ /** Diagram skill defaults (apt:diagram) — render mode + MCP consent */
178
+ diagram?: DiagramConfig;
149
179
  }
150
180
  /**
151
181
  * TDD Iron Law configuration (C3).
@@ -158,6 +188,29 @@ export interface TddConfig {
158
188
  /** When true, enforce test-first commit order per subtask */
159
189
  iron_law: boolean;
160
190
  }
191
+ /**
192
+ * Diagram skill configuration (apt:diagram v1).
193
+ *
194
+ * `mode` is the persisted default render mode — `file` writes a local
195
+ * `.excalidraw` JSON, `mcp` dispatches to a live Excalidraw MCP canvas.
196
+ * The skill's `--mode=...` invocation flag overrides this at call time.
197
+ *
198
+ * `mcpConsent` is the per-host consent record for MCP mode. Default
199
+ * `null` means no host has been granted consent yet — the skill must
200
+ * prompt and persist on the first MCP-mode invocation. The same host
201
+ * does not re-prompt; a different host invalidates the existing record
202
+ * and re-prompts.
203
+ */
204
+ export interface DiagramConfig {
205
+ /** Resolved default render mode (overridable per-call by --mode=...) */
206
+ mode: 'file' | 'mcp';
207
+ /** Per-host MCP consent record; null means not yet asked */
208
+ mcpConsent: {
209
+ host: string;
210
+ decision: 'granted' | 'denied';
211
+ grantedAt: string;
212
+ } | null;
213
+ }
161
214
  /** Per-host LLM provider settings for router Stage 2 classification */
162
215
  export interface RouterLLMProviderConfig {
163
216
  /** CLI command to invoke (argv[0]). e.g. "claude", "codex", "gemini" */
@@ -218,4 +271,36 @@ export interface PrReviewConfig {
218
271
  */
219
272
  suggest_after_ship?: 'always' | 'ask' | 'never';
220
273
  }
274
+ /**
275
+ * Post-ship CI watcher config (C28 / D-07, D-08).
276
+ *
277
+ * `/apt:watch-ci` polls a freshly-shipped PR's CI on a recurring tick,
278
+ * auto-fixes red checks from first red, pushes the fix, and reschedules
279
+ * itself — bounded by a 5-attempt / 4h wall budget and a 10-trigger stop
280
+ * matrix. See `.aperant/context/notes/framework-post-ship-ci-watcher.md`
281
+ * for the locked D-01..D-08 decisions.
282
+ */
283
+ export interface CiWatchConfig {
284
+ /**
285
+ * Post-ship arming policy controlled by `/apt:ship` Section 7.2:
286
+ * 'auto' — arm the watcher automatically (the default on cron-capable
287
+ * hosts: Claude Code, Pi). On non-cron hosts (Codex, Gemini,
288
+ * OpenCode, etc.) `auto` creates the state file but does not
289
+ * register a host cron; the user advances via `/apt:watch-ci
290
+ * --tick`.
291
+ * 'ask' — prompt `[Y/n]` after ship. Autonomy=3 degrades 'ask' → 'auto'
292
+ * for one fewer prompt in unattended chains.
293
+ * 'never' — silent (the default on non-cron hosts).
294
+ * Absent → ship hook derives the default from host capability.
295
+ */
296
+ after_ship?: 'auto' | 'ask' | 'never';
297
+ /**
298
+ * On all-green CI, auto-merge the PR via `gh pr merge --auto --squash`.
299
+ * Default `false` — the watcher prints a merge hint and leaves the merge
300
+ * decision to the user (matches the user's stated rhythm). Flip to `true`
301
+ * once a calendar week of clean post-launch usage shows zero false-green
302
+ * merges (D-08 kill criteria).
303
+ */
304
+ auto_merge_on_green?: boolean;
305
+ }
221
306
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,0EAA0E;AAC1E,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,YAAY,GAAG,YAAY,GAAG,YAAY,CAAA;AAEnF,yEAAyE;AACzE,MAAM,WAAW,mBAAmB;IACnC,2EAA2E;IAC3E,gBAAgB,EAAE,iBAAiB,CAAA;IACnC,0EAA0E;IAC1E,WAAW,EAAE,iBAAiB,CAAA;IAC9B,yEAAyE;IACzE,WAAW,EAAE,iBAAiB,CAAA;CAC9B;AAED,2CAA2C;AAC3C,MAAM,WAAW,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AA;IAC5C;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAAC,CAAA;IAC3D;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAA;CAC/C;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC7B;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAAA;IACrC;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC7B"}
package/package.json CHANGED
@@ -1,123 +1,126 @@
1
1
  {
2
- "name": "@aperant/framework",
3
- "version": "0.6.3",
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
- "author": "Mikalsen AI <hello@mikalsen.ai>",
6
- "type": "module",
7
- "main": "./dist/index.js",
8
- "types": "./dist/index.d.ts",
9
- "bin": {
10
- "framework": "./bin/apt-tools.mjs",
11
- "apt-tools": "./bin/apt-tools.mjs",
12
- "apt-proof-video": "./bin/apt-proof-video.mjs"
13
- },
14
- "exports": {
15
- ".": {
16
- "types": "./dist/index.d.ts",
17
- "import": "./dist/index.js"
18
- },
19
- "./types": {
20
- "types": "./dist/types/index.d.ts",
21
- "import": "./dist/types/index.js"
22
- },
23
- "./cost": {
24
- "types": "./dist/cost/index.d.ts",
25
- "import": "./dist/cost/index.js"
26
- },
27
- "./mappers": {
28
- "types": "./dist/mappers/index.d.ts",
29
- "import": "./dist/mappers/index.js"
30
- },
31
- "./schemas": {
32
- "types": "./dist/schemas/index.d.ts",
33
- "import": "./dist/schemas/index.js"
34
- },
35
- "./standalone": {
36
- "types": "./dist/standalone/index.d.ts",
37
- "import": "./dist/standalone/index.js"
38
- },
39
- "./design/scan": {
40
- "import": "./src/cli/design/scan.mjs"
41
- },
42
- "./design/extract-repo": {
43
- "import": "./src/cli/design/extract-repo.mjs"
44
- },
45
- "./design/synthesize": {
46
- "import": "./src/cli/design/synthesize.mjs"
47
- }
48
- },
49
- "scripts": {
50
- "build": "tsc && node scripts/extract-personas-schema.mjs",
51
- "dev": "tsc --watch --preserveWatchOutput",
52
- "typecheck": "tsc --noEmit",
53
- "lint": "biome check . --diagnostic-level=error",
54
- "lint:fix": "biome check --write . --diagnostic-level=error",
55
- "clean": "rm -rf dist",
56
- "test": "vitest run",
57
- "c28:cutover": "node scripts/c28-cutover.mjs",
58
- "build-plugin": "node scripts/build-plugin.mjs",
59
- "publish-plugin": "node scripts/publish-plugin.mjs"
60
- },
61
- "files": [
62
- "dist/",
63
- "bin/",
64
- "src/cli/",
65
- "src/cost/",
66
- "commands/",
67
- "skills/",
68
- "agents/",
69
- "prompts/",
70
- "templates/",
71
- "context/",
72
- "workflows/",
73
- "examples/",
74
- "LICENSE",
75
- "README.md",
76
- "CHANGELOG.md",
77
- "!**/__tests__/**",
78
- "!**/*.test.*",
79
- "!**/*.spec.*",
80
- "!**/*.test.d.ts.map",
81
- "!**/*.test.js.map"
82
- ],
83
- "keywords": [
84
- "ai",
85
- "framework",
86
- "coding-assistant",
87
- "claude-code",
88
- "codex",
89
- "aperant"
90
- ],
91
- "license": "AGPL-3.0-only",
92
- "homepage": "https://github.com/Mikalsen-AI/aperant-cloud-desktop/tree/main/packages/framework#readme",
93
- "bugs": {
94
- "url": "https://github.com/Mikalsen-AI/aperant-cloud-desktop/issues"
95
- },
96
- "repository": {
97
- "type": "git",
98
- "url": "https://github.com/Mikalsen-AI/aperant-cloud-desktop.git",
99
- "directory": "packages/framework"
100
- },
101
- "engines": {
102
- "node": ">=18.0.0"
103
- },
104
- "publishConfig": {
105
- "access": "public"
106
- },
107
- "dependencies": {
108
- "@clack/prompts": "^1.2.0",
109
- "proper-lockfile": "^4.1.2",
110
- "yaml": "^2.8.3",
111
- "zod": "^4.3.6"
112
- },
113
- "optionalDependencies": {
114
- "@babel/parser": "^7.29.2",
115
- "@babel/traverse": "^7.29.0",
116
- "@google/genai": "^1.50.1",
117
- "css-tree": "^3.2.1",
118
- "playwright": "^1.59.1"
119
- },
120
- "devDependencies": {
121
- "@vitest/coverage-v8": "^4.1.5"
122
- }
123
- }
2
+ "name": "@aperant/framework",
3
+ "version": "0.6.5",
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
+ "author": "Mikalsen AI <hello@mikalsen.ai>",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "bin": {
10
+ "framework": "./bin/apt-tools.mjs",
11
+ "apt-tools": "./bin/apt-tools.mjs",
12
+ "apt-proof-video": "./bin/apt-proof-video.mjs"
13
+ },
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "import": "./dist/index.js"
18
+ },
19
+ "./types": {
20
+ "types": "./dist/types/index.d.ts",
21
+ "import": "./dist/types/index.js"
22
+ },
23
+ "./cost": {
24
+ "types": "./dist/cost/index.d.ts",
25
+ "import": "./dist/cost/index.js"
26
+ },
27
+ "./mappers": {
28
+ "types": "./dist/mappers/index.d.ts",
29
+ "import": "./dist/mappers/index.js"
30
+ },
31
+ "./schemas": {
32
+ "types": "./dist/schemas/index.d.ts",
33
+ "import": "./dist/schemas/index.js"
34
+ },
35
+ "./standalone": {
36
+ "types": "./dist/standalone/index.d.ts",
37
+ "import": "./dist/standalone/index.js"
38
+ },
39
+ "./design/scan": {
40
+ "import": "./src/cli/design/scan.mjs"
41
+ },
42
+ "./design/extract-repo": {
43
+ "import": "./src/cli/design/extract-repo.mjs"
44
+ },
45
+ "./design/synthesize": {
46
+ "import": "./src/cli/design/synthesize.mjs"
47
+ }
48
+ },
49
+ "files": [
50
+ "dist/",
51
+ "bin/",
52
+ "src/cli/",
53
+ "src/cost/",
54
+ "commands/",
55
+ "skills/",
56
+ "agents/",
57
+ "prompts/",
58
+ "templates/",
59
+ "context/",
60
+ "workflows/",
61
+ "examples/",
62
+ "LICENSE",
63
+ "README.md",
64
+ "CHANGELOG.md",
65
+ "!**/__tests__/**",
66
+ "!**/*.test.*",
67
+ "!**/*.spec.*",
68
+ "!**/*.test.d.ts.map",
69
+ "!**/*.test.js.map"
70
+ ],
71
+ "keywords": [
72
+ "ai",
73
+ "framework",
74
+ "coding-assistant",
75
+ "claude-code",
76
+ "codex",
77
+ "aperant"
78
+ ],
79
+ "license": "AGPL-3.0-only",
80
+ "homepage": "https://github.com/Mikalsen-AI/aperant-cloud-desktop/tree/main/packages/framework#readme",
81
+ "bugs": {
82
+ "url": "https://github.com/Mikalsen-AI/aperant-cloud-desktop/issues"
83
+ },
84
+ "repository": {
85
+ "type": "git",
86
+ "url": "https://github.com/Mikalsen-AI/aperant-cloud-desktop.git",
87
+ "directory": "packages/framework"
88
+ },
89
+ "engines": {
90
+ "node": ">=18.0.0"
91
+ },
92
+ "publishConfig": {
93
+ "access": "public"
94
+ },
95
+ "dependencies": {
96
+ "@clack/prompts": "^1.2.0",
97
+ "proper-lockfile": "^4.1.2",
98
+ "yaml": "^2.8.3",
99
+ "zod": "^4.3.6"
100
+ },
101
+ "optionalDependencies": {
102
+ "@babel/parser": "^7.29.2",
103
+ "@babel/traverse": "^7.29.0",
104
+ "@google/genai": "^1.50.1",
105
+ "css-tree": "^3.2.1",
106
+ "playwright": "^1.59.1"
107
+ },
108
+ "devDependencies": {
109
+ "@vitest/coverage-v8": "^4.1.5"
110
+ },
111
+ "scripts": {
112
+ "build": "tsc && node scripts/extract-personas-schema.mjs",
113
+ "dev": "tsc --watch --preserveWatchOutput",
114
+ "typecheck": "tsc --noEmit",
115
+ "lint": "biome check . --diagnostic-level=error",
116
+ "lint:fix": "biome check --write . --diagnostic-level=error",
117
+ "clean": "rm -rf dist",
118
+ "test": "vitest run",
119
+ "c28:cutover": "node scripts/c28-cutover.mjs",
120
+ "build-plugin": "node scripts/build-plugin.mjs",
121
+ "publish-plugin": "node scripts/publish-plugin.mjs",
122
+ "publish:verdaccio": "node scripts/publish-verdaccio.mjs",
123
+ "release:verdaccio": "pnpm build && pnpm publish:verdaccio",
124
+ "ship:verdaccio": "npm version patch --no-git-tag-version && pnpm build && pnpm publish:verdaccio"
125
+ }
126
+ }
package/prompts/coder.md CHANGED
@@ -4,6 +4,8 @@ You are continuing work on an autonomous development task. This is a **FRESH con
4
4
 
5
5
  **Key Principle**: Work on ONE subtask at a time. Complete it. Verify it. Move on.
6
6
 
7
+ **TDD mode (apt:execute):** if your kickoff prompt indicates `tdd_active === true` (set by `--tdd`, `coding.tdd_default`, or the legacy `tdd.iron_law` config), the red-green-refactor sequence is mandatory and audited by gate G9. Load the vertical-tracer-bullet discipline from `packages/framework/skills/apt-execute/appendices/tdd-mode.md` and follow its 5 rules. QUICK-routed tasks are hard-exempt regardless of flag or config (Fast Path Guarantee, ID-05).
8
+
7
9
  ---
8
10
 
9
11
  ## CRITICAL: ENVIRONMENT AWARENESS
@@ -6,6 +6,18 @@ You are the **first agent** in an autonomous development process. Your job is to
6
6
 
7
7
  **MANDATORY**: You MUST call the **Write** tool to create `implementation_plan.json`. Describing the plan in your text response does NOT count — the orchestrator validates that the file exists on disk and passes schema validation. If you do not call the Write tool, the phase will fail.
8
8
 
9
+ ## TRACK BRANCH — Vertical-slice rubric vs legacy flat schema (Pocock adoption ID-05)
10
+
11
+ Subtask schema depends on track:
12
+
13
+ - **QUICK track / SIMPLE workflow:** legacy flat schema (id, title, description, files, dependencies, status, verification). No `hitl`, `afk`, `acceptance_criteria`, `user_value` fields. Fast Path Guarantee — one-shot tasks pay zero ceremony cost.
14
+ - **STANDARD / DEEP / COMPLEX:** vertical-slice schema. Every subtask MUST carry:
15
+ - `hitl: "required" | "review" | "none"` — `required` blocks executor pending human approval; `review` is post-hoc review; `none` is agent-only.
16
+ - `afk: "safe" | "unsafe"` — `safe` proceeds unattended; `unsafe` pauses if no human present.
17
+ - `acceptance_criteria: string[]` — id-refs (e.g. `"AC1"`, `"AC3"`) into spec.md's `## Acceptance Criteria` section. Every AC in spec.md must be referenced by at least one subtask.
18
+ - `user_value: string` — one-line framing of WHO benefits and HOW. The vertical-slice test: a subtask titled "edit apt-plan SKILL.md" is **horizontal** and wrong; "Solo dogfooder gets a PRD-shaped spec on STANDARD" is **vertical** and right.
19
+ - **Plan-level field:** `vertical_slice_schema_version: "1"` (STANDARD/DEEP only) declares the schema version so future migrations detect v1 plans.
20
+
9
21
  ---
10
22
 
11
23
  ## WHY SUBTASKS, NOT TESTS?
@@ -6,6 +6,15 @@ You are the **Spec Writer Agent** in the Auto-Build spec creation pipeline. Your
6
6
 
7
7
  **MANDATORY**: You MUST call the **Write** tool to create `spec.md`. Describing the spec in your text response does NOT count — the orchestrator validates that the file exists on disk. If you do not call the Write tool, the phase will fail.
8
8
 
9
+ ## TRACK BRANCH (Pocock adoption ID-05 — Fast Path Guarantee)
10
+
11
+ Content format depends on the task's track / complexity:
12
+
13
+ - **QUICK track OR `simple` workflow:** emit the legacy 4-section spec (Overview / Workflow Type / Task Scope / Success Criteria) — this is the QUICK-exempt fast path. Use the existing `spec_quick.md` template; this file's PRD shape does NOT apply.
14
+ - **STANDARD / DEEP / COMPLEX:** emit the PRD-shaped spec.md per the template at the bottom of this file (Problem Statement / Solution / User Stories / Implementation Decisions / Testing Decisions / Out of Scope / Further Notes + `## Acceptance Criteria`). Section ordering is load-bearing — `apt-tools coverage-check validate` and `apt-tools consistency check` grep by header.
15
+
16
+ The remainder of this file describes the STANDARD/DEEP PRD shape. When asked to emit a spec for a SIMPLE/QUICK task, fall back to `spec_quick.md` instead of expanding into PRD.
17
+
9
18
  ---
10
19
 
11
20
  ## YOUR CONTRACT