@aperant/framework 0.6.4 → 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.
- package/CHANGELOG.md +38 -0
- package/README.md +64 -10
- package/agents/apt-improver.md +99 -0
- package/agents/apt-planner.md +115 -10
- package/dist/__test-helpers/run-cmd.d.mts +4 -2
- package/dist/__test-helpers/run-cmd.d.mts.map +1 -1
- package/dist/__test-helpers/run-cmd.mjs +56 -15
- package/dist/__test-helpers/run-cmd.mjs.map +1 -1
- package/dist/cli/ci-watch/lock.d.mts +53 -0
- package/dist/cli/ci-watch/lock.d.mts.map +1 -0
- package/dist/cli/ci-watch/lock.mjs +172 -0
- package/dist/cli/ci-watch/lock.mjs.map +1 -0
- package/dist/cli/ci-watch/state.d.mts +36 -0
- package/dist/cli/ci-watch/state.d.mts.map +1 -0
- package/dist/cli/ci-watch/state.mjs +103 -0
- package/dist/cli/ci-watch/state.mjs.map +1 -0
- package/dist/cli/ci-watch/stop-matrix.d.mts +58 -0
- package/dist/cli/ci-watch/stop-matrix.d.mts.map +1 -0
- package/dist/cli/ci-watch/stop-matrix.mjs +164 -0
- package/dist/cli/ci-watch/stop-matrix.mjs.map +1 -0
- package/dist/cli/cli-wrappers/ci-watch.d.mts +2 -0
- package/dist/cli/cli-wrappers/ci-watch.d.mts.map +1 -0
- package/dist/cli/cli-wrappers/ci-watch.mjs +9 -0
- package/dist/cli/cli-wrappers/ci-watch.mjs.map +1 -0
- package/dist/cli/commands/adr.d.mts +5 -0
- package/dist/cli/commands/adr.d.mts.map +1 -0
- package/dist/cli/commands/adr.mjs +228 -0
- package/dist/cli/commands/adr.mjs.map +1 -0
- package/dist/cli/commands/ci-watch.d.mts +7 -0
- package/dist/cli/commands/ci-watch.d.mts.map +1 -0
- package/dist/cli/commands/ci-watch.mjs +465 -0
- package/dist/cli/commands/ci-watch.mjs.map +1 -0
- package/dist/cli/commands/context.d.mts +7 -0
- package/dist/cli/commands/context.d.mts.map +1 -0
- package/dist/cli/commands/context.mjs +224 -0
- package/dist/cli/commands/context.mjs.map +1 -0
- package/dist/cli/commands/event.d.mts.map +1 -1
- package/dist/cli/commands/event.mjs +59 -24
- package/dist/cli/commands/event.mjs.map +1 -1
- package/dist/cli/commands/host-detect.d.mts +1 -1
- package/dist/cli/commands/host-detect.d.mts.map +1 -1
- package/dist/cli/commands/host-detect.mjs +30 -3
- package/dist/cli/commands/host-detect.mjs.map +1 -1
- package/dist/cli/commands/modes.d.mts +13 -0
- package/dist/cli/commands/modes.d.mts.map +1 -0
- package/dist/cli/commands/modes.mjs +220 -0
- package/dist/cli/commands/modes.mjs.map +1 -0
- package/dist/cli/commands/route.mjs +1 -1
- 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 +108 -6
- package/dist/cli/commands/task.mjs.map +1 -1
- package/dist/cli/commands/tokens.d.mts.map +1 -1
- package/dist/cli/commands/tokens.mjs +150 -6
- package/dist/cli/commands/tokens.mjs.map +1 -1
- package/dist/cli/commands/triage.d.mts +8 -0
- package/dist/cli/commands/triage.d.mts.map +1 -0
- package/dist/cli/commands/triage.mjs +259 -0
- package/dist/cli/commands/triage.mjs.map +1 -0
- package/dist/cli/config/post-merge-sweep.d.mts +18 -0
- package/dist/cli/config/post-merge-sweep.d.mts.map +1 -1
- package/dist/cli/config/post-merge-sweep.mjs +48 -3
- package/dist/cli/config/post-merge-sweep.mjs.map +1 -1
- package/dist/cli/consistency/registry.d.mts +11 -0
- package/dist/cli/consistency/registry.d.mts.map +1 -1
- package/dist/cli/consistency/registry.mjs +13 -0
- package/dist/cli/consistency/registry.mjs.map +1 -1
- package/dist/cli/coordination/agent-identity.d.mts +9 -0
- package/dist/cli/coordination/agent-identity.d.mts.map +1 -1
- package/dist/cli/coordination/agent-identity.mjs +11 -0
- package/dist/cli/coordination/agent-identity.mjs.map +1 -1
- package/dist/cli/coordination/event-log.d.mts +27 -0
- package/dist/cli/coordination/event-log.d.mts.map +1 -1
- package/dist/cli/coordination/event-log.mjs +72 -2
- package/dist/cli/coordination/event-log.mjs.map +1 -1
- package/dist/cli/dispatch.d.mts.map +1 -1
- package/dist/cli/dispatch.mjs +14 -1
- package/dist/cli/dispatch.mjs.map +1 -1
- package/dist/cli/gate/registry.d.mts +11 -0
- package/dist/cli/gate/registry.d.mts.map +1 -1
- package/dist/cli/gate/registry.mjs +13 -0
- package/dist/cli/gate/registry.mjs.map +1 -1
- package/dist/cli/help.d.mts.map +1 -1
- package/dist/cli/help.mjs +1 -0
- package/dist/cli/help.mjs.map +1 -1
- package/dist/cli/host/detect.d.mts +1 -0
- package/dist/cli/host/detect.d.mts.map +1 -1
- package/dist/cli/host/detect.mjs +5 -0
- package/dist/cli/host/detect.mjs.map +1 -1
- package/dist/cli/route/envelope.d.mts +68 -4
- package/dist/cli/route/envelope.d.mts.map +1 -1
- package/dist/cli/route/envelope.mjs +140 -103
- package/dist/cli/route/envelope.mjs.map +1 -1
- package/dist/cli/route/skill-discover.d.mts +9 -0
- package/dist/cli/route/skill-discover.d.mts.map +1 -1
- package/dist/cli/route/skill-discover.mjs +11 -0
- package/dist/cli/route/skill-discover.mjs.map +1 -1
- package/dist/cli/skill-author/contract.d.mts +1 -0
- package/dist/cli/skill-author/contract.d.mts.map +1 -1
- package/dist/cli/skill-author/contract.mjs +7 -0
- package/dist/cli/skill-author/contract.mjs.map +1 -1
- package/dist/cli/task/worktree-cleanup.d.mts +9 -1
- package/dist/cli/task/worktree-cleanup.d.mts.map +1 -1
- package/dist/cli/task/worktree-cleanup.mjs +190 -9
- package/dist/cli/task/worktree-cleanup.mjs.map +1 -1
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/agents/apt-planner.md +1 -1
- package/dist/plugin/skills/apt/SKILL.md +111 -5
- package/dist/plugin/skills/apt-author-skill/SKILL.md +11 -0
- package/dist/plugin/skills/apt-bootstrap/SKILL.md +1 -0
- package/dist/plugin/skills/apt-classify/SKILL.md +1 -0
- package/dist/plugin/skills/apt-close-task/SKILL.md +1 -0
- package/dist/plugin/skills/apt-create-docs/SKILL.md +1 -0
- package/dist/plugin/skills/apt-debug/SKILL.md +2 -0
- package/dist/plugin/skills/apt-design/SKILL.md +2 -0
- package/dist/plugin/skills/apt-discuss/SKILL.md +2 -0
- package/dist/plugin/skills/apt-docs/SKILL.md +2 -0
- package/dist/plugin/skills/apt-execute/SKILL.md +1 -0
- package/dist/plugin/skills/apt-mockup/SKILL.md +2 -0
- package/dist/plugin/skills/apt-pause/SKILL.md +1 -0
- package/dist/plugin/skills/apt-personas/SKILL.md +1 -0
- package/dist/plugin/skills/apt-plan/SKILL.md +2 -0
- package/dist/plugin/skills/apt-pr-review/SKILL.md +1 -0
- package/dist/plugin/skills/apt-quick/SKILL.md +2 -0
- package/dist/plugin/skills/apt-resume/SKILL.md +1 -0
- package/dist/plugin/skills/apt-review/SKILL.md +1 -0
- package/dist/plugin/skills/apt-roadmap/SKILL.md +1 -0
- package/dist/plugin/skills/apt-roundtable/SKILL.md +2 -0
- package/dist/plugin/skills/apt-run/SKILL.md +1 -0
- package/dist/plugin/skills/apt-scan/SKILL.md +1 -0
- package/dist/plugin/skills/apt-setup/SKILL.md +1 -0
- package/dist/plugin/skills/apt-ship/SKILL.md +6 -5
- package/dist/plugin/skills/apt-stress-test/SKILL.md +1 -0
- package/dist/plugin/skills/apt-terminal/SKILL.md +1 -0
- package/dist/plugin/skills/apt-update/SKILL.md +5 -0
- package/dist/plugin/skills/apt-verify/SKILL.md +1 -0
- package/dist/plugin/skills/apt-verify-proof/SKILL.md +1 -0
- package/dist/types/config.d.ts +85 -0
- package/dist/types/config.d.ts.map +1 -1
- package/package.json +125 -125
- package/prompts/coder.md +2 -0
- package/prompts/planner.md +12 -0
- package/prompts/spec_writer.md +9 -0
- package/skills/apt/SKILL.md +1 -0
- package/skills/apt-close-task/SKILL.md +32 -1
- package/skills/apt-debug/SKILL.md +39 -6
- package/skills/apt-debug/appendices/diagnose-discipline.md +119 -0
- package/skills/apt-diagram/SKILL.md +342 -0
- package/skills/apt-diagram/appendices/design-discipline.md +97 -0
- package/skills/apt-discuss/SKILL.md +25 -0
- package/skills/apt-discuss/appendices/grill-discipline.md +104 -0
- package/skills/apt-discuss/appendices/zoom-out-helper.md +79 -0
- package/skills/apt-execute/SKILL.md +48 -5
- package/skills/apt-execute/appendices/tdd-mode.md +107 -0
- package/skills/apt-improve/DEEPENING.md +84 -0
- package/skills/apt-improve/INTERFACE-DESIGN.md +97 -0
- package/skills/apt-improve/LANGUAGE.md +104 -0
- package/skills/apt-improve/SKILL.md +141 -0
- package/skills/apt-plan/SKILL.md +147 -4
- package/skills/apt-planner.md +42 -1
- package/skills/apt-pr-review/SKILL.md +46 -16
- package/skills/apt-prototype/LOGIC.md +109 -0
- package/skills/apt-prototype/SKILL.md +143 -0
- package/skills/apt-prototype/UI.md +90 -0
- package/skills/apt-quick/SKILL.md +30 -0
- package/skills/apt-review/SKILL.md +2 -0
- package/skills/apt-run/SKILL.md +32 -4
- package/skills/apt-setup/SKILL.md +128 -2
- package/skills/apt-ship/SKILL.md +47 -0
- package/skills/apt-triage/AGENT-BRIEF.md +84 -0
- package/skills/apt-triage/OUT-OF-SCOPE.md +75 -0
- package/skills/apt-triage/SKILL.md +169 -0
- package/skills/apt-verify/SKILL.md +3 -0
- package/skills/apt-verify-proof/SKILL.md +3 -0
- package/skills/apt-watch-ci/SKILL.md +163 -0
- package/skills/apt-zoom-out/SKILL.md +130 -0
- package/src/cli/ci-watch/lock.mjs +178 -0
- package/src/cli/ci-watch/state.mjs +103 -0
- package/src/cli/ci-watch/stop-matrix.mjs +181 -0
- package/src/cli/cli-wrappers/ci-watch.mjs +9 -0
- package/src/cli/commands/adr.mjs +243 -0
- package/src/cli/commands/ci-watch.mjs +503 -0
- package/src/cli/commands/context.mjs +244 -0
- package/src/cli/commands/event.mjs +63 -24
- package/src/cli/commands/host-detect.mjs +33 -7
- package/src/cli/commands/modes.mjs +215 -0
- package/src/cli/commands/route.mjs +1 -1
- package/src/cli/commands/task.mjs +125 -18
- package/src/cli/commands/tokens.mjs +157 -6
- package/src/cli/commands/triage.mjs +277 -0
- package/src/cli/config/post-merge-sweep.mjs +49 -3
- package/src/cli/consistency/registry.mjs +14 -0
- package/src/cli/coordination/agent-identity.mjs +12 -0
- package/src/cli/coordination/event-log.mjs +73 -2
- package/src/cli/dispatch.mjs +15 -1
- package/src/cli/gate/registry.mjs +14 -0
- package/src/cli/help.mjs +1 -0
- package/src/cli/host/detect.mjs +5 -0
- package/src/cli/route/envelope.mjs +140 -106
- package/src/cli/route/skill-discover.mjs +12 -0
- package/src/cli/skill-author/contract.mjs +7 -0
- package/src/cli/task/worktree-cleanup.mjs +191 -9
- package/templates/adr-format.md +56 -0
- package/templates/config.json +4 -0
- 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: 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
|
|
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.
|
|
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
|
-
|
|
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: 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`
|
package/dist/types/config.d.ts
CHANGED
|
@@ -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;
|
|
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,wEAAwE;AACxE,MAAM,WAAW,2BAA2B;IAC3C,8EAA8E;IAC9E,KAAK,CAAC,EAAE,iBAAiB,CAAA;IACzB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,iBAAiB,CAAA;IAC5B,4EAA4E;IAC5E,IAAI,CAAC,EAAE,iBAAiB,CAAA;CACxB;AAED,yEAAyE;AACzE,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|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
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
|
package/prompts/planner.md
CHANGED
|
@@ -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?
|
package/prompts/spec_writer.md
CHANGED
|
@@ -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
|
package/skills/apt/SKILL.md
CHANGED
|
@@ -130,6 +130,7 @@ Show available commands table:
|
|
|
130
130
|
| `apt:resume` | Restore context after session break |
|
|
131
131
|
| `apt:pause` | Human-initiated handoff — save state when YOU need to stop |
|
|
132
132
|
| `apt:ship` | Create PR with traceability |
|
|
133
|
+
| `apt:close-task` | Post-merge closer — confirm PR merged, flip phase, drain narration ledger |
|
|
133
134
|
| `apt:setup` | Change framework preferences |
|
|
134
135
|
|
|
135
136
|
Show current state summary and autonomy flags (`--supervised`, `--guided`, `--autonomous`, `--yolo`).
|
|
@@ -15,7 +15,7 @@ execution_modes:
|
|
|
15
15
|
- auto
|
|
16
16
|
- step
|
|
17
17
|
allowed-tools: "Bash, Read, Grep, Glob, Write"
|
|
18
|
-
argument-hint: "apt:close-task [--all | --task <id>]"
|
|
18
|
+
argument-hint: "apt:close-task [--all | --task <id>] [--narrate-only]"
|
|
19
19
|
gates: []
|
|
20
20
|
---
|
|
21
21
|
<objective>
|
|
@@ -70,6 +70,7 @@ Internally, close-merged does:
|
|
|
70
70
|
a. `apt-tools task close . --id {task-id} --verdict approved` (respects `task_isolation.auto_close_phase`).
|
|
71
71
|
b. Strips `config.pr_review.authorship_overrides['pr-{N}']` if present.
|
|
72
72
|
c. Emits `task.closed.merged` event.
|
|
73
|
+
d. Appends a `pending_narration[]` ledger row to `.aperant/state.json` so `--narrate-only` (see §4) can pick it up. Additive only; never blocks the close.
|
|
73
74
|
3. When `state !== 'MERGED'`, the task stays in `shipped-pending-merge` with a skip reason the user can inspect.
|
|
74
75
|
|
|
75
76
|
## 2.5 Narrate completed phases (moved from /apt:ship in C56 B5)
|
|
@@ -85,6 +86,8 @@ For each entry in the close-merged envelope's `closed[]` whose record has a non-
|
|
|
85
86
|
|
|
86
87
|
Do NOT wait on the narrator. Its status lands in `.aperant/digests/.last-run.json`. Skip narrator spawn entirely when `closed[]` is empty or no closed item has a phase_id.
|
|
87
88
|
|
|
89
|
+
After step 2.5 spawns narrators for the just-closed candidates, the skill ALSO drains `state.pending_narration[]` (entries the passive sweep parked there) — see §4.
|
|
90
|
+
|
|
88
91
|
## 3. Summary
|
|
89
92
|
|
|
90
93
|
close-merged emits an envelope with:
|
|
@@ -95,6 +98,34 @@ close-merged emits an envelope with:
|
|
|
95
98
|
|
|
96
99
|
Report the summary verbatim. If anything landed in `skipped[]` with a recoverable reason (`offline`, `rate_limited`), suggest the user re-run once the network clears.
|
|
97
100
|
|
|
101
|
+
## 4. Narrate-only mode
|
|
102
|
+
|
|
103
|
+
When invoked with `--narrate-only`, skip §1 (no `gh pr view` polling) and §2 (no destructive close path). The deterministic close already ran via the passive post-merge sweep — your job is to drain the `state.pending_narration[]` ledger the sweep parked.
|
|
104
|
+
|
|
105
|
+
Flags:
|
|
106
|
+
- `--narrate-only --all` (default when `--narrate-only` is bare) — drain every ledger entry.
|
|
107
|
+
- `--narrate-only --task <id>` — drain only the entry for `<id>`.
|
|
108
|
+
|
|
109
|
+
Per ledger entry `{ task_id, scope, phase_id, closed_at, pr_number }`:
|
|
110
|
+
|
|
111
|
+
1. Run `apt-tools features-audit . --apply-stubs --task <task_id>` so the feature registry catches whatever the closed task introduced. If the subprocess exits non-zero, skip the entry with `reason: 'features-audit-failed'` — never block narration on registry update.
|
|
112
|
+
2. When `phase_id` is non-null, spawn `apt-team-docs-narrator` (background, fire-and-forget) using the same shape as §2.5: `subagent_type: apt-team-docs-narrator`, `run_in_background: true`, `description: Narrate shipped phase {phase_id}`, `prompt: Run in phase-ship mode with --phase {phase_id} --scope {scope}.`. When `phase_id` is null, skip the spawn with `reason: 'no-phase-id'` (quick tasks have no phase to narrate).
|
|
113
|
+
3. On successful spawn (or successful no-phase skip), drain the row via `apt-tools task narration-drain . --task <task_id>` which acquires `withFileLock(state.json)` and removes the matching `pending_narration[]` entry. On spawn failure, leave the row in place with `reason: 'narrator-spawn-failed'` so the user can re-invoke.
|
|
114
|
+
|
|
115
|
+
Emit a summary envelope:
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"status": "ok",
|
|
120
|
+
"command": "close-task-narrate-only",
|
|
121
|
+
"narrated": [{ "task_id": "<id>", "phase_id": "<p|null>", "scope": "<s>" }],
|
|
122
|
+
"skipped": [{ "task_id": "<id>", "reason": "no-phase-id|features-audit-failed|narrator-spawn-failed" }],
|
|
123
|
+
"remaining": <ledger.length>
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
The regular `apt:close-task` flow ALSO falls through to this drain step at the tail of §2.5 — so users who run the skill manually after the sweep get narration without remembering the flag. The `--narrate-only` flag exists for the explicit "drain only, don't poll gh" case.
|
|
128
|
+
|
|
98
129
|
</process>
|
|
99
130
|
|
|
100
131
|
<notes>
|