@aperant/framework 0.7.0 → 0.7.3

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 (151) hide show
  1. package/CHANGELOG.md +180 -0
  2. package/agents/apt-planner.md +12 -0
  3. package/agents/apt-pr-review-fixer.md +13 -9
  4. package/bin/apt-tools.mjs +7 -0
  5. package/dist/cli/ci-watch/stop-matrix.d.mts.map +1 -1
  6. package/dist/cli/ci-watch/stop-matrix.mjs +16 -0
  7. package/dist/cli/ci-watch/stop-matrix.mjs.map +1 -1
  8. package/dist/cli/commands/ci-watch.d.mts +11 -0
  9. package/dist/cli/commands/ci-watch.d.mts.map +1 -1
  10. package/dist/cli/commands/ci-watch.mjs +108 -2
  11. package/dist/cli/commands/ci-watch.mjs.map +1 -1
  12. package/dist/cli/commands/features-audit.d.mts +24 -0
  13. package/dist/cli/commands/features-audit.d.mts.map +1 -1
  14. package/dist/cli/commands/features-audit.mjs +159 -5
  15. package/dist/cli/commands/features-audit.mjs.map +1 -1
  16. package/dist/cli/commands/health-check.d.mts +16 -0
  17. package/dist/cli/commands/health-check.d.mts.map +1 -1
  18. package/dist/cli/commands/health-check.mjs +118 -2
  19. package/dist/cli/commands/health-check.mjs.map +1 -1
  20. package/dist/cli/commands/init.d.mts +9 -0
  21. package/dist/cli/commands/init.d.mts.map +1 -1
  22. package/dist/cli/commands/init.mjs +49 -4
  23. package/dist/cli/commands/init.mjs.map +1 -1
  24. package/dist/cli/commands/modes.d.mts.map +1 -1
  25. package/dist/cli/commands/modes.mjs +11 -0
  26. package/dist/cli/commands/modes.mjs.map +1 -1
  27. package/dist/cli/commands/pr-review-audit-fixer.d.mts +13 -0
  28. package/dist/cli/commands/pr-review-audit-fixer.d.mts.map +1 -1
  29. package/dist/cli/commands/pr-review-audit-fixer.mjs +18 -5
  30. package/dist/cli/commands/pr-review-audit-fixer.mjs.map +1 -1
  31. package/dist/cli/commands/task.d.mts.map +1 -1
  32. package/dist/cli/commands/task.mjs +84 -5
  33. package/dist/cli/commands/task.mjs.map +1 -1
  34. package/dist/cli/commands/validate-evidence.d.mts +24 -2
  35. package/dist/cli/commands/validate-evidence.d.mts.map +1 -1
  36. package/dist/cli/commands/validate-evidence.mjs +154 -17
  37. package/dist/cli/commands/validate-evidence.mjs.map +1 -1
  38. package/dist/cli/commands/vitest-doctor.d.mts +2 -0
  39. package/dist/cli/commands/vitest-doctor.d.mts.map +1 -0
  40. package/dist/cli/commands/vitest-doctor.mjs +168 -0
  41. package/dist/cli/commands/vitest-doctor.mjs.map +1 -0
  42. package/dist/cli/config/gitignore-drift.d.mts +23 -1
  43. package/dist/cli/config/gitignore-drift.d.mts.map +1 -1
  44. package/dist/cli/config/gitignore-drift.mjs +81 -3
  45. package/dist/cli/config/gitignore-drift.mjs.map +1 -1
  46. package/dist/cli/config/load.d.mts +56 -2
  47. package/dist/cli/config/load.d.mts.map +1 -1
  48. package/dist/cli/config/load.mjs +192 -2
  49. package/dist/cli/config/load.mjs.map +1 -1
  50. package/dist/cli/consistency/parse-review.mjs +7 -0
  51. package/dist/cli/consistency/parse-review.mjs.map +1 -1
  52. package/dist/cli/dispatch.d.mts.map +1 -1
  53. package/dist/cli/dispatch.mjs +24 -2
  54. package/dist/cli/dispatch.mjs.map +1 -1
  55. package/dist/cli/gate/gates/gitignore-in-sync.d.mts +1 -1
  56. package/dist/cli/gate/gates/gitignore-in-sync.d.mts.map +1 -1
  57. package/dist/cli/gate/gates/gitignore-in-sync.mjs +5 -2
  58. package/dist/cli/gate/gates/gitignore-in-sync.mjs.map +1 -1
  59. package/dist/cli/gate/gates/review-clean.d.mts +5 -1
  60. package/dist/cli/gate/gates/review-clean.d.mts.map +1 -1
  61. package/dist/cli/gate/gates/review-clean.mjs +23 -18
  62. package/dist/cli/gate/gates/review-clean.mjs.map +1 -1
  63. package/dist/cli/gate/gates/verify-approved.d.mts +49 -1
  64. package/dist/cli/gate/gates/verify-approved.d.mts.map +1 -1
  65. package/dist/cli/gate/gates/verify-approved.mjs +93 -14
  66. package/dist/cli/gate/gates/verify-approved.mjs.map +1 -1
  67. package/dist/cli/help.d.mts.map +1 -1
  68. package/dist/cli/help.mjs +7 -2
  69. package/dist/cli/help.mjs.map +1 -1
  70. package/dist/cli/install/runtime-detect.d.mts +13 -0
  71. package/dist/cli/install/runtime-detect.d.mts.map +1 -1
  72. package/dist/cli/install/runtime-detect.mjs +9 -0
  73. package/dist/cli/install/runtime-detect.mjs.map +1 -1
  74. package/dist/cli/task/index-md.d.mts.map +1 -1
  75. package/dist/cli/task/index-md.mjs +14 -2
  76. package/dist/cli/task/index-md.mjs.map +1 -1
  77. package/dist/plugin/.claude-plugin/plugin.json +11 -2
  78. package/dist/plugin/agents/apt-improver.md +99 -0
  79. package/dist/plugin/agents/apt-planner.md +127 -10
  80. package/dist/plugin/agents/apt-pr-review-fixer.md +13 -9
  81. package/dist/plugin/skills/apt/SKILL.md +1 -0
  82. package/dist/plugin/skills/apt-close-task/SKILL.md +63 -1
  83. package/dist/plugin/skills/apt-debug/SKILL.md +39 -6
  84. package/dist/plugin/skills/apt-debug/appendices/diagnose-discipline.md +119 -0
  85. package/dist/plugin/skills/apt-diagram/SKILL.md +378 -0
  86. package/dist/plugin/skills/apt-diagram/appendices/design-discipline.md +97 -0
  87. package/dist/plugin/skills/apt-discuss/SKILL.md +72 -5
  88. package/dist/plugin/skills/apt-discuss/appendices/grill-discipline.md +104 -0
  89. package/dist/plugin/skills/apt-discuss/appendices/zoom-out-helper.md +79 -0
  90. package/dist/plugin/skills/apt-execute/SKILL.md +57 -5
  91. package/dist/plugin/skills/apt-execute/appendices/tdd-mode.md +107 -0
  92. package/dist/plugin/skills/apt-improve/DEEPENING.md +84 -0
  93. package/dist/plugin/skills/apt-improve/INTERFACE-DESIGN.md +97 -0
  94. package/dist/plugin/skills/apt-improve/LANGUAGE.md +104 -0
  95. package/dist/plugin/skills/apt-improve/SKILL.md +141 -0
  96. package/dist/plugin/skills/apt-plan/SKILL.md +171 -4
  97. package/dist/plugin/skills/apt-plan/adapters/conductor.md +98 -0
  98. package/dist/plugin/skills/apt-pr-review/SKILL.md +57 -18
  99. package/dist/plugin/skills/apt-prototype/LOGIC.md +109 -0
  100. package/dist/plugin/skills/apt-prototype/SKILL.md +143 -0
  101. package/dist/plugin/skills/apt-prototype/UI.md +90 -0
  102. package/dist/plugin/skills/apt-quick/SKILL.md +49 -8
  103. package/dist/plugin/skills/apt-release-notes/SKILL.md +193 -0
  104. package/dist/plugin/skills/apt-release-notes/appendices/persona-voice.md +59 -0
  105. package/dist/plugin/skills/apt-review/SKILL.md +2 -0
  106. package/dist/plugin/skills/apt-run/SKILL.md +32 -4
  107. package/dist/plugin/skills/apt-setup/SKILL.md +308 -6
  108. package/dist/plugin/skills/apt-ship/SKILL.md +122 -1
  109. package/dist/plugin/skills/apt-spar/SKILL.md +315 -0
  110. package/dist/plugin/skills/apt-triage/AGENT-BRIEF.md +84 -0
  111. package/dist/plugin/skills/apt-triage/OUT-OF-SCOPE.md +75 -0
  112. package/dist/plugin/skills/apt-triage/SKILL.md +169 -0
  113. package/dist/plugin/skills/apt-update/SKILL.md +77 -10
  114. package/dist/plugin/skills/apt-verify/SKILL.md +3 -0
  115. package/dist/plugin/skills/apt-verify-proof/SKILL.md +10 -5
  116. package/dist/plugin/skills/apt-watch-ci/SKILL.md +166 -0
  117. package/dist/plugin/skills/apt-zoom-out/SKILL.md +130 -0
  118. package/package.json +133 -133
  119. package/prompts/conductor-framework-context.md +63 -0
  120. package/prompts/conductor-system.md +11 -0
  121. package/skills/apt-close-task/SKILL.md +1 -0
  122. package/skills/apt-discuss/SKILL.md +47 -5
  123. package/skills/apt-execute/SKILL.md +9 -0
  124. package/skills/apt-plan/SKILL.md +12 -0
  125. package/skills/apt-pr-review/SKILL.md +11 -2
  126. package/skills/apt-quick/SKILL.md +19 -8
  127. package/skills/apt-researcher.md +1 -0
  128. package/skills/apt-setup/SKILL.md +33 -2
  129. package/skills/apt-verify-proof/SKILL.md +7 -5
  130. package/src/cli/ci-watch/stop-matrix.mjs +17 -0
  131. package/src/cli/commands/ci-watch.mjs +113 -2
  132. package/src/cli/commands/features-audit.mjs +164 -5
  133. package/src/cli/commands/health-check.mjs +115 -2
  134. package/src/cli/commands/init.mjs +52 -4
  135. package/src/cli/commands/modes.mjs +11 -0
  136. package/src/cli/commands/pr-review-audit-fixer.mjs +18 -5
  137. package/src/cli/commands/task.mjs +83 -5
  138. package/src/cli/commands/validate-evidence.mjs +158 -17
  139. package/src/cli/commands/vitest-doctor.mjs +173 -0
  140. package/src/cli/config/gitignore-drift.mjs +74 -3
  141. package/src/cli/config/load.mjs +188 -2
  142. package/src/cli/consistency/parse-review.mjs +6 -0
  143. package/src/cli/dispatch.mjs +23 -2
  144. package/src/cli/gate/gates/gitignore-in-sync.mjs +5 -2
  145. package/src/cli/gate/gates/review-clean.mjs +24 -19
  146. package/src/cli/gate/gates/verify-approved.mjs +97 -14
  147. package/src/cli/help.mjs +7 -2
  148. package/src/cli/install/runtime-detect.mjs +9 -0
  149. package/src/cli/task/index-md.mjs +15 -2
  150. package/templates/config.json +2 -7
  151. package/workflows/verify-proof.md +8 -3
@@ -0,0 +1,193 @@
1
+ ---
2
+ name: apt:release-notes
3
+ description: "Persona-aware user-facing release notes — draft, compile, publish"
4
+ apt-skill-version: {{APT_VERSION}}
5
+ stage: ops
6
+ intent: capture
7
+ when_to_use: "The user wants to draft, compile, or publish persona-aware user-facing release notes for a project that opted in via /apt:setup."
8
+ user_invocable: true
9
+ internal: false
10
+ spawns_agent: false
11
+ agent_name: null
12
+ task_context: none
13
+ default_track: DEEP
14
+ default_execution_mode: auto
15
+ execution_modes:
16
+ - auto
17
+ - step
18
+ allowed-tools: "Bash, Read, Write, Edit, Grep, Glob"
19
+ argument-hint: "apt:release-notes [--draft --pr <n> | --compile <tag> | --publish <tag>]"
20
+ gates: []
21
+ ---
22
+
23
+ <objective>
24
+ Produce user-facing release notes for a project that opted in via
25
+ `/apt:setup` → Batch 9 → "Publish user-facing release notes? Yes". This
26
+ skill is separate from `/apt:docs changelog` — the dev-flavored
27
+ `CHANGELOG.md` surface stays its responsibility; this skill owns the
28
+ persona-voice-tuned narrative that ships to end users.
29
+
30
+ Three modes:
31
+
32
+ - `--draft --pr <n>` — write a per-PR fragment file (towncrier-style).
33
+ Usually called automatically by `/apt:close-task` on merge; rarely
34
+ invoked by hand.
35
+ - `--compile <tag>` — at release time, read every accumulated fragment,
36
+ filter by the configured persona tier, write a single per-tag
37
+ narrative file, and clear the unreleased dir.
38
+ - `--publish <tag>` — shell `gh release create/edit` to push the
39
+ compiled body to the GitHub Release.
40
+
41
+ Rules of the road (locked):
42
+
43
+ - **Per-project opt-in (spec ID-7).** Presence of `.aperant/personas.json`
44
+ does NOT auto-enable this skill. The toggle is
45
+ `config.changelog.release_notes.enabled` — opt-in is explicit via
46
+ `/apt:setup` Batch 9.
47
+ - **No LLM calls in the CLI (spec ID-3).** The deterministic verbs
48
+ (`apt-tools release-notes draft|compile|publish`) handle file I/O only.
49
+ Persona-voice tuning is authored by you — the host LLM — using the
50
+ `appendices/persona-voice.md` loader.
51
+ - **Triage bucket is non-negotiable (spec ID-6).** Fragments without a
52
+ recognized persona tag MUST surface in a `## Needs Triage` section at
53
+ compile time. Never silent-drop. This is the human curator's safety
54
+ net against trust collapse over time.
55
+ - **Fast Path Guarantee (CLAUDE.md).** This skill is DEEP-track-only
56
+ surface area. `/apt:quick` never enters this skill; the
57
+ `apt-release-notes-quick-exempt.test.ts` regression test pins the
58
+ exemption.
59
+ </objective>
60
+
61
+ <your_environment>
62
+ - **Working directory:** The project root
63
+ - **apt-tools path:** `node packages/framework/bin/apt-tools.mjs` or the locally installed `apt-tools` binary.
64
+ - **gh CLI dependency:** required only for `--publish`. The `publish` verb returns a graceful `{status: 'skipped', reason: 'gh-not-found'}` envelope when `gh` is unavailable — the skill never crashes the host on a missing binary.
65
+ - **Output:** `docs/releases/_unreleased/PR-<n>.md` (fragments) + `docs/releases/<tag>.md` (compiled) + GitHub Release body (when published).
66
+ </your_environment>
67
+
68
+ <state_files>
69
+ ## State Files
70
+
71
+ **Reads:**
72
+ - `.aperant/config.json` — `changelog.release_notes.{enabled, output_dir, persona_filter, require_pr_field}` and the stage blocks.
73
+ - `.aperant/personas.json` — persona roster + tier; used by `compile` to filter fragments.
74
+ - `docs/releases/_unreleased/PR-*.md` — fragments accumulated since the last tag.
75
+ - `PROJECT.md` (when present) — Core Value section feeds the hero narrative the host LLM authors at compile time.
76
+
77
+ **Writes:**
78
+ - `docs/releases/_unreleased/PR-<n>.md` — towncrier-style fragments (draft mode).
79
+ - `docs/releases/<tag>.md` — per-tag compiled narrative (compile mode).
80
+ - GitHub Release body via `gh release create/edit` (publish mode).
81
+ </state_files>
82
+
83
+ <process>
84
+
85
+ ## 0. Hard-Gate + Opt-in Check
86
+
87
+ No hard gates (`gates: []`). Before running ANY mode, confirm the project opted in:
88
+
89
+ ```bash
90
+ rn_enabled=$(jq -r '.changelog.release_notes.enabled // false' .aperant/config.json)
91
+ if [ "$rn_enabled" != "true" ]; then
92
+ echo "[apt:release-notes] This project has not opted into user-facing release notes."
93
+ echo " Run /apt:setup → 'Changelog & Release Notes' to enable."
94
+ exit 0
95
+ fi
96
+ ```
97
+
98
+ When opted out, exit cleanly — never crash, never write any file.
99
+
100
+ ## 1. Parse Flags
101
+
102
+ The skill's three modes are mutually exclusive. Parse `$ARGUMENTS`:
103
+
104
+ - `--draft --pr <n> --note "<text>" [--persona <name>] [--commits <sha,sha,...>] [--date <YYYY-MM-DD>]` → Draft mode (§2).
105
+ - `--compile <tag>` → Compile mode (§3).
106
+ - `--publish <tag> [--dry-run]` → Publish mode (§4).
107
+
108
+ If no mode flag is passed, display a short usage message and exit.
109
+
110
+ ## 2. Draft Mode
111
+
112
+ Used to write a per-PR fragment. Usually this is called automatically by `/apt:close-task` on merge (see `apt-close-task/SKILL.md` §2.6), but it can be invoked by hand for backfills or for manual fragments.
113
+
114
+ Hand the inputs to the deterministic CLI:
115
+
116
+ ```bash
117
+ node packages/framework/bin/apt-tools.mjs release-notes draft . \
118
+ --pr {pr_number} \
119
+ --note "{one-sentence user-impact note}" \
120
+ [--persona {persona-name}] \
121
+ [--date {ISO-date}]
122
+ ```
123
+
124
+ The CLI is idempotent — re-running with identical inputs returns `{status: 'ok', written: false, reason: 'no-change'}`. Trust the envelope; do NOT manually inspect the file before running.
125
+
126
+ When you (the host LLM) compose the note, consult `appendices/persona-voice.md` for the persona-voice posture loader. The fragment goes into the user-facing pipeline; voice-tune accordingly.
127
+
128
+ ## 3. Compile Mode
129
+
130
+ Used at release time to fold every accumulated fragment into a single per-tag narrative. The CLI does the deterministic work — your job is the narrative pass on the compiled body if the user wants polish beyond the structured per-PR list.
131
+
132
+ ```bash
133
+ node packages/framework/bin/apt-tools.mjs release-notes compile . --tag {tag}
134
+ ```
135
+
136
+ The envelope reports:
137
+
138
+ ```json
139
+ {
140
+ "status": "ok",
141
+ "command": "release-notes-compile",
142
+ "tag": "{tag}",
143
+ "path": "docs/releases/{tag}.md",
144
+ "fragments_total": N,
145
+ "fragments_in_body": M,
146
+ "fragments_in_triage": K,
147
+ "fragments_filtered": F,
148
+ "cleared_unreleased": true
149
+ }
150
+ ```
151
+
152
+ If `fragments_in_triage > 0`, ALERT the user before proceeding to publish — those fragments need persona curation. Offer two options:
153
+
154
+ 1. Edit the compiled file directly to move triage entries into the right tier section (and re-tag the persona in the original PR if appropriate).
155
+ 2. Proceed to publish with the triage section intact — sometimes the right call when the unmapped change is genuinely cross-cutting.
156
+
157
+ If `fragments_total === 0`, gently note that there's nothing to compile yet (likely the user hasn't merged any PRs since the last release).
158
+
159
+ ## 4. Publish Mode
160
+
161
+ Push the compiled body to the GitHub Release:
162
+
163
+ ```bash
164
+ node packages/framework/bin/apt-tools.mjs release-notes publish . --tag {tag}
165
+ ```
166
+
167
+ The CLI handles both `gh release create` (new release) and `gh release edit` (existing release). When `gh` is not on PATH, the envelope returns `{status: 'skipped', reason: 'gh-not-found'}` — surface the message to the user and suggest installing the GitHub CLI.
168
+
169
+ For local-only verification, pass `--dry-run` to skip the network call and just confirm the body file exists.
170
+
171
+ ## 5. Re-invocation
172
+
173
+ Each mode is safe to re-run:
174
+
175
+ - `draft` — idempotent per spec AC2.
176
+ - `compile` — overwrites `<tag>.md` and re-clears `_unreleased/`. Running compile twice in a row with no new fragments produces an empty body — careful.
177
+ - `publish` — `gh release edit` is the second call's branch, so the GitHub Release body is replaced cleanly.
178
+
179
+ </process>
180
+
181
+ <appendices>
182
+ - `appendices/persona-voice.md` — Aperant-authored posture loader for voice-tuning the note text per persona archetype.
183
+ </appendices>
184
+
185
+ <integration>
186
+ | Skill | How it interacts |
187
+ |-------|------------------|
188
+ | `/apt:setup` Batch 9 | Writes the opt-in toggle + audience + persona-filter that this skill reads. |
189
+ | `/apt:ship` §2.6 | Auto-drafts the `Release note: …` line in the PR body BEFORE this skill runs; ship blocks if `require_pr_field=true` AND no signal. |
190
+ | `/apt:close-task` §2.6 | Invokes `apt-tools release-notes draft` on merge — drops the per-PR fragment automatically. |
191
+ | `/apt:docs changelog` | The dev-flavored sibling. Stays its own surface; this skill does NOT touch `CHANGELOG.md`. |
192
+ | `/apt:personas` | Produces the `.aperant/personas.json` roster that compile mode filters against. |
193
+ </integration>
@@ -0,0 +1,59 @@
1
+ # Persona-voice posture loader
2
+
3
+ Aperant-authored posture loader consumed by `apt-release-notes/SKILL.md`.
4
+ Per the CLAUDE.md `appendices/` convention, this file augments the parent
5
+ skill's context — it is NOT independently router-invocable.
6
+
7
+ ## Why this exists
8
+
9
+ The dev `CHANGELOG.md` (owned by `/apt:docs changelog`) describes WHAT
10
+ changed in engineering terms: file paths, function names, task IDs,
11
+ schema bumps. Release notes describe WHY the change matters to a
12
+ specific human. Same merge, different voice. The release-notes pipeline
13
+ hands you a structured fragment payload — your job is to tune the prose
14
+ so the line reads like product-marketing copy for the persona, not like
15
+ a commit message with the prefix stripped.
16
+
17
+ ## Posture rules (apply when composing a `Release note: …` line)
18
+
19
+ 1. **Verb first.** Start with the user's outcome — "See your shipped
20
+ builds in one tab" — not the implementation ("Added a `/builds` tab
21
+ to the dashboard"). The reader doesn't care that you added a tab;
22
+ they care that they can now see builds.
23
+ 2. **Persona-specific framing.**
24
+ - **End-user persona (audience: `end-user`)** — plain language, no
25
+ jargon. Avoid framework names, file paths, API endpoint paths.
26
+ One sentence. Concrete value.
27
+ - **Developer / API persona (audience: `developer-api`)** — API + SDK
28
+ semantics are the value proposition. Naming a new method is good.
29
+ Linking the migration page is good. Don't hide the implementation
30
+ details; they ARE the user-visible surface for this persona.
31
+ - **Internal-team persona (audience: `internal-team`)** — lighter
32
+ polish, faster cadence. One sentence is still ideal but the
33
+ internal team is fine with a touch of process-jargon ("we now
34
+ auto-rotate session tokens") when it conveys real value.
35
+ 3. **Triage bucket is your friend.** If you don't have strong signal
36
+ for the persona's framing — leave the line in the form the auto-draft
37
+ produced. The compile step will surface it under `## Needs Triage`
38
+ and the human curator can decide whether to ship it. Forced
39
+ confidence in the note voice is a regression class.
40
+ 4. **Tone matches the persona's archetype.** "The Vibe Coder" persona
41
+ wants energy ("Now you can branch off any session in one click").
42
+ "The Reviewer" persona wants precision ("Branch-from-session now
43
+ preserves your review queue with exact ordering"). Read the
44
+ archetype field in personas.json before composing.
45
+ 5. **No emoji unless the project's design taste explicitly calls for
46
+ it.** Aperant's house style is restrained; consumer-facing apps with
47
+ "playful" design tokens may differ — defer to the project's design
48
+ brief if one exists.
49
+
50
+ ## What this loader does NOT cover
51
+
52
+ - Compile-time narrative beyond the per-PR sentence — that's the host
53
+ LLM's wider job at `/apt:release-notes --compile`, informed by
54
+ `PROJECT.md` Core Value, the personas roster, and the structured
55
+ per-tier sections the compiler writes.
56
+ - Translating between audience values — picking the right audience is
57
+ set at `/apt:setup` Batch 9 time. The audience field doesn't change
58
+ mid-release; voice changes only at the per-fragment level inside the
59
+ audience already chosen.
@@ -18,6 +18,8 @@ allowed-tools: "Read, Bash, Grep, Glob"
18
18
  argument-hint: "apt:review [--skip-docs | --fix-all]"
19
19
  gates:
20
20
  - verify-approved
21
+ config_keys:
22
+ - pipeline.skip_review
21
23
  ---
22
24
  <objective>
23
25
  Review the code produced by a task's execution, analyzing logic, security, quality, architecture, and performance. Fix all findings. Update task documentation. Report what's next.
@@ -17,10 +17,13 @@ execution_modes:
17
17
  - plan-mode
18
18
  - plan-only
19
19
  allowed-tools: "Bash, Read, Write, Edit, Grep, Glob, Task"
20
- argument-hint: "apt:run [task description] [--skip-review]"
20
+ argument-hint: "apt:run [task description] [--skip-review] [--phase-mode auto|agent-team|sub-agents|sequential]"
21
21
  gates:
22
22
  - constitution-read
23
23
  - constitution-coverage
24
+ config_keys:
25
+ - parallelization.enabled
26
+ - parallelization.max_agents
24
27
  ---
25
28
  <objective>
26
29
  Run the full Aperant pipeline: plan a task, execute all subtasks, verify the implementation, and optionally review the code. This is the one-command experience — from task description to verified, reviewed code.
@@ -63,12 +66,14 @@ node packages/framework/bin/apt-tools.mjs state .
63
66
 
64
67
  ## 1b. Resolve Orchestration Mode
65
68
 
66
- Run reconcile to determine the effective orchestration strategy for this pipeline run:
69
+ Run reconcile to determine the effective orchestration strategy for this pipeline run. Pass the task's track via `--track <quick|standard|deep>` so per-track defaults from `.aperant/config.json:orchestration.per_track` apply (roundtable 2026-05-14 R7):
67
70
 
68
71
  ```bash
69
- node packages/framework/bin/apt-tools.mjs reconcile .
72
+ node packages/framework/bin/apt-tools.mjs reconcile . --track {track}
70
73
  ```
71
74
 
75
+ **Per-invocation override:** if the user passed `--phase-mode {auto|agent-team|sub-agents|sequential}` on the invocation, use that value as `PHASE_MODE` directly (it wins over both `per_track` and the global `phase_delegation`). Still call reconcile so `review_mode` and `debate_mode` are resolved against host capabilities.
76
+
72
77
  Parse the result and display:
73
78
 
74
79
  ```
@@ -81,7 +86,7 @@ If `downgrades` is present in the result, display each downgrade warning:
81
86
  [APT] Warning: {downgrade.field} requested '{downgrade.requested}' but host does not support it — using '{downgrade.resolved}'. {downgrade.reason}
82
87
  ```
83
88
 
84
- Store `resolved.phase_delegation` as `PHASE_MODE` for use in the pipeline steps below.
89
+ Store `resolved.phase_delegation` (or the explicit `--phase-mode` override) as `PHASE_MODE` for use in the pipeline steps below.
85
90
 
86
91
  ## 2. Create Feature Branch (or task worktree)
87
92
 
@@ -161,6 +166,19 @@ Execute the apt:execute workflow inline:
161
166
 
162
167
  ## 5. Stage 3 — Verify (apt:verify)
163
168
 
169
+ **De-anchored re-read (PHASE_MODE=sequential only — roundtable 2026-05-14 R2):**
170
+
171
+ When `PHASE_MODE` is `"sequential"` and the same agent that ran Stage 2 is about to run Stage 3 in the same context window, treat the boundary as an attention reset before proceeding. The agent MUST:
172
+
173
+ 1. **Re-read `spec.md` from disk** — do not rely on its in-context summary from earlier in the conversation
174
+ 2. **Re-read the diff from disk** via `git diff {base_branch}...HEAD` — verify what was actually written, not what was intended
175
+ 3. **Adopt adversarial QA posture** — for the duration of Stage 3 you are not the implementer; you are reading this code for the first time, asking "what does this break?" rather than "did I do this right?"
176
+ 4. **Ignore your prior reasoning chain** — the executor's "why I did it this way" rationalization is in-window but MUST NOT anchor the verifier's reading. If a finding conflicts with prior reasoning, prefer the finding
177
+
178
+ This block exists because the roundtable's STANDARD-track de-anchoring relies on prompt-level discipline rather than fresh-context isolation. The exit condition: if verify completeness+correctness scores drop >0.5 points across 10+ STANDARD tasks measured under R6 telemetry, flip `orchestration.per_track.standard` to `"sub-agents"` (R3 — the named fallback preserved from Systems Analyst + Risk Analyst dissent). See `.aperant/roundtables/phase-mode-per-track-20260514/REPORT.md` §Dissenting Views.
179
+
180
+ Sub-agents and agent-team modes skip this block — they get fresh-context isolation by spawning, which makes the de-anchored re-read redundant.
181
+
164
182
  Execute the apt:verify workflow inline:
165
183
 
166
184
  1. Check all subtasks completed
@@ -188,6 +206,16 @@ Stop pipeline (do not proceed to review).
188
206
 
189
207
  **Skip if** `--skip-review` flag is set.
190
208
 
209
+ **De-anchored re-read (PHASE_MODE=sequential only — roundtable 2026-05-14 R2):**
210
+
211
+ Same attention-reset discipline as Stage 3 applies before review starts. In sequential mode the reviewer is the same agent that planned, executed, and verified — the rationalization chain is in-window. Before the 6-pass loop:
212
+
213
+ 1. **Re-read `spec.md` and `qa_signoff.json` from disk** — do not summarize from in-context recall
214
+ 2. **Re-read changed files** at their post-execution state via `git show HEAD:{path}` or direct Read
215
+ 3. **Adopt fresh-reviewer posture** — you are reading this code as if a colleague wrote it, not as if you wrote it. The 6 review passes (logic / security / quality / architecture / performance / docs-coherence) are independent lenses; treat each lens as a fresh adversarial reading
216
+
217
+ Pattern reference: `packages/core/src/workflows/sparring/engine.ts` implements this exact discipline for sparring reviewers (fresh `streamText` per lens, lens prompt in system slot). This SKILL.md block is the same idea applied to verify/review in a single-context pipeline.
218
+
191
219
  Execute the apt:review workflow inline (see `apt-review/SKILL.md`):
192
220
 
193
221
  1. Load context — spec, QA results, constitution