meto-cli 0.10.0 → 0.11.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/cli/audit/blueprint.d.ts +53 -0
- package/dist/cli/audit/blueprint.d.ts.map +1 -0
- package/dist/cli/audit/blueprint.js +386 -0
- package/dist/cli/audit/blueprint.js.map +1 -0
- package/dist/cli/audit/detect-stack.d.ts +31 -0
- package/dist/cli/audit/detect-stack.d.ts.map +1 -0
- package/dist/cli/audit/detect-stack.js +154 -0
- package/dist/cli/audit/detect-stack.js.map +1 -0
- package/dist/cli/audit/fixer.d.ts +75 -0
- package/dist/cli/audit/fixer.d.ts.map +1 -0
- package/dist/cli/audit/fixer.js +802 -0
- package/dist/cli/audit/fixer.js.map +1 -0
- package/dist/cli/audit/index.d.ts +24 -0
- package/dist/cli/audit/index.d.ts.map +1 -0
- package/dist/cli/audit/index.js +212 -0
- package/dist/cli/audit/index.js.map +1 -0
- package/dist/cli/audit/reporter.d.ts +42 -0
- package/dist/cli/audit/reporter.d.ts.map +1 -0
- package/dist/cli/audit/reporter.js +101 -0
- package/dist/cli/audit/reporter.js.map +1 -0
- package/dist/cli/audit/scanner.d.ts +48 -0
- package/dist/cli/audit/scanner.d.ts.map +1 -0
- package/dist/cli/audit/scanner.js +202 -0
- package/dist/cli/audit/scanner.js.map +1 -0
- package/dist/cli/index.js +6 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/renderer.d.ts.map +1 -1
- package/dist/cli/renderer.js +3 -1
- package/dist/cli/renderer.js.map +1 -1
- package/dist/cli/stacks.d.ts +11 -0
- package/dist/cli/stacks.d.ts.map +1 -1
- package/dist/cli/stacks.js +82 -0
- package/dist/cli/stacks.js.map +1 -1
- package/package.json +1 -1
- package/templates/.claude/agents/developer-agent.md +4 -1
- package/templates/.claude/agents/tester-agent.md +4 -1
- package/templates/CLAUDE.md +3 -0
- package/templates/ai/workflows/code-guidelines.md +46 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { TokenMap } from "../renderer.js";
|
|
2
|
+
import type { ScanResult, LayerScanResult } from "./scanner.js";
|
|
3
|
+
/** Outcome of a single fix attempt. */
|
|
4
|
+
export type FixOutcome = "created" | "declined" | "skipped" | "error";
|
|
5
|
+
/**
|
|
6
|
+
* Result of attempting to fix a single failed expectation.
|
|
7
|
+
*/
|
|
8
|
+
export interface FixResult {
|
|
9
|
+
/** The scan result that triggered this fix */
|
|
10
|
+
scanResult: ScanResult;
|
|
11
|
+
/** What happened during the fix attempt */
|
|
12
|
+
outcome: FixOutcome;
|
|
13
|
+
/** Human-readable message about the fix */
|
|
14
|
+
message: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Result of running the fixer on an entire layer.
|
|
18
|
+
*/
|
|
19
|
+
export interface LayerFixResult {
|
|
20
|
+
/** Layer ID that was fixed */
|
|
21
|
+
layerId: number;
|
|
22
|
+
/** Individual fix results */
|
|
23
|
+
fixes: FixResult[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Runs the interactive fixer for all failed expectations in a layer scan result.
|
|
27
|
+
* Prompts the user for each missing file/directory and creates it from templates.
|
|
28
|
+
*
|
|
29
|
+
* This function is layer-agnostic -- it works with any LayerScanResult.
|
|
30
|
+
* The fixer never overwrites existing files -- only creates missing ones.
|
|
31
|
+
*
|
|
32
|
+
* @param projectDir - Absolute path to the project root
|
|
33
|
+
* @param layerResult - The scan result containing failures to fix
|
|
34
|
+
* @param tokens - Token map for template rendering
|
|
35
|
+
* @returns Fix results for each failed expectation
|
|
36
|
+
*/
|
|
37
|
+
export declare function fixLayer(projectDir: string, layerResult: LayerScanResult, tokens: TokenMap): Promise<LayerFixResult>;
|
|
38
|
+
/**
|
|
39
|
+
* Runs the interactive fixer for Layer 2 (Agents).
|
|
40
|
+
*
|
|
41
|
+
* Layer 2 differs from other layers because:
|
|
42
|
+
* - When creating agent files from scratch, the user is asked to choose
|
|
43
|
+
* Sprint vs Swarm workflow mode.
|
|
44
|
+
* - The workflow choice affects the WORKFLOW_AGENTS_SECTION token in CLAUDE.md
|
|
45
|
+
* (CLAUDE.md is Layer 1, but the token content depends on the Layer 2 choice).
|
|
46
|
+
* - Agent memory directories are created with a MEMORY.md file from templates.
|
|
47
|
+
*
|
|
48
|
+
* The fixer never overwrites existing agent definitions or settings.
|
|
49
|
+
*
|
|
50
|
+
* @param projectDir - Absolute path to the project root
|
|
51
|
+
* @param layerResult - The Layer 2 scan result containing failures to fix
|
|
52
|
+
* @param tokens - Token map for template rendering
|
|
53
|
+
* @returns Fix results for each failed expectation
|
|
54
|
+
*/
|
|
55
|
+
export declare function fixLayerTwo(projectDir: string, layerResult: LayerScanResult, tokens: TokenMap): Promise<LayerFixResult>;
|
|
56
|
+
/**
|
|
57
|
+
* Runs the interactive fixer for Layer 3 (Governance).
|
|
58
|
+
*
|
|
59
|
+
* Layer 3 differs from other layers because it has three fix strategies:
|
|
60
|
+
* 1. Missing governance files (definition-of-done, session-checkpoint):
|
|
61
|
+
* created from templates, same as Layer 1.
|
|
62
|
+
* 2. CLAUDE.md missing commit conventions section:
|
|
63
|
+
* appends a commit format section to the existing file.
|
|
64
|
+
* 3. Agent definitions missing governance references:
|
|
65
|
+
* appends reference sections to existing agent files.
|
|
66
|
+
*
|
|
67
|
+
* All fixes are additive -- existing content is never modified or removed.
|
|
68
|
+
*
|
|
69
|
+
* @param projectDir - Absolute path to the project root
|
|
70
|
+
* @param layerResult - The Layer 3 scan result containing failures to fix
|
|
71
|
+
* @param tokens - Token map for template rendering
|
|
72
|
+
* @returns Fix results for each failed expectation
|
|
73
|
+
*/
|
|
74
|
+
export declare function fixLayerThree(projectDir: string, layerResult: LayerScanResult, tokens: TokenMap): Promise<LayerFixResult>;
|
|
75
|
+
//# sourceMappingURL=fixer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixer.d.ts","sourceRoot":"","sources":["../../../src/cli/audit/fixer.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAMhE,uCAAuC;AACvC,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,8CAA8C;IAC9C,UAAU,EAAE,UAAU,CAAC;IACvB,2CAA2C;IAC3C,OAAO,EAAE,UAAU,CAAC;IACpB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,6BAA6B;IAC7B,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB;AA8LD;;;;;;;;;;;GAWG;AACH,wBAAsB,QAAQ,CAC5B,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,eAAe,EAC5B,MAAM,EAAE,QAAQ,GACf,OAAO,CAAC,cAAc,CAAC,CAwCzB;AAiED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,WAAW,CAC/B,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,eAAe,EAC5B,MAAM,EAAE,QAAQ,GACf,OAAO,CAAC,cAAc,CAAC,CA0LzB;AA6GD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,aAAa,CACjC,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,eAAe,EAC5B,MAAM,EAAE,QAAQ,GACf,OAAO,CAAC,cAAc,CAAC,CA6PzB"}
|