@aperant/framework 0.10.0 → 0.11.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 +52 -0
- package/dist/cli/commands/catch-up.d.mts +9 -0
- package/dist/cli/commands/catch-up.d.mts.map +1 -0
- package/dist/cli/commands/catch-up.mjs +64 -0
- package/dist/cli/commands/catch-up.mjs.map +1 -0
- package/dist/cli/commands/pr-review.d.mts +16 -4
- package/dist/cli/commands/pr-review.d.mts.map +1 -1
- package/dist/cli/commands/pr-review.mjs +30 -11
- package/dist/cli/commands/pr-review.mjs.map +1 -1
- package/dist/cli/commands/route.d.mts.map +1 -1
- package/dist/cli/commands/route.mjs +92 -2
- package/dist/cli/commands/route.mjs.map +1 -1
- package/dist/cli/commands/validate-evidence.d.mts +1 -1
- package/dist/cli/config/share-policy.d.mts.map +1 -1
- package/dist/cli/config/share-policy.mjs +1 -0
- package/dist/cli/config/share-policy.mjs.map +1 -1
- package/dist/cli/config/upgrade-gitignore.d.mts.map +1 -1
- package/dist/cli/config/upgrade-gitignore.mjs +1 -0
- package/dist/cli/config/upgrade-gitignore.mjs.map +1 -1
- package/dist/cli/coordination/catch-up.d.mts +26 -0
- package/dist/cli/coordination/catch-up.d.mts.map +1 -0
- package/dist/cli/coordination/catch-up.mjs +239 -0
- package/dist/cli/coordination/catch-up.mjs.map +1 -0
- package/dist/cli/coordination/last-seen.d.mts +45 -0
- package/dist/cli/coordination/last-seen.d.mts.map +1 -0
- package/dist/cli/coordination/last-seen.mjs +128 -0
- package/dist/cli/coordination/last-seen.mjs.map +1 -0
- package/dist/cli/coordination/store.d.mts +15 -0
- package/dist/cli/coordination/store.d.mts.map +1 -1
- package/dist/cli/coordination/store.mjs +16 -0
- package/dist/cli/coordination/store.mjs.map +1 -1
- package/dist/cli/design/frontmatter-schema.d.mts +8 -8
- package/dist/cli/dispatch.d.mts.map +1 -1
- package/dist/cli/dispatch.mjs +2 -0
- package/dist/cli/dispatch.mjs.map +1 -1
- package/dist/cli/git/default-branch.d.mts +51 -0
- package/dist/cli/git/default-branch.d.mts.map +1 -0
- package/dist/cli/git/default-branch.mjs +234 -0
- package/dist/cli/git/default-branch.mjs.map +1 -0
- package/dist/cli/git/identity.d.mts +3 -5
- package/dist/cli/git/identity.d.mts.map +1 -1
- package/dist/cli/git/identity.mjs +10 -4
- package/dist/cli/git/identity.mjs.map +1 -1
- package/dist/cli/install/legacy-paths.d.mts.map +1 -1
- package/dist/cli/install/legacy-paths.mjs +2 -0
- package/dist/cli/install/legacy-paths.mjs.map +1 -1
- package/dist/cli/personas/sidecar.d.mts +1 -1
- package/dist/cli/roadmap/lifecycle.d.mts +1 -1
- package/dist/cli/roadmap/rollup.d.mts +2 -2
- package/dist/plugin/.claude-plugin/plugin.json +2 -1
- package/dist/plugin/skills/apt/SKILL.md +29 -0
- package/dist/plugin/skills/apt-catch-up/SKILL.md +79 -0
- package/dist/plugin/skills/apt-pr-review/SKILL.md +5 -4
- package/dist/plugin/skills/apt-setup/SKILL.md +76 -0
- package/package.json +138 -138
- package/skills/apt/SKILL.md +29 -0
- package/skills/apt-catch-up/SKILL.md +79 -0
- package/skills/apt-pr-review/SKILL.md +5 -4
- package/skills/apt-setup/SKILL.md +76 -0
- package/src/cli/commands/catch-up.mjs +67 -0
- package/src/cli/commands/pr-review.mjs +32 -11
- package/src/cli/commands/route.mjs +92 -1
- package/src/cli/config/share-policy.mjs +1 -0
- package/src/cli/config/upgrade-gitignore.mjs +1 -0
- package/src/cli/coordination/catch-up.mjs +231 -0
- package/src/cli/coordination/last-seen.mjs +131 -0
- package/src/cli/coordination/store.mjs +18 -0
- package/src/cli/dispatch.mjs +2 -0
- package/src/cli/git/default-branch.mjs +250 -0
- package/src/cli/git/identity.mjs +9 -3
- package/src/cli/install/legacy-paths.mjs +2 -0
- package/templates/config.json +11 -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.11.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
|
+
}
|
package/skills/apt/SKILL.md
CHANGED
|
@@ -75,6 +75,34 @@ SessionStart hook — zero latency on /apt. If `update_check` is null,
|
|
|
75
75
|
no chip. Skip the chip entirely once the user has run `/apt:update`
|
|
76
76
|
in the current session (the cache is cleared there).
|
|
77
77
|
|
|
78
|
+
**Catch-up panel (runtime-agnostic):** if the route envelope includes a
|
|
79
|
+
non-null `catch_up` field, print the combined panel BEFORE the mode handler
|
|
80
|
+
runs, regardless of runtime (Claude Code, Codex, Gemini, Cursor, …). The
|
|
81
|
+
panel has two halves; render `catch_up.welcome_back` first, then
|
|
82
|
+
`catch_up.team_digest`. Omit a half whose field is null.
|
|
83
|
+
|
|
84
|
+
If `catch_up.welcome_back` is present (your own half-finished work):
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
Where you left off: {description} — {lifecycle_phase}{current_subtask ? " · subtask " + current_subtask : ""} ({relative_time})
|
|
88
|
+
{next_step ? " Next: " + next_step : ""}
|
|
89
|
+
{others_count > 0 ? " (+" + others_count + " others · /apt:resume)" : ""}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
If `catch_up.team_digest` is present (what teammates merged while you were away):
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
While you were away:
|
|
96
|
+
{for each entry in team_digest.entries: " #" + number + " " + title + " — " + author}
|
|
97
|
+
{team_digest.more_count > 0 ? " +" + team_digest.more_count + " more on main" : ""}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
This is display-only here — the Last-Seen Marker advance happens in route.mjs,
|
|
101
|
+
not in this skill. The panel is computed lazily on interactive (TTY) calls
|
|
102
|
+
only; non-TTY/background/spawned calls carry no `catch_up` field. Do not call
|
|
103
|
+
it an "activity feed", "changelog", or "notifications" — it is the
|
|
104
|
+
Welcome-Back Summary + Team-Change Digest.
|
|
105
|
+
|
|
78
106
|
Then proceed to the matching mode handler below. Do NOT deviate from the routing decision.
|
|
79
107
|
</mandatory_first_step>
|
|
80
108
|
|
|
@@ -129,6 +157,7 @@ Show available commands table:
|
|
|
129
157
|
| `apt:scan` | Discover standards + refresh feature registry |
|
|
130
158
|
| `apt:docs` | Generate/update documentation |
|
|
131
159
|
| `apt:resume` | Restore context after session break |
|
|
160
|
+
| `apt:catch-up` | Re-view the catch-up panel (Welcome-Back + Team-Change Digest) — never advances the Last-Seen Marker |
|
|
132
161
|
| `apt:pause` | Human-initiated handoff — save state when YOU need to stop |
|
|
133
162
|
| `apt:ship` | Create PR with traceability |
|
|
134
163
|
| `apt:close-task` | Post-merge closer — confirm PR merged, flip phase, drain narration ledger |
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: apt:catch-up
|
|
3
|
+
description: "Re-view the catch-up panel (Welcome-Back + Team-Change Digest) on demand"
|
|
4
|
+
apt-skill-version: {{APT_VERSION}}
|
|
5
|
+
stage: resume
|
|
6
|
+
intent: capture
|
|
7
|
+
when_to_use: "The user dismissed the auto catch-up panel on their last /apt and wants to re-summon it — an idempotent re-view of where they left off plus what teammates merged. Distinct from /apt:resume (full context restore) and never advances the Last-Seen Marker."
|
|
8
|
+
user_invocable: true
|
|
9
|
+
internal: false
|
|
10
|
+
spawns_agent: false
|
|
11
|
+
agent_name: null
|
|
12
|
+
task_context: none
|
|
13
|
+
default_execution_mode: auto
|
|
14
|
+
execution_modes:
|
|
15
|
+
- auto
|
|
16
|
+
allowed-tools: "Bash, Read"
|
|
17
|
+
argument-hint: "apt:catch-up"
|
|
18
|
+
gates: []
|
|
19
|
+
---
|
|
20
|
+
<objective>
|
|
21
|
+
Recompute and display the combined catch-up panel — the **Welcome-Back
|
|
22
|
+
Summary** (your most-recently-active task, phase, next step) and the
|
|
23
|
+
**Team-Change Digest** (the PRs teammates merged to main since you last
|
|
24
|
+
pulled) — exactly as the auto-on-apt display would show it, but **without
|
|
25
|
+
advancing the Last-Seen Marker**. This is a read-only re-view: a user who
|
|
26
|
+
dismissed the auto panel can re-summon it without disturbing the baseline and
|
|
27
|
+
without invoking the heavier `/apt:resume`.
|
|
28
|
+
</objective>
|
|
29
|
+
|
|
30
|
+
<your_environment>
|
|
31
|
+
- **Working directory:** The project root (where you were invoked)
|
|
32
|
+
- **apt-tools:** `node packages/framework/bin/apt-tools.mjs` or the installed `apt-tools` binary
|
|
33
|
+
- **Last-Seen Marker:** `.aperant/last-seen/{email-slug}.json` (gitignored, per-machine) — this skill READS it but NEVER writes it.
|
|
34
|
+
</your_environment>
|
|
35
|
+
|
|
36
|
+
<process>
|
|
37
|
+
|
|
38
|
+
## 1. Recompute the panel (read-only)
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
node packages/framework/bin/apt-tools.mjs catch-up .
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This computes the SAME panel the interactive route call produces, against the
|
|
45
|
+
**current** marker — and deliberately does **NOT** call `advanceLastSeen`
|
|
46
|
+
(recompute-only contract). Parse the JSON `catch_up` field from the envelope.
|
|
47
|
+
|
|
48
|
+
## 2. Render the panel
|
|
49
|
+
|
|
50
|
+
Render exactly as the `apt/SKILL.md` "Catch-up panel" block does — Welcome-Back
|
|
51
|
+
half first, then the Team-Change Digest half. Omit a half whose field is null.
|
|
52
|
+
|
|
53
|
+
If `catch_up` is null, tell the user there is nothing new since their last
|
|
54
|
+
visit (no active stale task and no new merges on main).
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
Where you left off: {description} — {lifecycle_phase} · subtask {current_subtask} ({relative_time})
|
|
58
|
+
Next: {next_step}
|
|
59
|
+
(+{others_count} others · /apt:resume)
|
|
60
|
+
|
|
61
|
+
While you were away:
|
|
62
|
+
#{number} {title} — {author}
|
|
63
|
+
+{more_count} more on main
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
</process>
|
|
67
|
+
|
|
68
|
+
<notes>
|
|
69
|
+
- **Never advances the marker.** Unlike the auto-on-apt display (which advances
|
|
70
|
+
the Last-Seen Marker after the panel is evaluated), this command is purely a
|
|
71
|
+
re-view. Re-running it is idempotent.
|
|
72
|
+
- **Distinct from `/apt:resume`.** Resume restores full context and routes to
|
|
73
|
+
the next action; catch-up is a lightweight orientation re-view.
|
|
74
|
+
- **v1 is lazy compute.** The panel is computed on demand here, bounded by the
|
|
75
|
+
commits since your last pull. A background pre-warm worker (like the
|
|
76
|
+
update-check worker) is a tracked follow-up (LD-12), not part of v1.
|
|
77
|
+
- **Vocabulary.** This is the Welcome-Back Summary + Team-Change Digest — not an
|
|
78
|
+
"activity feed", "changelog", or "notifications".
|
|
79
|
+
</notes>
|
|
@@ -247,10 +247,11 @@ The command resolves in this precedence order:
|
|
|
247
247
|
|
|
248
248
|
1. `config.json:pr_review.authorship_overrides['pr-${PR_NUMBER}']` (per-PR pin)
|
|
249
249
|
2. `config.json:pr_review.authorship_override` (global: `owned` | `external` | `auto`)
|
|
250
|
-
3. `gh pr view` → `
|
|
251
|
-
-
|
|
252
|
-
-
|
|
253
|
-
|
|
250
|
+
3. `gh pr view` → `gh.author.login` vs. viewer login (G44 — `owned` means a PR you **authored**, not a branch you can push to)
|
|
251
|
+
- Same-repo branch AND `gh.author.login === viewer login` → **owned**
|
|
252
|
+
- Any other same-repo PR (a teammate's, or a repo-`OWNER` viewing someone else's PR) → **external** (`authorAssociation` is no longer consulted for the `owned` decision — it is retained only in the human-readable signal)
|
|
253
|
+
- Fork (head-repo owner ≠ base-repo owner) → **external**
|
|
254
|
+
4. Offline / gh unavailable / ambiguous payload → **unknown** (treated as `external` for safety, see below)
|
|
254
255
|
|
|
255
256
|
When the result is `unknown`, treat it as `external` for safety and prompt the user:
|
|
256
257
|
|
|
@@ -205,6 +205,7 @@ AskUserQuestion([
|
|
|
205
205
|
- "Visibility" → jump to **Step 3e** (Batch 6 only), then skip to **Step 4** and **Step 5**
|
|
206
206
|
- "Task Tracking" → jump to **Step 3g** (Batch 8 only), then skip to **Step 4** and **Step 5**
|
|
207
207
|
- "Changelog & Release Notes" → jump to **Step 3h** (Batch 9 only), then skip to **Step 4** and **Step 5**
|
|
208
|
+
- "Collaboration" → jump to **Step 3i** (Batch 10 only), then skip to **Step 4** and **Step 5**
|
|
208
209
|
- "Everything" → proceed to **Step 2** and run all batches (same as fresh setup). **Legacy-completes-Everything marker write:** if the starting config has no `onboarding` block (legacy unmarked config) and the user completes the full flow, write a full `onboarding` block at Step 5 as `{ completed: true, seeded_from_template: false, seeded_at: <ISO-8601 now> }` to record the explicit onboarding pass.
|
|
209
210
|
- "Done" → display "Settings unchanged." and exit
|
|
210
211
|
|
|
@@ -1180,6 +1181,74 @@ The selective-edit pass through Batch 9 MUST respect the §1b dispatch — it do
|
|
|
1180
1181
|
|
|
1181
1182
|
---
|
|
1182
1183
|
|
|
1184
|
+
## 3i. Present Settings (Batch 10: Collaboration Catch-Up)
|
|
1185
|
+
|
|
1186
|
+
The **collaboration catch-up** surfaces show on every interactive (TTY) `/apt`
|
|
1187
|
+
call: a **Welcome-Back Summary** (your most-recently-active task + next step,
|
|
1188
|
+
always-on, local-only) and a **Team-Change Digest** (the PRs teammates merged
|
|
1189
|
+
to main since you last pulled — gated to `share.visibility` `team`/`oss`).
|
|
1190
|
+
Written to `.aperant/config.json.collaboration`.
|
|
1191
|
+
|
|
1192
|
+
```
|
|
1193
|
+
AskUserQuestion([
|
|
1194
|
+
{
|
|
1195
|
+
question: "Show the Welcome-Back Summary when you return after a break?",
|
|
1196
|
+
header: "Welcome-Back",
|
|
1197
|
+
multiSelect: false,
|
|
1198
|
+
options: [
|
|
1199
|
+
{ label: "Yes (Recommended)", description: "On your next /apt after the staleness window, surface where you left off — task, phase, next step. Local only." },
|
|
1200
|
+
{ label: "No", description: "Never show the welcome-back nudge." }
|
|
1201
|
+
]
|
|
1202
|
+
},
|
|
1203
|
+
{
|
|
1204
|
+
question: "How many hours away before the Welcome-Back Summary fires?",
|
|
1205
|
+
header: "Threshold (hours)",
|
|
1206
|
+
multiSelect: false,
|
|
1207
|
+
options: [
|
|
1208
|
+
{ label: "16 (Recommended)", description: "Roughly 'since yesterday' — fires after an overnight gap." },
|
|
1209
|
+
{ label: "8", description: "Fires after a long lunch / half-day gap." },
|
|
1210
|
+
{ label: "24", description: "Once-a-day cadence." }
|
|
1211
|
+
]
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
question: "Show the Team-Change Digest (teammates' merged PRs since your last pull)?",
|
|
1215
|
+
header: "Team Digest",
|
|
1216
|
+
multiSelect: false,
|
|
1217
|
+
options: [
|
|
1218
|
+
{ label: "Yes (Recommended)", description: "Only computes when share.visibility is team/oss; reads local git history, never fetches." },
|
|
1219
|
+
{ label: "No", description: "Never show the digest, even in team/oss mode." }
|
|
1220
|
+
]
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
question: "Maximum PRs to list in the digest before '+N more on main'?",
|
|
1224
|
+
header: "Digest Max Entries",
|
|
1225
|
+
multiSelect: false,
|
|
1226
|
+
options: [
|
|
1227
|
+
{ label: "7 (Recommended)", description: "Low-noise ceiling; the rest collapse into a '+N more' tail." },
|
|
1228
|
+
{ label: "5", description: "Tighter." },
|
|
1229
|
+
{ label: "12", description: "Roomier." }
|
|
1230
|
+
]
|
|
1231
|
+
}
|
|
1232
|
+
])
|
|
1233
|
+
```
|
|
1234
|
+
|
|
1235
|
+
For hosts without structured prompts, present the same four questions as
|
|
1236
|
+
numbered lists (Batch 5 style) and read single-index responses.
|
|
1237
|
+
|
|
1238
|
+
### 3i.1 Review-Mode routing entry
|
|
1239
|
+
|
|
1240
|
+
The "1b. Review Mode" routing table (§1b) includes "Collaboration" as a
|
|
1241
|
+
selectable edit target — jumping directly back into this Batch 10 picker.
|
|
1242
|
+
|
|
1243
|
+
### 3i.2 Confirmation row
|
|
1244
|
+
|
|
1245
|
+
Add a row to the Step 8 table:
|
|
1246
|
+
```
|
|
1247
|
+
| Collaboration | welcome-back {on/off} ({N}h) · team-digest {on/off} (max {M}) |
|
|
1248
|
+
```
|
|
1249
|
+
|
|
1250
|
+
---
|
|
1251
|
+
|
|
1183
1252
|
## 4. Map Answers to Config
|
|
1184
1253
|
|
|
1185
1254
|
**AUDIT-001 — file-routing contract for per-device fields (UPDATED 0.8.1 for FRAMEWORK-RFC-001):** the
|
|
@@ -1295,6 +1364,12 @@ Note: task ids are slug-first since v0.6.6 — the date-format setting controls
|
|
|
1295
1364
|
- "Sub-Agents" → `"sub-agents"`
|
|
1296
1365
|
- "Sequential" → `"sequential"`
|
|
1297
1366
|
|
|
1367
|
+
**Collaboration Catch-Up (Batch 10):**
|
|
1368
|
+
- Welcome-Back "Yes" → `collaboration.welcome_back.enabled: true`, "No" → `false`
|
|
1369
|
+
- Threshold → `collaboration.welcome_back.threshold_hours: <8|16|24>`
|
|
1370
|
+
- Team Digest "Yes" → `collaboration.team_digest.enabled: true`, "No" → `false`
|
|
1371
|
+
- Digest Max Entries → `collaboration.team_digest.max_entries: <5|7|12>`
|
|
1372
|
+
|
|
1298
1373
|
## 5. Write Config
|
|
1299
1374
|
|
|
1300
1375
|
Write merged config to two files per AUDIT-001 routing (see Step 4 block):
|
|
@@ -1402,6 +1477,7 @@ Display:
|
|
|
1402
1477
|
| Debate Mode | {Auto / Agent Team / Sub-Agents / Sequential} |
|
|
1403
1478
|
| Visibility | {solo / team / oss} (overrides if any) |
|
|
1404
1479
|
| Changelog & Release Notes | dev: {Yes/No}; release-notes: {Yes/No} (audience, persona-filter) |
|
|
1480
|
+
| Collaboration | welcome-back {on/off} ({N}h) · team-digest {on/off} (max {M}) |
|
|
1405
1481
|
| Saved as Defaults | {Yes/No} |
|
|
1406
1482
|
|
|
1407
1483
|
Config saved to: .aperant/config.json
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* commands/catch-up.mjs — read-only re-view of the combined catch-up panel
|
|
3
|
+
* (LD-13). Backs the `/apt:catch-up` skill.
|
|
4
|
+
*
|
|
5
|
+
* Recompute-only contract: this command computes the SAME panel the
|
|
6
|
+
* interactive route call would show (Welcome-Back + gated Team-Change Digest)
|
|
7
|
+
* against the CURRENT Last-Seen Marker, but it NEVER advances the marker. A
|
|
8
|
+
* user who dismissed the auto-on-apt display can re-summon it without
|
|
9
|
+
* disturbing their baseline. Distinct from /apt:resume (full context restore).
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { resolve } from 'node:path'
|
|
13
|
+
import { loadProjectConfig } from '../config/load.mjs'
|
|
14
|
+
import { resolveSharePolicy } from '../config/share-policy.mjs'
|
|
15
|
+
import { computeCatchUpPanel } from '../coordination/catch-up.mjs'
|
|
16
|
+
import { createCoordinationStore } from '../coordination/store.mjs'
|
|
17
|
+
import { resolveLocalDefaultBranch } from '../git/default-branch.mjs'
|
|
18
|
+
import { err, ok } from '../util/result.mjs'
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @param {string} projectDir
|
|
22
|
+
* @returns {{ envelope: object, exitCode: number }}
|
|
23
|
+
*/
|
|
24
|
+
export function cmdCatchUp(projectDir) {
|
|
25
|
+
if (!projectDir) return err('Usage: apt-tools catch-up <project-dir>')
|
|
26
|
+
const targetDir = resolve(projectDir)
|
|
27
|
+
|
|
28
|
+
// Setup mirrors computeCatchUpForRoute in commands/route.mjs (advances marker).
|
|
29
|
+
const config = loadProjectConfig(targetDir)
|
|
30
|
+
if (!config) {
|
|
31
|
+
return ok({
|
|
32
|
+
status: 'ok',
|
|
33
|
+
command: 'catch-up',
|
|
34
|
+
catch_up: null,
|
|
35
|
+
reason: 'No .aperant/config.json — nothing to catch up on',
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const store = createCoordinationStore(targetDir)
|
|
40
|
+
const marker = store.readLastSeen()
|
|
41
|
+
const td = config?.collaboration?.team_digest
|
|
42
|
+
const vis = resolveSharePolicy(config).visibility
|
|
43
|
+
const needsDigest = td?.enabled !== false && (vis === 'team' || vis === 'oss')
|
|
44
|
+
const defaultBranch = needsDigest ? resolveLocalDefaultBranch(targetDir) : null
|
|
45
|
+
|
|
46
|
+
let catch_up = null
|
|
47
|
+
try {
|
|
48
|
+
catch_up = computeCatchUpPanel(targetDir, {
|
|
49
|
+
config,
|
|
50
|
+
now: Date.now(),
|
|
51
|
+
marker,
|
|
52
|
+
defaultBranch,
|
|
53
|
+
})
|
|
54
|
+
} catch (e) {
|
|
55
|
+
console.warn('[apt] catch-up:', e?.message ?? e)
|
|
56
|
+
catch_up = null
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// NOTE: recompute-only — we deliberately do NOT call store.advanceLastSeen.
|
|
60
|
+
// The marker baseline is owned by the interactive route path (route.mjs).
|
|
61
|
+
return ok({
|
|
62
|
+
status: 'ok',
|
|
63
|
+
command: 'catch-up',
|
|
64
|
+
catch_up,
|
|
65
|
+
reason: catch_up ? 'Catch-up panel recomputed' : 'Nothing new since your last visit',
|
|
66
|
+
})
|
|
67
|
+
}
|