cmp-standards 2.7.0 → 2.8.0-alpha

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 (114) hide show
  1. package/README.md +633 -633
  2. package/dist/cache/EmbeddingCache.d.ts +109 -0
  3. package/dist/cache/EmbeddingCache.d.ts.map +1 -0
  4. package/dist/cache/EmbeddingCache.js +239 -0
  5. package/dist/cache/EmbeddingCache.js.map +1 -0
  6. package/dist/cache/index.d.ts +6 -0
  7. package/dist/cache/index.d.ts.map +1 -0
  8. package/dist/cache/index.js +6 -0
  9. package/dist/cache/index.js.map +1 -0
  10. package/dist/cli/index.js +0 -0
  11. package/dist/db/turso-client.js +11 -11
  12. package/dist/eslint/rules/no-async-useeffect.js +6 -6
  13. package/dist/events/EventBus.d.ts +87 -0
  14. package/dist/events/EventBus.d.ts.map +1 -0
  15. package/dist/events/EventBus.js +200 -0
  16. package/dist/events/EventBus.js.map +1 -0
  17. package/dist/events/index.d.ts +7 -0
  18. package/dist/events/index.d.ts.map +1 -0
  19. package/dist/events/index.js +9 -0
  20. package/dist/events/index.js.map +1 -0
  21. package/dist/events/types.d.ts +989 -0
  22. package/dist/events/types.d.ts.map +1 -0
  23. package/dist/events/types.js +136 -0
  24. package/dist/events/types.js.map +1 -0
  25. package/dist/experts/ConsensusEngine.d.ts +57 -0
  26. package/dist/experts/ConsensusEngine.d.ts.map +1 -0
  27. package/dist/experts/ConsensusEngine.js +146 -0
  28. package/dist/experts/ConsensusEngine.js.map +1 -0
  29. package/dist/experts/ExpertPanelService.d.ts +84 -0
  30. package/dist/experts/ExpertPanelService.d.ts.map +1 -0
  31. package/dist/experts/ExpertPanelService.js +204 -0
  32. package/dist/experts/ExpertPanelService.js.map +1 -0
  33. package/dist/experts/ExpertRouter.d.ts +68 -0
  34. package/dist/experts/ExpertRouter.d.ts.map +1 -0
  35. package/dist/experts/ExpertRouter.js +374 -0
  36. package/dist/experts/ExpertRouter.js.map +1 -0
  37. package/dist/experts/VoteCollector.d.ts +58 -0
  38. package/dist/experts/VoteCollector.d.ts.map +1 -0
  39. package/dist/experts/VoteCollector.js +146 -0
  40. package/dist/experts/VoteCollector.js.map +1 -0
  41. package/dist/experts/index.d.ts +9 -0
  42. package/dist/experts/index.d.ts.map +1 -0
  43. package/dist/experts/index.js +13 -0
  44. package/dist/experts/index.js.map +1 -0
  45. package/dist/hooks/cloud-pre-tool-use.js +20 -20
  46. package/dist/hooks/expert-review.d.ts +74 -0
  47. package/dist/hooks/expert-review.d.ts.map +1 -0
  48. package/dist/hooks/expert-review.js +220 -0
  49. package/dist/hooks/expert-review.js.map +1 -0
  50. package/dist/hooks/index.d.ts +1 -0
  51. package/dist/hooks/index.d.ts.map +1 -1
  52. package/dist/hooks/index.js +2 -0
  53. package/dist/hooks/index.js.map +1 -1
  54. package/dist/index.d.ts +13 -0
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js +22 -0
  57. package/dist/index.js.map +1 -1
  58. package/dist/performance/Debouncer.d.ts +91 -0
  59. package/dist/performance/Debouncer.d.ts.map +1 -0
  60. package/dist/performance/Debouncer.js +198 -0
  61. package/dist/performance/Debouncer.js.map +1 -0
  62. package/dist/performance/MemoryDecay.d.ts +82 -0
  63. package/dist/performance/MemoryDecay.d.ts.map +1 -0
  64. package/dist/performance/MemoryDecay.js +153 -0
  65. package/dist/performance/MemoryDecay.js.map +1 -0
  66. package/dist/performance/index.d.ts +7 -0
  67. package/dist/performance/index.d.ts.map +1 -0
  68. package/dist/performance/index.js +9 -0
  69. package/dist/performance/index.js.map +1 -0
  70. package/dist/schema/expert-types.d.ts +395 -0
  71. package/dist/schema/expert-types.d.ts.map +1 -0
  72. package/dist/schema/expert-types.js +250 -0
  73. package/dist/schema/expert-types.js.map +1 -0
  74. package/dist/services/ContextGenerator.js +7 -7
  75. package/dist/services/ProjectScaffold.js +76 -76
  76. package/dist/services/memory-router.js +35 -35
  77. package/dist/services/pattern-tracker.js +90 -90
  78. package/dist/services/semantic-search.js +2 -2
  79. package/package.json +105 -104
  80. package/standards/README.md +50 -50
  81. package/standards/experts/expert-routing.md +215 -215
  82. package/standards/general/code-quality.md +86 -86
  83. package/standards/general/memory-usage.md +205 -205
  84. package/standards/general/sync-workflow.md +235 -235
  85. package/standards/general/workflow.md +82 -82
  86. package/standards/hooks/mandatory-tracking.md +446 -446
  87. package/standards/infrastructure/cloud-database.md +287 -287
  88. package/standards/mcp/server-design.md +243 -243
  89. package/standards/mcp/tool-patterns.md +354 -354
  90. package/standards/skills/skill-structure.md +286 -286
  91. package/standards/skills/workflow-design.md +323 -323
  92. package/standards/tools/tool-design.md +297 -297
  93. package/templates/agents/architecture-expert.md +61 -61
  94. package/templates/agents/database-expert.md +62 -62
  95. package/templates/agents/documentation-expert.md +57 -57
  96. package/templates/agents/memory-expert.md +88 -88
  97. package/templates/agents/performance-expert.md +61 -61
  98. package/templates/agents/security-expert.md +59 -59
  99. package/templates/agents/ux-expert.md +63 -63
  100. package/templates/agents/worker.md +75 -75
  101. package/templates/ai-skills/SKILL_TEMPLATE.md +55 -55
  102. package/templates/claude-settings.json +72 -72
  103. package/templates/commands/experts.md +138 -138
  104. package/templates/hooks/README.md +158 -158
  105. package/templates/hooks/project.config.json.template +77 -77
  106. package/templates/hooks/settings.local.json.template +57 -57
  107. package/templates/memory-config.json +56 -56
  108. package/templates/memory-config.schema.json +212 -212
  109. package/templates/settings.json +58 -58
  110. package/templates/skills/continue.md +205 -205
  111. package/templates/workflows/business-improvement.md +264 -264
  112. package/templates/workflows/expert-review.md +153 -153
  113. package/templates/workflows/internal-app.md +245 -245
  114. package/templates/workflows/sync-docs.md +187 -187
@@ -1,187 +1,187 @@
1
- ---
2
- description: "/sync - Synchronize and validate all project documentation automatically"
3
- ---
4
-
5
- # Documentation Sync Workflow
6
-
7
- This workflow executes all documentation validations and updates.
8
-
9
- ## Overview
10
-
11
- The `/sync` command ensures all project documentation is:
12
- - Up to date with code changes
13
- - Consistent across files
14
- - Following established patterns
15
- - Properly validated
16
-
17
- ## Execution Steps
18
-
19
- ### 1. Health Check
20
-
21
- Run documentation health check:
22
- ```bash
23
- npm run docs:health
24
- # Or custom command for your project
25
- ```
26
-
27
- Verifies:
28
- - All required docs exist
29
- - No broken internal links
30
- - Timestamps are recent
31
-
32
- ### 2. Schema Documentation
33
-
34
- Generate schema documentation:
35
- ```bash
36
- npm run docs:schema
37
- # Or: npx drizzle-kit generate
38
- ```
39
-
40
- Updates:
41
- - Database schema docs
42
- - Type definitions
43
- - API documentation
44
-
45
- ### 3. AI Context Sync
46
-
47
- Sync AI context files:
48
- ```bash
49
- cmp-memory sync
50
- ```
51
-
52
- Updates:
53
- - CLAUDE.md with latest project state
54
- - Skills registry
55
- - Agent configurations
56
-
57
- ### 4. Translation Check
58
-
59
- Verify translations (if applicable):
60
- ```bash
61
- npm run i18n:check
62
- ```
63
-
64
- Checks:
65
- - Missing translation keys
66
- - Inconsistent translations
67
- - Unused keys
68
-
69
- ### 5. Finance Sync (if applicable)
70
-
71
- Verify finance-ledger synchronization:
72
- ```bash
73
- npm run lint:finance-sync
74
- ```
75
-
76
- Ensures:
77
- - All finance operations have ledger entries
78
- - Cash flow integrity maintained
79
-
80
- ### 6. Lint Report
81
-
82
- Generate intelligent lint report:
83
- ```bash
84
- npm run lint:report
85
- # Or: npx eslint . --format json > .lint/report.json
86
- ```
87
-
88
- Produces:
89
- - Categorized issues
90
- - Priority ranking
91
- - Fix suggestions
92
-
93
- ## Full Report
94
-
95
- The sync produces a comprehensive report:
96
-
97
- ```
98
- Documentation Sync Report
99
- ========================
100
-
101
- Health Check:
102
- - CLAUDE.md: OK (updated 2h ago)
103
- - README.md: OK
104
- - API docs: STALE (updated 7d ago) <-- Action needed
105
-
106
- Schema:
107
- - 47 tables documented
108
- - 3 new columns since last sync
109
- - Types: up to date
110
-
111
- AI Context:
112
- - 12 agents configured
113
- - 8 skills registered
114
- - Hooks: synchronized
115
-
116
- Translations:
117
- - en: 100% (847/847)
118
- - es: 98% (834/847) <-- 13 missing
119
- - de: 95% (805/847) <-- 42 missing
120
-
121
- Lint Summary:
122
- - Errors: 0
123
- - Warnings: 12
124
- - Info: 45
125
-
126
- Overall: NEEDS_ATTENTION
127
- Action Items:
128
- 1. Update API documentation
129
- 2. Add 13 Spanish translations
130
- 3. Review 12 lint warnings
131
- ```
132
-
133
- ## Automation
134
-
135
- ### Pre-commit Hook
136
-
137
- Add to `.claude/hooks/pre-commit.sh`:
138
- ```bash
139
- #!/bin/bash
140
- cmp-memory sync --quick
141
- if [ $? -ne 0 ]; then
142
- echo "Documentation sync failed"
143
- exit 1
144
- fi
145
- ```
146
-
147
- ### CI Integration
148
-
149
- ```yaml
150
- - name: Documentation Sync
151
- run: |
152
- cmp-memory sync
153
- git diff --exit-code docs/
154
- ```
155
-
156
- ## Customization
157
-
158
- Configure in `project.config.json`:
159
-
160
- ```json
161
- {
162
- "sync": {
163
- "healthCheck": true,
164
- "schemaDoc": true,
165
- "aiContext": true,
166
- "i18n": false,
167
- "financeSync": false,
168
- "lintReport": true
169
- }
170
- }
171
- ```
172
-
173
- ## When to Run
174
-
175
- ### Automatic Triggers
176
- - Pre-commit (quick mode)
177
- - PR creation
178
- - Release preparation
179
-
180
- ### Manual Triggers
181
- - After major refactors
182
- - Before important demos
183
- - Monthly maintenance
184
-
185
- ---
186
-
187
- **Status**: Production Ready
1
+ ---
2
+ description: "/sync - Synchronize and validate all project documentation automatically"
3
+ ---
4
+
5
+ # Documentation Sync Workflow
6
+
7
+ This workflow executes all documentation validations and updates.
8
+
9
+ ## Overview
10
+
11
+ The `/sync` command ensures all project documentation is:
12
+ - Up to date with code changes
13
+ - Consistent across files
14
+ - Following established patterns
15
+ - Properly validated
16
+
17
+ ## Execution Steps
18
+
19
+ ### 1. Health Check
20
+
21
+ Run documentation health check:
22
+ ```bash
23
+ npm run docs:health
24
+ # Or custom command for your project
25
+ ```
26
+
27
+ Verifies:
28
+ - All required docs exist
29
+ - No broken internal links
30
+ - Timestamps are recent
31
+
32
+ ### 2. Schema Documentation
33
+
34
+ Generate schema documentation:
35
+ ```bash
36
+ npm run docs:schema
37
+ # Or: npx drizzle-kit generate
38
+ ```
39
+
40
+ Updates:
41
+ - Database schema docs
42
+ - Type definitions
43
+ - API documentation
44
+
45
+ ### 3. AI Context Sync
46
+
47
+ Sync AI context files:
48
+ ```bash
49
+ cmp-memory sync
50
+ ```
51
+
52
+ Updates:
53
+ - CLAUDE.md with latest project state
54
+ - Skills registry
55
+ - Agent configurations
56
+
57
+ ### 4. Translation Check
58
+
59
+ Verify translations (if applicable):
60
+ ```bash
61
+ npm run i18n:check
62
+ ```
63
+
64
+ Checks:
65
+ - Missing translation keys
66
+ - Inconsistent translations
67
+ - Unused keys
68
+
69
+ ### 5. Finance Sync (if applicable)
70
+
71
+ Verify finance-ledger synchronization:
72
+ ```bash
73
+ npm run lint:finance-sync
74
+ ```
75
+
76
+ Ensures:
77
+ - All finance operations have ledger entries
78
+ - Cash flow integrity maintained
79
+
80
+ ### 6. Lint Report
81
+
82
+ Generate intelligent lint report:
83
+ ```bash
84
+ npm run lint:report
85
+ # Or: npx eslint . --format json > .lint/report.json
86
+ ```
87
+
88
+ Produces:
89
+ - Categorized issues
90
+ - Priority ranking
91
+ - Fix suggestions
92
+
93
+ ## Full Report
94
+
95
+ The sync produces a comprehensive report:
96
+
97
+ ```
98
+ Documentation Sync Report
99
+ ========================
100
+
101
+ Health Check:
102
+ - CLAUDE.md: OK (updated 2h ago)
103
+ - README.md: OK
104
+ - API docs: STALE (updated 7d ago) <-- Action needed
105
+
106
+ Schema:
107
+ - 47 tables documented
108
+ - 3 new columns since last sync
109
+ - Types: up to date
110
+
111
+ AI Context:
112
+ - 12 agents configured
113
+ - 8 skills registered
114
+ - Hooks: synchronized
115
+
116
+ Translations:
117
+ - en: 100% (847/847)
118
+ - es: 98% (834/847) <-- 13 missing
119
+ - de: 95% (805/847) <-- 42 missing
120
+
121
+ Lint Summary:
122
+ - Errors: 0
123
+ - Warnings: 12
124
+ - Info: 45
125
+
126
+ Overall: NEEDS_ATTENTION
127
+ Action Items:
128
+ 1. Update API documentation
129
+ 2. Add 13 Spanish translations
130
+ 3. Review 12 lint warnings
131
+ ```
132
+
133
+ ## Automation
134
+
135
+ ### Pre-commit Hook
136
+
137
+ Add to `.claude/hooks/pre-commit.sh`:
138
+ ```bash
139
+ #!/bin/bash
140
+ cmp-memory sync --quick
141
+ if [ $? -ne 0 ]; then
142
+ echo "Documentation sync failed"
143
+ exit 1
144
+ fi
145
+ ```
146
+
147
+ ### CI Integration
148
+
149
+ ```yaml
150
+ - name: Documentation Sync
151
+ run: |
152
+ cmp-memory sync
153
+ git diff --exit-code docs/
154
+ ```
155
+
156
+ ## Customization
157
+
158
+ Configure in `project.config.json`:
159
+
160
+ ```json
161
+ {
162
+ "sync": {
163
+ "healthCheck": true,
164
+ "schemaDoc": true,
165
+ "aiContext": true,
166
+ "i18n": false,
167
+ "financeSync": false,
168
+ "lintReport": true
169
+ }
170
+ }
171
+ ```
172
+
173
+ ## When to Run
174
+
175
+ ### Automatic Triggers
176
+ - Pre-commit (quick mode)
177
+ - PR creation
178
+ - Release preparation
179
+
180
+ ### Manual Triggers
181
+ - After major refactors
182
+ - Before important demos
183
+ - Monthly maintenance
184
+
185
+ ---
186
+
187
+ **Status**: Production Ready