toga-ai 1.0.44 → 1.0.45
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/knowledge.js +27 -1
- package/package.json +1 -1
- package/skills/capture/SKILL.md +12 -38
- package/skills/kickoff/SKILL.md +16 -42
package/knowledge.js
CHANGED
|
@@ -145,6 +145,31 @@ function coreReposFor(registry, framework) {
|
|
|
145
145
|
return registry.filter(r => r.framework === framework && r.role === 'core').map(r => r.repo);
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
/* ------------------------------------------------------------------ */
|
|
149
|
+
/* command: manifest — compact pickable lists for kickoff (one call, */
|
|
150
|
+
/* no profile reads). Prints minified JSON {repos:[...],clients:[...]}. */
|
|
151
|
+
/* ------------------------------------------------------------------ */
|
|
152
|
+
|
|
153
|
+
function cmdManifest() {
|
|
154
|
+
const registry = loadRegistry();
|
|
155
|
+
const repos = registry.map(r => ({ repo: r.repo, project: r.project, framework: r.framework, role: r.role }));
|
|
156
|
+
const clients = [];
|
|
157
|
+
const clientsDir = path.join(ROOT, 'clients');
|
|
158
|
+
if (fs.existsSync(clientsDir)) {
|
|
159
|
+
for (const slug of fs.readdirSync(clientsDir, { withFileTypes: true }).filter(e => e.isDirectory()).map(e => e.name)) {
|
|
160
|
+
const profile = path.join(clientsDir, slug, 'profile.md');
|
|
161
|
+
let title = slug, framework = '';
|
|
162
|
+
if (fs.existsSync(profile)) {
|
|
163
|
+
const { data } = parseFrontmatter(fs.readFileSync(profile, 'utf8'));
|
|
164
|
+
title = data.title || slug;
|
|
165
|
+
framework = data.framework || '';
|
|
166
|
+
}
|
|
167
|
+
clients.push({ slug, title, framework });
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
console.log(JSON.stringify({ repos, clients }));
|
|
171
|
+
}
|
|
172
|
+
|
|
148
173
|
/* ------------------------------------------------------------------ */
|
|
149
174
|
/* command: deps */
|
|
150
175
|
/* ------------------------------------------------------------------ */
|
|
@@ -379,8 +404,9 @@ function main() {
|
|
|
379
404
|
case 'index': return cmdIndex();
|
|
380
405
|
case 'deps': return cmdDeps(args);
|
|
381
406
|
case 'validate': return cmdValidate();
|
|
407
|
+
case 'manifest': return cmdManifest();
|
|
382
408
|
default:
|
|
383
|
-
console.log('Usage: node knowledge.js <search|index|deps|validate> [--flags]');
|
|
409
|
+
console.log('Usage: node knowledge.js <search|index|deps|validate|manifest> [--flags]');
|
|
384
410
|
process.exitCode = 1;
|
|
385
411
|
}
|
|
386
412
|
}
|
package/package.json
CHANGED
package/skills/capture/SKILL.md
CHANGED
|
@@ -11,17 +11,10 @@ assume**. Nothing is written until the developer approves your proposal.
|
|
|
11
11
|
|
|
12
12
|
### Contribution model
|
|
13
13
|
|
|
14
|
-
Every `/capture`
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
before installing — so the two-way loop is:
|
|
19
|
-
1. `npx toga-harness` seeds knowledge from the npm bundle
|
|
20
|
-
2. `/capture` grows the knowledge base and pushes it back to git
|
|
21
|
-
3. Teammates run `npx toga-harness` → git pull delivers the new docs → they get it
|
|
22
|
-
- The push is **non-blocking**: if offline or credentials are missing, capture is still
|
|
23
|
-
successful and you report a reminder to push manually.
|
|
24
|
-
- Only `knowledge/` files are ever staged — source code is never touched.
|
|
14
|
+
Every `/capture` validates, indexes, then **pushes** `knowledge/` to the team git repo
|
|
15
|
+
(only `knowledge/` is ever staged — never source code). Teammates receive it on their next
|
|
16
|
+
`npx toga-ai` run (which git-pulls before installing). The push is **non-blocking**: if
|
|
17
|
+
offline or unauthenticated, the capture still succeeds — report a manual-push reminder.
|
|
25
18
|
|
|
26
19
|
## Core data model (same as `knowledge/CONVENTIONS.md` and the `kickoff` skill)
|
|
27
20
|
|
|
@@ -392,34 +385,15 @@ Who the client is and what their integration does.
|
|
|
392
385
|
|
|
393
386
|
### After Capture
|
|
394
387
|
|
|
395
|
-
|
|
396
|
-
|
|
388
|
+
After the push is confirmed, suggest the developer persist session state:
|
|
389
|
+
> "Captured. If you might not finish this thread in one sitting, run `/session-save` to
|
|
390
|
+
> record what worked, what failed, what's pending, and your next step — so you can resume
|
|
391
|
+
> later without losing context."
|
|
397
392
|
|
|
398
|
-
|
|
399
|
-
> thread in one sitting, run `/session-save` to persist your session state. This
|
|
400
|
-
> records exactly what worked, what failed, what's pending, and your exact next step —
|
|
401
|
-
> so you can resume without losing context, even days later."
|
|
402
|
-
|
|
403
|
-
Provide the suggested command with a name hint:
|
|
404
|
-
```
|
|
405
|
-
/session-save <suggested-slug-based-on-what-was-worked-on>
|
|
406
|
-
```
|
|
407
|
-
|
|
408
|
-
For example, if the session was about "ClickUp deploy worker actions", suggest:
|
|
409
|
-
```
|
|
410
|
-
/session-save clickup-deploy-worker
|
|
411
|
-
```
|
|
393
|
+
Suggest a slug from the work, e.g. `/session-save clickup-deploy-worker`.
|
|
412
394
|
|
|
413
395
|
### PostToolUse hook auto-validation
|
|
414
396
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
- As each doc is written during the capture step, validation runs immediately.
|
|
420
|
-
- You will see inline output with any `ERROR:` or `OK` messages.
|
|
421
|
-
- If validation fails after a write, address the error before writing the next doc —
|
|
422
|
-
do not proceed to Step 6's explicit `validate` run while errors are outstanding.
|
|
423
|
-
- Step 6's explicit `node knowledge.js validate` call is still required as the final
|
|
424
|
-
gate — the hook fires per-write, but the explicit call confirms global consistency
|
|
425
|
-
after all writes are complete.
|
|
397
|
+
`.claude/settings.json` runs `node knowledge.js validate` after every write to `knowledge/`,
|
|
398
|
+
so `ERROR:`/`OK` output appears inline as each doc is written — fix any error before writing
|
|
399
|
+
the next. Step 6's explicit `validate` is still required as the final global-consistency gate.
|
package/skills/kickoff/SKILL.md
CHANGED
|
@@ -14,7 +14,7 @@ shortcut the flow.
|
|
|
14
14
|
- **Step 0 (auto-update check) ALWAYS runs first**, with or without arguments.
|
|
15
15
|
- Use the argument text to **pre-fill answers** to the Step 2 interview (framework, layer,
|
|
16
16
|
repo, client, task). Only ask about whatever is still missing or ambiguous.
|
|
17
|
-
- Never treat the argument as an instruction to start coding before Steps 0–
|
|
17
|
+
- Never treat the argument as an instruction to start coding before Steps 0–6 complete.
|
|
18
18
|
|
|
19
19
|
## Step 0 — Auto-update check (runs before anything else, even with arguments)
|
|
20
20
|
|
|
@@ -107,52 +107,26 @@ When resolved, if there was no `team-repo-path` memory, **write one** (memory ty
|
|
|
107
107
|
|
|
108
108
|
## Step 2 — Interview the developer (ask the work questions FIRST)
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
Get the pickable lists in **one call**: `node "<TEAM_REPO>/knowledge.js" manifest` returns
|
|
111
|
+
minified JSON `{repos:[{repo,project,framework,role}], clients:[{slug,title,framework}]}`.
|
|
112
|
+
**Do not read `registry.json` or any `profile.md` to build these lists.** Ask all questions
|
|
113
|
+
in one message:
|
|
112
114
|
|
|
113
115
|
1. **Framework** — 1.0, 2.0, or **both**?
|
|
114
116
|
2. **Layer** — front-end, back-end, or hybrid?
|
|
115
|
-
3. **Repo(s) / project(s)** —
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
4. **Client** — which client is this for, or "shared / internal"? **List EVERY client by its
|
|
121
|
-
formal name** — read the `title:` field from each `knowledge/clients/<slug>/profile.md`
|
|
122
|
-
and show the **formal name, not the slug** (fall back to a title-cased slug only if the
|
|
123
|
-
profile is missing). Include "shared / internal" and "a new client". Do not show only a
|
|
124
|
-
subset.
|
|
117
|
+
3. **Repo(s) / project(s)** — list EVERY manifest repo for the chosen framework(s).
|
|
118
|
+
**Multi-select (checkbox), not single choice** — a session often spans several repos. If
|
|
119
|
+
they name a repo not listed, run **New-repo onboarding** (below) for each before continuing.
|
|
120
|
+
4. **Client** — list EVERY manifest client by its **`title`** (the formal name, not the slug),
|
|
121
|
+
plus "shared / internal" and "a new client".
|
|
125
122
|
5. **What are you building or changing?** (a sentence — used to pick relevant feature docs.)
|
|
126
123
|
|
|
127
|
-
If any answer is unclear, ask again. Do not guess
|
|
124
|
+
If any answer is unclear, ask again. Do not guess framework, repo, project, or client.
|
|
128
125
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
clients the developer never sees the full set. Instead, **render the full list as a
|
|
134
|
-
numbered markdown list in a normal message** and ask the developer to reply with the
|
|
135
|
-
numbers they want (e.g. "1, 3, 5"). This shows every repo and every client with no cap
|
|
136
|
-
and naturally supports multi-select.
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
**Which repo(s)/project(s)?** (reply with the numbers, multiple OK)
|
|
140
|
-
1. _underscore (_Underscore — 2.0 core)
|
|
141
|
-
2. worker2 (Worker — 2.0 app)
|
|
142
|
-
3. api2 (API — 2.0 app)
|
|
143
|
-
... every registered repo for the chosen framework(s) ...
|
|
144
|
-
N. a new repo not listed
|
|
145
|
-
|
|
146
|
-
**Which client?** (one, or "shared / internal")
|
|
147
|
-
1. Compass Canada
|
|
148
|
-
2. Compass USA
|
|
149
|
-
3. Elite
|
|
150
|
-
... every client's FORMAL name (from clients/<slug>/profile.md `title:`), not the slug ...
|
|
151
|
-
S. shared / internal
|
|
152
|
-
X. a new client
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
Framework (q1) and layer (q2) have ≤4 options, so the chip control is fine for those.
|
|
126
|
+
**Presenting q3 and q4:** do NOT use the option-chip / radio control — it caps at ~4 options
|
|
127
|
+
and silently truncates a 7-repo / 5-client list. Render the full list as a numbered markdown
|
|
128
|
+
list and have the developer reply with numbers (e.g. "1, 3, 5") — no cap, supports
|
|
129
|
+
multi-select. Framework (q1) and layer (q2) have ≤4 options, so chips are fine there.
|
|
156
130
|
|
|
157
131
|
## Step 3 — Resolve the repos this work needs (local paths, lazily)
|
|
158
132
|
|
|
@@ -251,7 +225,7 @@ If they have already run `/session-resume` and are now running `/kickoff`, proce
|
|
|
251
225
|
normally — the session context they loaded will complement the framework knowledge
|
|
252
226
|
loaded here.
|
|
253
227
|
|
|
254
|
-
## Step
|
|
228
|
+
## Step 6 — Propose a multi-agent workflow plan
|
|
255
229
|
|
|
256
230
|
After loading context, analyze what the developer said they're building and **propose a
|
|
257
231
|
concrete agent plan before writing a single line of code**. This gives them visibility
|