@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
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"driverId": "electron",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"targets": ["electron@>=25"],
|
|
5
|
+
"capabilities": [
|
|
6
|
+
"click",
|
|
7
|
+
"type",
|
|
8
|
+
"key",
|
|
9
|
+
"navigate",
|
|
10
|
+
"screenshot",
|
|
11
|
+
"assert_visible",
|
|
12
|
+
"assert_text",
|
|
13
|
+
"wait_for_idle",
|
|
14
|
+
"execute_js",
|
|
15
|
+
"dump_state"
|
|
16
|
+
],
|
|
17
|
+
"evidence_capabilities": ["screenshot", "dom_dump", "capture_logs"],
|
|
18
|
+
"frameworkApiRange": "^1.0.0",
|
|
19
|
+
"priority": 90,
|
|
20
|
+
"stability": "ga",
|
|
21
|
+
"trust": {
|
|
22
|
+
"tier": "first_party_signed",
|
|
23
|
+
"publisher": {
|
|
24
|
+
"name": "Aperant",
|
|
25
|
+
"npm_scope": "@aperant",
|
|
26
|
+
"github_org": "Mikalsen-AI",
|
|
27
|
+
"verified": true
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"security": {
|
|
31
|
+
"sandbox_profile": "workspace_write",
|
|
32
|
+
"network": "deny",
|
|
33
|
+
"requires_user_approval": false
|
|
34
|
+
},
|
|
35
|
+
"audit": { "log_invocations": true, "log_manifest_hash": true },
|
|
36
|
+
"transport": { "mcp_server_id": "electron" }
|
|
37
|
+
}
|
package/package.json
CHANGED
|
@@ -1,134 +1,139 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
2
|
+
"name": "@aperant/framework",
|
|
3
|
+
"version": "0.8.6",
|
|
4
|
+
"description": "AI coding framework — composable skills for planning, executing, verifying, and reviewing code with any LLM provider. Works as Claude Code commands, Codex tasks, or programmatically.",
|
|
5
|
+
"author": "Mikalsen AI <hello@mikalsen.ai>",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"bin": {
|
|
10
|
+
"framework": "./bin/apt-tools.mjs",
|
|
11
|
+
"apt-tools": "./bin/apt-tools.mjs",
|
|
12
|
+
"apt-proof-video": "./bin/apt-proof-video.mjs"
|
|
13
|
+
},
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./types": {
|
|
20
|
+
"types": "./dist/types/index.d.ts",
|
|
21
|
+
"import": "./dist/types/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./cost": {
|
|
24
|
+
"types": "./dist/cost/index.d.ts",
|
|
25
|
+
"import": "./dist/cost/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./mappers": {
|
|
28
|
+
"types": "./dist/mappers/index.d.ts",
|
|
29
|
+
"import": "./dist/mappers/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./schemas": {
|
|
32
|
+
"types": "./dist/schemas/index.d.ts",
|
|
33
|
+
"import": "./dist/schemas/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./standalone": {
|
|
36
|
+
"types": "./dist/standalone/index.d.ts",
|
|
37
|
+
"import": "./dist/standalone/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./driver-sdk": {
|
|
40
|
+
"types": "./dist/driver-sdk/index.d.ts",
|
|
41
|
+
"import": "./dist/driver-sdk/index.js"
|
|
42
|
+
},
|
|
43
|
+
"./coordination/event-schema": {
|
|
44
|
+
"types": "./src/cli/coordination/event-schema.d.ts",
|
|
45
|
+
"import": "./src/cli/coordination/event-schema.mjs"
|
|
46
|
+
},
|
|
47
|
+
"./roadmap/conductor-view": {
|
|
48
|
+
"types": "./src/cli/roadmap/conductor-view.d.ts",
|
|
49
|
+
"import": "./src/cli/roadmap/conductor-view.mjs"
|
|
50
|
+
},
|
|
51
|
+
"./design/scan": {
|
|
52
|
+
"import": "./src/cli/design/scan.mjs"
|
|
53
|
+
},
|
|
54
|
+
"./design/extract-repo": {
|
|
55
|
+
"import": "./src/cli/design/extract-repo.mjs"
|
|
56
|
+
},
|
|
57
|
+
"./design/synthesize": {
|
|
58
|
+
"import": "./src/cli/design/synthesize.mjs"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"files": [
|
|
62
|
+
"dist/",
|
|
63
|
+
"bin/",
|
|
64
|
+
"src/cli/",
|
|
65
|
+
"src/cost/",
|
|
66
|
+
"commands/",
|
|
67
|
+
"skills/",
|
|
68
|
+
"agents/",
|
|
69
|
+
"prompts/",
|
|
70
|
+
"templates/",
|
|
71
|
+
"context/",
|
|
72
|
+
"workflows/",
|
|
73
|
+
"drivers/",
|
|
74
|
+
"examples/",
|
|
75
|
+
"LICENSE",
|
|
76
|
+
"README.md",
|
|
77
|
+
"CHANGELOG.md",
|
|
78
|
+
"!**/__tests__/**",
|
|
79
|
+
"!**/*.test.*",
|
|
80
|
+
"!**/*.spec.*",
|
|
81
|
+
"!**/*.test.d.ts.map",
|
|
82
|
+
"!**/*.test.js.map"
|
|
83
|
+
],
|
|
84
|
+
"keywords": [
|
|
85
|
+
"ai",
|
|
86
|
+
"framework",
|
|
87
|
+
"coding-assistant",
|
|
88
|
+
"claude-code",
|
|
89
|
+
"codex",
|
|
90
|
+
"aperant"
|
|
91
|
+
],
|
|
92
|
+
"license": "AGPL-3.0-only",
|
|
93
|
+
"homepage": "https://github.com/Mikalsen-AI/aperant-cloud-desktop/tree/main/packages/framework#readme",
|
|
94
|
+
"bugs": {
|
|
95
|
+
"url": "https://github.com/Mikalsen-AI/aperant-cloud-desktop/issues"
|
|
96
|
+
},
|
|
97
|
+
"repository": {
|
|
98
|
+
"type": "git",
|
|
99
|
+
"url": "https://github.com/Mikalsen-AI/aperant-cloud-desktop.git",
|
|
100
|
+
"directory": "packages/framework"
|
|
101
|
+
},
|
|
102
|
+
"engines": {
|
|
103
|
+
"node": ">=18.0.0"
|
|
104
|
+
},
|
|
105
|
+
"publishConfig": {
|
|
106
|
+
"access": "public"
|
|
107
|
+
},
|
|
108
|
+
"dependencies": {
|
|
109
|
+
"@clack/prompts": "^1.2.0",
|
|
110
|
+
"proper-lockfile": "^4.1.2",
|
|
111
|
+
"yaml": "^2.8.3",
|
|
112
|
+
"zod": "^4.3.6"
|
|
113
|
+
},
|
|
114
|
+
"optionalDependencies": {
|
|
115
|
+
"@babel/parser": "^7.29.2",
|
|
116
|
+
"@babel/traverse": "^7.29.0",
|
|
117
|
+
"@google/genai": "^1.50.1",
|
|
118
|
+
"css-tree": "^3.2.1",
|
|
119
|
+
"playwright": "^1.59.1"
|
|
120
|
+
},
|
|
121
|
+
"devDependencies": {
|
|
122
|
+
"@vitest/coverage-v8": "^4.1.5"
|
|
123
|
+
},
|
|
124
|
+
"scripts": {
|
|
125
|
+
"build": "tsc && node scripts/extract-personas-schema.mjs",
|
|
126
|
+
"dev": "tsc --watch --preserveWatchOutput",
|
|
127
|
+
"typecheck": "tsc --noEmit",
|
|
128
|
+
"lint": "biome check . --diagnostic-level=error",
|
|
129
|
+
"lint:fix": "biome check --write . --diagnostic-level=error",
|
|
130
|
+
"clean": "rm -rf dist",
|
|
131
|
+
"test": "vitest run",
|
|
132
|
+
"c28:cutover": "node scripts/c28-cutover.mjs",
|
|
133
|
+
"build-plugin": "node scripts/build-plugin.mjs",
|
|
134
|
+
"publish-plugin": "node scripts/publish-plugin.mjs",
|
|
135
|
+
"publish:verdaccio": "node scripts/publish-verdaccio.mjs",
|
|
136
|
+
"release:verdaccio": "pnpm build && pnpm publish:verdaccio",
|
|
137
|
+
"ship:verdaccio": "npm version patch --no-git-tag-version && pnpm build && pnpm publish:verdaccio"
|
|
138
|
+
}
|
|
139
|
+
}
|
package/prompts/planner.md
CHANGED
|
@@ -6,7 +6,7 @@ You are the **first agent** in an autonomous development process. Your job is to
|
|
|
6
6
|
|
|
7
7
|
**MANDATORY**: You MUST call the **Write** tool to create `implementation_plan.json`. Describing the plan in your text response does NOT count — the orchestrator validates that the file exists on disk and passes schema validation. If you do not call the Write tool, the phase will fail.
|
|
8
8
|
|
|
9
|
-
## TRACK BRANCH — Vertical-slice rubric vs legacy flat schema
|
|
9
|
+
## TRACK BRANCH — Vertical-slice rubric vs legacy flat schema
|
|
10
10
|
|
|
11
11
|
Subtask schema depends on track:
|
|
12
12
|
|
package/prompts/spec_writer.md
CHANGED
|
@@ -6,7 +6,7 @@ You are the **Spec Writer Agent** in the Auto-Build spec creation pipeline. Your
|
|
|
6
6
|
|
|
7
7
|
**MANDATORY**: You MUST call the **Write** tool to create `spec.md`. Describing the spec in your text response does NOT count — the orchestrator validates that the file exists on disk. If you do not call the Write tool, the phase will fail.
|
|
8
8
|
|
|
9
|
-
## TRACK BRANCH
|
|
9
|
+
## TRACK BRANCH
|
|
10
10
|
|
|
11
11
|
Content format depends on the task's track / complexity:
|
|
12
12
|
|
package/skills/apt/SKILL.md
CHANGED
|
@@ -386,18 +386,27 @@ Parse `task_id`, `task_dir`, and (if present) `worktree.worktree_path` / `worktr
|
|
|
386
386
|
Important nuances:
|
|
387
387
|
- `task_dir` is an **absolute path** under the main repo's `.aperant/tasks/{task-id}/`. All spec/plan/progress artifacts live there and are shared across worktrees.
|
|
388
388
|
- `apt-tools` commands still receive the **project root** as `<project-dir>` — they coordinate state through the main repo's `.aperant/`. The worktree only affects *code editing* cwd.
|
|
389
|
-
- When spawning an agent, set its `cwd` (or prefix its Bash calls with `cd {worktree_path} &&`) to the worktree. Pass `worktree_path` in the agent's context so it knows where
|
|
389
|
+
- When spawning an agent, set its `cwd` (or prefix its Bash calls with `cd {worktree_path} &&`) to the worktree for code reads/edits. Pass `worktree_path` in the agent's context so it knows where code work happens.
|
|
390
|
+
- Planner artifact safety: do **not** spawn `apt-planner` with host-level worktree isolation that gives it a separate copied repo. The planner must write `spec.md` and `implementation_plan.json` to the absolute main-repo `task_dir` from `task create`; `.aperant/tasks/**` is gitignored, so artifacts written under a disposable worktree can be invisible to git and lost when that worktree is cleaned.
|
|
390
391
|
- If no `worktree` block is returned, proceed in the project root as before.
|
|
391
392
|
|
|
392
393
|
### Step 3: Spawn Planner Agent
|
|
393
394
|
|
|
394
395
|
**If `spawn_agent` is true (STANDARD/DEEP):**
|
|
395
396
|
|
|
396
|
-
Print phase
|
|
397
|
+
Print the phase rail BEFORE spawning. Render the panel verbatim — branch glyphs `┌─ │ └─`, status glyphs `✓` (done) / `●` (active) / `○` (pending), one phase per row, inline metrics on completed rows when available:
|
|
398
|
+
|
|
397
399
|
```
|
|
398
400
|
[APT] Phase 1/N — Planning (spawning apt-planner agent)
|
|
401
|
+
┌─ Phase rail: {short task name} ───────────────────
|
|
402
|
+
│ Phase 1 Plan ● spawning apt-planner
|
|
403
|
+
│ Phase 2 Execute ○
|
|
404
|
+
│ Phase 3 Verify ○
|
|
405
|
+
│ Phase 4 Review ○
|
|
406
|
+
└───────────────────────────────────────────────────
|
|
399
407
|
```
|
|
400
|
-
|
|
408
|
+
|
|
409
|
+
(N = total pipeline phases: e.g. plan+execute+verify+review = 4, discuss+plan+… = 5. Keep the `[APT] Phase X/N` header line — it's the backward-compat marker that external grep tooling relies on. The rail panel sits directly below it.)
|
|
401
410
|
|
|
402
411
|
You **MUST** use the `Task` tool to spawn `apt-planner` — do NOT write
|
|
403
412
|
`spec.md` or `implementation_plan.json` inline using the `Write` tool. The
|
|
@@ -414,8 +423,9 @@ Spawn `apt-planner` via Task tool with context:
|
|
|
414
423
|
```
|
|
415
424
|
Task: {task_description}
|
|
416
425
|
Task ID: {task_id}
|
|
417
|
-
Task Dir: {task_dir}
|
|
426
|
+
Task Dir: {task_dir} # absolute path under the main repo, not under worktree_path
|
|
418
427
|
Track: {track}
|
|
428
|
+
Worktree Path: {worktree_path or "none"}
|
|
419
429
|
|
|
420
430
|
<files_to_read>
|
|
421
431
|
- CLAUDE.md (if exists)
|
|
@@ -423,7 +433,7 @@ Track: {track}
|
|
|
423
433
|
- Any brainstorm notes at .aperant/context/notes/{task_id}-brainstorm.md
|
|
424
434
|
</files_to_read>
|
|
425
435
|
|
|
426
|
-
Write spec.md and implementation_plan.json to {task_dir}/
|
|
436
|
+
Write spec.md and implementation_plan.json to {task_dir}/. Do not write plan artifacts to `{worktree_path}/.aperant/tasks/...` or any relative `.aperant/tasks/...` path.
|
|
427
437
|
```
|
|
428
438
|
|
|
429
439
|
After the agent returns, emit a token running-total line:
|
|
@@ -445,9 +455,32 @@ The user's chosen option has a `pipeline` array (e.g. `["plan", "execute", "veri
|
|
|
445
455
|
**execution_mode = "auto":**
|
|
446
456
|
Auto-chain without waiting. STANDARD and DEEP auto pipelines both follow Plan → execute → verify → review (DEEP additionally leads with discuss).
|
|
447
457
|
|
|
448
|
-
Each phase transition MUST emit a status marker for
|
|
458
|
+
Each phase transition MUST emit a status marker AND re-render the phase rail showing the updated state for ALL phases. The rail is the user's primary signal — render it verbatim, do not summarize or skip.
|
|
459
|
+
|
|
449
460
|
```
|
|
450
461
|
[APT] Phase {current}/{total} — {name} (spawning {agent})
|
|
462
|
+
┌─ Phase rail: {short task name} ───────────────────
|
|
463
|
+
│ Phase 1 Plan ✓ {N} subtasks
|
|
464
|
+
│ Phase 2 Execute ● spawning apt-executor
|
|
465
|
+
│ Phase 3 Verify ○
|
|
466
|
+
│ Phase 4 Review ○
|
|
467
|
+
└───────────────────────────────────────────────────
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
Metric conventions per phase row (omit metrics on `○` pending rows):
|
|
471
|
+
- **Plan ✓**: `N subtasks`
|
|
472
|
+
- **Execute ✓**: `N commits, K tests` (or `N/M subtasks` mid-execute on `●`)
|
|
473
|
+
- **Verify ✓**: `APPROVED a/b/c/d` (completeness/correctness/quality/coverage)
|
|
474
|
+
- **Review ✓**: `APPROVE a/b/c/d/e/f, K findings fixed` (or `request-changes, K open`)
|
|
475
|
+
- **Ship ✓**: `PR #N` (the SHIPPED collapsed variant — see below)
|
|
476
|
+
|
|
477
|
+
When ship completes (lifecycle `shipped-pending-merge` + PR URL exists), collapse to the SHIPPED variant:
|
|
478
|
+
|
|
479
|
+
```
|
|
480
|
+
┌─ {short task name} ────────────────────── ✅ SHIPPED
|
|
481
|
+
│ Plan ✓ Execute ✓ Verify ✓ Review ✓ Ship ✓
|
|
482
|
+
│ PR #{N}: {url}
|
|
483
|
+
└───────────────────────────────────────────────────
|
|
451
484
|
```
|
|
452
485
|
|
|
453
486
|
Full auto-chain sequence (STANDARD = 4 phases, DEEP = 5 phases):
|
|
@@ -460,6 +493,42 @@ Full auto-chain sequence (STANDARD = 4 phases, DEEP = 5 phases):
|
|
|
460
493
|
After EACH agent returns, emit the token running-total line (same pattern
|
|
461
494
|
as Step 3: `tokens tally` then print `[APT] Tokens: input+output = total`).
|
|
462
495
|
|
|
496
|
+
#### Consent-driven --spar-gates auto-inject (FRAMEWORK-RFC-001)
|
|
497
|
+
|
|
498
|
+
The route envelope carries the consent signal deterministically — do NOT
|
|
499
|
+
re-read `.aperant/config.local.json` from prompt-space. Two envelope fields
|
|
500
|
+
drive the decision, both emitted by `route.mjs` per spec §4.10:
|
|
501
|
+
|
|
502
|
+
1. **`envelope.spar_inject_gates`** — present only on the flag-override path
|
|
503
|
+
(explicit `--quick` / `--deep` / `--debug`) when consent is on AND the
|
|
504
|
+
user did NOT pass an explicit `--spar-gates`. Value is `"plan"` (STANDARD)
|
|
505
|
+
or `"plan,execute"` (DEEP). When set, append `--spar-gates <value>` to
|
|
506
|
+
the chained `/apt:run` invocation. **Do NOT recompute** — the deterministic
|
|
507
|
+
contract lives in code, not prompt-space.
|
|
508
|
+
|
|
509
|
+
2. **`envelope.spar_consent`** — present on the host-LLM classify path.
|
|
510
|
+
Shape: `{ enabled: boolean, partner: string|null, user_passed_explicit_gates: boolean }`.
|
|
511
|
+
After you (the host model) pick a track via Step 0c:
|
|
512
|
+
- **Track === QUICK or DEBUG: do NOT inject.** QUICK is Fast-Path-exempt
|
|
513
|
+
(CLAUDE.md Fast Path Guarantee); DEBUG produces no spec/plan to spar
|
|
514
|
+
against.
|
|
515
|
+
- **Track === STANDARD** AND `spar_consent.enabled === true` AND
|
|
516
|
+
`spar_consent.user_passed_explicit_gates === false`: append
|
|
517
|
+
`--spar-gates plan` to the `/apt:run` invocation.
|
|
518
|
+
- **Track === DEEP** AND `spar_consent.enabled === true` AND
|
|
519
|
+
`spar_consent.user_passed_explicit_gates === false`: append
|
|
520
|
+
`--spar-gates plan,execute` to the `/apt:run` invocation.
|
|
521
|
+
- `user_passed_explicit_gates === true`: the user already supplied
|
|
522
|
+
`--spar-gates` — do NOT double-inject. Their flag is already in the
|
|
523
|
+
dispatched invocation.
|
|
524
|
+
|
|
525
|
+
If `envelope.spar_consent` is absent (consent never configured) AND
|
|
526
|
+
`envelope.spar_inject_gates` is absent, do NOT inject. The signal is
|
|
527
|
+
**deterministic** — Step 4 reads ONLY the envelope fields above. Do NOT
|
|
528
|
+
re-read `.aperant/config.local.json` from prompt-space; the
|
|
529
|
+
consent-resolution helper is wired into `route.mjs` and the envelope is
|
|
530
|
+
the canonical contract. The structural test grep-locks this invariant.
|
|
531
|
+
|
|
463
532
|
**execution_mode = "step" or "research":**
|
|
464
533
|
After each stage in the pipeline, show result and ask before proceeding:
|
|
465
534
|
```
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: apt:caveman
|
|
3
|
+
description: "Ultra-compressed communication mode — toggle terse 'smart caveman' output to cut token usage ~75% while keeping full technical accuracy"
|
|
4
|
+
apt-skill-version: {{APT_VERSION}}
|
|
5
|
+
stage: ops
|
|
6
|
+
intent: configure
|
|
7
|
+
when_to_use: "The user invokes /apt:caveman, or says 'caveman mode', 'talk like caveman', 'be brief', 'less tokens'. Toggles a persistent terse output mode. Off with 'stop caveman' or 'normal mode'."
|
|
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: ""
|
|
17
|
+
argument-hint: "apt:caveman"
|
|
18
|
+
gates: []
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
Respond terse like smart caveman. All technical substance stay. Only fluff die.
|
|
22
|
+
|
|
23
|
+
## Persistence
|
|
24
|
+
|
|
25
|
+
ACTIVE EVERY RESPONSE once triggered. No revert after many turns. No filler drift. Still active if unsure. Off only when user says "stop caveman" or "normal mode".
|
|
26
|
+
|
|
27
|
+
## Rules
|
|
28
|
+
|
|
29
|
+
Drop: articles (a/an/the), filler (just/really/basically/actually/simply), pleasantries (sure/certainly/of course/happy to), hedging. Fragments OK. Short synonyms (big not extensive, fix not "implement a solution for"). Abbreviate common terms (DB/auth/config/req/res/fn/impl). Strip conjunctions. Use arrows for causality (X -> Y). One word when one word enough.
|
|
30
|
+
|
|
31
|
+
Technical terms stay exact. Code blocks unchanged. Errors quoted exact.
|
|
32
|
+
|
|
33
|
+
Pattern: `[thing] [action] [reason]. [next step].`
|
|
34
|
+
|
|
35
|
+
Not: "Sure! I'd be happy to help you with that. The issue you're experiencing is likely caused by..."
|
|
36
|
+
Yes: "Bug in auth middleware. Token expiry check use `<` not `<=`. Fix:"
|
|
37
|
+
|
|
38
|
+
### Examples
|
|
39
|
+
|
|
40
|
+
**"Why React component re-render?"**
|
|
41
|
+
|
|
42
|
+
> Inline obj prop -> new ref -> re-render. `useMemo`.
|
|
43
|
+
|
|
44
|
+
**"Explain database connection pooling."**
|
|
45
|
+
|
|
46
|
+
> Pool = reuse DB conn. Skip handshake -> fast under load.
|
|
47
|
+
|
|
48
|
+
## Auto-Clarity Exception
|
|
49
|
+
|
|
50
|
+
Drop caveman temporarily for: security warnings, irreversible action confirmations, multi-step sequences where fragment order risks misread, user asks to clarify or repeats question. Resume caveman after clear part done.
|
|
51
|
+
|
|
52
|
+
Example — destructive op:
|
|
53
|
+
|
|
54
|
+
> **Warning:** This will permanently delete all rows in the `users` table and cannot be undone.
|
|
55
|
+
>
|
|
56
|
+
> ```sql
|
|
57
|
+
> DROP TABLE users;
|
|
58
|
+
> ```
|
|
59
|
+
>
|
|
60
|
+
> Caveman resume. Verify backup exist first.
|
|
61
|
+
|
|
62
|
+
## Boundaries
|
|
63
|
+
|
|
64
|
+
Code, commits, PRs: write normal (full sentences in commit bodies / PR descriptions). Only conversational output is compressed. `stop caveman` / `normal mode` reverts.
|
|
@@ -22,7 +22,7 @@ gates: []
|
|
|
22
22
|
<objective>
|
|
23
23
|
Debug an issue using the scientific method: observe symptoms, form hypotheses, test them systematically, and reach a conclusion. State persists across context resets via `.aperant/debug/{session-id}/DEBUG.md`.
|
|
24
24
|
|
|
25
|
-
**Diagnose-discipline posture loader
|
|
25
|
+
**Diagnose-discipline posture loader.** You MUST
|
|
26
26
|
load `appendices/diagnose-discipline.md` into reasoning context at
|
|
27
27
|
session start. It carries the 6-phase loop (Reproduce → Minimise →
|
|
28
28
|
Hypothesise → Instrument → Fix → Regression-test) and the **Phase-1
|
|
@@ -61,12 +61,44 @@ reproduction, so loading this appendix is non-trivial.
|
|
|
61
61
|
## 1. Initialize or Resume Session
|
|
62
62
|
|
|
63
63
|
Parse `$ARGUMENTS`:
|
|
64
|
-
- **New session:**
|
|
65
|
-
- **`--resume <session-id>`:** Read existing `.aperant/debug/{session-id}/DEBUG.md` and continue from last state
|
|
66
|
-
- **`--resume` (no id):** Find the most recent session in `.aperant/debug/` and resume it
|
|
64
|
+
- **New session:** resolve a canonical task id (see 1a below), then use it as the `{session-id}` for the debug working directory.
|
|
65
|
+
- **`--resume <session-id>`:** Read existing `.aperant/debug/{session-id}/DEBUG.md` and continue from last state. Skip Section 1a — the session id is already canonical.
|
|
66
|
+
- **`--resume` (no id):** Find the most recent session in `.aperant/debug/` and resume it. Skip Section 1a.
|
|
67
67
|
|
|
68
68
|
If resuming, read DEBUG.md and skip to the current phase (observe/hypothesize/test/conclude).
|
|
69
69
|
|
|
70
|
+
### 1a. Resolve canonical task id (idempotent — new sessions only)
|
|
71
|
+
|
|
72
|
+
DEBUG now produces a canonical state.active_tasks record so `/apt:ship` can find the task via the lite ship profile once the fix is committed. The body owns idempotency because `apt-tools task create` does NOT guard against existing ids (see spec §3 R8).
|
|
73
|
+
|
|
74
|
+
Two invocation paths converge here:
|
|
75
|
+
|
|
76
|
+
- **Router path** (`/apt` → `/apt:debug`): the router has already called `task create` and injected `task_id` into your skill context.
|
|
77
|
+
- **Direct path** (`/apt:debug foo`): no `task_id` in context — you create one now.
|
|
78
|
+
|
|
79
|
+
Sequence:
|
|
80
|
+
|
|
81
|
+
1. **If `task_id` is present in skill context** (router path):
|
|
82
|
+
```bash
|
|
83
|
+
apt-tools task get . --id {task_id}
|
|
84
|
+
```
|
|
85
|
+
- If exit 0 AND the returned record has `track === "DEBUG"` → reuse, skip the create call. Adopt `task_id` as `{session-id}`.
|
|
86
|
+
- Else (record missing OR wrong track) → call:
|
|
87
|
+
```bash
|
|
88
|
+
apt-tools task create . --description "$ARGUMENTS" --track DEBUG --id {task_id}
|
|
89
|
+
```
|
|
90
|
+
Adopt the id as `{session-id}`.
|
|
91
|
+
|
|
92
|
+
2. **If no `task_id` in skill context** (direct path):
|
|
93
|
+
```bash
|
|
94
|
+
apt-tools task create . --description "$ARGUMENTS" --track DEBUG
|
|
95
|
+
```
|
|
96
|
+
Parse the generated `task_id` from the envelope and adopt it as `{session-id}`. The canonical id replaces the legacy `debug-YYYYMMDD-HHmm` form.
|
|
97
|
+
|
|
98
|
+
The debug working dir at `.aperant/debug/{session-id}/` stays — that working artifact is preserved (per spec §3 R7). The canonical task record at `.aperant/tasks/{task-id}/` is created in parallel by `task create`, and both share the same id.
|
|
99
|
+
|
|
100
|
+
### 1b. Create debug working directory
|
|
101
|
+
|
|
70
102
|
```bash
|
|
71
103
|
mkdir -p .aperant/debug/{session-id}
|
|
72
104
|
mkdir -p .aperant/debug/{session-id}/checkpoints
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Adapted from Matt Pocock's MIT-licensed skill suite:
|
|
3
|
-
https://github.com/mattpocock/skills/blob/main/skills/engineering/diagnose
|
|
4
|
-
Licensed under MIT. Modifications: ported as an apt:debug posture loader
|
|
5
|
-
so the 6-phase loop attaches to the existing 5-phase apt:debug body
|
|
6
|
-
without forking apt:debug's control flow. Aligned with apt:debug's
|
|
7
|
-
DEBUG.md state file and checkpoint conventions.
|
|
8
|
-
-->
|
|
9
|
-
|
|
10
1
|
# Diagnose Discipline — apt:debug posture loader (6-phase loop)
|
|
11
2
|
|
|
12
3
|
This appendix loads into `apt:debug`'s reasoning context as a posture
|
|
@@ -15,7 +6,7 @@ upgrade. The existing apt:debug body has 5 phases (Observe → Hypothesize
|
|
|
15
6
|
symptom-gathering with reproduction. Open question #1 was verified — the
|
|
16
7
|
gap is real, the appendix is non-trivial.
|
|
17
8
|
|
|
18
|
-
This appendix carries the 6-phase
|
|
9
|
+
This appendix carries the 6-phase Aperant discipline. The skill body
|
|
19
10
|
loads it and uses Phase 1 (Reproduce) as a **hard prerequisite** before
|
|
20
11
|
advancing from Observe to Hypothesize.
|
|
21
12
|
|
|
@@ -82,7 +73,7 @@ run on demand to trigger the failure.
|
|
|
82
73
|
|
|
83
74
|
These are different mental modes. Minimise asks "what's the smallest
|
|
84
75
|
thing that still fails?" — a reductive activity. Hypothesise asks
|
|
85
|
-
"WHY does it fail?" — an explanatory activity.
|
|
76
|
+
"WHY does it fail?" — an explanatory activity. the discipline
|
|
86
77
|
separates them because skipping Phase 2 and going straight from "I can
|
|
87
78
|
repro" to "here's why" tends to anchor on the first plausible cause
|
|
88
79
|
and miss alternatives.
|