@aperant/framework 0.12.0 → 0.13.0-next.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 +46 -0
- package/dist/cli/commands/route.d.mts +22 -0
- package/dist/cli/commands/route.d.mts.map +1 -1
- package/dist/cli/commands/route.mjs +169 -14
- package/dist/cli/commands/route.mjs.map +1 -1
- package/dist/cli/route/skill-discover.d.mts +4 -0
- package/dist/cli/route/skill-discover.d.mts.map +1 -1
- package/dist/cli/route/skill-discover.mjs +2 -0
- package/dist/cli/route/skill-discover.mjs.map +1 -1
- package/dist/cli/skill-author/contract.d.mts +21 -0
- package/dist/cli/skill-author/contract.d.mts.map +1 -1
- package/dist/cli/skill-author/contract.mjs +22 -0
- package/dist/cli/skill-author/contract.mjs.map +1 -1
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/skills/apt/SKILL.md +10 -3
- package/dist/plugin/skills/apt-debug/SKILL.md +1 -0
- package/dist/plugin/skills/apt-improve/SKILL.md +1 -0
- package/dist/plugin/skills/apt-review/SKILL.md +1 -0
- package/dist/plugin/skills/apt-triage/SKILL.md +1 -0
- package/package.json +138 -138
- package/prompts/inbox-clarification.md +6 -0
- package/prompts/inbox-triage.md +1 -0
- package/skills/apt/SKILL.md +14 -6
- package/skills/apt-debug/SKILL.md +1 -0
- package/skills/apt-improve/SKILL.md +1 -0
- package/skills/apt-review/SKILL.md +1 -0
- package/skills/apt-triage/SKILL.md +1 -0
- package/src/cli/commands/route.mjs +174 -14
- package/src/cli/route/skill-discover.mjs +2 -0
- package/src/cli/skill-author/contract.mjs +23 -0
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.13.0-next.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
|
+
"scripts": {
|
|
62
|
+
"build": "tsc && node scripts/extract-personas-schema.mjs",
|
|
63
|
+
"dev": "tsc --watch --preserveWatchOutput",
|
|
64
|
+
"typecheck": "tsc --noEmit",
|
|
65
|
+
"lint": "biome check . --diagnostic-level=error",
|
|
66
|
+
"lint:fix": "biome check --write . --diagnostic-level=error",
|
|
67
|
+
"clean": "rm -rf dist",
|
|
68
|
+
"test": "vitest run",
|
|
69
|
+
"c28:cutover": "node scripts/c28-cutover.mjs",
|
|
70
|
+
"build-plugin": "node scripts/build-plugin.mjs",
|
|
71
|
+
"publish-plugin": "node scripts/publish-plugin.mjs",
|
|
72
|
+
"publish:verdaccio": "node scripts/publish-verdaccio.mjs",
|
|
73
|
+
"release:verdaccio": "pnpm build && pnpm publish:verdaccio",
|
|
74
|
+
"ship:verdaccio": "npm version patch --no-git-tag-version && pnpm build && pnpm publish:verdaccio"
|
|
75
|
+
},
|
|
76
|
+
"files": [
|
|
77
|
+
"dist/",
|
|
78
|
+
"bin/",
|
|
79
|
+
"src/cli/",
|
|
80
|
+
"src/cost/",
|
|
81
|
+
"commands/",
|
|
82
|
+
"skills/",
|
|
83
|
+
"agents/",
|
|
84
|
+
"prompts/",
|
|
85
|
+
"templates/",
|
|
86
|
+
"context/",
|
|
87
|
+
"workflows/",
|
|
88
|
+
"drivers/",
|
|
89
|
+
"examples/",
|
|
90
|
+
"LICENSE",
|
|
91
|
+
"README.md",
|
|
92
|
+
"CHANGELOG.md",
|
|
93
|
+
"!**/__tests__/**",
|
|
94
|
+
"!**/*.test.*",
|
|
95
|
+
"!**/*.spec.*",
|
|
96
|
+
"!**/*.test.d.ts.map",
|
|
97
|
+
"!**/*.test.js.map"
|
|
98
|
+
],
|
|
99
|
+
"keywords": [
|
|
100
|
+
"ai",
|
|
101
|
+
"framework",
|
|
102
|
+
"coding-assistant",
|
|
103
|
+
"claude-code",
|
|
104
|
+
"codex",
|
|
105
|
+
"aperant"
|
|
106
|
+
],
|
|
107
|
+
"license": "AGPL-3.0-only",
|
|
108
|
+
"homepage": "https://github.com/Mikalsen-AI/aperant-cloud-desktop/tree/main/packages/framework#readme",
|
|
109
|
+
"bugs": {
|
|
110
|
+
"url": "https://github.com/Mikalsen-AI/aperant-cloud-desktop/issues"
|
|
111
|
+
},
|
|
112
|
+
"repository": {
|
|
113
|
+
"type": "git",
|
|
114
|
+
"url": "https://github.com/Mikalsen-AI/aperant-cloud-desktop.git",
|
|
115
|
+
"directory": "packages/framework"
|
|
116
|
+
},
|
|
117
|
+
"engines": {
|
|
118
|
+
"node": ">=18.0.0"
|
|
119
|
+
},
|
|
120
|
+
"publishConfig": {
|
|
121
|
+
"access": "public"
|
|
122
|
+
},
|
|
123
|
+
"dependencies": {
|
|
124
|
+
"@clack/prompts": "^1.2.0",
|
|
125
|
+
"proper-lockfile": "^4.1.2",
|
|
126
|
+
"yaml": "^2.8.3",
|
|
127
|
+
"zod": "^4.3.6"
|
|
128
|
+
},
|
|
129
|
+
"optionalDependencies": {
|
|
130
|
+
"@babel/parser": "^7.29.2",
|
|
131
|
+
"@babel/traverse": "^7.29.0",
|
|
132
|
+
"@google/genai": "^1.50.1",
|
|
133
|
+
"css-tree": "^3.2.1",
|
|
134
|
+
"playwright": "^1.59.1"
|
|
135
|
+
},
|
|
136
|
+
"devDependencies": {
|
|
137
|
+
"@vitest/coverage-v8": "^4.1.5"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -8,4 +8,10 @@ Otherwise, populate nextChatMessage with EXACTLY ONE focused, concrete question
|
|
|
8
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
9
|
Set nextChatMessage.dimensionKey to the readiness dimension the question targets, and nextChatMessage.cardId to the matching open clarification card when one exists.
|
|
10
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
|
+
If the user's prior answer did not raise the targeted dimension's readinessAssessment score above its scoreThreshold, the next question MUST target the same dimensionKey with a sharper or more concrete follow-up. Otherwise, advance to a different open dimension.
|
|
12
|
+
Target the gating dimension whose acceptance-criteria slots are still open; do not jump to a dimension whose slots are already grounded.
|
|
13
|
+
Emit proposedAcceptanceCriteriaUpdates as field-level patches ({ acIndex, fieldPath, value, source, groundedness }) that fill the targeted acceptance-criteria slots from the user's answer; fieldPath is one of statement, given, when, thenOutcome, verificationMethod.
|
|
14
|
+
Mark a slot patch groundedness:'tentative' when you are filling it from a vague answer or your own assumption, and groundedness:'grounded' only when the user's answer concretely specifies the field.
|
|
15
|
+
On an explicit not_applicable reply, do not write a value; on an explicit agent_assume reply, fill the slot with source:'agent_assume'. Otherwise use source:'user_answer'.
|
|
16
|
+
Ask EXACTLY ONE question per turn, and do not re-grill the same dimension more than three turns.
|
|
11
17
|
Use repository tools only when needed to sharpen the question.
|
package/prompts/inbox-triage.md
CHANGED
|
@@ -17,4 +17,5 @@ Only place verified repository findings in repoEvidencedFacts.
|
|
|
17
17
|
For every inferred assumption, set disposition to requires_hitl_confirmation or accepted_assumption.
|
|
18
18
|
Do not present product commitments as facts unless repository evidence directly supports them.
|
|
19
19
|
Each proposed acceptance criterion must include a verificationMethod and Given/When/Then fields when behavior is being specified.
|
|
20
|
+
Tag each proposed acceptance criterion with the readiness dimensionKey it supports (one of the universal or type-specific readiness keys listed above) so the clarification gate can map each acceptance criterion to its dimension exactly.
|
|
20
21
|
Prefer concise summaries and concrete touch points.
|
package/skills/apt/SKILL.md
CHANGED
|
@@ -52,9 +52,16 @@ you must follow when classifying.
|
|
|
52
52
|
Before doing ANYTHING else, classify the user's input:
|
|
53
53
|
|
|
54
54
|
```bash
|
|
55
|
-
node packages/framework/bin/apt-tools.mjs route . --input "$ARGUMENTS"
|
|
55
|
+
APT_FORCE_TTY=1 node packages/framework/bin/apt-tools.mjs route . --input "$ARGUMENTS"
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
+
The `APT_FORCE_TTY=1` prefix is the EXPLICIT interactive signal — not a real
|
|
59
|
+
TTY — and it is what makes the catch-up panel compute on this top-level `/apt`
|
|
60
|
+
call (the Bash tool runs `route` as a captured, non-TTY subprocess, so the
|
|
61
|
+
isTTY sniff alone would never open the gate). Spawned-subagent, fan-out, and
|
|
62
|
+
background `route` calls deliberately OMIT this signal (or set
|
|
63
|
+
`APT_CATCH_UP_DISABLE=1`) so the panel never fires inside a nested call.
|
|
64
|
+
|
|
58
65
|
Parse the JSON result. The `mode` field determines what you do next. Display the routing decision to the user:
|
|
59
66
|
|
|
60
67
|
```
|
|
@@ -98,9 +105,10 @@ While you were away:
|
|
|
98
105
|
```
|
|
99
106
|
|
|
100
107
|
This is display-only here — the Last-Seen Marker advance happens in route.mjs,
|
|
101
|
-
not in this skill. The panel is computed lazily
|
|
102
|
-
|
|
103
|
-
|
|
108
|
+
not in this skill. The panel is computed lazily only when the explicit
|
|
109
|
+
interactive signal (`APT_FORCE_TTY=1`, set above) is present — NOT a real TTY;
|
|
110
|
+
non-TTY/background/spawned calls omit the signal and carry no `catch_up` field.
|
|
111
|
+
Do not call it an "activity feed", "changelog", or "notifications" — it is the
|
|
104
112
|
Welcome-Back Summary + Team-Change Digest.
|
|
105
113
|
|
|
106
114
|
Then proceed to the matching mode handler below. Do NOT deviate from the routing decision.
|
|
@@ -687,10 +695,10 @@ When spawning agents, follow these rules:
|
|
|
687
695
|
3. **Agent type from route result.** The `agent` field in the route JSON tells you which agent to spawn.
|
|
688
696
|
4. **Model selection:** Use `sonnet` for agents unless the task is complex (DEEP track), then use the default model.
|
|
689
697
|
5. **Always include task_dir.** Every agent needs to know where to read/write artifacts.
|
|
690
|
-
6. **Capability-based spawning:** Before spawning agents for task mode (execution_mode = "auto"), check the reconciled orchestration mode:
|
|
698
|
+
6. **Capability-based spawning:** Before spawning agents for task mode (execution_mode = "auto"), check the reconciled orchestration mode. Pass the task's `{track}` (from Step 0c) via `--track` so per-track defaults from `.aperant/config.json:orchestration.per_track` apply — without it, a STANDARD task whose configured mode is `sequential` silently resolves to the host's most-capable mode (e.g. `agent-team`) and over-delegates:
|
|
691
699
|
|
|
692
700
|
```bash
|
|
693
|
-
node packages/framework/bin/apt-tools.mjs reconcile .
|
|
701
|
+
node packages/framework/bin/apt-tools.mjs reconcile . --track {track}
|
|
694
702
|
```
|
|
695
703
|
|
|
696
704
|
Use `resolved.phase_delegation` to decide how agents are launched:
|