@aperant/framework 0.10.0 → 0.12.0
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 +236 -1
- package/agents/apt-planner.md +15 -0
- package/agents/apt-verifier.md +15 -10
- package/bin/apt-proof-video.mjs +256 -76
- package/dist/cli/commands/apply-recipe.d.mts +6 -0
- package/dist/cli/commands/apply-recipe.d.mts.map +1 -0
- package/dist/cli/commands/apply-recipe.mjs +98 -0
- package/dist/cli/commands/apply-recipe.mjs.map +1 -0
- package/dist/cli/commands/catch-up.d.mts +9 -0
- package/dist/cli/commands/catch-up.d.mts.map +1 -0
- package/dist/cli/commands/catch-up.mjs +64 -0
- package/dist/cli/commands/catch-up.mjs.map +1 -0
- package/dist/cli/commands/mobile-prepare.d.mts +53 -0
- package/dist/cli/commands/mobile-prepare.d.mts.map +1 -0
- package/dist/cli/commands/mobile-prepare.mjs +139 -0
- package/dist/cli/commands/mobile-prepare.mjs.map +1 -0
- package/dist/cli/commands/pr-review.d.mts +16 -4
- package/dist/cli/commands/pr-review.d.mts.map +1 -1
- package/dist/cli/commands/pr-review.mjs +30 -11
- package/dist/cli/commands/pr-review.mjs.map +1 -1
- package/dist/cli/commands/recipe-diff.d.mts +6 -0
- package/dist/cli/commands/recipe-diff.d.mts.map +1 -0
- package/dist/cli/commands/recipe-diff.mjs +75 -0
- package/dist/cli/commands/recipe-diff.mjs.map +1 -0
- package/dist/cli/commands/roadmap.d.mts.map +1 -1
- package/dist/cli/commands/roadmap.mjs +53 -0
- package/dist/cli/commands/roadmap.mjs.map +1 -1
- package/dist/cli/commands/route.d.mts.map +1 -1
- package/dist/cli/commands/route.mjs +92 -2
- package/dist/cli/commands/route.mjs.map +1 -1
- package/dist/cli/commands/verify-sandbox.d.mts +6 -0
- package/dist/cli/commands/verify-sandbox.d.mts.map +1 -0
- package/dist/cli/commands/verify-sandbox.mjs +200 -0
- package/dist/cli/commands/verify-sandbox.mjs.map +1 -0
- package/dist/cli/config/share-policy.d.mts.map +1 -1
- package/dist/cli/config/share-policy.mjs +1 -0
- package/dist/cli/config/share-policy.mjs.map +1 -1
- package/dist/cli/config/upgrade-gitignore.d.mts.map +1 -1
- package/dist/cli/config/upgrade-gitignore.mjs +1 -0
- package/dist/cli/config/upgrade-gitignore.mjs.map +1 -1
- package/dist/cli/consistency/parse-qa.d.mts.map +1 -1
- package/dist/cli/consistency/parse-qa.mjs +18 -4
- package/dist/cli/consistency/parse-qa.mjs.map +1 -1
- package/dist/cli/consistency/rules/r5-verdict-consistency.d.mts.map +1 -1
- package/dist/cli/consistency/rules/r5-verdict-consistency.mjs +11 -10
- package/dist/cli/consistency/rules/r5-verdict-consistency.mjs.map +1 -1
- package/dist/cli/coordination/catch-up.d.mts +26 -0
- package/dist/cli/coordination/catch-up.d.mts.map +1 -0
- package/dist/cli/coordination/catch-up.mjs +239 -0
- package/dist/cli/coordination/catch-up.mjs.map +1 -0
- package/dist/cli/coordination/last-seen.d.mts +45 -0
- package/dist/cli/coordination/last-seen.d.mts.map +1 -0
- package/dist/cli/coordination/last-seen.mjs +128 -0
- package/dist/cli/coordination/last-seen.mjs.map +1 -0
- package/dist/cli/coordination/store.d.mts +15 -0
- package/dist/cli/coordination/store.d.mts.map +1 -1
- package/dist/cli/coordination/store.mjs +16 -0
- package/dist/cli/coordination/store.mjs.map +1 -1
- package/dist/cli/coverage-check/user-outcomes.d.mts +7 -2
- package/dist/cli/coverage-check/user-outcomes.d.mts.map +1 -1
- package/dist/cli/coverage-check/user-outcomes.mjs +50 -17
- package/dist/cli/coverage-check/user-outcomes.mjs.map +1 -1
- package/dist/cli/dispatch.d.mts.map +1 -1
- package/dist/cli/dispatch.mjs +30 -0
- package/dist/cli/dispatch.mjs.map +1 -1
- package/dist/cli/gate/gates/verify-approved.d.mts +0 -48
- package/dist/cli/gate/gates/verify-approved.d.mts.map +1 -1
- package/dist/cli/gate/gates/verify-approved.mjs +23 -80
- package/dist/cli/gate/gates/verify-approved.mjs.map +1 -1
- package/dist/cli/git/default-branch.d.mts +51 -0
- package/dist/cli/git/default-branch.d.mts.map +1 -0
- package/dist/cli/git/default-branch.mjs +234 -0
- package/dist/cli/git/default-branch.mjs.map +1 -0
- package/dist/cli/git/identity.d.mts +3 -5
- package/dist/cli/git/identity.d.mts.map +1 -1
- package/dist/cli/git/identity.mjs +10 -4
- package/dist/cli/git/identity.mjs.map +1 -1
- package/dist/cli/install/legacy-paths.d.mts.map +1 -1
- package/dist/cli/install/legacy-paths.mjs +2 -0
- package/dist/cli/install/legacy-paths.mjs.map +1 -1
- package/dist/cli/install/mcp-server-specs.d.mts +6 -5
- package/dist/cli/install/mcp-server-specs.d.mts.map +1 -1
- package/dist/cli/install/mcp-server-specs.mjs +22 -4
- package/dist/cli/install/mcp-server-specs.mjs.map +1 -1
- package/dist/cli/roadmap/backend-adapter.d.mts +43 -0
- package/dist/cli/roadmap/backend-adapter.d.mts.map +1 -0
- package/dist/cli/roadmap/backend-adapter.mjs +222 -0
- package/dist/cli/roadmap/backend-adapter.mjs.map +1 -0
- package/dist/cli/util/runtime-capabilities.d.mts +7 -0
- package/dist/cli/util/runtime-capabilities.d.mts.map +1 -1
- package/dist/cli/util/runtime-capabilities.mjs +65 -0
- package/dist/cli/util/runtime-capabilities.mjs.map +1 -1
- package/dist/cli/verify-proof/manifest-validator.mjs +13 -0
- package/dist/cli/verify-proof/manifest-validator.mjs.map +1 -1
- package/dist/cli/verify-proof/resolver.d.mts +10 -7
- package/dist/cli/verify-proof/resolver.d.mts.map +1 -1
- package/dist/cli/verify-proof/resolver.mjs +28 -7
- package/dist/cli/verify-proof/resolver.mjs.map +1 -1
- package/dist/cli/verify-proof/sandbox/apply.d.mts +64 -0
- package/dist/cli/verify-proof/sandbox/apply.d.mts.map +1 -0
- package/dist/cli/verify-proof/sandbox/apply.mjs +379 -0
- package/dist/cli/verify-proof/sandbox/apply.mjs.map +1 -0
- package/dist/cli/verify-proof/sandbox/gate-predicate.d.mts +63 -0
- package/dist/cli/verify-proof/sandbox/gate-predicate.d.mts.map +1 -0
- package/dist/cli/verify-proof/sandbox/gate-predicate.mjs +115 -0
- package/dist/cli/verify-proof/sandbox/gate-predicate.mjs.map +1 -0
- package/dist/cli/verify-proof/sandbox/pattern-matcher.d.mts +57 -0
- package/dist/cli/verify-proof/sandbox/pattern-matcher.d.mts.map +1 -0
- package/dist/cli/verify-proof/sandbox/pattern-matcher.mjs +124 -0
- package/dist/cli/verify-proof/sandbox/pattern-matcher.mjs.map +1 -0
- package/dist/cli/verify-proof/sandbox/recipe-diff.d.mts +28 -0
- package/dist/cli/verify-proof/sandbox/recipe-diff.d.mts.map +1 -0
- package/dist/cli/verify-proof/sandbox/recipe-diff.mjs +190 -0
- package/dist/cli/verify-proof/sandbox/recipe-diff.mjs.map +1 -0
- package/dist/cli/verify-proof/sandbox/sandbox-config.d.mts +25 -0
- package/dist/cli/verify-proof/sandbox/sandbox-config.d.mts.map +1 -0
- package/dist/cli/verify-proof/sandbox/sandbox-config.mjs +85 -0
- package/dist/cli/verify-proof/sandbox/sandbox-config.mjs.map +1 -0
- package/dist/cli/verify-proof/sandbox/self-test.d.mts +39 -0
- package/dist/cli/verify-proof/sandbox/self-test.d.mts.map +1 -0
- package/dist/cli/verify-proof/sandbox/self-test.mjs +248 -0
- package/dist/cli/verify-proof/sandbox/self-test.mjs.map +1 -0
- package/dist/plugin/.claude-plugin/plugin.json +2 -1
- package/dist/plugin/agents/apt-planner.md +15 -0
- package/dist/plugin/agents/apt-verifier.md +15 -10
- package/dist/plugin/skills/apt/SKILL.md +29 -0
- package/dist/plugin/skills/apt-catch-up/SKILL.md +79 -0
- package/dist/plugin/skills/apt-plan/SKILL.md +23 -0
- package/dist/plugin/skills/apt-pr-review/SKILL.md +5 -4
- package/dist/plugin/skills/apt-run/SKILL.md +1 -1
- package/dist/plugin/skills/apt-setup/SKILL.md +132 -0
- package/dist/plugin/skills/apt-verify/SKILL.md +20 -15
- package/dist/plugin/skills/apt-verify-proof/SKILL.md +146 -11
- package/dist/proof-report.d.ts.map +1 -1
- package/dist/proof-report.js +4 -1
- package/dist/proof-report.js.map +1 -1
- package/dist/types/config.d.ts +42 -4
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/qa-scoring.d.ts +45 -9
- package/dist/types/qa-scoring.d.ts.map +1 -1
- package/dist/types/qa-scoring.js +34 -13
- package/dist/types/qa-scoring.js.map +1 -1
- package/dist/types/state.d.ts +7 -2
- package/dist/types/state.d.ts.map +1 -1
- package/dist/types/task-record.d.ts +10 -2
- package/dist/types/task-record.d.ts.map +1 -1
- package/drivers/mobile/README.md +40 -0
- package/drivers/mobile/driver.mjs +106 -0
- package/drivers/mobile/manifest.json +49 -0
- package/package.json +1 -1
- package/prompts/inbox-clarification.md +11 -0
- package/prompts/inbox-triage.md +20 -0
- package/prompts/qa_orchestrator_agentic.md +18 -17
- package/prompts/qa_reviewer.md +17 -15
- package/skills/apt/SKILL.md +29 -0
- package/skills/apt-catch-up/SKILL.md +79 -0
- package/skills/apt-plan/SKILL.md +23 -0
- package/skills/apt-pr-review/SKILL.md +5 -4
- package/skills/apt-run/SKILL.md +1 -1
- package/skills/apt-setup/SKILL.md +132 -0
- package/skills/apt-verifier.md +7 -4
- package/skills/apt-verify/SKILL.md +20 -15
- package/skills/apt-verify-proof/SKILL.md +146 -11
- package/src/cli/commands/apply-recipe.mjs +105 -0
- package/src/cli/commands/catch-up.mjs +67 -0
- package/src/cli/commands/mobile-prepare.mjs +151 -0
- package/src/cli/commands/pr-review.mjs +32 -11
- package/src/cli/commands/recipe-diff.mjs +81 -0
- package/src/cli/commands/roadmap.mjs +54 -0
- package/src/cli/commands/route.mjs +92 -1
- package/src/cli/commands/verify-sandbox.mjs +231 -0
- package/src/cli/config/share-policy.mjs +1 -0
- package/src/cli/config/upgrade-gitignore.mjs +1 -0
- package/src/cli/consistency/parse-qa.mjs +20 -4
- package/src/cli/consistency/rules/r5-verdict-consistency.mjs +11 -13
- package/src/cli/coordination/catch-up.mjs +231 -0
- package/src/cli/coordination/last-seen.mjs +131 -0
- package/src/cli/coordination/store.mjs +18 -0
- package/src/cli/coverage-check/user-outcomes.mjs +52 -17
- package/src/cli/dispatch.mjs +29 -0
- package/src/cli/gate/gates/verify-approved.mjs +22 -81
- package/src/cli/git/default-branch.mjs +250 -0
- package/src/cli/git/identity.mjs +9 -3
- package/src/cli/install/legacy-paths.mjs +2 -0
- package/src/cli/install/mcp-server-specs.mjs +24 -4
- package/src/cli/roadmap/backend-adapter.mjs +231 -0
- package/src/cli/util/runtime-capabilities.mjs +67 -0
- package/src/cli/verify-proof/manifest-validator.mjs +15 -0
- package/src/cli/verify-proof/resolver.mjs +27 -7
- package/src/cli/verify-proof/sandbox/apply.mjs +401 -0
- package/src/cli/verify-proof/sandbox/gate-predicate.mjs +126 -0
- package/src/cli/verify-proof/sandbox/pattern-matcher.mjs +127 -0
- package/src/cli/verify-proof/sandbox/recipe-diff.mjs +208 -0
- package/src/cli/verify-proof/sandbox/sandbox-config.mjs +82 -0
- package/src/cli/verify-proof/sandbox/sandbox-schema.json +33 -0
- package/src/cli/verify-proof/sandbox/self-test.mjs +265 -0
- package/templates/config.json +21 -1
- package/templates/proof-verification.md +27 -8
- package/workflows/verify-proof.md +376 -302
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: apt:catch-up
|
|
3
|
+
description: "Re-view the catch-up panel (Welcome-Back + Team-Change Digest) on demand"
|
|
4
|
+
apt-skill-version: {{APT_VERSION}}
|
|
5
|
+
stage: resume
|
|
6
|
+
intent: capture
|
|
7
|
+
when_to_use: "The user dismissed the auto catch-up panel on their last /apt and wants to re-summon it — an idempotent re-view of where they left off plus what teammates merged. Distinct from /apt:resume (full context restore) and never advances the Last-Seen Marker."
|
|
8
|
+
user_invocable: true
|
|
9
|
+
internal: false
|
|
10
|
+
spawns_agent: false
|
|
11
|
+
agent_name: null
|
|
12
|
+
task_context: none
|
|
13
|
+
default_execution_mode: auto
|
|
14
|
+
execution_modes:
|
|
15
|
+
- auto
|
|
16
|
+
allowed-tools: "Bash, Read"
|
|
17
|
+
argument-hint: "apt:catch-up"
|
|
18
|
+
gates: []
|
|
19
|
+
---
|
|
20
|
+
<objective>
|
|
21
|
+
Recompute and display the combined catch-up panel — the **Welcome-Back
|
|
22
|
+
Summary** (your most-recently-active task, phase, next step) and the
|
|
23
|
+
**Team-Change Digest** (the PRs teammates merged to main since you last
|
|
24
|
+
pulled) — exactly as the auto-on-apt display would show it, but **without
|
|
25
|
+
advancing the Last-Seen Marker**. This is a read-only re-view: a user who
|
|
26
|
+
dismissed the auto panel can re-summon it without disturbing the baseline and
|
|
27
|
+
without invoking the heavier `/apt:resume`.
|
|
28
|
+
</objective>
|
|
29
|
+
|
|
30
|
+
<your_environment>
|
|
31
|
+
- **Working directory:** The project root (where you were invoked)
|
|
32
|
+
- **apt-tools:** `node packages/framework/bin/apt-tools.mjs` or the installed `apt-tools` binary
|
|
33
|
+
- **Last-Seen Marker:** `.aperant/last-seen/{email-slug}.json` (gitignored, per-machine) — this skill READS it but NEVER writes it.
|
|
34
|
+
</your_environment>
|
|
35
|
+
|
|
36
|
+
<process>
|
|
37
|
+
|
|
38
|
+
## 1. Recompute the panel (read-only)
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
node packages/framework/bin/apt-tools.mjs catch-up .
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This computes the SAME panel the interactive route call produces, against the
|
|
45
|
+
**current** marker — and deliberately does **NOT** call `advanceLastSeen`
|
|
46
|
+
(recompute-only contract). Parse the JSON `catch_up` field from the envelope.
|
|
47
|
+
|
|
48
|
+
## 2. Render the panel
|
|
49
|
+
|
|
50
|
+
Render exactly as the `apt/SKILL.md` "Catch-up panel" block does — Welcome-Back
|
|
51
|
+
half first, then the Team-Change Digest half. Omit a half whose field is null.
|
|
52
|
+
|
|
53
|
+
If `catch_up` is null, tell the user there is nothing new since their last
|
|
54
|
+
visit (no active stale task and no new merges on main).
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
Where you left off: {description} — {lifecycle_phase} · subtask {current_subtask} ({relative_time})
|
|
58
|
+
Next: {next_step}
|
|
59
|
+
(+{others_count} others · /apt:resume)
|
|
60
|
+
|
|
61
|
+
While you were away:
|
|
62
|
+
#{number} {title} — {author}
|
|
63
|
+
+{more_count} more on main
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
</process>
|
|
67
|
+
|
|
68
|
+
<notes>
|
|
69
|
+
- **Never advances the marker.** Unlike the auto-on-apt display (which advances
|
|
70
|
+
the Last-Seen Marker after the panel is evaluated), this command is purely a
|
|
71
|
+
re-view. Re-running it is idempotent.
|
|
72
|
+
- **Distinct from `/apt:resume`.** Resume restores full context and routes to
|
|
73
|
+
the next action; catch-up is a lightweight orientation re-view.
|
|
74
|
+
- **v1 is lazy compute.** The panel is computed on demand here, bounded by the
|
|
75
|
+
commits since your last pull. A background pre-warm worker (like the
|
|
76
|
+
update-check worker) is a tracked follow-up (LD-12), not part of v1.
|
|
77
|
+
- **Vocabulary.** This is the Welcome-Back Summary + Team-Change Digest — not an
|
|
78
|
+
"activity feed", "changelog", or "notifications".
|
|
79
|
+
</notes>
|
package/skills/apt-plan/SKILL.md
CHANGED
|
@@ -209,6 +209,8 @@ see the gate table below.}
|
|
|
209
209
|
**Epic:** {one-sentence user-facing capability headline}
|
|
210
210
|
|
|
211
211
|
- **ON** [surface]: {user does X; system shows/does Y}
|
|
212
|
+
- {indented inferred sub-check derived by the planning LLM}
|
|
213
|
+
- {another inferred sub-check}
|
|
212
214
|
- **ON** [surface]: {user does X; system shows/does Y} *(requires ON 1)*
|
|
213
215
|
- **ON** [electron+web]: {cross-surface outcome — runs twice, once per surface}
|
|
214
216
|
|
|
@@ -246,6 +248,27 @@ ID. Subtasks reference these IDs via their per-subtask
|
|
|
246
248
|
plan-coverage-check input.}
|
|
247
249
|
```
|
|
248
250
|
|
|
251
|
+
### Inferred sub-checks (v0.9.0 — verify-proof-v2-outcome-walker)
|
|
252
|
+
|
|
253
|
+
Under each `**ON**` parent bullet, write indented child bullets (2-space
|
|
254
|
+
prefix + `- `) representing inferred sub-checks the planning LLM derives
|
|
255
|
+
from the outcome prose + surface. These are NOT user-written invariants;
|
|
256
|
+
they are the planner's judgment of "what else must be true for this
|
|
257
|
+
outcome to be approved." The verify-proof runner walks each inferred
|
|
258
|
+
child the same way it walks the parent.
|
|
259
|
+
|
|
260
|
+
Worked example (copy this shape verbatim into spec.md):
|
|
261
|
+
|
|
262
|
+
- **ON** [electron]: Clicking 'Settings' opens the settings modal.
|
|
263
|
+
- The modal traps focus on the close button.
|
|
264
|
+
- Clicking outside the modal closes it.
|
|
265
|
+
- Pressing Esc closes it and returns focus to the trigger.
|
|
266
|
+
|
|
267
|
+
**NO `patterns/` library, NO `surfaces/<name>/manifest.json` tree, NO
|
|
268
|
+
`OUTCOMES.md` file** — inferred bullets live IN spec.md. The author
|
|
269
|
+
edits spec.md once if the inferred list is wrong; the runner does not
|
|
270
|
+
re-derive them at proof time.
|
|
271
|
+
|
|
249
272
|
**`## User Outcomes` is the verify-proof input contract (STANDARD/DEEP
|
|
250
273
|
only — QUICK is hard-exempt per ID-05 / Fast Path Guarantee).** The
|
|
251
274
|
section sits between `## User Stories` (product motivation prose) and
|
|
@@ -247,10 +247,11 @@ The command resolves in this precedence order:
|
|
|
247
247
|
|
|
248
248
|
1. `config.json:pr_review.authorship_overrides['pr-${PR_NUMBER}']` (per-PR pin)
|
|
249
249
|
2. `config.json:pr_review.authorship_override` (global: `owned` | `external` | `auto`)
|
|
250
|
-
3. `gh pr view` → `
|
|
251
|
-
-
|
|
252
|
-
-
|
|
253
|
-
|
|
250
|
+
3. `gh pr view` → `gh.author.login` vs. viewer login (G44 — `owned` means a PR you **authored**, not a branch you can push to)
|
|
251
|
+
- Same-repo branch AND `gh.author.login === viewer login` → **owned**
|
|
252
|
+
- Any other same-repo PR (a teammate's, or a repo-`OWNER` viewing someone else's PR) → **external** (`authorAssociation` is no longer consulted for the `owned` decision — it is retained only in the human-readable signal)
|
|
253
|
+
- Fork (head-repo owner ≠ base-repo owner) → **external**
|
|
254
|
+
4. Offline / gh unavailable / ambiguous payload → **unknown** (treated as `external` for safety, see below)
|
|
254
255
|
|
|
255
256
|
When the result is `unknown`, treat it as `external` for safety and prompt the user:
|
|
256
257
|
|
package/skills/apt-run/SKILL.md
CHANGED
|
@@ -281,7 +281,7 @@ Execute the apt:verify workflow inline:
|
|
|
281
281
|
6. Score on 4 dimensions (completeness, correctness, quality, coverage)
|
|
282
282
|
7. Fix all issues found — every severity, not just critical (up to 4 iterations: first 2 discovery, last 2 verification-only)
|
|
283
283
|
8. Write qa_signoff.json
|
|
284
|
-
9. If `status` is `approved
|
|
284
|
+
9. If `status` is `approved`, flip lifecycle to `reviewing` so Stage 4 (or `/apt:ship` when review is skipped) finds the task in the correct from-state. Skip this step entirely on `rejected` (fix the code and re-run) or `needs_human` (install the missing driver transport and re-run /apt:verify-proof):
|
|
285
285
|
```bash
|
|
286
286
|
node packages/framework/bin/apt-tools.mjs task update . --id {task-id} --lifecycle-phase reviewing
|
|
287
287
|
```
|
|
@@ -205,6 +205,7 @@ AskUserQuestion([
|
|
|
205
205
|
- "Visibility" → jump to **Step 3e** (Batch 6 only), then skip to **Step 4** and **Step 5**
|
|
206
206
|
- "Task Tracking" → jump to **Step 3g** (Batch 8 only), then skip to **Step 4** and **Step 5**
|
|
207
207
|
- "Changelog & Release Notes" → jump to **Step 3h** (Batch 9 only), then skip to **Step 4** and **Step 5**
|
|
208
|
+
- "Collaboration" → jump to **Step 3i** (Batch 10 only), then skip to **Step 4** and **Step 5**
|
|
208
209
|
- "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.
|
|
209
210
|
- "Done" → display "Settings unchanged." and exit
|
|
210
211
|
|
|
@@ -306,6 +307,62 @@ AskUserQuestion([
|
|
|
306
307
|
])
|
|
307
308
|
```
|
|
308
309
|
|
|
310
|
+
### Sandbox-setup hook — parallel /apt:verify-proof (FRAMEWORK milestone fw-sandbox-parallel-verify-proof)
|
|
311
|
+
|
|
312
|
+
Gated on THREE conditions ALL true (ID-08):
|
|
313
|
+
|
|
314
|
+
1. `verification.sandbox` is ABSENT from `.aperant/config.json` (the
|
|
315
|
+
adopter has not opted in yet — once configured this hook never
|
|
316
|
+
fires again).
|
|
317
|
+
2. `host.capabilities.structured_prompts === true` (the host supports
|
|
318
|
+
native question dialogs — Claude Code, Gemini CLI, OpenCode).
|
|
319
|
+
3. `process.stdout.isTTY === true` (interactive shell — never block CI
|
|
320
|
+
or fan-out child terminals on a setup prompt).
|
|
321
|
+
|
|
322
|
+
When all three hold, ask one yes/no question:
|
|
323
|
+
|
|
324
|
+
```
|
|
325
|
+
AskUserQuestion([
|
|
326
|
+
{
|
|
327
|
+
question: "Parallel /apt:verify-proof is not configured. Run setup now?",
|
|
328
|
+
header: "Sandbox Setup",
|
|
329
|
+
multiSelect: false,
|
|
330
|
+
options: [
|
|
331
|
+
{ label: "Yes — set up parallel verify-proof", description: "Walk recipe-diff one change at a time, then apply-recipe with --confirm --accept-all once you've reviewed all four, then verify-sandbox" },
|
|
332
|
+
{ label: "Not now", description: "Skip; re-prompted on next /apt:setup if still unconfigured" }
|
|
333
|
+
]
|
|
334
|
+
}
|
|
335
|
+
])
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
On `Yes`, dispatch the three sandbox commands in order, surfacing the
|
|
339
|
+
output of each to the user before moving to the next. The CLI defaults
|
|
340
|
+
to skipping every change when `--confirm` is passed without
|
|
341
|
+
`--accept-all` (ID-02 fail-safe), so the interactive flow walks the
|
|
342
|
+
adopter through each change in the diff first, then applies once they
|
|
343
|
+
confirm:
|
|
344
|
+
|
|
345
|
+
```bash
|
|
346
|
+
apt-tools recipe-diff . # preview, no writes
|
|
347
|
+
# (host CLI shows each change in the Markdown diff to the user)
|
|
348
|
+
# (host CLI asks: "All four changes accepted? [y/N]")
|
|
349
|
+
apt-tools apply-recipe . --confirm --accept-all
|
|
350
|
+
apt-tools verify-sandbox .
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
On `Not now`, continue with the rest of /apt:setup unchanged.
|
|
354
|
+
|
|
355
|
+
**Non-interactive surfaces** (CI runs, fan-out child terminals, headless
|
|
356
|
+
agents — `host.capabilities.structured_prompts === false` OR
|
|
357
|
+
`process.stdout.isTTY === false`) SKIP this hook entirely. Print a
|
|
358
|
+
one-line stderr tip:
|
|
359
|
+
|
|
360
|
+
```
|
|
361
|
+
[apt] tip: run `/apt:verify-proof setup` from an interactive terminal to enable parallel verification
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
and continue. NEVER block on a setup prompt in a non-interactive context.
|
|
365
|
+
|
|
309
366
|
## 3. Present Settings (Batch 2: Pipeline)
|
|
310
367
|
|
|
311
368
|
```
|
|
@@ -1180,6 +1237,74 @@ The selective-edit pass through Batch 9 MUST respect the §1b dispatch — it do
|
|
|
1180
1237
|
|
|
1181
1238
|
---
|
|
1182
1239
|
|
|
1240
|
+
## 3i. Present Settings (Batch 10: Collaboration Catch-Up)
|
|
1241
|
+
|
|
1242
|
+
The **collaboration catch-up** surfaces show on every interactive (TTY) `/apt`
|
|
1243
|
+
call: a **Welcome-Back Summary** (your most-recently-active task + next step,
|
|
1244
|
+
always-on, local-only) and a **Team-Change Digest** (the PRs teammates merged
|
|
1245
|
+
to main since you last pulled — gated to `share.visibility` `team`/`oss`).
|
|
1246
|
+
Written to `.aperant/config.json.collaboration`.
|
|
1247
|
+
|
|
1248
|
+
```
|
|
1249
|
+
AskUserQuestion([
|
|
1250
|
+
{
|
|
1251
|
+
question: "Show the Welcome-Back Summary when you return after a break?",
|
|
1252
|
+
header: "Welcome-Back",
|
|
1253
|
+
multiSelect: false,
|
|
1254
|
+
options: [
|
|
1255
|
+
{ label: "Yes (Recommended)", description: "On your next /apt after the staleness window, surface where you left off — task, phase, next step. Local only." },
|
|
1256
|
+
{ label: "No", description: "Never show the welcome-back nudge." }
|
|
1257
|
+
]
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
question: "How many hours away before the Welcome-Back Summary fires?",
|
|
1261
|
+
header: "Threshold (hours)",
|
|
1262
|
+
multiSelect: false,
|
|
1263
|
+
options: [
|
|
1264
|
+
{ label: "16 (Recommended)", description: "Roughly 'since yesterday' — fires after an overnight gap." },
|
|
1265
|
+
{ label: "8", description: "Fires after a long lunch / half-day gap." },
|
|
1266
|
+
{ label: "24", description: "Once-a-day cadence." }
|
|
1267
|
+
]
|
|
1268
|
+
},
|
|
1269
|
+
{
|
|
1270
|
+
question: "Show the Team-Change Digest (teammates' merged PRs since your last pull)?",
|
|
1271
|
+
header: "Team Digest",
|
|
1272
|
+
multiSelect: false,
|
|
1273
|
+
options: [
|
|
1274
|
+
{ label: "Yes (Recommended)", description: "Only computes when share.visibility is team/oss; reads local git history, never fetches." },
|
|
1275
|
+
{ label: "No", description: "Never show the digest, even in team/oss mode." }
|
|
1276
|
+
]
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
question: "Maximum PRs to list in the digest before '+N more on main'?",
|
|
1280
|
+
header: "Digest Max Entries",
|
|
1281
|
+
multiSelect: false,
|
|
1282
|
+
options: [
|
|
1283
|
+
{ label: "7 (Recommended)", description: "Low-noise ceiling; the rest collapse into a '+N more' tail." },
|
|
1284
|
+
{ label: "5", description: "Tighter." },
|
|
1285
|
+
{ label: "12", description: "Roomier." }
|
|
1286
|
+
]
|
|
1287
|
+
}
|
|
1288
|
+
])
|
|
1289
|
+
```
|
|
1290
|
+
|
|
1291
|
+
For hosts without structured prompts, present the same four questions as
|
|
1292
|
+
numbered lists (Batch 5 style) and read single-index responses.
|
|
1293
|
+
|
|
1294
|
+
### 3i.1 Review-Mode routing entry
|
|
1295
|
+
|
|
1296
|
+
The "1b. Review Mode" routing table (§1b) includes "Collaboration" as a
|
|
1297
|
+
selectable edit target — jumping directly back into this Batch 10 picker.
|
|
1298
|
+
|
|
1299
|
+
### 3i.2 Confirmation row
|
|
1300
|
+
|
|
1301
|
+
Add a row to the Step 8 table:
|
|
1302
|
+
```
|
|
1303
|
+
| Collaboration | welcome-back {on/off} ({N}h) · team-digest {on/off} (max {M}) |
|
|
1304
|
+
```
|
|
1305
|
+
|
|
1306
|
+
---
|
|
1307
|
+
|
|
1183
1308
|
## 4. Map Answers to Config
|
|
1184
1309
|
|
|
1185
1310
|
**AUDIT-001 — file-routing contract for per-device fields (UPDATED 0.8.1 for FRAMEWORK-RFC-001):** the
|
|
@@ -1295,6 +1420,12 @@ Note: task ids are slug-first since v0.6.6 — the date-format setting controls
|
|
|
1295
1420
|
- "Sub-Agents" → `"sub-agents"`
|
|
1296
1421
|
- "Sequential" → `"sequential"`
|
|
1297
1422
|
|
|
1423
|
+
**Collaboration Catch-Up (Batch 10):**
|
|
1424
|
+
- Welcome-Back "Yes" → `collaboration.welcome_back.enabled: true`, "No" → `false`
|
|
1425
|
+
- Threshold → `collaboration.welcome_back.threshold_hours: <8|16|24>`
|
|
1426
|
+
- Team Digest "Yes" → `collaboration.team_digest.enabled: true`, "No" → `false`
|
|
1427
|
+
- Digest Max Entries → `collaboration.team_digest.max_entries: <5|7|12>`
|
|
1428
|
+
|
|
1298
1429
|
## 5. Write Config
|
|
1299
1430
|
|
|
1300
1431
|
Write merged config to two files per AUDIT-001 routing (see Step 4 block):
|
|
@@ -1402,6 +1533,7 @@ Display:
|
|
|
1402
1533
|
| Debate Mode | {Auto / Agent Team / Sub-Agents / Sequential} |
|
|
1403
1534
|
| Visibility | {solo / team / oss} (overrides if any) |
|
|
1404
1535
|
| Changelog & Release Notes | dev: {Yes/No}; release-notes: {Yes/No} (audience, persona-filter) |
|
|
1536
|
+
| Collaboration | welcome-back {on/off} ({N}h) · team-digest {on/off} (max {M}) |
|
|
1405
1537
|
| Saved as Defaults | {Yes/No} |
|
|
1406
1538
|
|
|
1407
1539
|
Config saved to: .aperant/config.json
|
package/skills/apt-verifier.md
CHANGED
|
@@ -50,10 +50,13 @@ Record pass/fail and details for each.
|
|
|
50
50
|
| **Code Quality** | Clean, idiomatic, lint-clean | Good, minor style issues | Acceptable, needs cleanup | Poor quality | Unacceptable |
|
|
51
51
|
| **Test Coverage** | Comprehensive, edge cases | Good main-path coverage | Basic tests exist | Minimal tests | No coverage |
|
|
52
52
|
|
|
53
|
-
## 4. Derive Verdict
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
## 4. Derive Verdict (v0.9.0 two-gate envelope)
|
|
54
|
+
|
|
55
|
+
Verdict is the closed set `{approved, rejected, needs_human}`. Derived from the two-gate envelope (`automation_gate` AND `proof_gate`); dimensions are informational rationale only.
|
|
56
|
+
|
|
57
|
+
- **approved:** `automation_gate: pass` AND `proof_gate: pass`.
|
|
58
|
+
- **needs_human:** `automation_gate: pass` AND `proof_gate: fail` (typically: a UI-surface outcome lacked driver transport — see `/apt:verify-proof`).
|
|
59
|
+
- **rejected:** `automation_gate: fail` (any of lint/typecheck/tests red) OR critical findings unresolved.
|
|
57
60
|
|
|
58
61
|
## 5. Write QA Sign-off
|
|
59
62
|
Write `{task_dir}/qa_signoff.json` with scores, checks, issues, and verdict.
|
|
@@ -211,15 +211,15 @@ Rate each of the 4 dimensions on a 1-10 scale using the rubrics below. Provide a
|
|
|
211
211
|
- **3-4:** Minimal tests, many untested paths
|
|
212
212
|
- **1-2:** No meaningful test coverage
|
|
213
213
|
|
|
214
|
-
### Verdict Derivation
|
|
214
|
+
### Verdict Derivation (v0.9.0 two-gate envelope)
|
|
215
215
|
|
|
216
|
-
|
|
216
|
+
Verdict is the closed set `{approved, rejected, needs_human}`. It derives from the two-gate envelope (`automation_gate` AND `proof_gate`); dimensions are informational rationale only.
|
|
217
217
|
|
|
218
|
-
- **approved** --
|
|
219
|
-
- **
|
|
220
|
-
- **rejected** --
|
|
218
|
+
- **approved** -- `automation_gate: pass` AND `proof_gate: pass` AND no critical issues
|
|
219
|
+
- **needs_human** -- `automation_gate: pass` AND `proof_gate: fail` (typically: UI-surface outcome lacked driver transport; the human must install it and re-run /apt:verify-proof)
|
|
220
|
+
- **rejected** -- `automation_gate: fail` (any of lint/typecheck/tests red) OR critical issues unresolved
|
|
221
221
|
|
|
222
|
-
|
|
222
|
+
The `deriveVerdict({automation_gate, proof_gate})` helper in `packages/framework/src/types/qa-scoring.ts` is the canonical mapping. The legacy `approved_with_notes` middle band is deleted in v0.9.0+; reading the legacy value from a stale `qa_signoff.json` crashes the consumer with a clear migration error.
|
|
223
223
|
|
|
224
224
|
## 6. Fix-Verify Loop (max 4 iterations)
|
|
225
225
|
|
|
@@ -272,7 +272,7 @@ Create `qa_signoff.json` using the `ScoredQASignoff` format (see `packages/frame
|
|
|
272
272
|
|
|
273
273
|
```json
|
|
274
274
|
{
|
|
275
|
-
"status": "approved|
|
|
275
|
+
"status": "approved|rejected|needs_human",
|
|
276
276
|
"timestamp": "{ISO date}",
|
|
277
277
|
"iterations": 1,
|
|
278
278
|
"dimensions": [
|
|
@@ -281,6 +281,10 @@ Create `qa_signoff.json` using the `ScoredQASignoff` format (see `packages/frame
|
|
|
281
281
|
{ "dimension": "code_quality", "score": 7, "rationale": "Clean code, follows conventions" },
|
|
282
282
|
{ "dimension": "test_coverage", "score": 7, "rationale": "Good coverage of main paths" }
|
|
283
283
|
],
|
|
284
|
+
"gates": {
|
|
285
|
+
"automation_gate": "pass",
|
|
286
|
+
"proof_gate": "pass"
|
|
287
|
+
},
|
|
284
288
|
"checks": {
|
|
285
289
|
"tests": { "status": "pass", "count": 42, "failures": [] },
|
|
286
290
|
"typecheck": { "status": "pass", "errors": [] },
|
|
@@ -293,10 +297,10 @@ Create `qa_signoff.json` using the `ScoredQASignoff` format (see `packages/frame
|
|
|
293
297
|
|
|
294
298
|
The `dimensions` array must contain exactly the 4 dimensions defined in `QA_DIMENSIONS`: `completeness`, `correctness`, `code_quality`, `test_coverage`. Each entry includes a numeric `score` (1-10) and a `rationale` string explaining the score.
|
|
295
299
|
|
|
296
|
-
The `status` field
|
|
297
|
-
-
|
|
298
|
-
-
|
|
299
|
-
-
|
|
300
|
+
The `status` field derives from the two gates:
|
|
301
|
+
- `automation_gate: pass` AND `proof_gate: pass`: `"approved"`
|
|
302
|
+
- `automation_gate: pass` AND `proof_gate: fail`: `"needs_human"`
|
|
303
|
+
- `automation_gate: fail` OR critical issues unresolved: `"rejected"`
|
|
300
304
|
|
|
301
305
|
```bash
|
|
302
306
|
node packages/framework/bin/apt-tools.mjs commit "qa: verification {status}" --files qa_signoff.json
|
|
@@ -304,10 +308,11 @@ node packages/framework/bin/apt-tools.mjs commit "qa: verification {status}" --f
|
|
|
304
308
|
|
|
305
309
|
### Mark lifecycle phase as `reviewing` (approved path only)
|
|
306
310
|
|
|
307
|
-
If `status` is `approved
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
`
|
|
311
|
+
If `status` is `approved`, flip the task's lifecycle phase so the next stage
|
|
312
|
+
(`/apt:review`, or `/apt:ship` if review is skipped) finds the task in the
|
|
313
|
+
correct from-state. Skip this transition on `rejected` (the task stays in
|
|
314
|
+
`verifying` until the user re-runs after fixes) or `needs_human` (re-run
|
|
315
|
+
/apt:verify-proof after installing the missing driver transport).
|
|
311
316
|
|
|
312
317
|
```bash
|
|
313
318
|
node packages/framework/bin/apt-tools.mjs task update . --id {task-id} --lifecycle-phase reviewing
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: apt:verify-proof
|
|
3
|
-
description: "
|
|
3
|
+
description: "Outcome walker — drives spec.md `## User Outcomes` one at a time, captures surface-appropriate evidence, derives a two-gate verdict ({approved, rejected, needs_human}). Fails closed on file-evidence for UI surfaces."
|
|
4
4
|
apt-skill-version: {{APT_VERSION}}
|
|
5
5
|
stage: verify
|
|
6
6
|
intent: ship
|
|
@@ -105,14 +105,58 @@ disable the walk entirely (root-only behaviour, backwards compat).
|
|
|
105
105
|
The `verification.runtimes[]` override stays the final escape hatch
|
|
106
106
|
and is now usually unnecessary because the walk runs by default.
|
|
107
107
|
|
|
108
|
-
### Bundled drivers (
|
|
108
|
+
### Bundled drivers (6)
|
|
109
109
|
|
|
110
110
|
- **browser** (priority=100, ga) — Next.js / vanilla web frontends.
|
|
111
111
|
- **electron** (priority=90, ga) — Electron desktop apps.
|
|
112
112
|
- **tauri** (priority=85, ga) — Tauri desktop apps.
|
|
113
|
+
- **mobile** (priority=80, ga) — iOS + Android (Expo / React Native / native) via `mobile-mcp`. App build/launch is owned by `apt-tools mobile prepare`, not the driver.
|
|
113
114
|
- **cli** (priority=60, ga) — headless CI, output-shape assertions.
|
|
114
115
|
- **api** (priority=50, ga) — HTTP / JSON-API regression tests.
|
|
115
116
|
|
|
117
|
+
> **Precondition.** When `--parallel` is requested, the sandbox gate at apt-verify-proof/SKILL.md Step 2c runs BEFORE this step. An unverified sandbox exits with `{status:"error", code:"E_SANDBOX_UNVERIFIED", verdict:"needs_human", reason:"sandbox_unverified"}` without loading any MCP driver tools or entering the outcome-walker loop. See `docs/verify-proof-sandbox-patterns.md` for setup.
|
|
118
|
+
|
|
119
|
+
### Deferred-tool discovery (Claude Code / OpenCode hosts) — A5 fix
|
|
120
|
+
|
|
121
|
+
On Claude Code and OpenCode hosts, MCP driver tools listed under
|
|
122
|
+
`drivers/<surface>/manifest.json :: transport.mcp_server_id` are
|
|
123
|
+
**deferred** — they live in the host's MCP server registry but their
|
|
124
|
+
schemas are NOT loaded by default. Before driving any UI-surface
|
|
125
|
+
outcome the workflow runner MUST load them via `ToolSearch(query='select:...')`.
|
|
126
|
+
|
|
127
|
+
**Worked example.** For the bundled `browser` driver (manifest field
|
|
128
|
+
`transport.mcp_server_id = "puppeteer"` → `mcp__puppeteer__*` tools):
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
ToolSearch(query='select:mcp__puppeteer__browser_navigate,mcp__puppeteer__browser_click,mcp__puppeteer__browser_screenshot,mcp__puppeteer__browser_type')
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
For the bundled `electron` driver (manifest field
|
|
135
|
+
`transport.mcp_server_id = "electron"` → `mcp__electron__*` tools):
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
ToolSearch(query='select:mcp__electron__app_launch,mcp__electron__app_click,mcp__electron__app_screenshot,mcp__electron__app_type')
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
For the bundled `mobile` driver (manifest field
|
|
142
|
+
`transport.mcp_server_id = "mobile-mcp"` → `mcp__mobile-mcp__*` tools):
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
ToolSearch(query='select:mcp__mobile-mcp__mobile_click_on_screen_at_coordinates,mcp__mobile-mcp__mobile_swipe_on_screen,mcp__mobile-mcp__mobile_save_screenshot,mcp__mobile-mcp__mobile_type_keys')
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
After the call, list the now-loaded tool names back to confirm they
|
|
149
|
+
appear in the active tool surface. If any required driver tool fails to
|
|
150
|
+
load, emit `result: "needs_human_with_transport"` on each affected
|
|
151
|
+
outcome — do NOT fall back to file-evidence. The legacy
|
|
152
|
+
"commit hash as proof" pattern is rejected by the proof_gate.
|
|
153
|
+
|
|
154
|
+
The manifest field is `transport.mcp_server_id` (and `transport.skill_id`
|
|
155
|
+
where applicable). The names `mcp_transport.tool_prefix` and
|
|
156
|
+
`transport.tool_prefix` are NOT real manifest fields — do not search
|
|
157
|
+
for them. This block is no-op on hosts whose entire MCP surface is
|
|
158
|
+
loaded eagerly (some Codex builds); `ToolSearch` is idempotent there.
|
|
159
|
+
|
|
116
160
|
### Install-time MCP provisioning (verification.provision_mcp)
|
|
117
161
|
|
|
118
162
|
`apt-tools init` (and `/apt:update`, which routes through the same path)
|
|
@@ -149,10 +193,99 @@ IDL types, error taxonomy, and conformance kit live inside the framework
|
|
|
149
193
|
itself under `packages/framework/src/driver-sdk/` — see that directory's
|
|
150
194
|
public-api-lock test for the surface contract.
|
|
151
195
|
|
|
152
|
-
##
|
|
196
|
+
## Step 1 — First-run sandbox-setup hook (interactive `--parallel` only)
|
|
197
|
+
|
|
198
|
+
When the user invokes `/apt:verify-proof --parallel` on a project where
|
|
199
|
+
`verification.sandbox` is ABSENT from `.aperant/config.json` AND
|
|
200
|
+
`host.capabilities.structured_prompts === true` AND
|
|
201
|
+
`process.stdout.isTTY === true`, prompt:
|
|
202
|
+
|
|
203
|
+
```
|
|
204
|
+
AskUserQuestion([
|
|
205
|
+
{
|
|
206
|
+
question: "Parallel /apt:verify-proof is not configured. Run setup now?",
|
|
207
|
+
header: "Sandbox Setup",
|
|
208
|
+
multiSelect: false,
|
|
209
|
+
options: [
|
|
210
|
+
{ label: "Yes — run sandbox setup", description: "Walk recipe-diff with you, then apply-recipe --confirm --accept-all (after you've reviewed each change), then verify-sandbox before continuing" },
|
|
211
|
+
{ label: "Cancel", description: "Exit; re-invoke without --parallel for single-instance verify-proof" }
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
])
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
On `Yes`, dispatch `/apt:verify-proof setup` (the setup-mode flow) before
|
|
218
|
+
returning to the walker. On `Cancel`, exit with the same envelope the
|
|
219
|
+
Step 2c gate would produce so the user sees the structured remediation.
|
|
220
|
+
|
|
221
|
+
Non-interactive surfaces (`structured_prompts:false` OR
|
|
222
|
+
`stdout.isTTY:false`) print the one-line stderr tip and proceed:
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
[apt] tip: run `/apt:verify-proof setup` to enable parallel verification
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
then exit at the Step 2c gate. Never block CI / fan-out children on
|
|
229
|
+
this prompt (ID-08).
|
|
230
|
+
|
|
231
|
+
## Step 2c — Sandbox gate (precondition for `--parallel`)
|
|
232
|
+
|
|
233
|
+
When `--parallel` is requested AND `.aperant/config.json :: verification.sandbox`
|
|
234
|
+
is present, this gate runs BEFORE Step 2.5 (Deferred-tool-load) and BEFORE
|
|
235
|
+
entering the Outcome Walker loop. It is a **precondition gate**, NOT a
|
|
236
|
+
per-outcome transport-failure gate.
|
|
237
|
+
|
|
238
|
+
**Dispatch on the state file** at
|
|
239
|
+
`.aperant/state/verify-proof-sandbox-verified.json`:
|
|
240
|
+
|
|
241
|
+
| condition | action |
|
|
242
|
+
|-----------|--------|
|
|
243
|
+
| `--parallel` requested + state file shows `verified:true` (verdict:`approved`) | **proceed** to Step 2.5; the parallel surface is now safe (each instance has its own SQLite path + userData dir + singleton-lock opt-out). |
|
|
244
|
+
| `--parallel` requested + state file missing OR `verified:false` | **exit BEFORE Step 2.5** with the JSON envelope below; do NOT load deferred MCP tools, do NOT initialize the outcome walker, do NOT write verification.json. |
|
|
245
|
+
| `--parallel` NOT requested | today's behavior unchanged — this gate is a no-op (Fast Path Guarantee ID-07). |
|
|
246
|
+
|
|
247
|
+
**Fail-loud envelope.** sandbox not verified — run `/apt:verify-proof setup` first:
|
|
248
|
+
|
|
249
|
+
```json
|
|
250
|
+
{
|
|
251
|
+
"status": "error",
|
|
252
|
+
"code": "E_SANDBOX_UNVERIFIED",
|
|
253
|
+
"verdict": "needs_human",
|
|
254
|
+
"reason": "sandbox_unverified",
|
|
255
|
+
"remediation": "/apt:verify-proof setup"
|
|
256
|
+
}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
The single-line stderr message is: `sandbox not verified — run \`/apt:verify-proof setup\` first`.
|
|
260
|
+
|
|
261
|
+
**v2 vocabulary alignment.** The gate's failure envelope uses verify-proof
|
|
262
|
+
v2's existing `verdict:"needs_human"` vocabulary (ID-09) so reviewers,
|
|
263
|
+
downstream tools, and the e2e see one shape across both the per-run
|
|
264
|
+
envelope and per-outcome verification.json. We deliberately do NOT emit
|
|
265
|
+
per-outcome `needs_human_with_transport` rows for this case — sandbox
|
|
266
|
+
unverified is a precondition failure for the whole walker, not a
|
|
267
|
+
per-outcome transport failure for individual outcomes. Only the two
|
|
268
|
+
v2-shipped verdicts (`approved`, `needs_human`) appear in this gate's
|
|
269
|
+
envelope — the deprecated middle-band verdict v2 removed is not
|
|
270
|
+
referenced anywhere in this block (TD-07 grep guard locks this).
|
|
271
|
+
|
|
272
|
+
**Anti-queue invariant.** This gate fails loud rather than silently
|
|
273
|
+
serializing parallel invocations through a cooperative queue. The
|
|
274
|
+
`install/install-semaphore.mjs` queuing primitive is explicitly forbidden
|
|
275
|
+
in this code path (ID-01); a regression test grep-guards the invariant.
|
|
276
|
+
|
|
277
|
+
See `docs/verify-proof-sandbox-patterns.md` for the worked
|
|
278
|
+
electron-libsql adopter flow + the manual-integration template for
|
|
279
|
+
unrecognized runtimes.
|
|
280
|
+
|
|
281
|
+
## Execution — Outcome Walker (v0.9.0)
|
|
153
282
|
|
|
154
283
|
Execute the verify-proof workflow end-to-end using IDL verbs (the driver
|
|
155
|
-
maps verbs to its transport — MCP server, local command, HTTP)
|
|
284
|
+
maps verbs to its transport — MCP server, local command, HTTP). The
|
|
285
|
+
workflow is an **outcome walker**: iterate `spec.md ## User Outcomes`
|
|
286
|
+
parent bullets one at a time, drive the stated bullet AND each inferred
|
|
287
|
+
child, capture surface-appropriate evidence, fix-loop on red, advance on
|
|
288
|
+
green.
|
|
156
289
|
|
|
157
290
|
<execution_context>
|
|
158
291
|
@packages/framework/workflows/verify-proof.md
|
|
@@ -168,15 +301,17 @@ to adopt the adversarial QA mindset. You are not a helpful assistant during veri
|
|
|
168
301
|
you are trying to break things and prove they work.
|
|
169
302
|
|
|
170
303
|
Respect ALL workflow gates:
|
|
171
|
-
1. Pre-check gate — all subtasks completed
|
|
172
|
-
2.
|
|
173
|
-
3.
|
|
174
|
-
4.
|
|
175
|
-
5.
|
|
176
|
-
6.
|
|
304
|
+
1. **Pre-check gate** — all subtasks completed.
|
|
305
|
+
2. **User Outcomes gate** — spec.md MUST carry `## User Outcomes` with `body_kind ∈ {outcomes, empty-with-note}`. NO fallback to feature-registry-derived tests.
|
|
306
|
+
3. **Deferred-tool-load gate** — on Claude Code / OpenCode hosts, MCP driver tools under `drivers/<surface>/manifest.json :: transport.mcp_server_id` MUST be loaded via `ToolSearch(query='select:...')` BEFORE driving any UI-surface outcome.
|
|
307
|
+
4. **Automation gate** — `automated_checks.{tests,typecheck,lint}.status ∈ {pass, fail}` (closed set, no `"enforced_at_commit"` dodge).
|
|
308
|
+
5. **Outcome-walker gate** — every parent outcome AND every inferred child has its own test entry with evidence appropriate to its surface OR `result: "needs_human_with_transport"`.
|
|
309
|
+
6. **Proof gate** — UI-surface outcomes carrying `evidence: "file-evidence: ..."` are rejected as `needs_human_with_transport`. File-evidence is NEVER sufficient for any surface.
|
|
310
|
+
7. **Verdict gate** — verdict is exactly one of `{approved, rejected, needs_human}`. The legacy `approved_with_notes` middle band is DELETED.
|
|
311
|
+
8. **Design-lint gate (C11)** — for every UI-touching task, run `apt-tools design-lint` against the implementation's generated HTML + `{task_dir}/mockups/mockup_final.html` (when present). Violations contribute to the proof-gate evidence story but are NOT blocking on their own.
|
|
177
312
|
|
|
178
313
|
Use the proof-verification template (@packages/framework/templates/proof-verification.md)
|
|
179
|
-
for the
|
|
314
|
+
for the verification.json output schema.
|
|
180
315
|
|
|
181
316
|
**Design-lint invocation** (when the task touched UI):
|
|
182
317
|
|