@aperant/framework 0.6.7 → 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.
- package/CHANGELOG.md +240 -0
- package/agents/apt-planner.md +12 -0
- package/agents/apt-pr-review-fixer.md +13 -9
- package/bin/apt-tools.mjs +7 -0
- package/dist/cli/ci-watch/stop-matrix.d.mts.map +1 -1
- package/dist/cli/ci-watch/stop-matrix.mjs +16 -0
- package/dist/cli/ci-watch/stop-matrix.mjs.map +1 -1
- package/dist/cli/commands/ci-watch.d.mts +11 -0
- package/dist/cli/commands/ci-watch.d.mts.map +1 -1
- package/dist/cli/commands/ci-watch.mjs +147 -3
- package/dist/cli/commands/ci-watch.mjs.map +1 -1
- package/dist/cli/commands/features-audit.d.mts +24 -0
- package/dist/cli/commands/features-audit.d.mts.map +1 -1
- package/dist/cli/commands/features-audit.mjs +159 -5
- package/dist/cli/commands/features-audit.mjs.map +1 -1
- package/dist/cli/commands/health-check.d.mts +16 -0
- package/dist/cli/commands/health-check.d.mts.map +1 -1
- package/dist/cli/commands/health-check.mjs +119 -3
- package/dist/cli/commands/health-check.mjs.map +1 -1
- package/dist/cli/commands/init.d.mts +19 -1
- package/dist/cli/commands/init.d.mts.map +1 -1
- package/dist/cli/commands/init.mjs +143 -8
- package/dist/cli/commands/init.mjs.map +1 -1
- package/dist/cli/commands/modes.d.mts.map +1 -1
- package/dist/cli/commands/modes.mjs +11 -0
- package/dist/cli/commands/modes.mjs.map +1 -1
- package/dist/cli/commands/pr-review-audit-fixer.d.mts +13 -0
- package/dist/cli/commands/pr-review-audit-fixer.d.mts.map +1 -1
- package/dist/cli/commands/pr-review-audit-fixer.mjs +18 -5
- package/dist/cli/commands/pr-review-audit-fixer.mjs.map +1 -1
- package/dist/cli/commands/route.d.mts.map +1 -1
- package/dist/cli/commands/route.mjs +37 -2
- package/dist/cli/commands/route.mjs.map +1 -1
- package/dist/cli/commands/task.d.mts.map +1 -1
- package/dist/cli/commands/task.mjs +132 -5
- package/dist/cli/commands/task.mjs.map +1 -1
- package/dist/cli/commands/validate-evidence.d.mts +24 -2
- package/dist/cli/commands/validate-evidence.d.mts.map +1 -1
- package/dist/cli/commands/validate-evidence.mjs +154 -17
- package/dist/cli/commands/validate-evidence.mjs.map +1 -1
- package/dist/cli/commands/vitest-doctor.d.mts +2 -0
- package/dist/cli/commands/vitest-doctor.d.mts.map +1 -0
- package/dist/cli/commands/vitest-doctor.mjs +168 -0
- package/dist/cli/commands/vitest-doctor.mjs.map +1 -0
- package/dist/cli/config/gitignore-drift.d.mts +23 -1
- package/dist/cli/config/gitignore-drift.d.mts.map +1 -1
- package/dist/cli/config/gitignore-drift.mjs +81 -3
- package/dist/cli/config/gitignore-drift.mjs.map +1 -1
- package/dist/cli/config/load.d.mts +56 -2
- package/dist/cli/config/load.d.mts.map +1 -1
- package/dist/cli/config/load.mjs +192 -2
- package/dist/cli/config/load.mjs.map +1 -1
- package/dist/cli/consistency/parse-review.mjs +7 -0
- package/dist/cli/consistency/parse-review.mjs.map +1 -1
- package/dist/cli/dispatch.d.mts.map +1 -1
- package/dist/cli/dispatch.mjs +24 -2
- package/dist/cli/dispatch.mjs.map +1 -1
- package/dist/cli/gate/gates/gitignore-in-sync.d.mts +1 -1
- package/dist/cli/gate/gates/gitignore-in-sync.d.mts.map +1 -1
- package/dist/cli/gate/gates/gitignore-in-sync.mjs +5 -2
- package/dist/cli/gate/gates/gitignore-in-sync.mjs.map +1 -1
- package/dist/cli/gate/gates/review-clean.d.mts +5 -1
- package/dist/cli/gate/gates/review-clean.d.mts.map +1 -1
- package/dist/cli/gate/gates/review-clean.mjs +23 -18
- package/dist/cli/gate/gates/review-clean.mjs.map +1 -1
- package/dist/cli/gate/gates/verify-approved.d.mts +49 -1
- package/dist/cli/gate/gates/verify-approved.d.mts.map +1 -1
- package/dist/cli/gate/gates/verify-approved.mjs +93 -14
- package/dist/cli/gate/gates/verify-approved.mjs.map +1 -1
- package/dist/cli/help.d.mts.map +1 -1
- package/dist/cli/help.mjs +8 -2
- package/dist/cli/help.mjs.map +1 -1
- package/dist/cli/host/detect.d.mts +122 -9
- package/dist/cli/host/detect.d.mts.map +1 -1
- package/dist/cli/host/detect.mjs +132 -0
- package/dist/cli/host/detect.mjs.map +1 -1
- package/dist/cli/install/legacy-paths.d.mts +38 -0
- package/dist/cli/install/legacy-paths.d.mts.map +1 -0
- package/dist/cli/install/legacy-paths.mjs +69 -0
- package/dist/cli/install/legacy-paths.mjs.map +1 -0
- package/dist/cli/install/runtime-detect.d.mts +13 -0
- package/dist/cli/install/runtime-detect.d.mts.map +1 -1
- package/dist/cli/install/runtime-detect.mjs +9 -0
- package/dist/cli/install/runtime-detect.mjs.map +1 -1
- package/dist/cli/install/runtime-migrate.d.mts +84 -0
- package/dist/cli/install/runtime-migrate.d.mts.map +1 -0
- package/dist/cli/install/runtime-migrate.mjs +244 -0
- package/dist/cli/install/runtime-migrate.mjs.map +1 -0
- package/dist/cli/route/drift-detect.d.mts +20 -0
- package/dist/cli/route/drift-detect.d.mts.map +1 -0
- package/dist/cli/route/drift-detect.mjs +107 -0
- package/dist/cli/route/drift-detect.mjs.map +1 -0
- package/dist/cli/task/index-md.d.mts.map +1 -1
- package/dist/cli/task/index-md.mjs +14 -2
- package/dist/cli/task/index-md.mjs.map +1 -1
- package/dist/cli/util/aperant-section.d.mts +34 -0
- package/dist/cli/util/aperant-section.d.mts.map +1 -0
- package/dist/cli/util/aperant-section.mjs +127 -0
- package/dist/cli/util/aperant-section.mjs.map +1 -0
- package/dist/cli/util/copy.d.mts +28 -1
- package/dist/cli/util/copy.d.mts.map +1 -1
- package/dist/cli/util/copy.mjs +43 -55
- package/dist/cli/util/copy.mjs.map +1 -1
- package/dist/cli/util/semver.d.mts +17 -0
- package/dist/cli/util/semver.d.mts.map +1 -0
- package/dist/cli/util/semver.mjs +29 -0
- package/dist/cli/util/semver.mjs.map +1 -0
- package/dist/cli/util/skill-installs.d.mts +65 -9
- package/dist/cli/util/skill-installs.d.mts.map +1 -1
- package/dist/cli/util/skill-installs.mjs +130 -21
- package/dist/cli/util/skill-installs.mjs.map +1 -1
- package/dist/cli/util/version-preflight.d.mts +44 -0
- package/dist/cli/util/version-preflight.d.mts.map +1 -0
- package/dist/cli/util/version-preflight.mjs +66 -0
- package/dist/cli/util/version-preflight.mjs.map +1 -0
- package/dist/plugin/.claude-plugin/plugin.json +11 -2
- package/dist/plugin/agents/apt-improver.md +99 -0
- package/dist/plugin/agents/apt-planner.md +127 -10
- package/dist/plugin/agents/apt-pr-review-fixer.md +13 -9
- package/dist/plugin/skills/apt/SKILL.md +1 -0
- package/dist/plugin/skills/apt-close-task/SKILL.md +63 -1
- package/dist/plugin/skills/apt-debug/SKILL.md +39 -6
- package/dist/plugin/skills/apt-debug/appendices/diagnose-discipline.md +119 -0
- package/dist/plugin/skills/apt-diagram/SKILL.md +378 -0
- package/dist/plugin/skills/apt-diagram/appendices/design-discipline.md +97 -0
- package/dist/plugin/skills/apt-discuss/SKILL.md +72 -5
- package/dist/plugin/skills/apt-discuss/appendices/grill-discipline.md +104 -0
- package/dist/plugin/skills/apt-discuss/appendices/zoom-out-helper.md +79 -0
- package/dist/plugin/skills/apt-execute/SKILL.md +57 -5
- package/dist/plugin/skills/apt-execute/appendices/tdd-mode.md +107 -0
- package/dist/plugin/skills/apt-improve/DEEPENING.md +84 -0
- package/dist/plugin/skills/apt-improve/INTERFACE-DESIGN.md +97 -0
- package/dist/plugin/skills/apt-improve/LANGUAGE.md +104 -0
- package/dist/plugin/skills/apt-improve/SKILL.md +141 -0
- package/dist/plugin/skills/apt-plan/SKILL.md +171 -4
- package/dist/plugin/skills/apt-plan/adapters/conductor.md +98 -0
- package/dist/plugin/skills/apt-pr-review/SKILL.md +57 -18
- package/dist/plugin/skills/apt-prototype/LOGIC.md +109 -0
- package/dist/plugin/skills/apt-prototype/SKILL.md +143 -0
- package/dist/plugin/skills/apt-prototype/UI.md +90 -0
- package/dist/plugin/skills/apt-quick/SKILL.md +49 -8
- package/dist/plugin/skills/apt-release-notes/SKILL.md +193 -0
- package/dist/plugin/skills/apt-release-notes/appendices/persona-voice.md +59 -0
- package/dist/plugin/skills/apt-review/SKILL.md +2 -0
- package/dist/plugin/skills/apt-run/SKILL.md +32 -4
- package/dist/plugin/skills/apt-setup/SKILL.md +308 -6
- package/dist/plugin/skills/apt-ship/SKILL.md +122 -1
- package/dist/plugin/skills/apt-spar/SKILL.md +315 -0
- package/dist/plugin/skills/apt-triage/AGENT-BRIEF.md +84 -0
- package/dist/plugin/skills/apt-triage/OUT-OF-SCOPE.md +75 -0
- package/dist/plugin/skills/apt-triage/SKILL.md +169 -0
- package/dist/plugin/skills/apt-update/SKILL.md +77 -10
- package/dist/plugin/skills/apt-verify/SKILL.md +3 -0
- package/dist/plugin/skills/apt-verify-proof/SKILL.md +10 -5
- package/dist/plugin/skills/apt-watch-ci/SKILL.md +166 -0
- package/dist/plugin/skills/apt-zoom-out/SKILL.md +130 -0
- package/package.json +133 -133
- package/prompts/conductor-framework-context.md +63 -0
- package/prompts/conductor-system.md +11 -0
- package/skills/apt-close-task/SKILL.md +6 -0
- package/skills/apt-discuss/SKILL.md +47 -5
- package/skills/apt-execute/SKILL.md +9 -0
- package/skills/apt-plan/SKILL.md +12 -0
- package/skills/apt-pr-review/SKILL.md +11 -2
- package/skills/apt-quick/SKILL.md +19 -8
- package/skills/apt-researcher.md +1 -0
- package/skills/apt-setup/SKILL.md +33 -2
- package/skills/apt-ship/SKILL.md +16 -4
- package/skills/apt-spar/SKILL.md +36 -11
- package/skills/apt-update/SKILL.md +26 -1
- package/skills/apt-verify-proof/SKILL.md +7 -5
- package/skills/apt-watch-ci/SKILL.md +4 -1
- package/src/cli/ci-watch/stop-matrix.mjs +17 -0
- package/src/cli/commands/ci-watch.mjs +152 -3
- package/src/cli/commands/features-audit.mjs +164 -5
- package/src/cli/commands/health-check.mjs +116 -3
- package/src/cli/commands/init.mjs +154 -6
- package/src/cli/commands/modes.mjs +11 -0
- package/src/cli/commands/pr-review-audit-fixer.mjs +18 -5
- package/src/cli/commands/route.mjs +38 -2
- package/src/cli/commands/task.mjs +132 -5
- package/src/cli/commands/validate-evidence.mjs +158 -17
- package/src/cli/commands/vitest-doctor.mjs +173 -0
- package/src/cli/config/gitignore-drift.mjs +74 -3
- package/src/cli/config/load.mjs +188 -2
- package/src/cli/consistency/parse-review.mjs +6 -0
- package/src/cli/dispatch.mjs +23 -2
- package/src/cli/gate/gates/gitignore-in-sync.mjs +5 -2
- package/src/cli/gate/gates/review-clean.mjs +24 -19
- package/src/cli/gate/gates/verify-approved.mjs +97 -14
- package/src/cli/help.mjs +8 -2
- package/src/cli/host/detect.mjs +135 -0
- package/src/cli/install/legacy-paths.mjs +69 -0
- package/src/cli/install/runtime-detect.mjs +9 -0
- package/src/cli/install/runtime-migrate.mjs +252 -0
- package/src/cli/route/drift-detect.mjs +107 -0
- package/src/cli/task/index-md.mjs +15 -2
- package/src/cli/util/aperant-section.mjs +136 -0
- package/src/cli/util/copy.mjs +43 -56
- package/src/cli/util/semver.mjs +28 -0
- package/src/cli/util/skill-installs.mjs +134 -21
- package/src/cli/util/version-preflight.mjs +65 -0
- package/templates/aperant-claude-md-appendix.md +37 -0
- package/templates/config.json +2 -7
- package/workflows/verify-proof.md +8 -3
|
@@ -17,6 +17,8 @@ execution_modes:
|
|
|
17
17
|
allowed-tools: "Bash, Read, Write, Edit, Grep, Glob"
|
|
18
18
|
argument-hint: "apt:setup [--batch <n> | --reset]"
|
|
19
19
|
gates: []
|
|
20
|
+
config_keys:
|
|
21
|
+
- "*"
|
|
20
22
|
---
|
|
21
23
|
<objective>
|
|
22
24
|
Interactive configuration of the Aperant Framework. Presents human-friendly questions
|
|
@@ -118,7 +120,20 @@ Also check for global defaults at `~/.aperant/defaults.json` — if they exist a
|
|
|
118
120
|
|
|
119
121
|
## 1b. Review Mode (existing config detected)
|
|
120
122
|
|
|
121
|
-
|
|
123
|
+
**Canonical signal.** The `onboarding.completed` marker inside `.aperant/config.json` is the canonical signal that a user has walked through the full /apt:setup batch sequence. Structural completeness of the JSON config does NOT imply onboarding completeness — `packages/framework/templates/config.json` ships with all keys populated to sensible defaults by design, so the JSON alone cannot disambiguate "fresh seed" from "fully tuned." Future template additions must not assume otherwise.
|
|
124
|
+
|
|
125
|
+
**Dispatch.** Read `.aperant/config.json` and inspect the `onboarding` block. Branch on the four marker states:
|
|
126
|
+
|
|
127
|
+
| Marker state | `/apt:setup` behaviour |
|
|
128
|
+
|-------------------------------------------------------------|-----------------------------------------------------------------------|
|
|
129
|
+
| No `onboarding` block (legacy pre-fix config) | enter **review mode** (preserve current behaviour; do NOT re-onboard) |
|
|
130
|
+
| `onboarding.seeded_from_template: true` AND `onboarding.completed: false` | enter **full Batch 1-8 flow** (treat as fresh setup) |
|
|
131
|
+
| `onboarding.completed: true` | enter **review mode** |
|
|
132
|
+
| `--reset` flag passed | enter **full Batch 1-8 flow** always (overrides marker) |
|
|
133
|
+
|
|
134
|
+
`init` writes the `seeded_from_template: true` / `completed: false` marker on fresh seed only (see `packages/framework/src/cli/commands/init.mjs::applyInterviewAnswers`). The upgrade path never writes the marker — that is why a legacy unmarked config routes to review mode.
|
|
135
|
+
|
|
136
|
+
If the dispatch lands you in review mode, continue below. If it lands you in the full flow, jump to **Step 2**.
|
|
122
137
|
|
|
123
138
|
First, run host detection to show resolved orchestration:
|
|
124
139
|
|
|
@@ -146,6 +161,7 @@ Display the current settings summary:
|
|
|
146
161
|
| Date Format | {current value} |
|
|
147
162
|
| Time Format | {current value} |
|
|
148
163
|
| Task Index | {current value} |
|
|
164
|
+
| Diagram Mode | {current value} |
|
|
149
165
|
| Phase Delegation | {config value} → {resolved} |
|
|
150
166
|
| Review Mode | {config value} → {resolved} |
|
|
151
167
|
| Debate Mode | {config value} → {resolved} |
|
|
@@ -168,10 +184,12 @@ AskUserQuestion([
|
|
|
168
184
|
multiSelect: false,
|
|
169
185
|
options: [
|
|
170
186
|
{ label: "Verification", description: "Verify mode, cross-verification, video review, strictness" },
|
|
171
|
-
{ label: "Pipeline", description: "Auto branch, code review, TDD Iron Law, date/time format, task index" },
|
|
187
|
+
{ label: "Pipeline", description: "Auto branch, code review, TDD Iron Law, date/time format, task index, diagram mode (file vs mcp)" },
|
|
172
188
|
{ label: "Orchestration", description: "Phase delegation, review mode, debate mode, agent teams" },
|
|
173
189
|
{ label: "Team Collaboration", description: "Enable/disable team mode — shared task board, roadmap, members" },
|
|
174
190
|
{ label: "Visibility", description: "Artifact-sharing policy — what leaves your machine (roadmap, team.json, decisions, digests, tasks)" },
|
|
191
|
+
{ label: "Task Tracking", description: "Tracker backend (local-only / github-issues / app-inbox), publish to tracker, TDD default, prototype discipline" },
|
|
192
|
+
{ label: "Changelog & Release Notes", description: "Internal dev changelog + opt-in user-facing release notes (audience, persona filter)" },
|
|
175
193
|
{ label: "Everything", description: "Re-run full setup from scratch" },
|
|
176
194
|
{ label: "Done", description: "Keep current settings" }
|
|
177
195
|
]
|
|
@@ -181,11 +199,13 @@ AskUserQuestion([
|
|
|
181
199
|
|
|
182
200
|
**Routing:**
|
|
183
201
|
- "Verification" → jump to **Step 2** (Batch 1 + Batch 2 only), then skip to **Step 4** (mapping) and **Step 5** (write)
|
|
184
|
-
- "Pipeline" → jump to **Step 3b** (Batch 3 only), then skip to **Step 4** and **Step 5**
|
|
202
|
+
- "Pipeline" → jump to **Step 3b** (Batch 3 only, including Diagram Mode), then skip to **Step 4** and **Step 5**
|
|
185
203
|
- "Orchestration" → jump to **Step 3c** (Batch 4 only), then skip to **Step 4** and **Step 5**
|
|
186
204
|
- "Team Collaboration" → jump to **Step 3d** (Batch 5 only), then skip to **Step 4** and **Step 5**
|
|
187
205
|
- "Visibility" → jump to **Step 3e** (Batch 6 only), then skip to **Step 4** and **Step 5**
|
|
188
|
-
- "
|
|
206
|
+
- "Task Tracking" → jump to **Step 3g** (Batch 8 only), then skip to **Step 4** and **Step 5**
|
|
207
|
+
- "Changelog & Release Notes" → jump to **Step 3h** (Batch 9 only), then skip to **Step 4** and **Step 5**
|
|
208
|
+
- "Everything" → proceed to **Step 2** and run all batches (same as fresh setup). **Legacy-completes-Everything marker write:** if the starting config has no `onboarding` block (legacy unmarked config) and the user completes the full flow, write a full `onboarding` block at Step 5 as `{ completed: true, seeded_from_template: false, seeded_at: <ISO-8601 now> }` to record the explicit onboarding pass.
|
|
189
209
|
- "Done" → display "Settings unchanged." and exit
|
|
190
210
|
|
|
191
211
|
For selective edits, **pre-fill the existing values** as the default selection in each question. The user can confirm or change. Unchanged values are preserved — do not overwrite the entire config, only merge the changed section.
|
|
@@ -396,6 +416,15 @@ AskUserQuestion([
|
|
|
396
416
|
{ label: "Yes (Recommended)", description: "Generates .aperant/tasks/INDEX.md with date, status, and title for every task — updated automatically" },
|
|
397
417
|
{ label: "No", description: "Skip index generation" }
|
|
398
418
|
]
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
question: "How should /apt:diagram render diagrams by default? (You can override per-call with --mode=file or --mode=mcp.)",
|
|
422
|
+
header: "Diagram Mode",
|
|
423
|
+
multiSelect: false,
|
|
424
|
+
options: [
|
|
425
|
+
{ label: "File (default)", description: "Writes a local docs/diagrams/<slug>.excalidraw file — works offline, no external services" },
|
|
426
|
+
{ label: "MCP (live canvas)", description: "Renders into a live Excalidraw MCP canvas — requires the Excalidraw MCP server to be connected. Asks for one-time consent on first use." }
|
|
427
|
+
]
|
|
399
428
|
}
|
|
400
429
|
])
|
|
401
430
|
```
|
|
@@ -859,8 +888,257 @@ Add a row to the Step 8 table:
|
|
|
859
888
|
|
|
860
889
|
---
|
|
861
890
|
|
|
891
|
+
## 3g. Present Settings (Batch 8: Task Tracking + Coding) (Pocock adoption AC13)
|
|
892
|
+
|
|
893
|
+
This batch captures the **task_tracking** backend and the **coding**
|
|
894
|
+
defaults block introduced by the Pocock adoption (ST-10 apt:triage +
|
|
895
|
+
ST-3 apt:execute --tdd).
|
|
896
|
+
|
|
897
|
+
Per ID-01 (Framework full-featured locally; backends are pluggable), the
|
|
898
|
+
default is `local-only` — zero GitHub auth required on first run. Users
|
|
899
|
+
can switch to `github-issues` (v1 stub) or `app-inbox` (v1 stub) later;
|
|
900
|
+
the framework abstraction is open for v2 adapter implementations.
|
|
901
|
+
|
|
902
|
+
### 3g.1 Present the task-tracking picker
|
|
903
|
+
|
|
904
|
+
```
|
|
905
|
+
AskUserQuestion([
|
|
906
|
+
{
|
|
907
|
+
question: "Where should triage state mirror to?",
|
|
908
|
+
header: "Task Tracking",
|
|
909
|
+
options: [
|
|
910
|
+
{ label: "Local files only (recommended for solo / 2-founder)",
|
|
911
|
+
description: "Writes to .aperant/tasks/{id}/triage.json. Zero net dep." },
|
|
912
|
+
{ label: "GitHub Issues (v2 — stub returns not-implemented in v1)",
|
|
913
|
+
description: "v1 ships the adapter shape only; full implementation in v2." },
|
|
914
|
+
{ label: "App inbox (post-app-launch — stub in v1)",
|
|
915
|
+
description: "Convex-backed; same state machine, app-rendered." }
|
|
916
|
+
]
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
question: "Publish vertical-slice subtasks to the tracker?",
|
|
920
|
+
header: "Tracker Publishing",
|
|
921
|
+
options: [
|
|
922
|
+
{ label: "No (recommended for solo / local)",
|
|
923
|
+
description: "Slices stay in implementation_plan.json only." },
|
|
924
|
+
{ label: "Yes (only meaningful with github-issues or app-inbox backend)",
|
|
925
|
+
description: "Each vertical slice becomes an issue via the to-issues template." }
|
|
926
|
+
]
|
|
927
|
+
}
|
|
928
|
+
])
|
|
929
|
+
```
|
|
930
|
+
|
|
931
|
+
For hosts without structured prompts, present each as a numbered list
|
|
932
|
+
and read the reply as a single number per question.
|
|
933
|
+
|
|
934
|
+
### 3g.2 Present the coding-defaults picker
|
|
935
|
+
|
|
936
|
+
```
|
|
937
|
+
AskUserQuestion([
|
|
938
|
+
{
|
|
939
|
+
question: "Activate TDD discipline by default for /apt:execute?",
|
|
940
|
+
header: "TDD Default",
|
|
941
|
+
options: [
|
|
942
|
+
{ label: "No (off — opt in per run via --tdd)",
|
|
943
|
+
description: "Single-commit flow; --tdd activates red-green-refactor + G9 audit." },
|
|
944
|
+
{ label: "Yes (on — opt out per run via --no-tdd)",
|
|
945
|
+
description: "Vertical-tracer-bullet discipline on every STANDARD/DEEP run." }
|
|
946
|
+
]
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
question: "Enforce the 5-rule prototype discipline on /apt:prototype?",
|
|
950
|
+
header: "Prototype Discipline",
|
|
951
|
+
options: [
|
|
952
|
+
{ label: "Yes (recommended — throwaway-marked, single-command-run, etc.)",
|
|
953
|
+
description: "All 5 universal rules apply to every prototype." },
|
|
954
|
+
{ label: "No (relaxed — rules are guidance only)",
|
|
955
|
+
description: "Prototypes may grow into production code; not recommended." }
|
|
956
|
+
]
|
|
957
|
+
}
|
|
958
|
+
])
|
|
959
|
+
```
|
|
960
|
+
|
|
961
|
+
### 3g.3 Map answers to `.aperant/config.json`
|
|
962
|
+
|
|
963
|
+
```jsonc
|
|
964
|
+
{
|
|
965
|
+
"task_tracking": {
|
|
966
|
+
"backend": "local-only", // default; or "github-issues" | "app-inbox"
|
|
967
|
+
"publish_to_tracker": false, // default
|
|
968
|
+
"tracker_url": null, // user-supplied when publish_to_tracker = true
|
|
969
|
+
"tracker_label_vocabulary": "default" // or custom name
|
|
970
|
+
},
|
|
971
|
+
"coding": {
|
|
972
|
+
"tdd_default": false, // default — see ST-3 apt:execute --tdd
|
|
973
|
+
"prototype_discipline": true // default — see ST-8 apt:prototype
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
```
|
|
977
|
+
|
|
978
|
+
Migration rule: any existing config WITHOUT a `task_tracking` or
|
|
979
|
+
`coding` block gets defaults silently — NEVER error on a missing block.
|
|
980
|
+
This is the migration path for projects that adopted Aperant pre-Pocock.
|
|
981
|
+
|
|
982
|
+
### 3g.4 Review-Mode routing entry
|
|
983
|
+
|
|
984
|
+
Extend the "1b. Review Mode" routing table (§1b) to include "Task
|
|
985
|
+
Tracking" as a selectable edit target — jumping back into this Batch 8
|
|
986
|
+
picker.
|
|
987
|
+
|
|
988
|
+
### 3g.5 Confirmation row
|
|
989
|
+
|
|
990
|
+
Add a row to the Step 8 table:
|
|
991
|
+
```
|
|
992
|
+
| Task Tracking | {backend} (publish: {true|false}, TDD default: {true|false}) |
|
|
993
|
+
```
|
|
994
|
+
|
|
995
|
+
---
|
|
996
|
+
|
|
997
|
+
## 3h. Present Settings (Batch 9: Changelog & Release Notes)
|
|
998
|
+
|
|
999
|
+
This batch captures the **persona-aware changelog + release-notes** preferences introduced by `apt-release-notes/SKILL.md`. Two top-level questions: (1) keep an internal dev `CHANGELOG.md` and (2) publish user-facing release notes. Q2 defaults to **No** on internal/library projects (per spec ID-7: the presence of `personas.json` does NOT auto-enable release-notes — opt-in must be explicit).
|
|
1000
|
+
|
|
1001
|
+
If a host supports structured prompts (Claude Code), prefer `AskUserQuestion`. For non-structured hosts (Codex, Gemini-CLI plain mode), present each question as a numbered list and read the reply as a single number per question.
|
|
1002
|
+
|
|
1003
|
+
### 3h.1 Present the dev-changelog picker
|
|
1004
|
+
|
|
1005
|
+
```
|
|
1006
|
+
AskUserQuestion([
|
|
1007
|
+
{
|
|
1008
|
+
question: "Keep an internal dev changelog?",
|
|
1009
|
+
header: "Dev Changelog",
|
|
1010
|
+
options: [
|
|
1011
|
+
{ label: "Yes (Recommended)",
|
|
1012
|
+
description: "Auto-update CHANGELOG.md from commits on every /apt:ship. Dev-flavored, internal." },
|
|
1013
|
+
{ label: "No",
|
|
1014
|
+
description: "Skip the dev changelog entirely." }
|
|
1015
|
+
]
|
|
1016
|
+
}
|
|
1017
|
+
])
|
|
1018
|
+
```
|
|
1019
|
+
|
|
1020
|
+
### 3h.2 Present the release-notes picker
|
|
1021
|
+
|
|
1022
|
+
```
|
|
1023
|
+
AskUserQuestion([
|
|
1024
|
+
{
|
|
1025
|
+
question: "Publish user-facing release notes?",
|
|
1026
|
+
header: "Release Notes",
|
|
1027
|
+
options: [
|
|
1028
|
+
{ label: "No (Recommended for internal / library projects)",
|
|
1029
|
+
description: "Skip the user-facing surface entirely. Most projects pick this." },
|
|
1030
|
+
{ label: "Yes",
|
|
1031
|
+
description: "Enable /apt:release-notes — auto-draft fragments on /apt:ship, compile at tag time." }
|
|
1032
|
+
]
|
|
1033
|
+
}
|
|
1034
|
+
])
|
|
1035
|
+
```
|
|
1036
|
+
|
|
1037
|
+
### 3h.3 If Yes — present the audience + persona-filter sub-pickers
|
|
1038
|
+
|
|
1039
|
+
When Q2 = Yes, ask:
|
|
1040
|
+
|
|
1041
|
+
```
|
|
1042
|
+
AskUserQuestion([
|
|
1043
|
+
{
|
|
1044
|
+
question: "Who is the primary audience for these release notes?",
|
|
1045
|
+
header: "Audience",
|
|
1046
|
+
options: [
|
|
1047
|
+
{ label: "End user", description: "Plain-language, value-focused. Suits consumer apps." },
|
|
1048
|
+
{ label: "Developer / API", description: "Technical, references API + SDK semantics. Suits libraries." },
|
|
1049
|
+
{ label: "Internal team", description: "Lighter polish, faster cadence. Suits company-internal apps." }
|
|
1050
|
+
]
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
question: "Which personas should drive the published notes?",
|
|
1054
|
+
header: "Persona Filter",
|
|
1055
|
+
options: [
|
|
1056
|
+
{ label: "Primary only",
|
|
1057
|
+
description: "Only primary-tier personas surface in published notes." },
|
|
1058
|
+
{ label: "Primary + Secondary (Recommended)",
|
|
1059
|
+
description: "Primary + secondary tiers. Default — balances signal with completeness." },
|
|
1060
|
+
{ label: "All personas",
|
|
1061
|
+
description: "Every tier surfaces. Useful for marketplaces / multi-sided products." }
|
|
1062
|
+
]
|
|
1063
|
+
}
|
|
1064
|
+
])
|
|
1065
|
+
```
|
|
1066
|
+
|
|
1067
|
+
If `.aperant/personas.json` is absent and Q2 = Yes, emit a non-blocking hint:
|
|
1068
|
+
|
|
1069
|
+
```
|
|
1070
|
+
[apt:setup] Note: .aperant/personas.json is missing. Release notes will work but every
|
|
1071
|
+
fragment will land in `## Needs Triage` until you run /apt:personas.
|
|
1072
|
+
```
|
|
1073
|
+
|
|
1074
|
+
This is a hint only — the user can still complete setup; the triage bucket is the intentional safety net (spec ID-6 never-silent-drop).
|
|
1075
|
+
|
|
1076
|
+
### 3h.4 Map answers to `.aperant/config.json`
|
|
1077
|
+
|
|
1078
|
+
Mapping rules (extend Section 4 below):
|
|
1079
|
+
|
|
1080
|
+
| User picked | Config write |
|
|
1081
|
+
|---|---|
|
|
1082
|
+
| Q1: Yes | `changelog.dev.enabled = true` |
|
|
1083
|
+
| Q1: No | `changelog.dev.enabled = false` |
|
|
1084
|
+
| Q2: No | `changelog.release_notes.enabled = false` (DEFAULT — leave audience + persona_filter at template defaults) |
|
|
1085
|
+
| Q2: Yes | `changelog.release_notes.enabled = true` and apply the audience + persona-filter sub-pickers |
|
|
1086
|
+
| Audience: End user | `changelog.release_notes.audience = "end-user"` |
|
|
1087
|
+
| Audience: Developer / API | `changelog.release_notes.audience = "developer-api"` |
|
|
1088
|
+
| Audience: Internal team | `changelog.release_notes.audience = "internal-team"` |
|
|
1089
|
+
| Persona filter: Primary only | `changelog.release_notes.persona_filter = "primary"` |
|
|
1090
|
+
| Persona filter: Primary + Secondary | `changelog.release_notes.persona_filter = "primary+secondary"` (DEFAULT) |
|
|
1091
|
+
| Persona filter: All personas | `changelog.release_notes.persona_filter = "all"` |
|
|
1092
|
+
|
|
1093
|
+
The remaining `release_notes` keys (`output_dir`, `require_pr_field`, `draft.*`, `compile.*`, `publish.*`) keep their template defaults from `packages/framework/templates/config.json` v5. Users wanting to override those edit `.aperant/config.json` directly — they are not surfaced through the Q-block to keep the picker short.
|
|
1094
|
+
|
|
1095
|
+
Migration rule: any existing config WITHOUT a `changelog` block gets defaults silently from the template migrator (`migrateConfigSchema` in `src/cli/config/schema-migrate.mjs`) — this is the same auto_added path Batch 8 relies on for the `task_tracking` / `coding` blocks.
|
|
1096
|
+
|
|
1097
|
+
### 3h.5 Review-Mode routing entry
|
|
1098
|
+
|
|
1099
|
+
Extend the "1b. Review Mode" routing table (§1b) to include "Changelog & Release Notes" as a selectable edit target — jumping back into this Batch 9 picker.
|
|
1100
|
+
|
|
1101
|
+
### 3h.6 Confirmation row
|
|
1102
|
+
|
|
1103
|
+
Add a row to the Step 8 table:
|
|
1104
|
+
```
|
|
1105
|
+
| Changelog & Release Notes | dev: {Yes/No}; release-notes: {Yes/No} (audience: {value}, persona-filter: {value}) |
|
|
1106
|
+
```
|
|
1107
|
+
|
|
1108
|
+
The selective-edit pass through Batch 9 MUST respect the §1b dispatch — it does NOT flip `onboarding.completed`. Marker writes are reserved for the full-flow / "Everything" branches.
|
|
1109
|
+
|
|
1110
|
+
---
|
|
1111
|
+
|
|
862
1112
|
## 4. Map Answers to Config
|
|
863
1113
|
|
|
1114
|
+
**AUDIT-001 — file-routing contract for per-device fields (UPDATED 0.7.2):** the
|
|
1115
|
+
following five fields are PER-DEVICE and MUST land in `.aperant/config.local.json`
|
|
1116
|
+
(gitignored), NOT the shared `.aperant/config.json`:
|
|
1117
|
+
- `verification.open_report` — covered in the "Auto-Open" mapping below.
|
|
1118
|
+
- `multi_model.cross_verification.tools` — covered in the "Cross-Verification" mapping below.
|
|
1119
|
+
- `preferences.date_format` — covered in the "Date Format" mapping below.
|
|
1120
|
+
- `preferences.time_format` — covered in the "Time Format" mapping below.
|
|
1121
|
+
- `preferences.quick_task_post_verify` — covered in apt-quick SKILL config block.
|
|
1122
|
+
|
|
1123
|
+
All other fields (including `verification.evidence_capture`,
|
|
1124
|
+
`multi_model.cross_verification.enabled`, `multi_model.video_review.*`,
|
|
1125
|
+
`preferences.task_index`, every `orchestration.*` value) stay in shared
|
|
1126
|
+
`.aperant/config.json`.
|
|
1127
|
+
|
|
1128
|
+
Implementation: use the framework's `writeLocalConfigField(targetDir, dotPath, value)`
|
|
1129
|
+
helper from `packages/framework/src/cli/config/load.mjs` (or its shell-out
|
|
1130
|
+
equivalent via `apt-tools config write . --local --key <dotpath> --value <json>`)
|
|
1131
|
+
for the five fields above. NEVER hand-roll `JSON.parse(readFileSync('.aperant/config.json'))`
|
|
1132
|
+
followed by `writeFileSync('.aperant/config.json', ...)` for these fields — it
|
|
1133
|
+
will land per-device data in the shared file and re-introduce the
|
|
1134
|
+
shared-config trap AUDIT-001 was designed to close.
|
|
1135
|
+
|
|
1136
|
+
Reads of these fields anywhere in the framework MUST go through
|
|
1137
|
+
`loadMergedProjectConfig(targetDir)` or `readLocalOrSharedField(targetDir, dotPath)`
|
|
1138
|
+
so per-device overrides are honored.
|
|
1139
|
+
|
|
1140
|
+
---
|
|
1141
|
+
|
|
864
1142
|
Map the user's selections to config values:
|
|
865
1143
|
|
|
866
1144
|
**Verify Mode:**
|
|
@@ -898,6 +1176,8 @@ Map the user's selections to config values:
|
|
|
898
1176
|
- "Ask me" → `pr_review.suggest_after_ship: "ask"`
|
|
899
1177
|
- "Never" → `pr_review.suggest_after_ship: "never"`
|
|
900
1178
|
|
|
1179
|
+
Note: task ids are slug-first since v0.6.6 — the date-format setting controls the trailing date component only.
|
|
1180
|
+
|
|
901
1181
|
**Date Format:**
|
|
902
1182
|
- "DD-MM-YY" → `preferences.date_format: "DD-MM-YY"`
|
|
903
1183
|
- "MM-DD-YY" → `preferences.date_format: "MM-DD-YY"`
|
|
@@ -909,6 +1189,12 @@ Map the user's selections to config values:
|
|
|
909
1189
|
|
|
910
1190
|
**Task Index:** "Yes" → `preferences.task_index: true`, "No" → `preferences.task_index: false`
|
|
911
1191
|
|
|
1192
|
+
**Diagram Mode:**
|
|
1193
|
+
- "File (default)" → `diagram.mode: "file"`
|
|
1194
|
+
- "MCP (live canvas)" → `diagram.mode: "mcp"`
|
|
1195
|
+
|
|
1196
|
+
**Diagram MCP consent (per-user, FRAMEWORK-AUDIT-001).** The `diagram.mcpConsent` field is per-user and lives in `.aperant/config.local.json` (gitignored), NOT in the shared `config.json`. If `config.local.json` doesn't exist or has no `diagram.mcpConsent` field, seed `{diagram: {mcpConsent: null}}` in `config.local.json`. The `diagram.mode` field (file vs mcp) stays in `config.json` as team-shared policy and continues to seed there. Existing `mcpConsent` records in `config.local.json` are preserved across mode flips (changing the mode does not invalidate prior consent for the same host).
|
|
1197
|
+
|
|
912
1198
|
**Orchestration (Auto mode):** "Auto (Recommended)" → all three fields set to `"auto"`:
|
|
913
1199
|
- `orchestration.phase_delegation: "auto"`
|
|
914
1200
|
- `orchestration.review_mode: "auto"`
|
|
@@ -922,13 +1208,16 @@ Map the user's selections to config values:
|
|
|
922
1208
|
|
|
923
1209
|
## 5. Write Config
|
|
924
1210
|
|
|
925
|
-
Write merged config to
|
|
1211
|
+
Write merged config to two files per AUDIT-001 routing (see Step 4 block):
|
|
1212
|
+
|
|
1213
|
+
- Shared `.aperant/config.json` — all project policy values (the bulk of the answers).
|
|
1214
|
+
- Per-device `.aperant/config.local.json` — the five AUDIT-001 fields enumerated in Step 4.
|
|
926
1215
|
|
|
927
1216
|
```bash
|
|
928
1217
|
mkdir -p .aperant
|
|
929
1218
|
```
|
|
930
1219
|
|
|
931
|
-
Write
|
|
1220
|
+
Write each JSON file with 2-space indentation. Bump shared `config.json`'s `version` to 4 if upgrading from an older config (versions 2/3 load forward-compatibly — the new `tdd` block is optional). `config.local.json` is gitignored by `.aperant/.gitignore` — do not check it in.
|
|
932
1221
|
|
|
933
1222
|
## 6. Save as Global Defaults (Optional)
|
|
934
1223
|
|
|
@@ -1016,11 +1305,13 @@ Display:
|
|
|
1016
1305
|
| Date Format | {DD-MM-YY / MM-DD-YY / YY-MM-DD} |
|
|
1017
1306
|
| Time Format | {24h / 12h} |
|
|
1018
1307
|
| Task Index | {Yes/No} |
|
|
1308
|
+
| Diagram Mode | {file/mcp} |
|
|
1019
1309
|
| Design Taste | {Skip / Brutalist / Editorial / Enterprise-Clean / Playful} |
|
|
1020
1310
|
| Phase Delegation | {Auto / Agent Team / Sub-Agents / Sequential} |
|
|
1021
1311
|
| Review Mode | {Auto / Agent Team / Sub-Agents / Sequential} |
|
|
1022
1312
|
| Debate Mode | {Auto / Agent Team / Sub-Agents / Sequential} |
|
|
1023
1313
|
| Visibility | {solo / team / oss} (overrides if any) |
|
|
1314
|
+
| Changelog & Release Notes | dev: {Yes/No}; release-notes: {Yes/No} (audience, persona-filter) |
|
|
1024
1315
|
| Saved as Defaults | {Yes/No} |
|
|
1025
1316
|
|
|
1026
1317
|
Config saved to: .aperant/config.json
|
|
@@ -1032,6 +1323,17 @@ Commands now use these settings automatically:
|
|
|
1032
1323
|
/apt:setup — change settings anytime
|
|
1033
1324
|
```
|
|
1034
1325
|
|
|
1326
|
+
### 8. (continued) Flip `onboarding.completed` on full-flow success
|
|
1327
|
+
|
|
1328
|
+
After a successful **full Batch 1-8 pass** (i.e. the user came in via `--reset`, via the fresh-seed marker-state `seeded_from_template:true / completed:false`, or via the review-mode "Everything" option), patch `.aperant/config.json` to set `onboarding.completed: true`. **Preserve** the existing `seeded_from_template` and `seeded_at` fields untouched — they carry forensic value (debug "did init upgrade overwrite my config?"). Concretely:
|
|
1329
|
+
|
|
1330
|
+
- Read the current `.aperant/config.json` you just wrote in **Step 5**.
|
|
1331
|
+
- Set `onboarding.completed = true`. If the `onboarding` block was already present, preserve the other fields verbatim.
|
|
1332
|
+
- If the starting config was a **legacy unmarked config** (no `onboarding` block — see §1b "Everything" routing), instead write the full block as `{ completed: true, seeded_from_template: false, seeded_at: <ISO-8601 now> }`.
|
|
1333
|
+
- Re-write `.aperant/config.json` with 2-space indentation.
|
|
1334
|
+
|
|
1335
|
+
Selective edits in review mode (Verification, Pipeline, Orchestration, Team Collaboration, Visibility, Task Tracking) DO NOT flip the marker — only a full Batch 1-8 pass does.
|
|
1336
|
+
|
|
1035
1337
|
### 8a. PreCompact Hook Status
|
|
1036
1338
|
|
|
1037
1339
|
After confirming settings, check whether the framework's PreCompact hook is
|
|
@@ -20,6 +20,9 @@ gates:
|
|
|
20
20
|
- review-clean
|
|
21
21
|
- all-subtasks-complete
|
|
22
22
|
- gitignore-in-sync
|
|
23
|
+
config_keys:
|
|
24
|
+
- pipeline.auto_branch
|
|
25
|
+
- pipeline.branch_prefix
|
|
23
26
|
---
|
|
24
27
|
<objective>
|
|
25
28
|
Create a pull request (or publish a package) with full traceability from decisions to implementation. The PR body includes QA dimension scores, decision audit trail, and commit-to-subtask mapping. This is the final step in any track -- after verify passes, ship it.
|
|
@@ -143,6 +146,53 @@ Format as a markdown table:
|
|
|
143
146
|
|
|
144
147
|
If no plan exists (ad-hoc task), list commits without subtask mapping.
|
|
145
148
|
|
|
149
|
+
## 2.6 Release-note auto-draft (persona-aware release-notes opt-in)
|
|
150
|
+
|
|
151
|
+
This section runs ONLY when `.aperant/config.json` has `changelog.release_notes.enabled === true`. When the toggle is `false` (the default for the 9-of-10 internal projects that never publish user-facing notes), skip the section entirely — do NOT compute the feature diff and do NOT touch the PR body draft.
|
|
152
|
+
|
|
153
|
+
Read the toggle:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
rn_enabled=$(jq -r '.changelog.release_notes.enabled // false' .aperant/config.json)
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
If `rn_enabled !== "true"`, jump to Section 3.
|
|
160
|
+
|
|
161
|
+
### 2.6.1 Compute the feature-registry diff
|
|
162
|
+
|
|
163
|
+
The auto-draft needs to know which features the PR's commits touched. Use the same `features-audit` surface that `apt:execute` uses post-step:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
base=$(node packages/framework/bin/apt-tools.mjs task get . --id {task-id} | jq -r '.base_branch // "main"')
|
|
167
|
+
feature_diff=$(node packages/framework/bin/apt-tools.mjs features-audit . --diff-since "$base" --json)
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
The envelope shape (see `packages/framework/src/cli/commands/features-audit.mjs`) returns the list of touched features with their declared `personas: []` field (when the registry's feature row carries one).
|
|
171
|
+
|
|
172
|
+
### 2.6.2 Decide draft vs block via the helper
|
|
173
|
+
|
|
174
|
+
Hand the diff + the project's personas envelope + the filter mode to `ship-autodraft.mjs`. The CLI returns one of three envelopes:
|
|
175
|
+
|
|
176
|
+
- `{status: 'draft', line, persona, matchedFeatures}` — append `line` to the PR body draft built in Section 3.
|
|
177
|
+
- `{status: 'block', reason, message}` — fire the block path below.
|
|
178
|
+
- `{status: 'warn', reason, message}` — log the warning and proceed without the line.
|
|
179
|
+
|
|
180
|
+
The block path triggers when `release_notes.require_pr_field === true` (default) AND auto-draft failed (no feature match OR no persona signal). The exact error string is locked by AC7:
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
[APT] No release-note signal found — author manual note in PR body or label PR no-notes
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
When the block fires, STOP — do NOT proceed to `gh pr create`. The user must either (a) author a manual `Release note: …` line in the PR body via `git commit --amend` (or by editing the PR body after open), or (b) label the PR `no-notes` via `gh pr edit --add-label no-notes` and re-run `/apt:ship`. The label-based escape hatch keeps the gate from blocking infra-only PRs that genuinely have no user-facing impact.
|
|
187
|
+
|
|
188
|
+
### 2.6.3 Inject the line into the PR body draft
|
|
189
|
+
|
|
190
|
+
When the helper returns `status: 'draft'`, append the `line` value verbatim to the PR body draft assembled in Section 3, immediately under the `## Summary` heading. The line is one sentence, persona-voice-tuned, suitable for a user-facing surface.
|
|
191
|
+
|
|
192
|
+
### 2.6.4 Helper contract (for testability)
|
|
193
|
+
|
|
194
|
+
The helper lives at `packages/framework/src/cli/release-notes/ship-autodraft.mjs`. It is a pure function — given the feature-diff envelope + personas envelope + filter mode + the `require_pr_field` toggle, it returns the decision. The `decideAutodraft` export is unit-tested via TD-4; the SKILL.md body wires it without re-deriving the decision logic.
|
|
195
|
+
|
|
146
196
|
## 3. Build PR Body
|
|
147
197
|
|
|
148
198
|
**Title:** Derived from task description. Keep it short (<70 characters).
|
|
@@ -286,11 +336,13 @@ Capture the PR URL from the output into `pr_url` (for example, the last line of
|
|
|
286
336
|
**Record `pr_url` on the task record (C56 A2).** `/apt:close-task` and the auto-close-phase path in `task close` both resolve the PR number from this URL to poll `gh pr view` for merge state — without it, the closer side cannot run:
|
|
287
337
|
|
|
288
338
|
```bash
|
|
289
|
-
node packages/framework/bin/apt-tools.mjs task update . --id {task-id} --pr-url {PR_URL}
|
|
339
|
+
ship_update=$(node packages/framework/bin/apt-tools.mjs task update . --id {task-id} --pr-url {PR_URL})
|
|
290
340
|
```
|
|
291
341
|
|
|
292
342
|
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
343
|
|
|
344
|
+
It also evaluates `ci_watch.after_ship` and may arm the post-ship CI watcher. Preserve the JSON envelope in `ship_update`; Section 7.2 reads `ci_watch_armed` and `ci_watch_skip_reason` from it instead of issuing a second auto-start command.
|
|
345
|
+
|
|
294
346
|
Display the resolution so users see which branch/base was used:
|
|
295
347
|
|
|
296
348
|
```
|
|
@@ -347,6 +399,75 @@ suggest_mode=$(jq -r '.pr_review.suggest_after_ship // "always"' .aperant/config
|
|
|
347
399
|
|
|
348
400
|
`suggest_after_ship` is purely additive — it does not affect `authorship_override`, `authorship_overrides`, or `max_rounds` in the same `pr_review` block.
|
|
349
401
|
|
|
402
|
+
### 7.2 Post-ship /apt:watch-ci hook
|
|
403
|
+
|
|
404
|
+
After Section 7.1's hint resolves (whether it ran the deep review or skipped), report or interactively arm the post-ship CI watcher. The hook is controlled by `ci_watch.after_ship` in `.aperant/config.json` (tri-state: `auto` | `ask` | `never`). The default depends on host capability — `auto` on cron-capable hosts (Claude Code, Pi), `never` elsewhere.
|
|
405
|
+
|
|
406
|
+
**Skip entirely** when no PR URL was captured in Section 6 (library `npm publish`-only path — same skip rule as 7.1).
|
|
407
|
+
|
|
408
|
+
**Read the Section 6 task-update envelope first:**
|
|
409
|
+
|
|
410
|
+
```bash
|
|
411
|
+
ci_watch_armed=$(echo "$ship_update" | jq -r '.ci_watch_armed // false')
|
|
412
|
+
ci_watch_skip_reason=$(echo "$ship_update" | jq -r '.ci_watch_skip_reason // empty')
|
|
413
|
+
ci_watch_host=$(echo "$ship_update" | jq -r '.ci_watch.host // "unknown"')
|
|
414
|
+
ci_watch_deadline=$(echo "$ship_update" | jq -r '.ci_watch.deadline // empty')
|
|
415
|
+
ci_watch_scheduler_handle=$(echo "$ship_update" | jq -r '.scheduler_handle // empty')
|
|
416
|
+
host_cron=$(node packages/framework/bin/apt-tools.mjs host-detect | jq -r '.host.capabilities.cron')
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
**Autonomy interaction** (apply BEFORE branching, same rule as 7.1): when `autonomy === 3` (YOLO), degrade `ask` → `auto`.
|
|
420
|
+
|
|
421
|
+
**Branch on the task-update envelope** (FRAMEWORK-BUG-018 — Track 1: distinguish state-recording from wake-registration):
|
|
422
|
+
|
|
423
|
+
- **`ci_watch_armed=true` AND `host_cron=true` AND `ci_watch_scheduler_handle` non-empty** — emit:
|
|
424
|
+
|
|
425
|
+
```
|
|
426
|
+
[APT:ship] CI watcher armed (host cron: {ci_watch_host}). Deadline: {ci_watch_deadline}. Stop: /apt:watch-ci --stop --pr {N}.
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
This is the only honest "armed" case — a scheduler handle proves the wake is registered.
|
|
430
|
+
|
|
431
|
+
- **`ci_watch_armed=true` AND `host_cron=true` AND `ci_watch_scheduler_handle` empty** — emit:
|
|
432
|
+
|
|
433
|
+
```
|
|
434
|
+
[APT:ship] CI watcher state created (host: {ci_watch_host}). Register a wake-up to drive ticks: CronCreate every ~3min running '/apt:watch-ci --tick --pr {N}'. Deadline: {ci_watch_deadline}. Stop: /apt:watch-ci --stop --pr {N}.
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
State is recorded but no scheduler is registered — the orchestrator MUST register a wake or ticks will never fire. Track 2 (auto-wake on arm) will populate `scheduler_handle` and route into the first branch instead.
|
|
438
|
+
|
|
439
|
+
- **`ci_watch_armed=true` AND `host_cron=false`** — emit:
|
|
440
|
+
|
|
441
|
+
```
|
|
442
|
+
[APT:ship] CI watcher state created (host has no cron; advance manually: /apt:watch-ci --tick --pr {N}).
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
This is the honest-gap surface per D-03 — we never lie about cron-capability.
|
|
446
|
+
|
|
447
|
+
- **`ci_watch_skip_reason=ask-deferred`** — emit:
|
|
448
|
+
|
|
449
|
+
```
|
|
450
|
+
[APT:ship] Arm CI watcher for PR {N} now? [Y/n]
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
On `Y` (or empty enter), call:
|
|
454
|
+
|
|
455
|
+
```bash
|
|
456
|
+
arm_envelope=$(node packages/framework/bin/apt-tools.mjs ci-watch start . --pr {pr_number} --task-id {task-id} --host {cli})
|
|
457
|
+
ci_watch_scheduler_handle=$(echo "$arm_envelope" | jq -r '.scheduler_handle // empty')
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
Then route into the same four-way logic above — branch 1 (armed with handle), branch 2 (state-created, needs wake), or branch 3 (host has no cron). On `N` or any other response, proceed silently to Section 8.
|
|
461
|
+
|
|
462
|
+
- **`ci_watch_skip_reason=disabled`** — silent. Proceed directly to Section 8.
|
|
463
|
+
|
|
464
|
+
- **Any other skip reason** — emit:
|
|
465
|
+
```
|
|
466
|
+
[APT:ship] CI watcher not armed: {ci_watch_skip_reason}
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
Section 7.2 is purely additive — it does not affect Section 7.1's `pr_review.suggest_after_ship` policy or any other config block.
|
|
470
|
+
|
|
350
471
|
## 8. Transition lifecycle to `shipped-pending-merge` (C56 B5)
|
|
351
472
|
|
|
352
473
|
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.
|