@paths.design/caws-cli 7.0.2 → 8.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.
Files changed (217) 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/quality-gates.js +147 -9
  5. package/dist/commands/specs.js +148 -14
  6. package/dist/commands/status.js +2 -2
  7. package/dist/commands/tool.js +2 -4
  8. package/dist/config/index.js +17 -8
  9. package/dist/generators/working-spec.js +19 -6
  10. package/dist/scaffold/git-hooks.js +245 -46
  11. package/dist/scaffold/index.js +53 -7
  12. package/dist/templates/.caws/tools/README.md +21 -0
  13. package/dist/templates/.cursor/README.md +311 -0
  14. package/dist/templates/.cursor/hooks/audit.sh +55 -0
  15. package/dist/templates/.cursor/hooks/block-dangerous.sh +83 -0
  16. package/dist/templates/.cursor/hooks/caws-quality-check.sh +52 -0
  17. package/dist/templates/.cursor/hooks/caws-scope-guard.sh +130 -0
  18. package/dist/templates/.cursor/hooks/caws-tool-validation.sh +121 -0
  19. package/dist/templates/.cursor/hooks/format.sh +38 -0
  20. package/dist/templates/.cursor/hooks/naming-check.sh +64 -0
  21. package/dist/templates/.cursor/hooks/scan-secrets.sh +46 -0
  22. package/dist/templates/.cursor/hooks/scope-guard.sh +52 -0
  23. package/dist/templates/.cursor/hooks/validate-spec.sh +83 -0
  24. package/dist/templates/.cursor/hooks.json +59 -0
  25. package/dist/templates/.cursor/rules/00-claims-verification.mdc +144 -0
  26. package/dist/templates/.cursor/rules/01-working-style.mdc +50 -0
  27. package/dist/templates/.cursor/rules/02-quality-gates.mdc +370 -0
  28. package/dist/templates/.cursor/rules/03-naming-and-refactor.mdc +33 -0
  29. package/dist/templates/.cursor/rules/04-logging-language-style.mdc +23 -0
  30. package/dist/templates/.cursor/rules/05-safe-defaults-guards.mdc +23 -0
  31. package/dist/templates/.cursor/rules/06-typescript-conventions.mdc +36 -0
  32. package/dist/templates/.cursor/rules/07-process-ops.mdc +20 -0
  33. package/dist/templates/.cursor/rules/08-solid-and-architecture.mdc +16 -0
  34. package/dist/templates/.cursor/rules/09-docstrings.mdc +89 -0
  35. package/dist/templates/.cursor/rules/10-documentation-quality-standards.mdc +390 -0
  36. package/dist/templates/.cursor/rules/11-scope-management-waivers.mdc +385 -0
  37. package/dist/templates/.cursor/rules/12-implementation-completeness.mdc +516 -0
  38. package/dist/templates/.cursor/rules/13-language-agnostic-standards.mdc +588 -0
  39. package/dist/templates/.cursor/rules/README.md +148 -0
  40. package/dist/templates/.github/copilot/instructions.md +311 -0
  41. package/dist/templates/.idea/runConfigurations/CAWS_Evaluate.xml +5 -0
  42. package/dist/templates/.idea/runConfigurations/CAWS_Validate.xml +5 -0
  43. package/dist/templates/.vscode/launch.json +56 -0
  44. package/dist/templates/.vscode/settings.json +93 -0
  45. package/dist/templates/.windsurf/workflows/caws-guided-development.md +92 -0
  46. package/dist/templates/COMMIT_CONVENTIONS.md +86 -0
  47. package/dist/templates/OIDC_SETUP.md +300 -0
  48. package/dist/templates/agents.md +1047 -0
  49. package/dist/templates/codemod/README.md +1 -0
  50. package/dist/templates/codemod/test.js +93 -0
  51. package/dist/templates/docs/README.md +150 -0
  52. package/dist/templates/scripts/quality-gates/check-god-objects.js +146 -0
  53. package/dist/templates/scripts/quality-gates/run-quality-gates.js +50 -0
  54. package/dist/templates/scripts/v3/analysis/todo_analyzer.py +1997 -0
  55. package/dist/tool-loader.js +6 -1
  56. package/dist/tool-validator.js +8 -2
  57. package/dist/utils/detection.js +4 -3
  58. package/dist/utils/git-lock.js +119 -0
  59. package/dist/utils/gitignore-updater.js +148 -0
  60. package/dist/utils/project-analysis.js +176 -16
  61. package/dist/utils/quality-gates.js +48 -7
  62. package/dist/utils/spec-resolver.js +27 -3
  63. package/dist/utils/yaml-validation.js +156 -0
  64. package/dist/validation/spec-validation.js +81 -2
  65. package/package.json +2 -2
  66. package/templates/.caws/schemas/waivers.schema.json +30 -0
  67. package/templates/.caws/schemas/working-spec.schema.json +133 -0
  68. package/templates/.caws/templates/working-spec.template.yml +74 -0
  69. package/templates/.caws/tools/README.md +21 -0
  70. package/templates/.caws/tools/scope-guard.js +208 -0
  71. package/templates/.caws/tools-allow.json +331 -0
  72. package/templates/.caws/waivers.yml +19 -0
  73. package/templates/.cursor/hooks/scope-guard.sh +2 -2
  74. package/templates/.cursor/hooks/validate-spec.sh +42 -7
  75. package/dist/budget-derivation.d.ts +0 -74
  76. package/dist/budget-derivation.d.ts.map +0 -1
  77. package/dist/cicd-optimizer.d.ts +0 -142
  78. package/dist/cicd-optimizer.d.ts.map +0 -1
  79. package/dist/commands/archive.d.ts +0 -50
  80. package/dist/commands/archive.d.ts.map +0 -1
  81. package/dist/commands/burnup.d.ts +0 -6
  82. package/dist/commands/burnup.d.ts.map +0 -1
  83. package/dist/commands/diagnose.d.ts +0 -52
  84. package/dist/commands/diagnose.d.ts.map +0 -1
  85. package/dist/commands/evaluate.d.ts +0 -8
  86. package/dist/commands/evaluate.d.ts.map +0 -1
  87. package/dist/commands/init.d.ts +0 -5
  88. package/dist/commands/init.d.ts.map +0 -1
  89. package/dist/commands/iterate.d.ts +0 -8
  90. package/dist/commands/iterate.d.ts.map +0 -1
  91. package/dist/commands/mode.d.ts +0 -24
  92. package/dist/commands/mode.d.ts.map +0 -1
  93. package/dist/commands/plan.d.ts +0 -49
  94. package/dist/commands/plan.d.ts.map +0 -1
  95. package/dist/commands/provenance.d.ts +0 -32
  96. package/dist/commands/provenance.d.ts.map +0 -1
  97. package/dist/commands/quality-gates.d.ts +0 -52
  98. package/dist/commands/quality-gates.d.ts.map +0 -1
  99. package/dist/commands/quality-monitor.d.ts +0 -17
  100. package/dist/commands/quality-monitor.d.ts.map +0 -1
  101. package/dist/commands/specs.d.ts +0 -71
  102. package/dist/commands/specs.d.ts.map +0 -1
  103. package/dist/commands/status.d.ts +0 -44
  104. package/dist/commands/status.d.ts.map +0 -1
  105. package/dist/commands/templates.d.ts +0 -74
  106. package/dist/commands/templates.d.ts.map +0 -1
  107. package/dist/commands/tool.d.ts +0 -13
  108. package/dist/commands/tool.d.ts.map +0 -1
  109. package/dist/commands/troubleshoot.d.ts +0 -8
  110. package/dist/commands/troubleshoot.d.ts.map +0 -1
  111. package/dist/commands/tutorial.d.ts +0 -55
  112. package/dist/commands/tutorial.d.ts.map +0 -1
  113. package/dist/commands/validate.d.ts +0 -15
  114. package/dist/commands/validate.d.ts.map +0 -1
  115. package/dist/commands/waivers.d.ts +0 -8
  116. package/dist/commands/waivers.d.ts.map +0 -1
  117. package/dist/commands/workflow.d.ts +0 -85
  118. package/dist/commands/workflow.d.ts.map +0 -1
  119. package/dist/config/index.d.ts +0 -29
  120. package/dist/config/index.d.ts.map +0 -1
  121. package/dist/config/modes.d.ts +0 -225
  122. package/dist/config/modes.d.ts.map +0 -1
  123. package/dist/constants/spec-types.d.ts +0 -41
  124. package/dist/constants/spec-types.d.ts.map +0 -1
  125. package/dist/error-handler.d.ts +0 -164
  126. package/dist/error-handler.d.ts.map +0 -1
  127. package/dist/generators/jest-config.d.ts +0 -32
  128. package/dist/generators/jest-config.d.ts.map +0 -1
  129. package/dist/generators/working-spec.d.ts +0 -13
  130. package/dist/generators/working-spec.d.ts.map +0 -1
  131. package/dist/index-new.d.ts +0 -5
  132. package/dist/index-new.d.ts.map +0 -1
  133. package/dist/index-new.js +0 -317
  134. package/dist/index.d.ts +0 -5
  135. package/dist/index.d.ts.map +0 -1
  136. package/dist/index.js.backup +0 -4711
  137. package/dist/minimal-cli.d.ts +0 -3
  138. package/dist/minimal-cli.d.ts.map +0 -1
  139. package/dist/policy/PolicyManager.d.ts +0 -104
  140. package/dist/policy/PolicyManager.d.ts.map +0 -1
  141. package/dist/scaffold/cursor-hooks.d.ts +0 -7
  142. package/dist/scaffold/cursor-hooks.d.ts.map +0 -1
  143. package/dist/scaffold/git-hooks.d.ts +0 -20
  144. package/dist/scaffold/git-hooks.d.ts.map +0 -1
  145. package/dist/scaffold/index.d.ts +0 -20
  146. package/dist/scaffold/index.d.ts.map +0 -1
  147. package/dist/spec/SpecFileManager.d.ts +0 -146
  148. package/dist/spec/SpecFileManager.d.ts.map +0 -1
  149. package/dist/test-analysis.d.ts +0 -182
  150. package/dist/test-analysis.d.ts.map +0 -1
  151. package/dist/tool-interface.d.ts +0 -236
  152. package/dist/tool-interface.d.ts.map +0 -1
  153. package/dist/tool-loader.d.ts +0 -77
  154. package/dist/tool-loader.d.ts.map +0 -1
  155. package/dist/tool-validator.d.ts +0 -72
  156. package/dist/tool-validator.d.ts.map +0 -1
  157. package/dist/utils/detection.d.ts +0 -7
  158. package/dist/utils/detection.d.ts.map +0 -1
  159. package/dist/utils/finalization.d.ts +0 -17
  160. package/dist/utils/finalization.d.ts.map +0 -1
  161. package/dist/utils/project-analysis.d.ts +0 -14
  162. package/dist/utils/project-analysis.d.ts.map +0 -1
  163. package/dist/utils/quality-gates.d.ts +0 -49
  164. package/dist/utils/quality-gates.d.ts.map +0 -1
  165. package/dist/utils/spec-resolver.d.ts +0 -88
  166. package/dist/utils/spec-resolver.d.ts.map +0 -1
  167. package/dist/utils/typescript-detector.d.ts +0 -63
  168. package/dist/utils/typescript-detector.d.ts.map +0 -1
  169. package/dist/validation/spec-validation.d.ts +0 -43
  170. package/dist/validation/spec-validation.d.ts.map +0 -1
  171. package/dist/waivers-manager.d.ts +0 -167
  172. package/dist/waivers-manager.d.ts.map +0 -1
  173. package/templates/apps/tools/caws/COMPLETION_REPORT.md +0 -331
  174. package/templates/apps/tools/caws/MIGRATION_SUMMARY.md +0 -360
  175. package/templates/apps/tools/caws/README.md +0 -463
  176. package/templates/apps/tools/caws/TEST_STATUS.md +0 -365
  177. package/templates/apps/tools/caws/attest.js +0 -357
  178. package/templates/apps/tools/caws/ci-optimizer.js +0 -642
  179. package/templates/apps/tools/caws/config.ts +0 -245
  180. package/templates/apps/tools/caws/cross-functional.js +0 -876
  181. package/templates/apps/tools/caws/dashboard.js +0 -1112
  182. package/templates/apps/tools/caws/flake-detector.ts +0 -362
  183. package/templates/apps/tools/caws/gates.js +0 -198
  184. package/templates/apps/tools/caws/gates.ts +0 -271
  185. package/templates/apps/tools/caws/language-adapters.ts +0 -381
  186. package/templates/apps/tools/caws/language-support.d.ts +0 -367
  187. package/templates/apps/tools/caws/language-support.d.ts.map +0 -1
  188. package/templates/apps/tools/caws/language-support.js +0 -585
  189. package/templates/apps/tools/caws/legacy-assessment.ts +0 -408
  190. package/templates/apps/tools/caws/legacy-assessor.js +0 -764
  191. package/templates/apps/tools/caws/mutant-analyzer.js +0 -734
  192. package/templates/apps/tools/caws/perf-budgets.ts +0 -349
  193. package/templates/apps/tools/caws/prompt-lint.js.backup +0 -274
  194. package/templates/apps/tools/caws/property-testing.js +0 -707
  195. package/templates/apps/tools/caws/provenance.d.ts +0 -14
  196. package/templates/apps/tools/caws/provenance.d.ts.map +0 -1
  197. package/templates/apps/tools/caws/provenance.js +0 -132
  198. package/templates/apps/tools/caws/provenance.js.backup +0 -73
  199. package/templates/apps/tools/caws/provenance.ts +0 -211
  200. package/templates/apps/tools/caws/security-provenance.ts +0 -483
  201. package/templates/apps/tools/caws/shared/base-tool.ts +0 -281
  202. package/templates/apps/tools/caws/shared/config-manager.ts +0 -366
  203. package/templates/apps/tools/caws/shared/gate-checker.ts +0 -849
  204. package/templates/apps/tools/caws/shared/types.ts +0 -444
  205. package/templates/apps/tools/caws/shared/validator.ts +0 -305
  206. package/templates/apps/tools/caws/shared/waivers-manager.ts +0 -174
  207. package/templates/apps/tools/caws/spec-test-mapper.ts +0 -391
  208. package/templates/apps/tools/caws/test-quality.js +0 -578
  209. package/templates/apps/tools/caws/validate.js +0 -76
  210. package/templates/apps/tools/caws/validate.ts +0 -228
  211. package/templates/apps/tools/caws/waivers.js +0 -344
  212. /package/{templates/apps/tools/caws → dist/templates/.caws}/schemas/waivers.schema.json +0 -0
  213. /package/{templates/apps/tools/caws → dist/templates/.caws}/schemas/working-spec.schema.json +0 -0
  214. /package/{templates/apps/tools/caws → dist/templates/.caws}/templates/working-spec.template.yml +0 -0
  215. /package/{templates/apps/tools/caws → dist/templates/.caws/tools}/scope-guard.js +0 -0
  216. /package/{templates/apps/tools/caws → dist/templates/.caws}/tools-allow.json +0 -0
  217. /package/{templates/apps/tools/caws → dist/templates/.caws}/waivers.yml +0 -0
@@ -0,0 +1,390 @@
1
+ ---
2
+ description: Comprehensive documentation quality standards to prevent superiority claims, unfounded achievements, and marketing language
3
+ globs: ['**/*.md', '**/*.txt', '**/*.rst', '**/*.adoc']
4
+ alwaysApply: true
5
+ ---
6
+
7
+ # Documentation Quality Standards
8
+
9
+ ## Core Principle
10
+
11
+ **Documentation must be engineering-grade, accurate, and free of marketing language.** Focus on architectural decisions, implementation details, and system design rather than claims of superiority or unfounded achievements.
12
+
13
+ ## Prohibited Content Patterns
14
+
15
+ ### ❌ Superiority Claims (Banned)
16
+
17
+ **Never use these terms in documentation:**
18
+
19
+ - `revolutionary`, `breakthrough`, `innovative`, `groundbreaking`
20
+ - `cutting-edge`, `state-of-the-art`, `next-generation`
21
+ - `advanced`, `premium`, `superior`, `best`, `leading`
22
+ - `industry-leading`, `award-winning`, `game-changing`
23
+
24
+ ### ❌ Unfounded Achievement Claims (Banned)
25
+
26
+ **Never claim these without verification:**
27
+
28
+ - `production-ready`, `enterprise-grade`, `battle-tested`
29
+ - `complete`, `finished`, `done`, `achieved`, `delivered`
30
+ - `implemented`, `operational`, `ready`, `deployed`
31
+ - `launched`, `released`, `100%`, `fully`
32
+ - `comprehensive`, `entire`, `total`, `all`, `every`
33
+ - `perfect`, `ideal`, `optimal`, `maximum`, `minimum`
34
+ - `unlimited`, `infinite`, `endless`
35
+
36
+ ### ❌ Marketing Language (Banned)
37
+
38
+ **Avoid these patterns:**
39
+
40
+ - `cutting-edge technology`
41
+ - `revolutionary approach`
42
+ - `industry-leading solution`
43
+ - `state-of-the-art system`
44
+ - `next-generation platform`
45
+ - `advanced capabilities`
46
+ - `premium features`
47
+ - `superior performance`
48
+
49
+ ### ❌ Temporal Documentation (Archive Only)
50
+
51
+ **Never create these in main directories:**
52
+
53
+ - `SESSION_*_SUMMARY.md`
54
+ - `IMPLEMENTATION_STATUS.md`
55
+ - `TODO_*_COMPLETE.md`
56
+ - `*_SUMMARY.md`
57
+ - `*_REPORT.md`
58
+ - `*_AUDIT.md`
59
+ - `*_CHECKLIST.md`
60
+ - `PHASE*_*.md`
61
+ - `NEXT_ACTIONS.md`
62
+
63
+ ## Required Content Standards
64
+
65
+ ### ✅ Engineering-Grade Language
66
+
67
+ **Use these patterns instead:**
68
+
69
+ - `implemented` (not "production-ready")
70
+ - `operational` (not "enterprise-grade")
71
+ - `in development` (not "complete")
72
+ - `working` (not "finished")
73
+ - `functional` (not "achieved")
74
+ - `available` (not "delivered")
75
+
76
+ ### ✅ Accurate Status Claims
77
+
78
+ **Before claiming any status, verify:**
79
+
80
+ - [ ] Feature fully implemented and tested
81
+ - [ ] All documented endpoints exist and work
82
+ - [ ] Code examples run without errors
83
+ - [ ] Installation instructions work on clean environment
84
+ - [ ] Performance claims backed by benchmarks
85
+ - [ ] Security claims validated by testing
86
+
87
+ ### ✅ Architectural Focus
88
+
89
+ **Documentation should emphasize:**
90
+
91
+ - **Architectural decisions** and rationale
92
+ - **Implementation details** and patterns
93
+ - **System design** and component relationships
94
+ - **Technical specifications** and constraints
95
+ - **Integration points** and APIs
96
+ - **Quality gates** and verification methods
97
+
98
+ ## Documentation Quality Checklist
99
+
100
+ ### Pre-Publication Verification
101
+
102
+ - [ ] No superiority claims or marketing language
103
+ - [ ] No unfounded achievement claims
104
+ - [ ] All status claims verified and accurate
105
+ - [ ] Code examples tested and working
106
+ - [ ] Installation instructions verified
107
+ - [ ] API documentation matches implementation
108
+ - [ ] No temporal documentation in main directories
109
+ - [ ] Professional, neutral tone throughout
110
+ - [ ] Focus on engineering-grade content
111
+
112
+ ### Content Quality Gates
113
+
114
+ - [ ] **Accuracy**: All claims backed by evidence
115
+ - [ ] **Completeness**: All documented features implemented
116
+ - [ ] **Clarity**: Technical concepts clearly explained
117
+ - [ ] **Consistency**: Terminology used consistently
118
+ - [ ] **Currency**: Information reflects current state
119
+ - [ ] **Relevance**: Content serves maintainers/collaborators/researchers
120
+
121
+ ## Enforcement Mechanisms
122
+
123
+ ### Automated Detection
124
+
125
+ **Use these patterns to detect violations:**
126
+
127
+ ```regex
128
+ # Superiority claims
129
+ (?i)\b(revolutionary|breakthrough|innovative|groundbreaking|cutting-edge|state-of-the-art|next-generation|advanced|premium|superior|best|leading|industry-leading|award-winning|game-changing)\b
130
+
131
+ # Unfounded achievements
132
+ (?i)\b(production-ready|enterprise-grade|battle-tested|complete|finished|done|achieved|delivered|implemented|operational|ready|deployed|launched|released|100%|fully|comprehensive|entire|total|all|every|perfect|ideal|optimal|maximum|minimum|unlimited|infinite|endless)\b
133
+
134
+ # Temporal documentation
135
+ (?i)(session|implementation|todo|summary|report|audit|checklist|phase|next_actions)
136
+ ```
137
+
138
+ ### Manual Review Requirements
139
+
140
+ **For any documentation claiming:**
141
+
142
+ - Production readiness → Require evidence of all quality gates
143
+ - Enterprise features → Require enterprise testing validation
144
+ - Complete implementation → Require 100% test coverage
145
+ - Performance claims → Require benchmark data
146
+ - Security features → Require security audit results
147
+
148
+ ### Quality Metrics
149
+
150
+ **Track these metrics:**
151
+
152
+ - **Accuracy Score**: % of claims verified by evidence
153
+ - **Reality Alignment**: % of documented features that work
154
+ - **Engineering Focus**: % of content focused on technical details
155
+ - **Marketing Language**: % of content free of marketing terms
156
+ - **Temporal Content**: % of content in appropriate directories
157
+
158
+ ## Correct Documentation Patterns
159
+
160
+ ### ✅ Accurate Feature Documentation
161
+
162
+ ```markdown
163
+ ## Features
164
+
165
+ ### Implemented
166
+
167
+ - User authentication with JWT tokens
168
+ - Real-time notifications via WebSocket
169
+ - Basic analytics dashboard
170
+
171
+ ### In Development
172
+
173
+ - Advanced ML recommendations (Q2 2025)
174
+ - Multi-tenant isolation (Q1 2025)
175
+
176
+ ### Planned
177
+
178
+ - AI-powered chat support (Q3 2025)
179
+ ```
180
+
181
+ ### ✅ Working Code Examples
182
+
183
+ ```javascript
184
+ // POST /api/users
185
+ const response = await fetch('/api/users', {
186
+ method: 'POST',
187
+ headers: {
188
+ 'Content-Type': 'application/json',
189
+ Authorization: `Bearer ${token}`,
190
+ },
191
+ body: JSON.stringify({
192
+ name: 'John Doe',
193
+ email: 'john@example.com', // Required field included
194
+ password: 'securePassword123',
195
+ }),
196
+ });
197
+
198
+ if (!response.ok) {
199
+ throw new Error(`Failed to create user: ${response.statusText}`);
200
+ }
201
+
202
+ const user = await response.json();
203
+ console.log('Created user:', user);
204
+ ```
205
+
206
+ ### ✅ Realistic Status Claims
207
+
208
+ ```markdown
209
+ # Project Status
210
+
211
+ **Current Status**: In Development (Proof of Concept)
212
+
213
+ **Implementation Progress**: 25% - Core authentication and basic API working, but missing:
214
+
215
+ - Database persistence (in-memory only)
216
+ - Security hardening
217
+ - Comprehensive testing
218
+ - Production deployment pipeline
219
+
220
+ **Next Milestone**: Alpha release (Q1 2025) with full persistence layer
221
+ ```
222
+
223
+ ## CAWS Integration
224
+
225
+ ### Pre-Commit Hooks
226
+
227
+ **Automatically check:**
228
+
229
+ - No prohibited language patterns
230
+ - No temporal documentation in main directories
231
+ - All status claims have evidence
232
+ - Code examples are tested
233
+ - Installation instructions work
234
+
235
+ ```bash
236
+ # Check for prohibited language patterns
237
+ check-documentation-quality() {
238
+ echo "🔍 Checking documentation quality..."
239
+
240
+ # Check for superiority claims
241
+ local superiority_claims=$(grep -r -E "(?i)\b(revolutionary|breakthrough|innovative|groundbreaking|cutting-edge|state-of-the-art|next-generation|advanced|premium|superior|best|leading|industry-leading|award-winning|game-changing)\b" docs/ | wc -l)
242
+ if [ "$superiority_claims" -gt 0 ]; then
243
+ echo "❌ Found $superiority_claims superiority claims"
244
+ echo "Use engineering-grade language instead"
245
+ exit 1
246
+ fi
247
+
248
+ # Check for unfounded achievements
249
+ local unfounded_claims=$(grep -r -E "(?i)\b(production-ready|enterprise-grade|battle-tested|complete|finished|done|achieved|delivered|implemented|operational|ready|deployed|launched|released|100%|fully|comprehensive|entire|total|all|every|perfect|ideal|optimal|maximum|minimum|unlimited|infinite|endless)\b" docs/ | wc -l)
250
+ if [ "$unfounded_claims" -gt 0 ]; then
251
+ echo "❌ Found $unfounded_claims unfounded achievement claims"
252
+ echo "Verify all claims with evidence"
253
+ exit 1
254
+ fi
255
+
256
+ # Check for temporal documentation
257
+ local temporal_docs=$(find docs/ -name "*SESSION*" -o -name "*SUMMARY*" -o -name "*REPORT*" -o -name "*AUDIT*" -o -name "*CHECKLIST*" -o -name "*PHASE*" -o -name "*NEXT_ACTIONS*" | wc -l)
258
+ if [ "$temporal_docs" -gt 0 ]; then
259
+ echo "❌ Found $temporal_docs temporal documentation files"
260
+ echo "Move to archive directory"
261
+ exit 1
262
+ fi
263
+
264
+ echo "✅ Documentation quality checks passed"
265
+ }
266
+ ```
267
+
268
+ ### CI/CD Integration
269
+
270
+ **Run documentation quality checks:**
271
+
272
+ - Link validation
273
+ - Code example testing
274
+ - Status claim verification
275
+ - Marketing language detection
276
+ - Temporal content detection
277
+
278
+ ````yaml
279
+ # GitHub Actions example
280
+ - name: Check Documentation Quality
281
+ run: |
282
+ echo "🔍 Running documentation quality checks..."
283
+
284
+ # Check for prohibited language patterns
285
+ superiority_claims=$(grep -r -E "(?i)\b(revolutionary|breakthrough|innovative|groundbreaking|cutting-edge|state-of-the-art|next-generation|advanced|premium|superior|best|leading|industry-leading|award-winning|game-changing)\b" docs/ | wc -l)
286
+ if [ "$superiority_claims" -gt 0 ]; then
287
+ echo "❌ Found $superiority_claims superiority claims"
288
+ exit 1
289
+ fi
290
+
291
+ # Check for unfounded achievements
292
+ unfounded_claims=$(grep -r -E "(?i)\b(production-ready|enterprise-grade|battle-tested|complete|finished|done|achieved|delivered|implemented|operational|ready|deployed|launched|released|100%|fully|comprehensive|entire|total|all|every|perfect|ideal|optimal|maximum|minimum|unlimited|infinite|endless)\b" docs/ | wc -l)
293
+ if [ "$unfounded_claims" -gt 0 ]; then
294
+ echo "❌ Found $unfounded_claims unfounded achievement claims"
295
+ exit 1
296
+ fi
297
+
298
+ # Check for temporal documentation
299
+ temporal_docs=$(find docs/ -name "*SESSION*" -o -name "*SUMMARY*" -o -name "*REPORT*" -o -name "*AUDIT*" -o -name "*CHECKLIST*" -o -name "*PHASE*" -o -name "*NEXT_ACTIONS*" | wc -l)
300
+ if [ "$temporal_docs" -gt 0 ]; then
301
+ echo "❌ Found $temporal_docs temporal documentation files"
302
+ exit 1
303
+ fi
304
+
305
+ echo "✅ Documentation quality checks passed"
306
+
307
+ - name: Test Code Examples
308
+ run: |
309
+ echo "🔍 Testing code examples in documentation..."
310
+
311
+ # Extract and test code examples
312
+ find docs/ -name "*.md" -exec grep -l "```" {} \; | while read file; do
313
+ echo "Testing code examples in $file"
314
+ # Extract code blocks and test them
315
+ # Implementation depends on language and framework
316
+ done
317
+
318
+ echo "✅ Code examples tested"
319
+ ````
320
+
321
+ ### Quality Gates
322
+
323
+ **Block commits if:**
324
+
325
+ - Superiority claims detected
326
+ - Unfounded achievements claimed
327
+ - Temporal documentation in wrong location
328
+ - Marketing language used
329
+ - Status claims without evidence
330
+
331
+ ### CAWS Commands
332
+
333
+ ```bash
334
+ # Check documentation quality
335
+ caws validate --check-documentation-quality
336
+
337
+ # Generate documentation quality report
338
+ caws docs quality-report --include-marketing-check --include-status-verification
339
+
340
+ # Track documentation quality metrics
341
+ caws metrics track --metric="documentation_quality_score" --value=95
342
+
343
+ # Update progress with documentation quality
344
+ caws progress update --criterion-id="DOCS-001" --status="completed"
345
+ ```
346
+
347
+ ## Continuous Improvement
348
+
349
+ ### Regular Audits
350
+
351
+ **Monthly reviews:**
352
+
353
+ - Check for new problematic patterns
354
+ - Update prohibited terms list
355
+ - Review quality metrics
356
+ - Improve detection accuracy
357
+
358
+ ### Feedback Integration
359
+
360
+ **User feedback:**
361
+
362
+ - Report problematic content
363
+ - Suggest quality improvements
364
+ - Identify new patterns to detect
365
+ - Validate quality metrics
366
+
367
+ ### Rule Evolution
368
+
369
+ **Update rules based on:**
370
+
371
+ - New problematic patterns discovered
372
+ - Industry best practices
373
+ - User feedback and complaints
374
+ - Quality metric trends
375
+ - Production incident analysis
376
+
377
+ ### CAWS Integration Points
378
+
379
+ ```bash
380
+ # Track documentation quality trends
381
+ caws metrics trends --metric="documentation_quality_score" --period="30d"
382
+
383
+ # Export documentation quality metrics
384
+ caws metrics export --format=json --include-documentation-quality
385
+
386
+ # Archive documentation with quality verification
387
+ caws archive DOCS-001 --verify-documentation-quality
388
+ ```
389
+
390
+ This rule ensures documentation maintains engineering-grade quality and prevents the accumulation of problematic content that requires manual cleanup, fully integrated with CAWS workflow and quality gates.