@aperant/framework 0.11.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 +213 -30
- 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/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/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/validate-evidence.d.mts +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/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/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/design/frontmatter-schema.d.mts +8 -8
- package/dist/cli/dispatch.d.mts.map +1 -1
- package/dist/cli/dispatch.mjs +28 -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/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/personas/sidecar.d.mts +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/roadmap/lifecycle.d.mts +1 -1
- package/dist/cli/roadmap/rollup.d.mts +2 -2
- 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 +1 -1
- package/dist/plugin/agents/apt-planner.md +15 -0
- package/dist/plugin/agents/apt-verifier.md +15 -10
- package/dist/plugin/skills/apt-plan/SKILL.md +23 -0
- package/dist/plugin/skills/apt-run/SKILL.md +1 -1
- package/dist/plugin/skills/apt-setup/SKILL.md +56 -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 +138 -138
- 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-plan/SKILL.md +23 -0
- package/skills/apt-run/SKILL.md +1 -1
- package/skills/apt-setup/SKILL.md +56 -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/mobile-prepare.mjs +151 -0
- package/src/cli/commands/recipe-diff.mjs +81 -0
- package/src/cli/commands/roadmap.mjs +54 -0
- package/src/cli/commands/verify-sandbox.mjs +231 -0
- package/src/cli/consistency/parse-qa.mjs +20 -4
- package/src/cli/consistency/rules/r5-verdict-consistency.mjs +11 -13
- package/src/cli/coverage-check/user-outcomes.mjs +52 -17
- package/src/cli/dispatch.mjs +27 -0
- package/src/cli/gate/gates/verify-approved.mjs +22 -81
- 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 +10 -1
- package/templates/proof-verification.md +27 -8
- package/workflows/verify-proof.md +376 -302
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mobile/driver.mjs — bundled unified mobile driver (iOS + Android).
|
|
3
|
+
*
|
|
4
|
+
* Wraps the `mobile-mcp` MCP server (mobile-next/mobile-mcp, Apache-2.0),
|
|
5
|
+
* the single UI-driving backend for BOTH platforms (decision D-01). The
|
|
6
|
+
* platform/device is chosen INSIDE the tool call (mobile_list_available_
|
|
7
|
+
* devices → device id), NOT at resolver time — that is why one driver
|
|
8
|
+
* targets ios/android/expo/react-native.
|
|
9
|
+
*
|
|
10
|
+
* The app lifecycle (build / install / launch / Metro / ready-gate) is
|
|
11
|
+
* owned by `apt-tools mobile prepare`, NOT this driver (D-03/D-04). This
|
|
12
|
+
* driver assumes a foregrounded, JS-ready app and only drives UI + captures
|
|
13
|
+
* evidence.
|
|
14
|
+
*
|
|
15
|
+
* Per ID-01 — the workflow prose NEVER names mcp__mobile-mcp__* tools; the
|
|
16
|
+
* verb→tool mapping lives ONLY here. Transport dispatch happens at the
|
|
17
|
+
* workflow-runner layer (which holds the model's tool surface).
|
|
18
|
+
*
|
|
19
|
+
* IDL verb → mobile-mcp tool mapping:
|
|
20
|
+
* launch → mobile_use_device (select the booted device/simulator)
|
|
21
|
+
* click → mobile_click_on_screen_at_coordinates
|
|
22
|
+
* type → mobile_type_keys
|
|
23
|
+
* key → mobile_press_button
|
|
24
|
+
* swipe → mobile_swipe_on_screen
|
|
25
|
+
* screenshot → mobile_save_screenshot
|
|
26
|
+
* capture_logs → mobile_device_logs
|
|
27
|
+
* assert_visible → mobile_list_elements_on_screen (element present)
|
|
28
|
+
* assert_text → mobile_list_elements_on_screen (text match)
|
|
29
|
+
* teardown → mobile_terminate_app (best-effort)
|
|
30
|
+
*
|
|
31
|
+
* The driver is a thin adapter: it validates input shape via the IDL
|
|
32
|
+
* arg-metadata and returns a VerbResult. The actual transport dispatch
|
|
33
|
+
* happens at the workflow runner layer. For conformance testing we expose
|
|
34
|
+
* the verb signatures as identity stubs returning VerbResult — the SDK
|
|
35
|
+
* conformance kit then validates the shape contract.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
import { validateVerbArgs } from '../../src/cli/verify-proof/idl/index.mjs'
|
|
39
|
+
|
|
40
|
+
/** Build a success VerbResult. */
|
|
41
|
+
function ok(evidence_paths = []) {
|
|
42
|
+
return { status: 'success', evidence_paths, duration_ms: 0, retry_count: 0 }
|
|
43
|
+
}
|
|
44
|
+
function fail(error) {
|
|
45
|
+
return { status: 'fail', evidence_paths: [], duration_ms: 0, retry_count: 0, error }
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Validate args + return a VerbResult shape stub. Real transport invocation
|
|
50
|
+
* happens at the workflow-runner layer (model holds the tool surface —
|
|
51
|
+
* mcp__mobile-mcp__*).
|
|
52
|
+
*
|
|
53
|
+
* @param {string} verb
|
|
54
|
+
* @param {Record<string, unknown>} args
|
|
55
|
+
* @returns {{status: 'success'|'fail'|'skip', evidence_paths: string[], duration_ms: number, retry_count: number, error?: string}}
|
|
56
|
+
*/
|
|
57
|
+
function adaptVerb(verb, args) {
|
|
58
|
+
const check = validateVerbArgs(verb, args)
|
|
59
|
+
if (!check.valid) {
|
|
60
|
+
return fail(`mobile.${verb}: missing required args: ${check.missing.join(', ')}`)
|
|
61
|
+
}
|
|
62
|
+
if (verb === 'screenshot' && typeof args.output_path === 'string') {
|
|
63
|
+
return ok([args.output_path])
|
|
64
|
+
}
|
|
65
|
+
return ok([])
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export async function launch(args) {
|
|
69
|
+
return adaptVerb('launch', args)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export async function click(args) {
|
|
73
|
+
return adaptVerb('click', args)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export async function type(args) {
|
|
77
|
+
return adaptVerb('type', args)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export async function key(args) {
|
|
81
|
+
return adaptVerb('key', args)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export async function swipe(args) {
|
|
85
|
+
return adaptVerb('swipe', args)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export async function screenshot(args) {
|
|
89
|
+
return adaptVerb('screenshot', args)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export async function capture_logs(args) {
|
|
93
|
+
return adaptVerb('capture_logs', args)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export async function assert_visible(args) {
|
|
97
|
+
return adaptVerb('assert_visible', args)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export async function assert_text(args) {
|
|
101
|
+
return adaptVerb('assert_text', args)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export async function teardown(args) {
|
|
105
|
+
return adaptVerb('teardown', args)
|
|
106
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"driverId": "mobile",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"targets": ["ios", "android", "expo", "react-native"],
|
|
5
|
+
"capabilities": [
|
|
6
|
+
"launch",
|
|
7
|
+
"click",
|
|
8
|
+
"type",
|
|
9
|
+
"key",
|
|
10
|
+
"swipe",
|
|
11
|
+
"screenshot",
|
|
12
|
+
"capture_logs",
|
|
13
|
+
"assert_visible",
|
|
14
|
+
"assert_text",
|
|
15
|
+
"teardown"
|
|
16
|
+
],
|
|
17
|
+
"evidence_capabilities": ["screenshot", "capture_logs"],
|
|
18
|
+
"frameworkApiRange": "^1.0.0",
|
|
19
|
+
"priority": 80,
|
|
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
|
+
"preflight": [
|
|
37
|
+
{
|
|
38
|
+
"name": "xcrun (iOS Simulator toolchain)",
|
|
39
|
+
"command": { "binary": "xcrun", "args": ["simctl", "help"] },
|
|
40
|
+
"required": false
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "adb (Android platform-tools)",
|
|
44
|
+
"command": { "binary": "adb", "args": ["--version"] },
|
|
45
|
+
"required": false
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"transport": { "mcp_server_id": "mobile-mcp" }
|
|
49
|
+
}
|
package/package.json
CHANGED
|
@@ -1,139 +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
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
2
|
+
"name": "@aperant/framework",
|
|
3
|
+
"version": "0.12.0",
|
|
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
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Run one read-only clarification turn using Work Record context, prior chat history, and the latest user response.
|
|
2
|
+
Return semantic readiness updates and either the next single focused clarification question or ready status, without mutating project files or external systems.
|
|
3
|
+
|
|
4
|
+
You are the Aperant clarification agent.
|
|
5
|
+
First call readPhaseOutput with phase="triage" to inspect the triage output.
|
|
6
|
+
If triage is already specific and high-confidence, set status="ready" and omit nextChatMessage.
|
|
7
|
+
Otherwise, populate nextChatMessage with EXACTLY ONE focused, concrete question that addresses the highest-impact remaining readiness gap. Do not batch multiple questions into one turn.
|
|
8
|
+
Ground the question in the triage findings, the inbox title and description, and the prior message history. Acknowledge what the user already said when relevant.
|
|
9
|
+
Set nextChatMessage.dimensionKey to the readiness dimension the question targets, and nextChatMessage.cardId to the matching open clarification card when one exists.
|
|
10
|
+
Keep nextClarificationQuestions as the ordered list of remaining open questions (one per open dimension); the UI renders this list as a chip row alongside the chat.
|
|
11
|
+
Use repository tools only when needed to sharpen the question.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Refine one Inbox Work Item into structured triage output.
|
|
2
|
+
Use supplied repository evidence and preserve read-only behavior.
|
|
3
|
+
Return semantic findings, readiness evidence, and clarification prompts without mutating project files or external systems.
|
|
4
|
+
|
|
5
|
+
You are the Aperant triage agent.
|
|
6
|
+
Produce structured JSON only via the provided schema.
|
|
7
|
+
Semantic capability mapping: repository_evidence maps to listFiles and readFile tools.
|
|
8
|
+
Use listFiles and readFile tools to ground claims in repository evidence.
|
|
9
|
+
Return a triage dossier with repo-evidenced facts, inferred assumptions, risks, acceptance criteria, and clarification plan.
|
|
10
|
+
Always include readinessEvaluation with rubricVersion, dimensions, missingDimensions, hardBlockers, and justificationSummary.
|
|
11
|
+
Universal readiness keys: problem_clarity, scope_definition, repo_evidence, risk_identification, acceptance_criteria_quality.
|
|
12
|
+
Bug-specific keys: repro_steps, expected_vs_actual, impact_assessment.
|
|
13
|
+
Feature-specific keys: user_value, solution_shape, dependency_mapping.
|
|
14
|
+
Enhancement-specific keys: current_behavior_baseline, incremental_scope, migration_safety.
|
|
15
|
+
Every readiness dimension requires key, score (0-100), evidence, justification, and optional hardBlocker.
|
|
16
|
+
Only place verified repository findings in repoEvidencedFacts.
|
|
17
|
+
For every inferred assumption, set disposition to requires_hitl_confirmation or accepted_assumption.
|
|
18
|
+
Do not present product commitments as facts unless repository evidence directly supports them.
|
|
19
|
+
Each proposed acceptance criterion must include a verificationMethod and Given/When/Then fields when behavior is being specified.
|
|
20
|
+
Prefer concise summaries and concrete touch points.
|
|
@@ -66,10 +66,10 @@ The reviewer writes `qa_report.md` and updates `implementation_plan.json` with a
|
|
|
66
66
|
|
|
67
67
|
Read the `qa_signoff` from `implementation_plan.json`. The reviewer now writes dimension scores alongside the status.
|
|
68
68
|
|
|
69
|
-
Read the dimension scores:
|
|
70
|
-
- If
|
|
71
|
-
- If
|
|
72
|
-
- If
|
|
69
|
+
Read the gates + dimension scores:
|
|
70
|
+
- If `automation_gate: pass` AND `proof_gate: pass` AND status is "approved" -> Build passes. Write final QA report. Done.
|
|
71
|
+
- If `automation_gate: pass` AND `proof_gate: fail` AND status is "needs_human" -> Transport gap. Write final QA report listing what the human must install (e.g. an MCP server). Done.
|
|
72
|
+
- If `automation_gate: fail` OR critical findings unresolved -> status is "rejected". Spawn fixer (Phase 4).
|
|
73
73
|
- If no scores written -> Reviewer failed to score. Re-spawn with explicit scoring instructions: "You MUST score all 4 dimensions (completeness, correctness, code_quality, test_coverage) on 1-10 before writing a verdict."
|
|
74
74
|
- If no signoff written at all -> Reviewer failed to update the file. Retry with explicit instructions.
|
|
75
75
|
|
|
@@ -100,10 +100,10 @@ When the reviewer rejects, triage based on dimension scores from the qa_signoff,
|
|
|
100
100
|
- Documentation formatting
|
|
101
101
|
- Non-functional improvements
|
|
102
102
|
|
|
103
|
-
**Decision Framework:**
|
|
104
|
-
- If
|
|
105
|
-
- If
|
|
106
|
-
- If
|
|
103
|
+
**Decision Framework (v0.9.0 two-gate envelope):**
|
|
104
|
+
- If `automation_gate: pass` AND `proof_gate: pass` AND no critical issues -> approve the build (write qa_signoff: approved)
|
|
105
|
+
- If `automation_gate: pass` AND `proof_gate: fail` (UI-surface outcome missing driver transport) -> write qa_signoff: needs_human with a `transport_gap` array
|
|
106
|
+
- If `automation_gate: fail` OR critical issues unresolved -> spawn qa_fixer with targeted guidance
|
|
107
107
|
- If the same critical issue appears 3+ times -> escalate to human
|
|
108
108
|
|
|
109
109
|
### Phase 5: Fix Cycle
|
|
@@ -137,19 +137,20 @@ Track iteration count. Your goal is to converge quickly:
|
|
|
137
137
|
|
|
138
138
|
## QUALITY GATES
|
|
139
139
|
|
|
140
|
-
### Approval Criteria (
|
|
140
|
+
### Approval Criteria (v0.9.0 two-gate envelope)
|
|
141
141
|
Approve when ALL of these are true:
|
|
142
|
-
-
|
|
142
|
+
- `automation_gate: pass` (tests + typecheck + lint all green)
|
|
143
|
+
- `proof_gate: pass` (every outcome has surface-appropriate evidence)
|
|
143
144
|
- No critical issues in the issues array
|
|
144
|
-
-
|
|
145
|
+
- Dimensions land >= 7 as informational rationale (does NOT drive the verdict)
|
|
145
146
|
|
|
146
|
-
###
|
|
147
|
-
- **approved**:
|
|
148
|
-
- **
|
|
149
|
-
- **rejected**:
|
|
147
|
+
### Verdict Closed Set
|
|
148
|
+
- **approved**: `automation_gate: pass` AND `proof_gate: pass` AND no critical issues
|
|
149
|
+
- **needs_human**: `automation_gate: pass` AND `proof_gate: fail` (transport gap)
|
|
150
|
+
- **rejected**: `automation_gate: fail` OR critical issues unresolved
|
|
150
151
|
|
|
151
|
-
### Acceptable Imperfections (
|
|
152
|
-
These
|
|
152
|
+
### Acceptable Imperfections (cited in `findings.notes` on an `approved` verdict)
|
|
153
|
+
These do NOT block approval and ride along as notes:
|
|
153
154
|
- Missing optional features (if spec marks them as optional)
|
|
154
155
|
- Code style deviations (if functionality is correct)
|
|
155
156
|
- Missing edge case handling for unlikely scenarios
|
package/prompts/qa_reviewer.md
CHANGED
|
@@ -37,13 +37,15 @@ You MUST score 4 dimensions on a 1-10 scale. The verdict is DERIVED from scores
|
|
|
37
37
|
**3-4 (Poor):** Significant problems. Multiple issues.
|
|
38
38
|
**1-2 (Failed):** Fundamentally broken or missing.
|
|
39
39
|
|
|
40
|
-
### Verdict Derivation (NOT your choice -- derived from
|
|
40
|
+
### Verdict Derivation (v0.9.0 two-gate envelope; NOT your choice -- derived from gates)
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
- **approved-with-notes**: ALL dimensions >= 5 AND no critical issues
|
|
44
|
-
- **rejected**: ANY dimension < 5 OR critical issues found
|
|
42
|
+
Verdict is the closed set `{approved, rejected, needs_human}`. It derives from the two-gate envelope (`automation_gate` AND `proof_gate`) per `/apt:verify-proof`. Dimensions are informational rationale only.
|
|
45
43
|
|
|
46
|
-
|
|
44
|
+
- **approved**: `automation_gate: pass` AND `proof_gate: pass` AND no critical findings.
|
|
45
|
+
- **needs_human**: `automation_gate: pass` AND `proof_gate: fail` (typically: UI-surface outcome with no driver transport — see verify-proof workflow).
|
|
46
|
+
- **rejected**: `automation_gate: fail` OR critical findings unresolved.
|
|
47
|
+
|
|
48
|
+
You MUST write scores BEFORE writing the verdict. The verdict follows from the gates, with dimensions as rationale.
|
|
47
49
|
|
|
48
50
|
---
|
|
49
51
|
|
|
@@ -440,7 +442,7 @@ Create a comprehensive QA report with dimension scores:
|
|
|
440
442
|
| test_coverage | {N}/10 | {evidence} |
|
|
441
443
|
|
|
442
444
|
**Minimum score:** {min}
|
|
443
|
-
**Derived verdict:** {approved|
|
|
445
|
+
**Derived verdict:** {approved|rejected|needs_human}
|
|
444
446
|
|
|
445
447
|
## Summary
|
|
446
448
|
|
|
@@ -514,7 +516,7 @@ For each critical/major issue, describe what the Coder Agent should do:
|
|
|
514
516
|
|
|
515
517
|
**Next Steps**:
|
|
516
518
|
- [If approved: Ready for merge]
|
|
517
|
-
- [If
|
|
519
|
+
- [If needs_human: Install the missing driver transport (e.g. MCP server) and re-run /apt:verify-proof]
|
|
518
520
|
- [If rejected: List of fixes needed, then re-run QA]
|
|
519
521
|
```
|
|
520
522
|
|
|
@@ -566,17 +568,17 @@ EOF
|
|
|
566
568
|
# Only commit actual code changes to the project
|
|
567
569
|
```
|
|
568
570
|
|
|
569
|
-
### If
|
|
571
|
+
### If NEEDS_HUMAN (transport gap):
|
|
570
572
|
|
|
571
|
-
Same as approved, but with status "
|
|
573
|
+
Same as approved, but with status `"needs_human"` and a `transport_gap` array describing what the human must install (e.g. an MCP server, a binary):
|
|
572
574
|
|
|
573
575
|
```json
|
|
574
576
|
{
|
|
575
577
|
"qa_signoff": {
|
|
576
|
-
"status": "
|
|
577
|
-
"
|
|
578
|
-
"
|
|
579
|
-
"
|
|
578
|
+
"status": "needs_human",
|
|
579
|
+
"transport_gap": [
|
|
580
|
+
"Missing MCP server: puppeteer (drivers/browser/manifest.json :: transport.mcp_server_id)",
|
|
581
|
+
"After install, re-run /apt:verify-proof"
|
|
580
582
|
],
|
|
581
583
|
"dimension_scores": {
|
|
582
584
|
"completeness": "[N]",
|
|
@@ -762,11 +764,11 @@ QA will automatically re-run after fixes.
|
|
|
762
764
|
|
|
763
765
|
The QA -> Fix -> QA loop continues until:
|
|
764
766
|
|
|
765
|
-
1.
|
|
767
|
+
1. **`automation_gate: pass`** (lint + typecheck + tests all green) AND **`proof_gate: pass`** (every outcome has surface-appropriate evidence)
|
|
766
768
|
2. **No critical issues remain**
|
|
767
769
|
3. **All tests pass**
|
|
768
770
|
4. **No regressions**
|
|
769
|
-
5. **QA derives approved
|
|
771
|
+
5. **QA derives `approved`** (the only ship-eligible verdict; `needs_human` requires installing the missing transport, `rejected` requires code fixes)
|
|
770
772
|
|
|
771
773
|
Maximum iterations: 5 (configurable)
|
|
772
774
|
|