@isaacriehm/cairn-core 0.18.1 → 0.19.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/.tsbuildinfo +1 -1
- package/dist/attention/dedup.d.ts +24 -0
- package/dist/attention/dedup.js +42 -1
- package/dist/attention/dedup.js.map +1 -1
- package/dist/components/emit.d.ts +36 -0
- package/dist/components/emit.js +160 -0
- package/dist/components/emit.js.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/hooks/runners/context-threshold.d.ts +1 -1
- package/dist/hooks/runners/context-threshold.js +2 -2
- package/dist/hooks/runners/context-threshold.js.map +1 -1
- package/dist/hooks/runners/session-start.js +2 -2
- package/dist/hooks/runners/session-start.js.map +1 -1
- package/dist/init/detect-components.d.ts +56 -18
- package/dist/init/detect-components.js +258 -117
- package/dist/init/detect-components.js.map +1 -1
- package/dist/init/index.d.ts +2 -1
- package/dist/init/index.js +1 -1
- package/dist/init/index.js.map +1 -1
- package/dist/init/phases/4-seed.js +5 -5
- package/dist/init/phases/4-seed.js.map +1 -1
- package/dist/init/phases/9f-comp-emit.js +10 -126
- package/dist/init/phases/9f-comp-emit.js.map +1 -1
- package/dist/mcp/tools/record-decision.js +43 -5
- package/dist/mcp/tools/record-decision.js.map +1 -1
- package/dist/mcp/tools/resume.d.ts +1 -1
- package/dist/mcp/tools/resume.js +2 -2
- package/dist/mcp/tools/resume.js.map +1 -1
- package/dist/mcp/tools/task-journal-append.d.ts +1 -1
- package/dist/mcp/tools/task-journal-append.js +2 -2
- package/dist/mcp/tools/task-journal-append.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,144 +1,285 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* LLM-driven, convention-agnostic component-layout detection.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Cairn adoption ALWAYS runs inside an LLM coding agent, so detection
|
|
5
|
+
* leans on a model rather than a hardcoded convention list — there is no
|
|
6
|
+
* `src/components` / `packages/*` assumption baked in. A Sonnet call reads
|
|
7
|
+
* the repo's structural digest (per-directory file-extension histogram,
|
|
8
|
+
* the dirs that hold a `package.json`, and any workspace-manifest files)
|
|
9
|
+
* and returns the `components:` config: which workspaces carry reusable
|
|
10
|
+
* UI, where their component dirs live, the extensions in play, and a
|
|
11
|
+
* taxonomy that fits THAT workspace. A non-UI repo (a backend with no
|
|
12
|
+
* components) returns null and is left untouched.
|
|
8
13
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
14
|
+
* Only mechanical, repo-agnostic facts stay deterministic: the file walk
|
|
15
|
+
* and the universal build-output exclude list. Everything that requires
|
|
16
|
+
* understanding "what is this directory for" is the model's job — naming,
|
|
17
|
+
* monorepo tooling, framework, and taxonomy are all inferred, never
|
|
18
|
+
* assumed.
|
|
19
|
+
*
|
|
20
|
+
* Isolation invariant (port invariant 3): a workspace is NEVER emitted as
|
|
21
|
+
* `shared`. The flag is omitted (it normalizes to isolated); the operator
|
|
22
|
+
* opts in afterward (the skill asks).
|
|
13
23
|
*/
|
|
14
|
-
import { existsSync,
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
25
|
+
import { join } from "node:path";
|
|
26
|
+
import { parse as parseYaml, stringify as stringifyYaml } from "yaml";
|
|
27
|
+
import { z } from "zod";
|
|
28
|
+
import { DEFAULT_EXCLUDE, walkFs, } from "@isaacriehm/cairn-state";
|
|
29
|
+
import { runClaude } from "../claude/index.js";
|
|
30
|
+
import { logger } from "../logger.js";
|
|
31
|
+
const log = logger("init.detect-components");
|
|
32
|
+
const TIMEOUT_MS = 120_000;
|
|
33
|
+
/** Cap the directory histogram so a huge repo can't blow the prompt. */
|
|
34
|
+
const MAX_DIGEST_DIRS = 600;
|
|
35
|
+
const MAX_MANIFEST_CHARS = 2_000;
|
|
36
|
+
/** Workspace-tooling manifests, read verbatim as grouping signal. */
|
|
37
|
+
const WORKSPACE_MANIFESTS = [
|
|
38
|
+
"pnpm-workspace.yaml",
|
|
39
|
+
"lerna.json",
|
|
40
|
+
"nx.json",
|
|
41
|
+
"turbo.json",
|
|
42
|
+
"rush.json",
|
|
24
43
|
];
|
|
25
|
-
/** Monorepo package parents to scan for nested component dirs. */
|
|
26
|
-
const MONOREPO_PARENTS = ["packages", "apps"];
|
|
27
|
-
/** Extensions we sniff for beyond the React default. */
|
|
28
|
-
const SVELTE_EXT = ".svelte";
|
|
29
|
-
const VUE_EXT = ".vue";
|
|
30
44
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* presence-driven so we never invent extensions a repo doesn't use).
|
|
45
|
+
* Walk the repo once and build an agnostic structural digest: a
|
|
46
|
+
* per-directory extension histogram plus the set of dirs that carry a
|
|
47
|
+
* `package.json`. No convention names are consulted — this is raw shape.
|
|
35
48
|
*/
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
dir:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
49
|
+
function buildRepoDigest(repoRoot) {
|
|
50
|
+
const skip = new Set([...DEFAULT_EXCLUDE]);
|
|
51
|
+
const perDir = new Map();
|
|
52
|
+
const packageRoots = [];
|
|
53
|
+
walkFs({
|
|
54
|
+
dir: repoRoot,
|
|
55
|
+
repoRoot,
|
|
56
|
+
skipDirs: skip,
|
|
57
|
+
onFile: (rel, _abs, entry) => {
|
|
58
|
+
const slash = rel.lastIndexOf("/");
|
|
59
|
+
const dir = slash === -1 ? "." : rel.slice(0, slash);
|
|
60
|
+
if (entry.name === "package.json")
|
|
61
|
+
packageRoots.push(dir);
|
|
62
|
+
const dot = rel.lastIndexOf(".");
|
|
63
|
+
const ext = dot > slash ? rel.slice(dot) : "(noext)";
|
|
64
|
+
let m = perDir.get(dir);
|
|
65
|
+
if (m === undefined) {
|
|
66
|
+
m = new Map();
|
|
67
|
+
perDir.set(dir, m);
|
|
68
|
+
}
|
|
69
|
+
m.set(ext, (m.get(ext) ?? 0) + 1);
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
const dirs = [...perDir.entries()].sort((a, b) => a[0].localeCompare(b[0]));
|
|
73
|
+
const lines = [];
|
|
74
|
+
for (const [dir, exts] of dirs) {
|
|
75
|
+
const parts = [...exts.entries()]
|
|
76
|
+
.sort((a, b) => b[1] - a[1])
|
|
77
|
+
.map(([e, c]) => `${c}${e}`);
|
|
78
|
+
lines.push(`${dir}: ${parts.join(" ")}`);
|
|
79
|
+
if (lines.length >= MAX_DIGEST_DIRS) {
|
|
80
|
+
lines.push(`… (${dirs.length - MAX_DIGEST_DIRS} more dirs truncated)`);
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
59
83
|
}
|
|
60
|
-
|
|
61
|
-
// Keep the React pair as the baseline unless the repo is purely
|
|
62
|
-
// Vue/Svelte — most TS UI repos still carry .tsx alongside framework files.
|
|
63
|
-
if (hasReact || (!hasVue && !hasSvelte))
|
|
64
|
-
exts.push(...DEFAULT_EXTENSIONS);
|
|
65
|
-
if (hasVue)
|
|
66
|
-
exts.push(VUE_EXT);
|
|
67
|
-
if (hasSvelte)
|
|
68
|
-
exts.push(SVELTE_EXT);
|
|
69
|
-
return exts;
|
|
70
|
-
}
|
|
71
|
-
/** Conventional dirs (relative to `base`) that exist on disk. */
|
|
72
|
-
function existingDirs(repoRoot, base) {
|
|
73
|
-
return CONVENTIONAL_DIRS.map((suffix) => base.length > 0 ? `${base}/${suffix}` : suffix).filter((rel) => existsSync(join(repoRoot, rel)));
|
|
84
|
+
return { histogram: lines.join("\n"), packageRoots: packageRoots.sort() };
|
|
74
85
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
for (const parent of MONOREPO_PARENTS) {
|
|
81
|
-
const parentAbs = join(repoRoot, parent);
|
|
82
|
-
if (!existsSync(parentAbs))
|
|
86
|
+
function readWorkspaceManifests(repoRoot) {
|
|
87
|
+
const out = [];
|
|
88
|
+
for (const name of WORKSPACE_MANIFESTS) {
|
|
89
|
+
const p = join(repoRoot, name);
|
|
90
|
+
if (!existsSync(p))
|
|
83
91
|
continue;
|
|
84
|
-
let subs;
|
|
85
92
|
try {
|
|
86
|
-
|
|
93
|
+
out.push(`${name}:\n${readFileSync(p, "utf8").slice(0, MAX_MANIFEST_CHARS)}`);
|
|
87
94
|
}
|
|
88
95
|
catch {
|
|
89
|
-
|
|
96
|
+
/* unreadable → skip */
|
|
90
97
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
}
|
|
99
|
+
const rootPkg = join(repoRoot, "package.json");
|
|
100
|
+
if (existsSync(rootPkg)) {
|
|
101
|
+
try {
|
|
102
|
+
out.push(`package.json (root):\n${readFileSync(rootPkg, "utf8").slice(0, MAX_MANIFEST_CHARS)}`);
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
/* skip */
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return out.join("\n\n");
|
|
109
|
+
}
|
|
110
|
+
const SYSTEM_PROMPT = `You map a repository's reusable-UI-component layout for a component registry. You receive the repo's workspace-manifest files, the directories that contain a package.json, and a per-directory file-extension histogram.
|
|
111
|
+
|
|
112
|
+
Return STRICT JSON matching the schema. No prose, no markdown.
|
|
113
|
+
|
|
114
|
+
Definitions:
|
|
115
|
+
- A "component dir" is a directory whose primary contents are REUSABLE UI components (buttons, cards, modals, layout, navigation, domain widgets). It is NOT a route/page dir, NOT tests, NOT stories, NOT backend/service/data/model code, NOT email templates.
|
|
116
|
+
- A "workspace" is an independently-scoped package. A monorepo has 2+ (each typically rooted at a package.json); a single app has one. Infer workspaces from the manifests / package roots / structure.
|
|
117
|
+
|
|
118
|
+
Hard rules — be convention-agnostic:
|
|
119
|
+
- Do NOT assume any naming. Component dirs are NOT necessarily named "components"; workspaces are NOT necessarily under "packages/" or "apps/". Decide from the actual extension histogram and package roots, wherever they sit (top-level dirs, nested, anywhere).
|
|
120
|
+
- componentDirs are repo-relative POSIX paths that appear in the histogram.
|
|
121
|
+
- Include a workspace ONLY if it actually contains reusable UI components. A backend-only or data-only package (e.g. mostly .ts services with no component dir, or only email-template files) is OMITTED ENTIRELY.
|
|
122
|
+
- extensions: the component file extensions actually present in that workspace's component dirs (e.g. ".tsx", ".jsx", ".vue", ".svelte", ".astro").
|
|
123
|
+
- categories: a SHORT taxonomy (5-12 lowercase kebab-case tags) derived from what THIS workspace actually is — a marketing site leans ["layout","navigation","marketing","forms","media","feedback"], an app shell leans ["layout","navigation","shell","domain","forms","overlay","feedback","data-display"]. Do not copy a fixed list; fit the workspace.
|
|
124
|
+
- name: "" for a single-app repo; for monorepo workspaces use the package's directory name (the last path segment of its root).
|
|
125
|
+
- If the repo has NO reusable UI components at all, return {"is_ui_repo": false, "monorepo": false, "workspaces": []}.`;
|
|
126
|
+
const OUTPUT_SCHEMA = {
|
|
127
|
+
type: "object",
|
|
128
|
+
required: ["is_ui_repo", "monorepo", "workspaces"],
|
|
129
|
+
properties: {
|
|
130
|
+
is_ui_repo: { type: "boolean" },
|
|
131
|
+
monorepo: { type: "boolean" },
|
|
132
|
+
workspaces: {
|
|
133
|
+
type: "array",
|
|
134
|
+
items: {
|
|
135
|
+
type: "object",
|
|
136
|
+
required: ["name", "componentDirs", "extensions", "categories"],
|
|
137
|
+
properties: {
|
|
138
|
+
name: { type: "string" },
|
|
139
|
+
componentDirs: { type: "array", items: { type: "string" } },
|
|
140
|
+
extensions: { type: "array", items: { type: "string" } },
|
|
141
|
+
categories: { type: "array", items: { type: "string" } },
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
const ResultSchema = z.object({
|
|
148
|
+
is_ui_repo: z.boolean(),
|
|
149
|
+
monorepo: z.boolean(),
|
|
150
|
+
workspaces: z.array(z.object({
|
|
151
|
+
name: z.string(),
|
|
152
|
+
componentDirs: z.array(z.string()),
|
|
153
|
+
extensions: z.array(z.string()),
|
|
154
|
+
categories: z.array(z.string()),
|
|
155
|
+
})),
|
|
156
|
+
});
|
|
157
|
+
function buildPrompt(repoRoot) {
|
|
158
|
+
const digest = buildRepoDigest(repoRoot);
|
|
159
|
+
const manifests = readWorkspaceManifests(repoRoot);
|
|
160
|
+
return [
|
|
161
|
+
"WORKSPACE MANIFESTS:",
|
|
162
|
+
manifests.length > 0 ? manifests : "(none)",
|
|
163
|
+
"",
|
|
164
|
+
"DIRS CONTAINING A package.json (workspace boundaries):",
|
|
165
|
+
digest.packageRoots.length > 0 ? digest.packageRoots.join("\n") : "(none)",
|
|
166
|
+
"",
|
|
167
|
+
"DIRECTORY EXTENSION HISTOGRAM (path: <count><ext> …):",
|
|
168
|
+
digest.histogram.length > 0 ? digest.histogram : "(no source files found)",
|
|
169
|
+
"",
|
|
170
|
+
"Return the component-layout JSON.",
|
|
171
|
+
].join("\n");
|
|
172
|
+
}
|
|
173
|
+
async function attempt(repoRoot, prompt) {
|
|
174
|
+
let result;
|
|
175
|
+
try {
|
|
176
|
+
result = await runClaude({
|
|
177
|
+
tier: "sonnet",
|
|
178
|
+
prompt,
|
|
179
|
+
system: SYSTEM_PROMPT,
|
|
180
|
+
jsonSchema: OUTPUT_SCHEMA,
|
|
181
|
+
timeoutMs: TIMEOUT_MS,
|
|
182
|
+
repoRoot,
|
|
183
|
+
cacheable: true,
|
|
184
|
+
isolateAmbientContext: true,
|
|
185
|
+
purpose: "init.detect-components",
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
catch (err) {
|
|
189
|
+
log.warn({ error: err instanceof Error ? err.message : String(err) }, "detect-components: runClaude failed");
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
const parsed = ResultSchema.safeParse(result.parsed);
|
|
193
|
+
if (!parsed.success) {
|
|
194
|
+
log.warn({ error: parsed.error.message }, "detect-components: response failed schema");
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
return parsed.data;
|
|
198
|
+
}
|
|
199
|
+
function toConfig(parsed) {
|
|
200
|
+
if (!parsed.is_ui_repo)
|
|
201
|
+
return null;
|
|
202
|
+
const ws = parsed.workspaces.filter((w) => w.componentDirs.length > 0);
|
|
203
|
+
if (ws.length === 0)
|
|
204
|
+
return null;
|
|
205
|
+
const exclude = [...DEFAULT_EXCLUDE];
|
|
206
|
+
// Multi-workspace → monorepo `workspaces` form. A lone workspace (even
|
|
207
|
+
// if the model flagged the repo a monorepo) collapses to the flat form.
|
|
208
|
+
if (ws.length >= 2) {
|
|
209
|
+
const usedNames = new Set();
|
|
210
|
+
const workspaces = {};
|
|
211
|
+
for (const w of ws) {
|
|
212
|
+
let name = w.name.trim().length > 0 ? w.name.trim() : "app";
|
|
213
|
+
let n = 2;
|
|
214
|
+
while (usedNames.has(name))
|
|
215
|
+
name = `${w.name || "app"}-${n++}`;
|
|
102
216
|
usedNames.add(name);
|
|
103
|
-
|
|
217
|
+
workspaces[name] = {
|
|
218
|
+
componentDirs: w.componentDirs,
|
|
219
|
+
extensions: w.extensions,
|
|
220
|
+
categories: w.categories,
|
|
221
|
+
};
|
|
104
222
|
}
|
|
223
|
+
return { exclude, workspaces };
|
|
105
224
|
}
|
|
106
|
-
|
|
225
|
+
const single = ws[0];
|
|
226
|
+
return {
|
|
227
|
+
componentDirs: single.componentDirs,
|
|
228
|
+
extensions: single.extensions,
|
|
229
|
+
categories: single.categories,
|
|
230
|
+
exclude,
|
|
231
|
+
};
|
|
107
232
|
}
|
|
108
233
|
/**
|
|
109
|
-
*
|
|
110
|
-
* config block (raw yaml shape), or `null` when
|
|
234
|
+
* Detect the repo's component layout via the model and return a
|
|
235
|
+
* `components:` config block (raw yaml shape), or `null` when the repo
|
|
236
|
+
* carries no reusable UI components. Retries the model call once before
|
|
237
|
+
* giving up. There is no deterministic fallback by design: detection only
|
|
238
|
+
* ever runs inside an LLM coding agent, so "no model" means adoption is
|
|
239
|
+
* not happening at all.
|
|
240
|
+
*/
|
|
241
|
+
export async function detectComponentsConfig(repoRoot) {
|
|
242
|
+
const prompt = buildPrompt(repoRoot);
|
|
243
|
+
const out = (await attempt(repoRoot, prompt)) ?? (await attempt(repoRoot, prompt));
|
|
244
|
+
if (out === null)
|
|
245
|
+
return null;
|
|
246
|
+
return toConfig(out);
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Backfill a `components:` block into an already-adopted repo's
|
|
250
|
+
* `.cairn/config.yaml`. Runs the same LLM detection adoption Phase 4-seed
|
|
251
|
+
* runs, but MERGES the key into a config that already exists (preserving
|
|
252
|
+
* every other key) rather than writing a fresh file.
|
|
111
253
|
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
254
|
+
* Idempotent: a repo that already carries a `components:` block is left
|
|
255
|
+
* untouched ("exists"). The standalone backfill path
|
|
256
|
+
* (`cairn components detect`, driven by the cairn-adopt-components skill)
|
|
257
|
+
* is the only caller; adoption keeps using `detectComponentsConfig`
|
|
258
|
+
* directly inside 4-seed.
|
|
114
259
|
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* signatures are absent (e.g. a Vue repo with no tsconfig).
|
|
260
|
+
* Isolation invariant (port invariant 3): workspaces are never emitted as
|
|
261
|
+
* `shared` — the operator opts in afterward (the skill asks).
|
|
118
262
|
*/
|
|
119
|
-
export function
|
|
120
|
-
const
|
|
121
|
-
if (
|
|
122
|
-
|
|
123
|
-
const config = {
|
|
124
|
-
extensions: detectExtensions(repoRoot, allDirs),
|
|
125
|
-
categories: [...DEFAULT_CATEGORIES],
|
|
126
|
-
exclude: [...DEFAULT_EXCLUDE],
|
|
127
|
-
workspaces: Object.fromEntries(workspaces.map((w) => [w.name, { componentDirs: w.dirs }])),
|
|
128
|
-
};
|
|
129
|
-
return config;
|
|
263
|
+
export async function ensureComponentsConfig(repoRoot) {
|
|
264
|
+
const configPath = join(repoRoot, ".cairn", "config.yaml");
|
|
265
|
+
if (!existsSync(configPath)) {
|
|
266
|
+
return { status: "not-adopted", monorepo: false };
|
|
130
267
|
}
|
|
131
|
-
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
:
|
|
135
|
-
|
|
136
|
-
|
|
268
|
+
const raw = readFileSync(configPath, "utf8");
|
|
269
|
+
const parsed = (parseYaml(raw) ?? {});
|
|
270
|
+
if (parsed["components"] !== undefined && parsed["components"] !== null) {
|
|
271
|
+
return { status: "exists", monorepo: false };
|
|
272
|
+
}
|
|
273
|
+
const components = await detectComponentsConfig(repoRoot);
|
|
274
|
+
if (components === null) {
|
|
275
|
+
return { status: "none", monorepo: false };
|
|
276
|
+
}
|
|
277
|
+
parsed["components"] = components;
|
|
278
|
+
writeFileSync(configPath, stringifyYaml(parsed), "utf8");
|
|
137
279
|
return {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
exclude: [...DEFAULT_EXCLUDE],
|
|
280
|
+
status: "written",
|
|
281
|
+
config: components,
|
|
282
|
+
monorepo: components.workspaces !== undefined,
|
|
142
283
|
};
|
|
143
284
|
}
|
|
144
285
|
//# sourceMappingURL=detect-components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detect-components.js","sourceRoot":"","sources":["../../src/init/detect-components.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"detect-components.js","sourceRoot":"","sources":["../../src/init/detect-components.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AACtE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,eAAe,EACf,MAAM,GAEP,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,MAAM,GAAG,GAAG,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAE7C,MAAM,UAAU,GAAG,OAAO,CAAC;AAC3B,wEAAwE;AACxE,MAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,MAAM,kBAAkB,GAAG,KAAK,CAAC;AAEjC,qEAAqE;AACrE,MAAM,mBAAmB,GAAG;IAC1B,qBAAqB;IACrB,YAAY;IACZ,SAAS;IACT,YAAY;IACZ,WAAW;CACH,CAAC;AASX;;;;GAIG;AACH,SAAS,eAAe,CAAC,QAAgB;IACvC,MAAM,IAAI,GAAG,IAAI,GAAG,CAAS,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC;IACnD,MAAM,MAAM,GAAG,IAAI,GAAG,EAA+B,CAAC;IACtD,MAAM,YAAY,GAAa,EAAE,CAAC;IAElC,MAAM,CAAC;QACL,GAAG,EAAE,QAAQ;QACb,QAAQ;QACR,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;YAC3B,MAAM,KAAK,GA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riginUrl, detectProjectSlug, detectStackSignatures, detectStartCommand, } from "./detect.js";
|
|
2
2
|
export { installInitCancelHandlers, startProgress, startSpinner, withSpinner, } from "./visual.js";
|
|
3
3
|
export { applyBrandAnswers, runBrandSetup } from "./brand-setup.js";
|
|
4
|
-
export { detectComponentsConfig } from "./detect-components.js";
|
|
4
|
+
export { detectComponentsConfig, ensureComponentsConfig } from "./detect-components.js";
|
|
5
|
+
export type { EnsureComponentsConfigResult, EnsureComponentsStatus, } from "./detect-components.js";
|
|
5
6
|
export { ensureCairnRuleImport, installCairnRuleAndImport, CAIRN_RULE_IMPORT, } from "./claude-rule.js";
|
|
6
7
|
export type { EnsureImportResult, InstallRuleResult } from "./claude-rule.js";
|
|
7
8
|
export type { BrandAnswers, RunBrandSetupOptions, } from "./brand-setup.js";
|
package/dist/init/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { detectAll, detectAvailableSensors, detectEnvironment, detectHookCapability, detectOriginUrl, detectProjectSlug, detectStackSignatures, detectStartCommand, } from "./detect.js";
|
|
2
2
|
export { installInitCancelHandlers, startProgress, startSpinner, withSpinner, } from "./visual.js";
|
|
3
3
|
export { applyBrandAnswers, runBrandSetup } from "./brand-setup.js";
|
|
4
|
-
export { detectComponentsConfig } from "./detect-components.js";
|
|
4
|
+
export { detectComponentsConfig, ensureComponentsConfig } from "./detect-components.js";
|
|
5
5
|
export { ensureCairnRuleImport, installCairnRuleAndImport, CAIRN_RULE_IMPORT, } from "./claude-rule.js";
|
|
6
6
|
export { deriveBrandFromProject, derivedToBrandAnswers, } from "./brand-derive.js";
|
|
7
7
|
export { defaultBaselineLanguages, findLatestBaselineAudit, runBaselineAudit, } from "./baseline-audit.js";
|
package/dist/init/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/init/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,yBAAyB,EACzB,aAAa,EACb,YAAY,EACZ,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/init/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,yBAAyB,EACzB,aAAa,EACb,YAAY,EACZ,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAKxF,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAM1B,OAAO,EACL,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAO7B,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,SAAS,IAAI,wBAAwB,EACrC,iBAAiB,EACjB,cAAc,EACd,UAAU,IAAI,uBAAuB,EACrC,mBAAmB,EACnB,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,eAAe,EACf,iBAAi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pB,qBAAqB,EACrB,uBAAuB,EACvB,eAAe,EACf,eAAe,EACf,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAqB3B,OAAO,EACL,aAAa,EACb,cAAc,GAGf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,GACf,MAAM,wBAAwB,CAAC"}
|
|
@@ -84,11 +84,11 @@ export async function runPhase4Seed(state) {
|
|
|
84
84
|
decidedSlug: projectSlug,
|
|
85
85
|
...(mapperOutput !== undefined ? { mapperOutput } : {}),
|
|
86
86
|
});
|
|
87
|
-
// Attach a detected `components:` block (
|
|
88
|
-
//
|
|
89
|
-
// the whole component store stays inert. overlay.ts is
|
|
90
|
-
// IO); the detection lives here where 4-seed already does IO.
|
|
91
|
-
const components = detectComponentsConfig(state.repoRoot
|
|
87
|
+
// Attach a detected `components:` block (LLM-driven, agnostic — no
|
|
88
|
+
// convention list). Null for non-UI repos — the key is simply
|
|
89
|
+
// omitted, so the whole component store stays inert. overlay.ts is
|
|
90
|
+
// pure (no IO); the detection lives here where 4-seed already does IO.
|
|
91
|
+
const components = await detectComponentsConfig(state.repoRoot);
|
|
92
92
|
if (components !== null)
|
|
93
93
|
config["components"] = components;
|
|
94
94
|
writeFileSync(configPath, stringifyYaml(config), "utf8");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4-seed.js","sourceRoot":"","sources":["../../../src/init/phases/4-seed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EA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