@paths.design/caws-cli 3.0.0 → 3.1.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 +295 -150
- package/dist/budget-derivation.d.ts +35 -0
- package/dist/budget-derivation.d.ts.map +1 -0
- package/dist/budget-derivation.js +204 -0
- package/dist/cicd-optimizer.d.ts +142 -0
- package/dist/cicd-optimizer.d.ts.map +1 -0
- package/dist/cicd-optimizer.js +504 -0
- package/dist/commands/burnup.d.ts +6 -0
- package/dist/commands/burnup.d.ts.map +1 -0
- package/dist/commands/burnup.js +90 -0
- package/dist/commands/init.d.ts +5 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +514 -0
- package/dist/commands/provenance.d.ts +22 -0
- package/dist/commands/provenance.d.ts.map +1 -0
- package/dist/commands/provenance.js +594 -0
- package/dist/commands/tool.d.ts +13 -0
- package/dist/commands/tool.d.ts.map +1 -0
- package/dist/commands/tool.js +138 -0
- package/dist/commands/validate.d.ts +7 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/validate.js +80 -0
- package/dist/config/index.d.ts +29 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +132 -0
- package/dist/error-handler.d.ts +50 -0
- package/dist/error-handler.d.ts.map +1 -0
- package/dist/error-handler.js +253 -0
- package/dist/generators/working-spec.d.ts +13 -0
- package/dist/generators/working-spec.d.ts.map +1 -0
- package/dist/generators/working-spec.js +204 -0
- package/dist/index-new.d.ts +5 -0
- package/dist/index-new.d.ts.map +1 -0
- package/dist/index-new.js +317 -0
- package/dist/index.d.ts +3 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +100 -1659
- package/dist/index.js.backup +4711 -0
- package/dist/scaffold/cursor-hooks.d.ts +7 -0
- package/dist/scaffold/cursor-hooks.d.ts.map +1 -0
- package/dist/scaffold/cursor-hooks.js +152 -0
- package/dist/scaffold/index.d.ts +20 -0
- package/dist/scaffold/index.d.ts.map +1 -0
- package/dist/scaffold/index.js +486 -0
- package/dist/test-analysis.d.ts +182 -0
- package/dist/test-analysis.d.ts.map +1 -0
- package/dist/test-analysis.js +580 -0
- package/dist/tool-interface.d.ts +236 -0
- package/dist/tool-interface.d.ts.map +1 -0
- package/dist/tool-interface.js +314 -0
- package/dist/tool-loader.d.ts +77 -0
- package/dist/tool-loader.d.ts.map +1 -0
- package/dist/tool-loader.js +298 -0
- package/dist/tool-validator.d.ts +72 -0
- package/dist/tool-validator.d.ts.map +1 -0
- package/dist/tool-validator.js +387 -0
- package/dist/utils/detection.d.ts +7 -0
- package/dist/utils/detection.d.ts.map +1 -0
- package/dist/utils/detection.js +174 -0
- package/dist/utils/finalization.d.ts +17 -0
- package/dist/utils/finalization.d.ts.map +1 -0
- package/dist/utils/finalization.js +229 -0
- package/dist/utils/project-analysis.d.ts +14 -0
- package/dist/utils/project-analysis.d.ts.map +1 -0
- package/dist/utils/project-analysis.js +105 -0
- package/dist/validation/spec-validation.d.ts +29 -0
- package/dist/validation/spec-validation.d.ts.map +1 -0
- package/dist/validation/spec-validation.js +376 -0
- package/dist/waivers-manager.d.ts +167 -0
- package/dist/waivers-manager.d.ts.map +1 -0
- package/dist/waivers-manager.js +549 -0
- package/package.json +10 -12
- package/templates/.cursor/README.md +311 -0
- package/templates/.cursor/hooks/audit.sh +55 -0
- package/templates/.cursor/hooks/block-dangerous.sh +77 -0
- package/templates/.cursor/hooks/caws-quality-check.sh +52 -0
- package/templates/.cursor/hooks/caws-scope-guard.sh +74 -0
- package/templates/.cursor/hooks/caws-tool-validation.sh +121 -0
- package/templates/.cursor/hooks/format.sh +38 -0
- package/templates/.cursor/hooks/naming-check.sh +64 -0
- package/templates/.cursor/hooks/scan-secrets.sh +46 -0
- package/templates/.cursor/hooks/scope-guard.sh +52 -0
- package/templates/.cursor/hooks/validate-spec.sh +38 -0
- package/templates/.cursor/hooks.json +59 -0
- package/templates/.github/copilot/instructions.md +311 -0
- package/templates/.idea/runConfigurations/CAWS_Evaluate.xml +5 -0
- package/templates/.idea/runConfigurations/CAWS_Validate.xml +5 -0
- package/templates/.vscode/launch.json +56 -0
- package/templates/.vscode/settings.json +93 -0
- package/templates/.windsurf/workflows/caws-guided-development.md +92 -0
- package/templates/apps/tools/caws/README.md +1 -1
- package/templates/apps/tools/caws/prompt-lint.js.backup +274 -0
- package/templates/apps/tools/caws/provenance.js.backup +73 -0
- package/templates/apps/tools/caws/schemas/working-spec.schema.json +21 -3
- package/templates/codemod/test.js +93 -1
package/README.md
CHANGED
|
@@ -1,222 +1,367 @@
|
|
|
1
1
|
# CAWS CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Command Line Interface for CAWS (Coding Agent Workflow System)**
|
|
4
|
+
|
|
5
|
+
The CAWS CLI is the primary interface for developers and agents to interact with CAWS quality assurance and workflow management capabilities. It provides comprehensive project scaffolding, validation, and management tools.
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
The CAWS CLI serves as the central control point for:
|
|
10
|
+
|
|
11
|
+
- **Project Initialization**: Scaffold new projects with CAWS quality gates
|
|
12
|
+
- **Quality Validation**: Run comprehensive validation against working specifications
|
|
13
|
+
- **Agent Integration**: Programmatic APIs for AI agents to evaluate and guide development
|
|
14
|
+
- **Waiver Management**: Fast-lane escape hatches with full audit trails
|
|
15
|
+
- **CI/CD Optimization**: Pipeline generation and optimization tools
|
|
16
|
+
- **Experimental Features**: Dry-run capabilities for cutting-edge functionality
|
|
4
17
|
|
|
5
18
|
## Installation
|
|
6
19
|
|
|
20
|
+
### Global Installation (Recommended)
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install -g @caws/cli
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Local Development
|
|
27
|
+
|
|
7
28
|
```bash
|
|
8
|
-
#
|
|
9
|
-
|
|
29
|
+
# Clone the CAWS monorepo
|
|
30
|
+
git clone https://github.com/paths-design/caws.git
|
|
31
|
+
cd caws
|
|
10
32
|
|
|
11
|
-
# Install
|
|
12
|
-
npm install
|
|
33
|
+
# Install dependencies
|
|
34
|
+
npm install
|
|
35
|
+
|
|
36
|
+
# Build all packages
|
|
37
|
+
npm run build
|
|
13
38
|
|
|
14
|
-
#
|
|
15
|
-
|
|
16
|
-
npm install -g .
|
|
39
|
+
# Use locally
|
|
40
|
+
node packages/caws-cli/dist/index.js --help
|
|
17
41
|
```
|
|
18
42
|
|
|
19
|
-
##
|
|
43
|
+
## Core Commands
|
|
44
|
+
|
|
45
|
+
### Project Management
|
|
20
46
|
|
|
21
|
-
### Initialize New Project
|
|
22
47
|
```bash
|
|
23
|
-
#
|
|
24
|
-
caws init my-
|
|
48
|
+
# Initialize a new CAWS project
|
|
49
|
+
caws init my-project
|
|
50
|
+
|
|
51
|
+
# Add CAWS to existing project
|
|
52
|
+
caws scaffold
|
|
25
53
|
|
|
26
|
-
#
|
|
27
|
-
caws
|
|
54
|
+
# Validate working specification
|
|
55
|
+
caws validate
|
|
28
56
|
|
|
29
|
-
#
|
|
30
|
-
caws
|
|
57
|
+
# Get help
|
|
58
|
+
caws --help
|
|
31
59
|
```
|
|
32
60
|
|
|
33
|
-
###
|
|
61
|
+
### Agent Integration
|
|
62
|
+
|
|
34
63
|
```bash
|
|
35
|
-
#
|
|
36
|
-
caws
|
|
64
|
+
# Evaluate work quality (JSON output for agents)
|
|
65
|
+
caws agent evaluate .caws/working-spec.yaml
|
|
37
66
|
|
|
38
|
-
#
|
|
39
|
-
caws
|
|
67
|
+
# Get iterative development guidance
|
|
68
|
+
caws agent iterate --current-state "Started implementation" .caws/working-spec.yaml
|
|
40
69
|
```
|
|
41
70
|
|
|
42
|
-
###
|
|
71
|
+
### Waiver Management
|
|
72
|
+
|
|
43
73
|
```bash
|
|
44
|
-
|
|
45
|
-
caws
|
|
74
|
+
# Create a waiver for exceptional circumstances
|
|
75
|
+
caws waivers create \
|
|
76
|
+
--title "Emergency security fix" \
|
|
77
|
+
--reason emergency_hotfix \
|
|
78
|
+
--gates coverage_threshold \
|
|
79
|
+
--expires-at "2025-11-01T00:00:00Z" \
|
|
80
|
+
--approved-by "security-team"
|
|
81
|
+
|
|
82
|
+
# List active waivers
|
|
83
|
+
caws waivers list
|
|
84
|
+
|
|
85
|
+
# Revoke a waiver
|
|
86
|
+
caws waivers revoke WV-0001
|
|
46
87
|
```
|
|
47
88
|
|
|
48
|
-
|
|
89
|
+
### CI/CD Optimization
|
|
49
90
|
|
|
50
|
-
|
|
51
|
-
|
|
91
|
+
```bash
|
|
92
|
+
# Analyze project for CI/CD optimizations
|
|
93
|
+
caws cicd analyze
|
|
94
|
+
|
|
95
|
+
# Generate optimized GitHub Actions workflow
|
|
96
|
+
caws cicd generate github --output .github/workflows/caws-gates.yml
|
|
97
|
+
|
|
98
|
+
# Smart test selection based on changes
|
|
99
|
+
caws cicd test-selection --from-commit HEAD~1
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Experimental Features
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Dry-run validation without side effects
|
|
106
|
+
caws experimental --dry-run validate .caws/working-spec.yaml
|
|
107
|
+
|
|
108
|
+
# Experimental quality gates
|
|
109
|
+
caws experimental quality-gates .caws/working-spec.yaml --parallel-execution
|
|
110
|
+
```
|
|
52
111
|
|
|
53
|
-
|
|
54
|
-
- `-i, --interactive`: Run interactive setup (default: true)
|
|
55
|
-
- `-g, --git`: Initialize git repository (default: true)
|
|
56
|
-
- `-n, --non-interactive`: Skip interactive prompts
|
|
112
|
+
### Tool Management
|
|
57
113
|
|
|
58
|
-
|
|
59
|
-
|
|
114
|
+
```bash
|
|
115
|
+
# List available CAWS tools
|
|
116
|
+
caws tools list
|
|
60
117
|
|
|
61
|
-
|
|
62
|
-
|
|
118
|
+
# Execute specific tool
|
|
119
|
+
caws tools run validate
|
|
63
120
|
|
|
64
|
-
|
|
65
|
-
|
|
121
|
+
# Manage tool configurations
|
|
122
|
+
caws tools --help
|
|
123
|
+
```
|
|
66
124
|
|
|
67
|
-
##
|
|
125
|
+
## Architecture
|
|
68
126
|
|
|
69
|
-
|
|
127
|
+
The CLI is built with a modular architecture:
|
|
70
128
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
129
|
+
```
|
|
130
|
+
caws-cli/
|
|
131
|
+
├── src/
|
|
132
|
+
│ ├── index.js # Main CLI entry point
|
|
133
|
+
│ ├── waivers-manager.js # Waiver system implementation
|
|
134
|
+
│ ├── cicd-optimizer.js # CI/CD optimization logic
|
|
135
|
+
│ └── tool-loader.js # Dynamic tool loading system
|
|
136
|
+
├── templates/ # Project templates
|
|
137
|
+
└── dist/ # Compiled output
|
|
138
|
+
```
|
|
81
139
|
|
|
82
|
-
|
|
140
|
+
### Key Components
|
|
83
141
|
|
|
84
|
-
|
|
142
|
+
- **Command Parser**: Commander.js-based CLI with subcommands
|
|
143
|
+
- **Tool System**: Dynamic loading of quality gate tools
|
|
144
|
+
- **Waiver Manager**: Fast-lane escape hatch management
|
|
145
|
+
- **CI/CD Optimizer**: Pipeline analysis and generation
|
|
146
|
+
- **Agent Interface**: JSON APIs for programmatic agent integration
|
|
147
|
+
|
|
148
|
+
## Integration with CAWS Ecosystem
|
|
149
|
+
|
|
150
|
+
### Relationship to Other Packages
|
|
85
151
|
|
|
86
152
|
```
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
│
|
|
90
|
-
|
|
91
|
-
│
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
├── .github/workflows/caws.yml # CI/CD pipeline
|
|
99
|
-
├── agents.md # CAWS framework guide
|
|
100
|
-
└── README.md # Project documentation
|
|
153
|
+
┌─────────────────┐ ┌──────────────────┐
|
|
154
|
+
│ caws-cli │────│ caws-template │
|
|
155
|
+
│ (Commands) │ │ (Tools & Config)│
|
|
156
|
+
└─────────────────┘ └──────────────────┘
|
|
157
|
+
│ │
|
|
158
|
+
└───────────────────────┘
|
|
159
|
+
│
|
|
160
|
+
┌─────────────────┐ ┌──────────────────┐
|
|
161
|
+
│ caws-mcp-server │────│ caws-vscode-ext │
|
|
162
|
+
│ (Agent Bridge) │ │ (IDE Integration)
|
|
163
|
+
└─────────────────┘ └──────────────────┘
|
|
101
164
|
```
|
|
102
165
|
|
|
103
|
-
|
|
166
|
+
- **caws-template**: Provides the tools and configurations that CLI manages
|
|
167
|
+
- **caws-mcp-server**: Exposes CLI functionality to AI agents via MCP protocol
|
|
168
|
+
- **caws-vscode-extension**: Provides IDE integration using CLI capabilities
|
|
169
|
+
|
|
170
|
+
### Quality Gates Integration
|
|
171
|
+
|
|
172
|
+
The CLI automatically executes quality gates defined in the template:
|
|
104
173
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
174
|
+
1. **Spec Validation**: Validates working specifications against schema
|
|
175
|
+
2. **Security Scanning**: Runs security checks and secret detection
|
|
176
|
+
3. **Code Quality**: Executes linting, type checking, and formatting
|
|
177
|
+
4. **Test Execution**: Runs unit, integration, and contract tests
|
|
178
|
+
5. **Performance Checks**: Validates performance budgets and metrics
|
|
179
|
+
|
|
180
|
+
### Agent Workflow Integration
|
|
181
|
+
|
|
182
|
+
The CLI provides structured APIs for agents:
|
|
183
|
+
|
|
184
|
+
```javascript
|
|
185
|
+
// Agent can evaluate work quality
|
|
186
|
+
const result = await runCommand('caws agent evaluate spec.yaml');
|
|
187
|
+
// Returns: { success: true, evaluation: { quality_score: 0.85, ... } }
|
|
188
|
+
|
|
189
|
+
// Agent can get guidance for next steps
|
|
190
|
+
const guidance = await runCommand('caws agent iterate --current-state "..." spec.yaml');
|
|
191
|
+
// Returns: { guidance: "...", next_steps: [...], confidence: 0.8 }
|
|
192
|
+
```
|
|
115
193
|
|
|
116
194
|
## Configuration
|
|
117
195
|
|
|
118
|
-
### Working
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
196
|
+
### Working Specifications
|
|
197
|
+
|
|
198
|
+
Projects use `.caws/working-spec.yaml` files:
|
|
199
|
+
|
|
200
|
+
```yaml
|
|
201
|
+
id: PROJ-001
|
|
202
|
+
title: "Feature implementation"
|
|
203
|
+
risk_tier: 2
|
|
204
|
+
mode: feature
|
|
205
|
+
change_budget:
|
|
206
|
+
max_files: 25
|
|
207
|
+
max_loc: 1000
|
|
208
|
+
acceptance:
|
|
209
|
+
- id: "A1"
|
|
210
|
+
given: "Current state"
|
|
211
|
+
when: "Feature implemented"
|
|
212
|
+
then: "Expected behavior"
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Tool Configuration
|
|
216
|
+
|
|
217
|
+
Tools are configured in `apps/tools/caws/` directory with metadata:
|
|
218
|
+
|
|
219
|
+
```javascript
|
|
220
|
+
// Tool metadata
|
|
221
|
+
{
|
|
222
|
+
id: 'validate',
|
|
223
|
+
name: 'Working Spec Validator',
|
|
224
|
+
capabilities: ['validation', 'quality-gates'],
|
|
225
|
+
version: '1.0.0'
|
|
226
|
+
}
|
|
142
227
|
```
|
|
143
228
|
|
|
144
|
-
|
|
229
|
+
## Development
|
|
230
|
+
|
|
231
|
+
### Building
|
|
232
|
+
|
|
145
233
|
```bash
|
|
146
|
-
caws
|
|
147
|
-
|
|
234
|
+
cd packages/caws-cli
|
|
235
|
+
npm run build # Compile TypeScript
|
|
236
|
+
npm run dev # Development with watch
|
|
237
|
+
npm run lint # Run ESLint
|
|
238
|
+
npm run test # Run tests
|
|
148
239
|
```
|
|
149
240
|
|
|
150
|
-
###
|
|
241
|
+
### Adding New Commands
|
|
242
|
+
|
|
243
|
+
1. Add command implementation in `src/index.js`
|
|
244
|
+
2. Update help text and option parsing
|
|
245
|
+
3. Add integration tests
|
|
246
|
+
4. Update documentation
|
|
247
|
+
|
|
248
|
+
### Tool Development
|
|
249
|
+
|
|
250
|
+
Tools follow a standardized interface:
|
|
251
|
+
|
|
252
|
+
```javascript
|
|
253
|
+
class MyTool extends BaseTool {
|
|
254
|
+
getMetadata() {
|
|
255
|
+
return {
|
|
256
|
+
id: 'my-tool',
|
|
257
|
+
name: 'My Custom Tool',
|
|
258
|
+
capabilities: ['validation'],
|
|
259
|
+
version: '1.0.0'
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
async executeImpl(parameters, context) {
|
|
264
|
+
// Tool logic here
|
|
265
|
+
return { success: true, output: result };
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
## Testing
|
|
271
|
+
|
|
272
|
+
### Test Categories
|
|
273
|
+
|
|
274
|
+
- **Unit Tests**: Individual command and component testing
|
|
275
|
+
- **Integration Tests**: End-to-end command workflows
|
|
276
|
+
- **Contract Tests**: API compatibility testing
|
|
277
|
+
- **Quality Gate Tests**: Tool execution and validation
|
|
278
|
+
|
|
279
|
+
### Running Tests
|
|
280
|
+
|
|
151
281
|
```bash
|
|
152
|
-
|
|
153
|
-
|
|
282
|
+
npm run test # All tests
|
|
283
|
+
npm run test:unit # Unit tests only
|
|
284
|
+
npm run test:integration # Integration tests
|
|
285
|
+
npm run test:contract # Contract tests
|
|
154
286
|
```
|
|
155
287
|
|
|
156
|
-
##
|
|
288
|
+
## Security
|
|
157
289
|
|
|
158
|
-
|
|
159
|
-
- **npm**: For package management
|
|
160
|
-
- **Git**: For version control (optional)
|
|
290
|
+
### Tool Validation
|
|
161
291
|
|
|
162
|
-
|
|
292
|
+
- All tools are validated against allowlists
|
|
293
|
+
- Security scanning prevents malicious tool execution
|
|
294
|
+
- Sandboxed execution environment
|
|
295
|
+
- Audit trails for all tool usage
|
|
296
|
+
|
|
297
|
+
### Waiver Security
|
|
298
|
+
|
|
299
|
+
- Waivers require explicit approval and justification
|
|
300
|
+
- Time-limited validity prevents permanent bypasses
|
|
301
|
+
- Audit logs track all waiver usage
|
|
302
|
+
- High-risk waivers trigger review processes
|
|
303
|
+
|
|
304
|
+
## Troubleshooting
|
|
163
305
|
|
|
164
|
-
###
|
|
306
|
+
### Common Issues
|
|
307
|
+
|
|
308
|
+
**Command not found**
|
|
165
309
|
```bash
|
|
166
|
-
|
|
167
|
-
npm install
|
|
168
|
-
|
|
310
|
+
# Ensure global installation
|
|
311
|
+
npm install -g @caws/cli
|
|
312
|
+
caws --version
|
|
313
|
+
|
|
314
|
+
# Or use local installation
|
|
315
|
+
node packages/caws-cli/dist/index.js --help
|
|
169
316
|
```
|
|
170
317
|
|
|
171
|
-
|
|
318
|
+
**Tool loading errors**
|
|
172
319
|
```bash
|
|
173
|
-
|
|
174
|
-
|
|
320
|
+
# Check tool directory structure
|
|
321
|
+
ls -la apps/tools/caws/
|
|
322
|
+
|
|
323
|
+
# Validate tool metadata
|
|
324
|
+
caws tools list
|
|
325
|
+
|
|
326
|
+
# Check tool permissions
|
|
327
|
+
chmod +x apps/tools/caws/*.js
|
|
175
328
|
```
|
|
176
329
|
|
|
177
|
-
|
|
330
|
+
**Validation failures**
|
|
178
331
|
```bash
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
332
|
+
# Check working spec syntax
|
|
333
|
+
caws validate --suggestions .caws/working-spec.yaml
|
|
334
|
+
|
|
335
|
+
# Auto-fix common issues
|
|
336
|
+
caws validate --auto-fix .caws/working-spec.yaml
|
|
182
337
|
```
|
|
183
338
|
|
|
184
|
-
|
|
185
|
-
The CLI includes comprehensive development tooling:
|
|
186
|
-
- **ESLint**: Code quality and consistency
|
|
187
|
-
- **Prettier**: Code formatting
|
|
188
|
-
- **Jest**: Unit testing framework
|
|
189
|
-
- **Schema Validation**: JSON Schema validation of working specs
|
|
190
|
-
- **Quality Gates**: Automated trust scoring and validation
|
|
339
|
+
## Contributing
|
|
191
340
|
|
|
192
|
-
|
|
341
|
+
### Code Standards
|
|
193
342
|
|
|
194
|
-
|
|
195
|
-
-
|
|
196
|
-
-
|
|
197
|
-
-
|
|
198
|
-
-
|
|
343
|
+
- Use async/await for asynchronous operations
|
|
344
|
+
- Provide comprehensive error handling
|
|
345
|
+
- Include detailed help text for all commands
|
|
346
|
+
- Write tests for new functionality
|
|
347
|
+
- Update documentation for API changes
|
|
199
348
|
|
|
200
|
-
|
|
349
|
+
### Pull Request Process
|
|
201
350
|
|
|
202
351
|
1. Fork the repository
|
|
203
|
-
2. Create feature branch
|
|
352
|
+
2. Create a feature branch
|
|
204
353
|
3. Add tests for new functionality
|
|
205
|
-
4. Ensure
|
|
206
|
-
5.
|
|
354
|
+
4. Ensure all tests pass
|
|
355
|
+
5. Update documentation
|
|
356
|
+
6. Submit pull request with working spec
|
|
207
357
|
|
|
208
358
|
## License
|
|
209
359
|
|
|
210
|
-
MIT - see LICENSE file
|
|
211
|
-
|
|
212
|
-
## Support
|
|
213
|
-
|
|
214
|
-
- 📖 **Documentation**: See inline help with `caws --help`
|
|
215
|
-
- 🐛 **Issues**: Report bugs or request features
|
|
216
|
-
- 🤝 **Contributing**: See contributing guidelines
|
|
360
|
+
MIT License - see main project LICENSE file.
|
|
217
361
|
|
|
218
|
-
|
|
362
|
+
## Links
|
|
219
363
|
|
|
220
|
-
**
|
|
221
|
-
**
|
|
222
|
-
**
|
|
364
|
+
- **Main Project**: https://github.com/paths-design/caws
|
|
365
|
+
- **Documentation**: https://docs.caws.dev
|
|
366
|
+
- **Issues**: https://github.com/paths-design/caws/issues
|
|
367
|
+
- **Discussions**: https://github.com/paths-design/caws/discussions
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derive budget for a working spec based on policy and waivers
|
|
3
|
+
* @param {Object} spec - Working spec object
|
|
4
|
+
* @param {string} projectRoot - Project root directory
|
|
5
|
+
* @returns {Object} Derived budget with baseline and effective limits
|
|
6
|
+
*/
|
|
7
|
+
export function deriveBudget(spec: any, projectRoot?: string): any;
|
|
8
|
+
/**
|
|
9
|
+
* Load a waiver by ID
|
|
10
|
+
* @param {string} waiverId - Waiver ID (e.g., WV-0001)
|
|
11
|
+
* @param {string} projectRoot - Project root directory
|
|
12
|
+
* @returns {Object|null} Waiver object or null if not found
|
|
13
|
+
*/
|
|
14
|
+
export function loadWaiver(waiverId: string, projectRoot: string): any | null;
|
|
15
|
+
/**
|
|
16
|
+
* Check if a waiver is currently valid
|
|
17
|
+
* @param {Object} waiver - Waiver object
|
|
18
|
+
* @returns {boolean} Whether waiver is valid and active
|
|
19
|
+
*/
|
|
20
|
+
export function isWaiverValid(waiver: any): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Check if current changes exceed derived budget
|
|
23
|
+
* @param {Object} derivedBudget - Budget from deriveBudget()
|
|
24
|
+
* @param {Object} currentStats - Current change statistics
|
|
25
|
+
* @returns {Object} Budget check result
|
|
26
|
+
*/
|
|
27
|
+
export function checkBudgetCompliance(derivedBudget: any, currentStats: any): any;
|
|
28
|
+
/**
|
|
29
|
+
* Generate burn-up report for scope visibility
|
|
30
|
+
* @param {Object} derivedBudget - Budget from deriveBudget()
|
|
31
|
+
* @param {Object} currentStats - Current change statistics
|
|
32
|
+
* @returns {string} Human-readable burn-up report
|
|
33
|
+
*/
|
|
34
|
+
export function generateBurnupReport(derivedBudget: any, currentStats: any): string;
|
|
35
|
+
//# sourceMappingURL=budget-derivation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"budget-derivation.d.ts","sourceRoot":"","sources":["../src/budget-derivation.js"],"names":[],"mappings":"AAUA;;;;;GAKG;AACH,sDAHW,MAAM,OAuDhB;AAED;;;;;GAKG;AACH,qCAJW,MAAM,eACN,MAAM,GACJ,MAAO,IAAI,CAgBvB;AAED;;;;GAIG;AACH,4CAFa,OAAO,CA4BnB;AAED;;;;;GAKG;AACH,kFA8BC;AAED;;;;;GAKG;AACH,6EAFa,MAAM,CA4BlB"}
|