@encore-os/eos-spec 0.3.1 → 0.4.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.
- package/dist/commands/complete.js +3 -1
- package/dist/commands/complete.js.map +1 -1
- package/dist/commands/gen-tests.js +5 -2
- package/dist/commands/gen-tests.js.map +1 -1
- package/dist/commands/init.js +96 -22
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/next.js +6 -3
- package/dist/commands/next.js.map +1 -1
- package/dist/commands/precedent.d.ts +2 -0
- package/dist/commands/precedent.js +12 -3
- package/dist/commands/precedent.js.map +1 -1
- package/dist/commands/verify-acs.js +7 -4
- package/dist/commands/verify-acs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/code-evidence.js +2 -1
- package/dist/lib/code-evidence.js.map +1 -1
- package/dist/lib/coherence.d.ts +2 -2
- package/dist/lib/coherence.js +7 -6
- package/dist/lib/coherence.js.map +1 -1
- package/dist/lib/config.d.ts +34 -0
- package/dist/lib/config.js +46 -0
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/discovery-defaults.d.ts +20 -0
- package/dist/lib/discovery-defaults.js +21 -0
- package/dist/lib/discovery-defaults.js.map +1 -0
- package/dist/lib/migration-collision.d.ts +5 -4
- package/dist/lib/migration-collision.js +8 -6
- package/dist/lib/migration-collision.js.map +1 -1
- package/dist/lib/scaffold-templates.d.ts +30 -0
- package/dist/lib/scaffold-templates.js +203 -0
- package/dist/lib/scaffold-templates.js.map +1 -0
- package/dist/lib/test-generator.d.ts +1 -1
- package/dist/lib/test-generator.js +3 -2
- package/dist/lib/test-generator.js.map +1 -1
- package/dist/lib/verifies-scan.d.ts +5 -1
- package/dist/lib/verifies-scan.js +9 -3
- package/dist/lib/verifies-scan.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","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AAC;AACzB,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAC3B,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAC1B,aAAa,CAAC,OAAO,CAAC,CAAC;AACvB,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAE7B,OAAO,CAAC,WAAW,CACjB,OAAO,EACP;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BD,CACA,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,IAAc;IACtC,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC;AAED,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,UAAU,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACpD,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC7F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
+
import { resolveDiscoveryPaths } from './config.js';
|
|
3
4
|
const SKIP_DIRS = new Set(['node_modules', '.git', 'dist', 'build', 'coverage', '.turbo']);
|
|
4
5
|
const SOURCE_FILE = /\.(ts|tsx|sql)$/;
|
|
5
6
|
const TEST_FILE = /\.(test|spec)\.tsx?$/;
|
|
@@ -126,7 +127,7 @@ export function deriveCodeEvidence(repoRoot, spec, row) {
|
|
|
126
127
|
}
|
|
127
128
|
const tokens = extractTableTokens(specText, core);
|
|
128
129
|
const coreDir = join(repoRoot, 'src', 'cores', core);
|
|
129
|
-
const migDir = join(repoRoot,
|
|
130
|
+
const migDir = join(repoRoot, resolveDiscoveryPaths(repoRoot).migrationsDir);
|
|
130
131
|
// hasTestsPass — TRUE only for a genuine @verifies backlink that's mis-targeted (verifiedUndeclared>0).
|
|
131
132
|
// An incidental id-mention in a tests/ file is recorded as a HINT only; it never sets hasTestsPass.
|
|
132
133
|
const reasons = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-evidence.js","sourceRoot":"","sources":["../../src/lib/code-evidence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"code-evidence.js","sourceRoot":"","sources":["../../src/lib/code-evidence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAIpD,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAC3F,MAAM,WAAW,GAAG,iBAAiB,CAAC;AACtC,MAAM,SAAS,GAAG,sBAAsB,CAAC;AACzC,kHAAkH;AAClH,MAAM,WAAW,GAAG,qEAAqE,CAAC;AAY1F;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,QAAgB,EAAE,IAAY;IAC/D,MAAM,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC;IACxC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAA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FAA6F;IAC7F,IAAI,WAAW,GAAG,KAAK,CAAC;IACxB,IAAI,CAAC,OAAO,IAAI,KAAK,KAAK,UAAU,EAAE,CAAC;QACrC,WAAW,GAAG,IAAI,CAAC;QACnB,OAAO,CAAC,IAAI,CAAC,qCAAqC,IAAI,CAAC,EAAE,iBAAiB,IAAI,EAAE,CAAC,CAAC;IACpF,CAAC;IAED,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AAC5E,CAAC"}
|
package/dist/lib/coherence.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export type ExistingTableRef = {
|
|
|
10
10
|
table: string;
|
|
11
11
|
migration: string;
|
|
12
12
|
};
|
|
13
|
-
export declare function findExistingTableReferences(repoRoot: string, specId: string, core: string): ExistingTableRef[];
|
|
14
|
-
export declare function evaluateCoherence(repoRoot: string, specId: string, core: string): CoherenceReport;
|
|
13
|
+
export declare function findExistingTableReferences(repoRoot: string, specId: string, core: string, migrationsRelDir?: string): ExistingTableRef[];
|
|
14
|
+
export declare function evaluateCoherence(repoRoot: string, specId: string, core: string, migrationsRelDir?: string): CoherenceReport;
|
package/dist/lib/coherence.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { join, relative } from 'node:path';
|
|
3
|
+
import { DEFAULT_MIGRATIONS_DIR } from './discovery-defaults.js';
|
|
3
4
|
import { runScript } from './exec.js';
|
|
4
5
|
import { readFrontmatter, stripFrontmatter } from './frontmatter.js';
|
|
5
6
|
/**
|
|
@@ -24,7 +25,7 @@ function isLifecycleComplete(specText) {
|
|
|
24
25
|
return COMPLETE_STATUS_VALUE_RE.test(fmStatus);
|
|
25
26
|
return COMPLETE_STATUS_PROSE_RE.test(stripFrontmatter(specText));
|
|
26
27
|
}
|
|
27
|
-
export function findExistingTableReferences(repoRoot, specId, core) {
|
|
28
|
+
export function findExistingTableReferences(repoRoot, specId, core, migrationsRelDir = DEFAULT_MIGRATIONS_DIR) {
|
|
28
29
|
const specPath = resolveSpecPath(repoRoot, core, specId);
|
|
29
30
|
if (!specPath)
|
|
30
31
|
return [];
|
|
@@ -33,7 +34,7 @@ export function findExistingTableReferences(repoRoot, specId, core) {
|
|
|
33
34
|
// pointing at its own production migrations. Skip the advisory in that case.
|
|
34
35
|
if (isLifecycleComplete(specText))
|
|
35
36
|
return [];
|
|
36
|
-
const migrationsDir = join(repoRoot,
|
|
37
|
+
const migrationsDir = join(repoRoot, migrationsRelDir);
|
|
37
38
|
if (!existsSync(migrationsDir))
|
|
38
39
|
return [];
|
|
39
40
|
const tables = extractTableNames(specText, core);
|
|
@@ -52,7 +53,7 @@ export function findExistingTableReferences(repoRoot, specId, core) {
|
|
|
52
53
|
}
|
|
53
54
|
return out;
|
|
54
55
|
}
|
|
55
|
-
export function evaluateCoherence(repoRoot, specId, core) {
|
|
56
|
+
export function evaluateCoherence(repoRoot, specId, core, migrationsRelDir = DEFAULT_MIGRATIONS_DIR) {
|
|
56
57
|
const warnings = [];
|
|
57
58
|
const specPath = resolveSpecPath(repoRoot, core, specId);
|
|
58
59
|
if (!specPath)
|
|
@@ -60,7 +61,7 @@ export function evaluateCoherence(repoRoot, specId, core) {
|
|
|
60
61
|
const specText = readSafe(specPath);
|
|
61
62
|
const taskPath = join(repoRoot, 'specs', core, 'tasks', `${specId}-TASKS.md`);
|
|
62
63
|
const tasksText = readSafe(taskPath);
|
|
63
|
-
const migrationText = readMigrationText(repoRoot);
|
|
64
|
+
const migrationText = readMigrationText(repoRoot, migrationsRelDir);
|
|
64
65
|
for (const table of extractTableNames(specText, core)) {
|
|
65
66
|
const tableRegex = new RegExp(`\\bcreate\\s+table\\b[\\s\\S]{0,200}\\b${escapeRegex(table)}\\b`, 'i');
|
|
66
67
|
if (!tableRegex.test(migrationText)) {
|
|
@@ -112,8 +113,8 @@ function readSafe(path) {
|
|
|
112
113
|
return '';
|
|
113
114
|
return readFileSync(path, 'utf8');
|
|
114
115
|
}
|
|
115
|
-
function readMigrationText(repoRoot) {
|
|
116
|
-
const migrationsDir = join(repoRoot,
|
|
116
|
+
function readMigrationText(repoRoot, migrationsRelDir = DEFAULT_MIGRATIONS_DIR) {
|
|
117
|
+
const migrationsDir = join(repoRoot, migrationsRelDir);
|
|
117
118
|
if (!existsSync(migrationsDir))
|
|
118
119
|
return '';
|
|
119
120
|
let combined = '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coherence.js","sourceRoot":"","sources":["../../src/lib/coherence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAcrE;;;;;;;GAOG;AACH;;kCAEkC;AAClC,MAAM,wBAAwB,GAAG,8BAA8B,CAAC;AAChE,MAAM,wBAAwB,GAAG,iDAAiD,CAAC;AAEnF;0FAC0F;AAC1F,SAAS,mBAAmB,CAAC,QAAgB;IAC3C,MAAM,EAAE,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IACrC,MAAM,QAAQ,GAAG,OAAO,EAAE,CAAC,MAAM,KAAK,QAAQ,IAAI,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IACzG,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,wBAAwB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3E,OAAO,wBAAwB,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAA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|
28
28
|
archive: string;
|
|
29
|
+
/** Dir holding committed SQL migrations, relative to repo root (TOOL-03).
|
|
30
|
+
* Absent ⇒ `supabase/migrations`. */
|
|
31
|
+
migrations?: string;
|
|
32
|
+
/** Dir where `gen-tests` writes generated skeletons, relative to repo root
|
|
33
|
+
* (TOOL-03). Absent ⇒ `e2e/generated`. */
|
|
34
|
+
generated_tests?: string;
|
|
35
|
+
/** Roots walked for `@verifies` frontmatter-scorecard backlinks (TOOL-03).
|
|
36
|
+
* Absent ⇒ DEFAULT_VERIFIES_SCAN_ROOTS. */
|
|
37
|
+
verifies_scan_roots?: string[];
|
|
38
|
+
/** Roots walked for a single spec's `@verifies` backing-test backlinks
|
|
39
|
+
* (TOOL-03). Absent ⇒ DEFAULT_VERIFIES_BACKLINK_ROOTS. */
|
|
40
|
+
verifies_backlink_roots?: string[];
|
|
29
41
|
};
|
|
30
42
|
templates: Record<string, string | Record<string, string>>;
|
|
31
43
|
hard_gates: Array<{
|
|
@@ -61,3 +73,25 @@ export declare function isKnownCoreFromConfig(config: SpecConfig, core: string):
|
|
|
61
73
|
export declare function resolveTemplatePath(config: SpecConfig, key: string): string | null;
|
|
62
74
|
/** Get the archive directory path pattern from config. */
|
|
63
75
|
export declare function archiveDestination(config: SpecConfig): string;
|
|
76
|
+
/** Dir holding committed SQL migrations, relative to repo root. */
|
|
77
|
+
export declare function migrationsDir(config: SpecConfig): string;
|
|
78
|
+
/** Dir where `gen-tests` writes generated test skeletons, relative to repo root. */
|
|
79
|
+
export declare function generatedTestsDir(config: SpecConfig): string;
|
|
80
|
+
/** Roots walked for `@verifies` frontmatter-scorecard backlinks. */
|
|
81
|
+
export declare function verifiesScanRoots(config: SpecConfig): string[];
|
|
82
|
+
/** Roots walked for a single spec's `@verifies` backing-test backlinks. */
|
|
83
|
+
export declare function verifiesBacklinkRoots(config: SpecConfig): string[];
|
|
84
|
+
export type DiscoveryPaths = {
|
|
85
|
+
migrationsDir: string;
|
|
86
|
+
generatedTestsDir: string;
|
|
87
|
+
verifiesScanRoots: string[];
|
|
88
|
+
verifiesBacklinkRoots: string[];
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Resolve every discovery path from `specs/config.yaml`, fail-safe to the
|
|
92
|
+
* fork-layout defaults when the config (or an individual key) is absent — so a
|
|
93
|
+
* repo with no `specs/config.yaml` gets exactly today's behavior. This is the
|
|
94
|
+
* one entry the leaves and commands call so the fallback logic lives in a single
|
|
95
|
+
* place (TOOL-03 AC-3/AC-4).
|
|
96
|
+
*/
|
|
97
|
+
export declare function resolveDiscoveryPaths(repoRoot: string, configOverride?: string): DiscoveryPaths;
|
package/dist/lib/config.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { parse as parseYaml } from 'yaml';
|
|
4
|
+
import { DEFAULT_GENERATED_TESTS_DIR, DEFAULT_MIGRATIONS_DIR, DEFAULT_VERIFIES_BACKLINK_ROOTS, DEFAULT_VERIFIES_SCAN_ROOTS, } from './discovery-defaults.js';
|
|
4
5
|
let cached = null;
|
|
5
6
|
let cachedPath = null;
|
|
6
7
|
export function loadConfig(repoRoot, configOverride) {
|
|
@@ -37,4 +38,49 @@ export function resolveTemplatePath(config, key) {
|
|
|
37
38
|
export function archiveDestination(config) {
|
|
38
39
|
return config.archive.destination;
|
|
39
40
|
}
|
|
41
|
+
// ── Discovery-path resolvers (TOOL-03 AC-3/AC-4) ─────────────────────────────
|
|
42
|
+
// Each hardcoded discovery-path site resolves its path through one of these
|
|
43
|
+
// helpers instead of carrying its own literal. The literal lives once, in
|
|
44
|
+
// `discovery-defaults.ts`; an absent config key falls back to it, so an
|
|
45
|
+
// EncoreOS-layout repo is unchanged while an arbitrary repo can override it.
|
|
46
|
+
// `paths` itself is read with `?.` — a hand-trimmed config.yaml may omit the
|
|
47
|
+
// whole block, and the fallback must still hold.
|
|
48
|
+
/** Dir holding committed SQL migrations, relative to repo root. */
|
|
49
|
+
export function migrationsDir(config) {
|
|
50
|
+
return config.paths?.migrations ?? DEFAULT_MIGRATIONS_DIR;
|
|
51
|
+
}
|
|
52
|
+
/** Dir where `gen-tests` writes generated test skeletons, relative to repo root. */
|
|
53
|
+
export function generatedTestsDir(config) {
|
|
54
|
+
return config.paths?.generated_tests ?? DEFAULT_GENERATED_TESTS_DIR;
|
|
55
|
+
}
|
|
56
|
+
/** Roots walked for `@verifies` frontmatter-scorecard backlinks. */
|
|
57
|
+
export function verifiesScanRoots(config) {
|
|
58
|
+
return config.paths?.verifies_scan_roots ?? DEFAULT_VERIFIES_SCAN_ROOTS;
|
|
59
|
+
}
|
|
60
|
+
/** Roots walked for a single spec's `@verifies` backing-test backlinks. */
|
|
61
|
+
export function verifiesBacklinkRoots(config) {
|
|
62
|
+
return config.paths?.verifies_backlink_roots ?? DEFAULT_VERIFIES_BACKLINK_ROOTS;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Resolve every discovery path from `specs/config.yaml`, fail-safe to the
|
|
66
|
+
* fork-layout defaults when the config (or an individual key) is absent — so a
|
|
67
|
+
* repo with no `specs/config.yaml` gets exactly today's behavior. This is the
|
|
68
|
+
* one entry the leaves and commands call so the fallback logic lives in a single
|
|
69
|
+
* place (TOOL-03 AC-3/AC-4).
|
|
70
|
+
*/
|
|
71
|
+
export function resolveDiscoveryPaths(repoRoot, configOverride) {
|
|
72
|
+
let config = null;
|
|
73
|
+
try {
|
|
74
|
+
config = loadConfig(repoRoot, configOverride);
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
config = null;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
migrationsDir: config ? migrationsDir(config) : DEFAULT_MIGRATIONS_DIR,
|
|
81
|
+
generatedTestsDir: config ? generatedTestsDir(config) : DEFAULT_GENERATED_TESTS_DIR,
|
|
82
|
+
verifiesScanRoots: config ? verifiesScanRoots(config) : DEFAULT_VERIFIES_SCAN_ROOTS,
|
|
83
|
+
verifiesBacklinkRoots: config ? verifiesBacklinkRoots(config) : DEFAULT_VERIFIES_BACKLINK_ROOTS,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
40
86
|
//# sourceMappingURL=config.js.map
|
package/dist/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,EACtB,+BAA+B,EAC/B,2BAA2B,GAC5B,MAAM,yBAAyB,CAAC;AAyEjC,IAAI,MAAM,GAAsB,IAAI,CAAC;AACrC,IAAI,UAAU,GAAkB,IAAI,CAAC;AAErC,MAAM,UAAU,UAAU,CAAC,QAAgB,EAAE,cAAuB;IAClE,MAAM,UAAU,GAAG,cAAc,IAAI,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;IAE5E,IAAI,MAAM,IAAI,UAAU,KAAK,UAAU;QAAE,OAAO,MAAM,CAAC;IAEvD,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,0BAA0B,UAAU,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED,MAAM,GAAG,GAAG,YAAY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D,OAAO,MAAM,CAAC,KAAK,EAAE,eAAe,IAAI,2BAA2B,CAAC;AACtE,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,iBAAiB,CAAC,MAAkB;IAClD,OAAO,MAAM,CAAC,KAAK,EAAE,mBAAmB,IAAI,2BAA2B,CAAC;AAC1E,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,qBAAqB,CAAC,MAAkB;IACtD,OAAO,MAAM,CAAC,KAAK,EAAE,uBAAuB,IAAI,+BAA+B,CAAC;AAClF,CAAC;AASD;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,QAAgB,EAAE,cAAuB;IAC7E,IAAI,MAAM,GAAsB,IAAI,CAAC;IACrC,IAAI,CAAC;QACH,MAAM,GAAG,UAAU,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IAChD,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,GAAG,IAAI,CAAC;IAChB,CAAC;IACD,OAAO;QACL,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,sBAAsB;QACtE,iBAAiB,EAAE,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,2BAA2B;QACnF,iBAAiB,EAAE,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,2BAA2B;QACnF,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,+BAA+B;KAChG,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default discovery paths for the fork / encore1 layout — the SINGLE home for these
|
|
3
|
+
* literals (TOOL-03 AC-3). The engine resolves each path from a consumer's
|
|
4
|
+
* `specs/config.yaml` (the resolvers in `lib/config.ts`) and falls back to the value
|
|
5
|
+
* here when the key — or the whole config — is absent, so an EncoreOS-layout repo
|
|
6
|
+
* behaves exactly as it did before the config-drive (TOOL-03 AC-4).
|
|
7
|
+
*
|
|
8
|
+
* This module is deliberately **fs-free**: `lib/test-generator.ts` is a pure leaf
|
|
9
|
+
* (it pulls no `node:fs`), and it imports these defaults — so this file must never
|
|
10
|
+
* reach the filesystem or it would drag test-generator across the purity boundary.
|
|
11
|
+
* Keep it to plain string/array constants.
|
|
12
|
+
*/
|
|
13
|
+
/** Where committed SQL migrations live, relative to repo root. */
|
|
14
|
+
export declare const DEFAULT_MIGRATIONS_DIR = "supabase/migrations";
|
|
15
|
+
/** Where `gen-tests` writes generated test skeletons, relative to repo root. */
|
|
16
|
+
export declare const DEFAULT_GENERATED_TESTS_DIR = "e2e/generated";
|
|
17
|
+
/** Roots walked for `@verifies` frontmatter-scorecard backlinks (`scanVerifies`). */
|
|
18
|
+
export declare const DEFAULT_VERIFIES_SCAN_ROOTS: string[];
|
|
19
|
+
/** Roots walked for a single spec's `@verifies` backing-test backlinks (`verify-acs`). */
|
|
20
|
+
export declare const DEFAULT_VERIFIES_BACKLINK_ROOTS: string[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default discovery paths for the fork / encore1 layout — the SINGLE home for these
|
|
3
|
+
* literals (TOOL-03 AC-3). The engine resolves each path from a consumer's
|
|
4
|
+
* `specs/config.yaml` (the resolvers in `lib/config.ts`) and falls back to the value
|
|
5
|
+
* here when the key — or the whole config — is absent, so an EncoreOS-layout repo
|
|
6
|
+
* behaves exactly as it did before the config-drive (TOOL-03 AC-4).
|
|
7
|
+
*
|
|
8
|
+
* This module is deliberately **fs-free**: `lib/test-generator.ts` is a pure leaf
|
|
9
|
+
* (it pulls no `node:fs`), and it imports these defaults — so this file must never
|
|
10
|
+
* reach the filesystem or it would drag test-generator across the purity boundary.
|
|
11
|
+
* Keep it to plain string/array constants.
|
|
12
|
+
*/
|
|
13
|
+
/** Where committed SQL migrations live, relative to repo root. */
|
|
14
|
+
export const DEFAULT_MIGRATIONS_DIR = 'supabase/migrations';
|
|
15
|
+
/** Where `gen-tests` writes generated test skeletons, relative to repo root. */
|
|
16
|
+
export const DEFAULT_GENERATED_TESTS_DIR = 'e2e/generated';
|
|
17
|
+
/** Roots walked for `@verifies` frontmatter-scorecard backlinks (`scanVerifies`). */
|
|
18
|
+
export const DEFAULT_VERIFIES_SCAN_ROOTS = ['tests', 'src'];
|
|
19
|
+
/** Roots walked for a single spec's `@verifies` backing-test backlinks (`verify-acs`). */
|
|
20
|
+
export const DEFAULT_VERIFIES_BACKLINK_ROOTS = ['e2e', 'src', 'runner', 'scripts'];
|
|
21
|
+
//# sourceMappingURL=discovery-defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discovery-defaults.js","sourceRoot":"","sources":["../../src/lib/discovery-defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,kEAAkE;AAClE,MAAM,CAAC,MAAM,sBAAsB,GAAG,qBAAqB,CAAC;AAE5D,gFAAgF;AAChF,MAAM,CAAC,MAAM,2BAA2B,GAAG,eAAe,CAAC;AAE3D,qFAAqF;AACrF,MAAM,CAAC,MAAM,2BAA2B,GAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAEtE,0FAA0F;AAC1F,MAAM,CAAC,MAAM,+BAA+B,GAAa,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -2,11 +2,12 @@ export type Collision = {
|
|
|
2
2
|
table: string;
|
|
3
3
|
migration: string;
|
|
4
4
|
};
|
|
5
|
-
/** Map of every CREATE TABLE name across
|
|
6
|
-
* Lowercased; tolerant of IF NOT EXISTS, optional schema prefix, and quoting. One pass over all files.
|
|
7
|
-
|
|
5
|
+
/** Map of every CREATE TABLE name across the migrations dir -> first migration file declaring it.
|
|
6
|
+
* Lowercased; tolerant of IF NOT EXISTS, optional schema prefix, and quoting. One pass over all files.
|
|
7
|
+
* `migrationsRelDir` is config-resolved by the caller (TOOL-03); defaults to the fork layout. */
|
|
8
|
+
export declare function migrationTables(repoRoot: string, migrationsRelDir?: string): Map<string, string>;
|
|
8
9
|
/** Collisions between the given identifiers and existing migration tables. */
|
|
9
|
-
export declare function findMigrationCollisions(repoRoot: string, identifiers: string[]): Collision[];
|
|
10
|
+
export declare function findMigrationCollisions(repoRoot: string, identifiers: string[], migrationsRelDir?: string): Collision[];
|
|
10
11
|
/** Does the spec body declare it CREATES this table (vs merely referencing / reusing it)?
|
|
11
12
|
* Two accepted declaration forms:
|
|
12
13
|
* 1. Literal DDL: `CREATE TABLE [IF NOT EXISTS] [schema.]<table>` (tolerant of quoting).
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
// Self-contained copy to avoid deep cross-package relative imports (no-restricted-imports).
|
|
3
3
|
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import { DEFAULT_MIGRATIONS_DIR } from './discovery-defaults.js';
|
|
6
|
+
/** Map of every CREATE TABLE name across the migrations dir -> first migration file declaring it.
|
|
7
|
+
* Lowercased; tolerant of IF NOT EXISTS, optional schema prefix, and quoting. One pass over all files.
|
|
8
|
+
* `migrationsRelDir` is config-resolved by the caller (TOOL-03); defaults to the fork layout. */
|
|
9
|
+
export function migrationTables(repoRoot, migrationsRelDir = DEFAULT_MIGRATIONS_DIR) {
|
|
10
|
+
const dir = join(repoRoot, migrationsRelDir);
|
|
9
11
|
const map = new Map();
|
|
10
12
|
if (!existsSync(dir))
|
|
11
13
|
return map;
|
|
@@ -24,8 +26,8 @@ export function migrationTables(repoRoot) {
|
|
|
24
26
|
return map;
|
|
25
27
|
}
|
|
26
28
|
/** Collisions between the given identifiers and existing migration tables. */
|
|
27
|
-
export function findMigrationCollisions(repoRoot, identifiers) {
|
|
28
|
-
const tables = migrationTables(repoRoot);
|
|
29
|
+
export function findMigrationCollisions(repoRoot, identifiers, migrationsRelDir = DEFAULT_MIGRATIONS_DIR) {
|
|
30
|
+
const tables = migrationTables(repoRoot, migrationsRelDir);
|
|
29
31
|
const out = [];
|
|
30
32
|
const seen = new Set();
|
|
31
33
|
for (const id of identifiers) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-collision.js","sourceRoot":"","sources":["../../src/lib/migration-collision.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,4FAA4F;AAE5F,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"migration-collision.js","sourceRoot":"","sources":["../../src/lib/migration-collision.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,4FAA4F;AAE5F,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAIjE;;kGAEkG;AAClG,MAAM,UAAU,eAAe,CAC7B,QAAgB,EAChB,mBAA2B,sBAAsB;IAEjD,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC;IAC7C,MAAM,GAAG,GAAG,IAAI,GAAG,EAAkB,CAAC;IACtC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC;IACjC,MAAM,EAAE,GAAG,sFAAsF,CAAC;IAClG,KAAK,MAAM,CAAC,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;QACjC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;YAAE,SAAS;QAClC,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,CAAC,GAAG,EAA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O,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IACzD,MAAM,GAAG,GAAG,IAAI,MAAM,CAAC,uEAAuE,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IAC7G,kFAAkF;IAClF,qFAAqF;IACrF,uDAAuD;IACvD,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC,yBAAyB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IACvE,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,WAAqB;IAC/D,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inlined scaffold content for `eos-spec init --scaffold` (TOOL-03 AC-5). The npm
|
|
3
|
+
* tarball ships only `dist/` + `bin/` (package.json `files`), so a bootstrap must
|
|
4
|
+
* carry its config + template bodies as compiled string constants — there is no
|
|
5
|
+
* `templates/` data dir in the published package. This module is fs-free: it holds
|
|
6
|
+
* only strings, so `init.ts` writes them with its own never-clobber primitive.
|
|
7
|
+
*
|
|
8
|
+
* The templates are intentionally minimal, valid stubs (mirroring the engine's own
|
|
9
|
+
* test corpus). `create` fills the `{{ID}}/{{CORE}}/{{TITLE}}/{{DATE}}` placeholders
|
|
10
|
+
* via `applyHeader`; `init --scaffold` writes the template files verbatim (the
|
|
11
|
+
* placeholders are for `create`, not for scaffolding) and only interpolates the
|
|
12
|
+
* config's `last_updated`.
|
|
13
|
+
*/
|
|
14
|
+
/** Relative path (from repo root) of the scaffolded config. */
|
|
15
|
+
export declare const SCAFFOLD_CONFIG_PATH = "specs/config.yaml";
|
|
16
|
+
/**
|
|
17
|
+
* A portable default `specs/config.yaml`. One example core (`app`); a consumer edits
|
|
18
|
+
* `cores:` to match their domain. Carries the optional TOOL-03 discovery-path keys
|
|
19
|
+
* with their fork-layout defaults made explicit, so a new repo sees how to retarget
|
|
20
|
+
* `paths.migrations` / `generated_tests` / `verifies_*` for its own layout.
|
|
21
|
+
*/
|
|
22
|
+
export declare function defaultConfigYaml(lastUpdated: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Template files written under \`specs/_templates/\` by \`init --scaffold\`, verbatim
|
|
25
|
+
* (placeholders intact). \`rel\` is relative to repo root.
|
|
26
|
+
*/
|
|
27
|
+
export declare const SCAFFOLD_TEMPLATE_FILES: ReadonlyArray<{
|
|
28
|
+
rel: string;
|
|
29
|
+
content: string;
|
|
30
|
+
}>;
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inlined scaffold content for `eos-spec init --scaffold` (TOOL-03 AC-5). The npm
|
|
3
|
+
* tarball ships only `dist/` + `bin/` (package.json `files`), so a bootstrap must
|
|
4
|
+
* carry its config + template bodies as compiled string constants — there is no
|
|
5
|
+
* `templates/` data dir in the published package. This module is fs-free: it holds
|
|
6
|
+
* only strings, so `init.ts` writes them with its own never-clobber primitive.
|
|
7
|
+
*
|
|
8
|
+
* The templates are intentionally minimal, valid stubs (mirroring the engine's own
|
|
9
|
+
* test corpus). `create` fills the `{{ID}}/{{CORE}}/{{TITLE}}/{{DATE}}` placeholders
|
|
10
|
+
* via `applyHeader`; `init --scaffold` writes the template files verbatim (the
|
|
11
|
+
* placeholders are for `create`, not for scaffolding) and only interpolates the
|
|
12
|
+
* config's `last_updated`.
|
|
13
|
+
*/
|
|
14
|
+
/** Relative path (from repo root) of the scaffolded config. */
|
|
15
|
+
export const SCAFFOLD_CONFIG_PATH = 'specs/config.yaml';
|
|
16
|
+
/**
|
|
17
|
+
* A portable default `specs/config.yaml`. One example core (`app`); a consumer edits
|
|
18
|
+
* `cores:` to match their domain. Carries the optional TOOL-03 discovery-path keys
|
|
19
|
+
* with their fork-layout defaults made explicit, so a new repo sees how to retarget
|
|
20
|
+
* `paths.migrations` / `generated_tests` / `verifies_*` for its own layout.
|
|
21
|
+
*/
|
|
22
|
+
export function defaultConfigYaml(lastUpdated) {
|
|
23
|
+
return `# Spec workflow configuration — consumed by the @encore-os/eos-spec engine.
|
|
24
|
+
# Scaffolded by \`eos-spec init --scaffold\`. Edit \`cores:\` to match your domain,
|
|
25
|
+
# then \`eos-spec create <CORE>-01 "Title"\` to author your first spec.
|
|
26
|
+
version: 1
|
|
27
|
+
last_updated: ${lastUpdated}
|
|
28
|
+
|
|
29
|
+
# Cores that own specs. Order is presentation order. Add one row per area; the id
|
|
30
|
+
# is the spec-id prefix (e.g. core \`app\` ⇒ \`APP-01\`).
|
|
31
|
+
cores:
|
|
32
|
+
- id: app
|
|
33
|
+
name: Application
|
|
34
|
+
|
|
35
|
+
# Pipeline stages — tracked in spec frontmatter as \`pipeline_status:\`.
|
|
36
|
+
pipeline_stages:
|
|
37
|
+
- id: stub
|
|
38
|
+
description: File created, content placeholder
|
|
39
|
+
- id: clarified
|
|
40
|
+
description: Ambiguities resolved
|
|
41
|
+
- id: validated
|
|
42
|
+
description: Structure verified against the template
|
|
43
|
+
- id: reviewed
|
|
44
|
+
description: Review completed
|
|
45
|
+
- id: planned
|
|
46
|
+
description: Implementation plan written
|
|
47
|
+
- id: tasks_generated
|
|
48
|
+
description: TASKS.md created; ready for implementation
|
|
49
|
+
|
|
50
|
+
# Status enum — displayed in spec frontmatter \`status:\`.
|
|
51
|
+
statuses:
|
|
52
|
+
- id: specification
|
|
53
|
+
label: "📋 Specification"
|
|
54
|
+
description: Drafting; not ready to implement
|
|
55
|
+
- id: in_progress
|
|
56
|
+
label: "🔵 In Progress"
|
|
57
|
+
description: Implementation underway
|
|
58
|
+
- id: complete
|
|
59
|
+
label: "✅ Complete"
|
|
60
|
+
description: All tasks complete and validated
|
|
61
|
+
- id: archived
|
|
62
|
+
label: "🗄️ Archived"
|
|
63
|
+
description: Moved to specs/{core}/archive/
|
|
64
|
+
- id: superseded
|
|
65
|
+
label: "📋 Superseded"
|
|
66
|
+
description: Replaced by another spec; kept for traceability
|
|
67
|
+
|
|
68
|
+
# Directory layout (relative to specs/{core}/).
|
|
69
|
+
paths:
|
|
70
|
+
specs: specs
|
|
71
|
+
plans: plans
|
|
72
|
+
tasks: tasks
|
|
73
|
+
archive: archive
|
|
74
|
+
# Discovery paths (TOOL-03). Optional — these defaults match the fork layout;
|
|
75
|
+
# retarget them if your repo keeps migrations / generated tests / @verifies
|
|
76
|
+
# tests elsewhere.
|
|
77
|
+
migrations: supabase/migrations
|
|
78
|
+
generated_tests: e2e/generated
|
|
79
|
+
verifies_scan_roots: [tests, src]
|
|
80
|
+
verifies_backlink_roots: [e2e, src, runner, scripts]
|
|
81
|
+
|
|
82
|
+
# Templates — by intent. Paths are relative to repo root.
|
|
83
|
+
templates:
|
|
84
|
+
full_spec: specs/_templates/SPEC_TEMPLATE.md
|
|
85
|
+
lite_spec: specs/_templates/SPEC_TEMPLATE_LITE.md
|
|
86
|
+
enhancement_single: specs/_templates/SPEC_TEMPLATE_LITE.md
|
|
87
|
+
plan: specs/_templates/PLAN_TEMPLATE.md
|
|
88
|
+
tasks: specs/_templates/TASKS_TEMPLATE.md
|
|
89
|
+
|
|
90
|
+
# Repo rules that override scoring. Empty by default; add your own.
|
|
91
|
+
hard_gates: []
|
|
92
|
+
|
|
93
|
+
# Unified CLI invocations for automation (run from repo root).
|
|
94
|
+
commands:
|
|
95
|
+
unified:
|
|
96
|
+
whats_next: "eos-spec next"
|
|
97
|
+
list: "eos-spec list"
|
|
98
|
+
create: "eos-spec create"
|
|
99
|
+
legacy: {}
|
|
100
|
+
|
|
101
|
+
# Archive policy — what \`eos-spec archive\` does.
|
|
102
|
+
archive:
|
|
103
|
+
enabled: true
|
|
104
|
+
trigger: status_complete_for_n_days
|
|
105
|
+
threshold_days: 30
|
|
106
|
+
destination: specs/{core}/archive/
|
|
107
|
+
preserves:
|
|
108
|
+
- the spec markdown
|
|
109
|
+
removes_from:
|
|
110
|
+
- any index/registry docs listing the spec as active
|
|
111
|
+
|
|
112
|
+
delta_types:
|
|
113
|
+
- additive
|
|
114
|
+
- modifying
|
|
115
|
+
|
|
116
|
+
# Defaults applied when fields are omitted.
|
|
117
|
+
defaults:
|
|
118
|
+
spec_version: "1.0"
|
|
119
|
+
test_coverage_target: 80
|
|
120
|
+
`;
|
|
121
|
+
}
|
|
122
|
+
const SPEC_TEMPLATE = `---
|
|
123
|
+
# Replace placeholder values when authoring.
|
|
124
|
+
id: {{ID}}
|
|
125
|
+
title: "{{TITLE}}"
|
|
126
|
+
core: {{CORE}}
|
|
127
|
+
status: specification
|
|
128
|
+
version: "1.0"
|
|
129
|
+
created: "{{DATE}}"
|
|
130
|
+
updated: "{{DATE}}"
|
|
131
|
+
pipeline_status: stub
|
|
132
|
+
acceptance_criteria: []
|
|
133
|
+
---
|
|
134
|
+
<!-- SCAFFOLD-STUB: fill all sections and delete this line before sign-off -->
|
|
135
|
+
|
|
136
|
+
# {{ID}} {{TITLE}}
|
|
137
|
+
|
|
138
|
+
## Summary
|
|
139
|
+
|
|
140
|
+
One paragraph: what the feature is and who it's for.
|
|
141
|
+
|
|
142
|
+
## User Stories {#user-stories}
|
|
143
|
+
|
|
144
|
+
- **US-1** [planned] As a *role*, I want *capability* so that *value*.
|
|
145
|
+
|
|
146
|
+
## Acceptance Criteria
|
|
147
|
+
|
|
148
|
+
Authoritative copy is the \`acceptance_criteria:\` frontmatter.
|
|
149
|
+
|
|
150
|
+
## Test Plan
|
|
151
|
+
|
|
152
|
+
How each AC is proven.
|
|
153
|
+
`;
|
|
154
|
+
const SPEC_TEMPLATE_LITE = `---
|
|
155
|
+
id: {{ID}}
|
|
156
|
+
title: "{{TITLE}}"
|
|
157
|
+
core: {{CORE}}
|
|
158
|
+
status: specification
|
|
159
|
+
version: "1.0"
|
|
160
|
+
pipeline_status: stub
|
|
161
|
+
acceptance_criteria: []
|
|
162
|
+
---
|
|
163
|
+
<!-- SCAFFOLD-STUB: fill all sections and delete this line before sign-off -->
|
|
164
|
+
|
|
165
|
+
# {{ID}} {{TITLE}}
|
|
166
|
+
|
|
167
|
+
## Summary
|
|
168
|
+
|
|
169
|
+
What changes and why.
|
|
170
|
+
`;
|
|
171
|
+
const PLAN_TEMPLATE = `# {{ID}} {{TITLE}} — Implementation Plan
|
|
172
|
+
|
|
173
|
+
## Phases
|
|
174
|
+
|
|
175
|
+
1. …
|
|
176
|
+
`;
|
|
177
|
+
const TASKS_TEMPLATE = `# {{ID}} {{TITLE}} — Tasks
|
|
178
|
+
|
|
179
|
+
- [ ] T1 First task
|
|
180
|
+
`;
|
|
181
|
+
const SPEC_GUIDE = `# Spec Guide
|
|
182
|
+
|
|
183
|
+
A decision tree for authoring specs. Replace this stub with your conventions; its
|
|
184
|
+
presence satisfies \`eos-spec init\`.
|
|
185
|
+
`;
|
|
186
|
+
const TEMPLATE_INDEX = `# Template Index
|
|
187
|
+
|
|
188
|
+
Which template to use when. Replace this stub with your selection guide; its
|
|
189
|
+
presence satisfies \`eos-spec init\`.
|
|
190
|
+
`;
|
|
191
|
+
/**
|
|
192
|
+
* Template files written under \`specs/_templates/\` by \`init --scaffold\`, verbatim
|
|
193
|
+
* (placeholders intact). \`rel\` is relative to repo root.
|
|
194
|
+
*/
|
|
195
|
+
export const SCAFFOLD_TEMPLATE_FILES = [
|
|
196
|
+
{ rel: 'specs/_templates/SPEC_TEMPLATE.md', content: SPEC_TEMPLATE },
|
|
197
|
+
{ rel: 'specs/_templates/SPEC_TEMPLATE_LITE.md', content: SPEC_TEMPLATE_LITE },
|
|
198
|
+
{ rel: 'specs/_templates/PLAN_TEMPLATE.md', content: PLAN_TEMPLATE },
|
|
199
|
+
{ rel: 'specs/_templates/TASKS_TEMPLATE.md', content: TASKS_TEMPLATE },
|
|
200
|
+
{ rel: 'specs/_templates/SPEC_GUIDE.md', content: SPEC_GUIDE },
|
|
201
|
+
{ rel: 'specs/_templates/TEMPLATE_INDEX.md', content: TEMPLATE_INDEX },
|
|
202
|
+
];
|
|
203
|
+
//# sourceMappingURL=scaffold-templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaffold-templates.js","sourceRoot":"","sources":["../../src/lib/scaffold-templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,+DAA+D;AAC/D,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAC;AAExD;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,WAAmB;IACnD,OAAO;;;;gBAIO,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6F1B,CAAC;AACF,CAAC;AAED,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BrB,CAAC;AAEF,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;CAgB1B,CAAC;AAEF,MAAM,aAAa,GAAG;;;;;CAKrB,CAAC;AAEF,MAAM,cAAc,GAAG;;;CAGtB,CAAC;AAEF,MAAM,UAAU,GAAG;;;;CAIlB,CAAC;AAEF,MAAM,cAAc,GAAG;;;;CAItB,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAoD;IACtF,EAAE,GAAG,EAAE,mCAAmC,EAAE,OAAO,EAAE,aAAa,EAAE;IACpE,EAAE,GAAG,EAAE,wCAAwC,EAAE,OAAO,EAAE,kBAAkB,EAAE;IAC9E,EAAE,GAAG,EAAE,mCAAmC,EAAE,OAAO,EAAE,aAAa,EAAE;IACpE,EAAE,GAAG,EAAE,oCAAoC,EAAE,OAAO,EAAE,cAAc,EAAE;IACtE,EAAE,GAAG,EAAE,gCAAgC,EAAE,OAAO,EAAE,UAAU,EAAE;IAC9D,EAAE,GAAG,EAAE,oCAAoC,EAAE,OAAO,EAAE,cAAc,EAAE;CACvE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AcceptanceCriterion } from './requirements.js';
|
|
2
2
|
export type Lane = 'ui' | 'integration';
|
|
3
3
|
export declare function classifyLane(acs: AcceptanceCriterion[]): Lane;
|
|
4
|
-
export declare function generatedRelPath(specId: string, lane: Lane): string;
|
|
4
|
+
export declare function generatedRelPath(specId: string, lane: Lane, generatedDir?: string): string;
|
|
5
5
|
export declare function generateTestContent(specId: string, title: string, acs: AcceptanceCriterion[], lane: Lane): string;
|