@cstart/coldstart 2.2.11 → 2.2.12
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/README.md +4 -2
- package/dist/index-manager.d.ts +17 -0
- package/dist/index-manager.d.ts.map +1 -1
- package/dist/index-manager.js +35 -0
- package/dist/index-manager.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/init.d.ts +11 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +40 -1
- package/dist/init.js.map +1 -1
- package/dist/kb/alias-repair.d.ts +37 -0
- package/dist/kb/alias-repair.d.ts.map +1 -0
- package/dist/kb/alias-repair.js +108 -0
- package/dist/kb/alias-repair.js.map +1 -0
- package/dist/kb/cli.d.ts.map +1 -1
- package/dist/kb/cli.js +41 -4
- package/dist/kb/cli.js.map +1 -1
- package/dist/kb/fold.d.ts +29 -10
- package/dist/kb/fold.d.ts.map +1 -1
- package/dist/kb/fold.js +40 -17
- package/dist/kb/fold.js.map +1 -1
- package/dist/kb/render.d.ts.map +1 -1
- package/dist/kb/render.js +10 -2
- package/dist/kb/render.js.map +1 -1
- package/dist/kb/repair.d.ts +31 -0
- package/dist/kb/repair.d.ts.map +1 -1
- package/dist/kb/repair.js +71 -9
- package/dist/kb/repair.js.map +1 -1
- package/dist/kb/search.d.ts.map +1 -1
- package/dist/kb/search.js +5 -4
- package/dist/kb/search.js.map +1 -1
- package/dist/kb/types.d.ts +7 -2
- package/dist/kb/types.d.ts.map +1 -1
- package/dist/kb/view.js +1 -1
- package/dist/kb/view.js.map +1 -1
- package/dist/kb/write-guide.d.ts +3 -2
- package/dist/kb/write-guide.d.ts.map +1 -1
- package/dist/kb/write-guide.js +3 -2
- package/dist/kb/write-guide.js.map +1 -1
- package/dist/kb/write.d.ts +2 -1
- package/dist/kb/write.d.ts.map +1 -1
- package/dist/kb/write.js +3 -1
- package/dist/kb/write.js.map +1 -1
- package/dist/server/find.d.ts.map +1 -1
- package/dist/server/find.js +5 -3
- package/dist/server/find.js.map +1 -1
- package/dist/server/mcp.d.ts +17 -1
- package/dist/server/mcp.d.ts.map +1 -1
- package/dist/server/mcp.js +37 -7
- package/dist/server/mcp.js.map +1 -1
- package/dist/unwire.d.ts.map +1 -1
- package/dist/unwire.js +5 -2
- package/dist/unwire.js.map +1 -1
- package/hooks/capture-payload.mjs +16 -10
- package/hooks/note-shape.d.mts +4 -2
- package/hooks/note-shape.mjs +43 -14
- package/package.json +1 -1
package/hooks/note-shape.mjs
CHANGED
|
@@ -44,7 +44,8 @@ export const SPEC_SHAPES = [
|
|
|
44
44
|
example: `
|
|
45
45
|
{"type":"file-single","path":"src/x.py",
|
|
46
46
|
"summary":"its one purpose + how (1-3 sentences)",
|
|
47
|
-
"
|
|
47
|
+
"identityAliases":["stable name/role words — this file's fixed vocabulary"],
|
|
48
|
+
"incidentAliases":["symptom words for what THIS write's summary describes"],
|
|
48
49
|
"anchors":[{"path":"src/x.py","symbols":["TheFnYouWorkedWith"]}]}`,
|
|
49
50
|
/** Prose the full (guide) rendering adds; the compact rendering drops it. */
|
|
50
51
|
note: `
|
|
@@ -52,7 +53,14 @@ export const SPEC_SHAPES = [
|
|
|
52
53
|
search kb with identifiers far more than with prose, and those land in the
|
|
53
54
|
anchor channel — which holds nothing but the path unless you fill it. Name
|
|
54
55
|
the symbols you actually worked with; omit only for a file that declares
|
|
55
|
-
none (config, css, markdown)
|
|
56
|
+
none (config, css, markdown).
|
|
57
|
+
|
|
58
|
+
"identityAliases" vs "incidentAliases": identity is what stays true no
|
|
59
|
+
matter how many times this note gets rewritten — the file's name, its
|
|
60
|
+
role, terms that don't change. Incident is the symptom vocabulary for
|
|
61
|
+
THIS write's summary specifically — it is REPLACED, not added to, the
|
|
62
|
+
next time you rewrite the summary, so don't worry about it accumulating.
|
|
63
|
+
Leave incidentAliases out if this write isn't describing a bug/symptom.`,
|
|
56
64
|
},
|
|
57
65
|
{
|
|
58
66
|
spec: 'file-hub',
|
|
@@ -63,7 +71,7 @@ export const SPEC_SHAPES = [
|
|
|
63
71
|
symbols does not make a file a hub; a single-purpose file stays
|
|
64
72
|
file-single):`,
|
|
65
73
|
example: `
|
|
66
|
-
{"type":"file-hub","path":"src/y.py","
|
|
74
|
+
{"type":"file-hub","path":"src/y.py","identityAliases":["stable search words"],
|
|
67
75
|
"facets":[{"symbol":"ClassOrFn","detail":"the non-obvious thing about THIS symbol",
|
|
68
76
|
"flows":["<flow id or the flow's exact title>"]}]}`,
|
|
69
77
|
note: '',
|
|
@@ -73,8 +81,9 @@ export const SPEC_SHAPES = [
|
|
|
73
81
|
noteType: 'flow',
|
|
74
82
|
headline: 'flow (product-level mechanism — see the capture checklist\'s gate):',
|
|
75
83
|
example: `
|
|
76
|
-
{"type":"flow","title":"how X happens","
|
|
84
|
+
{"type":"flow","title":"how X happens","identityAliases":["other stable words for X"],
|
|
77
85
|
"summary":"first sentence = the product-level fact the file notes miss",
|
|
86
|
+
"incidentAliases":["symptom words for what THIS summary describes, if any"],
|
|
78
87
|
"steps":[{"path":"src/a.py","symbols":["entry"],"role":"receives the request"}],
|
|
79
88
|
"invariants":["what must hold"],"verified":["src/a.py"]}`,
|
|
80
89
|
note: `
|
|
@@ -107,25 +116,43 @@ export const SPEC_SHAPES = [
|
|
|
107
116
|
// has to be made in both, in the same edit, in view of each other.
|
|
108
117
|
// ---------------------------------------------------------------------------
|
|
109
118
|
|
|
110
|
-
/** A folded note as `kb repair` sees it (subset of KbNote used by the checks).
|
|
111
|
-
|
|
119
|
+
/** A folded note as `kb repair` sees it (subset of KbNote used by the checks).
|
|
120
|
+
* No check runs against incidentAliases — omitting it is a legitimate write
|
|
121
|
+
* (not every write describes an incident), so there is nothing to repair. */
|
|
122
|
+
const noteIdentityAliases = (n) => (n.identityAliases ?? []).filter(Boolean);
|
|
112
123
|
|
|
113
124
|
export const NOTE_CHECKS = [
|
|
114
125
|
{
|
|
126
|
+
// RETIRED 2026-08-02 (shape split into identityAliases/incidentAliases —
|
|
127
|
+
// see 'missing-identity-aliases' below). Predicate permanently false per
|
|
128
|
+
// this file's own rule: never delete a shipped check id, `kb repair --json`
|
|
129
|
+
// consumers filter by it.
|
|
115
130
|
check: 'missing-aliases',
|
|
116
131
|
field: 'aliases',
|
|
132
|
+
noteTypes: [],
|
|
133
|
+
specTypes: [],
|
|
134
|
+
why: '',
|
|
135
|
+
repairHint: '',
|
|
136
|
+
fix: () => '',
|
|
137
|
+
missingInSpec: () => false,
|
|
138
|
+
missingInNote: () => false,
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
check: 'missing-identity-aliases',
|
|
142
|
+
field: 'identityAliases',
|
|
117
143
|
/** Folded note types this applies to. */
|
|
118
144
|
noteTypes: ['file', 'flow'],
|
|
119
145
|
/** Spec types this applies to at write time. */
|
|
120
146
|
specTypes: ['file', 'file-single', 'file-hub', 'flow'],
|
|
121
|
-
why: '"
|
|
147
|
+
why: '"identityAliases" — the stable words someone would SEARCH for this; without them the note is reachable only by its exact title',
|
|
122
148
|
/** What the agent has to do about it, in `kb repair`'s worklist. */
|
|
123
149
|
repairHint:
|
|
124
|
-
'Open the note and name 2-6 phrases someone would type
|
|
125
|
-
+ 'the words in the code (identifiers
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
150
|
+
'Open the note and name 2-6 stable phrases someone would type to reach it — the file/flow\'s '
|
|
151
|
+
+ 'name, role, and the words in the code (identifiers), not symptoms tied to one write and not '
|
|
152
|
+
+ 'restatements of the title. Symptom words belong in "incidentAliases" instead.',
|
|
153
|
+
fix: () => '"identityAliases":["2-5 word stable search keys"]',
|
|
154
|
+
missingInSpec: (s) => !(Array.isArray(s.identityAliases) && s.identityAliases.filter(Boolean).length),
|
|
155
|
+
missingInNote: (n) => !noteIdentityAliases(n).length,
|
|
129
156
|
},
|
|
130
157
|
{
|
|
131
158
|
// `kb write` REJECTS an absence lesson with no scope.terms, so this can only
|
|
@@ -282,6 +309,8 @@ export function requiredFieldsLine() {
|
|
|
282
309
|
return `${s.spec}: ${fields.join(' + ')}`;
|
|
283
310
|
});
|
|
284
311
|
return `REQUIRED for the note to be findable at all — ${byType.join('; ')}. `
|
|
285
|
-
+ `A note missing these is written but unreachable:
|
|
286
|
-
+ `the exact title
|
|
312
|
+
+ `A note missing these is written but unreachable: identityAliases are the only STABLE search `
|
|
313
|
+
+ `surface besides the exact title (incidentAliases are optional — symptom words for a write that `
|
|
314
|
+
+ `describes one, replaced by the next such write, never required), and anchor symbols are the only `
|
|
315
|
+
+ `channel that answers a query typed as an identifier.`;
|
|
287
316
|
}
|