@paths.design/caws-cli 5.0.1 → 6.0.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/README.md +15 -12
- package/dist/commands/provenance.js +27 -22
- package/dist/commands/quality-gates.js +190 -455
- package/dist/commands/specs.js +34 -35
- package/dist/commands/status.js +10 -7
- package/dist/commands/tool.js +63 -63
- package/dist/commands/waivers.js +38 -39
- package/dist/index.js +1 -0
- package/dist/policy/PolicyManager.js +60 -28
- package/dist/scaffold/git-hooks.js +89 -27
- package/dist/scaffold/index.js +25 -0
- package/dist/utils/async-utils.js +188 -0
- package/dist/utils/command-wrapper.js +200 -0
- package/dist/utils/promise-utils.js +72 -0
- package/package.json +1 -1
- package/templates/.cursor/hooks/block-dangerous.sh +8 -2
- package/templates/.cursor/rules/README.md +5 -7
- package/templates/scripts/v3/analysis/todo_analyzer.py +48 -1
- package/templates/.cursor/rules/10-authorship-and-attribution.mdc +0 -15
- package/templates/.cursor/rules/15-sophisticated-todo-detection.mdc +0 -425
- /package/templates/.cursor/rules/{11-documentation-quality-standards.mdc → 10-documentation-quality-standards.mdc} +0 -0
- /package/templates/.cursor/rules/{12-scope-management-waivers.mdc → 11-scope-management-waivers.mdc} +0 -0
- /package/templates/.cursor/rules/{13-implementation-completeness.mdc → 12-implementation-completeness.mdc} +0 -0
- /package/templates/.cursor/rules/{14-language-agnostic-standards.mdc → 13-language-agnostic-standards.mdc} +0 -0
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ The CAWS CLI serves as the central control point for:
|
|
|
20
20
|
### Global Installation (Recommended)
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
npm install -g @caws
|
|
23
|
+
npm install -g @paths.design/caws-cli
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
### Local Development
|
|
@@ -199,17 +199,17 @@ Projects use `.caws/working-spec.yaml` files:
|
|
|
199
199
|
|
|
200
200
|
```yaml
|
|
201
201
|
id: PROJ-001
|
|
202
|
-
title:
|
|
202
|
+
title: 'Feature implementation'
|
|
203
203
|
risk_tier: 2
|
|
204
204
|
mode: feature
|
|
205
205
|
change_budget:
|
|
206
206
|
max_files: 25
|
|
207
207
|
max_loc: 1000
|
|
208
208
|
acceptance:
|
|
209
|
-
- id:
|
|
210
|
-
given:
|
|
211
|
-
when:
|
|
212
|
-
then:
|
|
209
|
+
- id: 'A1'
|
|
210
|
+
given: 'Current state'
|
|
211
|
+
when: 'Feature implemented'
|
|
212
|
+
then: 'Expected behavior'
|
|
213
213
|
```
|
|
214
214
|
|
|
215
215
|
### Tool Configuration
|
|
@@ -256,7 +256,7 @@ class MyTool extends BaseTool {
|
|
|
256
256
|
id: 'my-tool',
|
|
257
257
|
name: 'My Custom Tool',
|
|
258
258
|
capabilities: ['validation'],
|
|
259
|
-
version: '1.0.0'
|
|
259
|
+
version: '1.0.0',
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
262
|
|
|
@@ -306,9 +306,10 @@ npm run test:contract # Contract tests
|
|
|
306
306
|
### Common Issues
|
|
307
307
|
|
|
308
308
|
**Command not found**
|
|
309
|
+
|
|
309
310
|
```bash
|
|
310
311
|
# Ensure global installation
|
|
311
|
-
npm install -g @caws
|
|
312
|
+
npm install -g @paths.design/caws-cli
|
|
312
313
|
caws --version
|
|
313
314
|
|
|
314
315
|
# Or use local installation
|
|
@@ -316,6 +317,7 @@ node packages/caws-cli/dist/index.js --help
|
|
|
316
317
|
```
|
|
317
318
|
|
|
318
319
|
**Tool loading errors**
|
|
320
|
+
|
|
319
321
|
```bash
|
|
320
322
|
# Check tool directory structure
|
|
321
323
|
ls -la apps/tools/caws/
|
|
@@ -328,6 +330,7 @@ chmod +x apps/tools/caws/*.js
|
|
|
328
330
|
```
|
|
329
331
|
|
|
330
332
|
**Validation failures**
|
|
333
|
+
|
|
331
334
|
```bash
|
|
332
335
|
# Check working spec syntax
|
|
333
336
|
caws validate --suggestions .caws/working-spec.yaml
|
|
@@ -361,7 +364,7 @@ MIT License - see main project LICENSE file.
|
|
|
361
364
|
|
|
362
365
|
## Links
|
|
363
366
|
|
|
364
|
-
- **Main Project**: https://github.com/
|
|
365
|
-
- **Documentation**: https://docs.
|
|
366
|
-
- **Issues**: https://github.com/
|
|
367
|
-
- **Discussions**: https://github.com/
|
|
367
|
+
- **Main Project**: https://github.com/Paths-Design/coding-agent-working-standard
|
|
368
|
+
- **Documentation**: https://docs.paths.design
|
|
369
|
+
- **Issues**: https://github.com/Paths-Design/coding-agent-working-standard/issues
|
|
370
|
+
- **Discussions**: https://github.com/Paths-Design/coding-agent-working-standard/discussions
|
|
@@ -8,6 +8,7 @@ const fs = require('fs-extra');
|
|
|
8
8
|
const path = require('path');
|
|
9
9
|
const crypto = require('crypto');
|
|
10
10
|
const yaml = require('js-yaml');
|
|
11
|
+
const { commandWrapper } = require('../utils/command-wrapper');
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Provenance command handler
|
|
@@ -15,29 +16,33 @@ const yaml = require('js-yaml');
|
|
|
15
16
|
* @param {Object} options - Command options
|
|
16
17
|
*/
|
|
17
18
|
async function provenanceCommand(subcommand, options) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
19
|
+
return commandWrapper(
|
|
20
|
+
async () => {
|
|
21
|
+
switch (subcommand) {
|
|
22
|
+
case 'update':
|
|
23
|
+
return await updateProvenance(options);
|
|
24
|
+
case 'show':
|
|
25
|
+
return await showProvenance(options);
|
|
26
|
+
case 'verify':
|
|
27
|
+
return await verifyProvenance(options);
|
|
28
|
+
case 'analyze-ai':
|
|
29
|
+
return await analyzeAIProvenance(options);
|
|
30
|
+
case 'init':
|
|
31
|
+
return await initProvenance(options);
|
|
32
|
+
case 'install-hooks':
|
|
33
|
+
return await installHooks(options);
|
|
34
|
+
default:
|
|
35
|
+
throw new Error(
|
|
36
|
+
`Unknown provenance subcommand: ${subcommand}.\n` +
|
|
37
|
+
'Available commands: update, show, verify, analyze-ai, init, install-hooks'
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
commandName: `provenance ${subcommand}`,
|
|
43
|
+
context: { subcommand, options },
|
|
36
44
|
}
|
|
37
|
-
|
|
38
|
-
console.error(`❌ Provenance command failed: ${error.message}`);
|
|
39
|
-
process.exit(1);
|
|
40
|
-
}
|
|
45
|
+
);
|
|
41
46
|
}
|
|
42
47
|
|
|
43
48
|
/**
|