@aperant/framework 0.8.1 → 0.8.6
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 +443 -1
- package/agents/apt-planner.md +39 -7
- 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/coverage-check.d.mts.map +1 -1
- package/dist/cli/commands/coverage-check.mjs +74 -7
- package/dist/cli/commands/coverage-check.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 +142 -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/coverage-check/user-outcomes.d.mts +84 -0
- package/dist/cli/coverage-check/user-outcomes.d.mts.map +1 -0
- package/dist/cli/coverage-check/user-outcomes.mjs +265 -0
- package/dist/cli/coverage-check/user-outcomes.mjs.map +1 -0
- 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/host/detect.mjs +1 -1
- package/dist/cli/host/detect.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 +163 -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 +13 -0
- package/dist/cli/verify-proof/idl/index.mjs.map +1 -0
- package/dist/cli/verify-proof/idl/types.d.ts +10 -0
- package/dist/cli/verify-proof/idl/types.d.ts.map +1 -0
- package/dist/cli/verify-proof/idl/types.js +10 -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 +105 -0
- package/dist/cli/verify-proof/resolver.d.mts.map +1 -0
- package/dist/cli/verify-proof/resolver.mjs +320 -0
- package/dist/cli/verify-proof/resolver.mjs.map +1 -0
- package/dist/cli/verify-proof/runtime-detect.d.mts +30 -0
- package/dist/cli/verify-proof/runtime-detect.d.mts.map +1 -0
- package/dist/cli/verify-proof/runtime-detect.mjs +209 -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/driver-sdk/conformance.d.ts +41 -0
- package/dist/driver-sdk/conformance.d.ts.map +1 -0
- package/dist/driver-sdk/conformance.js +123 -0
- package/dist/driver-sdk/conformance.js.map +1 -0
- package/dist/driver-sdk/errors.d.ts +75 -0
- package/dist/driver-sdk/errors.d.ts.map +1 -0
- package/dist/driver-sdk/errors.js +80 -0
- package/dist/driver-sdk/errors.js.map +1 -0
- package/dist/driver-sdk/idl.d.ts +221 -0
- package/dist/driver-sdk/idl.d.ts.map +1 -0
- package/dist/driver-sdk/idl.js +140 -0
- package/dist/driver-sdk/idl.js.map +1 -0
- package/dist/driver-sdk/index.d.ts +28 -0
- package/dist/driver-sdk/index.d.ts.map +1 -0
- package/dist/driver-sdk/index.js +28 -0
- package/dist/driver-sdk/index.js.map +1 -0
- package/dist/driver-sdk/manifest.d.ts +93 -0
- package/dist/driver-sdk/manifest.d.ts.map +1 -0
- package/dist/driver-sdk/manifest.js +12 -0
- package/dist/driver-sdk/manifest.js.map +1 -0
- package/dist/driver-sdk/retry.d.ts +33 -0
- package/dist/driver-sdk/retry.d.ts.map +1 -0
- package/dist/driver-sdk/retry.js +50 -0
- package/dist/driver-sdk/retry.js.map +1 -0
- package/dist/plugin/.claude-plugin/plugin.json +4 -1
- package/dist/plugin/agents/apt-planner.md +39 -7
- 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 +73 -5
- package/dist/plugin/skills/apt-plan/adapters/conductor.md +1 -1
- package/dist/plugin/skills/apt-pr-review/SKILL.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-research/SKILL.md +526 -0
- package/dist/plugin/skills/apt-research/appendices/budget-loop.md +397 -0
- package/dist/plugin/skills/apt-research/appendices/claim-graph-schema.md +206 -0
- package/dist/plugin/skills/apt-research/appendices/domain-tools.md +236 -0
- 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 +84 -23
- 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 +87 -1
- package/dist/plugin/skills/apt-zoom-out/SKILL.md +3 -3
- package/dist/schemas/quick-task.d.ts +17 -17
- 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/drivers/.gitkeep +0 -0
- package/drivers/api/README.md +40 -0
- package/drivers/api/driver.mjs +59 -0
- package/drivers/api/manifest.json +26 -0
- package/drivers/browser/README.md +105 -0
- package/drivers/browser/driver.mjs +134 -0
- package/drivers/browser/manifest.json +35 -0
- package/drivers/cli/README.md +44 -0
- package/drivers/cli/driver.mjs +62 -0
- package/drivers/cli/manifest.json +28 -0
- package/drivers/electron/README.md +64 -0
- package/drivers/electron/driver.mjs +87 -0
- package/drivers/electron/manifest.json +37 -0
- package/package.json +138 -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 +73 -5
- package/skills/apt-plan/adapters/conductor.md +1 -1
- package/skills/apt-planner.md +17 -1
- package/skills/apt-pr-review/SKILL.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-research/SKILL.md +526 -0
- package/skills/apt-research/appendices/budget-loop.md +397 -0
- package/skills/apt-research/appendices/claim-graph-schema.md +206 -0
- package/skills/apt-research/appendices/domain-tools.md +236 -0
- 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 +84 -23
- 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 +87 -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/coverage-check.mjs +126 -44
- package/src/cli/commands/detect-runtime.mjs +143 -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/coverage-check/user-outcomes.mjs +273 -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/host/detect.mjs +1 -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 +164 -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 +23 -0
- package/src/cli/verify-proof/idl/types.ts +42 -0
- package/src/cli/verify-proof/manifest-schema.json +212 -0
- package/src/cli/verify-proof/manifest-validator.mjs +184 -0
- package/src/cli/verify-proof/resolver.mjs +330 -0
- package/src/cli/verify-proof/runtime-detect.mjs +211 -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 +51 -8
- package/workflows/verify-proof.md +130 -19
|
@@ -43,27 +43,81 @@ cat implementation_plan.json 2>/dev/null
|
|
|
43
43
|
cat testable_features.json 2>/dev/null
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
Generate run ID and create proof directory
|
|
46
|
+
Generate run ID and create proof directory. v0.8.6 — when the spec
|
|
47
|
+
carries `## User Outcomes` with cross-surface tags (e.g.
|
|
48
|
+
`[electron+web]`), proof artifacts MUST land under PER-SURFACE
|
|
49
|
+
subdirectories so reviewers can tell at a glance which surface failed.
|
|
50
|
+
Set up the path template here:
|
|
51
|
+
|
|
47
52
|
```bash
|
|
48
53
|
RUN_ID="$(date +%H%M%S)"
|
|
49
54
|
APP_NAME=$(node -e "try{console.log(JSON.parse(require('fs').readFileSync('package.json','utf8')).name)}catch{console.log('app')}" 2>/dev/null)
|
|
50
55
|
PROOF_DIR=".aperant/proof/${APP_NAME}/$(date +%Y%m%d)/${RUN_ID}"
|
|
51
|
-
|
|
56
|
+
# Per-surface screenshot path template — Step 7c populates ${surface}
|
|
57
|
+
# from the per-outcome resolver dispatch:
|
|
58
|
+
# ${PROOF_DIR}/${surface}/screenshots/${outcome-id}.png
|
|
59
|
+
mkdir -p "${PROOF_DIR}"
|
|
52
60
|
```
|
|
61
|
+
|
|
62
|
+
Sub-directories under `${PROOF_DIR}/${surface}/screenshots/` are
|
|
63
|
+
created lazily in Step 7c when the workflow runner takes the first
|
|
64
|
+
screenshot for that surface.
|
|
53
65
|
</step>
|
|
54
66
|
|
|
55
67
|
<step name="pre_check">
|
|
56
|
-
## 2. Pre-Check
|
|
68
|
+
## 2. Pre-Check + Driver Selection
|
|
57
69
|
|
|
58
70
|
If `implementation_plan.json` exists, verify all subtasks are completed.
|
|
59
71
|
If any are pending: report and exit.
|
|
60
72
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
73
|
+
### 2a. Resolve the verify-proof driver
|
|
74
|
+
|
|
75
|
+
The workflow is **runtime-agnostic** — it refers to IDL verbs
|
|
76
|
+
(`driver.click(target)`, `driver.screenshot(path)`), never to concrete
|
|
77
|
+
MCP tool names. The driver layer (`packages/framework/drivers/*/`)
|
|
78
|
+
maps verbs to transports. Auto-detect the runtime and select a driver:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Detect the project's runtime capabilities + select a driver
|
|
82
|
+
node .aperant/deps/node_modules/@aperant/framework/bin/apt-tools.mjs detect-runtime .
|
|
83
|
+
# → {status:"ok", runtime:{is_electron, is_tauri, is_nextjs, ...}, selected_driver_id:"..."}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The resolver picks the highest-scoring driver per ID-02 (capability_coverage
|
|
87
|
+
> compatibility > stability > priority > locality). Adopters override
|
|
88
|
+
auto-detect via `.aperant/config.json:verification.runtimes[]`:
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{ "verification": { "runtimes": ["electron", "cli"] } }
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
If no driver satisfies a REQUIRED capability, the resolver throws
|
|
95
|
+
`unsatisfied_required_capability` — fail-closed, NOT a silent
|
|
96
|
+
`blocked_by_platform` skip (per ID-02).
|
|
65
97
|
|
|
66
|
-
|
|
98
|
+
**v0.8.6 — per-outcome dispatch.** When the spec carries
|
|
99
|
+
`## User Outcomes`, the workflow runner picks a driver PER OUTCOME
|
|
100
|
+
SURFACE via `resolveDriversForOutcomes()` instead of a single
|
|
101
|
+
per-run driver pick. Each outcome's `[surface]` tag maps to the
|
|
102
|
+
runtime-capability flag a driver must carry; `[electron+web]`
|
|
103
|
+
outcomes dispatch to TWO drivers (one per surface) sharing the same
|
|
104
|
+
`outcome_id`. The legacy `apt-tools detect-runtime .` call above
|
|
105
|
+
still works for the per-run "what driver would be picked?" preview
|
|
106
|
+
— it answers the OLD question. For the new per-outcome question,
|
|
107
|
+
the workflow runner imports `resolveDriversForOutcomes` directly
|
|
108
|
+
from the resolver module in Step 7c.
|
|
109
|
+
|
|
110
|
+
### 2b. Probe optional evidence-capture tools
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# CDP video capture (optional)
|
|
114
|
+
apt-proof-video --version # if available, CDP video is on
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Record the selected driver + auxiliary tools in verification.json:
|
|
118
|
+
`meta.selected_driver: {driverId, version, manifest_sha256, trust_tier,
|
|
119
|
+
sandbox_profile}` and `meta.fallback_attempts: [{driver_id, reason}]`
|
|
120
|
+
(see ST11's schema extension in `templates/proof-verification.md`).
|
|
67
121
|
</step>
|
|
68
122
|
|
|
69
123
|
<step name="automated_checks">
|
|
@@ -112,6 +166,16 @@ If no feature registry exists:
|
|
|
112
166
|
- Suggest: "No feature registry found. Consider running `/apt:scan {area}` first for exhaustive coverage."
|
|
113
167
|
- Proceed with manual discovery below, but warn that coverage may be incomplete
|
|
114
168
|
|
|
169
|
+
**v0.8.6 — read `## User Outcomes` from spec.md FIRST when present.**
|
|
170
|
+
The PRD-shaped spec.md (STANDARD/DEEP tracks) ships a
|
|
171
|
+
`## User Outcomes` section that is the verify-proof input contract:
|
|
172
|
+
`**Epic:**` headline + N atomic outcomes tagged by `[surface]`. When
|
|
173
|
+
present, each outcome maps 1:1 to a test entry — the workflow runner
|
|
174
|
+
does NOT have to invent test units from the feature registry. Fall
|
|
175
|
+
back to the feature-registry-based discovery below ONLY when the spec
|
|
176
|
+
lacks `## User Outcomes` (the v0.8.x warn-not-block migration window
|
|
177
|
+
per spec ID-06; the section becomes a hard block in v0.9.0).
|
|
178
|
+
|
|
115
179
|
### 4b. Read the source code
|
|
116
180
|
|
|
117
181
|
You MUST read the actual source code for the features under test. Do not guess.
|
|
@@ -165,10 +229,14 @@ coverage = tested_count / registered_count
|
|
|
165
229
|
**Every untested registered feature MUST go in the `skipped` array** with a reason.
|
|
166
230
|
Valid skip reasons:
|
|
167
231
|
- `time_constraint` — would take too long relative to value
|
|
168
|
-
- `
|
|
232
|
+
- `unsatisfied_optional_capability` — the selected driver lacks an OPTIONAL IDL verb needed by this test (e.g. `assert_network` not implemented). Loud, deliberate skip.
|
|
169
233
|
- `depends_on_other` — requires a feature not yet implemented
|
|
170
234
|
- `not_applicable` — feature is deprecated or not relevant to this verification
|
|
171
235
|
|
|
236
|
+
> **Legacy alias.** `blocked_by_platform` (pre-driver-architecture) is read by the schema reader as an alias for `unsatisfied_optional_capability` and emits a deprecation warning. New writes MUST use the new reason.
|
|
237
|
+
|
|
238
|
+
> **Fail-closed, not a skip:** if a REQUIRED IDL capability has no implementing driver in the resolver chain, the resolver throws `unsatisfied_required_capability` (per ID-02). This aborts the run — it does NOT silently land in the `skipped` array. Coverage loss is loud, deliberate, and audited.
|
|
239
|
+
|
|
172
240
|
Silence about untested features is NOT acceptable. Every registered sub-feature must appear
|
|
173
241
|
either as a test (with `registry_id`) or in the `skipped` array.
|
|
174
242
|
</step>
|
|
@@ -232,23 +300,61 @@ If CDP is NOT available, note it and proceed without video.
|
|
|
232
300
|
For each test, in order:
|
|
233
301
|
|
|
234
302
|
### 7a. Perform the Action
|
|
235
|
-
Actually do what the test says:
|
|
236
|
-
- If it says "type X" →
|
|
237
|
-
- If it says "click X" →
|
|
238
|
-
- If it says "navigate to X" → navigate
|
|
239
|
-
- If it says "
|
|
303
|
+
Actually do what the test says — invoke the IDL verb on the selected driver:
|
|
304
|
+
- If it says "type X" → `driver.type({ target, text: "X" })`
|
|
305
|
+
- If it says "click X" → `driver.click({ target })`
|
|
306
|
+
- If it says "navigate to X" → `driver.navigate({ url: "X" })`
|
|
307
|
+
- If it says "press key X" → `driver.key({ key: "X" })`
|
|
308
|
+
- If it says "run command X" → `driver.execute_js({ script: "X" })`
|
|
309
|
+
|
|
310
|
+
The driver layer translates IDL verbs to its transport (an MCP server,
|
|
311
|
+
a local binary, or a built-in HTTP request). Workflow prose names ONLY
|
|
312
|
+
IDL verbs per ID-01 — concrete tool names live in
|
|
313
|
+
`packages/framework/drivers/<driver>/driver.mjs`.
|
|
314
|
+
|
|
315
|
+
**v0.8.6 — transport dispatch directive (MUST honor).** When
|
|
316
|
+
`driver.transport.skill_id` is set AND the host CLI exposes the
|
|
317
|
+
Skill tool AND the outcome surface is `web`, the workflow runner
|
|
318
|
+
MUST invoke `Skill({skill: driver.transport.skill_id, args: ...})`
|
|
319
|
+
(passing the IDL verb args) and MUST record `transport: "skill"` on
|
|
320
|
+
the resulting test entry in verification.json. When the host CLI
|
|
321
|
+
does NOT expose the Skill tool, fall back to the MCP transport via
|
|
322
|
+
the existing puppeteer MCP server and record `transport: "mcp"`.
|
|
323
|
+
The driver's `chooseTransport({has_skill_tool})` helper computes
|
|
324
|
+
the choice; the workflow runner is the site that knows
|
|
325
|
+
`has_skill_tool`. This directive is LLM-honored (the v1 verify-proof
|
|
326
|
+
runner is the host LLM following this workflow as prose); a
|
|
327
|
+
text-level grep guard (TD-08) pins the `MUST` language so future
|
|
328
|
+
edits cannot silently soften it to `SHOULD`.
|
|
240
329
|
|
|
241
330
|
### 7b. Wait for Result
|
|
242
331
|
Wait for the action to complete. If it involves loading, wait for the load.
|
|
243
332
|
Add a short delay (1-2 seconds) so the CDP capture also captures this state.
|
|
244
333
|
|
|
245
334
|
### 7c. Capture Evidence
|
|
246
|
-
Take a screenshot AFTER the action completes
|
|
335
|
+
Take a screenshot AFTER the action completes. v0.8.6 — screenshots
|
|
336
|
+
land under PER-SURFACE subdirectories, with the per-outcome driver
|
|
337
|
+
returned by `resolveDriversForOutcomes()`:
|
|
338
|
+
|
|
247
339
|
```
|
|
248
|
-
|
|
249
|
-
|
|
340
|
+
// Pick a driver per outcome surface (NOT per run). `entries[]` is
|
|
341
|
+
// the resolver's per-(outcome, surface) dispatch — for an
|
|
342
|
+
// [electron+web] outcome you get TWO entries sharing outcome_id
|
|
343
|
+
// and you loop both, capturing one screenshot per surface.
|
|
344
|
+
for (const entry of entries) {
|
|
345
|
+
await entry.driver.screenshot({
|
|
346
|
+
target: { kind: "css", value: "body" },
|
|
347
|
+
output_path: `${PROOF_DIR}/${entry.surface}/screenshots/${outcome.id}.png`
|
|
348
|
+
})
|
|
349
|
+
}
|
|
250
350
|
```
|
|
251
351
|
|
|
352
|
+
Single-surface outcomes (`[electron]`, `[web]`, `[cli]`, `[api]`)
|
|
353
|
+
produce one screenshot under `${PROOF_DIR}/${surface}/screenshots/`;
|
|
354
|
+
cross-surface (`[electron+web]`) produces two — one per surface tree
|
|
355
|
+
— with both test entries in `verification.json:tests[]` carrying the
|
|
356
|
+
same `id` but distinct `surface` and `evidence` fields.
|
|
357
|
+
|
|
252
358
|
### 7d. Analyze Evidence
|
|
253
359
|
**MANDATORY and CRITICAL.** Every screenshot must be analyzed in detail.
|
|
254
360
|
|
|
@@ -271,18 +377,23 @@ apt-proof-video analyze "${PROOF_DIR}/screenshots/{feature-id}-test-{n}.png" \
|
|
|
271
377
|
```
|
|
272
378
|
|
|
273
379
|
### 7e. Record Result to verification.json
|
|
274
|
-
After each test, update the test entry in verification.json `tests` array
|
|
380
|
+
After each test, update the test entry in verification.json `tests` array.
|
|
381
|
+
v0.8.6 adds `surface` and `transport` fields per test entry — the workflow
|
|
382
|
+
runner populates them from the per-outcome dispatch directive:
|
|
275
383
|
|
|
276
384
|
```json
|
|
277
385
|
{
|
|
278
386
|
"id": "TEST-01",
|
|
279
387
|
"registry_id": "terminals-grid-auto-tile",
|
|
280
388
|
"name": "Three Terminal Grid Auto-Tile",
|
|
389
|
+
"outcome_id": "O3",
|
|
390
|
+
"surface": "electron",
|
|
391
|
+
"transport": "mcp",
|
|
281
392
|
"precondition": "2 terminals active",
|
|
282
393
|
"action": "Press Cmd+T",
|
|
283
394
|
"expected": "Grid reflows to 2+1 layout",
|
|
284
395
|
"actual": "Grid correctly tiled",
|
|
285
|
-
"evidence": "screenshots/03-grid.png",
|
|
396
|
+
"evidence": "electron/screenshots/03-grid.png",
|
|
286
397
|
"analysis": "Detailed adversarial analysis of what is actually visible in the screenshot...",
|
|
287
398
|
"result": "pass",
|
|
288
399
|
"severity": null
|