@cloudstreamsoftware/claude-tools 1.0.0 → 1.2.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.
- package/README.md +152 -37
- package/agents/INDEX.md +183 -0
- package/agents/architect.md +247 -0
- package/agents/build-error-resolver.md +555 -0
- package/agents/catalyst-deployer.md +132 -0
- package/agents/code-reviewer.md +121 -0
- package/agents/compliance-auditor.md +148 -0
- package/agents/creator-architect.md +395 -0
- package/agents/deluge-reviewer.md +98 -0
- package/agents/doc-updater.md +471 -0
- package/agents/e2e-runner.md +711 -0
- package/agents/planner.md +122 -0
- package/agents/refactor-cleaner.md +309 -0
- package/agents/security-reviewer.md +582 -0
- package/agents/tdd-guide.md +302 -0
- package/bin/cloudstream-setup.js +16 -6
- package/config/versions.json +63 -0
- package/dist/hooks/hooks.json +209 -0
- package/dist/index.js +47 -0
- package/dist/lib/asset-value.js +609 -0
- package/dist/lib/client-manager.js +300 -0
- package/dist/lib/command-matcher.js +242 -0
- package/dist/lib/cross-session-patterns.js +754 -0
- package/dist/lib/intent-classifier.js +1075 -0
- package/dist/lib/package-manager.js +374 -0
- package/dist/lib/recommendation-engine.js +597 -0
- package/dist/lib/session-memory.js +489 -0
- package/dist/lib/skill-effectiveness.js +486 -0
- package/dist/lib/skill-matcher.js +595 -0
- package/dist/lib/tutorial-metrics.js +242 -0
- package/dist/lib/tutorial-progress.js +209 -0
- package/dist/lib/tutorial-renderer.js +431 -0
- package/dist/lib/utils.js +380 -0
- package/dist/lib/verify-formatter.js +143 -0
- package/dist/lib/workflow-state.js +249 -0
- package/hooks/hooks.json +209 -0
- package/package.json +5 -1
- package/scripts/aggregate-sessions.js +290 -0
- package/scripts/branch-name-validator.js +291 -0
- package/scripts/build.js +101 -0
- package/scripts/commands/client-switch.js +231 -0
- package/scripts/deprecate-skill.js +610 -0
- package/scripts/diagnose.js +324 -0
- package/scripts/doc-freshness.js +168 -0
- package/scripts/generate-weekly-digest.js +393 -0
- package/scripts/health-check.js +270 -0
- package/scripts/hooks/credential-check.js +101 -0
- package/scripts/hooks/evaluate-session.js +81 -0
- package/scripts/hooks/pre-compact.js +66 -0
- package/scripts/hooks/prompt-analyzer.js +276 -0
- package/scripts/hooks/prompt-router.js +422 -0
- package/scripts/hooks/quality-gate-enforcer.js +371 -0
- package/scripts/hooks/session-end.js +156 -0
- package/scripts/hooks/session-start.js +195 -0
- package/scripts/hooks/skill-injector.js +333 -0
- package/scripts/hooks/suggest-compact.js +58 -0
- package/scripts/lib/asset-value.js +609 -0
- package/scripts/lib/client-manager.js +300 -0
- package/scripts/lib/command-matcher.js +242 -0
- package/scripts/lib/cross-session-patterns.js +754 -0
- package/scripts/lib/intent-classifier.js +1075 -0
- package/scripts/lib/package-manager.js +374 -0
- package/scripts/lib/recommendation-engine.js +597 -0
- package/scripts/lib/session-memory.js +489 -0
- package/scripts/lib/skill-effectiveness.js +486 -0
- package/scripts/lib/skill-matcher.js +595 -0
- package/scripts/lib/tutorial-metrics.js +242 -0
- package/scripts/lib/tutorial-progress.js +209 -0
- package/scripts/lib/tutorial-renderer.js +431 -0
- package/scripts/lib/utils.js +380 -0
- package/scripts/lib/verify-formatter.js +143 -0
- package/scripts/lib/workflow-state.js +249 -0
- package/scripts/onboard.js +363 -0
- package/scripts/quarterly-report.js +692 -0
- package/scripts/setup-package-manager.js +204 -0
- package/scripts/sync-upstream.js +391 -0
- package/scripts/test.js +108 -0
- package/scripts/tutorial-runner.js +351 -0
- package/scripts/validate-all.js +201 -0
- package/scripts/verifiers/agents.js +245 -0
- package/scripts/verifiers/config.js +186 -0
- package/scripts/verifiers/environment.js +123 -0
- package/scripts/verifiers/hooks.js +188 -0
- package/scripts/verifiers/index.js +38 -0
- package/scripts/verifiers/persistence.js +140 -0
- package/scripts/verifiers/plugin.js +215 -0
- package/scripts/verifiers/skills.js +209 -0
- package/scripts/verify-setup.js +164 -0
- package/skills/INDEX.md +157 -0
- package/skills/backend-patterns/SKILL.md +586 -0
- package/skills/backend-patterns/catalyst-patterns.md +128 -0
- package/skills/bigquery-patterns/SKILL.md +27 -0
- package/skills/bigquery-patterns/performance-optimization.md +518 -0
- package/skills/bigquery-patterns/query-patterns.md +372 -0
- package/skills/bigquery-patterns/schema-design.md +78 -0
- package/skills/cloudstream-project-template/SKILL.md +20 -0
- package/skills/cloudstream-project-template/structure.md +65 -0
- package/skills/coding-standards/SKILL.md +524 -0
- package/skills/coding-standards/deluge-standards.md +83 -0
- package/skills/compliance-patterns/SKILL.md +28 -0
- package/skills/compliance-patterns/hipaa/audit-requirements.md +251 -0
- package/skills/compliance-patterns/hipaa/baa-process.md +298 -0
- package/skills/compliance-patterns/hipaa/data-archival-strategy.md +387 -0
- package/skills/compliance-patterns/hipaa/phi-handling.md +52 -0
- package/skills/compliance-patterns/pci-dss/saq-a-requirements.md +307 -0
- package/skills/compliance-patterns/pci-dss/tokenization-patterns.md +382 -0
- package/skills/compliance-patterns/pci-dss/zoho-checkout-patterns.md +56 -0
- package/skills/compliance-patterns/soc2/access-controls.md +344 -0
- package/skills/compliance-patterns/soc2/audit-logging.md +458 -0
- package/skills/compliance-patterns/soc2/change-management.md +403 -0
- package/skills/compliance-patterns/soc2/deluge-execution-logging.md +407 -0
- package/skills/consultancy-workflows/SKILL.md +19 -0
- package/skills/consultancy-workflows/client-isolation.md +21 -0
- package/skills/consultancy-workflows/documentation-automation.md +454 -0
- package/skills/consultancy-workflows/handoff-procedures.md +257 -0
- package/skills/consultancy-workflows/knowledge-capture.md +513 -0
- package/skills/consultancy-workflows/time-tracking.md +26 -0
- package/skills/continuous-learning/SKILL.md +84 -0
- package/skills/continuous-learning/config.json +18 -0
- package/skills/continuous-learning/evaluate-session.sh +60 -0
- package/skills/continuous-learning-v2/SKILL.md +126 -0
- package/skills/continuous-learning-v2/config.json +61 -0
- package/skills/frontend-patterns/SKILL.md +635 -0
- package/skills/frontend-patterns/zoho-widget-patterns.md +103 -0
- package/skills/gcp-data-engineering/SKILL.md +36 -0
- package/skills/gcp-data-engineering/bigquery/performance-optimization.md +337 -0
- package/skills/gcp-data-engineering/dataflow/error-handling.md +496 -0
- package/skills/gcp-data-engineering/dataflow/pipeline-patterns.md +444 -0
- package/skills/gcp-data-engineering/dbt/model-organization.md +63 -0
- package/skills/gcp-data-engineering/dbt/testing-patterns.md +503 -0
- package/skills/gcp-data-engineering/medallion-architecture/bronze-layer.md +60 -0
- package/skills/gcp-data-engineering/medallion-architecture/gold-layer.md +311 -0
- package/skills/gcp-data-engineering/medallion-architecture/layer-transitions.md +517 -0
- package/skills/gcp-data-engineering/medallion-architecture/silver-layer.md +305 -0
- package/skills/gcp-data-engineering/zoho-to-gcp/data-extraction.md +543 -0
- package/skills/gcp-data-engineering/zoho-to-gcp/real-time-vs-batch.md +337 -0
- package/skills/security-review/SKILL.md +498 -0
- package/skills/security-review/compliance-checklist.md +53 -0
- package/skills/strategic-compact/SKILL.md +67 -0
- package/skills/tdd-workflow/SKILL.md +413 -0
- package/skills/tdd-workflow/zoho-testing.md +124 -0
- package/skills/tutorial/SKILL.md +249 -0
- package/skills/tutorial/docs/ACCESSIBILITY.md +169 -0
- package/skills/tutorial/lessons/00-philosophy-and-workflow.md +198 -0
- package/skills/tutorial/lessons/01-basics.md +81 -0
- package/skills/tutorial/lessons/02-training.md +86 -0
- package/skills/tutorial/lessons/03-commands.md +109 -0
- package/skills/tutorial/lessons/04-workflows.md +115 -0
- package/skills/tutorial/lessons/05-compliance.md +116 -0
- package/skills/tutorial/lessons/06-zoho.md +121 -0
- package/skills/tutorial/lessons/07-hooks-system.md +277 -0
- package/skills/tutorial/lessons/08-mcp-servers.md +316 -0
- package/skills/tutorial/lessons/09-client-management.md +215 -0
- package/skills/tutorial/lessons/10-testing-e2e.md +260 -0
- package/skills/tutorial/lessons/11-skills-deep-dive.md +272 -0
- package/skills/tutorial/lessons/12-rules-system.md +326 -0
- package/skills/tutorial/lessons/13-golden-standard-graduation.md +213 -0
- package/skills/tutorial/lessons/14-fork-setup-and-sync.md +312 -0
- package/skills/tutorial/lessons/15-living-examples-system.md +221 -0
- package/skills/tutorial/tracks/accelerated/README.md +134 -0
- package/skills/tutorial/tracks/accelerated/assessment/checkpoint-1.md +161 -0
- package/skills/tutorial/tracks/accelerated/assessment/checkpoint-2.md +175 -0
- package/skills/tutorial/tracks/accelerated/day-1-core-concepts.md +234 -0
- package/skills/tutorial/tracks/accelerated/day-2-essential-commands.md +270 -0
- package/skills/tutorial/tracks/accelerated/day-3-workflow-mastery.md +305 -0
- package/skills/tutorial/tracks/accelerated/day-4-compliance-zoho.md +304 -0
- package/skills/tutorial/tracks/accelerated/day-5-hooks-skills.md +344 -0
- package/skills/tutorial/tracks/accelerated/day-6-client-testing.md +386 -0
- package/skills/tutorial/tracks/accelerated/day-7-graduation.md +369 -0
- package/skills/zoho-patterns/CHANGELOG.md +108 -0
- package/skills/zoho-patterns/SKILL.md +446 -0
- package/skills/zoho-patterns/analytics/dashboard-patterns.md +352 -0
- package/skills/zoho-patterns/analytics/zoho-to-bigquery-pipeline.md +427 -0
- package/skills/zoho-patterns/catalyst/appsail-deployment.md +349 -0
- package/skills/zoho-patterns/catalyst/context-close-patterns.md +354 -0
- package/skills/zoho-patterns/catalyst/cron-batch-processing.md +374 -0
- package/skills/zoho-patterns/catalyst/function-patterns.md +439 -0
- package/skills/zoho-patterns/creator/form-design.md +304 -0
- package/skills/zoho-patterns/creator/publish-api-patterns.md +313 -0
- package/skills/zoho-patterns/creator/widget-integration.md +306 -0
- package/skills/zoho-patterns/creator/workflow-automation.md +253 -0
- package/skills/zoho-patterns/deluge/api-patterns.md +468 -0
- package/skills/zoho-patterns/deluge/batch-processing.md +403 -0
- package/skills/zoho-patterns/deluge/cross-app-integration.md +356 -0
- package/skills/zoho-patterns/deluge/error-handling.md +423 -0
- package/skills/zoho-patterns/deluge/syntax-reference.md +65 -0
- package/skills/zoho-patterns/integration/cors-proxy-architecture.md +426 -0
- package/skills/zoho-patterns/integration/crm-books-native-sync.md +277 -0
- package/skills/zoho-patterns/integration/oauth-token-management.md +461 -0
- package/skills/zoho-patterns/integration/zoho-flow-patterns.md +334 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skills Verifier - Dynamic skill validation using versions.json as source of truth
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const { createCheck, createResult, SEVERITY } = require('../lib/verify-formatter');
|
|
8
|
+
const { getPluginRoot } = require('./plugin');
|
|
9
|
+
|
|
10
|
+
const NAME = 'Skills';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Load versions.json registry
|
|
14
|
+
*/
|
|
15
|
+
function loadRegistry() {
|
|
16
|
+
const pluginRoot = getPluginRoot();
|
|
17
|
+
const versionsPath = path.join(pluginRoot, 'config', 'versions.json');
|
|
18
|
+
|
|
19
|
+
try {
|
|
20
|
+
const content = fs.readFileSync(versionsPath, 'utf8');
|
|
21
|
+
return JSON.parse(content);
|
|
22
|
+
} catch {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Get active skills from registry
|
|
29
|
+
*/
|
|
30
|
+
function getRegisteredSkills(versions) {
|
|
31
|
+
if (!versions || !versions.skills) return [];
|
|
32
|
+
|
|
33
|
+
return Object.entries(versions.skills)
|
|
34
|
+
.filter(([, info]) => info.status === 'active')
|
|
35
|
+
.map(([name]) => name);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Get existing skill directories
|
|
40
|
+
*/
|
|
41
|
+
function getExistingSkills() {
|
|
42
|
+
const pluginRoot = getPluginRoot();
|
|
43
|
+
const skillsDir = path.join(pluginRoot, 'skills');
|
|
44
|
+
|
|
45
|
+
if (!fs.existsSync(skillsDir)) return [];
|
|
46
|
+
|
|
47
|
+
return fs.readdirSync(skillsDir).filter((f) => {
|
|
48
|
+
const fullPath = path.join(skillsDir, f);
|
|
49
|
+
return fs.statSync(fullPath).isDirectory();
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Check registry vs disk bidirectionally
|
|
55
|
+
*/
|
|
56
|
+
function checkRegistrySync() {
|
|
57
|
+
const versions = loadRegistry();
|
|
58
|
+
const checks = [];
|
|
59
|
+
|
|
60
|
+
if (!versions) {
|
|
61
|
+
return [
|
|
62
|
+
createCheck('Skills registry', false, {
|
|
63
|
+
severity: SEVERITY.CRITICAL,
|
|
64
|
+
message: 'cannot load versions.json',
|
|
65
|
+
remediation: 'Fix or create config/versions.json',
|
|
66
|
+
}),
|
|
67
|
+
];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const registered = getRegisteredSkills(versions);
|
|
71
|
+
const existing = getExistingSkills();
|
|
72
|
+
|
|
73
|
+
// Check: All registered skills exist on disk
|
|
74
|
+
const missing = registered.filter((s) => !existing.includes(s));
|
|
75
|
+
if (missing.length > 0) {
|
|
76
|
+
checks.push(
|
|
77
|
+
createCheck('Registered skills exist', false, {
|
|
78
|
+
severity: SEVERITY.WARNING,
|
|
79
|
+
message: `missing: ${missing.slice(0, 3).join(', ')}${missing.length > 3 ? '...' : ''}`,
|
|
80
|
+
remediation: `Create missing skill directories or update versions.json`,
|
|
81
|
+
})
|
|
82
|
+
);
|
|
83
|
+
} else {
|
|
84
|
+
checks.push(
|
|
85
|
+
createCheck('Registered skills exist', true, {
|
|
86
|
+
message: `${registered.length} verified`,
|
|
87
|
+
})
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Check: All existing skills are registered
|
|
92
|
+
const unregistered = existing.filter((s) => !registered.includes(s));
|
|
93
|
+
// Exclude common non-skill directories
|
|
94
|
+
const filteredUnregistered = unregistered.filter(
|
|
95
|
+
(s) => !['node_modules', '.git', 'dist'].includes(s)
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
if (filteredUnregistered.length > 0) {
|
|
99
|
+
checks.push(
|
|
100
|
+
createCheck('Skills are registered', false, {
|
|
101
|
+
severity: SEVERITY.WARNING,
|
|
102
|
+
message: `unregistered: ${filteredUnregistered.slice(0, 3).join(', ')}${filteredUnregistered.length > 3 ? '...' : ''}`,
|
|
103
|
+
remediation: `Add skills to versions.json or remove directories`,
|
|
104
|
+
})
|
|
105
|
+
);
|
|
106
|
+
} else {
|
|
107
|
+
checks.push(
|
|
108
|
+
createCheck('Skills are registered', true, {
|
|
109
|
+
message: `${existing.length} on disk`,
|
|
110
|
+
})
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return checks;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Check each skill has SKILL.md
|
|
119
|
+
*/
|
|
120
|
+
function checkSkillFiles() {
|
|
121
|
+
const pluginRoot = getPluginRoot();
|
|
122
|
+
const skillsDir = path.join(pluginRoot, 'skills');
|
|
123
|
+
const checks = [];
|
|
124
|
+
|
|
125
|
+
if (!fs.existsSync(skillsDir)) {
|
|
126
|
+
return [
|
|
127
|
+
createCheck('SKILL.md files', false, {
|
|
128
|
+
severity: SEVERITY.WARNING,
|
|
129
|
+
message: 'skills/ directory not found',
|
|
130
|
+
}),
|
|
131
|
+
];
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const skills = fs.readdirSync(skillsDir).filter((f) => {
|
|
135
|
+
const fullPath = path.join(skillsDir, f);
|
|
136
|
+
return fs.statSync(fullPath).isDirectory();
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
let hasSkillMd = 0;
|
|
140
|
+
let missingSkillMd = [];
|
|
141
|
+
|
|
142
|
+
for (const skill of skills) {
|
|
143
|
+
const skillMdPath = path.join(skillsDir, skill, 'SKILL.md');
|
|
144
|
+
if (fs.existsSync(skillMdPath)) {
|
|
145
|
+
hasSkillMd++;
|
|
146
|
+
} else {
|
|
147
|
+
missingSkillMd.push(skill);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (missingSkillMd.length > 0) {
|
|
152
|
+
checks.push(
|
|
153
|
+
createCheck('SKILL.md files', false, {
|
|
154
|
+
severity: SEVERITY.WARNING,
|
|
155
|
+
message: `${missingSkillMd.length} missing`,
|
|
156
|
+
remediation: `Add SKILL.md to: ${missingSkillMd.slice(0, 3).join(', ')}${missingSkillMd.length > 3 ? '...' : ''}`,
|
|
157
|
+
})
|
|
158
|
+
);
|
|
159
|
+
} else {
|
|
160
|
+
checks.push(
|
|
161
|
+
createCheck('SKILL.md files', true, {
|
|
162
|
+
message: `${hasSkillMd}/${skills.length} present`,
|
|
163
|
+
})
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return checks;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Check skill-matcher.js loads
|
|
172
|
+
*/
|
|
173
|
+
function checkSkillMatcher() {
|
|
174
|
+
const pluginRoot = getPluginRoot();
|
|
175
|
+
const matcherPath = path.join(pluginRoot, 'scripts', 'lib', 'skill-matcher.js');
|
|
176
|
+
|
|
177
|
+
if (!fs.existsSync(matcherPath)) {
|
|
178
|
+
return createCheck('skill-matcher.js', false, {
|
|
179
|
+
severity: SEVERITY.WARNING,
|
|
180
|
+
message: 'not found',
|
|
181
|
+
remediation: 'Create scripts/lib/skill-matcher.js',
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
try {
|
|
186
|
+
// Try to require the module (validates syntax and basic structure)
|
|
187
|
+
require(matcherPath);
|
|
188
|
+
return createCheck('skill-matcher.js', true, {
|
|
189
|
+
message: 'loads ok',
|
|
190
|
+
});
|
|
191
|
+
} catch (err) {
|
|
192
|
+
return createCheck('skill-matcher.js', false, {
|
|
193
|
+
severity: SEVERITY.WARNING,
|
|
194
|
+
message: err.message.slice(0, 40),
|
|
195
|
+
remediation: 'Fix errors in skill-matcher.js',
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Run all skills checks
|
|
202
|
+
*/
|
|
203
|
+
function verify() {
|
|
204
|
+
const checks = [...checkRegistrySync(), ...checkSkillFiles(), checkSkillMatcher()];
|
|
205
|
+
|
|
206
|
+
return createResult(NAME, checks);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
module.exports = { verify, NAME };
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Verify Setup - Main orchestrator for CloudStream Claude Code verification
|
|
5
|
+
*
|
|
6
|
+
* Runs modular verifiers to validate the plugin installation and configuration.
|
|
7
|
+
* Following patterns from health-check.js and diagnose.js.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* node scripts/verify-setup.js # Full verification
|
|
11
|
+
* node scripts/verify-setup.js --quick # Skip deep checks
|
|
12
|
+
* node scripts/verify-setup.js --json # JSON output for CI/CD
|
|
13
|
+
* node scripts/verify-setup.js --module=hooks # Single module
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const verifiers = require('./verifiers');
|
|
17
|
+
const {
|
|
18
|
+
formatHeader,
|
|
19
|
+
formatSection,
|
|
20
|
+
formatIssues,
|
|
21
|
+
formatSummary,
|
|
22
|
+
SEVERITY,
|
|
23
|
+
} = require('./lib/verify-formatter');
|
|
24
|
+
|
|
25
|
+
// Parse command line arguments
|
|
26
|
+
const args = process.argv.slice(2);
|
|
27
|
+
const options = {
|
|
28
|
+
quick: args.includes('--quick'),
|
|
29
|
+
json: args.includes('--json'),
|
|
30
|
+
verbose: args.includes('--verbose'),
|
|
31
|
+
module: args.find((a) => a.startsWith('--module='))?.split('=')[1] || null,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Log to stderr (visible to user)
|
|
36
|
+
*/
|
|
37
|
+
function log(message) {
|
|
38
|
+
if (!options.json) {
|
|
39
|
+
console.error(message);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Run all verifiers in dependency order
|
|
45
|
+
*/
|
|
46
|
+
async function runVerifiers() {
|
|
47
|
+
const results = [];
|
|
48
|
+
const allIssues = [];
|
|
49
|
+
let totalPassed = 0;
|
|
50
|
+
let totalWarned = 0;
|
|
51
|
+
let totalFailed = 0;
|
|
52
|
+
|
|
53
|
+
// Determine which modules to run
|
|
54
|
+
let modulesToRun = verifiers.executionOrder;
|
|
55
|
+
if (options.module) {
|
|
56
|
+
if (!verifiers.executionOrder.includes(options.module)) {
|
|
57
|
+
log(`Unknown module: ${options.module}`);
|
|
58
|
+
log(`Available modules: ${verifiers.executionOrder.join(', ')}`);
|
|
59
|
+
process.exit(2);
|
|
60
|
+
}
|
|
61
|
+
modulesToRun = [options.module];
|
|
62
|
+
} else if (options.quick) {
|
|
63
|
+
// Quick mode: only critical checks
|
|
64
|
+
modulesToRun = ['environment', 'persistence', 'plugin'];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Print header
|
|
68
|
+
log(formatHeader('CloudStream Claude Code - Setup Verifier'));
|
|
69
|
+
|
|
70
|
+
// Run each verifier
|
|
71
|
+
for (const moduleName of modulesToRun) {
|
|
72
|
+
try {
|
|
73
|
+
const verifier = verifiers[moduleName];
|
|
74
|
+
if (!verifier || typeof verifier.verify !== 'function') {
|
|
75
|
+
log(`\n Skipping ${moduleName}: no verify function`);
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const result = verifier.verify();
|
|
80
|
+
results.push(result);
|
|
81
|
+
|
|
82
|
+
// Aggregate counts
|
|
83
|
+
totalPassed += result.passed;
|
|
84
|
+
totalWarned += result.warned;
|
|
85
|
+
totalFailed += result.failed;
|
|
86
|
+
|
|
87
|
+
// Collect issues
|
|
88
|
+
for (const issue of result.issues) {
|
|
89
|
+
allIssues.push({
|
|
90
|
+
module: moduleName,
|
|
91
|
+
...issue,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Print section
|
|
96
|
+
log(formatSection(result.name, result.checks));
|
|
97
|
+
} catch (err) {
|
|
98
|
+
log(`\n Error running ${moduleName}: ${err.message}`);
|
|
99
|
+
totalFailed++;
|
|
100
|
+
allIssues.push({
|
|
101
|
+
module: moduleName,
|
|
102
|
+
name: `${moduleName} verifier failed`,
|
|
103
|
+
severity: SEVERITY.CRITICAL,
|
|
104
|
+
message: err.message,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Print issues
|
|
110
|
+
if (allIssues.length > 0) {
|
|
111
|
+
log(formatIssues(allIssues));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Print summary
|
|
115
|
+
log(formatSummary(totalPassed, totalWarned, totalFailed));
|
|
116
|
+
|
|
117
|
+
// JSON output for CI/CD
|
|
118
|
+
if (options.json) {
|
|
119
|
+
const output = {
|
|
120
|
+
success: totalFailed === 0,
|
|
121
|
+
summary: {
|
|
122
|
+
passed: totalPassed,
|
|
123
|
+
warned: totalWarned,
|
|
124
|
+
failed: totalFailed,
|
|
125
|
+
total: totalPassed + totalWarned + totalFailed,
|
|
126
|
+
},
|
|
127
|
+
modules: results.map((r) => ({
|
|
128
|
+
name: r.name,
|
|
129
|
+
passed: r.passed,
|
|
130
|
+
warned: r.warned,
|
|
131
|
+
failed: r.failed,
|
|
132
|
+
checks: r.checks.map((c) => ({
|
|
133
|
+
name: c.name,
|
|
134
|
+
passed: c.passed,
|
|
135
|
+
severity: c.severity,
|
|
136
|
+
message: c.message,
|
|
137
|
+
})),
|
|
138
|
+
})),
|
|
139
|
+
issues: allIssues.map((i) => ({
|
|
140
|
+
module: i.module,
|
|
141
|
+
name: i.name,
|
|
142
|
+
severity: i.severity,
|
|
143
|
+
message: i.message,
|
|
144
|
+
remediation: i.remediation,
|
|
145
|
+
})),
|
|
146
|
+
};
|
|
147
|
+
console.log(JSON.stringify(output, null, 2));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Exit code: 0=pass, 1=warnings only, 2=critical failures
|
|
151
|
+
if (totalFailed > 0) {
|
|
152
|
+
process.exit(2);
|
|
153
|
+
} else if (totalWarned > 0) {
|
|
154
|
+
process.exit(1);
|
|
155
|
+
} else {
|
|
156
|
+
process.exit(0);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Run verification
|
|
161
|
+
runVerifiers().catch((err) => {
|
|
162
|
+
log(`\nFatal error: ${err.message}`);
|
|
163
|
+
process.exit(2);
|
|
164
|
+
});
|
package/skills/INDEX.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Skills Index
|
|
2
|
+
|
|
3
|
+
Central reference for all 15 active skills available in CloudStream Claude Tools.
|
|
4
|
+
|
|
5
|
+
> **Note:** 2 skills are archived (tracked in [config/versions.json](../config/versions.json)): eval-harness, verification-loop
|
|
6
|
+
|
|
7
|
+
## Quick Reference
|
|
8
|
+
|
|
9
|
+
| Skill | Description | Auto-Activation |
|
|
10
|
+
|-------|-------------|-----------------|
|
|
11
|
+
| [backend-patterns](./backend-patterns/SKILL.md) | Backend architecture, API design, Node.js | Backend file types |
|
|
12
|
+
| [bigquery-patterns](./bigquery-patterns/SKILL.md) | BigQuery optimization, medallion architecture | BigQuery queries, .sql files |
|
|
13
|
+
| [cloudstream-project-template](./cloudstream-project-template/SKILL.md) | Project structure, client onboarding | New project setup |
|
|
14
|
+
| [coding-standards](./coding-standards/SKILL.md) | Universal coding best practices | All code files |
|
|
15
|
+
| [compliance-patterns](./compliance-patterns/SKILL.md) | HIPAA, SOC2, PCI-DSS patterns | Compliance mode active |
|
|
16
|
+
| [consultancy-workflows](./consultancy-workflows/SKILL.md) | Client management, time tracking | Client context |
|
|
17
|
+
| [continuous-learning](./continuous-learning/SKILL.md) | Pattern extraction, skill capture | Session end |
|
|
18
|
+
| [continuous-learning-v2](./continuous-learning-v2/SKILL.md) | Instinct-based learning, evolution | Session hooks |
|
|
19
|
+
| [frontend-patterns](./frontend-patterns/SKILL.md) | React, Next.js, UI patterns | Frontend file types |
|
|
20
|
+
| [gcp-data-engineering](./gcp-data-engineering/SKILL.md) | GCP, Dataflow, dbt patterns | GCP/data tasks |
|
|
21
|
+
| [security-review](./security-review/SKILL.md) | Security checklist, vulnerability detection | Auth, secrets, APIs |
|
|
22
|
+
| [strategic-compact](./strategic-compact/SKILL.md) | Context preservation guidance | Long sessions |
|
|
23
|
+
| [tdd-workflow](./tdd-workflow/SKILL.md) | Test-driven development enforcement | Feature development |
|
|
24
|
+
| [tutorial](./tutorial/SKILL.md) | Interactive system tutorial | /tutorial command |
|
|
25
|
+
| [zoho-patterns](./zoho-patterns/SKILL.md) | Zoho Creator, Catalyst, Deluge | Zoho development |
|
|
26
|
+
|
|
27
|
+
## Skills by Category
|
|
28
|
+
|
|
29
|
+
### Platform-Specific
|
|
30
|
+
|
|
31
|
+
| Skill | Platform | Key Patterns |
|
|
32
|
+
|-------|----------|--------------|
|
|
33
|
+
| [zoho-patterns](./zoho-patterns/SKILL.md) | Zoho Creator, Catalyst | Forms, workflows, Deluge scripts |
|
|
34
|
+
| [bigquery-patterns](./bigquery-patterns/SKILL.md) | Google BigQuery | Schema design, query optimization |
|
|
35
|
+
| [gcp-data-engineering](./gcp-data-engineering/SKILL.md) | Google Cloud | Dataflow, dbt, medallion architecture |
|
|
36
|
+
|
|
37
|
+
### Development Workflow
|
|
38
|
+
|
|
39
|
+
| Skill | Purpose | When Activated |
|
|
40
|
+
|-------|---------|----------------|
|
|
41
|
+
| [tdd-workflow](./tdd-workflow/SKILL.md) | Test-first development | Writing features, fixing bugs |
|
|
42
|
+
|
|
43
|
+
### Code Quality
|
|
44
|
+
|
|
45
|
+
| Skill | Purpose | Scope |
|
|
46
|
+
|-------|---------|-------|
|
|
47
|
+
| [coding-standards](./coding-standards/SKILL.md) | Universal standards | All code |
|
|
48
|
+
| [backend-patterns](./backend-patterns/SKILL.md) | Server-side patterns | Node.js, APIs |
|
|
49
|
+
| [frontend-patterns](./frontend-patterns/SKILL.md) | Client-side patterns | React, Next.js |
|
|
50
|
+
| [security-review](./security-review/SKILL.md) | Security checks | Auth, input, secrets |
|
|
51
|
+
|
|
52
|
+
### Compliance
|
|
53
|
+
|
|
54
|
+
| Skill | Standards | When Required |
|
|
55
|
+
|-------|-----------|---------------|
|
|
56
|
+
| [compliance-patterns](./compliance-patterns/SKILL.md) | HIPAA, SOC2, PCI-DSS | Compliance mode active |
|
|
57
|
+
|
|
58
|
+
### Consultancy
|
|
59
|
+
|
|
60
|
+
| Skill | Purpose | Use Case |
|
|
61
|
+
|-------|---------|----------|
|
|
62
|
+
| [consultancy-workflows](./consultancy-workflows/SKILL.md) | Client management | Multi-client work |
|
|
63
|
+
| [cloudstream-project-template](./cloudstream-project-template/SKILL.md) | Project setup | New clients |
|
|
64
|
+
| [continuous-learning](./continuous-learning/SKILL.md) | Knowledge capture | Session end |
|
|
65
|
+
| [continuous-learning-v2](./continuous-learning-v2/SKILL.md) | Instinct-based learning | Automated patterns |
|
|
66
|
+
|
|
67
|
+
### System
|
|
68
|
+
|
|
69
|
+
| Skill | Purpose | Activation |
|
|
70
|
+
|-------|---------|------------|
|
|
71
|
+
| [tutorial](./tutorial/SKILL.md) | Onboarding | New users |
|
|
72
|
+
| [strategic-compact](./strategic-compact/SKILL.md) | Context management | Long sessions |
|
|
73
|
+
|
|
74
|
+
## Skill Lifecycle
|
|
75
|
+
|
|
76
|
+
Skills progress through these stages:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
learned/ (local only)
|
|
80
|
+
↓ /skill-submit
|
|
81
|
+
shared/ (team repo, review pending)
|
|
82
|
+
↓ PR approved
|
|
83
|
+
active (team-wide)
|
|
84
|
+
↓ Quarterly review
|
|
85
|
+
deprecated (flagged for removal)
|
|
86
|
+
↓ Grace period
|
|
87
|
+
archived (removed)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Status Values
|
|
91
|
+
|
|
92
|
+
| Status | Meaning |
|
|
93
|
+
|--------|---------|
|
|
94
|
+
| `active` | Currently used, fully supported |
|
|
95
|
+
| `deprecated` | Flagged for removal, grace period |
|
|
96
|
+
| `experimental` | Under evaluation |
|
|
97
|
+
| `archived` | No longer available |
|
|
98
|
+
|
|
99
|
+
## Auto-Injection System
|
|
100
|
+
|
|
101
|
+
Skills are automatically injected based on:
|
|
102
|
+
|
|
103
|
+
1. **File patterns** - Working on `.ds` triggers Deluge skills
|
|
104
|
+
2. **Technology detection** - BigQuery imports trigger GCP skills
|
|
105
|
+
3. **Compliance mode** - HIPAA mode activates compliance skills
|
|
106
|
+
4. **Keyword matching** - Terms like "batch processing" trigger relevant patterns
|
|
107
|
+
|
|
108
|
+
The skill-injector hook manages this automatically via:
|
|
109
|
+
- `scripts/hooks/skill-injector.js`
|
|
110
|
+
- `scripts/lib/skill-matcher.js`
|
|
111
|
+
|
|
112
|
+
## Skill Structure
|
|
113
|
+
|
|
114
|
+
Each skill directory contains:
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
skills/[skill-name]/
|
|
118
|
+
├── SKILL.md # Main skill document (required)
|
|
119
|
+
├── examples/ # Code examples (optional)
|
|
120
|
+
├── templates/ # Reusable templates (optional)
|
|
121
|
+
└── lessons/ # Tutorial lessons (tutorial only)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Required Frontmatter
|
|
125
|
+
|
|
126
|
+
```yaml
|
|
127
|
+
---
|
|
128
|
+
name: skill-name
|
|
129
|
+
description: Brief description
|
|
130
|
+
version: 1.0.0
|
|
131
|
+
status: active
|
|
132
|
+
introduced: 1.0.0
|
|
133
|
+
lastUpdated: YYYY-MM-DD
|
|
134
|
+
activation: (optional) Context triggers
|
|
135
|
+
---
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Related
|
|
139
|
+
|
|
140
|
+
- [Commands Index](../commands/INDEX.md) - Commands that invoke skills
|
|
141
|
+
- [Agents Index](../agents/INDEX.md) - Agents that use skills
|
|
142
|
+
- [Rules Index](../rules/INDEX.md) - Rules that enforce standards
|
|
143
|
+
|
|
144
|
+
## Skill Commands
|
|
145
|
+
|
|
146
|
+
| Command | Purpose |
|
|
147
|
+
|---------|---------|
|
|
148
|
+
| `/learn` | Extract patterns from current session |
|
|
149
|
+
| `/skill-create` | Generate SKILL.md from git history |
|
|
150
|
+
| `/skill-sync` | Pull shared skills from team repo |
|
|
151
|
+
| `/skill-submit` | Submit skill for team review |
|
|
152
|
+
| `/quarterly-review` | Review skill effectiveness |
|
|
153
|
+
| `/instinct-status` | View learned instincts with confidence |
|
|
154
|
+
| `/instinct-export` | Export instincts for sharing |
|
|
155
|
+
| `/instinct-import` | Import instincts from teammates |
|
|
156
|
+
| `/evolve` | Cluster instincts into commands/skills/agents |
|
|
157
|
+
| `/eval` | Eval-driven development workflow |
|