wabachi 0.2.0 → 0.3.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.
Files changed (55) hide show
  1. package/.codex-plugin/plugin.json +6 -0
  2. package/LICENSE +1 -1
  3. package/README.md +17 -21
  4. package/dist/architecture/cli.js +51 -36
  5. package/dist/architecture/cli.js.map +1 -1
  6. package/dist/architecture/documentation/react-flow.d.ts +23 -0
  7. package/dist/architecture/documentation/react-flow.js +436 -0
  8. package/dist/architecture/documentation/react-flow.js.map +1 -0
  9. package/dist/architecture/documentation/site.d.ts +10 -13
  10. package/dist/architecture/documentation/site.js +58 -24
  11. package/dist/architecture/documentation/site.js.map +1 -1
  12. package/dist/architecture/projection/react-flow.d.ts +96 -0
  13. package/dist/architecture/projection/react-flow.js +388 -0
  14. package/dist/architecture/projection/react-flow.js.map +1 -0
  15. package/dist/cli.js +53 -14
  16. package/dist/cli.js.map +1 -1
  17. package/dist/command-contract.d.ts +78 -0
  18. package/dist/command-contract.js +194 -0
  19. package/dist/command-contract.js.map +1 -0
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.js +1 -0
  22. package/dist/index.js.map +1 -1
  23. package/dist/runtime/repository.d.ts +3 -0
  24. package/dist/runtime/repository.js +140 -16
  25. package/dist/runtime/repository.js.map +1 -1
  26. package/dist/runtime/run.js +3 -1
  27. package/dist/runtime/run.js.map +1 -1
  28. package/dist/skill.d.ts +47 -0
  29. package/dist/skill.js +160 -0
  30. package/dist/skill.js.map +1 -0
  31. package/dist/working-set/codec.d.ts +7 -0
  32. package/dist/working-set/codec.js +53 -0
  33. package/dist/working-set/codec.js.map +1 -0
  34. package/dist/working-set/conflicts.d.ts +46 -0
  35. package/dist/working-set/conflicts.js +97 -0
  36. package/dist/working-set/conflicts.js.map +1 -0
  37. package/dist/working-set/derive.d.ts +34 -0
  38. package/dist/working-set/derive.js +634 -0
  39. package/dist/working-set/derive.js.map +1 -0
  40. package/dist/working-set/index.d.ts +3 -0
  41. package/dist/working-set/index.js +3 -0
  42. package/dist/working-set/index.js.map +1 -0
  43. package/dist/working-set/model.d.ts +93 -0
  44. package/dist/working-set/model.js +204 -0
  45. package/dist/working-set/model.js.map +1 -0
  46. package/dist/working-set/quality.d.ts +201 -0
  47. package/dist/working-set/quality.js +447 -0
  48. package/dist/working-set/quality.js.map +1 -0
  49. package/dist/working-set/seeds.d.ts +135 -0
  50. package/dist/working-set/seeds.js +433 -0
  51. package/dist/working-set/seeds.js.map +1 -0
  52. package/docs/USAGE.md +118 -0
  53. package/docs/examples/minimal-canon.json +24 -0
  54. package/package.json +14 -4
  55. package/skills/wabachi/SKILL.md +39 -0
@@ -0,0 +1,433 @@
1
+ import { createRepositoryMapping, normalizeRepositoryPath, } from "../architecture/canon/repository-mappings.js";
2
+ /** Version of the bounded task and entrypoint seed contract. */
3
+ export const WORKING_SET_SEED_SCHEMA_VERSION = 1;
4
+ export const WORKING_SET_SEED_KIND = "working-set-seeds";
5
+ export const WORKING_SET_SEED_RESOLUTION_KIND = "working-set-seed-resolution";
6
+ export const WORKING_SET_SEED_KINDS = ["path", "symbol-export", "architecture-component"];
7
+ /** V1 intent metadata is an identifier, not a task description or authority. */
8
+ export const WORKING_SET_TASK_INTENTS = ["implement", "investigate", "verify"];
9
+ export const WORKING_SET_SEED_LIMITS = Object.freeze({
10
+ maxSeeds: 128,
11
+ maxTaskIdLength: 128,
12
+ maxRepositoryFieldLength: 256,
13
+ maxRevisionLength: 64,
14
+ maxPathLength: 1024,
15
+ maxSymbolLength: 512,
16
+ maxExportNameLength: 512,
17
+ maxComponentIdLength: 512,
18
+ maxResolutionCandidates: 64,
19
+ maxResolutionEvidence: 64,
20
+ });
21
+ const seedKindOrder = Object.freeze({
22
+ path: 0,
23
+ "symbol-export": 1,
24
+ "architecture-component": 2,
25
+ });
26
+ const targetKindOrder = Object.freeze({
27
+ file: 0,
28
+ symbol: 1,
29
+ test: 2,
30
+ });
31
+ function isRecord(value) {
32
+ return value !== null && typeof value === "object" && !Array.isArray(value);
33
+ }
34
+ function assertAllowedKeys(value, keys, label) {
35
+ const allowed = new Set(keys);
36
+ for (const key of Object.keys(value)) {
37
+ if (!allowed.has(key))
38
+ throw new TypeError(`${label} contains unknown field: ${key}`);
39
+ }
40
+ }
41
+ function normalizeIdentifier(value, label, maxLength) {
42
+ if (typeof value !== "string")
43
+ throw new TypeError(`${label} must be a string`);
44
+ const normalized = value.normalize("NFC").trim();
45
+ if (normalized.length === 0 ||
46
+ normalized.length > maxLength ||
47
+ /[\p{White_Space}\p{Cc}\p{Cf}\p{Cs}]/u.test(normalized)) {
48
+ throw new TypeError(`${label} is malformed or exceeds its bound`);
49
+ }
50
+ return normalized;
51
+ }
52
+ function normalizeRepositoryField(value, label) {
53
+ if (typeof value !== "string")
54
+ throw new TypeError(`${label} must be a string`);
55
+ const normalized = value.normalize("NFC");
56
+ if (normalized.length === 0 ||
57
+ normalized.length > WORKING_SET_SEED_LIMITS.maxRepositoryFieldLength ||
58
+ /[\p{White_Space}\p{Cc}\p{Cf}\p{Cs}]/u.test(normalized)) {
59
+ throw new TypeError(`${label} is malformed or exceeds its bound`);
60
+ }
61
+ return normalized;
62
+ }
63
+ function normalizeRevision(value) {
64
+ const revision = normalizeIdentifier(value, "revision", WORKING_SET_SEED_LIMITS.maxRevisionLength);
65
+ if (!/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/iu.test(revision)) {
66
+ throw new TypeError("revision must be a full immutable hexadecimal revision");
67
+ }
68
+ return revision.toLowerCase();
69
+ }
70
+ function normalizeRepository(value) {
71
+ if (!isRecord(value))
72
+ throw new TypeError("repository must be an object");
73
+ assertAllowedKeys(value, ["repositoryHost", "repositoryId", "repository"], "repository");
74
+ return Object.freeze({
75
+ repositoryHost: normalizeRepositoryField(value.repositoryHost, "repository repositoryHost"),
76
+ repositoryId: normalizeRepositoryField(value.repositoryId, "repository repositoryId"),
77
+ repository: normalizeRepositoryField(value.repository, "repository repository"),
78
+ });
79
+ }
80
+ function normalizeTask(value) {
81
+ if (!isRecord(value))
82
+ throw new TypeError("task must be an object");
83
+ assertAllowedKeys(value, ["taskId", "intent"], "task");
84
+ if (!WORKING_SET_TASK_INTENTS.includes(value.intent)) {
85
+ throw new TypeError("task intent is unsupported");
86
+ }
87
+ return Object.freeze({
88
+ taskId: normalizeIdentifier(value.taskId, "task taskId", WORKING_SET_SEED_LIMITS.maxTaskIdLength),
89
+ intent: value.intent,
90
+ });
91
+ }
92
+ function normalizeSeedPath(value) {
93
+ if (typeof value !== "string" || value.length > WORKING_SET_SEED_LIMITS.maxPathLength) {
94
+ throw new TypeError("seed path is malformed or exceeds its bound");
95
+ }
96
+ return normalizeRepositoryPath(value);
97
+ }
98
+ function normalizeSeed(value) {
99
+ if (!isRecord(value))
100
+ throw new TypeError("working-set seed must be an object");
101
+ if (!WORKING_SET_SEED_KINDS.includes(value.kind)) {
102
+ throw new TypeError("working-set seed kind is unsupported");
103
+ }
104
+ switch (value.kind) {
105
+ case "path":
106
+ assertAllowedKeys(value, ["kind", "path"], "path seed");
107
+ return Object.freeze({ kind: "path", path: normalizeSeedPath(value.path) });
108
+ case "symbol-export":
109
+ assertAllowedKeys(value, ["kind", "path", "symbol", "exportName"], "symbol-export seed");
110
+ return Object.freeze({
111
+ kind: "symbol-export",
112
+ path: normalizeSeedPath(value.path),
113
+ symbol: normalizeIdentifier(value.symbol, "symbol-export seed symbol", WORKING_SET_SEED_LIMITS.maxSymbolLength),
114
+ ...(value.exportName === undefined
115
+ ? {}
116
+ : {
117
+ exportName: normalizeIdentifier(value.exportName, "symbol-export seed exportName", WORKING_SET_SEED_LIMITS.maxExportNameLength),
118
+ }),
119
+ });
120
+ case "architecture-component":
121
+ assertAllowedKeys(value, ["kind", "componentId"], "architecture-component seed");
122
+ return Object.freeze({
123
+ kind: "architecture-component",
124
+ componentId: normalizeIdentifier(value.componentId, "architecture-component seed componentId", WORKING_SET_SEED_LIMITS.maxComponentIdLength),
125
+ });
126
+ }
127
+ }
128
+ function compareSeeds(left, right) {
129
+ const kind = seedKindOrder[left.kind] - seedKindOrder[right.kind];
130
+ if (kind !== 0)
131
+ return kind;
132
+ if (left.kind === "path" && right.kind === "path")
133
+ return left.path.localeCompare(right.path);
134
+ if (left.kind === "architecture-component" && right.kind === "architecture-component") {
135
+ return left.componentId.localeCompare(right.componentId);
136
+ }
137
+ if (left.kind !== "symbol-export" || right.kind !== "symbol-export")
138
+ return 0;
139
+ return (left.path.localeCompare(right.path) ||
140
+ left.symbol.localeCompare(right.symbol) ||
141
+ (left.exportName ?? "").localeCompare(right.exportName ?? ""));
142
+ }
143
+ function seedKey(seed) {
144
+ if (seed.kind === "path")
145
+ return `path\u0000${seed.path}`;
146
+ if (seed.kind === "architecture-component")
147
+ return `architecture-component\u0000${seed.componentId}`;
148
+ return `symbol-export\u0000${seed.path}\u0000${seed.symbol}\u0000${seed.exportName ?? ""}`;
149
+ }
150
+ function normalizeInput(input, requireVersion) {
151
+ if (!isRecord(input))
152
+ throw new TypeError("working-set seed document must be an object");
153
+ assertAllowedKeys(input, ["kind", "schemaVersion", "task", "repository", "revision", "seeds"], "working-set seed document");
154
+ if (input.kind !== undefined && input.kind !== WORKING_SET_SEED_KIND) {
155
+ throw new TypeError("working-set seed document kind is unsupported");
156
+ }
157
+ if (requireVersion && input.schemaVersion !== WORKING_SET_SEED_SCHEMA_VERSION) {
158
+ throw new TypeError("working-set seed schema version is unsupported");
159
+ }
160
+ if (input.schemaVersion !== undefined && input.schemaVersion !== WORKING_SET_SEED_SCHEMA_VERSION) {
161
+ throw new TypeError("working-set seed schema version is unsupported");
162
+ }
163
+ if (!Array.isArray(input.seeds))
164
+ throw new TypeError("working-set seeds must be an array");
165
+ if (input.seeds.length > WORKING_SET_SEED_LIMITS.maxSeeds) {
166
+ throw new TypeError("working-set seeds exceed their bound");
167
+ }
168
+ const unique = new Map();
169
+ for (const value of input.seeds) {
170
+ const seed = normalizeSeed(value);
171
+ unique.set(seedKey(seed), seed);
172
+ }
173
+ const seeds = [...unique.values()].sort(compareSeeds);
174
+ return Object.freeze({
175
+ kind: WORKING_SET_SEED_KIND,
176
+ schemaVersion: WORKING_SET_SEED_SCHEMA_VERSION,
177
+ task: normalizeTask(input.task),
178
+ repository: normalizeRepository(input.repository),
179
+ revision: normalizeRevision(input.revision),
180
+ seeds: Object.freeze(seeds),
181
+ });
182
+ }
183
+ /** Creates and canonicalizes a bounded structured task/seed document. */
184
+ export function createWorkingSetSeeds(input) {
185
+ return normalizeInput(input, false);
186
+ }
187
+ /** Validates a serialized-shape seed document before semantic use. */
188
+ export function validateWorkingSetSeeds(input) {
189
+ return normalizeInput(input, true);
190
+ }
191
+ function canonicalDocument(document) {
192
+ return {
193
+ kind: WORKING_SET_SEED_KIND,
194
+ schemaVersion: WORKING_SET_SEED_SCHEMA_VERSION,
195
+ task: { taskId: document.task.taskId, intent: document.task.intent },
196
+ repository: {
197
+ repositoryHost: document.repository.repositoryHost,
198
+ repositoryId: document.repository.repositoryId,
199
+ repository: document.repository.repository,
200
+ },
201
+ revision: document.revision,
202
+ seeds: document.seeds.map((seed) => {
203
+ if (seed.kind === "path")
204
+ return { kind: "path", path: seed.path };
205
+ if (seed.kind === "architecture-component") {
206
+ return { kind: "architecture-component", componentId: seed.componentId };
207
+ }
208
+ return {
209
+ kind: "symbol-export",
210
+ path: seed.path,
211
+ symbol: seed.symbol,
212
+ ...(seed.exportName === undefined ? {} : { exportName: seed.exportName }),
213
+ };
214
+ }),
215
+ };
216
+ }
217
+ /** Deterministic JSON serialization of the bounded seed contract. */
218
+ export function serializeWorkingSetSeeds(input) {
219
+ const document = validateWorkingSetSeeds({ ...createWorkingSetSeeds(input), schemaVersion: 1 });
220
+ return JSON.stringify(canonicalDocument(document));
221
+ }
222
+ /** Parses JSON and rejects malformed or unsupported seed documents. */
223
+ export function parseWorkingSetSeeds(serialized) {
224
+ if (typeof serialized !== "string")
225
+ throw new TypeError("working-set seed serialization must be a string");
226
+ let parsed;
227
+ try {
228
+ parsed = JSON.parse(serialized);
229
+ }
230
+ catch {
231
+ throw new TypeError("working-set seed serialization is malformed");
232
+ }
233
+ return validateWorkingSetSeeds(parsed);
234
+ }
235
+ export const decodeWorkingSetSeeds = parseWorkingSetSeeds;
236
+ function compareEvidence(left, right) {
237
+ return left.artifact.localeCompare(right.artifact) || left.reference.localeCompare(right.reference);
238
+ }
239
+ function canonicalEvidence(references) {
240
+ const unique = new Map();
241
+ for (const reference of references)
242
+ unique.set(`${reference.artifact}\u0000${reference.reference}`, reference);
243
+ return Object.freeze([...unique.values()]
244
+ .sort(compareEvidence)
245
+ .slice(0, WORKING_SET_SEED_LIMITS.maxResolutionEvidence)
246
+ .map((reference) => Object.freeze({ artifact: reference.artifact, reference: reference.reference })));
247
+ }
248
+ function compareTargets(left, right) {
249
+ return targetKindOrder[left.kind] - targetKindOrder[right.kind] || left.locator.localeCompare(right.locator);
250
+ }
251
+ function canonicalTargets(targets) {
252
+ const unique = new Map();
253
+ for (const target of targets)
254
+ unique.set(`${target.kind}\u0000${target.locator}`, target);
255
+ return Object.freeze([...unique.values()]
256
+ .sort(compareTargets)
257
+ .map((target) => Object.freeze({ kind: target.kind, locator: target.locator })));
258
+ }
259
+ function unresolved(seed, reason, candidates = [], evidence = []) {
260
+ return Object.freeze({
261
+ status: "unresolved",
262
+ seed,
263
+ reason,
264
+ candidates: Object.freeze([...new Set(candidates)].sort().slice(0, WORKING_SET_SEED_LIMITS.maxResolutionCandidates)),
265
+ evidence: canonicalEvidence(evidence),
266
+ });
267
+ }
268
+ function resolved(seed, targets, evidence) {
269
+ const canonical = canonicalTargets(targets);
270
+ return canonical.length === 0
271
+ ? unresolved(seed, "missing", [], evidence)
272
+ : Object.freeze({
273
+ status: "resolved",
274
+ seed,
275
+ targets: canonical,
276
+ evidence: canonicalEvidence(evidence),
277
+ });
278
+ }
279
+ function compareRepository(left, right) {
280
+ return (left.repositoryHost === right.repositoryHost &&
281
+ left.repositoryId === right.repositoryId &&
282
+ left.repository === right.repository);
283
+ }
284
+ function normalizeContext(context) {
285
+ const repository = normalizeRepository(context.repository);
286
+ const revision = normalizeRevision(context.revision);
287
+ const resolvedRepository = context.resolvedRepository;
288
+ if (resolvedRepository === undefined) {
289
+ return { repository, revision, source: repository.repository, valid: true };
290
+ }
291
+ if (typeof resolvedRepository.source !== "string" || resolvedRepository.source.length === 0) {
292
+ throw new TypeError("resolved repository source is malformed");
293
+ }
294
+ const resolvedRevision = normalizeRevision(resolvedRepository.commitSha);
295
+ return {
296
+ repository,
297
+ revision,
298
+ source: resolvedRepository.source,
299
+ valid: resolvedRevision === revision,
300
+ };
301
+ }
302
+ function normalizedMappings(inputs) {
303
+ if (inputs === undefined)
304
+ return [];
305
+ if (!Array.isArray(inputs))
306
+ throw new TypeError("repository mappings must be an array");
307
+ return Object.freeze(inputs
308
+ .map((input) => createRepositoryMapping(input))
309
+ .sort((left, right) => left.canonId.localeCompare(right.canonId) || JSON.stringify(left).localeCompare(JSON.stringify(right))));
310
+ }
311
+ function mappingEvidence(mapping, kind, locator) {
312
+ return { artifact: "canon", reference: `${mapping.canonId}:${kind}:${locator}` };
313
+ }
314
+ function symbolLocator(path, symbol, exportName) {
315
+ return `${path}#${symbol}${exportName === undefined ? "" : `@${exportName}`}`;
316
+ }
317
+ function testLocator(path, selector) {
318
+ return `${path}#${selector}`;
319
+ }
320
+ function entityMatchesBinding(entity, source, revision) {
321
+ return entity.repository.source === source && entity.repository.commitSha.toLowerCase() === revision;
322
+ }
323
+ function memberMatchesSymbol(member, seed) {
324
+ const symbolValues = [member.nativeId, member.name, member.qualifiedName, ...member.aliases].filter((value) => value !== undefined);
325
+ if (!symbolValues.includes(seed.symbol))
326
+ return false;
327
+ if (seed.exportName === undefined)
328
+ return true;
329
+ return symbolValues.includes(seed.exportName);
330
+ }
331
+ function resolvePathSeed(seed, mappings) {
332
+ const evidence = [{ artifact: "repository-binding", reference: `path:${seed.path}` }];
333
+ for (const mapping of mappings) {
334
+ for (const path of mapping.paths) {
335
+ if (path.path === seed.path)
336
+ evidence.push(mappingEvidence(mapping, "path", path.path));
337
+ }
338
+ }
339
+ return resolved(seed, [{ kind: "file", locator: seed.path }], evidence);
340
+ }
341
+ function resolveSymbolSeed(seed, mappings, correlation, source, revision) {
342
+ const mappingMatches = mappings.flatMap((mapping) => mapping.symbols
343
+ .filter((symbol) => symbol.path === seed.path &&
344
+ symbol.symbol === seed.symbol &&
345
+ (symbol.exportName ?? "") === (seed.exportName ?? ""))
346
+ .map((symbol) => ({ mapping, symbol })));
347
+ const evidence = mappingMatches.map(({ mapping, symbol }) => mappingEvidence(mapping, "symbol", symbolLocator(symbol.path, symbol.symbol, symbol.exportName)));
348
+ const candidates = new Map();
349
+ for (const entity of correlation?.canonicalEntities ?? []) {
350
+ if (!entityMatchesBinding(entity, source, revision))
351
+ continue;
352
+ if (entity.members.some((member) => member.path === seed.path && memberMatchesSymbol(member, seed))) {
353
+ candidates.set(entity.canonicalId, entity);
354
+ }
355
+ }
356
+ const candidateIds = [...candidates.keys()].sort();
357
+ for (const canonicalId of candidateIds) {
358
+ evidence.push({ artifact: "provider-correlation", reference: canonicalId });
359
+ }
360
+ const hasAmbiguousEntity = [...candidates.values()].some((entity) => entity.status === "ambiguous" || entity.candidateCanonicalIds.length > 0);
361
+ if (mappingMatches.length > 1 || candidateIds.length > 1 || hasAmbiguousEntity) {
362
+ return unresolved(seed, "ambiguous", candidateIds, evidence);
363
+ }
364
+ if (mappingMatches.length === 0 && candidateIds.length === 0)
365
+ return unresolved(seed, "missing");
366
+ const exportName = seed.exportName ?? mappingMatches[0]?.symbol.exportName;
367
+ return resolved(seed, [{ kind: "symbol", locator: symbolLocator(seed.path, seed.symbol, exportName) }], evidence);
368
+ }
369
+ function resolveComponentSeed(seed, mappings) {
370
+ const matches = mappings.filter((mapping) => mapping.canonId === seed.componentId);
371
+ const evidence = matches.map((mapping) => ({
372
+ artifact: "canon",
373
+ reference: mapping.canonId,
374
+ }));
375
+ if (matches.length === 0)
376
+ return unresolved(seed, "missing");
377
+ if (matches.length > 1)
378
+ return unresolved(seed, "ambiguous", matches.map((mapping) => mapping.canonId), evidence);
379
+ const [mapping] = matches;
380
+ const targets = [
381
+ ...mapping.paths.map((path) => ({ kind: "file", locator: path.path })),
382
+ ...mapping.symbols.map((symbol) => ({
383
+ kind: "symbol",
384
+ locator: symbolLocator(symbol.path, symbol.symbol, symbol.exportName),
385
+ })),
386
+ ...mapping.tests.map((test) => ({ kind: "test", locator: testLocator(test.path, test.selector) })),
387
+ ];
388
+ return resolved(seed, targets, evidence.concat(mapping.paths.map((path) => mappingEvidence(mapping, "path", path.path)), mapping.symbols.map((symbol) => mappingEvidence(mapping, "symbol", symbolLocator(symbol.path, symbol.symbol, symbol.exportName))), mapping.tests.map((test) => mappingEvidence(mapping, "test", testLocator(test.path, test.selector)))));
389
+ }
390
+ function resolveSeed(seed, mappings, context, correlation) {
391
+ if (seed.kind === "path")
392
+ return resolvePathSeed(seed, mappings);
393
+ if (seed.kind === "symbol-export") {
394
+ return resolveSymbolSeed(seed, mappings, correlation, context.source, context.revision);
395
+ }
396
+ return resolveComponentSeed(seed, mappings);
397
+ }
398
+ /**
399
+ * Resolves only the supplied bounded seeds against the pinned repository,
400
+ * existing Canon mappings, and supplied correlation evidence. It never scans
401
+ * the repository or treats seed metadata as execution authority.
402
+ */
403
+ export function resolveWorkingSetSeeds(input, context) {
404
+ const document = createWorkingSetSeeds(input);
405
+ const normalizedContext = normalizeContext(context);
406
+ const mappings = normalizedMappings(context.repositoryMappings);
407
+ const binding = normalizedContext.valid &&
408
+ compareRepository(document.repository, normalizedContext.repository) &&
409
+ document.revision === normalizedContext.revision;
410
+ const resolutions = document.seeds.map((seed) => binding
411
+ ? resolveSeed(seed, mappings, { source: normalizedContext.source, revision: normalizedContext.revision }, context.correlation)
412
+ : unresolved(seed, "repository-mismatch"));
413
+ return Object.freeze({
414
+ kind: WORKING_SET_SEED_RESOLUTION_KIND,
415
+ schemaVersion: WORKING_SET_SEED_SCHEMA_VERSION,
416
+ task: document.task,
417
+ repository: document.repository,
418
+ revision: document.revision,
419
+ binding: binding ? "matched" : "mismatch",
420
+ resolutions: Object.freeze(resolutions),
421
+ });
422
+ }
423
+ /** Resolves one already-canonical seed with the same bounded rules. */
424
+ export function resolveWorkingSetSeed(seed, context) {
425
+ const document = createWorkingSetSeeds({
426
+ task: { taskId: "single-seed", intent: "investigate" },
427
+ repository: context.repository,
428
+ revision: context.revision,
429
+ seeds: [seed],
430
+ });
431
+ return resolveWorkingSetSeeds(document, context).resolutions[0] ?? unresolved(document.seeds[0], "missing");
432
+ }
433
+ //# sourceMappingURL=seeds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seeds.js","sourceRoot":"","sources":["../../src/working-set/seeds.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,uBAAuB,GAGxB,MAAM,8CAA8C,CAAC;AAKtD,gEAAgE;AAChE,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAU,CAAC;AAG1D,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAA4B,CAAC;AAClE,MAAM,CAAC,MAAM,gCAAgC,GAAG,6BAAsC,CAAC;AAEvF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,MAAM,EAAE,eAAe,EAAE,wBAAwB,CAAU,CAAC;AAGnG,gFAAgF;AAChF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,WAAW,EAAE,aAAa,EAAE,QAAQ,CAAU,CAAC;AAGxF,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC;IACnD,QAAQ,EAAE,GAAG;IACb,eAAe,EAAE,GAAG;IACpB,wBAAwB,EAAE,GAAG;IAC7B,iBAAiB,EAAE,EAAE;IACrB,aAAa,EAAE,IAAI;IACnB,eAAe,EAAE,GAAG;IACpB,mBAAmB,EAAE,GAAG;IACxB,oBAAoB,EAAE,GAAG;IACzB,uBAAuB,EAAE,EAAE;IAC3B,qBAAqB,EAAE,EA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iBAAiB,CAAC,QAAQ,EAAE,EAC1E,OAAO,CAAC,WAAW,CACpB;QACH,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAC5C,CAAC;IACF,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,gCAAgC;QACtC,aAAa,EAAE,+BAA+B;QAC9C,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,UAAU,EAAE,QAAQ,CAAC,UAAU;QAC/B,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU;QACzC,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC;KACxC,CAAC,CAAC;AACL,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,qBAAqB,CACnC,IAAyB,EACzB,OAAwC;IAExC,MAAM,QAAQ,GAAG,qBAAqB,CAAC;QACrC,IAAI,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE;QACtD,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,KAAK,EAAE,CAAC,IAAI,CAAC;KACd,CAAC,CAAC;IACH,OAAO,sBAAsB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AAC9G,CAAC"}
package/docs/USAGE.md ADDED
@@ -0,0 +1,118 @@
1
+ # Wabachi usage
2
+
3
+ Wabachi is a deterministic repository-analysis and Architecture Canon CLI.
4
+ This manual explains the normal workflows for people. The installed command
5
+ contract is authoritative: use `wabachi --help`, progressive command help, and
6
+ `wabachi skill` for the exact current syntax.
7
+
8
+ ## Install and discover
9
+
10
+ Wabachi requires Node.js 24 or newer.
11
+
12
+ ```bash
13
+ npm install --global wabachi
14
+ wabachi --version
15
+ wabachi --help
16
+ ```
17
+
18
+ For an ephemeral run, use `npx --yes wabachi --help`. Agents can begin with
19
+ `wabachi skill` and then request one bounded playbook with
20
+ `wabachi skill <scenario>`. Add `--json` to skill or help when consuming the
21
+ projection from a script.
22
+
23
+ ## Analyze a repository
24
+
25
+ `run` resolves a repository and executes the registered analysis providers. It
26
+ can use the default revision resolution or an explicit revision, and writes a
27
+ manifest plus provider output under a temporary directory unless `--out` is
28
+ provided.
29
+
30
+ ```bash
31
+ wabachi run .
32
+ wabachi run . --revision HEAD --out ./artifacts/run
33
+ ```
34
+
35
+ Use a commit SHA or another stable ref when the result will be compared or
36
+ reviewed. The command prints the manifest path. Keep the directory named by
37
+ `--out` if downstream work needs the facts or provider outputs.
38
+
39
+ ## Build a provider matrix
40
+
41
+ `matrix` runs the matrix workflow for one explicit revision and requires a
42
+ retained output directory. Pass a full 40-character commit SHA with
43
+ `--revision`; unlike `run`, `matrix` never falls back to `HEAD`.
44
+
45
+ ```bash
46
+ wabachi matrix . --revision 0123456789abcdef0123456789abcdef01234567 --out ./artifacts/matrix
47
+ ```
48
+
49
+ The command prints the report path. The output directory also contains the
50
+ supporting facts and correlation artifacts used to produce the report. For a
51
+ configured provider workflow, pass a JSON configuration file with the source,
52
+ revision, provider IDs, and addition order:
53
+
54
+ ```bash
55
+ wabachi matrix --config ./matrix-workflow.json --out ./artifacts/matrix
56
+ ```
57
+
58
+ The configured provider set must match the providers registered by the
59
+ installed Wabachi version.
60
+
61
+ ## Architecture Canon
62
+
63
+ Architecture Canon authoring is an explicit file-editing step. Wabachi does
64
+ not provide an init or edit command. Create or revise the conventional
65
+ `.wabachi/architecture.json` document using the repository's documented
66
+ schema, then validate it before rendering. To discover the current Canon shape
67
+ and obtain a minimal valid starting document, run the read-only example command
68
+ and redirect it explicitly:
69
+
70
+ ```bash
71
+ wabachi architecture --help
72
+ mkdir -p .wabachi
73
+ wabachi architecture example > ./.wabachi/architecture.json
74
+ ```
75
+
76
+ The example is printed from the installed package and is not written by
77
+ Wabachi. It is a starting point for explicit authoring, not an implicit init or
78
+ edit workflow. Omitted-file validation and rendering resolve exactly
79
+ `.wabachi/architecture.json`; an explicit `<file>` remains an override.
80
+
81
+ ```bash
82
+ wabachi architecture validate
83
+ wabachi architecture validate ./.wabachi/architecture.json --json
84
+ ```
85
+
86
+ Rendering uses the bundled React Flow + ELK renderer and requires only the
87
+ supported Node.js/npm environment. No Java, Docker, Chromium, Structurizr,
88
+ CDN, or network access is required by the render command. Wabachi writes the
89
+ generated documentation and local static diagrams beneath the directory passed
90
+ to `--out`:
91
+
92
+ ```bash
93
+ wabachi architecture render --out ./artifacts/site
94
+ ```
95
+
96
+ The normal documentation path is: author the conventional Canon, validate it,
97
+ then render it into a retained site. The matching live playbook is
98
+ `wabachi skill architecture-documentation`. Passing an explicit Canon path to
99
+ either command preserves the same workflow for another file.
100
+
101
+ ## Common failures and recovery
102
+
103
+ - If a repository cannot be resolved, confirm the path or remote and retry
104
+ `run` with an explicit revision. Preserve the printed diagnostic when the
105
+ failure needs investigation.
106
+ - If `matrix` rejects a revision, use a full commit SHA and provide `--out`.
107
+ If a configuration is rejected, compare its provider IDs and addition order
108
+ with the installed provider set.
109
+ - If Canon validation fails, fix the reported document issue and validate the
110
+ same file again before rendering. `--json` is useful for automation.
111
+ - If rendering fails, validate the Canon and inspect the bounded output
112
+ directory. The render command does not invoke an external diagram executable.
113
+ - If syntax is uncertain, stop relying on a copied example and resolve the
114
+ current contract with `wabachi architecture --help` or the relevant leaf
115
+ help. Unsupported commands fail closed.
116
+
117
+ Generated outputs are ordinary retained files; Wabachi does not publish them
118
+ or activate an agent plugin as a side effect of npm installation.
@@ -0,0 +1,24 @@
1
+ {
2
+ "canonVersion": 1,
3
+ "documentId": "minimal-architecture-canon",
4
+ "root": { "kind": "architecture", "id": "architecture" },
5
+ "elements": [],
6
+ "interfaces": [],
7
+ "relationships": [],
8
+ "responsibilities": { "responsibilities": [] },
9
+ "authority": { "authority": [], "ownership": [] },
10
+ "boundaries": [],
11
+ "constraints": [],
12
+ "flows": [],
13
+ "deployment": {
14
+ "runtimeEnvironments": [],
15
+ "deploymentNodes": [],
16
+ "deploymentInstances": [],
17
+ "infrastructureReferences": [],
18
+ "mappings": []
19
+ },
20
+ "repositoryMappings": [],
21
+ "decisions": { "decisions": [], "references": [], "referenceAttachments": [] },
22
+ "views": [],
23
+ "globalIdentityRegistry": { "entries": [{ "id": "architecture", "namespace": "architecture" }] }
24
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wabachi",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Repository analysis and Architecture Canon tooling for deterministic codebase understanding.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,19 +9,29 @@
9
9
  "files": [
10
10
  "dist",
11
11
  "README.md",
12
- "LICENSE"
12
+ "LICENSE",
13
+ "docs/USAGE.md",
14
+ "docs/examples",
15
+ "skills",
16
+ ".codex-plugin"
13
17
  ],
14
18
  "dependencies": {
19
+ "@xyflow/react": "12.11.6",
15
20
  "@sourcegraph/scip-typescript": "0.4.0",
21
+ "elkjs": "0.12.0",
22
+ "react": "19.3.0",
23
+ "react-dom": "19.3.0",
16
24
  "typescript": "^6.0.3"
17
25
  },
18
26
  "devDependencies": {
19
27
  "@types/node": "^26.5.1",
20
- "eslint": "10.8.1",
28
+ "@types/react": "19.3.0",
29
+ "@types/react-dom": "19.3.0",
30
+ "eslint": "10.10.0",
21
31
  "js-yaml": "^4.1.0",
22
32
  "prettier": "3.9.6",
23
33
  "tsx": "^4.23.12",
24
- "typescript-eslint": "8.67.0"
34
+ "typescript-eslint": "8.70.0"
25
35
  },
26
36
  "engines": {
27
37
  "node": ">=24"