@paths.design/caws-cli 8.1.0 โ 8.2.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.
- package/README.md +5 -6
- package/dist/commands/archive.d.ts +1 -1
- package/dist/commands/archive.d.ts.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +185 -39
- package/dist/commands/mode.d.ts +2 -1
- package/dist/commands/mode.d.ts.map +1 -1
- package/dist/commands/provenance.d.ts.map +1 -1
- package/dist/commands/quality-gates.js +1 -1
- package/dist/commands/specs.d.ts.map +1 -1
- package/dist/commands/worktree.d.ts +7 -0
- package/dist/commands/worktree.d.ts.map +1 -0
- package/dist/commands/worktree.js +136 -0
- package/dist/config/lite-scope.d.ts +33 -0
- package/dist/config/lite-scope.d.ts.map +1 -0
- package/dist/config/lite-scope.js +158 -0
- package/dist/config/modes.d.ts +90 -51
- package/dist/config/modes.d.ts.map +1 -1
- package/dist/config/modes.js +26 -0
- package/dist/error-handler.d.ts +3 -16
- package/dist/error-handler.d.ts.map +1 -1
- package/dist/generators/jest-config-generator.d.ts +32 -0
- package/dist/generators/jest-config-generator.d.ts.map +1 -0
- package/dist/index.js +36 -0
- package/dist/scaffold/claude-hooks.d.ts +28 -0
- package/dist/scaffold/claude-hooks.d.ts.map +1 -0
- package/dist/scaffold/claude-hooks.js +28 -0
- package/dist/scaffold/index.d.ts +2 -0
- package/dist/scaffold/index.d.ts.map +1 -1
- package/dist/scaffold/index.js +90 -88
- package/dist/templates/.caws/schemas/scope.schema.json +52 -0
- package/dist/templates/.caws/schemas/working-spec.schema.json +1 -1
- package/dist/templates/.caws/schemas/worktrees.schema.json +36 -0
- package/dist/templates/.claude/hooks/block-dangerous.sh +33 -0
- package/dist/templates/.claude/hooks/lite-sprawl-check.sh +117 -0
- package/dist/templates/.claude/hooks/scope-guard.sh +93 -6
- package/dist/templates/.claude/hooks/simplification-guard.sh +92 -0
- package/dist/templates/.cursor/README.md +0 -3
- package/dist/templates/.github/copilot-instructions.md +82 -0
- package/dist/templates/.junie/guidelines.md +73 -0
- package/dist/templates/.vscode/launch.json +0 -27
- package/dist/templates/.windsurf/rules/caws-quality-standards.md +54 -0
- package/dist/templates/CLAUDE.md +101 -0
- package/dist/templates/agents.md +73 -1016
- package/dist/templates/docs/README.md +5 -5
- package/dist/test-analysis.d.ts +50 -1
- package/dist/test-analysis.d.ts.map +1 -1
- package/dist/utils/error-categories.d.ts +52 -0
- package/dist/utils/error-categories.d.ts.map +1 -0
- package/dist/utils/gitignore-updater.d.ts +1 -1
- package/dist/utils/gitignore-updater.d.ts.map +1 -1
- package/dist/utils/gitignore-updater.js +4 -0
- package/dist/utils/ide-detection.js +133 -0
- package/dist/utils/quality-gates-utils.d.ts +49 -0
- package/dist/utils/quality-gates-utils.d.ts.map +1 -0
- package/dist/utils/typescript-detector.d.ts +8 -5
- package/dist/utils/typescript-detector.d.ts.map +1 -1
- package/dist/validation/spec-validation.d.ts.map +1 -1
- package/dist/worktree/worktree-manager.d.ts +54 -0
- package/dist/worktree/worktree-manager.d.ts.map +1 -0
- package/dist/worktree/worktree-manager.js +378 -0
- package/package.json +5 -1
- package/templates/.caws/schemas/scope.schema.json +52 -0
- package/templates/.caws/schemas/working-spec.schema.json +1 -1
- package/templates/.caws/schemas/worktrees.schema.json +36 -0
- package/templates/.claude/hooks/block-dangerous.sh +33 -0
- package/templates/.claude/hooks/lite-sprawl-check.sh +117 -0
- package/templates/.claude/hooks/scope-guard.sh +93 -6
- package/templates/.claude/hooks/simplification-guard.sh +92 -0
- package/templates/.cursor/README.md +0 -3
- package/templates/.github/copilot-instructions.md +82 -0
- package/templates/.junie/guidelines.md +73 -0
- package/templates/.vscode/launch.json +0 -27
- package/templates/.windsurf/rules/caws-quality-standards.md +54 -0
- package/templates/AGENTS.md +104 -0
- package/templates/CLAUDE.md +101 -0
- package/templates/docs/README.md +5 -5
- package/templates/.github/copilot/instructions.md +0 -311
- package/templates/agents.md +0 -1047
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
This project is built with the **Coding Agent Workflow System (CAWS)** - an engineering-grade framework that ensures quality, reliability, and maintainability in AI-assisted development.
|
|
5
5
|
|
|
6
6
|
## Key Features
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
7
|
+
- **Quality Gates**: Automated validation of scope, budget, and standards
|
|
8
|
+
- **Comprehensive Testing**: Unit, contract, integration, and mutation testing
|
|
9
|
+
- **Observability**: Structured logging, metrics, and tracing
|
|
10
|
+
- **Rollback Ready**: Feature flags and migration support
|
|
11
|
+
- **Provenance Tracking**: SBOM and SLSA attestation generation
|
|
12
12
|
|
|
13
13
|
## Getting Started
|
|
14
14
|
|
package/dist/test-analysis.d.ts
CHANGED
|
@@ -55,7 +55,8 @@ export class WaiverPatternLearner {
|
|
|
55
55
|
*/
|
|
56
56
|
loadWaivers(): any[];
|
|
57
57
|
/**
|
|
58
|
-
* Load historical working specs
|
|
58
|
+
* Load historical working specs from git history
|
|
59
|
+
* Retrieves past versions of spec files to analyze patterns
|
|
59
60
|
*/
|
|
60
61
|
loadHistoricalSpecs(): any[];
|
|
61
62
|
/**
|
|
@@ -101,10 +102,36 @@ export class WaiverPatternLearner {
|
|
|
101
102
|
export class ProjectSimilarityMatcher {
|
|
102
103
|
constructor(projectRoot?: string);
|
|
103
104
|
projectRoot: string;
|
|
105
|
+
patternLearner: WaiverPatternLearner;
|
|
104
106
|
/**
|
|
105
107
|
* Find projects similar to the current spec
|
|
108
|
+
* Uses real historical specs from git history when available
|
|
106
109
|
*/
|
|
107
110
|
findSimilarProjects(currentSpec: any): {
|
|
111
|
+
project: any;
|
|
112
|
+
similarity_score: number;
|
|
113
|
+
budget_accuracy: number;
|
|
114
|
+
waiver_count: any;
|
|
115
|
+
details: {
|
|
116
|
+
id: any;
|
|
117
|
+
title: any;
|
|
118
|
+
risk_tier: any;
|
|
119
|
+
mode: any;
|
|
120
|
+
tech_stack: any;
|
|
121
|
+
feature_type: any;
|
|
122
|
+
actual_budget: {
|
|
123
|
+
files: any;
|
|
124
|
+
loc: any;
|
|
125
|
+
};
|
|
126
|
+
allocated_budget: {
|
|
127
|
+
files: any;
|
|
128
|
+
loc: any;
|
|
129
|
+
};
|
|
130
|
+
waivers: any;
|
|
131
|
+
_source: any;
|
|
132
|
+
_date: any;
|
|
133
|
+
};
|
|
134
|
+
}[] | {
|
|
108
135
|
project: string;
|
|
109
136
|
similarity_score: number;
|
|
110
137
|
budget_accuracy: number;
|
|
@@ -127,6 +154,28 @@ export class ProjectSimilarityMatcher {
|
|
|
127
154
|
waivers: string[];
|
|
128
155
|
};
|
|
129
156
|
}[];
|
|
157
|
+
/**
|
|
158
|
+
* Convert a spec object to project format for similarity comparison
|
|
159
|
+
*/
|
|
160
|
+
specToProject(spec: any): {
|
|
161
|
+
id: any;
|
|
162
|
+
title: any;
|
|
163
|
+
risk_tier: any;
|
|
164
|
+
mode: any;
|
|
165
|
+
tech_stack: any;
|
|
166
|
+
feature_type: any;
|
|
167
|
+
actual_budget: {
|
|
168
|
+
files: any;
|
|
169
|
+
loc: any;
|
|
170
|
+
};
|
|
171
|
+
allocated_budget: {
|
|
172
|
+
files: any;
|
|
173
|
+
loc: any;
|
|
174
|
+
};
|
|
175
|
+
waivers: any;
|
|
176
|
+
_source: any;
|
|
177
|
+
_date: any;
|
|
178
|
+
};
|
|
130
179
|
/**
|
|
131
180
|
* Calculate similarity score between two specs/projects
|
|
132
181
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-analysis.d.ts","sourceRoot":"","sources":["../src/test-analysis.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test-analysis.d.ts","sourceRoot":"","sources":["../src/test-analysis.js"],"names":[],"mappings":"AAklBA;;GAEG;AACH,qFAsBC;AAjmBD;;;GAGG;AACH;IACE,kCAEC;IADC,oBAA8B;IAGhC;;OAEG;IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgCC;IAED;;OAEG;IACH,qBAsBC;IAED;;;OAGG;IACH,6BA4GC;IAED;;OAEG;IACH;;;;;;;;;;;;;;;MA6CC;IAED;;OAEG;IACH;;;;QAaC;IAED;;OAEG;IACH;;;;QAeC;CACF;AAED;;;GAGG;AACH;IACE,kCAGC;IAFC,oBAA8B;IAC9B,qCAA2D;IAG7D;;;OAGG;IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAyFC;IAED;;OAEG;IACH;;;;;;;;;;;;;;;;;;MA0DC;IAED;;OAEG;IACH,oDA6BC;CACF;AAED;;GAEG;AACH;IACE,kCAIC;IAHC,oBAA8B;IAC9B,qCAA2D;IAC3D,4CAAkE;IAGpE;;OAEG;IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA8DC;IAED;;OAEG;IACH,4EAsBC;CACF"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export namespace ERROR_CATEGORIES {
|
|
2
|
+
let VALIDATION: string;
|
|
3
|
+
let PERMISSION: string;
|
|
4
|
+
let FILESYSTEM: string;
|
|
5
|
+
let NETWORK: string;
|
|
6
|
+
let CONFIGURATION: string;
|
|
7
|
+
let USER_INPUT: string;
|
|
8
|
+
let DEPENDENCY: string;
|
|
9
|
+
let UNKNOWN: string;
|
|
10
|
+
}
|
|
11
|
+
export namespace ERROR_CODES {
|
|
12
|
+
import EACCES = ERROR_CATEGORIES.PERMISSION;
|
|
13
|
+
export { EACCES };
|
|
14
|
+
import EPERM = ERROR_CATEGORIES.PERMISSION;
|
|
15
|
+
export { EPERM };
|
|
16
|
+
import ENOENT = ERROR_CATEGORIES.FILESYSTEM;
|
|
17
|
+
export { ENOENT };
|
|
18
|
+
import ENOTFOUND = ERROR_CATEGORIES.NETWORK;
|
|
19
|
+
export { ENOTFOUND };
|
|
20
|
+
import ECONNREFUSED = ERROR_CATEGORIES.NETWORK;
|
|
21
|
+
export { ECONNREFUSED };
|
|
22
|
+
import ETIMEDOUT = ERROR_CATEGORIES.NETWORK;
|
|
23
|
+
export { ETIMEDOUT };
|
|
24
|
+
import ENOSPC = ERROR_CATEGORIES.FILESYSTEM;
|
|
25
|
+
export { ENOSPC };
|
|
26
|
+
import EEXIST = ERROR_CATEGORIES.FILESYSTEM;
|
|
27
|
+
export { EEXIST };
|
|
28
|
+
import EISDIR = ERROR_CATEGORIES.FILESYSTEM;
|
|
29
|
+
export { EISDIR };
|
|
30
|
+
import ENOTDIR = ERROR_CATEGORIES.FILESYSTEM;
|
|
31
|
+
export { ENOTDIR };
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Get error category from error object or message
|
|
35
|
+
* @param {Error|string} error - Error object or message
|
|
36
|
+
* @returns {string} Error category
|
|
37
|
+
*/
|
|
38
|
+
export function getErrorCategory(error: Error | string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Get user-friendly error message based on category
|
|
41
|
+
* @param {string} category - Error category
|
|
42
|
+
* @param {string} originalMessage - Original error message
|
|
43
|
+
* @returns {string} User-friendly message
|
|
44
|
+
*/
|
|
45
|
+
export function getFriendlyMessage(category: string, originalMessage: string): string;
|
|
46
|
+
/**
|
|
47
|
+
* Get recovery suggestions based on error category
|
|
48
|
+
* @param {string} category - Error category
|
|
49
|
+
* @returns {Array<string>} Array of recovery suggestions
|
|
50
|
+
*/
|
|
51
|
+
export function getCategorySuggestions(category: string): Array<string>;
|
|
52
|
+
//# sourceMappingURL=error-categories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-categories.d.ts","sourceRoot":"","sources":["../../src/utils/error-categories.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA;;;;GAIG;AACH,wCAHW,KAAK,GAAC,MAAM,GACV,MAAM,CA8ElB;AAED;;;;;GAKG;AACH,6CAJW,MAAM,mBACN,MAAM,GACJ,MAAM,CAmBlB;AAED;;;;GAIG;AACH,iDAHW,MAAM,GACJ,KAAK,CAAC,MAAM,CAAC,CAsDzB"}
|
|
@@ -35,5 +35,5 @@ export function verifyGitignore(projectRoot: string): Promise<boolean>;
|
|
|
35
35
|
* - Logs (caws.log, debug logs)
|
|
36
36
|
* - Local overrides (caws.local.*)
|
|
37
37
|
*/
|
|
38
|
-
export const CAWS_GITIGNORE_ENTRIES: "\n# CAWS Local Runtime Data (developer-specific, should not be tracked)\n# ====================================================================\n# Note: Specs, policy, waivers, provenance, and plans ARE tracked for team collaboration\n# Only local agent tracking, generated tools, and temporary files are ignored\n\n# Agent runtime tracking (local to each developer)\n.agent/\n\n# CAWS tools (now in .caws/tools/)\n.caws/tools/\n# Legacy location (for backward compatibility)\napps/tools/caws/\n\n# Temporary CAWS files\n**/*.caws.tmp\n**/*.working-spec.bak\n.caws/*.tmp\n.caws/*.bak\n\n# CAWS logs (local debugging)\ncaws-debug.log*\n**/caws.log\n.caws/*.log\n\n# Local development overrides (developer-specific)\ncaws.local.*\n.caws/local.*\n";
|
|
38
|
+
export const CAWS_GITIGNORE_ENTRIES: "\n# CAWS Local Runtime Data (developer-specific, should not be tracked)\n# ====================================================================\n# Note: Specs, policy, waivers, provenance, and plans ARE tracked for team collaboration\n# Only local agent tracking, generated tools, and temporary files are ignored\n\n# Agent runtime tracking (local to each developer)\n.agent/\n\n# CAWS tools (now in .caws/tools/)\n.caws/tools/\n# Legacy location (for backward compatibility)\napps/tools/caws/\n\n# Temporary CAWS files\n**/*.caws.tmp\n**/*.working-spec.bak\n.caws/*.tmp\n.caws/*.bak\n\n# CAWS logs (local debugging)\ncaws-debug.log*\n**/caws.log\n.caws/*.log\n\n# Local development overrides (developer-specific)\ncaws.local.*\n.caws/local.*\n\n# CAWS Worktrees (local, should not be tracked)\n.caws/worktrees/\n.caws/worktrees.json\n";
|
|
39
39
|
//# sourceMappingURL=gitignore-updater.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitignore-updater.d.ts","sourceRoot":"","sources":["../../src/utils/gitignore-updater.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gitignore-updater.d.ts","sourceRoot":"","sources":["../../src/utils/gitignore-updater.js"],"names":[],"mappings":"AAiEA;;;;;;GAMG;AACH,6CALW,MAAM,YAEd;IAAyB,KAAK,EAAtB,OAAO;CACf,GAAU,OAAO,CAAC,OAAO,CAAC,CA2D5B;AAED;;;;GAIG;AACH,6CAHW,MAAM,GACJ,OAAO,CAAC,OAAO,CAAC,CAW5B;AAvID;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,22BAgCE"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview IDE Detection and Selection Utilities
|
|
3
|
+
* Detects active IDEs from environment variables and provides
|
|
4
|
+
* selection/parsing helpers for the --ide CLI flag.
|
|
5
|
+
* @author @darianrosebrook
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const chalk = require('chalk');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Registry of supported IDE integrations.
|
|
12
|
+
* Each entry maps an ID to its display name, description, and detection env vars.
|
|
13
|
+
*/
|
|
14
|
+
const IDE_REGISTRY = {
|
|
15
|
+
cursor: {
|
|
16
|
+
id: 'cursor',
|
|
17
|
+
name: 'Cursor',
|
|
18
|
+
description: 'AI-first IDE with hooks, rules, and audit logs',
|
|
19
|
+
envVars: ['CURSOR_TRACE_DIR'],
|
|
20
|
+
},
|
|
21
|
+
claude: {
|
|
22
|
+
id: 'claude',
|
|
23
|
+
name: 'Claude Code',
|
|
24
|
+
description: 'Claude Code with safety hooks and settings',
|
|
25
|
+
envVars: ['CLAUDE_PROJECT_DIR'],
|
|
26
|
+
},
|
|
27
|
+
vscode: {
|
|
28
|
+
id: 'vscode',
|
|
29
|
+
name: 'VS Code',
|
|
30
|
+
description: 'Visual Studio Code settings and debug configs',
|
|
31
|
+
envVars: ['VSCODE_PID', 'VSCODE_IPC_HOOK'],
|
|
32
|
+
},
|
|
33
|
+
intellij: {
|
|
34
|
+
id: 'intellij',
|
|
35
|
+
name: 'IntelliJ IDEA',
|
|
36
|
+
description: 'IntelliJ run configurations for CAWS',
|
|
37
|
+
envVars: ['IDEA_INITIAL_DIRECTORY'],
|
|
38
|
+
},
|
|
39
|
+
windsurf: {
|
|
40
|
+
id: 'windsurf',
|
|
41
|
+
name: 'Windsurf',
|
|
42
|
+
description: 'Windsurf workflow for CAWS-guided development',
|
|
43
|
+
envVars: ['WINDSURF_WORKSPACE'],
|
|
44
|
+
},
|
|
45
|
+
copilot: {
|
|
46
|
+
id: 'copilot',
|
|
47
|
+
name: 'GitHub Copilot',
|
|
48
|
+
description: 'GitHub Copilot CAWS integration instructions',
|
|
49
|
+
envVars: [], // No reliable env var; paired with vscode
|
|
50
|
+
},
|
|
51
|
+
junie: {
|
|
52
|
+
id: 'junie',
|
|
53
|
+
name: 'JetBrains Junie',
|
|
54
|
+
description: 'Junie AI agent guidelines for JetBrains IDEs',
|
|
55
|
+
envVars: [], // Paired with intellij
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const ALL_IDE_IDS = Object.keys(IDE_REGISTRY);
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Detect currently active IDEs from environment variables.
|
|
63
|
+
* @returns {string[]} Array of detected IDE identifiers
|
|
64
|
+
*/
|
|
65
|
+
function detectActiveIDEs() {
|
|
66
|
+
const detected = [];
|
|
67
|
+
for (const [id, config] of Object.entries(IDE_REGISTRY)) {
|
|
68
|
+
if (config.envVars.length > 0 && config.envVars.some((v) => process.env[v])) {
|
|
69
|
+
detected.push(id);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return detected;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Get recommended IDE set based on detection and natural pairings.
|
|
77
|
+
* - Cursor detected -> also recommend Claude Code
|
|
78
|
+
* - VS Code detected -> also recommend Copilot
|
|
79
|
+
* - Nothing detected -> default to cursor + claude (AI-first set)
|
|
80
|
+
* @returns {string[]} Array of recommended IDE identifiers
|
|
81
|
+
*/
|
|
82
|
+
function getRecommendedIDEs() {
|
|
83
|
+
const detected = detectActiveIDEs();
|
|
84
|
+
|
|
85
|
+
if (detected.length > 0) {
|
|
86
|
+
const recommended = new Set(detected);
|
|
87
|
+
if (detected.includes('cursor')) recommended.add('claude');
|
|
88
|
+
if (detected.includes('vscode')) recommended.add('copilot');
|
|
89
|
+
if (detected.includes('intellij')) recommended.add('junie');
|
|
90
|
+
return Array.from(recommended);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return ['cursor', 'claude'];
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Parse an IDE selection from a CLI flag value or prompt answer.
|
|
98
|
+
* @param {string|string[]} input - Comma-separated string or array of IDE ids
|
|
99
|
+
* @returns {string[]} Normalized, validated array of IDE identifiers
|
|
100
|
+
*/
|
|
101
|
+
function parseIDESelection(input) {
|
|
102
|
+
if (!input) return [];
|
|
103
|
+
|
|
104
|
+
let ids;
|
|
105
|
+
if (typeof input === 'string') {
|
|
106
|
+
ids = input.split(',').map((s) => s.trim().toLowerCase()).filter(Boolean);
|
|
107
|
+
} else if (Array.isArray(input)) {
|
|
108
|
+
ids = input.map((s) => String(s).trim().toLowerCase()).filter(Boolean);
|
|
109
|
+
} else {
|
|
110
|
+
return [];
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (ids.includes('all')) return [...ALL_IDE_IDS];
|
|
114
|
+
if (ids.includes('none')) return [];
|
|
115
|
+
|
|
116
|
+
const valid = ids.filter((id) => id in IDE_REGISTRY);
|
|
117
|
+
const invalid = ids.filter((id) => !(id in IDE_REGISTRY));
|
|
118
|
+
|
|
119
|
+
if (invalid.length > 0) {
|
|
120
|
+
console.warn(chalk.yellow(`Warning: Unknown IDE identifiers: ${invalid.join(', ')}`));
|
|
121
|
+
console.warn(chalk.blue(`Valid options: ${ALL_IDE_IDS.join(', ')}, all, none`));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return valid;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
module.exports = {
|
|
128
|
+
IDE_REGISTRY,
|
|
129
|
+
ALL_IDE_IDS,
|
|
130
|
+
detectActiveIDEs,
|
|
131
|
+
getRecommendedIDEs,
|
|
132
|
+
parseIDESelection,
|
|
133
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get staged files from git
|
|
3
|
+
* @returns {string[]} Array of staged file paths
|
|
4
|
+
*/
|
|
5
|
+
export function getStagedFiles(): string[];
|
|
6
|
+
/**
|
|
7
|
+
* Check for god objects in staged files
|
|
8
|
+
* @param {string[]} stagedFiles - Array of staged file paths
|
|
9
|
+
* @param {string} language - Language to check ('rust', 'typescript', etc.)
|
|
10
|
+
* @returns {Object} God object analysis results
|
|
11
|
+
*/
|
|
12
|
+
export function checkGodObjects(stagedFiles: string[], language?: string): any;
|
|
13
|
+
/**
|
|
14
|
+
* Check for hidden TODOs in staged files
|
|
15
|
+
* @param {string[]} stagedFiles - Array of staged file paths
|
|
16
|
+
* @returns {Object} TODO analysis results
|
|
17
|
+
*/
|
|
18
|
+
export function checkHiddenTodos(stagedFiles: string[]): any;
|
|
19
|
+
/**
|
|
20
|
+
* Check if a waiver applies to the given gate
|
|
21
|
+
* @param {string} gate - Gate name to check
|
|
22
|
+
* @returns {Object} Waiver check result
|
|
23
|
+
*/
|
|
24
|
+
export function checkWaiver(gate: string): any;
|
|
25
|
+
/**
|
|
26
|
+
* Detect if project is in crisis response mode
|
|
27
|
+
* @returns {boolean} True if in crisis mode
|
|
28
|
+
*/
|
|
29
|
+
export function detectCrisisMode(): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Run comprehensive quality gates on staged files
|
|
32
|
+
* @param {Object} options - Options for quality gates
|
|
33
|
+
* @returns {Object} Quality gate results
|
|
34
|
+
*/
|
|
35
|
+
export function runQualityGates(options?: any): any;
|
|
36
|
+
export namespace CONFIG {
|
|
37
|
+
namespace godObjectThresholds {
|
|
38
|
+
let warning: number;
|
|
39
|
+
let critical: number;
|
|
40
|
+
}
|
|
41
|
+
let todoConfidenceThreshold: number;
|
|
42
|
+
let supportedExtensions: string[];
|
|
43
|
+
namespace crisisResponseThresholds {
|
|
44
|
+
export let godObjectCritical: number;
|
|
45
|
+
let todoConfidenceThreshold_1: number;
|
|
46
|
+
export { todoConfidenceThreshold_1 as todoConfidenceThreshold };
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=quality-gates-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality-gates-utils.d.ts","sourceRoot":"","sources":["../../src/utils/quality-gates-utils.js"],"names":[],"mappings":"AA0GA;;;GAGG;AACH,kCAFa,MAAM,EAAE,CAcpB;AAED;;;;;GAKG;AACH,6CAJW,MAAM,EAAE,aACR,MAAM,OAqDhB;AAED;;;;GAIG;AACH,8CAHW,MAAM,EAAE,OAmFlB;AA5OD;;;;GAIG;AACH,kCAHW,MAAM,OAiChB;AAED;;;GAGG;AACH,oCAFa,OAAO,CAkCnB;AAqKD;;;;GAIG;AACH,oDAqHC"}
|
|
@@ -12,11 +12,6 @@ export function detectTypeScript(projectDir?: string): any;
|
|
|
12
12
|
*/
|
|
13
13
|
export function detectTestFramework(projectDir?: string, packageJson?: any): any;
|
|
14
14
|
export function getWorkspaceDirectories(projectDir?: string): string[];
|
|
15
|
-
/**
|
|
16
|
-
* Get workspace directories from package.json
|
|
17
|
-
* @param {string} projectDir - Project directory path
|
|
18
|
-
* @returns {string[]} Array of workspace directories
|
|
19
|
-
*/
|
|
20
15
|
/**
|
|
21
16
|
* Get workspace directories from npm/yarn package.json workspaces
|
|
22
17
|
* @param {string} projectDir - Project directory path
|
|
@@ -35,6 +30,14 @@ export function getPnpmWorkspaces(projectDir: string): string[];
|
|
|
35
30
|
* @returns {string[]} Array of workspace directories
|
|
36
31
|
*/
|
|
37
32
|
export function getLernaWorkspaces(projectDir: string): string[];
|
|
33
|
+
/**
|
|
34
|
+
* Expand workspace glob patterns to actual directories
|
|
35
|
+
* Shared helper for npm, pnpm, and lerna workspace resolution
|
|
36
|
+
* @param {string[]} patterns - Workspace patterns (may include globs like "packages/*")
|
|
37
|
+
* @param {string} projectDir - Project directory path
|
|
38
|
+
* @returns {string[]} Array of resolved workspace directory paths
|
|
39
|
+
*/
|
|
40
|
+
export function expandWorkspacePatterns(patterns: string[], projectDir: string): string[];
|
|
38
41
|
/**
|
|
39
42
|
* Check if a dependency exists in hoisted node_modules
|
|
40
43
|
* @param {string} depName - Dependency name to check
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-detector.d.ts","sourceRoot":"","sources":["../../src/utils/typescript-detector.js"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,8CAHW,MAAM,OAkChB;AAED;;;;;GAKG;AACH,iDAJW,MAAM,0BAkDhB;
|
|
1
|
+
{"version":3,"file":"typescript-detector.d.ts","sourceRoot":"","sources":["../../src/utils/typescript-detector.js"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,8CAHW,MAAM,OAkChB;AAED;;;;;GAKG;AACH,iDAJW,MAAM,0BAkDhB;AAgHD,uEASC;AApFD;;;;GAIG;AACH,6CAHW,MAAM,GACJ,MAAM,EAAE,CAgBpB;AAED;;;;GAIG;AACH,8CAHW,MAAM,GACJ,MAAM,EAAE,CAiBpB;AAED;;;;GAIG;AACH,+CAHW,MAAM,GACJ,MAAM,EAAE,CAgBpB;AAjGD;;;;;;GAMG;AACH,kDAJW,MAAM,EAAE,cACR,MAAM,GACJ,MAAM,EAAE,CA4BpB;AAkED;;;;;GAKG;AACH,gDAJW,MAAM,cACN,MAAM,GACJ,OAAO,CAKnB;AAaD;;;;GAIG;AACH,uDAHW,MAAM,OA0EhB;AAED;;;;;GAKG;AACH,+EAFa,MAAM,EAAE,CAuBpB;AAED;;;GAGG;AACH,iEAoBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec-validation.d.ts","sourceRoot":"","sources":["../../src/validation/spec-validation.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spec-validation.d.ts","sourceRoot":"","sources":["../../src/validation/spec-validation.js"],"names":[],"mappings":"AA6DA;;;;;GAKG;AACH,mEA8HC;AAED;;;;;GAKG;AACH,kFAgdC;AAoCD;;;;;GAKG;AACH,0CAJW,MAAM,eAEJ,MAAM,CAkBlB;AAED;;;;;GAKG;AACH,uCAJW,MAAM,eAEJ,OAAO,CAKnB;AAnED;;;;;;GAMG;AACH,0EAFa,MAAM,CAclB;AAED;;;;GAIG;AACH,0CAHW,MAAM,GACJ,MAAM,CAQlB"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a new git worktree with scope isolation
|
|
3
|
+
* @param {string} name - Worktree name
|
|
4
|
+
* @param {Object} options - Creation options
|
|
5
|
+
* @param {string} [options.scope] - Sparse checkout pattern (e.g., "src/auth/**")
|
|
6
|
+
* @param {string} [options.baseBranch] - Base branch to create from
|
|
7
|
+
* @param {string} [options.specId] - Associated spec ID for standard+ modes
|
|
8
|
+
* @returns {Object} Created worktree info
|
|
9
|
+
*/
|
|
10
|
+
export function createWorktree(name: string, options?: {
|
|
11
|
+
scope?: string;
|
|
12
|
+
baseBranch?: string;
|
|
13
|
+
specId?: string;
|
|
14
|
+
}): any;
|
|
15
|
+
/**
|
|
16
|
+
* List all registered worktrees with filesystem validation
|
|
17
|
+
* @returns {Array} Worktree entries with status
|
|
18
|
+
*/
|
|
19
|
+
export function listWorktrees(): any[];
|
|
20
|
+
/**
|
|
21
|
+
* Destroy a worktree
|
|
22
|
+
* @param {string} name - Worktree name
|
|
23
|
+
* @param {Object} options - Destruction options
|
|
24
|
+
* @param {boolean} [options.deleteBranch] - Also delete the branch
|
|
25
|
+
* @param {boolean} [options.force] - Force removal even if dirty
|
|
26
|
+
*/
|
|
27
|
+
export function destroyWorktree(name: string, options?: {
|
|
28
|
+
deleteBranch?: boolean;
|
|
29
|
+
force?: boolean;
|
|
30
|
+
}): void;
|
|
31
|
+
/**
|
|
32
|
+
* Prune stale worktree entries
|
|
33
|
+
* @param {Object} options - Prune options
|
|
34
|
+
* @param {number} [options.maxAgeDays] - Remove entries older than this many days
|
|
35
|
+
* @returns {Array} Pruned entries
|
|
36
|
+
*/
|
|
37
|
+
export function pruneWorktrees(options?: {
|
|
38
|
+
maxAgeDays?: number;
|
|
39
|
+
}): any[];
|
|
40
|
+
/**
|
|
41
|
+
* Load the worktree registry
|
|
42
|
+
* @param {string} root - Repository root
|
|
43
|
+
* @returns {Object} Registry object
|
|
44
|
+
*/
|
|
45
|
+
export function loadRegistry(root: string): any;
|
|
46
|
+
/**
|
|
47
|
+
* Get the git repository root
|
|
48
|
+
* @returns {string} Absolute path to repo root
|
|
49
|
+
*/
|
|
50
|
+
export function getRepoRoot(): string;
|
|
51
|
+
export const WORKTREES_DIR: ".caws/worktrees";
|
|
52
|
+
export const REGISTRY_FILE: ".caws/worktrees.json";
|
|
53
|
+
export const BRANCH_PREFIX: "caws/";
|
|
54
|
+
//# sourceMappingURL=worktree-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worktree-manager.d.ts","sourceRoot":"","sources":["../../src/worktree/worktree-manager.js"],"names":[],"mappings":"AA+DA;;;;;;;;GAQG;AACH,qCAPW,MAAM,YAEd;IAAyB,KAAK,GAAtB,MAAM;IACW,UAAU,GAA3B,MAAM;IACW,MAAM,GAAvB,MAAM;CACd,OA4IF;AAED;;;GAGG;AACH,uCAqCC;AAED;;;;;;GAMG;AACH,sCALW,MAAM,YAEd;IAA0B,YAAY,GAA9B,OAAO;IACW,KAAK,GAAvB,OAAO;CACjB,QAqDA;AAED;;;;;GAKG;AACH,yCAHG;IAAyB,UAAU,GAA3B,MAAM;CACd,SA6CF;AA1UD;;;;GAIG;AACH,mCAHW,MAAM,OAahB;AAnCD;;;GAGG;AACH,+BAFa,MAAM,CAMlB;AAZD,4BAAsB,iBAAiB,CAAC;AACxC,4BAAsB,sBAAsB,CAAC;AAC7C,4BAAsB,OAAO,CAAC"}
|