cmp-standards 3.5.0 → 3.7.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 (129) hide show
  1. package/README.md +399 -633
  2. package/dist/analytics/CrossProjectAnalytics.js +65 -65
  3. package/dist/cli/index.js +255 -12
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/dashboard/tokens.js +173 -173
  6. package/dist/db/client.d.ts.map +1 -1
  7. package/dist/db/client.js +2 -0
  8. package/dist/db/client.js.map +1 -1
  9. package/dist/db/cloud.d.ts +1 -0
  10. package/dist/db/cloud.d.ts.map +1 -1
  11. package/dist/db/drizzle-client.d.ts +2 -2
  12. package/dist/db/drizzle-client.d.ts.map +1 -1
  13. package/dist/db/drizzle-client.js +0 -1
  14. package/dist/db/drizzle-client.js.map +1 -1
  15. package/dist/db/migrations.js +256 -256
  16. package/dist/db/turso-client.js +2 -2
  17. package/dist/db/upstash-client.d.ts +9 -0
  18. package/dist/db/upstash-client.d.ts.map +1 -1
  19. package/dist/db/upstash-client.js +11 -0
  20. package/dist/db/upstash-client.js.map +1 -1
  21. package/dist/eslint/rules/no-async-useeffect.js +6 -6
  22. package/dist/experts/ExpertVotePersistence.js +9 -9
  23. package/dist/feedback/collector.d.ts.map +1 -1
  24. package/dist/feedback/collector.js +6 -2
  25. package/dist/feedback/collector.js.map +1 -1
  26. package/dist/hooks/cloud-post-tool-use.d.ts.map +1 -1
  27. package/dist/hooks/cloud-post-tool-use.js +72 -10
  28. package/dist/hooks/cloud-post-tool-use.js.map +1 -1
  29. package/dist/hooks/cloud-pre-tool-use.d.ts +12 -9
  30. package/dist/hooks/cloud-pre-tool-use.d.ts.map +1 -1
  31. package/dist/hooks/cloud-pre-tool-use.js +227 -99
  32. package/dist/hooks/cloud-pre-tool-use.js.map +1 -1
  33. package/dist/hooks/cloud-session-start.d.ts.map +1 -1
  34. package/dist/hooks/cloud-session-start.js +19 -16
  35. package/dist/hooks/cloud-session-start.js.map +1 -1
  36. package/dist/hooks/resilient-hook-runner.d.ts +78 -0
  37. package/dist/hooks/resilient-hook-runner.d.ts.map +1 -0
  38. package/dist/hooks/resilient-hook-runner.js +201 -0
  39. package/dist/hooks/resilient-hook-runner.js.map +1 -0
  40. package/dist/hooks/session-end.js +14 -14
  41. package/dist/patterns/registry.js +90 -90
  42. package/dist/registry/generator.d.ts.map +1 -1
  43. package/dist/registry/generator.js +31 -21
  44. package/dist/registry/generator.js.map +1 -1
  45. package/dist/schema/codewiki-types.d.ts +10 -10
  46. package/dist/schema/docs-types.d.ts +8 -8
  47. package/dist/schema/ecosystem-types.d.ts +12 -12
  48. package/dist/schema/expert-types.d.ts +2 -2
  49. package/dist/schema/opportunity-types.d.ts +6 -6
  50. package/dist/schema/tracking.d.ts +2 -2
  51. package/dist/services/BootstrapService.d.ts +123 -0
  52. package/dist/services/BootstrapService.d.ts.map +1 -0
  53. package/dist/services/BootstrapService.js +309 -0
  54. package/dist/services/BootstrapService.js.map +1 -0
  55. package/dist/services/CodeWikiIndexer.js +3 -3
  56. package/dist/services/ContextGenerator.js +7 -7
  57. package/dist/services/FeedbackCollector.js +11 -11
  58. package/dist/services/GitIntegration.d.ts.map +1 -1
  59. package/dist/services/GitIntegration.js +27 -23
  60. package/dist/services/GitIntegration.js.map +1 -1
  61. package/dist/services/HookVerifier.js +70 -70
  62. package/dist/services/KnowledgeGapDetector.d.ts +122 -0
  63. package/dist/services/KnowledgeGapDetector.d.ts.map +1 -0
  64. package/dist/services/KnowledgeGapDetector.js +530 -0
  65. package/dist/services/KnowledgeGapDetector.js.map +1 -0
  66. package/dist/services/ProjectScaffold.d.ts.map +1 -1
  67. package/dist/services/ProjectScaffold.js +79 -78
  68. package/dist/services/ProjectScaffold.js.map +1 -1
  69. package/dist/services/index.d.ts +4 -0
  70. package/dist/services/index.d.ts.map +1 -1
  71. package/dist/services/index.js +6 -0
  72. package/dist/services/index.js.map +1 -1
  73. package/dist/services/knowledge-graph.d.ts +121 -0
  74. package/dist/services/knowledge-graph.d.ts.map +1 -0
  75. package/dist/services/knowledge-graph.js +446 -0
  76. package/dist/services/knowledge-graph.js.map +1 -0
  77. package/dist/services/memory-router.d.ts +25 -0
  78. package/dist/services/memory-router.d.ts.map +1 -1
  79. package/dist/services/memory-router.js +236 -98
  80. package/dist/services/memory-router.js.map +1 -1
  81. package/dist/services/pattern-learning.d.ts +79 -0
  82. package/dist/services/pattern-learning.d.ts.map +1 -0
  83. package/dist/services/pattern-learning.js +312 -0
  84. package/dist/services/pattern-learning.js.map +1 -0
  85. package/dist/services/pattern-tracker.js +95 -95
  86. package/dist/services/semantic-search.d.ts.map +1 -1
  87. package/dist/services/semantic-search.js +12 -8
  88. package/dist/services/semantic-search.js.map +1 -1
  89. package/package.json +124 -116
  90. package/standards/README.md +94 -50
  91. package/standards/experts/expert-routing.md +215 -215
  92. package/standards/general/code-quality.md +86 -86
  93. package/standards/general/ecosystem.md +243 -0
  94. package/standards/general/learning-loop.md +192 -0
  95. package/standards/general/memory-usage.md +205 -205
  96. package/standards/general/project-onboarding.md +339 -0
  97. package/standards/general/sync-workflow.md +235 -235
  98. package/standards/general/workflow.md +82 -82
  99. package/standards/hooks/mandatory-tracking.md +446 -446
  100. package/standards/infrastructure/cloud-database.md +287 -287
  101. package/standards/mcp/server-design.md +243 -243
  102. package/standards/mcp/tool-patterns.md +354 -354
  103. package/standards/skills/skill-structure.md +286 -286
  104. package/standards/skills/workflow-design.md +323 -323
  105. package/standards/tools/tool-design.md +297 -297
  106. package/templates/agents/architecture-expert.md +61 -61
  107. package/templates/agents/database-expert.md +62 -62
  108. package/templates/agents/documentation-expert.md +57 -57
  109. package/templates/agents/ecosystem-expert.md +104 -0
  110. package/templates/agents/memory-expert.md +88 -88
  111. package/templates/agents/performance-expert.md +61 -61
  112. package/templates/agents/security-expert.md +59 -59
  113. package/templates/agents/ux-expert.md +63 -63
  114. package/templates/agents/worker.md +75 -75
  115. package/templates/ai-skills/SKILL_TEMPLATE.md +55 -55
  116. package/templates/claude-settings.json +72 -72
  117. package/templates/commands/experts.md +138 -138
  118. package/templates/hooks/README.md +158 -158
  119. package/templates/hooks/project.config.json.template +77 -77
  120. package/templates/hooks/settings.local.json.template +57 -57
  121. package/templates/hooks.config.json +21 -0
  122. package/templates/memory-config.json +56 -56
  123. package/templates/memory-config.schema.json +212 -212
  124. package/templates/settings.json +58 -58
  125. package/templates/skills/continue.md +205 -205
  126. package/templates/workflows/business-improvement.md +264 -264
  127. package/templates/workflows/expert-review.md +153 -153
  128. package/templates/workflows/internal-app.md +245 -245
  129. package/templates/workflows/sync-docs.md +187 -187
@@ -1,72 +1,72 @@
1
- {
2
- "$schema": "https://claude.ai/settings-schema.json",
3
- "claudeMdPath": "CLAUDE.md",
4
- "hooks": {
5
- "SessionStart": [
6
- {
7
- "matcher": "",
8
- "hooks": [
9
- {
10
- "type": "command",
11
- "command": "npx tsx node_modules/cmp-standards/dist/hooks/cloud-session-start.js"
12
- }
13
- ]
14
- }
15
- ],
16
- "PreToolUse": [
17
- {
18
- "matcher": "Edit",
19
- "hooks": [
20
- {
21
- "type": "command",
22
- "command": "npx tsx node_modules/cmp-standards/dist/hooks/cloud-pre-tool-use.js Edit"
23
- }
24
- ]
25
- },
26
- {
27
- "matcher": "Write",
28
- "hooks": [
29
- {
30
- "type": "command",
31
- "command": "npx tsx node_modules/cmp-standards/dist/hooks/cloud-pre-tool-use.js Write"
32
- }
33
- ]
34
- },
35
- {
36
- "matcher": "Task",
37
- "hooks": [
38
- {
39
- "type": "command",
40
- "command": "npx tsx node_modules/cmp-standards/dist/hooks/cloud-pre-tool-use.js Task"
41
- }
42
- ]
43
- }
44
- ],
45
- "PostToolUse": [
46
- {
47
- "matcher": "Edit",
48
- "hooks": [
49
- {
50
- "type": "command",
51
- "command": "npx tsx node_modules/cmp-standards/dist/hooks/cloud-post-tool-use.js Edit"
52
- }
53
- ]
54
- },
55
- {
56
- "matcher": "Write",
57
- "hooks": [
58
- {
59
- "type": "command",
60
- "command": "npx tsx node_modules/cmp-standards/dist/hooks/cloud-post-tool-use.js Write"
61
- }
62
- ]
63
- }
64
- ]
65
- },
66
- "plugins": {
67
- "cmp-standards": {
68
- "version": "2.2.0",
69
- "enabled": true
70
- }
71
- }
72
- }
1
+ {
2
+ "$schema": "https://claude.ai/settings-schema.json",
3
+ "claudeMdPath": "CLAUDE.md",
4
+ "hooks": {
5
+ "SessionStart": [
6
+ {
7
+ "matcher": "",
8
+ "hooks": [
9
+ {
10
+ "type": "command",
11
+ "command": "npx tsx node_modules/cmp-standards/dist/hooks/cloud-session-start.js"
12
+ }
13
+ ]
14
+ }
15
+ ],
16
+ "PreToolUse": [
17
+ {
18
+ "matcher": "Edit",
19
+ "hooks": [
20
+ {
21
+ "type": "command",
22
+ "command": "npx tsx node_modules/cmp-standards/dist/hooks/cloud-pre-tool-use.js Edit"
23
+ }
24
+ ]
25
+ },
26
+ {
27
+ "matcher": "Write",
28
+ "hooks": [
29
+ {
30
+ "type": "command",
31
+ "command": "npx tsx node_modules/cmp-standards/dist/hooks/cloud-pre-tool-use.js Write"
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "matcher": "Task",
37
+ "hooks": [
38
+ {
39
+ "type": "command",
40
+ "command": "npx tsx node_modules/cmp-standards/dist/hooks/cloud-pre-tool-use.js Task"
41
+ }
42
+ ]
43
+ }
44
+ ],
45
+ "PostToolUse": [
46
+ {
47
+ "matcher": "Edit",
48
+ "hooks": [
49
+ {
50
+ "type": "command",
51
+ "command": "npx tsx node_modules/cmp-standards/dist/hooks/cloud-post-tool-use.js Edit"
52
+ }
53
+ ]
54
+ },
55
+ {
56
+ "matcher": "Write",
57
+ "hooks": [
58
+ {
59
+ "type": "command",
60
+ "command": "npx tsx node_modules/cmp-standards/dist/hooks/cloud-post-tool-use.js Write"
61
+ }
62
+ ]
63
+ }
64
+ ]
65
+ },
66
+ "plugins": {
67
+ "cmp-standards": {
68
+ "version": "2.2.0",
69
+ "enabled": true
70
+ }
71
+ }
72
+ }
@@ -1,138 +1,138 @@
1
- ## /experts - AI Code Review System
2
-
3
- > **Purpose**: Multi-expert code review with consensus voting
4
- > **Usage**: `/experts [files or task description]`
5
-
6
- ---
7
-
8
- ## Overview
9
-
10
- The `/experts` command launches a panel of AI experts to review your code:
11
-
12
- 1. **Security Expert** - SQL injection, auth, input validation
13
- 2. **Performance Expert** - Waterfalls, N+1, lazy loading
14
- 3. **Architecture Expert** - Types, modules, SOLID principles
15
- 4. **UX Expert** - Accessibility, mobile-first, design tokens
16
- 5. **Database Expert** - Schema, migrations, queries
17
- 6. **Memory Expert** - Pattern detection, auto-improvement
18
-
19
- ---
20
-
21
- ## Usage Examples
22
-
23
- ```bash
24
- # Review specific file
25
- /experts src/components/UserForm.tsx
26
-
27
- # Review directory
28
- /experts src/server/api/routers/
29
-
30
- # Review with context
31
- /experts "Review the new authentication flow"
32
- ```
33
-
34
- ---
35
-
36
- ## How It Works
37
-
38
- ```
39
- 1. ANALYZE CODE
40
- • Detect criticality (CRITICAL vs NORMAL)
41
- • Select relevant experts
42
-
43
- 2. PARALLEL REVIEW (30-45 seconds)
44
- • Each expert reviews independently
45
- • Generates vote and findings
46
-
47
- 3. CONSENSUS VOTING
48
- • CRITICAL: Unanimity required (0 REJECT)
49
- • NORMAL: Majority required (3/5 APPROVE)
50
-
51
- 4. RESULT
52
- • APPROVED → Verification runs
53
- • REJECTED → Detailed feedback provided
54
- ```
55
-
56
- ---
57
-
58
- ## Criticality Detection
59
-
60
- Code is **CRITICAL** if it involves:
61
- - Authentication/Authorization
62
- - Financial operations
63
- - Database schema changes
64
- - External payment integrations
65
-
66
- Critical code requires **unanimous approval** (no REJECT votes).
67
-
68
- ---
69
-
70
- ## Expert Responsibilities
71
-
72
- | Expert | Checks | Rejects On |
73
- |--------|--------|------------|
74
- | Security | SQL injection, auth, validation | Any security hole |
75
- | Performance | N+1, waterfalls, bundle size | Critical perf issues |
76
- | Architecture | Types, modules, SOLID | Type violations |
77
- | UX | A11y, mobile, tokens | Missing accessibility |
78
- | Database | Schema, migrations | Data loss risk |
79
- | Memory | Patterns | Never (ABSTAIN) |
80
-
81
- ---
82
-
83
- ## Output Example
84
-
85
- ```
86
- ## Expert Review
87
- Files: 1
88
- Criticality: NORMAL
89
- Experts: Security, Performance, Architecture, UX (4)
90
-
91
- [30 seconds - parallel review]
92
-
93
- ✅ APPROVED (4/4)
94
- Security: ✓ APPROVE
95
- Performance: ✓ APPROVE
96
- Architecture: ✓ APPROVE
97
- UX: ✓ APPROVE
98
-
99
- Running verification...
100
- ✓ typecheck passed
101
- ✓ lint passed
102
-
103
- All checks passed! ✅
104
- ```
105
-
106
- ---
107
-
108
- ## When to Use
109
-
110
- ✅ **Use /experts for:**
111
- - Critical changes (auth, payments, schema)
112
- - Before submitting PRs
113
- - Large refactors
114
- - Learning (get feedback)
115
-
116
- ❌ **Don't use for:**
117
- - WIP code
118
- - Trivial changes (typos)
119
- - Generated code
120
-
121
- ---
122
-
123
- ## Advanced Options
124
-
125
- ```bash
126
- # Review specific experts only
127
- /experts src/file.ts --only security,architecture
128
-
129
- # Verbose output (show reasoning)
130
- /experts src/file.ts --verbose
131
-
132
- # Dry run (no auto-improvements)
133
- /experts src/file.ts --dry-run
134
- ```
135
-
136
- ---
137
-
138
- *Part of cmp-memory-system - MetaNautical Group*
1
+ ## /experts - AI Code Review System
2
+
3
+ > **Purpose**: Multi-expert code review with consensus voting
4
+ > **Usage**: `/experts [files or task description]`
5
+
6
+ ---
7
+
8
+ ## Overview
9
+
10
+ The `/experts` command launches a panel of AI experts to review your code:
11
+
12
+ 1. **Security Expert** - SQL injection, auth, input validation
13
+ 2. **Performance Expert** - Waterfalls, N+1, lazy loading
14
+ 3. **Architecture Expert** - Types, modules, SOLID principles
15
+ 4. **UX Expert** - Accessibility, mobile-first, design tokens
16
+ 5. **Database Expert** - Schema, migrations, queries
17
+ 6. **Memory Expert** - Pattern detection, auto-improvement
18
+
19
+ ---
20
+
21
+ ## Usage Examples
22
+
23
+ ```bash
24
+ # Review specific file
25
+ /experts src/components/UserForm.tsx
26
+
27
+ # Review directory
28
+ /experts src/server/api/routers/
29
+
30
+ # Review with context
31
+ /experts "Review the new authentication flow"
32
+ ```
33
+
34
+ ---
35
+
36
+ ## How It Works
37
+
38
+ ```
39
+ 1. ANALYZE CODE
40
+ • Detect criticality (CRITICAL vs NORMAL)
41
+ • Select relevant experts
42
+
43
+ 2. PARALLEL REVIEW (30-45 seconds)
44
+ • Each expert reviews independently
45
+ • Generates vote and findings
46
+
47
+ 3. CONSENSUS VOTING
48
+ • CRITICAL: Unanimity required (0 REJECT)
49
+ • NORMAL: Majority required (3/5 APPROVE)
50
+
51
+ 4. RESULT
52
+ • APPROVED → Verification runs
53
+ • REJECTED → Detailed feedback provided
54
+ ```
55
+
56
+ ---
57
+
58
+ ## Criticality Detection
59
+
60
+ Code is **CRITICAL** if it involves:
61
+ - Authentication/Authorization
62
+ - Financial operations
63
+ - Database schema changes
64
+ - External payment integrations
65
+
66
+ Critical code requires **unanimous approval** (no REJECT votes).
67
+
68
+ ---
69
+
70
+ ## Expert Responsibilities
71
+
72
+ | Expert | Checks | Rejects On |
73
+ |--------|--------|------------|
74
+ | Security | SQL injection, auth, validation | Any security hole |
75
+ | Performance | N+1, waterfalls, bundle size | Critical perf issues |
76
+ | Architecture | Types, modules, SOLID | Type violations |
77
+ | UX | A11y, mobile, tokens | Missing accessibility |
78
+ | Database | Schema, migrations | Data loss risk |
79
+ | Memory | Patterns | Never (ABSTAIN) |
80
+
81
+ ---
82
+
83
+ ## Output Example
84
+
85
+ ```
86
+ ## Expert Review
87
+ Files: 1
88
+ Criticality: NORMAL
89
+ Experts: Security, Performance, Architecture, UX (4)
90
+
91
+ [30 seconds - parallel review]
92
+
93
+ ✅ APPROVED (4/4)
94
+ Security: ✓ APPROVE
95
+ Performance: ✓ APPROVE
96
+ Architecture: ✓ APPROVE
97
+ UX: ✓ APPROVE
98
+
99
+ Running verification...
100
+ ✓ typecheck passed
101
+ ✓ lint passed
102
+
103
+ All checks passed! ✅
104
+ ```
105
+
106
+ ---
107
+
108
+ ## When to Use
109
+
110
+ ✅ **Use /experts for:**
111
+ - Critical changes (auth, payments, schema)
112
+ - Before submitting PRs
113
+ - Large refactors
114
+ - Learning (get feedback)
115
+
116
+ ❌ **Don't use for:**
117
+ - WIP code
118
+ - Trivial changes (typos)
119
+ - Generated code
120
+
121
+ ---
122
+
123
+ ## Advanced Options
124
+
125
+ ```bash
126
+ # Review specific experts only
127
+ /experts src/file.ts --only security,architecture
128
+
129
+ # Verbose output (show reasoning)
130
+ /experts src/file.ts --verbose
131
+
132
+ # Dry run (no auto-improvements)
133
+ /experts src/file.ts --dry-run
134
+ ```
135
+
136
+ ---
137
+
138
+ *Part of cmp-memory-system - MetaNautical Group*