meto-cli 0.10.0 → 0.11.1

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 (39) hide show
  1. package/README.md +66 -0
  2. package/dist/cli/audit/blueprint.d.ts +53 -0
  3. package/dist/cli/audit/blueprint.d.ts.map +1 -0
  4. package/dist/cli/audit/blueprint.js +386 -0
  5. package/dist/cli/audit/blueprint.js.map +1 -0
  6. package/dist/cli/audit/detect-stack.d.ts +31 -0
  7. package/dist/cli/audit/detect-stack.d.ts.map +1 -0
  8. package/dist/cli/audit/detect-stack.js +154 -0
  9. package/dist/cli/audit/detect-stack.js.map +1 -0
  10. package/dist/cli/audit/fixer.d.ts +75 -0
  11. package/dist/cli/audit/fixer.d.ts.map +1 -0
  12. package/dist/cli/audit/fixer.js +802 -0
  13. package/dist/cli/audit/fixer.js.map +1 -0
  14. package/dist/cli/audit/index.d.ts +24 -0
  15. package/dist/cli/audit/index.d.ts.map +1 -0
  16. package/dist/cli/audit/index.js +216 -0
  17. package/dist/cli/audit/index.js.map +1 -0
  18. package/dist/cli/audit/reporter.d.ts +42 -0
  19. package/dist/cli/audit/reporter.d.ts.map +1 -0
  20. package/dist/cli/audit/reporter.js +101 -0
  21. package/dist/cli/audit/reporter.js.map +1 -0
  22. package/dist/cli/audit/scanner.d.ts +48 -0
  23. package/dist/cli/audit/scanner.d.ts.map +1 -0
  24. package/dist/cli/audit/scanner.js +202 -0
  25. package/dist/cli/audit/scanner.js.map +1 -0
  26. package/dist/cli/index.js +6 -0
  27. package/dist/cli/index.js.map +1 -1
  28. package/dist/cli/renderer.d.ts.map +1 -1
  29. package/dist/cli/renderer.js +3 -1
  30. package/dist/cli/renderer.js.map +1 -1
  31. package/dist/cli/stacks.d.ts +11 -0
  32. package/dist/cli/stacks.d.ts.map +1 -1
  33. package/dist/cli/stacks.js +82 -0
  34. package/dist/cli/stacks.js.map +1 -1
  35. package/package.json +1 -1
  36. package/templates/.claude/agents/developer-agent.md +4 -1
  37. package/templates/.claude/agents/tester-agent.md +4 -1
  38. package/templates/CLAUDE.md +3 -0
  39. package/templates/ai/workflows/code-guidelines.md +46 -0
package/README.md CHANGED
@@ -16,6 +16,13 @@ npx meto-cli init
16
16
 
17
17
  Answer a few questions, and Meto generates a fully structured repository in seconds -- with AI-powered content if Claude Code is installed.
18
18
 
19
+ **Already have a project?** Run the audit to bring it up to standard:
20
+
21
+ ```bash
22
+ cd your-existing-project
23
+ npx meto-cli audit
24
+ ```
25
+
19
26
  ---
20
27
 
21
28
  ## How It Works
@@ -39,6 +46,62 @@ Use `--no-ai` to force the static path even when Claude Code is available.
39
46
 
40
47
  ---
41
48
 
49
+ ## Audit — For Existing Projects
50
+
51
+ Already built a project before Meto? Run `meto-cli audit` to scan it against the methodology blueprint and fix what's missing — interactively, one layer at a time.
52
+
53
+ ```bash
54
+ cd your-existing-project
55
+ npx meto-cli audit
56
+ ```
57
+
58
+ The audit checks 4 layers, each gating the next:
59
+
60
+ ```
61
+ Layer 0 — Project Basics ████████████ 100%
62
+ ✓ git repo ✓ README ✓ source code
63
+
64
+ Layer 1 — Methodology ██████░░░░░░ 50%
65
+ ✓ CLAUDE.md
66
+ ✓ ai/context/product-vision.md
67
+ ✗ ai/tasks/ (no kanban board)
68
+ → Create board files? [y/n]
69
+ ✗ ai/workflows/ (no definition of done)
70
+ → Create definition-of-done.md? [y/n]
71
+
72
+ Layer 2 — Agents not reached
73
+ Layer 3 — Governance not reached
74
+ ```
75
+
76
+ | Layer | What it checks |
77
+ |---|---|
78
+ | **Layer 0** | Git initialized, README exists, source code present |
79
+ | **Layer 1** | CLAUDE.md, ai/ context files, kanban board, workflows |
80
+ | **Layer 2** | Agent definitions (PM, developer, tester), agent memory, settings |
81
+ | **Layer 3** | Governance: commit conventions, definition of done, code guidelines, session checkpoints, agent cross-references |
82
+
83
+ Each missing item offers a fix — create the file from Meto's templates, never overwriting existing content. Run it repeatedly to ratchet your project up one layer at a time.
84
+
85
+ The audit also **auto-detects your tech stack** from `package.json`, `go.mod`, `pyproject.toml`, `pubspec.yaml`, or `Cargo.toml` to provide stack-specific templates.
86
+
87
+ ---
88
+
89
+ ## Code Guidelines
90
+
91
+ Every scaffolded project includes `ai/workflows/code-guidelines.md` — enforced by both the developer and tester agents:
92
+
93
+ | Rule | Limit |
94
+ |---|---|
95
+ | Max file length | 300 lines (hard stop at 500) |
96
+ | Max function length | 50 lines |
97
+ | Max component length | 200 lines (React/Flutter) |
98
+ | Nesting depth | 3 levels max |
99
+ | Circular imports | Not allowed |
100
+
101
+ Guidelines include stack-specific rules (e.g., "never call Supabase directly from components" for Next.js, "always check error returns" for Go). The developer agent reads these at session start, and the tester agent verifies them before sign-off.
102
+
103
+ ---
104
+
42
105
  ## Stack Presets
43
106
 
44
107
  Choose from 7 built-in tech stacks, each with a tailored description, definition of done, and starter epics:
@@ -90,6 +153,7 @@ your-project/
90
153
  │ │ ├── tasks-in-testing.md
91
154
  │ │ └── tasks-todo.md
92
155
  │ └── workflows/
156
+ │ ├── code-guidelines.md
93
157
  │ ├── commit-conventions.md
94
158
  │ ├── definition-of-done.md
95
159
  │ └── session-checkpoint.md
@@ -122,6 +186,7 @@ your-project/
122
186
  - **4 agent definitions** -- PM, developer, tester, and community manager agents configured to follow your methodology from day one
123
187
  - **Agent memory** -- persistent memory files so agents retain context across sessions
124
188
  - **Product context** -- vision, tech stack, and decisions captured in structured files
189
+ - **Code guidelines** -- file size limits, naming conventions, and stack-specific rules enforced by agents
125
190
  - **Epics and workflows** -- definition of done, commit conventions, session checkpoints, and an epic backlog to plan against
126
191
  - **Agent Teams ready** -- four agents configured to work in parallel with file ownership boundaries
127
192
  - **Swarm mode** -- parallel epic agents with domain ownership, checkpoint rhythm, and a live status dashboard
@@ -230,6 +295,7 @@ Meto scaffolds projects ready for Agent Teams out of the box:
230
295
  | `meto-cli init` | Scaffold a new structured project (AI-powered if Claude Code is detected) |
231
296
  | `meto-cli init --no-ai` | Scaffold using static prompts only, skip AI generation |
232
297
  | `meto-cli init --dry-run` | Preview the generated file tree without writing to disk |
298
+ | `meto-cli audit` | Scan an existing project against the methodology blueprint and fix gaps interactively |
233
299
  | `meto-cli doctor` | Check methodology health of the current project |
234
300
  | `meto-cli status` | Show swarm progress dashboard (reads SWARM_AWARENESS.md) |
235
301
  | `meto-cli --help` | Show available commands and options |
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Declarative blueprint that defines what each audit layer expects.
3
+ * The scanner reads this data structure to determine which checks to run.
4
+ * Adding new checks is data-driven: add an entry here, the scanner picks it up.
5
+ */
6
+ /** The kind of filesystem check the scanner should perform. */
7
+ export type CheckType = "file-exists" | "dir-exists" | "file-contains" | "custom";
8
+ /**
9
+ * A single expectation within a layer.
10
+ * Describes one thing the scanner should verify.
11
+ */
12
+ export interface BlueprintExpectation {
13
+ /** Unique identifier (e.g. "L0-git", "L1-claude-md") */
14
+ id: string;
15
+ /** Human-readable description shown in reports */
16
+ description: string;
17
+ /** What kind of check the scanner should perform */
18
+ checkType: CheckType;
19
+ /**
20
+ * Relative path (from project root) the check targets.
21
+ * For "custom" checks this may be a hint or pattern rather than a literal path.
22
+ */
23
+ path: string;
24
+ /** Which layer this expectation belongs to (0, 1, 2, 3) */
25
+ layer: number;
26
+ /** Whether the fixer can automatically resolve a failure */
27
+ fixable: boolean;
28
+ /**
29
+ * For "file-contains" checks: the pattern (substring or heading) expected
30
+ * inside the file. Ignored for other check types.
31
+ */
32
+ containsPattern?: string;
33
+ }
34
+ /**
35
+ * A layer groups related expectations under a name and numeric id.
36
+ * Layers are ordered: higher layers gate on lower layers passing.
37
+ */
38
+ export interface BlueprintLayer {
39
+ /** Numeric layer identifier (0, 1, 2, 3) */
40
+ id: number;
41
+ /** Human-readable layer name */
42
+ name: string;
43
+ /** Ordered list of expectations for this layer */
44
+ expectations: BlueprintExpectation[];
45
+ }
46
+ /**
47
+ * The complete audit blueprint. Layers are ordered; the scanner should
48
+ * evaluate them sequentially and gate higher layers on lower ones passing.
49
+ *
50
+ * Exported as a constant -- no runtime construction.
51
+ */
52
+ export declare const AUDIT_BLUEPRINT: readonly BlueprintLayer[];
53
+ //# sourceMappingURL=blueprint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../../../src/cli/audit/blueprint.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,+DAA+D;AAC/D,MAAM,MAAM,SAAS,GACjB,aAAa,GACb,YAAY,GACZ,eAAe,GACf,QAAQ,CAAC;AAEb;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,EAAE,EAAE,MAAM,CAAC;IACX,kDAAkD;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,SAAS,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,4CAA4C;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,YAAY,EAAE,oBAAoB,EAAE,CAAC;CACtC;AA2WD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,cAAc,EAqB3C,CAAC"}
@@ -0,0 +1,386 @@
1
+ /**
2
+ * Declarative blueprint that defines what each audit layer expects.
3
+ * The scanner reads this data structure to determine which checks to run.
4
+ * Adding new checks is data-driven: add an entry here, the scanner picks it up.
5
+ */
6
+ // ---------------------------------------------------------------------------
7
+ // Layer 0 -- Project Prerequisites
8
+ // ---------------------------------------------------------------------------
9
+ const LAYER_0_EXPECTATIONS = [
10
+ {
11
+ id: "L0-git",
12
+ description: "Git initialized",
13
+ checkType: "dir-exists",
14
+ path: ".git",
15
+ layer: 0,
16
+ fixable: false,
17
+ },
18
+ {
19
+ id: "L0-readme",
20
+ description: "README exists",
21
+ checkType: "custom",
22
+ path: "README*",
23
+ layer: 0,
24
+ fixable: false,
25
+ },
26
+ {
27
+ id: "L0-source-dir",
28
+ description: "Source code directory exists",
29
+ checkType: "custom",
30
+ path: "src|lib|app|pkg|cmd|internal",
31
+ layer: 0,
32
+ fixable: false,
33
+ },
34
+ ];
35
+ // ---------------------------------------------------------------------------
36
+ // Layer 1 -- Methodology
37
+ // ---------------------------------------------------------------------------
38
+ const LAYER_1_EXPECTATIONS = [
39
+ {
40
+ id: "L1-claude-md",
41
+ description: "CLAUDE.md project instructions",
42
+ checkType: "file-exists",
43
+ path: "CLAUDE.md",
44
+ layer: 1,
45
+ fixable: true,
46
+ },
47
+ {
48
+ id: "L1-ai-dir",
49
+ description: "ai/ directory",
50
+ checkType: "dir-exists",
51
+ path: "ai",
52
+ layer: 1,
53
+ fixable: true,
54
+ },
55
+ {
56
+ id: "L1-context-dir",
57
+ description: "ai/context/ directory",
58
+ checkType: "dir-exists",
59
+ path: "ai/context",
60
+ layer: 1,
61
+ fixable: true,
62
+ },
63
+ {
64
+ id: "L1-product-vision",
65
+ description: "Product vision document",
66
+ checkType: "file-exists",
67
+ path: "ai/context/product-vision.md",
68
+ layer: 1,
69
+ fixable: true,
70
+ },
71
+ {
72
+ id: "L1-tech-stack",
73
+ description: "Tech stack document",
74
+ checkType: "file-exists",
75
+ path: "ai/context/tech-stack.md",
76
+ layer: 1,
77
+ fixable: true,
78
+ },
79
+ {
80
+ id: "L1-decisions",
81
+ description: "Decisions log",
82
+ checkType: "file-exists",
83
+ path: "ai/context/decisions.md",
84
+ layer: 1,
85
+ fixable: true,
86
+ },
87
+ {
88
+ id: "L1-tasks-dir",
89
+ description: "ai/tasks/ directory",
90
+ checkType: "dir-exists",
91
+ path: "ai/tasks",
92
+ layer: 1,
93
+ fixable: true,
94
+ },
95
+ {
96
+ id: "L1-tasks-backlog",
97
+ description: "Task board: backlog",
98
+ checkType: "file-exists",
99
+ path: "ai/tasks/tasks-backlog.md",
100
+ layer: 1,
101
+ fixable: true,
102
+ },
103
+ {
104
+ id: "L1-tasks-todo",
105
+ description: "Task board: todo",
106
+ checkType: "file-exists",
107
+ path: "ai/tasks/tasks-todo.md",
108
+ layer: 1,
109
+ fixable: true,
110
+ },
111
+ {
112
+ id: "L1-tasks-in-progress",
113
+ description: "Task board: in-progress",
114
+ checkType: "file-exists",
115
+ path: "ai/tasks/tasks-in-progress.md",
116
+ layer: 1,
117
+ fixable: true,
118
+ },
119
+ {
120
+ id: "L1-tasks-in-testing",
121
+ description: "Task board: in-testing",
122
+ checkType: "file-exists",
123
+ path: "ai/tasks/tasks-in-testing.md",
124
+ layer: 1,
125
+ fixable: true,
126
+ },
127
+ {
128
+ id: "L1-tasks-done",
129
+ description: "Task board: done",
130
+ checkType: "file-exists",
131
+ path: "ai/tasks/tasks-done.md",
132
+ layer: 1,
133
+ fixable: true,
134
+ },
135
+ {
136
+ id: "L1-workflows-dir",
137
+ description: "ai/workflows/ directory",
138
+ checkType: "dir-exists",
139
+ path: "ai/workflows",
140
+ layer: 1,
141
+ fixable: true,
142
+ },
143
+ {
144
+ id: "L1-definition-of-done",
145
+ description: "Definition of done workflow",
146
+ checkType: "file-exists",
147
+ path: "ai/workflows/definition-of-done.md",
148
+ layer: 1,
149
+ fixable: true,
150
+ },
151
+ {
152
+ id: "L1-commit-conventions",
153
+ description: "Commit conventions workflow",
154
+ checkType: "file-exists",
155
+ path: "ai/workflows/commit-conventions.md",
156
+ layer: 1,
157
+ fixable: true,
158
+ },
159
+ ];
160
+ // ---------------------------------------------------------------------------
161
+ // Layer 2 -- Agents
162
+ // ---------------------------------------------------------------------------
163
+ const LAYER_2_EXPECTATIONS = [
164
+ {
165
+ id: "L2-claude-dir",
166
+ description: ".claude/ directory",
167
+ checkType: "dir-exists",
168
+ path: ".claude",
169
+ layer: 2,
170
+ fixable: true,
171
+ },
172
+ {
173
+ id: "L2-settings-json",
174
+ description: "Agent settings (.claude/settings.json)",
175
+ checkType: "file-exists",
176
+ path: ".claude/settings.json",
177
+ layer: 2,
178
+ fixable: true,
179
+ },
180
+ {
181
+ id: "L2-agents-dir",
182
+ description: ".claude/agents/ directory",
183
+ checkType: "dir-exists",
184
+ path: ".claude/agents",
185
+ layer: 2,
186
+ fixable: true,
187
+ },
188
+ {
189
+ id: "L2-pm-agent",
190
+ description: "PM agent definition",
191
+ checkType: "file-exists",
192
+ path: ".claude/agents/pm-agent.md",
193
+ layer: 2,
194
+ fixable: true,
195
+ },
196
+ {
197
+ id: "L2-developer-agent",
198
+ description: "Developer agent definition",
199
+ checkType: "file-exists",
200
+ path: ".claude/agents/developer-agent.md",
201
+ layer: 2,
202
+ fixable: true,
203
+ },
204
+ {
205
+ id: "L2-tester-agent",
206
+ description: "Tester agent definition",
207
+ checkType: "file-exists",
208
+ path: ".claude/agents/tester-agent.md",
209
+ layer: 2,
210
+ fixable: true,
211
+ },
212
+ {
213
+ id: "L2-agent-memory-dir",
214
+ description: ".claude/agent-memory/ directory",
215
+ checkType: "dir-exists",
216
+ path: ".claude/agent-memory",
217
+ layer: 2,
218
+ fixable: true,
219
+ },
220
+ {
221
+ id: "L2-pm-memory",
222
+ description: "PM agent memory directory",
223
+ checkType: "dir-exists",
224
+ path: ".claude/agent-memory/meto-pm",
225
+ layer: 2,
226
+ fixable: true,
227
+ },
228
+ {
229
+ id: "L2-developer-memory",
230
+ description: "Developer agent memory directory",
231
+ checkType: "dir-exists",
232
+ path: ".claude/agent-memory/meto-developer",
233
+ layer: 2,
234
+ fixable: true,
235
+ },
236
+ {
237
+ id: "L2-tester-memory",
238
+ description: "Tester agent memory directory",
239
+ checkType: "dir-exists",
240
+ path: ".claude/agent-memory/meto-tester",
241
+ layer: 2,
242
+ fixable: true,
243
+ },
244
+ ];
245
+ // ---------------------------------------------------------------------------
246
+ // Layer 3 -- Governance
247
+ // ---------------------------------------------------------------------------
248
+ const LAYER_3_EXPECTATIONS = [
249
+ {
250
+ id: "L3-dod-exists",
251
+ description: "Definition of done workflow exists",
252
+ checkType: "file-exists",
253
+ path: "ai/workflows/definition-of-done.md",
254
+ layer: 3,
255
+ fixable: true,
256
+ },
257
+ {
258
+ id: "L3-code-guidelines-exists",
259
+ description: "Code guidelines workflow exists",
260
+ checkType: "file-exists",
261
+ path: "ai/workflows/code-guidelines.md",
262
+ layer: 3,
263
+ fixable: true,
264
+ },
265
+ {
266
+ id: "L3-developer-agent-refs-guidelines",
267
+ description: "Developer agent references code guidelines",
268
+ checkType: "file-contains",
269
+ path: ".claude/agents/developer-agent.md",
270
+ layer: 3,
271
+ fixable: true,
272
+ containsPattern: "code-guidelines",
273
+ },
274
+ {
275
+ id: "L3-tester-agent-refs-guidelines",
276
+ description: "Tester agent references code guidelines",
277
+ checkType: "file-contains",
278
+ path: ".claude/agents/tester-agent.md",
279
+ layer: 3,
280
+ fixable: true,
281
+ containsPattern: "code-guidelines",
282
+ },
283
+ {
284
+ id: "L3-commit-conventions-defined",
285
+ description: "Commit conventions defined",
286
+ checkType: "file-contains",
287
+ path: "CLAUDE.md",
288
+ layer: 3,
289
+ fixable: true,
290
+ containsPattern: "Commit",
291
+ },
292
+ {
293
+ id: "L3-session-checkpoint",
294
+ description: "Session checkpoint workflow present",
295
+ checkType: "file-exists",
296
+ path: "ai/workflows/session-checkpoint.md",
297
+ layer: 3,
298
+ fixable: true,
299
+ },
300
+ {
301
+ id: "L3-pm-agent-refs-dod",
302
+ description: "PM agent references definition of done",
303
+ checkType: "file-contains",
304
+ path: ".claude/agents/pm-agent.md",
305
+ layer: 3,
306
+ fixable: true,
307
+ containsPattern: "definition-of-done",
308
+ },
309
+ {
310
+ id: "L3-developer-agent-refs-commit",
311
+ description: "Developer agent references commit conventions",
312
+ checkType: "file-contains",
313
+ path: ".claude/agents/developer-agent.md",
314
+ layer: 3,
315
+ fixable: true,
316
+ containsPattern: "commit",
317
+ },
318
+ {
319
+ id: "L3-tester-agent-refs-dod",
320
+ description: "Tester agent references definition of done",
321
+ checkType: "file-contains",
322
+ path: ".claude/agents/tester-agent.md",
323
+ layer: 3,
324
+ fixable: true,
325
+ containsPattern: "definition-of-done",
326
+ },
327
+ {
328
+ id: "L3-pm-agent-refs-memory",
329
+ description: "PM agent references memory file",
330
+ checkType: "file-contains",
331
+ path: ".claude/agents/pm-agent.md",
332
+ layer: 3,
333
+ fixable: true,
334
+ containsPattern: "agent-memory",
335
+ },
336
+ {
337
+ id: "L3-developer-agent-refs-memory",
338
+ description: "Developer agent references memory file",
339
+ checkType: "file-contains",
340
+ path: ".claude/agents/developer-agent.md",
341
+ layer: 3,
342
+ fixable: true,
343
+ containsPattern: "agent-memory",
344
+ },
345
+ {
346
+ id: "L3-tester-agent-refs-memory",
347
+ description: "Tester agent references memory file",
348
+ checkType: "file-contains",
349
+ path: ".claude/agents/tester-agent.md",
350
+ layer: 3,
351
+ fixable: true,
352
+ containsPattern: "agent-memory",
353
+ },
354
+ ];
355
+ // ---------------------------------------------------------------------------
356
+ // Blueprint (all layers)
357
+ // ---------------------------------------------------------------------------
358
+ /**
359
+ * The complete audit blueprint. Layers are ordered; the scanner should
360
+ * evaluate them sequentially and gate higher layers on lower ones passing.
361
+ *
362
+ * Exported as a constant -- no runtime construction.
363
+ */
364
+ export const AUDIT_BLUEPRINT = [
365
+ {
366
+ id: 0,
367
+ name: "Project Prerequisites",
368
+ expectations: LAYER_0_EXPECTATIONS,
369
+ },
370
+ {
371
+ id: 1,
372
+ name: "Methodology",
373
+ expectations: LAYER_1_EXPECTATIONS,
374
+ },
375
+ {
376
+ id: 2,
377
+ name: "Agents",
378
+ expectations: LAYER_2_EXPECTATIONS,
379
+ },
380
+ {
381
+ id: 3,
382
+ name: "Governance",
383
+ expectations: LAYER_3_EXPECTATIONS,
384
+ },
385
+ ];
386
+ //# sourceMappingURL=blueprint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprint.js","sour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EAAE,oBAAoB;KACnC;CACO,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { TechStack } from "../types.js";
2
+ /**
3
+ * Result of tech stack auto-detection.
4
+ */
5
+ export interface DetectedStack {
6
+ /** The detected stack identifier matching TechStack presets, or "custom" */
7
+ stack: TechStack;
8
+ /** The manifest file that was used for detection */
9
+ detectedVia: string;
10
+ /** Human-readable label for the detected stack */
11
+ label: string;
12
+ }
13
+ /**
14
+ * Auto-detects the tech stack of a project by examining manifest files
15
+ * in the project root directory.
16
+ *
17
+ * Detection order:
18
+ * 1. package.json — inspects dependencies for Next.js, React Native,
19
+ * Vite+React, or falls back to Node.js CLI
20
+ * 2. go.mod — Go
21
+ * 3. pyproject.toml or requirements.txt — Python (FastAPI preset)
22
+ * 4. pubspec.yaml — Flutter
23
+ * 5. Cargo.toml — Rust (returns "custom" since no Rust preset exists)
24
+ *
25
+ * Root-level manifests only. Does not recurse into subdirectories.
26
+ *
27
+ * @param projectDir - Absolute path to the project root directory
28
+ * @returns The detected stack result, or a "custom" fallback if no manifest is found
29
+ */
30
+ export declare function detectStack(projectDir: string): Promise<DetectedStack>;
31
+ //# sourceMappingURL=detect-stack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detect-stack.d.ts","sourceRoot":"","sources":["../../../src/cli/audit/detect-stack.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,4EAA4E;IAC5E,KAAK,EAAE,SAAS,CAAC;IACjB,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;CACf;AAiGD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAyD5E"}