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.
- package/README.md +633 -633
- package/dist/cache/EmbeddingCache.d.ts +109 -0
- package/dist/cache/EmbeddingCache.d.ts.map +1 -0
- package/dist/cache/EmbeddingCache.js +239 -0
- package/dist/cache/EmbeddingCache.js.map +1 -0
- package/dist/cache/index.d.ts +6 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +6 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/cli/index.js +0 -0
- package/dist/db/turso-client.js +11 -11
- package/dist/eslint/rules/no-async-useeffect.js +6 -6
- package/dist/events/EventBus.d.ts +87 -0
- package/dist/events/EventBus.d.ts.map +1 -0
- package/dist/events/EventBus.js +200 -0
- package/dist/events/EventBus.js.map +1 -0
- package/dist/events/index.d.ts +7 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +9 -0
- package/dist/events/index.js.map +1 -0
- package/dist/events/types.d.ts +989 -0
- package/dist/events/types.d.ts.map +1 -0
- package/dist/events/types.js +136 -0
- package/dist/events/types.js.map +1 -0
- package/dist/experts/ConsensusEngine.d.ts +57 -0
- package/dist/experts/ConsensusEngine.d.ts.map +1 -0
- package/dist/experts/ConsensusEngine.js +146 -0
- package/dist/experts/ConsensusEngine.js.map +1 -0
- package/dist/experts/ExpertPanelService.d.ts +84 -0
- package/dist/experts/ExpertPanelService.d.ts.map +1 -0
- package/dist/experts/ExpertPanelService.js +204 -0
- package/dist/experts/ExpertPanelService.js.map +1 -0
- package/dist/experts/ExpertRouter.d.ts +68 -0
- package/dist/experts/ExpertRouter.d.ts.map +1 -0
- package/dist/experts/ExpertRouter.js +374 -0
- package/dist/experts/ExpertRouter.js.map +1 -0
- package/dist/experts/VoteCollector.d.ts +58 -0
- package/dist/experts/VoteCollector.d.ts.map +1 -0
- package/dist/experts/VoteCollector.js +146 -0
- package/dist/experts/VoteCollector.js.map +1 -0
- package/dist/experts/index.d.ts +9 -0
- package/dist/experts/index.d.ts.map +1 -0
- package/dist/experts/index.js +13 -0
- package/dist/experts/index.js.map +1 -0
- package/dist/hooks/cloud-pre-tool-use.js +20 -20
- package/dist/hooks/expert-review.d.ts +74 -0
- package/dist/hooks/expert-review.d.ts.map +1 -0
- package/dist/hooks/expert-review.js +220 -0
- package/dist/hooks/expert-review.js.map +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/dist/performance/Debouncer.d.ts +91 -0
- package/dist/performance/Debouncer.d.ts.map +1 -0
- package/dist/performance/Debouncer.js +198 -0
- package/dist/performance/Debouncer.js.map +1 -0
- package/dist/performance/MemoryDecay.d.ts +82 -0
- package/dist/performance/MemoryDecay.d.ts.map +1 -0
- package/dist/performance/MemoryDecay.js +153 -0
- package/dist/performance/MemoryDecay.js.map +1 -0
- package/dist/performance/index.d.ts +7 -0
- package/dist/performance/index.d.ts.map +1 -0
- package/dist/performance/index.js +9 -0
- package/dist/performance/index.js.map +1 -0
- package/dist/schema/expert-types.d.ts +395 -0
- package/dist/schema/expert-types.d.ts.map +1 -0
- package/dist/schema/expert-types.js +250 -0
- package/dist/schema/expert-types.js.map +1 -0
- package/dist/services/ContextGenerator.js +7 -7
- package/dist/services/ProjectScaffold.js +76 -76
- package/dist/services/memory-router.js +35 -35
- package/dist/services/pattern-tracker.js +90 -90
- package/dist/services/semantic-search.js +2 -2
- package/package.json +105 -104
- package/standards/README.md +50 -50
- package/standards/experts/expert-routing.md +215 -215
- package/standards/general/code-quality.md +86 -86
- package/standards/general/memory-usage.md +205 -205
- package/standards/general/sync-workflow.md +235 -235
- package/standards/general/workflow.md +82 -82
- package/standards/hooks/mandatory-tracking.md +446 -446
- package/standards/infrastructure/cloud-database.md +287 -287
- package/standards/mcp/server-design.md +243 -243
- package/standards/mcp/tool-patterns.md +354 -354
- package/standards/skills/skill-structure.md +286 -286
- package/standards/skills/workflow-design.md +323 -323
- package/standards/tools/tool-design.md +297 -297
- package/templates/agents/architecture-expert.md +61 -61
- package/templates/agents/database-expert.md +62 -62
- package/templates/agents/documentation-expert.md +57 -57
- package/templates/agents/memory-expert.md +88 -88
- package/templates/agents/performance-expert.md +61 -61
- package/templates/agents/security-expert.md +59 -59
- package/templates/agents/ux-expert.md +63 -63
- package/templates/agents/worker.md +75 -75
- package/templates/ai-skills/SKILL_TEMPLATE.md +55 -55
- package/templates/claude-settings.json +72 -72
- package/templates/commands/experts.md +138 -138
- package/templates/hooks/README.md +158 -158
- package/templates/hooks/project.config.json.template +77 -77
- package/templates/hooks/settings.local.json.template +57 -57
- package/templates/memory-config.json +56 -56
- package/templates/memory-config.schema.json +212 -212
- package/templates/settings.json +58 -58
- package/templates/skills/continue.md +205 -205
- package/templates/workflows/business-improvement.md +264 -264
- package/templates/workflows/expert-review.md +153 -153
- package/templates/workflows/internal-app.md +245 -245
- 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
|