toga-ai 1.0.53 → 1.0.55
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/.claude/settings.json +3 -0
- package/knowledge/CONVENTIONS.md +26 -6
- package/package.json +1 -1
- package/scripts/install.js +11 -0
- package/skills/capture/SKILL.md +50 -8
package/.claude/settings.json
CHANGED
package/knowledge/CONVENTIONS.md
CHANGED
|
@@ -24,10 +24,10 @@ knowledge/
|
|
|
24
24
|
├── registry.json # repo ↔ project ↔ framework ↔ role ↔ dependsOn
|
|
25
25
|
├── INDEX.md # auto-generated master index
|
|
26
26
|
├── 1.0/
|
|
27
|
-
│ ├── apps/<repo>/architecture.md + features/*.md
|
|
27
|
+
│ ├── apps/<repo>/architecture.md + features/*.md + workflows/*.md
|
|
28
28
|
│ └── standards/*.md # 1.0 coding standards (App_)
|
|
29
29
|
├── 2.0/
|
|
30
|
-
│ ├── apps/<repo>/architecture.md + features/*.md
|
|
30
|
+
│ ├── apps/<repo>/architecture.md + features/*.md + workflows/*.md
|
|
31
31
|
│ └── standards/*.md # 2.0 coding standards (_underscore)
|
|
32
32
|
└── clients/<client>/
|
|
33
33
|
├── profile.md
|
|
@@ -83,13 +83,33 @@ declares the files it covers, so the doc indexes into the code.
|
|
|
83
83
|
|
|
84
84
|
## Document types
|
|
85
85
|
|
|
86
|
+
The knowledge base is organized by **subject** (a capability, a process, a component), never
|
|
87
|
+
by session or ticket. `capture` assigns the type — **developers never classify.**
|
|
88
|
+
|
|
86
89
|
- **architecture** — how a repo/framework works overall (one per repo). _Elevated._
|
|
87
|
-
- **feature** — a
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
- **feature** — a capability anchored to specific code in a repo (a model, a class, a set of
|
|
91
|
+
files). Its template carries a **How it works** section, so the *process* of a feature lives
|
|
92
|
+
inside the feature doc — most features contain a process, and that does not make them a
|
|
93
|
+
workflow. Lives in `apps/<repo>/features/`.
|
|
94
|
+
- **workflow** — a standalone, multi-step process that **no single capability owns**; it spans
|
|
95
|
+
systems/actors/time. Two homes: operational/system processes in `apps/<repo>/workflows/`
|
|
96
|
+
(e.g. a deploy or reconciliation procedure), and client business processes in
|
|
97
|
+
`clients/<client>/workflows/`.
|
|
98
|
+
- **client-feature** — a client's customization/override of a shared feature; links back to
|
|
99
|
+
the shared `apps/<repo>/features/<base>.md`.
|
|
91
100
|
- **standard** — a coding standard for a framework. _Elevated._
|
|
92
101
|
|
|
102
|
+
**Choosing the type (capture's rule — default to feature):**
|
|
103
|
+
- "Can I point at one capability/model/class that *is* this?" → **feature** (its process goes
|
|
104
|
+
in the *How it works* section).
|
|
105
|
+
- "Is this a sequence of steps spanning systems/actors that is a *procedure*, not a thing?" →
|
|
106
|
+
**workflow.**
|
|
107
|
+
- When in doubt → **feature.** Defaulting prevents workflow-file sprawl.
|
|
108
|
+
|
|
109
|
+
**Bugs are not a type.** A bug fix's durable lesson attaches as a **gotcha** (or a one-line
|
|
110
|
+
*Change history* entry) on the feature/workflow doc that owns the affected code — never a
|
|
111
|
+
standalone doc. Only a recurring/systemic failure class warrants its own record, case by case.
|
|
112
|
+
|
|
93
113
|
_Elevated_ docs (architecture, standard) are senior-owned; `capture` flags any change
|
|
94
114
|
to them with ⚠ so the developer knows what they're approving.
|
|
95
115
|
|
package/package.json
CHANGED
package/scripts/install.js
CHANGED
|
@@ -351,6 +351,17 @@ function mergeSettings(claudeDir, sourceDir) {
|
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
+
// Env vars — additive: set each template key only if the project hasn't
|
|
355
|
+
// already defined it, so a developer's local override is never clobbered.
|
|
356
|
+
if (template.env) {
|
|
357
|
+
merged.env = merged.env || {};
|
|
358
|
+
for (const key of Object.keys(template.env)) {
|
|
359
|
+
if (!(key in merged.env)) {
|
|
360
|
+
merged.env[key] = template.env[key];
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
354
365
|
fs.writeFileSync(destPath, JSON.stringify(merged, null, 2) + '\n');
|
|
355
366
|
return true;
|
|
356
367
|
}
|
package/skills/capture/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: capture
|
|
3
|
-
description: End-of-session knowledge writer for TOGA Technology projects. Run this at the END of a coding session to record what you worked on into the team `claude` knowledge base. It figures out what changed this session, matches it against existing knowledge, and proposes create/update/retire changes for one-tap approval — then writes them, keeping registry.json, frontmatter, and INDEX files consistent. Trigger whenever the user says "capture", "wrap up", "save my work to the knowledge base", "I'm done — record this", or
|
|
3
|
+
description: End-of-session knowledge writer for TOGA Technology projects. Run this at the END of a coding session to record what you worked on into the team `claude` knowledge base. It figures out what changed this session, matches it against existing knowledge, and proposes create/update/retire changes for one-tap approval — then writes them, keeping registry.json, frontmatter, and INDEX files consistent. Run at the END of EVERY session — not only for finished features but also for small bug fixes and "I just changed the way something works"; capture decides what is durable (usually a small UPDATE to an existing doc, sometimes a NO-OP). Trigger whenever the user says "capture", "wrap up", "save my work to the knowledge base", "I'm done — record this", or ends a session.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Capture — record this session's work into the team knowledge base
|
|
@@ -110,9 +110,38 @@ node "<TEAM_REPO>/knowledge.js" search --framework=<fw> --repo=<repo> --file=<to
|
|
|
110
110
|
node "<TEAM_REPO>/knowledge.js" search --framework=<fw> --repo=<repo> --q=<keywords>
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
-
Classify each item as **CREATE** (no doc yet), **UPDATE** (a doc exists and needs new
|
|
114
|
-
|
|
115
|
-
something now removed or obsolete).
|
|
113
|
+
Classify each item as **CREATE** (no doc yet), **UPDATE** (a doc exists and needs new content /
|
|
114
|
+
a new `files:` entry / a gotcha / a *Change history* line), **DEPRECATE/DELETE** (the doc
|
|
115
|
+
describes something now removed or obsolete), or **NO-OP** (nothing durable — see below).
|
|
116
|
+
|
|
117
|
+
### Always run; capture decides what (if anything) is durable
|
|
118
|
+
|
|
119
|
+
`/capture` runs at the end of **every** session — including small bug fixes and "I just changed
|
|
120
|
+
the way something works," not only finished features. The KB is organized by **subject** (a
|
|
121
|
+
capability, a process, a component), **not** by session or ticket, so capturing small work is
|
|
122
|
+
safe: it almost always **UPDATES one existing subject doc**, and rarely creates one.
|
|
123
|
+
|
|
124
|
+
**Guardrails against pollution (enforce these):**
|
|
125
|
+
- **One doc per subject** — never one per change, bug, or ticket.
|
|
126
|
+
- **Bias UPDATE over CREATE** — always search for an owning doc first; CREATE only when no
|
|
127
|
+
subject doc exists. A small "how it works" change UPDATES the feature's *How it works* section
|
|
128
|
+
and adds a dated one-line *Change history* entry, in place — it does not spawn a new file.
|
|
129
|
+
- **Relevance test** — for every candidate write ask: *"Will a teammate six months from now act
|
|
130
|
+
differently because this is written?"* If no → **NO-OP**.
|
|
131
|
+
- **NO-OP is a blessed, first-class outcome.** If nothing rises to durable knowledge (typo,
|
|
132
|
+
formatting, a fix obvious from the code), write nothing and report: "Nothing here is durable
|
|
133
|
+
team knowledge — KB unchanged." Never manufacture a doc to justify the run.
|
|
134
|
+
|
|
135
|
+
**Type assignment (you assign it — developers never classify; default to feature):**
|
|
136
|
+
- Anchored to one capability/model/class? → **feature** (its process → the *How it works* section).
|
|
137
|
+
- A standalone multi-step process no single capability owns? → **workflow**
|
|
138
|
+
(`apps/<repo>/workflows/` for operational/system processes; `clients/<client>/workflows/` for
|
|
139
|
+
client business processes).
|
|
140
|
+
- A client's override of a shared feature? → **client-feature**.
|
|
141
|
+
- A reversible team-wide rule/decision? → **standard** (⚠ elevated).
|
|
142
|
+
- A bug's durable lesson? → a **gotcha** or *Change history* line on the doc that owns the
|
|
143
|
+
affected code — **never its own doc.**
|
|
144
|
+
- When in doubt → **feature.**
|
|
116
145
|
|
|
117
146
|
## Step 4 — Build the proposal (one-tap approval)
|
|
118
147
|
|
|
@@ -217,27 +246,36 @@ How behavior differs per client (or "none — uniform").
|
|
|
217
246
|
## Gotchas / known issues
|
|
218
247
|
The non-obvious things future-you will trip on.
|
|
219
248
|
|
|
249
|
+
## Change history
|
|
250
|
+
Dated one-liners, newest first — notable behavior changes only. Keep it terse; this is not a
|
|
251
|
+
git log. Cap at ~10 entries; fold older ones away.
|
|
252
|
+
- YYYY-MM-DD — <what changed and why> (<author>)
|
|
253
|
+
|
|
220
254
|
## Related docs
|
|
221
255
|
Links.
|
|
222
256
|
```
|
|
223
257
|
|
|
224
|
-
### workflow (client business
|
|
258
|
+
### workflow (a standalone process — operational OR client business)
|
|
259
|
+
Two homes: `apps/<repo>/workflows/` for operational/system processes (set `repo`,
|
|
260
|
+
`client: shared`); `clients/<client>/workflows/` for client business processes (set the
|
|
261
|
+
`client` slug, omit `repo`).
|
|
225
262
|
```markdown
|
|
226
263
|
---
|
|
227
264
|
title: <Workflow Name>
|
|
228
265
|
framework: "<1.0|2.0>"
|
|
266
|
+
repo: <repo> # for apps/<repo>/workflows/; omit for a pure client workflow
|
|
229
267
|
project: <Project>
|
|
230
|
-
client: <client-slug>
|
|
268
|
+
client: <shared|client-slug>
|
|
231
269
|
type: workflow
|
|
232
270
|
status: active
|
|
233
271
|
updated: <YYYY-MM-DD>
|
|
234
272
|
owners: ["<AUTHOR_USERNAME>"] # from Step 1b — never empty
|
|
235
|
-
files: []
|
|
273
|
+
files: [] # source files the process touches, if any
|
|
236
274
|
related: []
|
|
237
275
|
---
|
|
238
276
|
|
|
239
277
|
## Summary
|
|
240
|
-
The
|
|
278
|
+
The process, who/what it serves, and what triggers it.
|
|
241
279
|
|
|
242
280
|
## Steps
|
|
243
281
|
1. …
|
|
@@ -247,6 +285,10 @@ Apps/repos, integrations, data.
|
|
|
247
285
|
|
|
248
286
|
## Edge cases & escalation
|
|
249
287
|
What can go wrong and who handles it.
|
|
288
|
+
|
|
289
|
+
## Change history
|
|
290
|
+
Dated one-liners, newest first. Keep terse; cap at ~10.
|
|
291
|
+
- YYYY-MM-DD — <what changed and why> (<author>)
|
|
250
292
|
```
|
|
251
293
|
|
|
252
294
|
### architecture (one per repo) — ⚠ ELEVATED
|