specialist-agent 2.13.0 → 3.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/LICENSE +1 -1
- package/README.md +33 -207
- package/dist/catalog.json +15529 -0
- package/dist/hw-worker.mjs +254 -0
- package/dist/icones/icone.ico +0 -0
- package/dist/icones/icone.png +0 -0
- package/dist/interface/assets/figtree-latin-400-normal-g7Dtegnw.woff2 +0 -0
- package/dist/interface/assets/figtree-latin-500-normal-BWnGEVsr.woff2 +0 -0
- package/dist/interface/assets/figtree-latin-600-normal-Cv_xCTDl.woff2 +0 -0
- package/dist/interface/assets/figtree-latin-700-normal-th6qEP7c.woff2 +0 -0
- package/dist/interface/assets/figtree-latin-ext-400-normal-CXAzuTZb.woff2 +0 -0
- package/dist/interface/assets/figtree-latin-ext-500-normal-Du0rIuHj.woff2 +0 -0
- package/dist/interface/assets/figtree-latin-ext-600-normal-DJlfifZj.woff2 +0 -0
- package/dist/interface/assets/figtree-latin-ext-700-normal-CS4sQkGV.woff2 +0 -0
- package/dist/interface/assets/index-BIyqZkro.css +1 -0
- package/dist/interface/assets/index-zAegy908.js +13 -0
- package/dist/interface/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/dist/interface/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- package/dist/interface/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
- package/dist/interface/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
- package/dist/interface/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
- package/dist/interface/assets/jetbrains-mono-latin-ext-600-normal-BfB_LPfz.woff2 +0 -0
- package/dist/interface/assets/unbounded-latin-500-normal-4slEIF53.woff2 +0 -0
- package/dist/interface/assets/unbounded-latin-700-normal-CaoNriVp.woff2 +0 -0
- package/dist/interface/assets/unbounded-latin-ext-500-normal-BTIpesyw.woff2 +0 -0
- package/dist/interface/assets/unbounded-latin-ext-700-normal-BLzWLLjG.woff2 +0 -0
- package/dist/interface/icones/apple-touch-icon.png +0 -0
- package/dist/interface/icones/favicon-32.png +0 -0
- package/dist/interface/icones/icone-192.png +0 -0
- package/dist/interface/icones/icone-512.png +0 -0
- package/dist/interface/icones/icone-mascara-512.png +0 -0
- package/dist/interface/index.html +19 -0
- package/dist/interface/manifest.webmanifest +19 -0
- package/dist/interface/sw.js +63 -0
- package/dist/specialist-agent.mjs +6919 -0
- package/dist/usage-worker.mjs +174 -0
- package/package.json +32 -57
- package/.claude-plugin/marketplace.json +0 -52
- package/.claude-plugin/plugin.json +0 -37
- package/.codex/INSTALL.md +0 -145
- package/.cursor-plugin/marketplace.json +0 -52
- package/.cursor-plugin/plugin.json +0 -37
- package/.opencode/INSTALL.md +0 -127
- package/.opencode/opencode.json +0 -186
- package/agents/analyst-lite.md +0 -48
- package/agents/analyst.md +0 -396
- package/agents/api-lite.md +0 -43
- package/agents/api.md +0 -427
- package/agents/architect-lite.md +0 -104
- package/agents/architect.md +0 -571
- package/agents/autopilot-lite.md +0 -46
- package/agents/autopilot.md +0 -196
- package/agents/cloud-lite.md +0 -75
- package/agents/cloud.md +0 -213
- package/agents/data-lite.md +0 -67
- package/agents/data.md +0 -306
- package/agents/debugger-lite.md +0 -46
- package/agents/debugger.md +0 -410
- package/agents/deps-lite.md +0 -41
- package/agents/deps.md +0 -363
- package/agents/designer-lite.md +0 -67
- package/agents/designer.md +0 -195
- package/agents/devops-lite.md +0 -67
- package/agents/devops.md +0 -205
- package/agents/docs-lite.md +0 -42
- package/agents/docs.md +0 -454
- package/agents/executor-lite.md +0 -61
- package/agents/executor.md +0 -695
- package/agents/explorer-lite.md +0 -55
- package/agents/explorer.md +0 -152
- package/agents/finance-lite.md +0 -66
- package/agents/finance.md +0 -255
- package/agents/i18n-lite.md +0 -44
- package/agents/i18n.md +0 -594
- package/agents/legal-lite.md +0 -113
- package/agents/legal.md +0 -302
- package/agents/marketing-lite.md +0 -25
- package/agents/marketing.md +0 -188
- package/agents/memory.md +0 -166
- package/agents/orchestrator-lite.md +0 -40
- package/agents/orchestrator.md +0 -512
- package/agents/pair-lite.md +0 -38
- package/agents/pair.md +0 -310
- package/agents/perf-lite.md +0 -42
- package/agents/perf.md +0 -320
- package/agents/planner-lite.md +0 -59
- package/agents/planner.md +0 -272
- package/agents/product-lite.md +0 -25
- package/agents/product.md +0 -195
- package/agents/refactor-lite.md +0 -42
- package/agents/refactor.md +0 -467
- package/agents/ripple-lite.md +0 -106
- package/agents/ripple.md +0 -166
- package/agents/scout-lite.md +0 -37
- package/agents/scout.md +0 -224
- package/agents/security-lite.md +0 -66
- package/agents/security.md +0 -252
- package/agents/sentry-triage-lite.md +0 -54
- package/agents/sentry-triage.md +0 -217
- package/agents/starter-lite.md +0 -80
- package/agents/starter.md +0 -300
- package/agents/support-lite.md +0 -24
- package/agents/support.md +0 -191
- package/agents/tdd-lite.md +0 -43
- package/agents/tdd.md +0 -329
- package/agents/tester-lite.md +0 -71
- package/agents/tester.md +0 -237
- package/cli/architectures.mjs +0 -713
- package/cli/detect-architecture.mjs +0 -752
- package/cli/generate-architecture.mjs +0 -1096
- package/cli/index.mjs +0 -1217
- package/cli/recommend-architecture.mjs +0 -870
- package/hooks/after-review.mjs +0 -130
- package/hooks/after-task.mjs +0 -117
- package/hooks/before-plan.mjs +0 -155
- package/hooks/before-review.mjs +0 -139
- package/hooks/hooks.json +0 -66
- package/hooks/lifecycle.json +0 -91
- package/hooks/native/auto-dispatch.mjs +0 -207
- package/hooks/native/auto-format.mjs +0 -176
- package/hooks/native/mcp-discovery.mjs +0 -168
- package/hooks/native/security-config.json +0 -38
- package/hooks/native/security-guard.mjs +0 -323
- package/hooks/native/session-context.mjs +0 -179
- package/hooks/native/session-end.mjs +0 -42
- package/hooks/native/utils.mjs +0 -62
- package/hooks/on-error.mjs +0 -129
- package/hooks/session-end.mjs +0 -185
- package/hooks/session-start.mjs +0 -154
- package/packs/angular/ARCHITECTURE.md +0 -814
- package/packs/angular/CLAUDE.md +0 -105
- package/packs/angular/agents/builder.md +0 -113
- package/packs/angular/agents/doctor.md +0 -187
- package/packs/angular/agents/migrator.md +0 -101
- package/packs/angular/agents/reviewer.md +0 -252
- package/packs/angular/agents-lite/builder.md +0 -65
- package/packs/angular/agents-lite/doctor.md +0 -64
- package/packs/angular/agents-lite/migrator.md +0 -75
- package/packs/angular/agents-lite/reviewer.md +0 -69
- package/packs/angular/skills/dev-create-component/SKILL.md +0 -56
- package/packs/angular/skills/dev-create-injectable/SKILL.md +0 -60
- package/packs/angular/skills/dev-create-module/SKILL.md +0 -49
- package/packs/angular/skills/dev-create-service/SKILL.md +0 -34
- package/packs/angular/skills/dev-create-test/SKILL.md +0 -78
- package/packs/angular/skills/dev-generate-types/SKILL.md +0 -37
- package/packs/angular/skills/docs-onboard/SKILL.md +0 -42
- package/packs/angular/skills/migration-migrate-component/SKILL.md +0 -42
- package/packs/angular/skills/migration-migrate-module/SKILL.md +0 -25
- package/packs/angular/skills/review-check-architecture/SKILL.md +0 -67
- package/packs/angular/skills/review-fix-violations/SKILL.md +0 -43
- package/packs/angular/skills/review-review/SKILL.md +0 -43
- package/packs/astro/ARCHITECTURE.md +0 -718
- package/packs/astro/CLAUDE.md +0 -106
- package/packs/astro/agents/builder.md +0 -123
- package/packs/astro/agents/doctor.md +0 -200
- package/packs/astro/agents/migrator.md +0 -105
- package/packs/astro/agents/reviewer.md +0 -253
- package/packs/astro/agents-lite/builder.md +0 -71
- package/packs/astro/agents-lite/doctor.md +0 -66
- package/packs/astro/agents-lite/migrator.md +0 -71
- package/packs/astro/agents-lite/reviewer.md +0 -70
- package/packs/astro/skills/dev-create-component/SKILL.md +0 -50
- package/packs/astro/skills/dev-create-island/SKILL.md +0 -63
- package/packs/astro/skills/dev-create-module/SKILL.md +0 -49
- package/packs/astro/skills/dev-create-service/SKILL.md +0 -34
- package/packs/astro/skills/dev-create-test/SKILL.md +0 -76
- package/packs/astro/skills/dev-generate-types/SKILL.md +0 -37
- package/packs/astro/skills/docs-onboard/SKILL.md +0 -51
- package/packs/astro/skills/migration-migrate-component/SKILL.md +0 -48
- package/packs/astro/skills/migration-migrate-module/SKILL.md +0 -25
- package/packs/astro/skills/review-check-architecture/SKILL.md +0 -72
- package/packs/astro/skills/review-fix-violations/SKILL.md +0 -43
- package/packs/astro/skills/review-review/SKILL.md +0 -45
- package/packs/nextjs/ARCHITECTURE.md +0 -1033
- package/packs/nextjs/CLAUDE.md +0 -106
- package/packs/nextjs/agents/builder.md +0 -132
- package/packs/nextjs/agents/doctor.md +0 -226
- package/packs/nextjs/agents/migrator.md +0 -101
- package/packs/nextjs/agents/reviewer.md +0 -243
- package/packs/nextjs/agents-lite/builder.md +0 -74
- package/packs/nextjs/agents-lite/doctor.md +0 -74
- package/packs/nextjs/agents-lite/migrator.md +0 -75
- package/packs/nextjs/agents-lite/reviewer.md +0 -73
- package/packs/nextjs/skills/dev-create-component/SKILL.md +0 -82
- package/packs/nextjs/skills/dev-create-hook/SKILL.md +0 -90
- package/packs/nextjs/skills/dev-create-module/SKILL.md +0 -63
- package/packs/nextjs/skills/dev-create-service/SKILL.md +0 -35
- package/packs/nextjs/skills/dev-create-test/SKILL.md +0 -106
- package/packs/nextjs/skills/dev-generate-types/SKILL.md +0 -37
- package/packs/nextjs/skills/docs-onboard/SKILL.md +0 -55
- package/packs/nextjs/skills/migration-migrate-component/SKILL.md +0 -58
- package/packs/nextjs/skills/migration-migrate-module/SKILL.md +0 -25
- package/packs/nextjs/skills/review-check-architecture/SKILL.md +0 -101
- package/packs/nextjs/skills/review-fix-violations/SKILL.md +0 -48
- package/packs/nextjs/skills/review-review/SKILL.md +0 -47
- package/packs/nuxt/ARCHITECTURE.md +0 -831
- package/packs/nuxt/CLAUDE.md +0 -111
- package/packs/nuxt/agents/builder.md +0 -120
- package/packs/nuxt/agents/doctor.md +0 -198
- package/packs/nuxt/agents/migrator.md +0 -101
- package/packs/nuxt/agents/reviewer.md +0 -255
- package/packs/nuxt/agents-lite/builder.md +0 -67
- package/packs/nuxt/agents-lite/doctor.md +0 -67
- package/packs/nuxt/agents-lite/migrator.md +0 -80
- package/packs/nuxt/agents-lite/reviewer.md +0 -71
- package/packs/nuxt/skills/dev-create-component/SKILL.md +0 -60
- package/packs/nuxt/skills/dev-create-composable/SKILL.md +0 -33
- package/packs/nuxt/skills/dev-create-module/SKILL.md +0 -49
- package/packs/nuxt/skills/dev-create-service/SKILL.md +0 -34
- package/packs/nuxt/skills/dev-create-test/SKILL.md +0 -61
- package/packs/nuxt/skills/dev-generate-types/SKILL.md +0 -37
- package/packs/nuxt/skills/docs-onboard/SKILL.md +0 -49
- package/packs/nuxt/skills/migration-migrate-component/SKILL.md +0 -48
- package/packs/nuxt/skills/migration-migrate-module/SKILL.md +0 -25
- package/packs/nuxt/skills/review-check-architecture/SKILL.md +0 -71
- package/packs/nuxt/skills/review-fix-violations/SKILL.md +0 -43
- package/packs/nuxt/skills/review-review/SKILL.md +0 -45
- package/packs/react/ARCHITECTURE.md +0 -991
- package/packs/react/CLAUDE.md +0 -102
- package/packs/react/agents/builder.md +0 -113
- package/packs/react/agents/doctor.md +0 -203
- package/packs/react/agents/migrator.md +0 -101
- package/packs/react/agents/reviewer.md +0 -252
- package/packs/react/agents-lite/builder.md +0 -65
- package/packs/react/agents-lite/doctor.md +0 -64
- package/packs/react/agents-lite/migrator.md +0 -74
- package/packs/react/agents-lite/reviewer.md +0 -69
- package/packs/react/skills/dev-create-component/SKILL.md +0 -53
- package/packs/react/skills/dev-create-hook/SKILL.md +0 -78
- package/packs/react/skills/dev-create-module/SKILL.md +0 -51
- package/packs/react/skills/dev-create-service/SKILL.md +0 -34
- package/packs/react/skills/dev-create-test/SKILL.md +0 -92
- package/packs/react/skills/dev-generate-types/SKILL.md +0 -37
- package/packs/react/skills/docs-onboard/SKILL.md +0 -42
- package/packs/react/skills/migration-migrate-component/SKILL.md +0 -44
- package/packs/react/skills/migration-migrate-module/SKILL.md +0 -25
- package/packs/react/skills/review-check-architecture/SKILL.md +0 -73
- package/packs/react/skills/review-fix-violations/SKILL.md +0 -45
- package/packs/react/skills/review-review/SKILL.md +0 -44
- package/packs/svelte/ARCHITECTURE.md +0 -975
- package/packs/svelte/CLAUDE.md +0 -102
- package/packs/svelte/agents/builder.md +0 -114
- package/packs/svelte/agents/doctor.md +0 -174
- package/packs/svelte/agents/migrator.md +0 -101
- package/packs/svelte/agents/reviewer.md +0 -238
- package/packs/svelte/agents-lite/builder.md +0 -66
- package/packs/svelte/agents-lite/doctor.md +0 -67
- package/packs/svelte/agents-lite/migrator.md +0 -82
- package/packs/svelte/agents-lite/reviewer.md +0 -70
- package/packs/svelte/skills/dev-create-component/SKILL.md +0 -77
- package/packs/svelte/skills/dev-create-module/SKILL.md +0 -59
- package/packs/svelte/skills/dev-create-service/SKILL.md +0 -35
- package/packs/svelte/skills/dev-create-store/SKILL.md +0 -94
- package/packs/svelte/skills/dev-create-test/SKILL.md +0 -98
- package/packs/svelte/skills/dev-generate-types/SKILL.md +0 -37
- package/packs/svelte/skills/docs-onboard/SKILL.md +0 -47
- package/packs/svelte/skills/migration-migrate-component/SKILL.md +0 -51
- package/packs/svelte/skills/migration-migrate-module/SKILL.md +0 -25
- package/packs/svelte/skills/review-check-architecture/SKILL.md +0 -79
- package/packs/svelte/skills/review-fix-violations/SKILL.md +0 -47
- package/packs/svelte/skills/review-review/SKILL.md +0 -45
- package/packs/vue/ARCHITECTURE.md +0 -798
- package/packs/vue/CLAUDE.md +0 -102
- package/packs/vue/agents/builder.md +0 -112
- package/packs/vue/agents/doctor.md +0 -185
- package/packs/vue/agents/migrator.md +0 -101
- package/packs/vue/agents/reviewer.md +0 -249
- package/packs/vue/agents-lite/builder.md +0 -65
- package/packs/vue/agents-lite/doctor.md +0 -63
- package/packs/vue/agents-lite/migrator.md +0 -73
- package/packs/vue/agents-lite/reviewer.md +0 -68
- package/packs/vue/skills/dev-create-component/SKILL.md +0 -58
- package/packs/vue/skills/dev-create-composable/SKILL.md +0 -31
- package/packs/vue/skills/dev-create-module/SKILL.md +0 -50
- package/packs/vue/skills/dev-create-service/SKILL.md +0 -34
- package/packs/vue/skills/dev-create-test/SKILL.md +0 -62
- package/packs/vue/skills/dev-generate-types/SKILL.md +0 -37
- package/packs/vue/skills/docs-onboard/SKILL.md +0 -42
- package/packs/vue/skills/migration-migrate-component/SKILL.md +0 -41
- package/packs/vue/skills/migration-migrate-module/SKILL.md +0 -25
- package/packs/vue/skills/review-check-architecture/SKILL.md +0 -73
- package/packs/vue/skills/review-fix-violations/SKILL.md +0 -42
- package/packs/vue/skills/review-review/SKILL.md +0 -43
- package/skills/audit/SKILL.md +0 -231
- package/skills/autofix/SKILL.md +0 -166
- package/skills/autopilot/SKILL.md +0 -286
- package/skills/brainstorm/SKILL.md +0 -298
- package/skills/checkpoint/SKILL.md +0 -217
- package/skills/codereview/SKILL.md +0 -268
- package/skills/commit/SKILL.md +0 -150
- package/skills/copywriting/SKILL.md +0 -218
- package/skills/cro/SKILL.md +0 -234
- package/skills/debug/SKILL.md +0 -210
- package/skills/design-review/SKILL.md +0 -217
- package/skills/discovery/SKILL.md +0 -218
- package/skills/estimate/SKILL.md +0 -154
- package/skills/finish/SKILL.md +0 -220
- package/skills/grill/SKILL.md +0 -270
- package/skills/health/SKILL.md +0 -251
- package/skills/improve-architecture/SKILL.md +0 -205
- package/skills/learn/SKILL.md +0 -260
- package/skills/lint/SKILL.md +0 -126
- package/skills/migrate-architecture/SKILL.md +0 -242
- package/skills/migrate-framework/SKILL.md +0 -172
- package/skills/onboard/SKILL.md +0 -168
- package/skills/plan/SKILL.md +0 -141
- package/skills/prd/SKILL.md +0 -241
- package/skills/recall/SKILL.md +0 -112
- package/skills/remember/SKILL.md +0 -108
- package/skills/seo-audit/SKILL.md +0 -240
- package/skills/tdd/SKILL.md +0 -201
- package/skills/tutorial/SKILL.md +0 -346
- package/skills/verify/SKILL.md +0 -168
- package/skills/worktree/SKILL.md +0 -168
- package/skills/write-skill/SKILL.md +0 -225
- package/templates/autopilot/PROMPT.md +0 -39
- package/templates/autopilot/README.md +0 -122
- package/templates/autopilot/devcontainer.json +0 -21
- package/templates/industry/ecommerce.md +0 -127
- package/templates/industry/fintech.md +0 -161
- package/templates/industry/saas.md +0 -134
- package/templates/session-memory.json +0 -48
- package/templates/skill-template/SKILL.md +0 -90
package/hooks/after-review.mjs
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* After Review Hook
|
|
5
|
-
*
|
|
6
|
-
* Runs after @reviewer completes a code review.
|
|
7
|
-
*
|
|
8
|
-
* Actions:
|
|
9
|
-
* - Records review results in metrics
|
|
10
|
-
* - Logs review summary
|
|
11
|
-
* - Tracks violations and trends
|
|
12
|
-
* - Suggests next actions
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'fs';
|
|
16
|
-
|
|
17
|
-
const SESSION_FILE = '.claude/metrics/current-session.json';
|
|
18
|
-
const REVIEWS_DIR = '.claude/metrics/reviews';
|
|
19
|
-
|
|
20
|
-
// Review data passed via environment or args
|
|
21
|
-
const reviewData = {
|
|
22
|
-
scope: process.env.REVIEW_SCOPE || process.argv[2] || 'unknown',
|
|
23
|
-
verdict: process.env.REVIEW_VERDICT || process.argv[3] || 'unknown',
|
|
24
|
-
violations: parseInt(process.env.REVIEW_VIOLATIONS || process.argv[4] || '0', 10),
|
|
25
|
-
warnings: parseInt(process.env.REVIEW_WARNINGS || process.argv[5] || '0', 10),
|
|
26
|
-
highlights: parseInt(process.env.REVIEW_HIGHLIGHTS || process.argv[6] || '0', 10),
|
|
27
|
-
agent: '@reviewer',
|
|
28
|
-
timestamp: new Date().toISOString()
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
async function main() {
|
|
32
|
-
console.log(`\n──── Review Complete: ${reviewData.scope} ────`);
|
|
33
|
-
|
|
34
|
-
// 1. Log review summary
|
|
35
|
-
logSummary();
|
|
36
|
-
|
|
37
|
-
// 2. Update session metrics
|
|
38
|
-
updateSessionMetrics();
|
|
39
|
-
|
|
40
|
-
// 3. Save review record
|
|
41
|
-
saveReviewRecord();
|
|
42
|
-
|
|
43
|
-
// 4. Suggest next actions
|
|
44
|
-
suggestNextActions();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function logSummary() {
|
|
48
|
-
const verdictIcon = {
|
|
49
|
-
approved: '✓ Approved',
|
|
50
|
-
caveats: '⚠ Approved with Caveats',
|
|
51
|
-
rejected: '✗ Requires Changes',
|
|
52
|
-
unknown: '? Unknown'
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
console.log(`Verdict: ${verdictIcon[reviewData.verdict] || verdictIcon.unknown}`);
|
|
56
|
-
|
|
57
|
-
if (reviewData.violations > 0) {
|
|
58
|
-
console.log(`Violations: ${reviewData.violations}`);
|
|
59
|
-
}
|
|
60
|
-
if (reviewData.warnings > 0) {
|
|
61
|
-
console.log(`Warnings: ${reviewData.warnings}`);
|
|
62
|
-
}
|
|
63
|
-
if (reviewData.highlights > 0) {
|
|
64
|
-
console.log(`Highlights: ${reviewData.highlights}`);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// Quality score (simple heuristic)
|
|
68
|
-
const score = Math.max(0, 100 - (reviewData.violations * 15) - (reviewData.warnings * 5));
|
|
69
|
-
console.log(`Quality score: ${score}/100`);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function updateSessionMetrics() {
|
|
73
|
-
if (!existsSync(SESSION_FILE)) {
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
try {
|
|
78
|
-
const session = JSON.parse(readFileSync(SESSION_FILE, 'utf-8'));
|
|
79
|
-
|
|
80
|
-
if (!session.reviews) {
|
|
81
|
-
session.reviews = [];
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
session.reviews.push({
|
|
85
|
-
scope: reviewData.scope,
|
|
86
|
-
verdict: reviewData.verdict,
|
|
87
|
-
violations: reviewData.violations,
|
|
88
|
-
warnings: reviewData.warnings,
|
|
89
|
-
highlights: reviewData.highlights,
|
|
90
|
-
timestamp: reviewData.timestamp
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
writeFileSync(SESSION_FILE, JSON.stringify(session, null, 2));
|
|
94
|
-
console.log('\n✓ Metrics updated');
|
|
95
|
-
} catch (err) {
|
|
96
|
-
console.log(`ℹ Could not update metrics: ${err.message}`);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function saveReviewRecord() {
|
|
101
|
-
try {
|
|
102
|
-
mkdirSync(REVIEWS_DIR, { recursive: true });
|
|
103
|
-
|
|
104
|
-
const date = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
|
|
105
|
-
const filename = `${REVIEWS_DIR}/review-${date}.json`;
|
|
106
|
-
|
|
107
|
-
writeFileSync(filename, JSON.stringify(reviewData, null, 2));
|
|
108
|
-
} catch {
|
|
109
|
-
// Non-critical, ignore
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function suggestNextActions() {
|
|
114
|
-
console.log('\n──── Suggested Actions ────');
|
|
115
|
-
|
|
116
|
-
if (reviewData.verdict === 'rejected' || reviewData.violations > 0) {
|
|
117
|
-
console.log(' 1. Fix violations listed in the review');
|
|
118
|
-
console.log(' 2. Run /checkpoint create before-fixes');
|
|
119
|
-
console.log(' 3. Re-run @reviewer after fixes');
|
|
120
|
-
} else if (reviewData.verdict === 'caveats') {
|
|
121
|
-
console.log(' 1. Address warnings if time permits');
|
|
122
|
-
console.log(' 2. Proceed with merge (caveats are non-blocking)');
|
|
123
|
-
} else {
|
|
124
|
-
console.log(' 1. Ready to merge');
|
|
125
|
-
console.log(' 2. Run /finish to finalize branch');
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// Run
|
|
130
|
-
main().catch(console.error);
|
package/hooks/after-task.mjs
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* After Task Hook
|
|
5
|
-
*
|
|
6
|
-
* Runs after each task completes (from @executor or manual work).
|
|
7
|
-
*
|
|
8
|
-
* Actions:
|
|
9
|
-
* - Records task completion in metrics
|
|
10
|
-
* - Creates checkpoint if enabled
|
|
11
|
-
* - Updates token tracking
|
|
12
|
-
* - Logs progress
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { existsSync, readFileSync, writeFileSync } from 'fs';
|
|
16
|
-
|
|
17
|
-
const SESSION_FILE = '.claude/metrics/current-session.json';
|
|
18
|
-
|
|
19
|
-
// Task data passed via environment or args
|
|
20
|
-
const taskData = {
|
|
21
|
-
taskId: process.env.TASK_ID || process.argv[2] || 'unknown',
|
|
22
|
-
description: process.env.TASK_DESC || process.argv[3] || 'Task completed',
|
|
23
|
-
tokens: parseInt(process.env.TASK_TOKENS || process.argv[4] || '0', 10),
|
|
24
|
-
duration: process.env.TASK_DURATION || process.argv[5] || '0s',
|
|
25
|
-
agent: process.env.TASK_AGENT || process.argv[6] || 'manual',
|
|
26
|
-
status: process.env.TASK_STATUS || process.argv[7] || 'completed',
|
|
27
|
-
files: {
|
|
28
|
-
created: (process.env.FILES_CREATED || '').split(',').filter(Boolean),
|
|
29
|
-
modified: (process.env.FILES_MODIFIED || '').split(',').filter(Boolean)
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
async function main() {
|
|
34
|
-
console.log(`\n──── Task Complete: ${taskData.taskId} ────`);
|
|
35
|
-
|
|
36
|
-
// 1. Update session metrics
|
|
37
|
-
updateMetrics(taskData);
|
|
38
|
-
|
|
39
|
-
// 2. Log task summary
|
|
40
|
-
logTaskSummary(taskData);
|
|
41
|
-
|
|
42
|
-
// 3. Show running totals
|
|
43
|
-
showRunningTotals();
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function updateMetrics(task) {
|
|
47
|
-
if (!existsSync(SESSION_FILE)) {
|
|
48
|
-
console.log('ℹ No active session');
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
try {
|
|
53
|
-
const session = JSON.parse(readFileSync(SESSION_FILE, 'utf-8'));
|
|
54
|
-
|
|
55
|
-
// Add task to list
|
|
56
|
-
session.tasks.push({
|
|
57
|
-
id: task.taskId,
|
|
58
|
-
description: task.description,
|
|
59
|
-
agent: task.agent,
|
|
60
|
-
status: task.status,
|
|
61
|
-
tokens: task.tokens,
|
|
62
|
-
duration: task.duration,
|
|
63
|
-
completedAt: new Date().toISOString()
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
// Update token totals
|
|
67
|
-
session.tokens.estimated += task.tokens;
|
|
68
|
-
|
|
69
|
-
// Update file tracking
|
|
70
|
-
session.files.created.push(...task.files.created);
|
|
71
|
-
session.files.modified.push(...task.files.modified);
|
|
72
|
-
|
|
73
|
-
// Update agent usage
|
|
74
|
-
if (task.agent && !session.agents.includes(task.agent)) {
|
|
75
|
-
session.agents.push(task.agent);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
writeFileSync(SESSION_FILE, JSON.stringify(session, null, 2));
|
|
79
|
-
} catch (err) {
|
|
80
|
-
console.log('ℹ Could not update metrics:', err.message);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function logTaskSummary(task) {
|
|
85
|
-
console.log(`Status: ${task.status === 'completed' ? '✓' : '✗'} ${task.status}`);
|
|
86
|
-
console.log(`Agent: ${task.agent}`);
|
|
87
|
-
console.log(`Tokens: ~${task.tokens.toLocaleString()}`);
|
|
88
|
-
console.log(`Duration: ${task.duration}`);
|
|
89
|
-
|
|
90
|
-
if (task.files.created.length > 0) {
|
|
91
|
-
console.log(`Files created: ${task.files.created.length}`);
|
|
92
|
-
}
|
|
93
|
-
if (task.files.modified.length > 0) {
|
|
94
|
-
console.log(`Files modified: ${task.files.modified.length}`);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function showRunningTotals() {
|
|
99
|
-
if (!existsSync(SESSION_FILE)) {
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
try {
|
|
104
|
-
const session = JSON.parse(readFileSync(SESSION_FILE, 'utf-8'));
|
|
105
|
-
|
|
106
|
-
console.log('\n──── Session Progress ────');
|
|
107
|
-
console.log(`Tasks completed: ${session.tasks.length}`);
|
|
108
|
-
console.log(`Total tokens: ~${session.tokens.estimated.toLocaleString()}`);
|
|
109
|
-
console.log(`Estimated cost: ~$${(session.tokens.estimated * 0.000015).toFixed(2)}`);
|
|
110
|
-
console.log(`Agents used: ${session.agents.join(', ') || 'none'}`);
|
|
111
|
-
} catch {
|
|
112
|
-
// Ignore errors
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// Run
|
|
117
|
-
main().catch(console.error);
|
package/hooks/before-plan.mjs
DELETED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Before Plan Hook
|
|
5
|
-
*
|
|
6
|
-
* Runs before @planner creates an implementation plan.
|
|
7
|
-
*
|
|
8
|
-
* Actions:
|
|
9
|
-
* - Validates project structure
|
|
10
|
-
* - Checks for ARCHITECTURE.md
|
|
11
|
-
* - Detects uncommitted changes
|
|
12
|
-
* - Summarizes project state for planner context
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { execSync } from 'child_process';
|
|
16
|
-
import { existsSync, readFileSync } from 'fs';
|
|
17
|
-
|
|
18
|
-
const feature = process.env.PLAN_FEATURE || process.argv[2] || '';
|
|
19
|
-
|
|
20
|
-
async function main() {
|
|
21
|
-
console.log('──── Pre-Plan Checks ────\n');
|
|
22
|
-
|
|
23
|
-
// 1. Check architecture file
|
|
24
|
-
checkArchitecture();
|
|
25
|
-
|
|
26
|
-
// 2. Check git state
|
|
27
|
-
checkGitState();
|
|
28
|
-
|
|
29
|
-
// 3. Detect framework
|
|
30
|
-
detectFramework();
|
|
31
|
-
|
|
32
|
-
// 4. Scan project size
|
|
33
|
-
scanProjectSize();
|
|
34
|
-
|
|
35
|
-
console.log('\n──── Ready for Planning ────');
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function checkArchitecture() {
|
|
39
|
-
const paths = [
|
|
40
|
-
'docs/ARCHITECTURE.md',
|
|
41
|
-
'ARCHITECTURE.md',
|
|
42
|
-
'.claude/ARCHITECTURE.md'
|
|
43
|
-
];
|
|
44
|
-
|
|
45
|
-
const found = paths.find(p => existsSync(p));
|
|
46
|
-
|
|
47
|
-
if (found) {
|
|
48
|
-
console.log(` ✓ Architecture file: ${found}`);
|
|
49
|
-
|
|
50
|
-
try {
|
|
51
|
-
const content = readFileSync(found, 'utf-8');
|
|
52
|
-
const lines = content.split('\n').length;
|
|
53
|
-
console.log(` ${lines} lines of architecture patterns`);
|
|
54
|
-
} catch {
|
|
55
|
-
// Ignore read errors
|
|
56
|
-
}
|
|
57
|
-
} else {
|
|
58
|
-
console.log(' ⚠ No ARCHITECTURE.md found');
|
|
59
|
-
console.log(' @planner will use generic patterns');
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function checkGitState() {
|
|
64
|
-
console.log('Checking git state...');
|
|
65
|
-
try {
|
|
66
|
-
execSync('git rev-parse --git-dir', { stdio: 'pipe' });
|
|
67
|
-
|
|
68
|
-
// Current branch
|
|
69
|
-
const branch = execSync('git branch --show-current', { encoding: 'utf-8' }).trim();
|
|
70
|
-
console.log(` Branch: ${branch}`);
|
|
71
|
-
|
|
72
|
-
// Uncommitted changes
|
|
73
|
-
const status = execSync('git status --porcelain', { encoding: 'utf-8' }).trim();
|
|
74
|
-
const changedFiles = status.split('\n').filter(Boolean);
|
|
75
|
-
|
|
76
|
-
if (changedFiles.length > 0) {
|
|
77
|
-
console.log(` ⚠ Uncommitted changes: ${changedFiles.length} files`);
|
|
78
|
-
console.log(' Consider committing or stashing before planning');
|
|
79
|
-
} else {
|
|
80
|
-
console.log(' ✓ Working tree clean');
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// Recent commits for context
|
|
84
|
-
const recentCommits = execSync('git log --oneline -5', { encoding: 'utf-8' }).trim();
|
|
85
|
-
if (recentCommits) {
|
|
86
|
-
console.log(' Recent commits:');
|
|
87
|
-
recentCommits.split('\n').forEach(c => console.log(` ${c}`));
|
|
88
|
-
}
|
|
89
|
-
} catch {
|
|
90
|
-
console.log(' ℹ Not a git repository');
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function detectFramework() {
|
|
95
|
-
console.log('Detecting framework...');
|
|
96
|
-
|
|
97
|
-
if (!existsSync('package.json')) {
|
|
98
|
-
console.log(' ℹ No package.json found');
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
try {
|
|
103
|
-
const pkg = JSON.parse(readFileSync('package.json', 'utf-8'));
|
|
104
|
-
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
105
|
-
|
|
106
|
-
const frameworks = [];
|
|
107
|
-
if (deps['next']) frameworks.push(`Next.js ${deps['next']}`);
|
|
108
|
-
if (deps['react'] && !deps['next']) frameworks.push(`React ${deps['react']}`);
|
|
109
|
-
if (deps['vue']) frameworks.push(`Vue ${deps['vue']}`);
|
|
110
|
-
if (deps['svelte'] || deps['@sveltejs/kit']) frameworks.push('SvelteKit');
|
|
111
|
-
|
|
112
|
-
if (frameworks.length > 0) {
|
|
113
|
-
console.log(` ✓ Framework: ${frameworks.join(', ')}`);
|
|
114
|
-
} else {
|
|
115
|
-
console.log(' ℹ No recognized framework');
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// Check for TypeScript
|
|
119
|
-
if (deps['typescript'] || existsSync('tsconfig.json')) {
|
|
120
|
-
console.log(' ✓ TypeScript enabled');
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// Check for test framework
|
|
124
|
-
if (deps['vitest']) console.log(' ✓ Test runner: Vitest');
|
|
125
|
-
else if (deps['jest']) console.log(' ✓ Test runner: Jest');
|
|
126
|
-
} catch {
|
|
127
|
-
console.log(' ℹ Could not parse package.json');
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
function scanProjectSize() {
|
|
132
|
-
console.log('Scanning project...');
|
|
133
|
-
try {
|
|
134
|
-
// Count source files (excluding node_modules, dist, .next, etc.)
|
|
135
|
-
const result = execSync(
|
|
136
|
-
'find . -type f \\( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -o -name "*.vue" -o -name "*.svelte" \\) ' +
|
|
137
|
-
'-not -path "*/node_modules/*" -not -path "*/.next/*" -not -path "*/dist/*" -not -path "*/.nuxt/*" 2>/dev/null | wc -l',
|
|
138
|
-
{ encoding: 'utf-8' }
|
|
139
|
-
).trim();
|
|
140
|
-
|
|
141
|
-
const fileCount = parseInt(result, 10);
|
|
142
|
-
if (fileCount > 0) {
|
|
143
|
-
console.log(` Source files: ${fileCount}`);
|
|
144
|
-
|
|
145
|
-
if (fileCount < 20) console.log(' Scale: Small project');
|
|
146
|
-
else if (fileCount < 100) console.log(' Scale: Medium project');
|
|
147
|
-
else console.log(' Scale: Large project');
|
|
148
|
-
}
|
|
149
|
-
} catch {
|
|
150
|
-
console.log(' ℹ Could not scan project');
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
// Run
|
|
155
|
-
main().catch(console.error);
|
package/hooks/before-review.mjs
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Before Review Hook
|
|
5
|
-
*
|
|
6
|
-
* Runs before @reviewer starts a code review.
|
|
7
|
-
*
|
|
8
|
-
* Actions:
|
|
9
|
-
* - Runs automated checks (lint, types)
|
|
10
|
-
* - Identifies files to review
|
|
11
|
-
* - Prepares context for reviewer
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
import { execSync } from 'child_process';
|
|
15
|
-
import { existsSync } from 'fs';
|
|
16
|
-
|
|
17
|
-
const reviewScope = process.env.REVIEW_SCOPE || process.argv[2] || '.';
|
|
18
|
-
|
|
19
|
-
async function main() {
|
|
20
|
-
console.log('──── Pre-Review Checks ────\n');
|
|
21
|
-
|
|
22
|
-
// 1. Run linter
|
|
23
|
-
runLint();
|
|
24
|
-
|
|
25
|
-
// 2. Run TypeScript check
|
|
26
|
-
runTypeCheck();
|
|
27
|
-
|
|
28
|
-
// 3. Identify changed files
|
|
29
|
-
identifyChanges();
|
|
30
|
-
|
|
31
|
-
// 4. Quick test run (if fast)
|
|
32
|
-
runQuickTests();
|
|
33
|
-
|
|
34
|
-
console.log('\n──── Ready for Review ────');
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function runLint() {
|
|
38
|
-
console.log('Running lint...');
|
|
39
|
-
try {
|
|
40
|
-
execSync('npm run lint 2>&1 || true', { encoding: 'utf-8', stdio: 'pipe' });
|
|
41
|
-
console.log(' ✓ Lint passed');
|
|
42
|
-
} catch (err) {
|
|
43
|
-
const output = err.stdout || err.message;
|
|
44
|
-
if (output.includes('error')) {
|
|
45
|
-
console.log(' ⚠ Lint warnings/errors found');
|
|
46
|
-
console.log(' Run "npm run lint" for details');
|
|
47
|
-
} else {
|
|
48
|
-
console.log(' ✓ Lint passed');
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function runTypeCheck() {
|
|
54
|
-
console.log('Running TypeScript check...');
|
|
55
|
-
try {
|
|
56
|
-
execSync('npx tsc --noEmit 2>&1', { encoding: 'utf-8', stdio: 'pipe' });
|
|
57
|
-
console.log(' ✓ TypeScript passed');
|
|
58
|
-
} catch (err) {
|
|
59
|
-
const output = err.stdout || err.message;
|
|
60
|
-
if (output.includes('error')) {
|
|
61
|
-
const errorCount = (output.match(/error TS/g) || []).length;
|
|
62
|
-
console.log(` ✗ TypeScript errors: ${errorCount}`);
|
|
63
|
-
console.log(' Run "npx tsc --noEmit" for details');
|
|
64
|
-
} else {
|
|
65
|
-
console.log(' ✓ TypeScript passed');
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function identifyChanges() {
|
|
71
|
-
console.log('Identifying changes...');
|
|
72
|
-
try {
|
|
73
|
-
// Check if in git repo
|
|
74
|
-
execSync('git rev-parse --git-dir', { stdio: 'pipe' });
|
|
75
|
-
|
|
76
|
-
// Get changed files
|
|
77
|
-
const staged = execSync('git diff --cached --name-only', { encoding: 'utf-8' }).trim();
|
|
78
|
-
const unstaged = execSync('git diff --name-only', { encoding: 'utf-8' }).trim();
|
|
79
|
-
|
|
80
|
-
const stagedFiles = staged.split('\n').filter(Boolean);
|
|
81
|
-
const unstagedFiles = unstaged.split('\n').filter(Boolean);
|
|
82
|
-
|
|
83
|
-
if (stagedFiles.length > 0) {
|
|
84
|
-
console.log(` Staged files: ${stagedFiles.length}`);
|
|
85
|
-
stagedFiles.slice(0, 5).forEach(f => console.log(` • ${f}`));
|
|
86
|
-
if (stagedFiles.length > 5) {
|
|
87
|
-
console.log(` ... and ${stagedFiles.length - 5} more`);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
if (unstagedFiles.length > 0) {
|
|
92
|
-
console.log(` Unstaged files: ${unstagedFiles.length}`);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
if (stagedFiles.length === 0 && unstagedFiles.length === 0) {
|
|
96
|
-
// Check against main branch
|
|
97
|
-
const branchDiff = execSync('git diff main --name-only 2>/dev/null || git diff master --name-only 2>/dev/null || true', {
|
|
98
|
-
encoding: 'utf-8'
|
|
99
|
-
}).trim();
|
|
100
|
-
|
|
101
|
-
const branchFiles = branchDiff.split('\n').filter(Boolean);
|
|
102
|
-
if (branchFiles.length > 0) {
|
|
103
|
-
console.log(` Files changed vs main: ${branchFiles.length}`);
|
|
104
|
-
branchFiles.slice(0, 5).forEach(f => console.log(` • ${f}`));
|
|
105
|
-
if (branchFiles.length > 5) {
|
|
106
|
-
console.log(` ... and ${branchFiles.length - 5} more`);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
} catch {
|
|
111
|
-
console.log(' ℹ Not a git repository or no changes');
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function runQuickTests() {
|
|
116
|
-
// Only run if tests are fast (< 30s typically)
|
|
117
|
-
if (!existsSync('package.json')) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
console.log('Running quick test check...');
|
|
122
|
-
try {
|
|
123
|
-
// Just check if tests exist and can start
|
|
124
|
-
const result = execSync('npm test -- --listTests 2>&1 || true', {
|
|
125
|
-
encoding: 'utf-8',
|
|
126
|
-
timeout: 10000
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
const testCount = (result.match(/test/gi) || []).length;
|
|
130
|
-
if (testCount > 0) {
|
|
131
|
-
console.log(` ✓ Test suite ready (${testCount} test files)`);
|
|
132
|
-
}
|
|
133
|
-
} catch {
|
|
134
|
-
console.log(' ℹ Tests not configured or timed out');
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// Run
|
|
139
|
-
main().catch(console.error);
|
package/hooks/hooks.json
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"hooks": {
|
|
3
|
-
"PreToolUse": [
|
|
4
|
-
{
|
|
5
|
-
"matcher": "Bash",
|
|
6
|
-
"hooks": [
|
|
7
|
-
{
|
|
8
|
-
"type": "command",
|
|
9
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/security-guard.mjs",
|
|
10
|
-
"timeout": 5
|
|
11
|
-
}
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
"UserPromptSubmit": [
|
|
16
|
-
{
|
|
17
|
-
"hooks": [
|
|
18
|
-
{
|
|
19
|
-
"type": "command",
|
|
20
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/auto-dispatch.mjs",
|
|
21
|
-
"timeout": 3
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
"SessionStart": [
|
|
27
|
-
{
|
|
28
|
-
"hooks": [
|
|
29
|
-
{
|
|
30
|
-
"type": "command",
|
|
31
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/session-context.mjs",
|
|
32
|
-
"timeout": 5
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"type": "command",
|
|
36
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/mcp-discovery.mjs",
|
|
37
|
-
"timeout": 5
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"PostToolUse": [
|
|
43
|
-
{
|
|
44
|
-
"matcher": "Write|Edit",
|
|
45
|
-
"hooks": [
|
|
46
|
-
{
|
|
47
|
-
"type": "command",
|
|
48
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/auto-format.mjs",
|
|
49
|
-
"timeout": 15
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
"Stop": [
|
|
55
|
-
{
|
|
56
|
-
"hooks": [
|
|
57
|
-
{
|
|
58
|
-
"type": "command",
|
|
59
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/session-end.mjs",
|
|
60
|
-
"timeout": 5
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
}
|
package/hooks/lifecycle.json
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://specialist-agent.dev/schemas/hooks-v1.json",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "Specialist Agent internal lifecycle hooks (used by agents, not by Claude Code plugin system)",
|
|
5
|
-
"hooks": {
|
|
6
|
-
"session-start": {
|
|
7
|
-
"description": "Runs when a new Claude Code session starts",
|
|
8
|
-
"scripts": [
|
|
9
|
-
"./hooks/session-start.mjs"
|
|
10
|
-
],
|
|
11
|
-
"enabled": true
|
|
12
|
-
},
|
|
13
|
-
"before-plan": {
|
|
14
|
-
"description": "Runs before @planner creates a plan",
|
|
15
|
-
"scripts": [
|
|
16
|
-
"./hooks/before-plan.mjs"
|
|
17
|
-
],
|
|
18
|
-
"enabled": true
|
|
19
|
-
},
|
|
20
|
-
"after-task": {
|
|
21
|
-
"description": "Runs after each task completes (from @executor)",
|
|
22
|
-
"scripts": [
|
|
23
|
-
"./hooks/after-task.mjs"
|
|
24
|
-
],
|
|
25
|
-
"enabled": true
|
|
26
|
-
},
|
|
27
|
-
"on-error": {
|
|
28
|
-
"description": "Runs when an agent encounters an error",
|
|
29
|
-
"scripts": [
|
|
30
|
-
"./hooks/on-error.mjs"
|
|
31
|
-
],
|
|
32
|
-
"enabled": true
|
|
33
|
-
},
|
|
34
|
-
"before-review": {
|
|
35
|
-
"description": "Runs before @reviewer starts review",
|
|
36
|
-
"scripts": [
|
|
37
|
-
"./hooks/before-review.mjs"
|
|
38
|
-
],
|
|
39
|
-
"enabled": true
|
|
40
|
-
},
|
|
41
|
-
"after-review": {
|
|
42
|
-
"description": "Runs after @reviewer completes review",
|
|
43
|
-
"scripts": [
|
|
44
|
-
"./hooks/after-review.mjs"
|
|
45
|
-
],
|
|
46
|
-
"enabled": true
|
|
47
|
-
},
|
|
48
|
-
"session-end": {
|
|
49
|
-
"description": "Runs when session ends (if detectable)",
|
|
50
|
-
"scripts": [
|
|
51
|
-
"./hooks/session-end.mjs"
|
|
52
|
-
],
|
|
53
|
-
"enabled": true
|
|
54
|
-
},
|
|
55
|
-
"before-iteration": {
|
|
56
|
-
"description": "Runs before each autopilot iteration starts",
|
|
57
|
-
"scripts": [],
|
|
58
|
-
"enabled": true
|
|
59
|
-
},
|
|
60
|
-
"after-iteration": {
|
|
61
|
-
"description": "Runs after each autopilot iteration completes",
|
|
62
|
-
"scripts": [],
|
|
63
|
-
"enabled": true
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"metrics": {
|
|
67
|
-
"enabled": true,
|
|
68
|
-
"outputDir": ".claude/metrics",
|
|
69
|
-
"track": {
|
|
70
|
-
"tokens": true,
|
|
71
|
-
"duration": true,
|
|
72
|
-
"agents": true,
|
|
73
|
-
"skills": true,
|
|
74
|
-
"files": true,
|
|
75
|
-
"checkpoints": true
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
"notifications": {
|
|
79
|
-
"enabled": false,
|
|
80
|
-
"channels": {
|
|
81
|
-
"slack": {
|
|
82
|
-
"webhook": "",
|
|
83
|
-
"events": ["on-error", "session-end"]
|
|
84
|
-
},
|
|
85
|
-
"discord": {
|
|
86
|
-
"webhook": "",
|
|
87
|
-
"events": ["on-error"]
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|