@aid-framework/cli 0.1.39 → 0.1.51

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.
@@ -0,0 +1,37 @@
1
+ /**
2
+ * `aid doctor` — diagnose a project against the spec it was generated from.
3
+ *
4
+ * The design names four questions and this command asks those four: is the spec still
5
+ * buildable, is the tree the one this generator would write today, did a hand edit leave
6
+ * the tree inconsistent, and is the tree older than the generator being asked about it.
7
+ * Nothing here is a new rule about a file: the spec judgement is `compile`, the tree
8
+ * judgement is `planRegeneration`, and the manifest reading is `readManifest` -- the same
9
+ * three calls `aid gen --dry-run` makes. Doctor differs from that command only in that it
10
+ * keeps going when a check fails, so one run reports every fact a reader can act on
11
+ * instead of the first one.
12
+ *
13
+ * It is read-only by construction rather than by promise: the code path that writes an app
14
+ * is `regenerate`, and this module does not import it.
15
+ *
16
+ * Severity is where the judgement lives, and it is deliberate:
17
+ *
18
+ * - An error is something the tree cannot answer for: a spec that does not compile, a
19
+ * manifest that cannot be read, a generated or business file that is missing, or a
20
+ * generated file a human edited (which blocks regeneration silently otherwise).
21
+ * - A warning is something the tree works around: it was produced by a different version
22
+ * of the generator or of the IR, its generated bytes are older than the spec, or it
23
+ * still holds files the plan no longer produces. `aid gen` repairs all three without
24
+ * discarding anything, so a run that only warns exits 0 on purpose.
25
+ *
26
+ * A project that has never been generated is reported as one error naming the manifest,
27
+ * not as a hundred missing files. Listing every file of an app that does not exist yet
28
+ * describes the generator's output rather than a problem with the project.
29
+ */
30
+ import type { CliContext } from '../context.js';
31
+ import type { CommandOutcome } from '../output.js';
32
+ export interface DoctorOptions {
33
+ readonly spec: string | undefined;
34
+ readonly target: string | undefined;
35
+ }
36
+ export declare function doctor(context: CliContext, options: DoctorOptions): CommandOutcome;
37
+ //# sourceMappingURL=doctor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAUH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAIhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAOnD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AA2HD,wBAAgB,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,GAAG,cAAc,CA0KlF"}
@@ -0,0 +1,275 @@
1
+ /**
2
+ * `aid doctor` — diagnose a project against the spec it was generated from.
3
+ *
4
+ * The design names four questions and this command asks those four: is the spec still
5
+ * buildable, is the tree the one this generator would write today, did a hand edit leave
6
+ * the tree inconsistent, and is the tree older than the generator being asked about it.
7
+ * Nothing here is a new rule about a file: the spec judgement is `compile`, the tree
8
+ * judgement is `planRegeneration`, and the manifest reading is `readManifest` -- the same
9
+ * three calls `aid gen --dry-run` makes. Doctor differs from that command only in that it
10
+ * keeps going when a check fails, so one run reports every fact a reader can act on
11
+ * instead of the first one.
12
+ *
13
+ * It is read-only by construction rather than by promise: the code path that writes an app
14
+ * is `regenerate`, and this module does not import it.
15
+ *
16
+ * Severity is where the judgement lives, and it is deliberate:
17
+ *
18
+ * - An error is something the tree cannot answer for: a spec that does not compile, a
19
+ * manifest that cannot be read, a generated or business file that is missing, or a
20
+ * generated file a human edited (which blocks regeneration silently otherwise).
21
+ * - A warning is something the tree works around: it was produced by a different version
22
+ * of the generator or of the IR, its generated bytes are older than the spec, or it
23
+ * still holds files the plan no longer produces. `aid gen` repairs all three without
24
+ * discarding anything, so a run that only warns exits 0 on purpose.
25
+ *
26
+ * A project that has never been generated is reported as one error naming the manifest,
27
+ * not as a hundred missing files. Listing every file of an app that does not exist yet
28
+ * describes the generator's output rather than a problem with the project.
29
+ */
30
+ import { createNodeSink, planRegeneration, } from '@aid-framework/generator-sdk';
31
+ import { countBySeverity, hasErrors, sortDiagnostics } from '@aid-framework/spec';
32
+ import { CLI_DIAGNOSTIC_CODES, cliError, cliWarning } from '../diagnostics.js';
33
+ import { EXIT_FAILURE, EXIT_OK, EXIT_USAGE } from '../exit.js';
34
+ import { outcome } from '../output.js';
35
+ import { compile, readManifest, readSpec } from '../pipeline.js';
36
+ import { resolveTarget, unknownTargetDiagnostic } from '../targets.js';
37
+ function readTree(report) {
38
+ const generatedMissing = [];
39
+ const businessMissing = [];
40
+ for (const action of report.actions) {
41
+ if (action.kind !== 'create')
42
+ continue;
43
+ if (action.owner === 'generated')
44
+ generatedMissing.push(action.path);
45
+ else
46
+ businessMissing.push(action.path);
47
+ }
48
+ return {
49
+ generatedMissing,
50
+ businessMissing,
51
+ outdated: report.updated,
52
+ drifted: report.drifted.map((drift) => drift.path),
53
+ stale: report.stale,
54
+ unchanged: report.unchanged,
55
+ kept: report.kept,
56
+ };
57
+ }
58
+ function lines(label, paths) {
59
+ if (paths.length === 0)
60
+ return [];
61
+ return [label, ...paths.map((path) => ` ${path}`)];
62
+ }
63
+ function count(entries, one, many) {
64
+ return `${entries.length} ${entries.length === 1 ? one : many}`;
65
+ }
66
+ function treeSummary(facts) {
67
+ const parts = [];
68
+ if (facts.generatedMissing.length > 0) {
69
+ parts.push(count(facts.generatedMissing, 'generated file missing', 'generated files missing'));
70
+ }
71
+ if (facts.businessMissing.length > 0) {
72
+ parts.push(count(facts.businessMissing, 'business file missing', 'business files missing'));
73
+ }
74
+ if (facts.outdated.length > 0) {
75
+ parts.push(count(facts.outdated, 'file out of date', 'files out of date'));
76
+ }
77
+ if (facts.drifted.length > 0) {
78
+ parts.push(count(facts.drifted, 'file hand-edited', 'files hand-edited'));
79
+ }
80
+ if (facts.stale.length > 0) {
81
+ parts.push(count(facts.stale, 'file no longer generated', 'files no longer generated'));
82
+ }
83
+ if (parts.length > 0)
84
+ return `tree: ${parts.join(', ')}`;
85
+ return `tree: ${facts.unchanged.length + facts.kept.length} file(s) match the spec`;
86
+ }
87
+ /**
88
+ * The facts the manifest knows that the plan cannot: who wrote the tree, and from what.
89
+ *
90
+ * The comparison is against `target.manifest.version` -- the version of the generator this
91
+ * binary would run -- not against the CLI's own package version, because the CLI ships a
92
+ * generator without republishing it. That is the same comparison `determinism.ts` defines.
93
+ */
94
+ function provenanceDiagnostics(target, generatedBy, currentIrVersion) {
95
+ const diagnostics = [];
96
+ const path = [target.manifestPath];
97
+ if (generatedBy.generator !== target.manifest.name) {
98
+ diagnostics.push(cliError({
99
+ code: CLI_DIAGNOSTIC_CODES.provenanceMismatch,
100
+ message: `"${target.manifestPath}" was written by target \`${generatedBy.generator}\`, not \`${target.manifest.name}\`.`,
101
+ path,
102
+ hint: `The tree belongs to \`${generatedBy.generator}\`. Ask about that target, or generate this one into its own project.`,
103
+ }));
104
+ }
105
+ if (generatedBy.generatorVersion !== target.manifest.version) {
106
+ diagnostics.push(cliWarning({
107
+ code: CLI_DIAGNOSTIC_CODES.versionMismatch,
108
+ message: `"${target.manifestPath}" was written by ${generatedBy.generator} ${generatedBy.generatorVersion}; this one is ${target.manifest.version}.`,
109
+ path,
110
+ hint: 'Run `aid gen` to regenerate the tree with the generator you are asking about.',
111
+ }));
112
+ }
113
+ if (currentIrVersion !== undefined && generatedBy.irVersion !== currentIrVersion) {
114
+ diagnostics.push(cliWarning({
115
+ code: CLI_DIAGNOSTIC_CODES.versionMismatch,
116
+ message: `"${target.manifestPath}" was generated from IR ${generatedBy.irVersion}; this spec builds IR ${currentIrVersion}.`,
117
+ path,
118
+ hint: 'Run `aid gen` to regenerate the tree from the current IR.',
119
+ }));
120
+ }
121
+ return diagnostics;
122
+ }
123
+ export function doctor(context, options) {
124
+ const command = 'doctor';
125
+ const target = resolveTarget(options.target);
126
+ if (target === undefined) {
127
+ return outcome({
128
+ command,
129
+ exitCode: EXIT_USAGE,
130
+ diagnostics: [unknownTargetDiagnostic(options.target ?? '')],
131
+ });
132
+ }
133
+ const specPath = options.spec ?? target.specPath;
134
+ const diagnostics = [];
135
+ const read = readSpec(context, specPath);
136
+ let compiled;
137
+ let specOk = false;
138
+ let irVersion;
139
+ let specCounts;
140
+ if (read.ok) {
141
+ compiled = compile(read.text, specPath, target);
142
+ diagnostics.push(...compiled.diagnostics);
143
+ specCounts = countBySeverity(compiled.diagnostics);
144
+ if (compiled.ok) {
145
+ specOk = true;
146
+ irVersion = compiled.ir.irVersion;
147
+ }
148
+ }
149
+ else {
150
+ diagnostics.push(...read.diagnostics);
151
+ specCounts = countBySeverity(read.diagnostics);
152
+ }
153
+ const sink = createNodeSink(context.cwd);
154
+ const manifestRead = readManifest(sink, target);
155
+ const manifest = manifestRead.ok ? manifestRead.manifest : undefined;
156
+ const manifestState = !manifestRead.ok
157
+ ? 'unreadable'
158
+ : manifest === undefined
159
+ ? 'absent'
160
+ : 'present';
161
+ if (!manifestRead.ok) {
162
+ diagnostics.push(...manifestRead.diagnostics);
163
+ }
164
+ else if (manifest === undefined) {
165
+ diagnostics.push(cliError({
166
+ code: CLI_DIAGNOSTIC_CODES.manifestMissing,
167
+ message: `No manifest at "${target.manifestPath}": this target's tree has never been generated.`,
168
+ path: [],
169
+ hint: 'Run `aid gen` to write the app, then ask again.',
170
+ }));
171
+ }
172
+ else {
173
+ diagnostics.push(...provenanceDiagnostics(target, manifest.generatedBy, specOk ? irVersion : undefined));
174
+ }
175
+ let facts;
176
+ if (compiled?.ok === true && manifest !== undefined) {
177
+ const report = planRegeneration(compiled.plan, { sink, manifest });
178
+ facts = readTree(report);
179
+ // The SDK's own verdict on hand edits and on files the plan no longer produces.
180
+ // Re-reported rather than re-derived: `generatedDrift` is the code the rest of the
181
+ // toolchain already means by that name, and a second code would be a second answer.
182
+ diagnostics.push(...report.diagnostics);
183
+ if (facts.generatedMissing.length > 0) {
184
+ diagnostics.push(cliError({
185
+ code: CLI_DIAGNOSTIC_CODES.filesMissing,
186
+ message: `${count(facts.generatedMissing, 'generated file is', 'generated files are')} missing from the tree.`,
187
+ // `path` in a diagnostic is one document path, rendered joined; a set of files
188
+ // is not that. The paths are in the summary text and in the report's `tree`.
189
+ path: [],
190
+ hint: 'Run `aid gen` to write them from the spec.',
191
+ }));
192
+ }
193
+ if (facts.businessMissing.length > 0) {
194
+ diagnostics.push(cliError({
195
+ code: CLI_DIAGNOSTIC_CODES.businessMissing,
196
+ message: `${count(facts.businessMissing, 'business file is', 'business files are')} missing: the tree has no prompts or business logic where the spec declares one.`,
197
+ path: [],
198
+ hint: 'Run `aid gen` to scaffold them. Business files are created once and never overwritten.',
199
+ }));
200
+ }
201
+ if (facts.outdated.length > 0) {
202
+ diagnostics.push(cliWarning({
203
+ code: CLI_DIAGNOSTIC_CODES.filesOutdated,
204
+ message: `${count(facts.outdated, 'generated file is', 'generated files are')} older than the spec: nobody edited them, so regenerating loses nothing.`,
205
+ path: [],
206
+ hint: 'Run `aid gen` to bring the tree up to date.',
207
+ }));
208
+ }
209
+ }
210
+ const finalCounts = countBySeverity(diagnostics);
211
+ const manifestLine = manifestState === 'absent'
212
+ ? 'absent, the tree has never been generated'
213
+ : manifestState === 'unreadable'
214
+ ? `${target.manifestPath}, unreadable`
215
+ : manifest === undefined
216
+ ? target.manifestPath
217
+ : `${target.manifestPath}, generated by ${manifest.generatedBy.generator} ${manifest.generatedBy.generatorVersion}, IR ${manifest.generatedBy.irVersion}`;
218
+ const texts = [
219
+ finalCounts.error === 0
220
+ ? `${target.name}: ok (0 errors, ${finalCounts.warning} warnings)`
221
+ : `${target.name}: ${finalCounts.error} error(s), ${finalCounts.warning} warning(s)`,
222
+ specOk
223
+ ? `spec: ok (${specCounts.error} errors, ${specCounts.warning} warnings)`
224
+ : `spec: ${specCounts.error} error(s), ${specCounts.warning} warning(s)`,
225
+ `manifest: ${manifestLine}`,
226
+ ];
227
+ if (facts !== undefined) {
228
+ texts.push(treeSummary(facts));
229
+ texts.push(...lines('missing generated files:', facts.generatedMissing));
230
+ texts.push(...lines('missing business files:', facts.businessMissing));
231
+ texts.push(...lines('out of date, regenerate:', facts.outdated));
232
+ texts.push(...lines('hand-edited generated files:', facts.drifted));
233
+ texts.push(...lines('no longer generated:', facts.stale));
234
+ }
235
+ else if (compiled?.ok !== true) {
236
+ texts.push('tree: not checked, the spec did not compile');
237
+ }
238
+ else if (manifestState === 'absent') {
239
+ texts.push('tree: not checked, there is no manifest to compare it with');
240
+ }
241
+ else {
242
+ texts.push('tree: not checked, the manifest could not be read');
243
+ }
244
+ return outcome({
245
+ command,
246
+ exitCode: hasErrors(diagnostics) ? EXIT_FAILURE : EXIT_OK,
247
+ fields: {
248
+ target: target.name,
249
+ spec: specPath,
250
+ manifest: {
251
+ path: target.manifestPath,
252
+ state: manifestState,
253
+ ...(manifest === undefined ? {} : { generatedBy: manifest.generatedBy }),
254
+ },
255
+ specOk,
256
+ counts: finalCounts,
257
+ ...(facts === undefined
258
+ ? {}
259
+ : {
260
+ tree: {
261
+ generatedMissing: facts.generatedMissing,
262
+ businessMissing: facts.businessMissing,
263
+ outdated: facts.outdated,
264
+ drifted: facts.drifted,
265
+ stale: facts.stale,
266
+ unchanged: facts.unchanged.length,
267
+ kept: facts.kept.length,
268
+ },
269
+ }),
270
+ },
271
+ diagnostics: sortDiagnostics(diagnostics),
272
+ text: texts.join('\n'),
273
+ });
274
+ }
275
+ //# sourceMappingURL=doctor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EACL,cAAc,EACd,gBAAgB,GAEjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAIlF,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,YAAY,EAA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AC;oBACE,IAAI,EAAE;wBACJ,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;wBACxC,eAAe,EAAE,KAAK,CAAC,eAAe;wBACtC,QAAQ,EAAE,KAAK,CAAC,QAAQ;wBACxB,OAAO,EAAE,KAAK,CAAC,OAAO;wBACtB,KAAK,EAAE,KAAK,CAAC,KAAK;wBAClB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;wBACjC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM;qBACxB;iBACF,CAAC;SACP;QACD,WAAW,EAAE,eAAe,CAAC,WAAW,CAAC;QACzC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;KACvB,CAAC,CAAC;AACL,CAAC"}
@@ -29,6 +29,12 @@ export declare const CLI_DIAGNOSTIC_CODES: {
29
29
  readonly runnerUnsupported: 'cli/runner-unsupported';
30
30
  readonly runnerFailed: 'cli/runner-failed';
31
31
  readonly runnerWarned: 'cli/runner-warned';
32
+ readonly manifestMissing: 'cli/manifest-missing';
33
+ readonly provenanceMismatch: 'cli/provenance-mismatch';
34
+ readonly versionMismatch: 'cli/version-mismatch';
35
+ readonly filesMissing: 'cli/files-missing';
36
+ readonly businessMissing: 'cli/business-missing';
37
+ readonly filesOutdated: 'cli/files-outdated';
32
38
  };
33
39
  export type CliDiagnosticCode = (typeof CLI_DIAGNOSTIC_CODES)[keyof typeof CLI_DIAGNOSTIC_CODES];
34
40
  export interface CliDiagnosticInit {
@@ -1 +1 @@
1
- {"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,gEAAgE;AAChE,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAE/C,eAAO,MAAM,oBAAoB;aAC/B,cAAc,EAAE,qBAAqB;aACrC,aA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B;aAC9C,iBAAiB,EAAE,wBAAwB;aAC3C,iBAAiB,EAAE,wBAAwB;aAC3C,iBAAiB,EAAE,yBAAyB;aAC5C,oBAAoB,EAAE,4BAA4B;aAClD,iBAAiB,EAAE,wBAAwB;aAC3C,YAAY,EAAE,mBAAmB;aACjC,YAAY,EAAE,mBAAmB;aAGjC,eAAe,EAAE,sBAAsB;aACvC,kBAAkB,EAAE,yBAAyB;aAC7C,eAAe,EAAE,sBAAsB;aACvC,YAAY,EAAE,mBAAmB;aACjC,eAAe,EAAE,sBAAsB;aACvC,aAAa,EAAE,oBAAoB;CAC3B,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAEjG,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,iBAAiB,GAAG,aAAa,CAO/D;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,iBAAiB,GAAG,aAAa,CAOjE"}
@@ -27,6 +27,14 @@ export const CLI_DIAGNOSTIC_CODES = {
27
27
  runnerUnsupported: 'cli/runner-unsupported',
28
28
  runnerFailed: 'cli/runner-failed',
29
29
  runnerWarned: 'cli/runner-warned',
30
+ // `aid doctor` originates these. The tree checks it reports through the SDK's own
31
+ // codes (drift, stale) rather than these, so a reader sees one code per fact.
32
+ manifestMissing: 'cli/manifest-missing',
33
+ provenanceMismatch: 'cli/provenance-mismatch',
34
+ versionMismatch: 'cli/version-mismatch',
35
+ filesMissing: 'cli/files-missing',
36
+ businessMissing: 'cli/business-missing',
37
+ filesOutdated: 'cli/files-outdated',
30
38
  };
31
39
  export function cliError(init) {
32
40
  return errorDiagnostic({
@@ -1 +1 @@
1
- {"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAKzE,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,cAAc,EAAE,qBAAqB;IACrC,aAAa,EAAE,oBAAoB;IACnC,mBAAmB,EAAE,2BAA2B;IAChD,aAAa,EAAE,oBAAoB;IACnC,aAAa,EAAE,qBAAqB;IACpC,kBAAkB,EAAE,0BAA0B;IAC9C,iBAAiB,EAAE,wBAAwB;IAC3C,iBAAiB,EAAE,wBAAwB;IAC3C,iBAAiB,EAAE,yBAAyB;IAC5C,oBAAoB,EAAE,4BAA4B;IAClD,iBAAiB,EAAE,wBAAwB;IAC3C,YAAY,EAAE,mBAAmB;IACjC,YAAY,EAAE,mBAAmB;CACzB,CAAC;AAWX,MAAM,UAAU,QAAQ,CAAC,IAAuB;IAC9C,OAAO,eAAe,CAAC;QACrB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE;QACrB,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;KACxD,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAuB;IAChD,OAAO,iBAAiB,CAAC;QACvB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE;QACrB,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,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C;AAED,MAAM,UAAU,UAAU,CAAC,IAAuB;IAChD,OAAO,iBAAiB,CAAC;QACvB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE;QACrB,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;KACxD,CAAC,CAAC;AACL,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * `@aid-framework/cli` - the `aid` command: init, validate, gen, ingest and eval.
2
+ * `@aid-framework/cli` - the `aid` command: init, validate, gen, ingest, eval and doctor.
3
3
  *
4
4
  * The CLI is glue. Every judgement it reports -- whether a spec parses, what the IR is,
5
5
  * what a target can emit, which generated file was hand-edited, whether an eval regressed
@@ -12,6 +12,8 @@
12
12
  */
13
13
  export type { FlagSpec, ParsedArguments, ParseOutcome } from './args.js';
14
14
  export { booleanFlag, JSON_FLAG, parseArguments, valueFlag } from './args.js';
15
+ export type { DoctorOptions } from './commands/doctor.js';
16
+ export { doctor } from './commands/doctor.js';
15
17
  export type { EvalOptions } from './commands/eval.js';
16
18
  export { evaluate } from './commands/eval.js';
17
19
  export type { GenerateOptions, GenerateSuccess } from './commands/gen.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC9E,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,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d,aAAa,EACb,OAAO,EACP,kBAAkB,EAClB,WAAW,EACX,uBAAuB,GACxB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * `@aid-framework/cli` - the `aid` command: init, validate, gen, ingest and eval.
2
+ * `@aid-framework/cli` - the `aid` command: init, validate, gen, ingest, eval and doctor.
3
3
  *
4
4
  * The CLI is glue. Every judgement it reports -- whether a spec parses, what the IR is,
5
5
  * what a target can emit, which generated file was hand-edited, whether an eval regressed
@@ -11,6 +11,7 @@
11
11
  * The layering is `spec <- ir <- generator-sdk <- generators <- cli`.
12
12
  */
13
13
  export { booleanFlag, JSON_FLAG, parseArguments, valueFlag } from './args.js';
14
+ export { doctor } from './commands/doctor.js';
14
15
  export { evaluate } from './commands/eval.js';
15
16
  export { generate } from './commands/gen.js';
16
17
  export { ingest } from './commands/ingest.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE9E,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,oBAAoB,EAAE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C9E;AAQD,eAAO,MAAM,QAAQ,EAAE,SAAS,OAAO,EAoFtC,CAAC;AA0BF,wBAAgB,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,GAAG,QAAQ,CAuC1E"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAQjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG9C,UAAU,OAAQ,SAAQ,WAAW;IACnC,QAAQ,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,KAAK,cAAc,CAAC;CAC9E;AAQD,eAAO,MAAM,QAAQ,EAAE,SAAS,OAAO,EA+FtC,CAAC;AA0BF,wBAAgB,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,GAAG,QAAQ,CAuC1E"}
package/dist/main.js CHANGED
@@ -12,6 +12,7 @@
12
12
  * below is a two-line adapter and not a flag handler.
13
13
  */
14
14
  import { booleanFlag, JSON_FLAG, parseArguments, valueFlag } from './args.js';
15
+ import { doctor } from './commands/doctor.js';
15
16
  import { evaluate } from './commands/eval.js';
16
17
  import { generate } from './commands/gen.js';
17
18
  import { ingest } from './commands/ingest.js';
@@ -102,6 +103,16 @@ export const COMMANDS = [
102
103
  baseline: args.booleans.has('baseline'),
103
104
  }),
104
105
  },
106
+ {
107
+ name: 'doctor',
108
+ summary: 'diagnose the tree against the spec: drift, versions, missing files',
109
+ usage: 'doctor [spec] [--target <name>]',
110
+ flags: [TARGET_FLAG, JSON_FLAG],
111
+ run: (context, args) => doctor(context, {
112
+ spec: args.positionals[0],
113
+ target: args.values.get('target'),
114
+ }),
115
+ },
105
116
  ];
106
117
  function usageError(context, message, usage) {
107
118
  context.stderr(`aid: ${message}\n\n${usage ?? globalUsage(COMMANDS)}`);
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGlD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAMvD,MAAM,WAAW,GAAG,SAAS,CAC3B,QAAQ,EACR,MAAM,EACN,4BAA4B,WAAW,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACvD,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB;IAC1C;QACE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,iDAAiD;QAC1D,KAAK,EAAE,gEAAgE;QACvE,KAAK,EAAE;YACL,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,wDAAwD,CAAC;YACnF,WAAW;YAC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OAAO,CAAC,IAAI,kCAAkC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EACvF,YAAY,CAAC,OAAO,CAAC,CACtB,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9C,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAChE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,aAAa,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aid-framework/cli",
3
- "version": "0.1.39",
3
+ "version": "0.1.51",
4
4
  "description": "The `aid` command: scaffold a project, validate its spec, generate its code, and run its eval gate.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -33,11 +33,11 @@
33
33
  "access": "public"
34
34
  },
35
35
  "dependencies": {
36
- "@aid-framework/generator-py-fastapi": "0.1.39",
37
- "@aid-framework/generator-sdk": "0.1.39",
38
- "@aid-framework/generator-ts-vercel": "0.1.39",
39
- "@aid-framework/ir": "0.1.39",
40
- "@aid-framework/spec": "0.1.39"
36
+ "@aid-framework/generator-py-fastapi": "0.1.51",
37
+ "@aid-framework/generator-sdk": "0.1.51",
38
+ "@aid-framework/generator-ts-vercel": "0.1.51",
39
+ "@aid-framework/ir": "0.1.51",
40
+ "@aid-framework/spec": "0.1.51"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/node": "^26.6.5"