@paths.design/caws-cli 4.0.0 → 4.1.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.
Files changed (76) hide show
  1. package/dist/commands/archive.d.ts +50 -0
  2. package/dist/commands/archive.d.ts.map +1 -0
  3. package/dist/commands/archive.js +353 -0
  4. package/dist/commands/iterate.d.ts.map +1 -1
  5. package/dist/commands/iterate.js +12 -13
  6. package/dist/commands/mode.d.ts +24 -0
  7. package/dist/commands/mode.d.ts.map +1 -0
  8. package/dist/commands/mode.js +259 -0
  9. package/dist/commands/plan.d.ts +49 -0
  10. package/dist/commands/plan.d.ts.map +1 -0
  11. package/dist/commands/plan.js +448 -0
  12. package/dist/commands/quality-gates.d.ts +52 -0
  13. package/dist/commands/quality-gates.d.ts.map +1 -0
  14. package/dist/commands/quality-gates.js +490 -0
  15. package/dist/commands/specs.d.ts +71 -0
  16. package/dist/commands/specs.d.ts.map +1 -0
  17. package/dist/commands/specs.js +735 -0
  18. package/dist/commands/status.d.ts +4 -3
  19. package/dist/commands/status.d.ts.map +1 -1
  20. package/dist/commands/status.js +552 -22
  21. package/dist/commands/tutorial.d.ts +55 -0
  22. package/dist/commands/tutorial.d.ts.map +1 -0
  23. package/dist/commands/tutorial.js +481 -0
  24. package/dist/commands/validate.d.ts +10 -3
  25. package/dist/commands/validate.d.ts.map +1 -1
  26. package/dist/commands/validate.js +137 -54
  27. package/dist/config/modes.d.ts +225 -0
  28. package/dist/config/modes.d.ts.map +1 -0
  29. package/dist/config/modes.js +321 -0
  30. package/dist/constants/spec-types.d.ts +41 -0
  31. package/dist/constants/spec-types.d.ts.map +1 -0
  32. package/dist/constants/spec-types.js +42 -0
  33. package/dist/index-new.d.ts +5 -0
  34. package/dist/index-new.d.ts.map +1 -0
  35. package/dist/index-new.js +317 -0
  36. package/dist/index.js +225 -10
  37. package/dist/index.js.backup +4711 -0
  38. package/dist/scaffold/git-hooks.d.ts.map +1 -1
  39. package/dist/scaffold/git-hooks.js +32 -44
  40. package/dist/scaffold/index.d.ts.map +1 -1
  41. package/dist/scaffold/index.js +19 -0
  42. package/dist/utils/quality-gates-errors.js +520 -0
  43. package/dist/utils/quality-gates.d.ts +49 -0
  44. package/dist/utils/quality-gates.d.ts.map +1 -0
  45. package/dist/utils/quality-gates.js +361 -0
  46. package/dist/utils/spec-resolver.d.ts +88 -0
  47. package/dist/utils/spec-resolver.d.ts.map +1 -0
  48. package/dist/utils/spec-resolver.js +602 -0
  49. package/package.json +6 -5
  50. package/templates/.cursor/hooks/caws-scope-guard.sh +64 -8
  51. package/templates/.cursor/hooks/validate-spec.sh +22 -12
  52. package/templates/.cursor/rules/{01-claims-verification.mdc → 00-claims-verification.mdc} +1 -1
  53. package/templates/.cursor/rules/01-working-style.mdc +50 -0
  54. package/templates/.cursor/rules/{02-testing-standards.mdc → 02-quality-gates.mdc} +84 -29
  55. package/templates/.cursor/rules/03-naming-and-refactor.mdc +33 -0
  56. package/templates/.cursor/rules/04-logging-language-style.mdc +23 -0
  57. package/templates/.cursor/rules/05-safe-defaults-guards.mdc +23 -0
  58. package/templates/.cursor/rules/06-typescript-conventions.mdc +36 -0
  59. package/templates/.cursor/rules/07-process-ops.mdc +20 -0
  60. package/templates/.cursor/rules/08-solid-and-architecture.mdc +16 -0
  61. package/templates/.cursor/rules/09-docstrings.mdc +89 -0
  62. package/templates/.cursor/rules/10-authorship-and-attribution.mdc +15 -0
  63. package/templates/.cursor/rules/11-documentation-quality-standards.mdc +390 -0
  64. package/templates/.cursor/rules/12-scope-management-waivers.mdc +385 -0
  65. package/templates/.cursor/rules/13-implementation-completeness.mdc +516 -0
  66. package/templates/.cursor/rules/14-language-agnostic-standards.mdc +588 -0
  67. package/templates/.cursor/rules/15-sophisticated-todo-detection.mdc +425 -0
  68. package/templates/.cursor/rules/README.md +93 -7
  69. package/templates/apps/tools/caws/prompt-lint.js.backup +274 -0
  70. package/templates/apps/tools/caws/provenance.js.backup +73 -0
  71. package/templates/scripts/quality-gates/check-god-objects.js +146 -0
  72. package/templates/scripts/quality-gates/run-quality-gates.js +50 -0
  73. package/templates/scripts/v3/analysis/todo_analyzer.py +1950 -0
  74. package/templates/.cursor/rules/03-infrastructure-standards.mdc +0 -251
  75. package/templates/.cursor/rules/04-documentation-integrity.mdc +0 -291
  76. package/templates/.cursor/rules/05-production-readiness-checklist.mdc +0 -214
@@ -1,214 +0,0 @@
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%+.**