@aperant/framework 0.8.1 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +287 -1
- package/agents/apt-planner.md +5 -4
- package/dist/cli/commands/adr.mjs +1 -1
- package/dist/cli/commands/audit-branch-current.d.mts +25 -0
- package/dist/cli/commands/audit-branch-current.d.mts.map +1 -0
- package/dist/cli/commands/audit-branch-current.mjs +252 -0
- package/dist/cli/commands/audit-branch-current.mjs.map +1 -0
- package/dist/cli/commands/audit.d.mts.map +1 -1
- package/dist/cli/commands/audit.mjs +13 -2
- package/dist/cli/commands/audit.mjs.map +1 -1
- package/dist/cli/commands/check-version.d.mts.map +1 -1
- package/dist/cli/commands/check-version.mjs +19 -1
- package/dist/cli/commands/check-version.mjs.map +1 -1
- package/dist/cli/commands/context.mjs +3 -3
- package/dist/cli/commands/context.mjs.map +1 -1
- package/dist/cli/commands/detect-runtime.d.mts +6 -0
- package/dist/cli/commands/detect-runtime.d.mts.map +1 -0
- package/dist/cli/commands/detect-runtime.mjs +136 -0
- package/dist/cli/commands/detect-runtime.mjs.map +1 -0
- package/dist/cli/commands/driver-doctor.d.mts +29 -0
- package/dist/cli/commands/driver-doctor.d.mts.map +1 -0
- package/dist/cli/commands/driver-doctor.mjs +291 -0
- package/dist/cli/commands/driver-doctor.mjs.map +1 -0
- package/dist/cli/commands/gate.mjs +14 -0
- package/dist/cli/commands/gate.mjs.map +1 -1
- package/dist/cli/commands/init.d.mts.map +1 -1
- package/dist/cli/commands/init.mjs +9 -6
- package/dist/cli/commands/init.mjs.map +1 -1
- package/dist/cli/commands/install-from-source.d.mts +2 -0
- package/dist/cli/commands/install-from-source.d.mts.map +1 -0
- package/dist/cli/commands/install-from-source.mjs +2 -0
- package/dist/cli/commands/install-from-source.mjs.map +1 -0
- package/dist/cli/commands/modes.mjs +1 -1
- package/dist/cli/commands/route.d.mts.map +1 -1
- package/dist/cli/commands/route.mjs +38 -1
- package/dist/cli/commands/route.mjs.map +1 -1
- package/dist/cli/commands/triage.mjs +1 -1
- package/dist/cli/config/load.d.mts.map +1 -1
- package/dist/cli/config/load.mjs +9 -3
- package/dist/cli/config/load.mjs.map +1 -1
- package/dist/cli/coordination/auto-emit-artifact-ready.mjs +1 -1
- package/dist/cli/coordination/event-schema.d.mts.map +1 -1
- package/dist/cli/coordination/event-schema.mjs +18 -0
- package/dist/cli/coordination/event-schema.mjs.map +1 -1
- package/dist/cli/dispatch.d.mts.map +1 -1
- package/dist/cli/dispatch.mjs +18 -1
- package/dist/cli/dispatch.mjs.map +1 -1
- package/dist/cli/gate/context.d.mts +1 -0
- package/dist/cli/gate/context.d.mts.map +1 -1
- package/dist/cli/gate/context.mjs +14 -1
- package/dist/cli/gate/context.mjs.map +1 -1
- package/dist/cli/gate/gates/consistency-check.d.mts +1 -0
- package/dist/cli/gate/gates/consistency-check.d.mts.map +1 -1
- package/dist/cli/gate/gates/consistency-check.mjs +1 -0
- package/dist/cli/gate/gates/consistency-check.mjs.map +1 -1
- package/dist/cli/gate/gates/review-clean.d.mts +1 -0
- package/dist/cli/gate/gates/review-clean.d.mts.map +1 -1
- package/dist/cli/gate/gates/review-clean.mjs +1 -0
- package/dist/cli/gate/gates/review-clean.mjs.map +1 -1
- package/dist/cli/gate/gates/verify-approved.d.mts +1 -0
- package/dist/cli/gate/gates/verify-approved.d.mts.map +1 -1
- package/dist/cli/gate/gates/verify-approved.mjs +1 -0
- package/dist/cli/gate/gates/verify-approved.mjs.map +1 -1
- package/dist/cli/gate/registry.d.mts.map +1 -1
- package/dist/cli/gate/registry.mjs +9 -1
- package/dist/cli/gate/registry.mjs.map +1 -1
- package/dist/cli/install/find-workspace-framework-version.d.mts +16 -0
- package/dist/cli/install/find-workspace-framework-version.d.mts.map +1 -0
- package/dist/cli/install/find-workspace-framework-version.mjs +85 -0
- package/dist/cli/install/find-workspace-framework-version.mjs.map +1 -0
- package/dist/cli/install/install-from-source.d.mts +10 -0
- package/dist/cli/install/install-from-source.d.mts.map +1 -0
- package/dist/cli/install/install-from-source.mjs +271 -0
- package/dist/cli/install/install-from-source.mjs.map +1 -0
- package/dist/cli/install/install-kernel.d.mts.map +1 -1
- package/dist/cli/install/install-kernel.mjs +24 -0
- package/dist/cli/install/install-kernel.mjs.map +1 -1
- package/dist/cli/install/legacy-paths.d.mts +33 -11
- package/dist/cli/install/legacy-paths.d.mts.map +1 -1
- package/dist/cli/install/legacy-paths.mjs +161 -39
- package/dist/cli/install/legacy-paths.mjs.map +1 -1
- package/dist/cli/install/runtime-detect.mjs +1 -1
- package/dist/cli/install/runtime-detect.mjs.map +1 -1
- package/dist/cli/install/runtime-migrate.d.mts +34 -14
- package/dist/cli/install/runtime-migrate.d.mts.map +1 -1
- package/dist/cli/install/runtime-migrate.mjs +63 -30
- package/dist/cli/install/runtime-migrate.mjs.map +1 -1
- package/dist/cli/install/transforms/codex.d.mts.map +1 -1
- package/dist/cli/install/transforms/codex.mjs +28 -17
- package/dist/cli/install/transforms/codex.mjs.map +1 -1
- package/dist/cli/skill-author/contract.mjs +2 -2
- package/dist/cli/skill-author/contract.mjs.map +1 -1
- package/dist/cli/verify-proof/audit.d.mts +34 -0
- package/dist/cli/verify-proof/audit.d.mts.map +1 -0
- package/dist/cli/verify-proof/audit.mjs +53 -0
- package/dist/cli/verify-proof/audit.mjs.map +1 -0
- package/dist/cli/verify-proof/exec.d.mts +20 -0
- package/dist/cli/verify-proof/exec.d.mts.map +1 -0
- package/dist/cli/verify-proof/exec.mjs +74 -0
- package/dist/cli/verify-proof/exec.mjs.map +1 -0
- package/dist/cli/verify-proof/idl/index.d.mts +2 -0
- package/dist/cli/verify-proof/idl/index.d.mts.map +1 -0
- package/dist/cli/verify-proof/idl/index.mjs +14 -0
- package/dist/cli/verify-proof/idl/index.mjs.map +1 -0
- package/dist/cli/verify-proof/idl/types.d.ts +9 -0
- package/dist/cli/verify-proof/idl/types.d.ts.map +1 -0
- package/dist/cli/verify-proof/idl/types.js +9 -0
- package/dist/cli/verify-proof/idl/types.js.map +1 -0
- package/dist/cli/verify-proof/manifest-validator.d.mts +19 -0
- package/dist/cli/verify-proof/manifest-validator.d.mts.map +1 -0
- package/dist/cli/verify-proof/manifest-validator.mjs +182 -0
- package/dist/cli/verify-proof/manifest-validator.mjs.map +1 -0
- package/dist/cli/verify-proof/resolver.d.mts +43 -0
- package/dist/cli/verify-proof/resolver.d.mts.map +1 -0
- package/dist/cli/verify-proof/resolver.mjs +160 -0
- package/dist/cli/verify-proof/resolver.mjs.map +1 -0
- package/dist/cli/verify-proof/runtime-detect.d.mts +27 -0
- package/dist/cli/verify-proof/runtime-detect.d.mts.map +1 -0
- package/dist/cli/verify-proof/runtime-detect.mjs +116 -0
- package/dist/cli/verify-proof/runtime-detect.mjs.map +1 -0
- package/dist/cli/verify-proof/trust.d.mts +70 -0
- package/dist/cli/verify-proof/trust.d.mts.map +1 -0
- package/dist/cli/verify-proof/trust.mjs +174 -0
- package/dist/cli/verify-proof/trust.mjs.map +1 -0
- package/dist/plugin/.claude-plugin/plugin.json +3 -1
- package/dist/plugin/agents/apt-planner.md +5 -4
- package/dist/plugin/skills/apt/SKILL.md +75 -6
- package/dist/plugin/skills/apt-caveman/SKILL.md +64 -0
- package/dist/plugin/skills/apt-debug/SKILL.md +36 -4
- package/dist/plugin/skills/apt-debug/appendices/diagnose-discipline.md +2 -11
- package/dist/plugin/skills/apt-discuss/SKILL.md +4 -4
- package/dist/plugin/skills/apt-discuss/appendices/grill-discipline.md +2 -11
- package/dist/plugin/skills/apt-discuss/appendices/zoom-out-helper.md +0 -8
- package/dist/plugin/skills/apt-execute/SKILL.md +27 -4
- package/dist/plugin/skills/apt-execute/appendices/tdd-mode.md +2 -10
- package/dist/plugin/skills/apt-fan-out/SKILL.md +36 -1
- package/dist/plugin/skills/apt-handoff/SKILL.md +228 -0
- package/dist/plugin/skills/apt-improve/DEEPENING.md +0 -8
- package/dist/plugin/skills/apt-improve/INTERFACE-DESIGN.md +0 -8
- package/dist/plugin/skills/apt-improve/LANGUAGE.md +0 -8
- package/dist/plugin/skills/apt-improve/SKILL.md +4 -4
- package/dist/plugin/skills/apt-plan/SKILL.md +23 -5
- package/dist/plugin/skills/apt-plan/adapters/conductor.md +1 -1
- package/dist/plugin/skills/apt-prototype/LOGIC.md +0 -8
- package/dist/plugin/skills/apt-prototype/SKILL.md +4 -4
- package/dist/plugin/skills/apt-prototype/UI.md +0 -8
- package/dist/plugin/skills/apt-quick/SKILL.md +31 -1
- package/dist/plugin/skills/apt-resume/SKILL.md +54 -31
- package/dist/plugin/skills/apt-run/SKILL.md +114 -16
- package/dist/plugin/skills/apt-setup/SKILL.md +97 -8
- package/dist/plugin/skills/apt-ship/SKILL.md +165 -9
- package/dist/plugin/skills/apt-spar/SKILL.md +65 -16
- package/dist/plugin/skills/apt-triage/AGENT-BRIEF.md +0 -8
- package/dist/plugin/skills/apt-triage/OUT-OF-SCOPE.md +0 -7
- package/dist/plugin/skills/apt-triage/SKILL.md +2 -2
- package/dist/plugin/skills/apt-update/SKILL.md +74 -17
- package/dist/plugin/skills/apt-verify-proof/SKILL.md +48 -1
- package/dist/plugin/skills/apt-zoom-out/SKILL.md +3 -3
- package/dist/schemas/quick-task.d.ts.map +1 -1
- package/dist/schemas/quick-task.js +2 -2
- package/dist/schemas/quick-task.js.map +1 -1
- package/dist/types/config.d.ts +33 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/state.d.ts +1 -1
- package/dist/types/state.d.ts.map +1 -1
- package/dist/types/task-record.d.ts +1 -1
- package/dist/types/task-record.d.ts.map +1 -1
- package/package.json +134 -133
- package/prompts/planner.md +1 -1
- package/prompts/spec_writer.md +1 -1
- package/skills/apt/SKILL.md +75 -6
- package/skills/apt-caveman/SKILL.md +64 -0
- package/skills/apt-debug/SKILL.md +36 -4
- package/skills/apt-debug/appendices/diagnose-discipline.md +2 -11
- package/skills/apt-discuss/SKILL.md +4 -4
- package/skills/apt-discuss/appendices/grill-discipline.md +2 -11
- package/skills/apt-discuss/appendices/zoom-out-helper.md +0 -8
- package/skills/apt-execute/SKILL.md +27 -4
- package/skills/apt-execute/appendices/tdd-mode.md +2 -10
- package/skills/apt-fan-out/SKILL.md +36 -1
- package/skills/apt-handoff/SKILL.md +228 -0
- package/skills/apt-improve/DEEPENING.md +0 -8
- package/skills/apt-improve/INTERFACE-DESIGN.md +0 -8
- package/skills/apt-improve/LANGUAGE.md +0 -8
- package/skills/apt-improve/SKILL.md +4 -4
- package/skills/apt-plan/SKILL.md +23 -5
- package/skills/apt-plan/adapters/conductor.md +1 -1
- package/skills/apt-planner.md +1 -1
- package/skills/apt-prototype/LOGIC.md +0 -8
- package/skills/apt-prototype/SKILL.md +4 -4
- package/skills/apt-prototype/UI.md +0 -8
- package/skills/apt-quick/SKILL.md +31 -1
- package/skills/apt-resume/SKILL.md +54 -31
- package/skills/apt-run/SKILL.md +114 -16
- package/skills/apt-setup/SKILL.md +97 -8
- package/skills/apt-ship/SKILL.md +165 -9
- package/skills/apt-spar/SKILL.md +65 -16
- package/skills/apt-triage/AGENT-BRIEF.md +0 -8
- package/skills/apt-triage/OUT-OF-SCOPE.md +0 -7
- package/skills/apt-triage/SKILL.md +2 -2
- package/skills/apt-update/SKILL.md +74 -17
- package/skills/apt-verify-proof/SKILL.md +48 -1
- package/skills/apt-zoom-out/SKILL.md +3 -3
- package/src/cli/commands/adr.mjs +1 -1
- package/src/cli/commands/audit-branch-current.mjs +250 -0
- package/src/cli/commands/audit.mjs +13 -2
- package/src/cli/commands/check-version.mjs +20 -1
- package/src/cli/commands/context.mjs +3 -3
- package/src/cli/commands/detect-runtime.mjs +134 -0
- package/src/cli/commands/driver-doctor.mjs +294 -0
- package/src/cli/commands/gate.mjs +15 -0
- package/src/cli/commands/init.mjs +9 -6
- package/src/cli/commands/install-from-source.mjs +1 -0
- package/src/cli/commands/modes.mjs +1 -1
- package/src/cli/commands/route.mjs +42 -1
- package/src/cli/commands/triage.mjs +1 -1
- package/src/cli/config/load.mjs +9 -3
- package/src/cli/coordination/auto-emit-artifact-ready.mjs +1 -1
- package/src/cli/coordination/event-schema.mjs +19 -0
- package/src/cli/dispatch.mjs +17 -1
- package/src/cli/gate/context.mjs +20 -1
- package/src/cli/gate/gates/consistency-check.mjs +1 -0
- package/src/cli/gate/gates/review-clean.mjs +1 -0
- package/src/cli/gate/gates/verify-approved.mjs +1 -0
- package/src/cli/gate/registry.mjs +11 -1
- package/src/cli/install/find-workspace-framework-version.mjs +88 -0
- package/src/cli/install/install-from-source.mjs +276 -0
- package/src/cli/install/install-kernel.mjs +24 -0
- package/src/cli/install/legacy-paths.mjs +162 -39
- package/src/cli/install/runtime-detect.mjs +1 -1
- package/src/cli/install/runtime-migrate.mjs +63 -30
- package/src/cli/install/transforms/codex.mjs +26 -17
- package/src/cli/skill-author/contract.mjs +2 -2
- package/src/cli/verify-proof/.gitkeep +0 -0
- package/src/cli/verify-proof/audit.mjs +55 -0
- package/src/cli/verify-proof/exec.mjs +74 -0
- package/src/cli/verify-proof/idl/index.mjs +24 -0
- package/src/cli/verify-proof/idl/types.ts +41 -0
- package/src/cli/verify-proof/manifest-schema.json +211 -0
- package/src/cli/verify-proof/manifest-validator.mjs +184 -0
- package/src/cli/verify-proof/resolver.mjs +163 -0
- package/src/cli/verify-proof/runtime-detect.mjs +122 -0
- package/src/cli/verify-proof/trust.mjs +187 -0
- package/templates/adr-format.md +0 -8
- package/templates/aperant-claude-md-appendix.md +1 -1
- package/templates/context-format.md +1 -9
- package/templates/proof-verification.md +19 -5
- package/workflows/verify-proof.md +56 -14
package/skills/apt-plan/SKILL.md
CHANGED
|
@@ -19,7 +19,7 @@ execution_modes:
|
|
|
19
19
|
- plan-only
|
|
20
20
|
- research
|
|
21
21
|
allowed-tools: "Read, Grep, Glob, Write, Bash, WebSearch"
|
|
22
|
-
argument-hint: "apt:plan [task description]"
|
|
22
|
+
argument-hint: "apt:plan [task description] [--spar]"
|
|
23
23
|
gates:
|
|
24
24
|
- constitution-read
|
|
25
25
|
- constitution-coverage
|
|
@@ -33,7 +33,7 @@ Analyze a task, assess complexity, investigate the codebase, and produce a struc
|
|
|
33
33
|
- **apt-tools path:** `node packages/framework/bin/apt-tools.mjs` or the locally installed `apt-tools` binary
|
|
34
34
|
- **Prompts directory:** Installed alongside this command in the @aperant/framework package
|
|
35
35
|
- **Constitution:** Read `AGENTS.md` in the project root if it exists — it defines project principles, tech stack, and conventions that override defaults
|
|
36
|
-
- **Task directory:** `{task_dir}` — passed from the router. All plan artifacts (spec.md, implementation_plan.json) are written here, NOT to project root.
|
|
36
|
+
- **Task directory:** `{task_dir}` — passed from the router as an absolute main-repo path. All plan artifacts (spec.md, implementation_plan.json) are written here, NOT to project root and NOT to a worktree-local `.aperant/tasks/` directory.
|
|
37
37
|
</your_environment>
|
|
38
38
|
|
|
39
39
|
<state_files>
|
|
@@ -122,9 +122,9 @@ If `{task_dir}/design.md` exists (emitted by a prior `/apt:design` run), load it
|
|
|
122
122
|
|
|
123
123
|
## 5. Write Specification
|
|
124
124
|
|
|
125
|
-
Create `spec.md` in the task directory (`{task_dir}` passed from the router, e.g.
|
|
125
|
+
Create `spec.md` in the task directory (`{task_dir}` passed from the router, e.g. `/abs/main/repo/.aperant/tasks/{task-id}/spec.md`). Do not use a relative `.aperant/tasks/{task-id}/spec.md` path when the agent is running in a worktree.
|
|
126
126
|
|
|
127
|
-
**Content format branches on track (Fast Path Guarantee —
|
|
127
|
+
**Content format branches on track (Fast Path Guarantee — ID-05):**
|
|
128
128
|
|
|
129
129
|
### 5.A. QUICK track — legacy 4-section format (hard-exempt from PRD upgrade)
|
|
130
130
|
|
|
@@ -309,7 +309,7 @@ When `status: warn` (non-blocking enforcement) and the user is in **auto mode**
|
|
|
309
309
|
|
|
310
310
|
Create `implementation_plan.json` in the task directory (`{task_dir}/implementation_plan.json`).
|
|
311
311
|
|
|
312
|
-
**Subtask schema branches on track
|
|
312
|
+
**Subtask schema branches on track.**
|
|
313
313
|
|
|
314
314
|
### 6.A. QUICK track / SIMPLE complexity — legacy flat subtask schema
|
|
315
315
|
|
|
@@ -454,6 +454,24 @@ Plan created:
|
|
|
454
454
|
Next: /apt:execute
|
|
455
455
|
```
|
|
456
456
|
|
|
457
|
+
### 9b. --spar flag (FRAMEWORK-RFC-001)
|
|
458
|
+
|
|
459
|
+
If `$ARGUMENTS` contained `--spar`, dispatch `/apt:spar` against the
|
|
460
|
+
just-written `spec.md` + `implementation_plan.json` before reporting Next.
|
|
461
|
+
|
|
462
|
+
Topic frame: the §1 Scope paragraph from `spec.md` (1-2 sentences). Same
|
|
463
|
+
`--timeout-ms 120000` pipeline-mode budget and NO `--rounds` flag (per
|
|
464
|
+
FRAMEWORK-BUG-038 — pipeline gates always defer to the skill default).
|
|
465
|
+
When merged-config `spar.partner` is set, append `--with <partner>`.
|
|
466
|
+
|
|
467
|
+
```
|
|
468
|
+
/apt:spar --timeout-ms 120000 [--with <partner>] <topic-frame-from-spec.md-§Scope>
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
After spar returns, append the termination headline + Layer 2 path
|
|
472
|
+
(`.aperant/spar/<slug>-<ts>.md`) into the report output so the user can
|
|
473
|
+
review findings before invoking `/apt:execute`.
|
|
474
|
+
|
|
457
475
|
### 9a. Mode-Aware Compact Suggestion (Human-in-the-Loop Only)
|
|
458
476
|
|
|
459
477
|
Decide whether to show a compact suggestion by reading the **per-task autonomy** from state — not the global default, because the router asks per-task and stores the answer on the task record.
|
|
@@ -42,7 +42,7 @@ auto-stamped `terminal_id`.
|
|
|
42
42
|
|
|
43
43
|
This replaces the earlier markdown-discipline emit step. The earlier
|
|
44
44
|
step was correctly skipped on QUICK / SIMPLE classified tasks (Fast
|
|
45
|
-
Path Guarantee,
|
|
45
|
+
Path Guarantee, ID-05) — moving the emit to a
|
|
46
46
|
framework postcondition makes it work uniformly across QUICK, STANDARD,
|
|
47
47
|
DEEP, and COMPLEX without violating the Fast Path Guarantee.
|
|
48
48
|
|
package/skills/apt-planner.md
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Adapted from Matt Pocock's MIT-licensed skill suite:
|
|
3
|
-
https://github.com/mattpocock/skills/blob/main/skills/engineering/prototype/LOGIC.md
|
|
4
|
-
Licensed under MIT. Modifications: scoped to terminal-app prototypes
|
|
5
|
-
that validate state machines, protocols, and control flow. Aligned with
|
|
6
|
-
the 5 universal rules in apt-prototype/SKILL.md.
|
|
7
|
-
-->
|
|
8
|
-
|
|
9
1
|
# LOGIC branch — Terminal app for state-machine validation
|
|
10
2
|
|
|
11
3
|
When the user's question is about **behavior**, the prototype is a
|
|
@@ -29,7 +29,7 @@ planning artifact, NOT a feature, and NOT something to merge. The output
|
|
|
29
29
|
is a single-command-runnable prototype that lets the user feel whether
|
|
30
30
|
the question's answer is "yes" or "no", then gets thrown away.
|
|
31
31
|
|
|
32
|
-
**
|
|
32
|
+
**Aperant adoption attribution.** Discipline ported from 's
|
|
33
33
|
MIT-licensed `prototype` skill. Routes between two branches by
|
|
34
34
|
question-type; the UI branch delegates to Aperant's existing
|
|
35
35
|
`/apt:mockup` skill for HTML+Tailwind variants. The LOGIC branch and
|
|
@@ -70,7 +70,7 @@ If the question is genuinely ambiguous, ask ONE clarifying question
|
|
|
70
70
|
("are you asking about behavior or appearance?") — do NOT enter a long
|
|
71
71
|
interview.
|
|
72
72
|
|
|
73
|
-
## The 5 Universal Rules (
|
|
73
|
+
## The 5 Universal Rules (Aperant discipline, applies to both branches)
|
|
74
74
|
|
|
75
75
|
These five rules apply to EVERY prototype this skill produces. They are
|
|
76
76
|
load-bearing — violating them collapses the prototype into ceremony
|
|
@@ -109,7 +109,7 @@ disguised as a question.
|
|
|
109
109
|
When the question is about behavior / control flow / state machines /
|
|
110
110
|
protocols:
|
|
111
111
|
|
|
112
|
-
1. Read `LOGIC.md` for the discipline (ported from
|
|
112
|
+
1. Read `LOGIC.md` for the discipline (ported from 's
|
|
113
113
|
`prototype/LOGIC.md` with MIT attribution).
|
|
114
114
|
2. Write ONE file (e.g., `prototype.mjs`, `prototype.ts`, or
|
|
115
115
|
`prototype.py`) that:
|
|
@@ -126,7 +126,7 @@ protocols:
|
|
|
126
126
|
|
|
127
127
|
When the question is about layout / aesthetics / flow / discoverability:
|
|
128
128
|
|
|
129
|
-
1. Read `UI.md` for the discipline (ported from
|
|
129
|
+
1. Read `UI.md` for the discipline (ported from 's
|
|
130
130
|
`prototype/UI.md` with MIT attribution).
|
|
131
131
|
2. Invoke `/apt:mockup --variants 3` as a sub-step. apt:mockup already
|
|
132
132
|
enforces the UI-specific universal rules (zero-dep Tailwind CDN, no
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Adapted from Matt Pocock's MIT-licensed skill suite:
|
|
3
|
-
https://github.com/mattpocock/skills/blob/main/skills/engineering/prototype/UI.md
|
|
4
|
-
Licensed under MIT. Modifications: routed through Aperant's existing
|
|
5
|
-
apt:mockup skill rather than a freestanding HTML+Tailwind generator;
|
|
6
|
-
aligned with the 5 universal rules in apt-prototype/SKILL.md.
|
|
7
|
-
-->
|
|
8
|
-
|
|
9
1
|
# UI branch — Delegates to apt:mockup
|
|
10
2
|
|
|
11
3
|
When the user's question is about **appearance / layout / flow /
|
|
@@ -52,7 +52,37 @@ Execute a small task quickly without full pipeline overhead. For small fixes, do
|
|
|
52
52
|
|
|
53
53
|
Extract the task description from `$ARGUMENTS`.
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
### 1a. Resolve canonical task id (idempotent)
|
|
56
|
+
|
|
57
|
+
QUICK now produces a canonical state.active_tasks record so `/apt:ship` can find the task via the lite ship profile. The body owns idempotency because `apt-tools task create` does NOT guard against existing ids (see spec §3 R8).
|
|
58
|
+
|
|
59
|
+
Two invocation paths converge here:
|
|
60
|
+
|
|
61
|
+
- **Router path** (`/apt` → `/apt:quick`): the router has already called `task create` and injected `task_id` into your skill context.
|
|
62
|
+
- **Direct path** (`/apt:quick foo`): no `task_id` in context — you create one now.
|
|
63
|
+
|
|
64
|
+
Sequence:
|
|
65
|
+
|
|
66
|
+
1. **If `task_id` is present in skill context** (router path):
|
|
67
|
+
```bash
|
|
68
|
+
apt-tools task get . --id {task_id}
|
|
69
|
+
```
|
|
70
|
+
- If exit 0 AND the returned record has `track === "QUICK"` → reuse, skip the create call.
|
|
71
|
+
- Else (record missing OR wrong track) → call:
|
|
72
|
+
```bash
|
|
73
|
+
apt-tools task create . --description "$ARGUMENTS" --track QUICK --id {task_id}
|
|
74
|
+
```
|
|
75
|
+
Parse `task_id` from the returned envelope (it will match the id you passed).
|
|
76
|
+
|
|
77
|
+
2. **If no `task_id` in skill context** (direct path):
|
|
78
|
+
```bash
|
|
79
|
+
apt-tools task create . --description "$ARGUMENTS" --track QUICK
|
|
80
|
+
```
|
|
81
|
+
Parse the generated `task_id` from the envelope — it will be the canonical `{slug}_YY-MM-DD` shape.
|
|
82
|
+
|
|
83
|
+
The task id is now canonical (no more `quick-YYYYMMDD-*` invention). `QuickTaskSchema` accepts both the canonical `{slug}_YY-MM-DD` form and the legacy `quick-YYYYMMDD-{slug}` form for back-compat with already-shipped task records on disk.
|
|
84
|
+
|
|
85
|
+
### 1b. Create QUICK working directory
|
|
56
86
|
|
|
57
87
|
```bash
|
|
58
88
|
mkdir -p .aperant/quick/{task-id}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: apt:resume
|
|
3
|
-
description: "Restore context from a paused session or recover from a crash"
|
|
3
|
+
description: "Restore context from a paused session, an agent handoff, or recover from a crash"
|
|
4
4
|
apt-skill-version: {{APT_VERSION}}
|
|
5
5
|
stage: resume
|
|
6
6
|
intent: capture
|
|
7
|
-
when_to_use: "The user is returning to paused work or recovering from a crash and needs to restore context from CONTINUE artifacts or the active-task state."
|
|
7
|
+
when_to_use: "The user is returning to paused work, picking up an agent-to-agent handoff, or recovering from a crash and needs to restore context from CONTINUE artifacts, HANDOFF artifacts, or the active-task state."
|
|
8
8
|
user_invocable: true
|
|
9
9
|
internal: false
|
|
10
10
|
spawns_agent: false
|
|
@@ -19,14 +19,15 @@ argument-hint: "apt:resume [task-id]"
|
|
|
19
19
|
gates: []
|
|
20
20
|
---
|
|
21
21
|
<objective>
|
|
22
|
-
Restore context and continue work after a session break — whether it was a graceful pause (CONTINUE files exist) or a crash/disconnect (no CONTINUE but state.json has an active task). Supports multiple
|
|
22
|
+
Restore context and continue work after a session break — whether it was a graceful pause (CONTINUE files exist), an agent-to-agent handoff (HANDOFF files exist, written by `/apt:handoff`), or a crash/disconnect (no CONTINUE/HANDOFF but state.json has an active task). Supports multiple resumable sessions of mixed type — shows all and lets the user pick which to resume.
|
|
23
23
|
</objective>
|
|
24
24
|
|
|
25
25
|
<your_environment>
|
|
26
26
|
- **Working directory:** The project root (where you were invoked)
|
|
27
27
|
- **apt-tools path:** `node packages/framework/bin/apt-tools.mjs` or the locally installed `apt-tools` binary
|
|
28
28
|
- **Constitution:** Read `AGENTS.md` in the project root if it exists
|
|
29
|
-
- **Pause index:** `.aperant/CONTINUE_INDEX.md` (
|
|
29
|
+
- **Pause index:** `.aperant/CONTINUE_INDEX.md` (human-pause sessions written by `/apt:pause`)
|
|
30
|
+
- **Handoff index:** `.aperant/HANDOFFS_INDEX.md` (agent-to-agent handoffs written by `/apt:handoff`)
|
|
30
31
|
- **Legacy handoff:** `.aperant/CONTINUE.md` (pre-v2 single-file format, migrate if found)
|
|
31
32
|
- **State:** `.aperant/state.json` (always exists if initialized)
|
|
32
33
|
- **Cross-agent team signal:** `.aperant/team-status/{agent-id}.json` records (gitignored, TTL-expired) are the canonical "who's working on what" surface; `state.active_tasks` is this agent's local view.
|
|
@@ -35,74 +36,85 @@ Restore context and continue work after a session break — whether it was a gra
|
|
|
35
36
|
|
|
36
37
|
<process>
|
|
37
38
|
|
|
38
|
-
## 1. Discover
|
|
39
|
+
## 1. Discover Resumable Sessions
|
|
40
|
+
|
|
41
|
+
Each discovered session is tagged with a **type** — `pause` (human stopped, `CONTINUE.md`) or `handoff` (agent transferred work, `HANDOFF.md`) — and tracked alongside its location. Scan both surfaces; do not assume only one exists.
|
|
39
42
|
|
|
40
43
|
### 1a. Check for pause index
|
|
41
|
-
Read `.aperant/CONTINUE_INDEX.md` if it exists —
|
|
44
|
+
Read `.aperant/CONTINUE_INDEX.md` if it exists — primary source for `type=pause` sessions.
|
|
45
|
+
|
|
46
|
+
### 1b. Check for handoff index
|
|
47
|
+
Read `.aperant/HANDOFFS_INDEX.md` if it exists — primary source for `type=handoff` sessions (agent-to-agent transfers from `/apt:handoff`).
|
|
42
48
|
|
|
43
|
-
###
|
|
49
|
+
### 1c. Check for legacy CONTINUE.md
|
|
44
50
|
If `.aperant/CONTINUE.md` exists (pre-v2 format), treat it as one paused session. Migrate it after resume:
|
|
45
51
|
- Move it to the appropriate task dir or `.aperant/paused/` location
|
|
46
|
-
- Add it to
|
|
52
|
+
- Add it to `CONTINUE_INDEX.md`
|
|
47
53
|
|
|
48
|
-
###
|
|
49
|
-
As a fallback, scan for
|
|
54
|
+
### 1d. Scan for task-level CONTINUE and HANDOFF files
|
|
55
|
+
As a fallback, scan for files that might not be in either index:
|
|
50
56
|
```bash
|
|
51
57
|
find .aperant/tasks/*/CONTINUE.md .aperant/paused/*/CONTINUE.md 2>/dev/null
|
|
58
|
+
find .aperant/tasks/*/handoffs/*/HANDOFF.md .aperant/handoffs/*/HANDOFF.md 2>/dev/null
|
|
52
59
|
```
|
|
53
60
|
|
|
54
|
-
###
|
|
61
|
+
### 1e. Check state.json for active tasks
|
|
55
62
|
```bash
|
|
56
63
|
node packages/framework/bin/apt-tools.mjs health-check .
|
|
57
64
|
node packages/framework/bin/apt-tools.mjs task list .
|
|
58
65
|
```
|
|
59
66
|
|
|
60
|
-
Combine all sources into a unified list of resumable sessions
|
|
67
|
+
Combine all sources into a unified list of resumable sessions, each carrying `{ type, path, branch, focus_or_task, date, suggested_receiver? }`.
|
|
61
68
|
|
|
62
69
|
## 2. Present Sessions
|
|
63
70
|
|
|
64
|
-
### If multiple
|
|
71
|
+
### If multiple resumable sessions found:
|
|
72
|
+
|
|
73
|
+
Render handoffs FIRST (agent dropped work in your lap = higher urgency than human-paused work). Tag each row with `[pause]` or `[handoff]`.
|
|
65
74
|
|
|
66
75
|
```
|
|
67
|
-
|
|
76
|
+
Resumable Sessions
|
|
68
77
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
69
78
|
|
|
70
|
-
1.
|
|
79
|
+
1. [handoff] Finish MCP token rotation wiring
|
|
80
|
+
Branch: feat/mcp-rotation | Handed off: 2026-05-22 14:30
|
|
81
|
+
Sender: Claude Opus 4.7 / Claude Code → Receiver: any agent
|
|
82
|
+
→ .aperant/handoffs/handoff-20260522-1430-finish-mcp-token-rotation/HANDOFF.md
|
|
83
|
+
|
|
84
|
+
2. [pause] Chat UI Polish + Sidebar Redesign
|
|
71
85
|
Branch: closing-phase-4 | Paused: 2026-04-13
|
|
72
86
|
Progress: 6/9 items done
|
|
73
87
|
→ .aperant/paused/paused-20260413-chat-ui-polish/CONTINUE.md
|
|
74
88
|
|
|
75
|
-
|
|
89
|
+
3. [pause] Onboarding State Unification
|
|
76
90
|
Branch: feat/onboarding-sync | Paused: 2026-04-13
|
|
77
91
|
Progress: executing subtask 3/5
|
|
78
92
|
→ .aperant/tasks/task-20260413-onboarding-sync/CONTINUE.md
|
|
79
93
|
|
|
80
|
-
3. Fix DB Path in services.ts
|
|
81
|
-
Branch: closing-phase-4 | Paused: 2026-04-12
|
|
82
|
-
Progress: planned, not started
|
|
83
|
-
→ .aperant/tasks/task-20260412-fix-db-path/CONTINUE.md
|
|
84
|
-
|
|
85
94
|
Which session to resume? (number, or "all" to see full context for each)
|
|
86
95
|
```
|
|
87
96
|
|
|
88
97
|
Wait for user selection before proceeding.
|
|
89
98
|
|
|
90
|
-
### If one
|
|
99
|
+
### If one resumable session found:
|
|
91
100
|
Proceed directly to Step 3 with that session.
|
|
92
101
|
|
|
93
|
-
### If no
|
|
102
|
+
### If no resumable sessions but active tasks in state.json:
|
|
94
103
|
Follow crash recovery flow (Step 4).
|
|
95
104
|
|
|
96
105
|
### If nothing found:
|
|
97
106
|
```
|
|
98
|
-
No paused sessions or active tasks found.
|
|
107
|
+
No paused sessions, handoffs, or active tasks found.
|
|
99
108
|
|
|
100
109
|
→ Start something new: /apt "describe your task"
|
|
101
110
|
```
|
|
102
111
|
|
|
103
112
|
## 3. Resume Selected Session
|
|
104
113
|
|
|
105
|
-
|
|
114
|
+
Branch on `type`:
|
|
115
|
+
|
|
116
|
+
### 3a. type=pause — read CONTINUE.md
|
|
117
|
+
Extract:
|
|
106
118
|
- **Task description** — What was being worked on
|
|
107
119
|
- **Branch** — Which branch to be on
|
|
108
120
|
- **Decisions made** — Context that must not be lost
|
|
@@ -110,26 +122,37 @@ Read the selected CONTINUE.md and extract:
|
|
|
110
122
|
- **Current state** — Pipeline stage, progress
|
|
111
123
|
- **Next steps** — Ordered list of what to do next
|
|
112
124
|
|
|
125
|
+
### 3b. type=handoff — read HANDOFF.md
|
|
126
|
+
Extract the handoff-specific fields:
|
|
127
|
+
- **Focus For The Receiver** — the load-bearing paragraph; this drives the immediate next action
|
|
128
|
+
- **Sender / Suggested receiver** — model + CLI hints (warn if the current agent is a poor fit, e.g. handoff suggested Codex for a heavy refactor and the receiver is a small model)
|
|
129
|
+
- **Existing Artifacts** — open each referenced path/URL into context BEFORE acting
|
|
130
|
+
- **Decisions Made (do NOT relitigate)** — treat as locked context
|
|
131
|
+
- **Uncommitted changes** — handoffs do NOT stash; verify the listed files still exist in the working tree with `git status --short` and reconcile if drift occurred since the handoff was written
|
|
132
|
+
- **External state the receiver must check** — verify each item (dev server running, PR open, MCP session live) before resuming
|
|
133
|
+
- **Suggested Skills** — use as the next-action recommendation
|
|
134
|
+
|
|
113
135
|
### Check Branch
|
|
114
136
|
```bash
|
|
115
137
|
git branch --show-current
|
|
116
138
|
```
|
|
117
139
|
If not on expected branch: suggest `git checkout {expected-branch}`
|
|
118
140
|
|
|
119
|
-
### Restore Stashed Work
|
|
120
|
-
|
|
141
|
+
### Restore Stashed Work (pause only)
|
|
142
|
+
For `type=pause` ONLY — if CONTINUE.md indicates stashed changes, find and pop the matching stash:
|
|
121
143
|
```bash
|
|
122
144
|
git stash list | grep "apt-pause: {task description}"
|
|
123
145
|
```
|
|
146
|
+
`type=handoff` never stashes; skip this step for handoffs.
|
|
124
147
|
|
|
125
148
|
### Present Context Summary
|
|
126
|
-
Display all key context from
|
|
149
|
+
Display all key context from the artifact, then suggest the next action based on pipeline stage (pause) or Focus + Suggested Skills (handoff).
|
|
127
150
|
|
|
128
151
|
### Clean Up After Resume
|
|
129
152
|
After user confirms they have context:
|
|
130
|
-
- Remove the CONTINUE.md
|
|
131
|
-
- Remove its row from CONTINUE_INDEX.md
|
|
132
|
-
- If the index is now empty, delete
|
|
153
|
+
- Remove the resumed artifact file (`CONTINUE.md` or `HANDOFF.md`)
|
|
154
|
+
- Remove its row from the matching index (`CONTINUE_INDEX.md` or `HANDOFFS_INDEX.md`)
|
|
155
|
+
- If the index is now empty, delete it
|
|
133
156
|
|
|
134
157
|
## 4. Crash Recovery (no CONTINUE, stale active_tasks)
|
|
135
158
|
|
package/skills/apt-run/SKILL.md
CHANGED
|
@@ -17,7 +17,7 @@ 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] [--phase-mode auto|agent-team|sub-agents|sequential]"
|
|
20
|
+
argument-hint: "apt:run [task description] [--skip-review] [--phase-mode auto|agent-team|sub-agents|sequential] [--spar-gates plan[,execute]]"
|
|
21
21
|
gates:
|
|
22
22
|
- constitution-read
|
|
23
23
|
- constitution-coverage
|
|
@@ -58,7 +58,14 @@ As of C32 the STANDARD and DEEP auto pipelines **terminate on review** (`plan
|
|
|
58
58
|
|
|
59
59
|
1. Read `AGENTS.md` if it exists
|
|
60
60
|
2. Parse task description from `$ARGUMENTS` (everything before flags)
|
|
61
|
-
3. Parse flags: `--skip-review`, `--dry-run
|
|
61
|
+
3. Parse flags: `--skip-review`, `--dry-run`, `--phase-mode <mode>`, `--spar-gates <comma-list>`.
|
|
62
|
+
- `--spar-gates <plan|execute|plan,execute>` (FRAMEWORK-RFC-001) — comma-separated stage list to auto-fire `/apt:spar` after. Per-invocation override of `.aperant/config.local.json` `spar.enabled`. On QUICK track, print the verbatim hard-reject line and discard the flag (Fast Path Guarantee — CLAUDE.md):
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
[apt:run] --spar-gates ignored for QUICK track (Fast Path Guarantee)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
On STANDARD / DEEP / DEBUG tracks, the flag is honored and consumed by §3b (plan gate) and §4b (execute gate). Default is to fall back to merged-config `spar.enabled` semantics — see §3b / §4b for the full resolution order. The flag accepts only `plan`, `execute`, or `plan,execute` — any other value is rejected with `[apt:run] --spar-gates accepts plan, execute, or plan,execute`.
|
|
62
69
|
|
|
63
70
|
```bash
|
|
64
71
|
node packages/framework/bin/apt-tools.mjs state .
|
|
@@ -127,6 +134,12 @@ node packages/framework/bin/apt-tools.mjs commit "plan: create implementation pl
|
|
|
127
134
|
|
|
128
135
|
**Output:** spec.md, implementation_plan.json
|
|
129
136
|
|
|
137
|
+
**Spar hint surface (FRAMEWORK-RFC-001).** If merged-config `spar.hint === true` AND `spar.enabled === false`, print:
|
|
138
|
+
```
|
|
139
|
+
[apt] plan complete. /apt:spar available before next stage. (skill, not auto-fire)
|
|
140
|
+
```
|
|
141
|
+
Skip the print on `spar.enabled === true` (the gate handler in §3b already fires).
|
|
142
|
+
|
|
130
143
|
If `--dry-run` flag is set:
|
|
131
144
|
```
|
|
132
145
|
Dry run complete. Plan created but not executed.
|
|
@@ -137,6 +150,51 @@ Remove --dry-run to execute the full pipeline.
|
|
|
137
150
|
```
|
|
138
151
|
Exit.
|
|
139
152
|
|
|
153
|
+
## 3b. Stage 1.5 — Spar Gate (plan)
|
|
154
|
+
|
|
155
|
+
**FRAMEWORK-RFC-001 — auto-fire `/apt:spar` after the plan stage when consent is on.**
|
|
156
|
+
|
|
157
|
+
Resolve effective gates:
|
|
158
|
+
|
|
159
|
+
1. **Track gate.** If track is `QUICK`, **skip this entire section** and continue to §4. QUICK is hard-exempt per CLAUDE.md Fast Path Guarantee. If the user passed `--spar-gates` on a QUICK invocation, §1 already printed the verbatim hard-reject and discarded the flag.
|
|
160
|
+
2. **Read merged config** via `loadMergedProjectConfig(.)`:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
node packages/framework/bin/apt-tools.mjs config show . --merged
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Parse `spar.enabled` (boolean) and `spar.partner` (`'codex' | 'claude' | 'gemini' | null`). When `spar.enabled === true`, build default gates by track: `["plan"]` for STANDARD, `["plan", "execute"]` for DEEP.
|
|
167
|
+
3. **Per-invocation override.** If the user passed `--spar-gates <list>` on the `/apt:run` invocation (parsed in §1), the explicit value WINS over merged-config defaults (per-invocation precedence — classic config precedence).
|
|
168
|
+
4. **Gate check.** If `"plan"` is not in the resolved gate list, skip the rest of this section.
|
|
169
|
+
|
|
170
|
+
If `"plan"` is in the resolved gate list, dispatch the spar gate.
|
|
171
|
+
|
|
172
|
+
**Compose the topic frame (1–2 sentences).** Prefer `spec.md` §Scope (the first paragraph under the `## 1. Scope` heading). If spec.md has no `## 1. Scope` heading (QUICK-skipped or non-PRD-shaped — Open Q4 graceful fallback), use the task description passed to `/apt:run`.
|
|
173
|
+
|
|
174
|
+
**Dispatch `/apt:spar`** with the topic frame. **Pipeline-mode invocation MUST carry `--timeout-ms 120000`** (2-min Bash-rung fast-fail per spec §4.6 "Pipeline-mode timeout rationale" — pipeline gates run under a tighter budget than manual `apt:spar`). **NO `--rounds` flag** (per FRAMEWORK-BUG-038 fix — pipeline gates always defer to the skill default; passing `--rounds 1` would re-introduce the Round 1 unilateral-terminate bug). When `spar.partner` is set in merged config, append `--with <partner>`; when null, omit `--with` and let `apt:spar` use the host-default-partner mapping in `apt-spar/SKILL.md` §3.
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
/apt:spar --timeout-ms 120000 [--with <partner>] <topic-frame-from-spec.md-or-task-description>
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**Pipeline-mode timeout rationale.** `apt-spar/SKILL.md:198` "Timeout calibration" notes that modern partner CLIs commonly spend multiple minutes doing real Read/Grep/Bash investigation, justifying the manual-mode 5-min Bash-rung / 15-min MCP-rung defaults. Pipeline-mode partner queries are NARROWER than manual: the gate prompt is a focused 1-2-sentence frame on a specific just-completed stage, not open-ended brainstorming. 2 minutes is adequate for that narrower scope, and `partner-unreachable` (the rung ladder exhausts within 2 min) skips the gate cleanly without blocking the pipeline. Worst-case DEEP wall budget: 2 gates × 3 rounds × 2 min = 12 min (vs ~90 min before this clamp under MCP-rung partner degradation). MCP-rung tightening is out of scope per Open Q5 — see spec §4.6.
|
|
181
|
+
|
|
182
|
+
**Consent-on but partner-null inline prompt.** If `spar.enabled: true && spar.partner === null` (consent given but no partner detected at install — graceful skip path), prompt the user inline before dispatch (the inline prompt's dispatch ALSO carries `--timeout-ms 120000` and NO `--rounds` flag):
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
[apt:run] Sparring auto-fire is enabled but no partner was set at install. Pick one now ([1] codex / [2] claude / [3] gemini / [s] skip this gate):
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Map response → invoke `/apt:spar --timeout-ms 120000 --with <id> <topic-frame>` (no `--rounds`), or skip the gate. Do NOT write the choice back to `config.local.json` automatically — the user re-runs `/apt:setup` → Pipeline → Sparring Auto-Fire to persist.
|
|
189
|
+
|
|
190
|
+
**After spar returns to natural convergence:**
|
|
191
|
+
|
|
192
|
+
1. Read the spar termination headline (printed inline by `apt:spar/SKILL.md` §9 Layer 1).
|
|
193
|
+
2. Capture the Layer 2 file path from the `Full detail:` line of the headline (e.g. `.aperant/spar/<slug>-<YYYYMMDD-HHMMSS>.md`).
|
|
194
|
+
3. Append both the one-line headline summary AND the Layer 2 file path into the executor's spawn context for §4 (the executor reads spar findings before subtask 1).
|
|
195
|
+
|
|
196
|
+
If the gate emits `partner-unreachable` (rung ladder exhausted within timeout), skip the gate cleanly and continue to §4 — do NOT fail the pipeline.
|
|
197
|
+
|
|
140
198
|
## 4. Stage 2 — Execute (apt:execute)
|
|
141
199
|
|
|
142
200
|
Branch on `PHASE_MODE`:
|
|
@@ -168,6 +226,34 @@ Execute the apt:execute workflow inline:
|
|
|
168
226
|
|
|
169
227
|
**Output:** All subtasks completed, build-progress.json updated
|
|
170
228
|
|
|
229
|
+
**Spar hint surface (FRAMEWORK-RFC-001).** If merged-config `spar.hint === true` AND `spar.enabled === false`, print:
|
|
230
|
+
```
|
|
231
|
+
[apt] execute complete. /apt:spar available before next stage. (skill, not auto-fire)
|
|
232
|
+
```
|
|
233
|
+
Skip on `spar.enabled === true` (the gate handler in §4b already fires).
|
|
234
|
+
|
|
235
|
+
## 4b. Stage 2.5 — Spar Gate (execute)
|
|
236
|
+
|
|
237
|
+
**FRAMEWORK-RFC-001 — auto-fire `/apt:spar` after the execute stage on DEEP (or explicit user opt-in).**
|
|
238
|
+
|
|
239
|
+
Same resolution logic as §3b, but the gate name is `"execute"` and the topic frame is composed from `build-progress.json` (1–2 sentences summarizing the diff that just landed, e.g. "N subtasks completed against the M-file plan; the largest change touched <path>"). If `build-progress.json` is missing or empty, fall back to the task description (Open Q4 graceful fallback).
|
|
240
|
+
|
|
241
|
+
**Track gate:** if track is `QUICK`, skip this section entirely (Fast Path Guarantee). Default gates from merged-config `spar.enabled === true` only include `"execute"` on DEEP. STANDARD does NOT enter this block by default; DEEP does. User-passed `--spar-gates plan,execute` opts STANDARD into this block too (per-invocation precedence).
|
|
242
|
+
|
|
243
|
+
**Gate check:** if `"execute"` is not in the resolved gate list, skip this section.
|
|
244
|
+
|
|
245
|
+
If `"execute"` is in the resolved gate list, dispatch as in §3b — same pipeline-mode budget:
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
/apt:spar --timeout-ms 120000 [--with <partner>] <topic-frame-from-build-progress.json>
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**NO `--rounds` flag** (per FRAMEWORK-BUG-038 — pipeline always defers to skill default). Same `--timeout-ms 120000` 2-min Bash-rung fast-fail as §3b. Same inline-prompt path for the `enabled: true && partner === null` graceful-skip case (the inline-prompt dispatch ALSO carries `--timeout-ms 120000`).
|
|
252
|
+
|
|
253
|
+
After spar returns, parse the termination headline + Layer 2 path and append both into the verifier's spawn context for §5 (the verifier reads execute-gate spar findings alongside its de-anchored re-read).
|
|
254
|
+
|
|
255
|
+
`partner-unreachable` skips the gate cleanly — pipeline continues to §5.
|
|
256
|
+
|
|
171
257
|
## 5. Stage 3 — Verify (apt:verify)
|
|
172
258
|
|
|
173
259
|
**De-anchored re-read (PHASE_MODE=sequential only — roundtable 2026-05-14 R2):**
|
|
@@ -183,6 +269,8 @@ This block exists because the roundtable's STANDARD-track de-anchoring relies on
|
|
|
183
269
|
|
|
184
270
|
Sub-agents and agent-team modes skip this block — they get fresh-context isolation by spawning, which makes the de-anchored re-read redundant.
|
|
185
271
|
|
|
272
|
+
**Spar findings context (FRAMEWORK-RFC-001).** If §3b or §4b dispatched `/apt:spar`, the verifier MUST read the Layer 2 file (`.aperant/spar/<slug>-<YYYYMMDD-HHMMSS>.md`) before scoring — both gate files when DEEP fired both gates. Spar findings flagged as `parallel call-outs` in the Layer 2 file may require `qa_signoff.json` `notes` entries even when not blocking. The headline summary already lives in the verifier's spawn context (appended by §3b / §4b); the Layer 2 read is the load-bearing detail loop.
|
|
273
|
+
|
|
186
274
|
Execute the apt:verify workflow inline:
|
|
187
275
|
|
|
188
276
|
1. Check all subtasks completed
|
|
@@ -200,6 +288,12 @@ Execute the apt:verify workflow inline:
|
|
|
200
288
|
|
|
201
289
|
**Output:** qa_signoff.json with status
|
|
202
290
|
|
|
291
|
+
**Spar hint surface (FRAMEWORK-RFC-001).** If merged-config `spar.hint === true` AND `spar.enabled === false`, print:
|
|
292
|
+
```
|
|
293
|
+
[apt] verify complete. /apt:spar available before next stage. (skill, not auto-fire)
|
|
294
|
+
```
|
|
295
|
+
Skip on `spar.enabled === true` (no verify-stage gate exists in v2 — see spec §8 Out of Scope; this nudge surfaces /apt:spar as a manual option only).
|
|
296
|
+
|
|
203
297
|
If `qa_signoff.json` status is `"rejected"` after max iterations:
|
|
204
298
|
```
|
|
205
299
|
Verification failed after {n} iterations. Issues remain:
|
|
@@ -236,28 +330,32 @@ Execute the apt:review workflow inline (see `apt-review/SKILL.md`):
|
|
|
236
330
|
|
|
237
331
|
**Output:** review.json (written to task directory)
|
|
238
332
|
|
|
333
|
+
**Spar hint surface (FRAMEWORK-RFC-001).** If merged-config `spar.hint === true` AND `spar.enabled === false`, print:
|
|
334
|
+
```
|
|
335
|
+
[apt] review complete. /apt:spar available before next stage. (skill, not auto-fire)
|
|
336
|
+
```
|
|
337
|
+
Skip on `spar.enabled === true` (no pre-ship gate exists in v2 — see spec §8 Out of Scope).
|
|
338
|
+
|
|
239
339
|
**This is the task review, not the PR review.** It runs inline without sub-agents. For heavy multi-agent PR review, use `/apt:pr-review` separately.
|
|
240
340
|
|
|
241
341
|
## 7. Pipeline Summary
|
|
242
342
|
|
|
243
|
-
|
|
244
|
-
Pipeline Complete: {task description}
|
|
343
|
+
Render the phase rail panel verbatim — branch glyphs `┌─ │ └─`, status glyphs `✓` (done) / `●` (active) / `○` (pending/skipped), inline metrics per row drawn from the artifacts written across §3–§6:
|
|
245
344
|
|
|
345
|
+
```
|
|
346
|
+
[APT] Pipeline Complete: {task description}
|
|
347
|
+
┌─ Phase rail: {short task name} ───────────────────
|
|
348
|
+
│ Phase 1 Plan ✓ {n} subtasks
|
|
349
|
+
│ Phase 2 Execute ✓ {completed}/{total} subtasks, {k} commits
|
|
350
|
+
│ Phase 3 Verify ✓ {qa_status} {completeness}/{correctness}/{quality}/{coverage}
|
|
351
|
+
│ Phase 4 Review ✓ {assessment} {scores}, {findings_count} findings ({fixed} fixed)
|
|
352
|
+
└───────────────────────────────────────────────────
|
|
246
353
|
Branch: apt/{sanitized-task-name}
|
|
247
|
-
|
|
248
|
-
1. Plan: spec.md + implementation_plan.json ({n} subtasks)
|
|
249
|
-
2. Execute: {completed}/{total} subtasks completed
|
|
250
|
-
3. Verify: {qa_status} (scores: {completeness}/{correctness}/{quality}/{coverage})
|
|
251
|
-
4. Review: {assessment} ({findings} found, {fixed} fixed, {remaining} remaining)
|
|
252
|
-
|
|
253
|
-
Artifacts:
|
|
254
|
-
- spec.md
|
|
255
|
-
- implementation_plan.json
|
|
256
|
-
- build-progress.json
|
|
257
|
-
- qa_signoff.json
|
|
258
|
-
- review.json
|
|
354
|
+
Artifacts: spec.md · implementation_plan.json · build-progress.json · qa_signoff.json · review.json
|
|
259
355
|
```
|
|
260
356
|
|
|
357
|
+
Substitute live values from the on-disk artifacts: `build-progress.json.completed_subtasks.length` for the commits count, `qa_signoff.json.verdict` + `scores` for verify, `review.json.assessment` + `scores` + `findings.length` for review. Use `●` for a stage still in flight (e.g. verify rejected mid-rerun), `○` only for a stage skipped entirely. The `[APT] Pipeline Complete` header above the panel is the backward-compat marker for external log-grep tooling — keep it.
|
|
358
|
+
|
|
261
359
|
**Always end with a "What's Next" recommendation:**
|
|
262
360
|
|
|
263
361
|
```
|