@paths.design/caws-cli 7.0.2 → 7.0.3

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 (117) hide show
  1. package/dist/budget-derivation.js +5 -4
  2. package/dist/commands/diagnose.js +24 -19
  3. package/dist/commands/init.js +51 -4
  4. package/dist/commands/specs.js +40 -1
  5. package/dist/commands/status.js +2 -2
  6. package/dist/commands/tool.js +2 -3
  7. package/dist/config/index.js +17 -8
  8. package/dist/generators/working-spec.js +19 -6
  9. package/dist/scaffold/git-hooks.js +127 -29
  10. package/dist/scaffold/index.js +53 -7
  11. package/dist/templates/.caws/tools/README.md +20 -0
  12. package/dist/templates/.cursor/README.md +311 -0
  13. package/dist/templates/.cursor/hooks/audit.sh +55 -0
  14. package/dist/templates/.cursor/hooks/block-dangerous.sh +83 -0
  15. package/dist/templates/.cursor/hooks/caws-quality-check.sh +52 -0
  16. package/dist/templates/.cursor/hooks/caws-scope-guard.sh +130 -0
  17. package/dist/templates/.cursor/hooks/caws-tool-validation.sh +121 -0
  18. package/dist/templates/.cursor/hooks/format.sh +38 -0
  19. package/dist/templates/.cursor/hooks/naming-check.sh +64 -0
  20. package/dist/templates/.cursor/hooks/scan-secrets.sh +46 -0
  21. package/dist/templates/.cursor/hooks/scope-guard.sh +52 -0
  22. package/dist/templates/.cursor/hooks/validate-spec.sh +83 -0
  23. package/dist/templates/.cursor/hooks.json +59 -0
  24. package/dist/templates/.cursor/rules/00-claims-verification.mdc +144 -0
  25. package/dist/templates/.cursor/rules/01-working-style.mdc +50 -0
  26. package/dist/templates/.cursor/rules/02-quality-gates.mdc +370 -0
  27. package/dist/templates/.cursor/rules/03-naming-and-refactor.mdc +33 -0
  28. package/dist/templates/.cursor/rules/04-logging-language-style.mdc +23 -0
  29. package/dist/templates/.cursor/rules/05-safe-defaults-guards.mdc +23 -0
  30. package/dist/templates/.cursor/rules/06-typescript-conventions.mdc +36 -0
  31. package/dist/templates/.cursor/rules/07-process-ops.mdc +20 -0
  32. package/dist/templates/.cursor/rules/08-solid-and-architecture.mdc +16 -0
  33. package/dist/templates/.cursor/rules/09-docstrings.mdc +89 -0
  34. package/dist/templates/.cursor/rules/10-documentation-quality-standards.mdc +390 -0
  35. package/dist/templates/.cursor/rules/11-scope-management-waivers.mdc +385 -0
  36. package/dist/templates/.cursor/rules/12-implementation-completeness.mdc +516 -0
  37. package/dist/templates/.cursor/rules/13-language-agnostic-standards.mdc +588 -0
  38. package/dist/templates/.cursor/rules/README.md +148 -0
  39. package/dist/templates/.github/copilot/instructions.md +311 -0
  40. package/dist/templates/.idea/runConfigurations/CAWS_Evaluate.xml +5 -0
  41. package/dist/templates/.idea/runConfigurations/CAWS_Validate.xml +5 -0
  42. package/dist/templates/.vscode/launch.json +56 -0
  43. package/dist/templates/.vscode/settings.json +93 -0
  44. package/dist/templates/.windsurf/workflows/caws-guided-development.md +92 -0
  45. package/dist/templates/COMMIT_CONVENTIONS.md +86 -0
  46. package/dist/templates/OIDC_SETUP.md +300 -0
  47. package/dist/templates/agents.md +1047 -0
  48. package/dist/templates/codemod/README.md +1 -0
  49. package/dist/templates/codemod/test.js +93 -0
  50. package/dist/templates/docs/README.md +150 -0
  51. package/dist/templates/scripts/quality-gates/check-god-objects.js +146 -0
  52. package/dist/templates/scripts/quality-gates/run-quality-gates.js +50 -0
  53. package/dist/templates/scripts/v3/analysis/todo_analyzer.py +1997 -0
  54. package/dist/tool-loader.js +6 -1
  55. package/dist/tool-validator.js +8 -2
  56. package/dist/utils/detection.js +4 -3
  57. package/dist/utils/git-lock.js +118 -0
  58. package/dist/utils/gitignore-updater.js +148 -0
  59. package/dist/utils/quality-gates.js +47 -7
  60. package/dist/utils/spec-resolver.js +23 -3
  61. package/dist/utils/yaml-validation.js +155 -0
  62. package/dist/validation/spec-validation.js +81 -2
  63. package/package.json +2 -2
  64. package/templates/.caws/schemas/waivers.schema.json +30 -0
  65. package/templates/.caws/schemas/working-spec.schema.json +133 -0
  66. package/templates/.caws/templates/working-spec.template.yml +74 -0
  67. package/templates/.caws/tools/README.md +20 -0
  68. package/templates/.caws/tools/scope-guard.js +208 -0
  69. package/templates/.caws/tools-allow.json +331 -0
  70. package/templates/.caws/waivers.yml +19 -0
  71. package/templates/.cursor/hooks/scope-guard.sh +2 -2
  72. package/templates/.cursor/hooks/validate-spec.sh +42 -7
  73. package/templates/apps/tools/caws/COMPLETION_REPORT.md +0 -331
  74. package/templates/apps/tools/caws/MIGRATION_SUMMARY.md +0 -360
  75. package/templates/apps/tools/caws/README.md +0 -463
  76. package/templates/apps/tools/caws/TEST_STATUS.md +0 -365
  77. package/templates/apps/tools/caws/attest.js +0 -357
  78. package/templates/apps/tools/caws/ci-optimizer.js +0 -642
  79. package/templates/apps/tools/caws/config.ts +0 -245
  80. package/templates/apps/tools/caws/cross-functional.js +0 -876
  81. package/templates/apps/tools/caws/dashboard.js +0 -1112
  82. package/templates/apps/tools/caws/flake-detector.ts +0 -362
  83. package/templates/apps/tools/caws/gates.js +0 -198
  84. package/templates/apps/tools/caws/gates.ts +0 -271
  85. package/templates/apps/tools/caws/language-adapters.ts +0 -381
  86. package/templates/apps/tools/caws/language-support.d.ts +0 -367
  87. package/templates/apps/tools/caws/language-support.d.ts.map +0 -1
  88. package/templates/apps/tools/caws/language-support.js +0 -585
  89. package/templates/apps/tools/caws/legacy-assessment.ts +0 -408
  90. package/templates/apps/tools/caws/legacy-assessor.js +0 -764
  91. package/templates/apps/tools/caws/mutant-analyzer.js +0 -734
  92. package/templates/apps/tools/caws/perf-budgets.ts +0 -349
  93. package/templates/apps/tools/caws/prompt-lint.js.backup +0 -274
  94. package/templates/apps/tools/caws/property-testing.js +0 -707
  95. package/templates/apps/tools/caws/provenance.d.ts +0 -14
  96. package/templates/apps/tools/caws/provenance.d.ts.map +0 -1
  97. package/templates/apps/tools/caws/provenance.js +0 -132
  98. package/templates/apps/tools/caws/provenance.js.backup +0 -73
  99. package/templates/apps/tools/caws/provenance.ts +0 -211
  100. package/templates/apps/tools/caws/security-provenance.ts +0 -483
  101. package/templates/apps/tools/caws/shared/base-tool.ts +0 -281
  102. package/templates/apps/tools/caws/shared/config-manager.ts +0 -366
  103. package/templates/apps/tools/caws/shared/gate-checker.ts +0 -849
  104. package/templates/apps/tools/caws/shared/types.ts +0 -444
  105. package/templates/apps/tools/caws/shared/validator.ts +0 -305
  106. package/templates/apps/tools/caws/shared/waivers-manager.ts +0 -174
  107. package/templates/apps/tools/caws/spec-test-mapper.ts +0 -391
  108. package/templates/apps/tools/caws/test-quality.js +0 -578
  109. package/templates/apps/tools/caws/validate.js +0 -76
  110. package/templates/apps/tools/caws/validate.ts +0 -228
  111. package/templates/apps/tools/caws/waivers.js +0 -344
  112. /package/{templates/apps/tools/caws → dist/templates/.caws}/schemas/waivers.schema.json +0 -0
  113. /package/{templates/apps/tools/caws → dist/templates/.caws}/schemas/working-spec.schema.json +0 -0
  114. /package/{templates/apps/tools/caws → dist/templates/.caws}/templates/working-spec.template.yml +0 -0
  115. /package/{templates/apps/tools/caws → dist/templates/.caws/tools}/scope-guard.js +0 -0
  116. /package/{templates/apps/tools/caws → dist/templates/.caws}/tools-allow.json +0 -0
  117. /package/{templates/apps/tools/caws → dist/templates/.caws}/waivers.yml +0 -0
@@ -0,0 +1,148 @@
1
+ # Cursor Rules for CAWS Projects
2
+
3
+ This directory contains modular rule files that Cursor uses to guide development in CAWS projects.
4
+
5
+ ## Rule Files
6
+
7
+ ### Always Applied (Core Governance)
8
+
9
+ - `00-claims-verification.mdc` - Production readiness claims require rigorous verification
10
+ - `01-working-style.mdc` - Default agent behavior, edit style, and risk limits
11
+ - `02-quality-gates.mdc` - Comprehensive testing standards and verification requirements
12
+ - `03-infrastructure-standards.mdc` - Infrastructure, deployment, and operational standards
13
+ - `03-naming-and-refactor.mdc` - Canonical naming enforcement and refactor strategies
14
+ - `04-documentation-integrity.mdc` - Documentation must match implementation reality
15
+ - `05-production-readiness-checklist.mdc` - Quick reference checklist for production readiness
16
+ - `05-safe-defaults-guards.mdc` - Safe defaults, guard clauses, and early returns
17
+ - `06-typescript-conventions.mdc` - TypeScript/JS conventions and best practices
18
+ - `07-process-ops.mdc` - Process discipline and server management
19
+ - `08-solid-and-architecture.mdc` - SOLID principles and architectural patterns
20
+ - `09-docstrings.mdc` - Language-specific docstring formats, standards, and file headers
21
+ - `10-documentation-quality-standards.mdc` - Engineering-grade documentation standards
22
+ - `11-scope-management-waivers.mdc` - Scope management, change budgets, and emergency waiver procedures
23
+ - `12-implementation-completeness.mdc` - Anti-fake implementation guardrails with sophisticated TODO detection
24
+ - `13-language-agnostic-standards.mdc` - Universal engineering standards (conditional - applies to code files only)
25
+
26
+ ## How MDC Works
27
+
28
+ Each `.mdc` file has frontmatter that controls when it applies:
29
+
30
+ ```yaml
31
+ ---
32
+ description: Brief description of the rule
33
+ globs:
34
+ alwaysApply: true
35
+ ---
36
+ ```
37
+
38
+ - **alwaysApply: true** - Rule is always active
39
+ - **globs: [...]** - Rule auto-attaches when editing matching files
40
+
41
+ ## CAWS Quality Standards
42
+
43
+ These rules enforce CAWS quality tiers:
44
+
45
+ | Tier | Coverage | Mutation | Use Case |
46
+ | --------- | -------- | -------- | --------------------------- |
47
+ | 🔴 **T1** | 90%+ | 70%+ | Auth, billing, migrations |
48
+ | 🟡 **T2** | 80%+ | 50%+ | Features, APIs, data writes |
49
+ | 🟢 **T3** | 70%+ | 30%+ | UI, internal tools |
50
+
51
+ ## Comprehensive Coverage Areas
52
+
53
+ ### Core Engineering Standards
54
+
55
+ - **Production Readiness**: Rigorous verification requirements with evidence-based claims and accountability measures
56
+ - **Testing Standards**: Complete testing pyramid (unit/integration/E2E) with coverage thresholds and quality gates
57
+ - **Infrastructure**: Database, API, security, monitoring, deployment, and operational standards
58
+ - **Documentation**: Engineering-grade content with reality alignment verification and prohibited patterns
59
+
60
+ ### Advanced Quality Controls
61
+
62
+ - **Scope Management**: Change budget enforcement with emergency waiver procedures and critical fix protocols
63
+ - **Implementation Completeness**: Anti-fake implementation guardrails with sophisticated TODO detection
64
+ - **Language-Agnostic Standards**: Universal patterns across all programming languages with complexity metrics
65
+ - **Duplication Prevention**: Canonical naming enforcement and refactor strategies (merge-then-delete)
66
+
67
+ ### Development Workflow Standards
68
+
69
+ - **Working Style**: Risk-based edit principles with targeted edit plans for complex changes
70
+ - **Quality Gates**: Execution discipline, commit hygiene, and automated enforcement
71
+ - **Safe Defaults**: Guard clauses, early returns, and defensive programming patterns
72
+ - **Process Operations**: Server management, hung command handling, and development discipline
73
+
74
+ ### Code Quality & Architecture
75
+
76
+ - **SOLID Principles**: Single responsibility, open-closed, Liskov substitution, interface segregation, dependency inversion
77
+ - **TypeScript Conventions**: Alias imports, const preferences, and type system management
78
+ - **Documentation Standards**: Language-specific docstring formats and comprehensive API documentation
79
+ - **Authorship & Attribution**: File headers, authorship tracking, and contribution standards
80
+
81
+ ### Risk-Based Enforcement
82
+
83
+ - **Tier 1 (Critical Systems)**: 90%+ coverage, 95%+ branch, 70%+ mutation, manual review required
84
+ - **Tier 2 (Standard Features)**: 80%+ coverage, 90%+ branch, 50%+ mutation, optional review
85
+ - **Tier 3 (Low Risk)**: 70%+ coverage, 80%+ branch, 30%+ mutation, optional review
86
+
87
+ ### Integration with Existing Tooling
88
+
89
+ - **TODO Analysis**: Sophisticated detection with confidence scoring and context-aware analysis
90
+ - **CAWS Workflow**: Seamless integration with CAWS validation, testing, and quality gates
91
+ - **Automated Detection**: Ripgrep patterns for banned naming, incomplete implementations, and quality violations
92
+
93
+ ## Key Features
94
+
95
+ ### Sophisticated TODO Detection
96
+
97
+ - **Context-aware analysis** with confidence scoring (0.0-1.0)
98
+ - **Language-specific patterns** for 13+ languages including Rust, Python, JavaScript, TypeScript
99
+ - **Code stub detection** beyond just comments (detects `pass`, `...`, `NotImplementedError`, etc.)
100
+ - **Dependency resolution** for staged files with blocking analysis
101
+ - **Sophisticated exclusion patterns** to prevent false positives
102
+
103
+ ### Risk-Based Quality Gates
104
+
105
+ - **Tier 1 (Critical)**: Auth, billing, migrations - 90%+ coverage, 70%+ mutation, manual review
106
+ - **Tier 2 (Standard)**: Features, APIs, data writes - 80%+ coverage, 50%+ mutation, optional review
107
+ - **Tier 3 (Low Risk)**: UI, internal tools - 70%+ coverage, 30%+ mutation, optional review
108
+
109
+ ### Emergency Procedures
110
+
111
+ - **Scope Management**: Change budget enforcement with automatic detection
112
+ - **Waiver System**: Structured procedures for critical fixes outside scope
113
+ - **Critical Fix Protocols**: Emergency override conditions with proper documentation
114
+
115
+ ### Anti-Pattern Prevention
116
+
117
+ - **Banned Naming**: Prevents `enhanced-*`, `new-*`, `final-*` duplicate patterns
118
+ - **Implementation Completeness**: Detects fake persistence, stub APIs, placeholder business logic
119
+ - **Documentation Reality**: Ensures documented features actually work
120
+
121
+ ## Usage
122
+
123
+ Cursor automatically loads these rules from `.cursor/rules/`. View active rules in Cursor's sidebar.
124
+
125
+ To disable a rule temporarily: Cursor Settings → Rules → Toggle specific rule
126
+
127
+ ## Integration with CAWS Workflow
128
+
129
+ These rules complement CAWS tools and existing project tooling:
130
+
131
+ - **Validation**: `caws validate` checks rule compliance and working spec validity
132
+ - **Testing**: Rules guide comprehensive testing requirements with coverage thresholds
133
+ - **Quality Gates**: Automated enforcement of standards with risk-based tiers
134
+ - **Documentation**: Ensures docs match implementation reality with engineering-grade standards
135
+ - **TODO Analysis**: Sophisticated hidden TODO detection with confidence scoring
136
+ - **Scope Management**: Change budget enforcement with emergency waiver procedures
137
+ - **Implementation Completeness**: Anti-fake implementation guardrails with stub detection
138
+
139
+ ## Continuous Improvement
140
+
141
+ Rules are regularly updated based on:
142
+
143
+ - Industry best practices
144
+ - CAWS user feedback
145
+ - Production incident analysis
146
+ - Security research and compliance updates
147
+
148
+ For questions about these rules, see the main CAWS documentation or contact the CAWS team.
@@ -0,0 +1,311 @@
1
+ # CAWS Integration Instructions for GitHub Copilot
2
+
3
+ These instructions help Copilot understand and work with CAWS (Coding Agent Workflow System) quality assurance processes.
4
+
5
+ ## Overview
6
+
7
+ CAWS provides structured quality assurance for AI-assisted development. When working on CAWS-enabled projects, follow these guidelines to maintain quality standards and leverage CAWS tools effectively.
8
+
9
+ ## CAWS Project Detection
10
+
11
+ **Check if current project uses CAWS:**
12
+ - Look for `.caws/working-spec.yaml` file
13
+ - Check for `caws` commands in package.json scripts
14
+ - Verify CAWS CLI availability: `caws --version`
15
+
16
+ ## Working with CAWS Working Specifications
17
+
18
+ **Working specs define project requirements and constraints:**
19
+
20
+ ```yaml
21
+ id: PROJ-001
22
+ title: "Feature implementation"
23
+ risk_tier: 2 # 1=Critical, 2=Standard, 3=Low risk
24
+ mode: feature # feature|refactor|fix|chore
25
+ change_budget:
26
+ max_files: 25
27
+ max_loc: 1000
28
+ scope:
29
+ in: ["src/", "tests/"]
30
+ out: ["node_modules/", "dist/"]
31
+ ```
32
+
33
+ **Always validate working specs:**
34
+ ```bash
35
+ caws validate .caws/working-spec.yaml
36
+ ```
37
+
38
+ ## Quality Assurance Workflow
39
+
40
+ ### 1. Pre-Implementation
41
+ ```
42
+ # Get CAWS guidance before starting
43
+ caws agent iterate --current-state "About to implement X"
44
+
45
+ # CAWS will provide:
46
+ # - Implementation suggestions
47
+ # - Quality requirements
48
+ # - Risk considerations
49
+ ```
50
+
51
+ ### 2. During Implementation
52
+ ```
53
+ # Regular quality checks
54
+ caws agent evaluate --quiet
55
+
56
+ # Address any issues immediately
57
+ # Create waivers only when justified
58
+ caws waivers create --reason emergency_hotfix --gates coverage_threshold
59
+ ```
60
+
61
+ ### 3. Pre-Commit Validation
62
+ ```
63
+ # Comprehensive validation before commits
64
+ caws validate
65
+ caws agent evaluate
66
+
67
+ # Fix any quality gate failures
68
+ ```
69
+
70
+ ## CAWS Quality Gates
71
+
72
+ ### Code Quality Gates
73
+ - **Linting**: ESLint, Prettier formatting
74
+ - **Type Checking**: TypeScript strict mode
75
+ - **Security**: Dependency scanning, secret detection
76
+ - **Performance**: Bundle size, runtime budgets
77
+
78
+ ### Testing Gates
79
+ - **Unit Tests**: Individual component testing
80
+ - **Integration Tests**: Component interaction
81
+ - **Contract Tests**: API contract validation
82
+ - **E2E Tests**: Full workflow testing
83
+ - **Mutation Tests**: Test effectiveness validation
84
+
85
+ ### Analysis Gates
86
+ - **Accessibility**: WCAG 2.1 AA compliance
87
+ - **Complexity**: Maintainability metrics
88
+ - **Coverage**: Test coverage thresholds
89
+
90
+ ## Waiver Management
91
+
92
+ **Create waivers only for justified exceptions:**
93
+
94
+ ```bash
95
+ # Example: Emergency security fix
96
+ caws waivers create \
97
+ --title "Critical security vulnerability fix" \
98
+ --reason emergency_hotfix \
99
+ --gates coverage_threshold,contract_tests \
100
+ --expires-at "2025-11-01T00:00:00Z" \
101
+ --approved-by "security-team" \
102
+ --impact-level critical \
103
+ --mitigation-plan "Manual testing completed, security review passed"
104
+ ```
105
+
106
+ **Waiver reasons:**
107
+ - `emergency_hotfix` - Critical production issues
108
+ - `legacy_integration` - Third-party compatibility
109
+ - `experimental_feature` - Sandbox/prototype code
110
+ - `performance_critical` - Hot path optimizations
111
+ - `infrastructure_limitation` - Platform constraints
112
+
113
+ ## Scope Management
114
+
115
+ **Respect CAWS-defined scope boundaries:**
116
+
117
+ - **In scope**: Files listed in `scope.in` - full quality requirements apply
118
+ - **Out of scope**: Files in `scope.out` - no CAWS restrictions
119
+ - **Scope warnings**: Files outside primary scope but allowed
120
+
121
+ **Check scope compliance:**
122
+ ```bash
123
+ caws validate --scope-check path/to/file.js
124
+ ```
125
+
126
+ ## Risk Tier Considerations
127
+
128
+ ### Tier 1 (Critical) - Highest Quality Standards
129
+ - 90%+ test coverage
130
+ - All security scans pass
131
+ - Performance budgets strictly enforced
132
+ - Manual review required
133
+ - Zero waivers allowed for core gates
134
+
135
+ ### Tier 2 (Standard) - Balanced Quality
136
+ - 80%+ test coverage
137
+ - Security scans pass
138
+ - Performance budgets monitored
139
+ - Peer review recommended
140
+ - Limited waivers allowed
141
+
142
+ ### Tier 3 (Low Risk) - Flexible Development
143
+ - 70%+ test coverage
144
+ - Basic security checks
145
+ - Relaxed performance budgets
146
+ - Self-review acceptable
147
+ - Waivers freely allowed
148
+
149
+ ## Common Patterns
150
+
151
+ ### Feature Development
152
+ 1. Update working spec with feature requirements
153
+ 2. Get CAWS implementation guidance
154
+ 3. Implement with regular quality checks
155
+ 4. Create comprehensive tests
156
+ 5. Validate all quality gates pass
157
+ 6. Generate provenance report
158
+
159
+ ### Bug Fixes
160
+ 1. Assess risk tier and impact
161
+ 2. Create minimal reproduction
162
+ 3. Implement fix with tests
163
+ 4. Run quality validation
164
+ 5. Create waiver if emergency fix
165
+ 6. Update working spec if scope changes
166
+
167
+ ### Refactoring
168
+ 1. Establish baseline quality metrics
169
+ 2. Create refactoring plan
170
+ 3. Implement changes incrementally
171
+ 4. Maintain test suite passing
172
+ 5. Run comprehensive validation
173
+ 6. Update documentation
174
+
175
+ ## Error Handling
176
+
177
+ ### Quality Gate Failures
178
+ ```
179
+ ❌ CAWS validation failed
180
+ ✅ Solution: Run caws validate --suggestions
181
+ ✅ Fix identified issues
182
+ ✅ Re-run validation
183
+ ```
184
+
185
+ ### Scope Violations
186
+ ```
187
+ ❌ File outside CAWS scope
188
+ ✅ Solution: Update .caws/working-spec.yaml scope
189
+ ✅ Or create waiver if justified
190
+ ```
191
+
192
+ ### Waiver Required
193
+ ```
194
+ ⚠️ High-risk change detected
195
+ ✅ Solution: caws waivers create with justification
196
+ ✅ Include mitigation plan
197
+ ✅ Get appropriate approval
198
+ ```
199
+
200
+ ## Best Practices
201
+
202
+ ### Code Quality
203
+ - Follow established patterns and conventions
204
+ - Write comprehensive tests with new code
205
+ - Maintain existing test coverage
206
+ - Address linting issues immediately
207
+
208
+ ### Documentation
209
+ - Update working specs when requirements change
210
+ - Document waiver justifications thoroughly
211
+ - Keep provenance records current
212
+ - Update API documentation for public interfaces
213
+
214
+ ### Collaboration
215
+ - Communicate waiver needs early
216
+ - Share quality gate results with team
217
+ - Review high-risk changes together
218
+ - Maintain collective code ownership
219
+
220
+ ### Performance
221
+ - Monitor performance budgets during development
222
+ - Optimize hot paths identified by CAWS
223
+ - Address performance regressions immediately
224
+ - Include performance tests for critical paths
225
+
226
+ ## Emergency Procedures
227
+
228
+ ### Production Hotfix
229
+ 1. Assess severity and business impact
230
+ 2. Create emergency waiver immediately
231
+ 3. Implement minimal fix with safety measures
232
+ 4. Add comprehensive tests post-fix
233
+ 5. Schedule follow-up quality improvements
234
+
235
+ ### Security Vulnerability
236
+ 1. Create critical waiver with security approval
237
+ 2. Implement minimal security fix
238
+ 3. Add security tests and monitoring
239
+ 4. Conduct security review
240
+ 5. Plan comprehensive fix for next release
241
+
242
+ ## Integration with Other Tools
243
+
244
+ ### Git Workflow
245
+ - Pre-commit hooks run fast CAWS checks
246
+ - Pre-push hooks run comprehensive validation
247
+ - Post-commit hooks update provenance
248
+ - Branch protection requires CAWS validation
249
+
250
+ ### CI/CD Pipeline
251
+ - Automated CAWS quality gates
252
+ - Tier-based conditional execution
253
+ - Waiver validation and auditing
254
+ - Provenance report generation
255
+
256
+ ### IDE Integration
257
+ - Real-time quality feedback
258
+ - Scope boundary enforcement
259
+ - Automatic waiver suggestions
260
+ - Quality dashboard visualization
261
+
262
+ ## Troubleshooting
263
+
264
+ ### CAWS CLI Issues
265
+ ```bash
266
+ # Check installation
267
+ caws --version
268
+
269
+ # Update to latest version
270
+ npm install -g @caws/cli@latest
271
+
272
+ # Check working spec syntax
273
+ caws validate --suggestions
274
+ ```
275
+
276
+ ### Quality Gate Failures
277
+ ```bash
278
+ # Get detailed feedback
279
+ caws agent evaluate
280
+
281
+ # Check specific gate
282
+ caws validate --gate linting
283
+
284
+ # View waiver options
285
+ caws waivers list --expiring-soon
286
+ ```
287
+
288
+ ### Performance Issues
289
+ ```bash
290
+ # Skip heavy checks for urgent fixes
291
+ caws validate --skip performance,mutation
292
+
293
+ # Run fast checks only
294
+ caws agent evaluate --quick
295
+ ```
296
+
297
+ ## Support
298
+
299
+ ### Getting Help
300
+ - Run `caws --help` for command reference
301
+ - Check `caws validate --suggestions` for specific issues
302
+ - Review working spec documentation
303
+ - Consult team CAWS guidelines
304
+
305
+ ### Common Issues
306
+ - **Working spec invalid**: Fix YAML syntax and required fields
307
+ - **Scope violations**: Update scope or create waiver
308
+ - **Quality gate failures**: Address root cause, don't just waive
309
+ - **Performance regressions**: Optimize or adjust budgets
310
+
311
+ Remember: CAWS is designed to maintain quality while enabling development velocity. Use waivers judiciously and always prioritize code quality and security.
@@ -0,0 +1,5 @@
1
+ <component name="ProjectRunConfigurationManager">
2
+ <configuration default="false" name="CAWS: Evaluate Quality" type="NodeJSConfigurationType" factoryName="Node.js" path-to-js-file="$PROJECT_DIR$/packages/caws-cli/dist/index.js" working-dir="$PROJECT_DIR$" application-parameters="agent evaluate .caws/working-spec.yaml">
3
+ <method v="2" />
4
+ </configuration>
5
+ </component>
@@ -0,0 +1,5 @@
1
+ <component name="ProjectRunConfigurationManager">
2
+ <configuration default="false" name="CAWS: Validate" type="NodeJSConfigurationType" factoryName="Node.js" path-to-js-file="$PROJECT_DIR$/packages/caws-cli/dist/index.js" working-dir="$PROJECT_DIR$" application-parameters="validate .caws/working-spec.yaml">
3
+ <method v="2" />
4
+ </configuration>
5
+ </component>
@@ -0,0 +1,56 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "name": "Run CAWS Extension",
6
+ "type": "extensionHost",
7
+ "request": "launch",
8
+ "args": ["--extensionDevelopmentPath=${workspaceFolder}/packages/caws-vscode-extension"],
9
+ "outFiles": ["${workspaceFolder}/packages/caws-vscode-extension/out/**/*.js"],
10
+ "preLaunchTask": "${workspaceFolder}/packages/caws-vscode-extension:watch"
11
+ },
12
+ {
13
+ "name": "Run CAWS Extension (Host Workspace)",
14
+ "type": "extensionHost",
15
+ "request": "launch",
16
+ "args": ["--extensionDevelopmentPath=${workspaceFolder}/packages/caws-vscode-extension", "${workspaceFolder}"],
17
+ "outFiles": ["${workspaceFolder}/packages/caws-vscode-extension/out/**/*.js"],
18
+ "preLaunchTask": "${workspaceFolder}/packages/caws-vscode-extension:watch"
19
+ },
20
+ {
21
+ "name": "Debug CAWS Extension",
22
+ "type": "node",
23
+ "request": "launch",
24
+ "program": "${workspaceFolder}/packages/caws-vscode-extension/out/extension.js",
25
+ "args": ["--inspect=6009"],
26
+ "env": {
27
+ "CAWS_DEBUG": "true"
28
+ },
29
+ "preLaunchTask": "${workspaceFolder}/packages/caws-vscode-extension:compile"
30
+ },
31
+ {
32
+ "name": "Debug MCP Server",
33
+ "type": "node",
34
+ "request": "launch",
35
+ "program": "${workspaceFolder}/packages/caws-mcp-server/index.js",
36
+ "args": [],
37
+ "env": {
38
+ "NODE_ENV": "development",
39
+ "CAWS_DEBUG": "true"
40
+ },
41
+ "console": "integratedTerminal"
42
+ },
43
+ {
44
+ "name": "Debug CAWS CLI",
45
+ "type": "node",
46
+ "request": "launch",
47
+ "program": "${workspaceFolder}/packages/caws-cli/src/index.js",
48
+ "args": ["validate", ".caws/working-spec.yaml"],
49
+ "env": {
50
+ "NODE_ENV": "development",
51
+ "CAWS_DEBUG": "true"
52
+ },
53
+ "console": "integratedTerminal"
54
+ }
55
+ ]
56
+ }
@@ -0,0 +1,93 @@
1
+ {
2
+ // CAWS VS Code Extension Settings
3
+ "caws.cli.path": "caws",
4
+ "caws.autoValidate": true,
5
+ "caws.showQualityStatus": true,
6
+ "caws.experimentalMode": false,
7
+
8
+ // General IDE settings that work well with CAWS
9
+ "editor.formatOnSave": true,
10
+ "editor.codeActionsOnSave": {
11
+ "source.fixAll.eslint": "explicit",
12
+ "source.organizeImports": "explicit"
13
+ },
14
+
15
+ // File associations for CAWS files
16
+ "files.associations": {
17
+ ".caws/working-spec.yaml": "yaml",
18
+ ".caws/waivers/*.yaml": "yaml",
19
+ "apps/tools/caws/*.js": "javascript"
20
+ },
21
+
22
+ // Exclude CAWS-generated files from search and navigation
23
+ "files.exclude": {
24
+ ".caws/cache/": true,
25
+ ".caws/waivers/review-*.md": true
26
+ },
27
+
28
+ // Search excludes for CAWS artifacts
29
+ "search.exclude": {
30
+ ".caws/cache/**": true,
31
+ "packages/*/dist/**": true,
32
+ "packages/*/node_modules/**": true
33
+ },
34
+
35
+ // CAWS-aware task definitions
36
+ "tasks": {
37
+ "version": "2.0.0",
38
+ "tasks": [
39
+ {
40
+ "label": "CAWS: Validate",
41
+ "type": "shell",
42
+ "command": "caws",
43
+ "args": ["validate"],
44
+ "group": {
45
+ "kind": "build",
46
+ "isDefault": true
47
+ },
48
+ "presentation": {
49
+ "echo": true,
50
+ "reveal": "always",
51
+ "focus": false,
52
+ "panel": "shared"
53
+ },
54
+ "problemMatcher": []
55
+ },
56
+ {
57
+ "label": "CAWS: Evaluate Quality",
58
+ "type": "shell",
59
+ "command": "caws",
60
+ "args": ["agent", "evaluate", ".caws/working-spec.yaml"],
61
+ "group": "test",
62
+ "presentation": {
63
+ "echo": true,
64
+ "reveal": "always",
65
+ "focus": false,
66
+ "panel": "shared"
67
+ }
68
+ },
69
+ {
70
+ "label": "CAWS: Create Waiver",
71
+ "type": "shell",
72
+ "command": "caws",
73
+ "args": ["waivers", "create"],
74
+ "group": "build"
75
+ }
76
+ ]
77
+ },
78
+
79
+ // Recommended extensions for CAWS development
80
+ "recommendations": [
81
+ "ms-vscode.vscode-json",
82
+ "redhat.vscode-yaml",
83
+ "ms-vscode.vscode-typescript-next",
84
+ "esbenp.prettier-vscode",
85
+ "dbaeumer.vscode-eslint"
86
+ ],
87
+
88
+ // Workspace-specific settings
89
+ "yaml.schemas": {
90
+ "./.caws/schema/working-spec.schema.json": ".caws/working-spec.yaml",
91
+ "./.caws/schema/waiver.schema.json": ".caws/waivers/*.yaml"
92
+ }
93
+ }