@paths.design/caws-cli 3.4.0 → 4.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/dist/budget-derivation.d.ts +41 -2
- package/dist/budget-derivation.d.ts.map +1 -1
- package/dist/budget-derivation.js +417 -30
- package/dist/commands/validate.d.ts +1 -0
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +105 -28
- package/dist/index.js +2 -0
- package/dist/policy/PolicyManager.d.ts +104 -0
- package/dist/policy/PolicyManager.d.ts.map +1 -0
- package/dist/policy/PolicyManager.js +399 -0
- package/dist/scaffold/cursor-hooks.d.ts.map +1 -1
- package/dist/scaffold/cursor-hooks.js +15 -0
- package/dist/scaffold/git-hooks.d.ts.map +1 -1
- package/dist/scaffold/git-hooks.js +27 -6
- package/dist/spec/SpecFileManager.d.ts +146 -0
- package/dist/spec/SpecFileManager.d.ts.map +1 -0
- package/dist/spec/SpecFileManager.js +419 -0
- package/dist/validation/spec-validation.d.ts +14 -0
- package/dist/validation/spec-validation.d.ts.map +1 -1
- package/dist/validation/spec-validation.js +225 -13
- package/package.json +1 -1
- package/templates/.cursor/rules/01-claims-verification.mdc +144 -0
- package/templates/.cursor/rules/02-testing-standards.mdc +315 -0
- package/templates/.cursor/rules/03-infrastructure-standards.mdc +251 -0
- package/templates/.cursor/rules/04-documentation-integrity.mdc +291 -0
- package/templates/.cursor/rules/05-production-readiness-checklist.mdc +214 -0
- package/templates/.cursor/rules/README.md +64 -0
- package/templates/agents.md +6 -5
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Documentation must match implementation reality - no claims of unimplemented features
|
|
3
|
+
globs:
|
|
4
|
+
alwaysApply: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Documentation Integrity & Reality Alignment
|
|
8
|
+
|
|
9
|
+
## Core Principle
|
|
10
|
+
|
|
11
|
+
**Documentation must accurately reflect implementation reality.** Never claim features exist that don't work, APIs that aren't implemented, or capabilities that are just placeholders.
|
|
12
|
+
|
|
13
|
+
## Documentation Standards
|
|
14
|
+
|
|
15
|
+
### README Accuracy
|
|
16
|
+
|
|
17
|
+
- **Feature Claims**: Only document features that are fully implemented and tested
|
|
18
|
+
- **Installation Instructions**: Must work on a clean environment
|
|
19
|
+
- **Usage Examples**: Code examples must run without errors
|
|
20
|
+
- **API Documentation**: All documented endpoints must exist and work
|
|
21
|
+
- **Prerequisites**: All required dependencies and versions listed
|
|
22
|
+
|
|
23
|
+
### API Documentation
|
|
24
|
+
|
|
25
|
+
- **Endpoint Completeness**: All documented endpoints implemented
|
|
26
|
+
- **Parameter Accuracy**: Request/response schemas match implementation
|
|
27
|
+
- **Error Responses**: Documented error codes match actual errors
|
|
28
|
+
- **Authentication**: Auth requirements match implementation
|
|
29
|
+
- **Examples**: Working code examples for all major endpoints
|
|
30
|
+
|
|
31
|
+
### Architecture Documentation
|
|
32
|
+
|
|
33
|
+
- **Component Diagrams**: Reflect actual code structure
|
|
34
|
+
- **Data Flow**: Match actual data processing paths
|
|
35
|
+
- **Integration Points**: Document real integrations, not planned ones
|
|
36
|
+
- **Deployment Architecture**: Match actual infrastructure
|
|
37
|
+
- **Scaling Strategy**: Based on implemented capabilities
|
|
38
|
+
|
|
39
|
+
## Implementation vs Documentation Verification
|
|
40
|
+
|
|
41
|
+
### Feature Claims Verification
|
|
42
|
+
|
|
43
|
+
Before documenting any feature, verify:
|
|
44
|
+
|
|
45
|
+
- [ ] Feature fully implemented (not placeholder/mock)
|
|
46
|
+
- [ ] Feature tested end-to-end
|
|
47
|
+
- [ ] Feature handles error cases
|
|
48
|
+
- [ ] Feature documented in user-facing docs
|
|
49
|
+
- [ ] Feature matches acceptance criteria
|
|
50
|
+
|
|
51
|
+
### API Documentation Verification
|
|
52
|
+
|
|
53
|
+
For every documented API:
|
|
54
|
+
|
|
55
|
+
- [ ] Endpoint exists and responds
|
|
56
|
+
- [ ] Request/response formats match docs
|
|
57
|
+
- [ ] Authentication works as documented
|
|
58
|
+
- [ ] Error handling matches documentation
|
|
59
|
+
- [ ] Rate limits implemented if documented
|
|
60
|
+
|
|
61
|
+
### Code Documentation Verification
|
|
62
|
+
|
|
63
|
+
For all public APIs:
|
|
64
|
+
|
|
65
|
+
- [ ] JSDoc/TSDoc comments accurate
|
|
66
|
+
- [ ] Parameter types match implementation
|
|
67
|
+
- [ ] Return types correct
|
|
68
|
+
- [ ] Error conditions documented
|
|
69
|
+
- [ ] Usage examples work
|
|
70
|
+
|
|
71
|
+
## Prohibited Documentation Patterns
|
|
72
|
+
|
|
73
|
+
### ❌ Feature Bloat Documentation
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
<!-- DON'T document unimplemented features -->
|
|
77
|
+
|
|
78
|
+
## Features
|
|
79
|
+
|
|
80
|
+
- ✅ User authentication
|
|
81
|
+
- ✅ Real-time notifications
|
|
82
|
+
- ✅ Advanced analytics dashboard <!-- Not implemented yet -->
|
|
83
|
+
- ✅ Machine learning recommendations <!-- Placeholder only -->
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### ❌ Vague Status Claims
|
|
87
|
+
|
|
88
|
+
```markdown
|
|
89
|
+
<!-- DON'T use ambiguous status -->
|
|
90
|
+
|
|
91
|
+
Status: Production Ready (75% complete) <!-- Confusing -->
|
|
92
|
+
Status: In Development (25% complete) <!-- Better -->
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### ❌ Outdated Examples
|
|
96
|
+
|
|
97
|
+
```javascript
|
|
98
|
+
// DON'T: Example that doesn't work
|
|
99
|
+
fetch("/api/users", {
|
|
100
|
+
method: "POST",
|
|
101
|
+
body: JSON.stringify({ name: "John" }), // Missing required email field
|
|
102
|
+
});
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### ❌ Missing Error Documentation
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
// DON'T: Undocumented error conditions
|
|
109
|
+
function processPayment(amount: number): Promise<PaymentResult> {
|
|
110
|
+
// What happens if amount < 0? Not documented
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Documentation Maintenance Standards
|
|
115
|
+
|
|
116
|
+
### Change Documentation Updates
|
|
117
|
+
|
|
118
|
+
- **Breaking Changes**: Update documentation immediately
|
|
119
|
+
- **New Features**: Document before release
|
|
120
|
+
- **API Changes**: Update API docs in same PR
|
|
121
|
+
- **Deprecations**: Mark deprecated features clearly
|
|
122
|
+
- **Migration Guides**: Provide for breaking changes
|
|
123
|
+
|
|
124
|
+
### Version Consistency
|
|
125
|
+
|
|
126
|
+
- **Changelog**: Accurate for each version
|
|
127
|
+
- **Version Numbers**: Match actual releases
|
|
128
|
+
- **Deprecation Notices**: Clear timelines and alternatives
|
|
129
|
+
- **Compatibility Matrix**: Accurate version compatibility
|
|
130
|
+
|
|
131
|
+
### Documentation Testing
|
|
132
|
+
|
|
133
|
+
- **Link Validation**: All links in docs work
|
|
134
|
+
- **Code Example Testing**: Examples tested in CI
|
|
135
|
+
- **Installation Verification**: Setup instructions tested
|
|
136
|
+
- **Cross-Platform**: Docs work on documented platforms
|
|
137
|
+
|
|
138
|
+
## Reality Alignment Checks
|
|
139
|
+
|
|
140
|
+
### Implementation Inventory
|
|
141
|
+
|
|
142
|
+
Maintain accurate inventory:
|
|
143
|
+
|
|
144
|
+
- [ ] Count actual source files vs documented components
|
|
145
|
+
- [ ] Verify test coverage matches claims
|
|
146
|
+
- [ ] Check database schema matches docs
|
|
147
|
+
- [ ] Validate configuration options exist
|
|
148
|
+
- [ ] Confirm external integrations work
|
|
149
|
+
|
|
150
|
+
### Feature Parity Audit
|
|
151
|
+
|
|
152
|
+
Regular audits to ensure:
|
|
153
|
+
|
|
154
|
+
- [ ] No documented features are missing
|
|
155
|
+
- [ ] No implemented features are undocumented
|
|
156
|
+
- [ ] No placeholder implementations documented as complete
|
|
157
|
+
- [ ] No deprecated features still documented as current
|
|
158
|
+
|
|
159
|
+
### User Experience Verification
|
|
160
|
+
|
|
161
|
+
- [ ] Onboarding works as documented
|
|
162
|
+
- [ ] Common use cases work end-to-end
|
|
163
|
+
- [ ] Error messages helpful and accurate
|
|
164
|
+
- [ ] Performance matches documented SLAs
|
|
165
|
+
|
|
166
|
+
## Correct Documentation Patterns
|
|
167
|
+
|
|
168
|
+
### ✅ Accurate Feature Status
|
|
169
|
+
|
|
170
|
+
```markdown
|
|
171
|
+
## Features
|
|
172
|
+
|
|
173
|
+
### ✅ Implemented
|
|
174
|
+
|
|
175
|
+
- User authentication with JWT tokens
|
|
176
|
+
- Real-time notifications via WebSocket
|
|
177
|
+
- Basic analytics dashboard
|
|
178
|
+
|
|
179
|
+
### 🚧 In Development
|
|
180
|
+
|
|
181
|
+
- Advanced ML recommendations (Q2 2025)
|
|
182
|
+
- Multi-tenant isolation (Q1 2025)
|
|
183
|
+
|
|
184
|
+
### 📋 Planned
|
|
185
|
+
|
|
186
|
+
- AI-powered chat support (Q3 2025)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### ✅ Working Code Examples
|
|
190
|
+
|
|
191
|
+
```javascript
|
|
192
|
+
// POST /api/users
|
|
193
|
+
const response = await fetch("/api/users", {
|
|
194
|
+
method: "POST",
|
|
195
|
+
headers: {
|
|
196
|
+
"Content-Type": "application/json",
|
|
197
|
+
Authorization: `Bearer ${token}`,
|
|
198
|
+
},
|
|
199
|
+
body: JSON.stringify({
|
|
200
|
+
name: "John Doe",
|
|
201
|
+
email: "john@example.com", // Required field included
|
|
202
|
+
password: "securePassword123",
|
|
203
|
+
}),
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
if (!response.ok) {
|
|
207
|
+
throw new Error(`Failed to create user: ${response.statusText}`);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const user = await response.json();
|
|
211
|
+
console.log("Created user:", user);
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### ✅ Complete API Documentation
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
/**
|
|
218
|
+
* Creates a new user account
|
|
219
|
+
* @param userData User registration data
|
|
220
|
+
* @returns Promise<User> The created user object
|
|
221
|
+
* @throws ValidationError if email format invalid
|
|
222
|
+
* @throws ConflictError if email already exists
|
|
223
|
+
* @throws RateLimitError if too many requests
|
|
224
|
+
*/
|
|
225
|
+
async function createUser(userData: CreateUserRequest): Promise<User> {
|
|
226
|
+
// Implementation
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### ✅ Realistic Status Claims
|
|
231
|
+
|
|
232
|
+
```markdown
|
|
233
|
+
# Project Status
|
|
234
|
+
|
|
235
|
+
**Current Status**: In Development (Proof of Concept)
|
|
236
|
+
|
|
237
|
+
**Production Readiness**: 25% - Core authentication and basic API working, but missing:
|
|
238
|
+
|
|
239
|
+
- Database persistence (in-memory only)
|
|
240
|
+
- Security hardening
|
|
241
|
+
- Comprehensive testing
|
|
242
|
+
- Production deployment pipeline
|
|
243
|
+
|
|
244
|
+
**Next Milestone**: Alpha release (Q1 2025) with full persistence layer
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## Documentation Quality Metrics
|
|
248
|
+
|
|
249
|
+
### Completeness Score
|
|
250
|
+
|
|
251
|
+
- **API Coverage**: % of public APIs documented
|
|
252
|
+
- **Feature Documentation**: % of features with user docs
|
|
253
|
+
- **Code Examples**: % of APIs with working examples
|
|
254
|
+
- **Error Documentation**: % of error conditions documented
|
|
255
|
+
|
|
256
|
+
### Accuracy Score
|
|
257
|
+
|
|
258
|
+
- **Working Examples**: % of code examples that run successfully
|
|
259
|
+
- **Link Validity**: % of documentation links that work
|
|
260
|
+
- **Version Accuracy**: % of version references that are current
|
|
261
|
+
- **Implementation Match**: % of documented features that work as described
|
|
262
|
+
|
|
263
|
+
### Maintenance Score
|
|
264
|
+
|
|
265
|
+
- **Update Frequency**: How often docs are updated vs code changes
|
|
266
|
+
- **Review Coverage**: % of doc changes that are reviewed
|
|
267
|
+
- **User Feedback**: Response time to documentation issues
|
|
268
|
+
- **Cross-Platform**: % of supported platforms with verified docs
|
|
269
|
+
|
|
270
|
+
## Enforcement Mechanisms
|
|
271
|
+
|
|
272
|
+
### Automated Checks
|
|
273
|
+
|
|
274
|
+
- **Documentation Tests**: CI runs documentation validation
|
|
275
|
+
- **Link Checking**: Automated link validation in docs
|
|
276
|
+
- **Example Testing**: Code examples executed in CI
|
|
277
|
+
- **API Contract Testing**: Docs vs implementation validation
|
|
278
|
+
|
|
279
|
+
### Review Requirements
|
|
280
|
+
|
|
281
|
+
- **Documentation Reviews**: Require review for doc changes
|
|
282
|
+
- **Implementation Reviews**: Check docs match implementation
|
|
283
|
+
- **User Testing**: Validate docs from user perspective
|
|
284
|
+
- **Cross-Functional Reviews**: Include different roles in reviews
|
|
285
|
+
|
|
286
|
+
### Accountability Measures
|
|
287
|
+
|
|
288
|
+
- **Documentation Debt**: Track unimplemented documented features
|
|
289
|
+
- **Reality Gap Metrics**: Measure docs vs implementation accuracy
|
|
290
|
+
- **User Feedback Integration**: Incorporate user-reported doc issues
|
|
291
|
+
- **Continuous Improvement**: Regular documentation quality reviews
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Quick reference checklist for production readiness verification
|
|
3
|
+
globs:
|
|
4
|
+
alwaysApply: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Production Readiness Verification Checklist
|
|
8
|
+
|
|
9
|
+
**Before claiming "production-ready", "production-grade", or similar, complete this entire checklist.**
|
|
10
|
+
|
|
11
|
+
## 🔍 Pre-Claim Verification Process
|
|
12
|
+
|
|
13
|
+
### □ Code Quality Gates
|
|
14
|
+
|
|
15
|
+
- [ ] `npm run lint` shows **zero errors** (ESLint, TypeScript, etc.)
|
|
16
|
+
- [ ] `npm run typecheck` passes with **zero TypeScript errors**
|
|
17
|
+
- [ ] No TODOs, PLACEHOLDERs, or MOCK DATA in production code (`src/`)
|
|
18
|
+
- [ ] No unused imports or dead code
|
|
19
|
+
- [ ] Code formatting consistent (Prettier/ESLint rules)
|
|
20
|
+
|
|
21
|
+
### □ Testing & Quality Assurance
|
|
22
|
+
|
|
23
|
+
- [ ] `npm test` passes **all tests** (unit, integration, e2e)
|
|
24
|
+
- [ ] **No tests skipped** in production code
|
|
25
|
+
- [ ] Coverage meets thresholds: 80%+ lines, 90%+ branches
|
|
26
|
+
- [ ] Database integration tests use **real database** (not mocked)
|
|
27
|
+
- [ ] All external API integrations tested with real endpoints
|
|
28
|
+
- [ ] Mutation testing scores: 70%+ for critical components
|
|
29
|
+
- [ ] Performance tests meet documented SLAs
|
|
30
|
+
|
|
31
|
+
### □ Infrastructure & Persistence
|
|
32
|
+
|
|
33
|
+
- [ ] **Real database persistence** implemented (not in-memory mocks)
|
|
34
|
+
- [ ] Database integration tests pass with real PostgreSQL/MySQL/etc.
|
|
35
|
+
- [ ] Migration scripts tested and working
|
|
36
|
+
- [ ] Data consistency and transaction handling verified
|
|
37
|
+
- [ ] Connection pooling configured and tested
|
|
38
|
+
- [ ] Backup and recovery procedures documented and tested
|
|
39
|
+
|
|
40
|
+
### □ Security & Reliability
|
|
41
|
+
|
|
42
|
+
- [ ] Security controls tested and validated (auth, authorization, input validation)
|
|
43
|
+
- [ ] **Zero security scan violations** (SAST, dependency scans)
|
|
44
|
+
- [ ] Circuit breakers implemented for external dependencies
|
|
45
|
+
- [ ] Graceful degradation tested under failure conditions
|
|
46
|
+
- [ ] Comprehensive logging and monitoring implemented
|
|
47
|
+
- [ ] Rate limiting and DDoS protection configured
|
|
48
|
+
|
|
49
|
+
### □ Documentation & Reality Alignment
|
|
50
|
+
|
|
51
|
+
- [ ] **Documentation matches implementation reality** (no claims of missing features)
|
|
52
|
+
- [ ] README installation instructions work on clean environment
|
|
53
|
+
- [ ] API documentation current and all endpoints functional
|
|
54
|
+
- [ ] Code examples in docs run without errors
|
|
55
|
+
- [ ] Architecture diagrams reflect actual code structure
|
|
56
|
+
- [ ] Changelog accurate and version numbers correct
|
|
57
|
+
|
|
58
|
+
### □ Deployment & Operations
|
|
59
|
+
|
|
60
|
+
- [ ] CI/CD pipeline passes all stages
|
|
61
|
+
- [ ] Deployment automation tested and working
|
|
62
|
+
- [ ] Rollback procedures documented and tested
|
|
63
|
+
- [ ] Environment configuration validated
|
|
64
|
+
- [ ] Health checks implemented and working
|
|
65
|
+
- [ ] Monitoring and alerting configured
|
|
66
|
+
|
|
67
|
+
### □ Scalability & Performance
|
|
68
|
+
|
|
69
|
+
- [ ] Load testing completed with realistic user counts
|
|
70
|
+
- [ ] Response times meet documented SLAs (P95 < defined limits)
|
|
71
|
+
- [ ] Memory usage within acceptable bounds
|
|
72
|
+
- [ ] Database query performance optimized
|
|
73
|
+
- [ ] Caching strategy implemented and tested
|
|
74
|
+
- [ ] Horizontal scaling capability verified
|
|
75
|
+
|
|
76
|
+
## 🚫 If ANY Item Is Unchecked
|
|
77
|
+
|
|
78
|
+
**DO NOT claim production readiness.** Instead use:
|
|
79
|
+
|
|
80
|
+
- ❌ **"In development"** - Active development with known issues
|
|
81
|
+
- ❌ **"Partially implemented"** - Some features working, major gaps remain
|
|
82
|
+
- ❌ **"Proof of concept"** - Core concept demonstrated, not production-viable
|
|
83
|
+
- ❌ **"Beta/Alpha release"** - Limited production use with close monitoring
|
|
84
|
+
|
|
85
|
+
## 📊 Evidence Requirements
|
|
86
|
+
|
|
87
|
+
When claiming production readiness, provide:
|
|
88
|
+
|
|
89
|
+
- [ ] Test execution results (screenshots/logs)
|
|
90
|
+
- [ ] Coverage reports showing adequate thresholds
|
|
91
|
+
- [ ] Lint results showing zero errors
|
|
92
|
+
- [ ] Security scan reports with zero violations
|
|
93
|
+
- [ ] Performance benchmark results
|
|
94
|
+
- [ ] Database connectivity and migration proofs
|
|
95
|
+
- [ ] CI/CD pipeline success evidence
|
|
96
|
+
- [ ] Deployment verification logs
|
|
97
|
+
- [ ] User acceptance testing results
|
|
98
|
+
|
|
99
|
+
## 🏆 Production-Grade Status Requirements
|
|
100
|
+
|
|
101
|
+
### Enterprise Production (Tier 1)
|
|
102
|
+
|
|
103
|
+
- [ ] 99.9%+ uptime SLA
|
|
104
|
+
- [ ] <1 second P95 API response times
|
|
105
|
+
- [ ] 95%+ test coverage across all components
|
|
106
|
+
- [ ] Zero critical security vulnerabilities
|
|
107
|
+
- [ ] Automated deployment and rollback
|
|
108
|
+
- [ ] 24/7 monitoring and incident response
|
|
109
|
+
- [ ] Multi-region deployment capability
|
|
110
|
+
- [ ] Comprehensive audit logging
|
|
111
|
+
|
|
112
|
+
### Standard Production (Tier 2)
|
|
113
|
+
|
|
114
|
+
- [ ] 99.5%+ uptime SLA
|
|
115
|
+
- [ ] <3 second P95 API response times
|
|
116
|
+
- [ ] 85%+ test coverage
|
|
117
|
+
- [ ] No high-risk security vulnerabilities
|
|
118
|
+
- [ ] Semi-automated deployment process
|
|
119
|
+
- [ ] Business hours monitoring
|
|
120
|
+
- [ ] Single-region deployment
|
|
121
|
+
- [ ] Basic audit logging
|
|
122
|
+
|
|
123
|
+
### Minimum Viable Production (Tier 3)
|
|
124
|
+
|
|
125
|
+
- [ ] 99%+ uptime SLA
|
|
126
|
+
- [ ] <10 second P95 API response times
|
|
127
|
+
- [ ] 70%+ test coverage
|
|
128
|
+
- [ ] No critical security vulnerabilities
|
|
129
|
+
- [ ] Manual deployment process
|
|
130
|
+
- [ ] Basic monitoring
|
|
131
|
+
- [ ] Single environment
|
|
132
|
+
- [ ] Error logging only
|
|
133
|
+
|
|
134
|
+
## 🔄 Continuous Verification
|
|
135
|
+
|
|
136
|
+
### Daily/Weekly Checks
|
|
137
|
+
|
|
138
|
+
- [ ] All tests still passing
|
|
139
|
+
- [ ] No new linting errors
|
|
140
|
+
- [ ] Security scans clean
|
|
141
|
+
- [ ] Performance within SLAs
|
|
142
|
+
- [ ] No breaking changes without documentation updates
|
|
143
|
+
|
|
144
|
+
### Monthly Reviews
|
|
145
|
+
|
|
146
|
+
- [ ] Dependency updates applied
|
|
147
|
+
- [ ] Security patches deployed
|
|
148
|
+
- [ ] Performance optimizations reviewed
|
|
149
|
+
- [ ] Documentation accuracy verified
|
|
150
|
+
- [ ] Backup/recovery procedures tested
|
|
151
|
+
|
|
152
|
+
### Quarterly Audits
|
|
153
|
+
|
|
154
|
+
- [ ] Full security assessment
|
|
155
|
+
- [ ] Penetration testing completed
|
|
156
|
+
- [ ] Load testing under increased capacity
|
|
157
|
+
- [ ] Disaster recovery simulation
|
|
158
|
+
- [ ] Compliance requirements verified
|
|
159
|
+
|
|
160
|
+
## ⚠️ Warning Signs of Unready Code
|
|
161
|
+
|
|
162
|
+
### Red Flags (Immediate Rejection)
|
|
163
|
+
|
|
164
|
+
- TODO comments in core business logic
|
|
165
|
+
- Console.log statements in production code
|
|
166
|
+
- Hardcoded configuration values
|
|
167
|
+
- Missing error handling in critical paths
|
|
168
|
+
- Database operations without transactions
|
|
169
|
+
- API endpoints without authentication
|
|
170
|
+
- Tests that mock the system under test
|
|
171
|
+
- Documentation claiming 100% coverage with failing tests
|
|
172
|
+
|
|
173
|
+
### Yellow Flags (Requires Investigation)
|
|
174
|
+
|
|
175
|
+
- Complex functions > 50 lines
|
|
176
|
+
- Classes with > 10 methods
|
|
177
|
+
- Files > 500 lines
|
|
178
|
+
- Test files with low coverage
|
|
179
|
+
- Dependencies without security audits
|
|
180
|
+
- Manual deployment processes
|
|
181
|
+
- Limited monitoring capabilities
|
|
182
|
+
|
|
183
|
+
### Green Flags (Positive Indicators)
|
|
184
|
+
|
|
185
|
+
- Comprehensive error handling
|
|
186
|
+
- Transaction-wrapped database operations
|
|
187
|
+
- Input validation and sanitization
|
|
188
|
+
- Automated testing and deployment
|
|
189
|
+
- Security headers and controls
|
|
190
|
+
- Performance monitoring and alerting
|
|
191
|
+
- Clear separation of concerns
|
|
192
|
+
- Well-documented APIs and contracts
|
|
193
|
+
|
|
194
|
+
## 📋 Quick Assessment Matrix
|
|
195
|
+
|
|
196
|
+
| Category | Question | Points | Max |
|
|
197
|
+
| -------------- | ------------------------------------------ | -------- | ------ |
|
|
198
|
+
| Code Quality | Zero linting errors? | 0-10 | 10 |
|
|
199
|
+
| Testing | All tests pass + coverage >80%? | 0-15 | 15 |
|
|
200
|
+
| Security | Security scans pass + controls tested? | 0-15 | 15 |
|
|
201
|
+
| Infrastructure | Real database + migrations + monitoring? | 0-15 | 15 |
|
|
202
|
+
| Documentation | Matches implementation + working examples? | 0-10 | 10 |
|
|
203
|
+
| Deployment | Automated CI/CD + rollback capability? | 0-10 | 10 |
|
|
204
|
+
| Performance | Meets SLAs + load tested? | 0-10 | 10 |
|
|
205
|
+
| **TOTAL** | | **0-85** | **85** |
|
|
206
|
+
|
|
207
|
+
### Scoring Guide
|
|
208
|
+
|
|
209
|
+
- **70-85 points**: Production-ready (Tier 1)
|
|
210
|
+
- **50-69 points**: Production-viable (Tier 2)
|
|
211
|
+
- **30-49 points**: Minimum viable production (Tier 3)
|
|
212
|
+
- **0-29 points**: Not production-ready
|
|
213
|
+
|
|
214
|
+
**Only claim production readiness if scoring 50+ points with all critical categories (Testing, Security, Infrastructure) at 80%+.**
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
- `01-claims-verification.mdc` - Production readiness claims require verification
|
|
10
|
+
- `02-testing-standards.mdc` - Comprehensive testing standards and verification
|
|
11
|
+
- `03-infrastructure-standards.mdc` - Infrastructure, deployment, and operational standards
|
|
12
|
+
- `04-documentation-integrity.mdc` - Documentation must match implementation reality
|
|
13
|
+
- `05-production-readiness-checklist.mdc` - Quick reference checklist for production readiness
|
|
14
|
+
|
|
15
|
+
## How MDC Works
|
|
16
|
+
|
|
17
|
+
Each `.mdc` file has frontmatter that controls when it applies:
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
---
|
|
21
|
+
description: Brief description of the rule
|
|
22
|
+
globs:
|
|
23
|
+
alwaysApply: true
|
|
24
|
+
---
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
- **alwaysApply: true** - Rule is always active
|
|
28
|
+
- **globs: [...]** - Rule auto-attaches when editing matching files
|
|
29
|
+
|
|
30
|
+
## CAWS Quality Standards
|
|
31
|
+
|
|
32
|
+
These rules enforce CAWS quality tiers:
|
|
33
|
+
|
|
34
|
+
| Tier | Coverage | Mutation | Use Case |
|
|
35
|
+
| --------- | -------- | -------- | --------------------------- |
|
|
36
|
+
| 🔴 **T1** | 90%+ | 70%+ | Auth, billing, migrations |
|
|
37
|
+
| 🟡 **T2** | 80%+ | 50%+ | Features, APIs, data writes |
|
|
38
|
+
| 🟢 **T3** | 70%+ | 30%+ | UI, internal tools |
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
Cursor automatically loads these rules from `.cursor/rules/`. View active rules in Cursor's sidebar.
|
|
43
|
+
|
|
44
|
+
To disable a rule temporarily: Cursor Settings → Rules → Toggle specific rule
|
|
45
|
+
|
|
46
|
+
## Integration with CAWS Workflow
|
|
47
|
+
|
|
48
|
+
These rules complement CAWS tools:
|
|
49
|
+
|
|
50
|
+
- **Validation**: `caws validate` checks rule compliance
|
|
51
|
+
- **Testing**: Rules guide comprehensive testing requirements
|
|
52
|
+
- **Quality Gates**: Automated enforcement of standards
|
|
53
|
+
- **Documentation**: Ensures docs match implementation reality
|
|
54
|
+
|
|
55
|
+
## Continuous Improvement
|
|
56
|
+
|
|
57
|
+
Rules are regularly updated based on:
|
|
58
|
+
|
|
59
|
+
- Industry best practices
|
|
60
|
+
- CAWS user feedback
|
|
61
|
+
- Production incident analysis
|
|
62
|
+
- Security research and compliance updates
|
|
63
|
+
|
|
64
|
+
For questions about these rules, see the main CAWS documentation or contact the CAWS team.
|
package/templates/agents.md
CHANGED
|
@@ -776,11 +776,11 @@ Real-time quality enforcement:
|
|
|
776
776
|
### Disabling Temporarily
|
|
777
777
|
|
|
778
778
|
```bash
|
|
779
|
-
# If you need to bypass hooks temporarily
|
|
780
|
-
|
|
779
|
+
# If you need to bypass commit hooks temporarily
|
|
780
|
+
git commit --no-verify # Allowed for commits
|
|
781
781
|
|
|
782
|
-
# Note: --no-verify is
|
|
783
|
-
#
|
|
782
|
+
# Note: --no-verify is BLOCKED for git push
|
|
783
|
+
# Push operations must pass all quality gates
|
|
784
784
|
```
|
|
785
785
|
|
|
786
786
|
---
|
|
@@ -972,11 +972,12 @@ Only increase budget with human approval and strong justification.
|
|
|
972
972
|
|
|
973
973
|
### Q: What if lints fail but I think they're wrong?
|
|
974
974
|
|
|
975
|
-
**A: Fix the lints.**
|
|
975
|
+
**A: Fix the lints.** You can use `git commit --no-verify` to commit temporarily, but you cannot push without fixing. If the lint rule is incorrect:
|
|
976
976
|
|
|
977
977
|
1. Fix the code to satisfy the lint
|
|
978
978
|
2. Or request human discussion of the lint rule
|
|
979
979
|
3. Human can update lint config if appropriate
|
|
980
|
+
4. Note: `git push --no-verify` is BLOCKED
|
|
980
981
|
|
|
981
982
|
### Q: Can I commit without updating provenance?
|
|
982
983
|
|