aw-ecc 1.4.21
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/.agents/skills/api-design/SKILL.md +523 -0
- package/.agents/skills/api-design/agents/openai.yaml +7 -0
- package/.agents/skills/article-writing/SKILL.md +85 -0
- package/.agents/skills/article-writing/agents/openai.yaml +7 -0
- package/.agents/skills/backend-patterns/SKILL.md +598 -0
- package/.agents/skills/backend-patterns/agents/openai.yaml +7 -0
- package/.agents/skills/bun-runtime/SKILL.md +84 -0
- package/.agents/skills/bun-runtime/agents/openai.yaml +7 -0
- package/.agents/skills/claude-api/SKILL.md +337 -0
- package/.agents/skills/claude-api/agents/openai.yaml +7 -0
- package/.agents/skills/coding-standards/SKILL.md +530 -0
- package/.agents/skills/coding-standards/agents/openai.yaml +7 -0
- package/.agents/skills/content-engine/SKILL.md +88 -0
- package/.agents/skills/content-engine/agents/openai.yaml +7 -0
- package/.agents/skills/crosspost/SKILL.md +188 -0
- package/.agents/skills/crosspost/agents/openai.yaml +7 -0
- package/.agents/skills/deep-research/SKILL.md +155 -0
- package/.agents/skills/deep-research/agents/openai.yaml +7 -0
- package/.agents/skills/dmux-workflows/SKILL.md +144 -0
- package/.agents/skills/dmux-workflows/agents/openai.yaml +7 -0
- package/.agents/skills/documentation-lookup/SKILL.md +90 -0
- package/.agents/skills/documentation-lookup/agents/openai.yaml +7 -0
- package/.agents/skills/e2e-testing/SKILL.md +326 -0
- package/.agents/skills/e2e-testing/agents/openai.yaml +7 -0
- package/.agents/skills/eval-harness/SKILL.md +236 -0
- package/.agents/skills/eval-harness/agents/openai.yaml +7 -0
- package/.agents/skills/everything-claude-code/SKILL.md +442 -0
- package/.agents/skills/everything-claude-code/agents/openai.yaml +6 -0
- package/.agents/skills/exa-search/SKILL.md +170 -0
- package/.agents/skills/exa-search/agents/openai.yaml +7 -0
- package/.agents/skills/fal-ai-media/SKILL.md +277 -0
- package/.agents/skills/fal-ai-media/agents/openai.yaml +7 -0
- package/.agents/skills/frontend-patterns/SKILL.md +642 -0
- package/.agents/skills/frontend-patterns/agents/openai.yaml +7 -0
- package/.agents/skills/frontend-slides/SKILL.md +184 -0
- package/.agents/skills/frontend-slides/STYLE_PRESETS.md +330 -0
- package/.agents/skills/frontend-slides/agents/openai.yaml +7 -0
- package/.agents/skills/investor-materials/SKILL.md +96 -0
- package/.agents/skills/investor-materials/agents/openai.yaml +7 -0
- package/.agents/skills/investor-outreach/SKILL.md +76 -0
- package/.agents/skills/investor-outreach/agents/openai.yaml +7 -0
- package/.agents/skills/market-research/SKILL.md +75 -0
- package/.agents/skills/market-research/agents/openai.yaml +7 -0
- package/.agents/skills/mcp-server-patterns/SKILL.md +67 -0
- package/.agents/skills/nextjs-turbopack/SKILL.md +44 -0
- package/.agents/skills/nextjs-turbopack/agents/openai.yaml +7 -0
- package/.agents/skills/security-review/SKILL.md +495 -0
- package/.agents/skills/security-review/agents/openai.yaml +7 -0
- package/.agents/skills/strategic-compact/SKILL.md +103 -0
- package/.agents/skills/strategic-compact/agents/openai.yaml +7 -0
- package/.agents/skills/tdd-workflow/SKILL.md +410 -0
- package/.agents/skills/tdd-workflow/agents/openai.yaml +7 -0
- package/.agents/skills/verification-loop/SKILL.md +126 -0
- package/.agents/skills/verification-loop/agents/openai.yaml +7 -0
- package/.agents/skills/video-editing/SKILL.md +308 -0
- package/.agents/skills/video-editing/agents/openai.yaml +7 -0
- package/.agents/skills/x-api/SKILL.md +214 -0
- package/.agents/skills/x-api/agents/openai.yaml +7 -0
- package/.claude-plugin/README.md +17 -0
- package/.claude-plugin/plugin.json +24 -0
- package/.codex/AGENTS.md +93 -0
- package/.codex/INSTALL.md +64 -0
- package/.codex/agents/docs-researcher.toml +9 -0
- package/.codex/agents/explorer.toml +9 -0
- package/.codex/agents/reviewer.toml +9 -0
- package/.codex/config.toml +108 -0
- package/.codex/hooks/aw-post-tool-use.sh +5 -0
- package/.codex/hooks/aw-pre-tool-use.sh +5 -0
- package/.codex/hooks/aw-session-start.sh +21 -0
- package/.codex/hooks/aw-stop.sh +5 -0
- package/.codex/hooks/aw-user-prompt-submit.sh +9 -0
- package/.codex/hooks.json +62 -0
- package/.cursor/INSTALL.md +40 -0
- package/.cursor/hooks/adapter.js +120 -0
- package/.cursor/hooks/after-file-edit.js +11 -0
- package/.cursor/hooks/after-mcp-execution.js +11 -0
- package/.cursor/hooks/after-shell-execution.js +11 -0
- package/.cursor/hooks/after-tab-file-edit.js +12 -0
- package/.cursor/hooks/aw-phase-adapter.js +43 -0
- package/.cursor/hooks/before-mcp-execution.js +11 -0
- package/.cursor/hooks/before-read-file.js +13 -0
- package/.cursor/hooks/before-shell-execution.js +11 -0
- package/.cursor/hooks/before-submit-prompt.js +41 -0
- package/.cursor/hooks/before-tab-file-read.js +13 -0
- package/.cursor/hooks/pre-compact.js +11 -0
- package/.cursor/hooks/session-end.js +11 -0
- package/.cursor/hooks/session-start.js +11 -0
- package/.cursor/hooks/shared/aw-phase-definitions.js +190 -0
- package/.cursor/hooks/shared/aw-phase-runner.js +61 -0
- package/.cursor/hooks/shared/session-start.sh +20 -0
- package/.cursor/hooks/shared/user-prompt-submit.sh +155 -0
- package/.cursor/hooks/stop.js +11 -0
- package/.cursor/hooks/subagent-start.js +10 -0
- package/.cursor/hooks/subagent-stop.js +10 -0
- package/.cursor/hooks.json +115 -0
- package/.cursor/rules/common-agents.md +53 -0
- package/.cursor/rules/common-coding-style.md +52 -0
- package/.cursor/rules/common-development-workflow.md +33 -0
- package/.cursor/rules/common-git-workflow.md +28 -0
- package/.cursor/rules/common-hooks.md +34 -0
- package/.cursor/rules/common-patterns.md +35 -0
- package/.cursor/rules/common-performance.md +59 -0
- package/.cursor/rules/common-security.md +33 -0
- package/.cursor/rules/common-testing.md +33 -0
- package/.cursor/rules/golang-coding-style.md +31 -0
- package/.cursor/rules/golang-hooks.md +16 -0
- package/.cursor/rules/golang-patterns.md +44 -0
- package/.cursor/rules/golang-security.md +33 -0
- package/.cursor/rules/golang-testing.md +30 -0
- package/.cursor/rules/kotlin-coding-style.md +39 -0
- package/.cursor/rules/kotlin-hooks.md +16 -0
- package/.cursor/rules/kotlin-patterns.md +50 -0
- package/.cursor/rules/kotlin-security.md +58 -0
- package/.cursor/rules/kotlin-testing.md +38 -0
- package/.cursor/rules/php-coding-style.md +25 -0
- package/.cursor/rules/php-hooks.md +21 -0
- package/.cursor/rules/php-patterns.md +23 -0
- package/.cursor/rules/php-security.md +24 -0
- package/.cursor/rules/php-testing.md +26 -0
- package/.cursor/rules/python-coding-style.md +42 -0
- package/.cursor/rules/python-hooks.md +19 -0
- package/.cursor/rules/python-patterns.md +39 -0
- package/.cursor/rules/python-security.md +30 -0
- package/.cursor/rules/python-testing.md +38 -0
- package/.cursor/rules/swift-coding-style.md +47 -0
- package/.cursor/rules/swift-hooks.md +20 -0
- package/.cursor/rules/swift-patterns.md +66 -0
- package/.cursor/rules/swift-security.md +33 -0
- package/.cursor/rules/swift-testing.md +45 -0
- package/.cursor/rules/typescript-coding-style.md +63 -0
- package/.cursor/rules/typescript-hooks.md +20 -0
- package/.cursor/rules/typescript-patterns.md +50 -0
- package/.cursor/rules/typescript-security.md +26 -0
- package/.cursor/rules/typescript-testing.md +16 -0
- package/.cursor/skills/article-writing/SKILL.md +85 -0
- package/.cursor/skills/bun-runtime/SKILL.md +84 -0
- package/.cursor/skills/content-engine/SKILL.md +88 -0
- package/.cursor/skills/documentation-lookup/SKILL.md +90 -0
- package/.cursor/skills/frontend-slides/SKILL.md +184 -0
- package/.cursor/skills/frontend-slides/STYLE_PRESETS.md +330 -0
- package/.cursor/skills/investor-materials/SKILL.md +96 -0
- package/.cursor/skills/investor-outreach/SKILL.md +76 -0
- package/.cursor/skills/market-research/SKILL.md +75 -0
- package/.cursor/skills/mcp-server-patterns/SKILL.md +67 -0
- package/.cursor/skills/nextjs-turbopack/SKILL.md +44 -0
- package/.opencode/MIGRATION.md +368 -0
- package/.opencode/README.md +204 -0
- package/.opencode/commands/build-fix.md +56 -0
- package/.opencode/commands/checkpoint.md +67 -0
- package/.opencode/commands/code-review.md +68 -0
- package/.opencode/commands/e2e.md +105 -0
- package/.opencode/commands/eval.md +88 -0
- package/.opencode/commands/evolve.md +36 -0
- package/.opencode/commands/go-build.md +87 -0
- package/.opencode/commands/go-review.md +71 -0
- package/.opencode/commands/go-test.md +131 -0
- package/.opencode/commands/harness-audit.md +71 -0
- package/.opencode/commands/instinct-export.md +93 -0
- package/.opencode/commands/instinct-import.md +88 -0
- package/.opencode/commands/instinct-status.md +29 -0
- package/.opencode/commands/learn.md +61 -0
- package/.opencode/commands/loop-start.md +32 -0
- package/.opencode/commands/loop-status.md +24 -0
- package/.opencode/commands/model-route.md +26 -0
- package/.opencode/commands/orchestrate.md +88 -0
- package/.opencode/commands/plan.md +49 -0
- package/.opencode/commands/projects.md +23 -0
- package/.opencode/commands/promote.md +23 -0
- package/.opencode/commands/quality-gate.md +29 -0
- package/.opencode/commands/refactor-clean.md +102 -0
- package/.opencode/commands/rust-build.md +78 -0
- package/.opencode/commands/rust-review.md +65 -0
- package/.opencode/commands/rust-test.md +104 -0
- package/.opencode/commands/security.md +89 -0
- package/.opencode/commands/setup-pm.md +67 -0
- package/.opencode/commands/skill-create.md +117 -0
- package/.opencode/commands/tdd.md +66 -0
- package/.opencode/commands/test-coverage.md +80 -0
- package/.opencode/commands/update-codemaps.md +81 -0
- package/.opencode/commands/update-docs.md +67 -0
- package/.opencode/commands/verify.md +67 -0
- package/.opencode/index.ts +79 -0
- package/.opencode/instructions/INSTRUCTIONS.md +337 -0
- package/.opencode/opencode.json +319 -0
- package/.opencode/package.json +70 -0
- package/.opencode/plugins/ecc-hooks.ts +455 -0
- package/.opencode/plugins/index.ts +12 -0
- package/.opencode/prompts/agents/architect.txt +175 -0
- package/.opencode/prompts/agents/build-error-resolver.txt +233 -0
- package/.opencode/prompts/agents/code-reviewer.txt +103 -0
- package/.opencode/prompts/agents/database-reviewer.txt +247 -0
- package/.opencode/prompts/agents/doc-updater.txt +192 -0
- package/.opencode/prompts/agents/e2e-runner.txt +305 -0
- package/.opencode/prompts/agents/go-build-resolver.txt +325 -0
- package/.opencode/prompts/agents/go-reviewer.txt +241 -0
- package/.opencode/prompts/agents/planner.txt +112 -0
- package/.opencode/prompts/agents/refactor-cleaner.txt +241 -0
- package/.opencode/prompts/agents/rust-build-resolver.txt +93 -0
- package/.opencode/prompts/agents/rust-reviewer.txt +61 -0
- package/.opencode/prompts/agents/security-reviewer.txt +207 -0
- package/.opencode/prompts/agents/tdd-guide.txt +211 -0
- package/.opencode/tools/check-coverage.ts +170 -0
- package/.opencode/tools/format-code.ts +68 -0
- package/.opencode/tools/git-summary.ts +54 -0
- package/.opencode/tools/index.ts +13 -0
- package/.opencode/tools/lint-check.ts +85 -0
- package/.opencode/tools/run-tests.ts +139 -0
- package/.opencode/tools/security-audit.ts +277 -0
- package/.opencode/tsconfig.json +29 -0
- package/AGENTS.md +124 -0
- package/LICENSE +21 -0
- package/README.md +146 -0
- package/README.zh-CN.md +552 -0
- package/agents/architect.md +211 -0
- package/agents/build-error-resolver.md +114 -0
- package/agents/chief-of-staff.md +151 -0
- package/agents/code-reviewer.md +237 -0
- package/agents/cpp-build-resolver.md +90 -0
- package/agents/cpp-reviewer.md +72 -0
- package/agents/database-reviewer.md +91 -0
- package/agents/doc-updater.md +107 -0
- package/agents/docs-lookup.md +68 -0
- package/agents/e2e-runner.md +107 -0
- package/agents/evals/code-reviewer-scenarios.json +23 -0
- package/agents/flutter-reviewer.md +243 -0
- package/agents/go-build-resolver.md +94 -0
- package/agents/go-reviewer.md +76 -0
- package/agents/harness-optimizer.md +35 -0
- package/agents/java-build-resolver.md +153 -0
- package/agents/java-reviewer.md +92 -0
- package/agents/kotlin-build-resolver.md +118 -0
- package/agents/kotlin-reviewer.md +159 -0
- package/agents/loop-operator.md +36 -0
- package/agents/planner.md +212 -0
- package/agents/python-reviewer.md +98 -0
- package/agents/pytorch-build-resolver.md +120 -0
- package/agents/refactor-cleaner.md +85 -0
- package/agents/rust-build-resolver.md +148 -0
- package/agents/rust-reviewer.md +94 -0
- package/agents/security-reviewer.md +108 -0
- package/agents/tdd-guide.md +91 -0
- package/agents/typescript-reviewer.md +112 -0
- package/commands/aside.md +164 -0
- package/commands/brainstorm.md +16 -0
- package/commands/build-fix.md +70 -0
- package/commands/build.md +91 -0
- package/commands/checkpoint.md +74 -0
- package/commands/claw.md +51 -0
- package/commands/code-review.md +24 -0
- package/commands/context-budget.md +29 -0
- package/commands/cpp-build.md +174 -0
- package/commands/cpp-review.md +132 -0
- package/commands/cpp-test.md +252 -0
- package/commands/deploy.md +75 -0
- package/commands/devfleet.md +92 -0
- package/commands/docs.md +31 -0
- package/commands/e2e.md +373 -0
- package/commands/eval.md +120 -0
- package/commands/evolve.md +178 -0
- package/commands/execute.md +51 -0
- package/commands/finish.md +22 -0
- package/commands/go-build.md +184 -0
- package/commands/go-review.md +148 -0
- package/commands/go-test.md +269 -0
- package/commands/gradle-build.md +70 -0
- package/commands/harness-audit.md +71 -0
- package/commands/instinct-export.md +66 -0
- package/commands/instinct-import.md +114 -0
- package/commands/instinct-status.md +59 -0
- package/commands/investigate.md +63 -0
- package/commands/kotlin-build.md +175 -0
- package/commands/kotlin-review.md +140 -0
- package/commands/kotlin-test.md +313 -0
- package/commands/learn-eval.md +116 -0
- package/commands/learn.md +70 -0
- package/commands/loop-start.md +32 -0
- package/commands/loop-status.md +24 -0
- package/commands/model-route.md +26 -0
- package/commands/multi-backend.md +166 -0
- package/commands/multi-execute.md +324 -0
- package/commands/multi-frontend.md +165 -0
- package/commands/multi-plan.md +277 -0
- package/commands/multi-workflow.md +200 -0
- package/commands/orchestrate.md +240 -0
- package/commands/plan.md +130 -0
- package/commands/pm2.md +272 -0
- package/commands/projects.md +39 -0
- package/commands/promote.md +41 -0
- package/commands/prompt-optimize.md +38 -0
- package/commands/prune.md +31 -0
- package/commands/python-review.md +297 -0
- package/commands/quality-gate.md +29 -0
- package/commands/refactor-clean.md +89 -0
- package/commands/resume-session.md +155 -0
- package/commands/review.md +64 -0
- package/commands/rules-distill.md +11 -0
- package/commands/rust-build.md +188 -0
- package/commands/rust-review.md +142 -0
- package/commands/rust-test.md +309 -0
- package/commands/save-session.md +275 -0
- package/commands/sessions.md +333 -0
- package/commands/setup-pm.md +80 -0
- package/commands/ship.md +77 -0
- package/commands/skill-create.md +174 -0
- package/commands/skill-health.md +54 -0
- package/commands/tdd.md +20 -0
- package/commands/test-coverage.md +77 -0
- package/commands/test.md +64 -0
- package/commands/update-codemaps.md +72 -0
- package/commands/update-docs.md +84 -0
- package/commands/verify.md +55 -0
- package/contexts/dev.md +20 -0
- package/contexts/research.md +26 -0
- package/contexts/review.md +22 -0
- package/examples/CLAUDE.md +100 -0
- package/examples/statusline.json +19 -0
- package/examples/user-CLAUDE.md +109 -0
- package/hooks/README.md +219 -0
- package/hooks/hooks.json +320 -0
- package/hooks/run-hook.cmd +31 -0
- package/hooks/session-start +6 -0
- package/install.ps1 +38 -0
- package/install.sh +17 -0
- package/manifests/install-components.json +415 -0
- package/manifests/install-modules.json +500 -0
- package/manifests/install-profiles.json +80 -0
- package/mcp-configs/mcp-servers.json +153 -0
- package/package.json +131 -0
- package/plugins/README.md +85 -0
- package/rules/README.md +106 -0
- package/rules/common/agents.md +50 -0
- package/rules/common/coding-style.md +48 -0
- package/rules/common/development-workflow.md +38 -0
- package/rules/common/git-workflow.md +24 -0
- package/rules/common/hooks.md +30 -0
- package/rules/common/patterns.md +31 -0
- package/rules/common/performance.md +55 -0
- package/rules/common/security.md +29 -0
- package/rules/common/testing.md +29 -0
- package/rules/cpp/coding-style.md +44 -0
- package/rules/cpp/hooks.md +39 -0
- package/rules/cpp/patterns.md +51 -0
- package/rules/cpp/security.md +51 -0
- package/rules/cpp/testing.md +44 -0
- package/rules/csharp/coding-style.md +72 -0
- package/rules/csharp/hooks.md +25 -0
- package/rules/csharp/patterns.md +50 -0
- package/rules/csharp/security.md +58 -0
- package/rules/csharp/testing.md +46 -0
- package/rules/golang/coding-style.md +32 -0
- package/rules/golang/hooks.md +17 -0
- package/rules/golang/patterns.md +45 -0
- package/rules/golang/security.md +34 -0
- package/rules/golang/testing.md +31 -0
- package/rules/java/coding-style.md +114 -0
- package/rules/java/hooks.md +18 -0
- package/rules/java/patterns.md +146 -0
- package/rules/java/security.md +100 -0
- package/rules/java/testing.md +131 -0
- package/rules/kotlin/coding-style.md +86 -0
- package/rules/kotlin/hooks.md +17 -0
- package/rules/kotlin/patterns.md +146 -0
- package/rules/kotlin/security.md +82 -0
- package/rules/kotlin/testing.md +128 -0
- package/rules/perl/coding-style.md +46 -0
- package/rules/perl/hooks.md +22 -0
- package/rules/perl/patterns.md +76 -0
- package/rules/perl/security.md +69 -0
- package/rules/perl/testing.md +54 -0
- package/rules/php/coding-style.md +40 -0
- package/rules/php/hooks.md +24 -0
- package/rules/php/patterns.md +33 -0
- package/rules/php/security.md +37 -0
- package/rules/php/testing.md +39 -0
- package/rules/python/coding-style.md +42 -0
- package/rules/python/hooks.md +19 -0
- package/rules/python/patterns.md +39 -0
- package/rules/python/security.md +30 -0
- package/rules/python/testing.md +38 -0
- package/rules/rust/coding-style.md +151 -0
- package/rules/rust/hooks.md +16 -0
- package/rules/rust/patterns.md +168 -0
- package/rules/rust/security.md +141 -0
- package/rules/rust/testing.md +154 -0
- package/rules/swift/coding-style.md +47 -0
- package/rules/swift/hooks.md +20 -0
- package/rules/swift/patterns.md +66 -0
- package/rules/swift/security.md +33 -0
- package/rules/swift/testing.md +45 -0
- package/rules/typescript/coding-style.md +199 -0
- package/rules/typescript/hooks.md +22 -0
- package/rules/typescript/patterns.md +52 -0
- package/rules/typescript/security.md +28 -0
- package/rules/typescript/testing.md +18 -0
- package/schemas/ecc-install-config.schema.json +58 -0
- package/schemas/hooks.schema.json +197 -0
- package/schemas/install-components.schema.json +58 -0
- package/schemas/install-modules.schema.json +105 -0
- package/schemas/install-profiles.schema.json +45 -0
- package/schemas/install-state.schema.json +210 -0
- package/schemas/package-manager.schema.json +23 -0
- package/schemas/plugin.schema.json +58 -0
- package/schemas/provenance.schema.json +31 -0
- package/schemas/state-store.schema.json +316 -0
- package/scripts/ci/catalog.js +245 -0
- package/scripts/ci/validate-agents.js +81 -0
- package/scripts/ci/validate-commands.js +136 -0
- package/scripts/ci/validate-hooks.js +239 -0
- package/scripts/ci/validate-install-manifests.js +214 -0
- package/scripts/ci/validate-no-personal-paths.js +63 -0
- package/scripts/ci/validate-rules.js +81 -0
- package/scripts/ci/validate-skills.js +56 -0
- package/scripts/claw.js +473 -0
- package/scripts/codex/merge-mcp-config.js +304 -0
- package/scripts/cursor-aw-home/hooks.json +115 -0
- package/scripts/cursor-aw-hooks/adapter.js +120 -0
- package/scripts/cursor-aw-hooks/after-file-edit.js +11 -0
- package/scripts/cursor-aw-hooks/after-mcp-execution.js +11 -0
- package/scripts/cursor-aw-hooks/after-shell-execution.js +11 -0
- package/scripts/cursor-aw-hooks/aw-phase-adapter.js +43 -0
- package/scripts/cursor-aw-hooks/before-mcp-execution.js +11 -0
- package/scripts/cursor-aw-hooks/before-shell-execution.js +11 -0
- package/scripts/cursor-aw-hooks/before-submit-prompt.js +41 -0
- package/scripts/cursor-aw-hooks/pre-compact.js +11 -0
- package/scripts/cursor-aw-hooks/session-end.js +11 -0
- package/scripts/cursor-aw-hooks/session-start.js +11 -0
- package/scripts/cursor-aw-hooks/stop.js +11 -0
- package/scripts/doctor.js +110 -0
- package/scripts/ecc.js +208 -0
- package/scripts/generate-aw-hooks.js +110 -0
- package/scripts/harness-audit.js +512 -0
- package/scripts/hooks/auto-tmux-dev.js +88 -0
- package/scripts/hooks/check-console-log.js +71 -0
- package/scripts/hooks/check-hook-enabled.js +12 -0
- package/scripts/hooks/config-protection.js +125 -0
- package/scripts/hooks/cost-tracker.js +78 -0
- package/scripts/hooks/doc-file-warning.js +63 -0
- package/scripts/hooks/evaluate-session.js +100 -0
- package/scripts/hooks/governance-capture.js +280 -0
- package/scripts/hooks/insaits-security-monitor.py +269 -0
- package/scripts/hooks/insaits-security-wrapper.js +88 -0
- package/scripts/hooks/mcp-health-check.js +588 -0
- package/scripts/hooks/post-bash-build-complete.js +27 -0
- package/scripts/hooks/post-bash-pr-created.js +37 -0
- package/scripts/hooks/post-edit-console-warn.js +54 -0
- package/scripts/hooks/post-edit-format.js +109 -0
- package/scripts/hooks/post-edit-typecheck.js +96 -0
- package/scripts/hooks/post-mcp-log.js +27 -0
- package/scripts/hooks/pre-bash-dev-server-block.js +187 -0
- package/scripts/hooks/pre-bash-git-push-reminder.js +28 -0
- package/scripts/hooks/pre-bash-tmux-reminder.js +33 -0
- package/scripts/hooks/pre-compact.js +48 -0
- package/scripts/hooks/pre-mcp-log.js +26 -0
- package/scripts/hooks/pre-write-doc-warn.js +9 -0
- package/scripts/hooks/quality-gate.js +168 -0
- package/scripts/hooks/run-with-flags-shell.sh +32 -0
- package/scripts/hooks/run-with-flags.js +120 -0
- package/scripts/hooks/session-end-marker.js +29 -0
- package/scripts/hooks/session-end.js +301 -0
- package/scripts/hooks/session-start-rules-context.sh +5 -0
- package/scripts/hooks/session-start.js +98 -0
- package/scripts/hooks/shared/aw-phase-definitions.js +190 -0
- package/scripts/hooks/shared/aw-phase-runner.js +61 -0
- package/scripts/hooks/shared/session-start.sh +20 -0
- package/scripts/hooks/shared/user-prompt-submit.sh +155 -0
- package/scripts/hooks/suggest-compact.js +80 -0
- package/scripts/install-apply.js +140 -0
- package/scripts/install-plan.js +254 -0
- package/scripts/lib/agent-compress.js +244 -0
- package/scripts/lib/aw-harness-registry.js +122 -0
- package/scripts/lib/aw-hook-contract.js +86 -0
- package/scripts/lib/claude-aw-hook-files.js +28 -0
- package/scripts/lib/claude-hook-config.js +76 -0
- package/scripts/lib/codex-aw-hook-files.js +38 -0
- package/scripts/lib/codex-hook-config.js +88 -0
- package/scripts/lib/cursor-aw-hook-files.js +62 -0
- package/scripts/lib/cursor-hook-config.js +148 -0
- package/scripts/lib/hook-flags.js +74 -0
- package/scripts/lib/inspection.js +212 -0
- package/scripts/lib/install/apply.js +23 -0
- package/scripts/lib/install/config.js +82 -0
- package/scripts/lib/install/request.js +120 -0
- package/scripts/lib/install/runtime.js +54 -0
- package/scripts/lib/install-executor.js +778 -0
- package/scripts/lib/install-lifecycle.js +1311 -0
- package/scripts/lib/install-manifests.js +448 -0
- package/scripts/lib/install-state.js +313 -0
- package/scripts/lib/install-targets/antigravity-project.js +69 -0
- package/scripts/lib/install-targets/claude-home.js +54 -0
- package/scripts/lib/install-targets/codex-home.js +62 -0
- package/scripts/lib/install-targets/cursor-project.js +80 -0
- package/scripts/lib/install-targets/helpers.js +307 -0
- package/scripts/lib/install-targets/opencode-home.js +10 -0
- package/scripts/lib/install-targets/registry.js +66 -0
- package/scripts/lib/orchestration-session.js +299 -0
- package/scripts/lib/package-manager.d.ts +119 -0
- package/scripts/lib/package-manager.js +431 -0
- package/scripts/lib/project-detect.js +428 -0
- package/scripts/lib/resolve-ecc-root.js +89 -0
- package/scripts/lib/resolve-formatter.js +185 -0
- package/scripts/lib/session-adapters/canonical-session.js +531 -0
- package/scripts/lib/session-adapters/claude-history.js +160 -0
- package/scripts/lib/session-adapters/dmux-tmux.js +90 -0
- package/scripts/lib/session-adapters/registry.js +127 -0
- package/scripts/lib/session-aliases.d.ts +136 -0
- package/scripts/lib/session-aliases.js +481 -0
- package/scripts/lib/session-manager.d.ts +131 -0
- package/scripts/lib/session-manager.js +464 -0
- package/scripts/lib/shell-split.js +86 -0
- package/scripts/lib/skill-evolution/dashboard.js +401 -0
- package/scripts/lib/skill-evolution/health.js +263 -0
- package/scripts/lib/skill-evolution/index.js +20 -0
- package/scripts/lib/skill-evolution/provenance.js +187 -0
- package/scripts/lib/skill-evolution/tracker.js +146 -0
- package/scripts/lib/skill-evolution/versioning.js +237 -0
- package/scripts/lib/skill-improvement/amendify.js +89 -0
- package/scripts/lib/skill-improvement/evaluate.js +59 -0
- package/scripts/lib/skill-improvement/health.js +118 -0
- package/scripts/lib/skill-improvement/observations.js +108 -0
- package/scripts/lib/state-store/index.js +191 -0
- package/scripts/lib/state-store/migrations.js +178 -0
- package/scripts/lib/state-store/queries.js +697 -0
- package/scripts/lib/state-store/schema.js +92 -0
- package/scripts/lib/tmux-worktree-orchestrator.js +475 -0
- package/scripts/lib/utils.d.ts +183 -0
- package/scripts/lib/utils.js +564 -0
- package/scripts/list-installed.js +90 -0
- package/scripts/orchestrate-codex-worker.sh +107 -0
- package/scripts/orchestrate-worktrees.js +40 -0
- package/scripts/orchestration-status.js +82 -0
- package/scripts/repair.js +97 -0
- package/scripts/session-inspect.js +150 -0
- package/scripts/sessions-cli.js +177 -0
- package/scripts/setup-package-manager.js +204 -0
- package/scripts/skill-create-output.js +244 -0
- package/scripts/status.js +176 -0
- package/scripts/uninstall.js +96 -0
- package/skills/agent-eval/SKILL.md +145 -0
- package/skills/agent-harness-construction/SKILL.md +73 -0
- package/skills/agentic-engineering/SKILL.md +63 -0
- package/skills/ai-first-engineering/SKILL.md +51 -0
- package/skills/ai-regression-testing/SKILL.md +385 -0
- package/skills/android-clean-architecture/SKILL.md +339 -0
- package/skills/api-and-interface-design/SKILL.md +75 -0
- package/skills/api-design/SKILL.md +523 -0
- package/skills/architecture-decision-records/SKILL.md +179 -0
- package/skills/article-writing/SKILL.md +85 -0
- package/skills/autonomous-loops/SKILL.md +610 -0
- package/skills/aw-brainstorm/SKILL.md +115 -0
- package/skills/aw-build/SKILL.md +189 -0
- package/skills/aw-build/evals/build-stage-cases.json +28 -0
- package/skills/aw-debug/SKILL.md +49 -0
- package/skills/aw-deploy/SKILL.md +101 -0
- package/skills/aw-deploy/evals/deploy-stage-cases.json +32 -0
- package/skills/aw-execute/SKILL.md +47 -0
- package/skills/aw-execute/references/mode-code.md +47 -0
- package/skills/aw-execute/references/mode-docs.md +28 -0
- package/skills/aw-execute/references/mode-infra.md +44 -0
- package/skills/aw-execute/references/mode-migration.md +58 -0
- package/skills/aw-execute/references/worker-implementer.md +26 -0
- package/skills/aw-execute/references/worker-parallel-worker.md +23 -0
- package/skills/aw-execute/references/worker-quality-reviewer.md +23 -0
- package/skills/aw-execute/references/worker-spec-reviewer.md +23 -0
- package/skills/aw-execute/scripts/build-worker-bundle.js +229 -0
- package/skills/aw-finish/SKILL.md +111 -0
- package/skills/aw-investigate/SKILL.md +109 -0
- package/skills/aw-plan/SKILL.md +399 -0
- package/skills/aw-prepare/SKILL.md +118 -0
- package/skills/aw-review/SKILL.md +123 -0
- package/skills/aw-rules/SKILL.md +129 -0
- package/skills/aw-rules/references/known-hallucinations.md +43 -0
- package/skills/aw-rules/references/verification-sources.md +50 -0
- package/skills/aw-ship/SKILL.md +115 -0
- package/skills/aw-spec/SKILL.md +128 -0
- package/skills/aw-tasks/SKILL.md +155 -0
- package/skills/aw-test/SKILL.md +118 -0
- package/skills/aw-verify/SKILL.md +51 -0
- package/skills/aw-yolo/SKILL.md +111 -0
- package/skills/backend-patterns/SKILL.md +598 -0
- package/skills/benchmark/SKILL.md +87 -0
- package/skills/blueprint/SKILL.md +105 -0
- package/skills/browser-qa/SKILL.md +81 -0
- package/skills/browser-testing-with-devtools/SKILL.md +81 -0
- package/skills/bun-runtime/SKILL.md +84 -0
- package/skills/canary-watch/SKILL.md +93 -0
- package/skills/carrier-relationship-management/SKILL.md +212 -0
- package/skills/ci-cd-and-automation/SKILL.md +71 -0
- package/skills/claude-api/SKILL.md +337 -0
- package/skills/claude-devfleet/SKILL.md +103 -0
- package/skills/click-path-audit/SKILL.md +244 -0
- package/skills/clickhouse-io/SKILL.md +439 -0
- package/skills/code-simplification/SKILL.md +74 -0
- package/skills/codebase-onboarding/SKILL.md +233 -0
- package/skills/coding-standards/SKILL.md +530 -0
- package/skills/compose-multiplatform-patterns/SKILL.md +299 -0
- package/skills/configure-ecc/SKILL.md +367 -0
- package/skills/content-engine/SKILL.md +88 -0
- package/skills/content-hash-cache-pattern/SKILL.md +161 -0
- package/skills/context-budget/SKILL.md +135 -0
- package/skills/context-engineering/SKILL.md +74 -0
- package/skills/continuous-agent-loop/SKILL.md +45 -0
- package/skills/continuous-learning/SKILL.md +119 -0
- package/skills/continuous-learning/config.json +18 -0
- package/skills/continuous-learning/evaluate-session.sh +69 -0
- package/skills/continuous-learning-v2/SKILL.md +365 -0
- package/skills/continuous-learning-v2/agents/observer-loop.sh +191 -0
- package/skills/continuous-learning-v2/agents/observer.md +198 -0
- package/skills/continuous-learning-v2/agents/session-guardian.sh +150 -0
- package/skills/continuous-learning-v2/agents/start-observer.sh +240 -0
- package/skills/continuous-learning-v2/config.json +8 -0
- package/skills/continuous-learning-v2/hooks/observe.sh +412 -0
- package/skills/continuous-learning-v2/scripts/detect-project.sh +228 -0
- package/skills/continuous-learning-v2/scripts/instinct-cli.py +1426 -0
- package/skills/continuous-learning-v2/scripts/test_parse_instinct.py +984 -0
- package/skills/cost-aware-llm-pipeline/SKILL.md +183 -0
- package/skills/cpp-coding-standards/SKILL.md +723 -0
- package/skills/cpp-testing/SKILL.md +324 -0
- package/skills/crosspost/SKILL.md +190 -0
- package/skills/customs-trade-compliance/SKILL.md +263 -0
- package/skills/data-scraper-agent/SKILL.md +764 -0
- package/skills/database-migrations/SKILL.md +429 -0
- package/skills/deep-research/SKILL.md +155 -0
- package/skills/deployment-patterns/SKILL.md +427 -0
- package/skills/deprecation-and-migration/SKILL.md +75 -0
- package/skills/design-system/SKILL.md +76 -0
- package/skills/django-patterns/SKILL.md +734 -0
- package/skills/django-security/SKILL.md +593 -0
- package/skills/django-tdd/SKILL.md +729 -0
- package/skills/django-verification/SKILL.md +469 -0
- package/skills/dmux-workflows/SKILL.md +191 -0
- package/skills/docker-patterns/SKILL.md +364 -0
- package/skills/documentation-and-adrs/SKILL.md +75 -0
- package/skills/documentation-lookup/SKILL.md +90 -0
- package/skills/e2e-testing/SKILL.md +326 -0
- package/skills/energy-procurement/SKILL.md +228 -0
- package/skills/enterprise-agent-ops/SKILL.md +50 -0
- package/skills/eval-harness/SKILL.md +270 -0
- package/skills/exa-search/SKILL.md +103 -0
- package/skills/fal-ai-media/SKILL.md +284 -0
- package/skills/flutter-dart-code-review/SKILL.md +435 -0
- package/skills/foundation-models-on-device/SKILL.md +243 -0
- package/skills/frontend-patterns/SKILL.md +642 -0
- package/skills/frontend-slides/SKILL.md +184 -0
- package/skills/frontend-slides/STYLE_PRESETS.md +330 -0
- package/skills/frontend-ui-engineering/SKILL.md +68 -0
- package/skills/git-workflow-and-versioning/SKILL.md +75 -0
- package/skills/golang-patterns/SKILL.md +674 -0
- package/skills/golang-testing/SKILL.md +720 -0
- package/skills/idea-refine/SKILL.md +84 -0
- package/skills/incremental-implementation/SKILL.md +86 -0
- package/skills/inventory-demand-planning/SKILL.md +247 -0
- package/skills/investor-materials/SKILL.md +96 -0
- package/skills/investor-outreach/SKILL.md +76 -0
- package/skills/iterative-retrieval/SKILL.md +211 -0
- package/skills/java-coding-standards/SKILL.md +147 -0
- package/skills/jpa-patterns/SKILL.md +151 -0
- package/skills/kotlin-coroutines-flows/SKILL.md +284 -0
- package/skills/kotlin-exposed-patterns/SKILL.md +719 -0
- package/skills/kotlin-ktor-patterns/SKILL.md +689 -0
- package/skills/kotlin-patterns/SKILL.md +711 -0
- package/skills/kotlin-testing/SKILL.md +824 -0
- package/skills/laravel-patterns/SKILL.md +415 -0
- package/skills/laravel-security/SKILL.md +285 -0
- package/skills/laravel-tdd/SKILL.md +283 -0
- package/skills/laravel-verification/SKILL.md +179 -0
- package/skills/liquid-glass-design/SKILL.md +279 -0
- package/skills/logistics-exception-management/SKILL.md +222 -0
- package/skills/market-research/SKILL.md +75 -0
- package/skills/mcp-server-patterns/SKILL.md +67 -0
- package/skills/nanoclaw-repl/SKILL.md +33 -0
- package/skills/nextjs-turbopack/SKILL.md +44 -0
- package/skills/nutrient-document-processing/SKILL.md +167 -0
- package/skills/nuxt4-patterns/SKILL.md +100 -0
- package/skills/performance-optimization/SKILL.md +77 -0
- package/skills/perl-patterns/SKILL.md +504 -0
- package/skills/perl-security/SKILL.md +503 -0
- package/skills/perl-testing/SKILL.md +475 -0
- package/skills/plankton-code-quality/SKILL.md +236 -0
- package/skills/postgres-patterns/SKILL.md +147 -0
- package/skills/product-lens/SKILL.md +79 -0
- package/skills/production-scheduling/SKILL.md +238 -0
- package/skills/project-guidelines-example/SKILL.md +349 -0
- package/skills/prompt-optimizer/SKILL.md +397 -0
- package/skills/python-patterns/SKILL.md +750 -0
- package/skills/python-testing/SKILL.md +816 -0
- package/skills/pytorch-patterns/SKILL.md +396 -0
- package/skills/quality-nonconformance/SKILL.md +260 -0
- package/skills/ralphinho-rfc-pipeline/SKILL.md +67 -0
- package/skills/regex-vs-llm-structured-text/SKILL.md +220 -0
- package/skills/returns-reverse-logistics/SKILL.md +240 -0
- package/skills/rules-distill/SKILL.md +264 -0
- package/skills/rules-distill/scripts/scan-rules.sh +58 -0
- package/skills/rules-distill/scripts/scan-skills.sh +129 -0
- package/skills/rust-patterns/SKILL.md +499 -0
- package/skills/rust-testing/SKILL.md +500 -0
- package/skills/safety-guard/SKILL.md +69 -0
- package/skills/santa-method/SKILL.md +306 -0
- package/skills/search-first/SKILL.md +161 -0
- package/skills/security-and-hardening/SKILL.md +70 -0
- package/skills/security-review/SKILL.md +495 -0
- package/skills/security-review/cloud-infrastructure-security.md +361 -0
- package/skills/security-scan/SKILL.md +165 -0
- package/skills/skill-comply/SKILL.md +58 -0
- package/skills/skill-comply/fixtures/compliant_trace.jsonl +5 -0
- package/skills/skill-comply/fixtures/noncompliant_trace.jsonl +3 -0
- package/skills/skill-comply/fixtures/tdd_spec.yaml +44 -0
- package/skills/skill-comply/prompts/classifier.md +24 -0
- package/skills/skill-comply/prompts/scenario_generator.md +62 -0
- package/skills/skill-comply/prompts/spec_generator.md +42 -0
- package/skills/skill-comply/pyproject.toml +15 -0
- package/skills/skill-comply/scripts/__init__.py +0 -0
- package/skills/skill-comply/scripts/classifier.py +85 -0
- package/skills/skill-comply/scripts/grader.py +122 -0
- package/skills/skill-comply/scripts/parser.py +107 -0
- package/skills/skill-comply/scripts/report.py +170 -0
- package/skills/skill-comply/scripts/run.py +127 -0
- package/skills/skill-comply/scripts/runner.py +161 -0
- package/skills/skill-comply/scripts/scenario_generator.py +70 -0
- package/skills/skill-comply/scripts/spec_generator.py +72 -0
- package/skills/skill-comply/scripts/utils.py +13 -0
- package/skills/skill-comply/tests/test_grader.py +137 -0
- package/skills/skill-comply/tests/test_parser.py +90 -0
- package/skills/skill-quality-review/SKILL.md +102 -0
- package/skills/skill-quality-review/references/review-rubric.md +112 -0
- package/skills/skill-stocktake/SKILL.md +197 -0
- package/skills/skill-stocktake/scripts/quick-diff.sh +87 -0
- package/skills/skill-stocktake/scripts/save-results.sh +56 -0
- package/skills/skill-stocktake/scripts/scan.sh +170 -0
- package/skills/springboot-patterns/SKILL.md +314 -0
- package/skills/springboot-security/SKILL.md +272 -0
- package/skills/springboot-tdd/SKILL.md +158 -0
- package/skills/springboot-verification/SKILL.md +231 -0
- package/skills/strategic-compact/SKILL.md +131 -0
- package/skills/strategic-compact/suggest-compact.sh +54 -0
- package/skills/swift-actor-persistence/SKILL.md +143 -0
- package/skills/swift-concurrency-6-2/SKILL.md +216 -0
- package/skills/swift-protocol-di-testing/SKILL.md +190 -0
- package/skills/swiftui-patterns/SKILL.md +259 -0
- package/skills/tdd-workflow/SKILL.md +145 -0
- package/skills/team-builder/SKILL.md +161 -0
- package/skills/using-aw-skills/SKILL.md +290 -0
- package/skills/using-aw-skills/evals/skill-trigger-cases.tsv +25 -0
- package/skills/using-aw-skills/evals/test-skill-triggers.sh +171 -0
- package/skills/using-aw-skills/hooks/hooks.json +9 -0
- package/skills/using-aw-skills/hooks/session-start.sh +188 -0
- package/skills/using-platform-skills/SKILL.md +163 -0
- package/skills/using-platform-skills/evals/platform-selection-cases.json +52 -0
- package/skills/verification-loop/SKILL.md +126 -0
- package/skills/video-editing/SKILL.md +310 -0
- package/skills/videodb/SKILL.md +374 -0
- package/skills/videodb/reference/api-reference.md +550 -0
- package/skills/videodb/reference/capture-reference.md +407 -0
- package/skills/videodb/reference/capture.md +101 -0
- package/skills/videodb/reference/editor.md +443 -0
- package/skills/videodb/reference/generative.md +331 -0
- package/skills/videodb/reference/rtstream-reference.md +564 -0
- package/skills/videodb/reference/rtstream.md +65 -0
- package/skills/videodb/reference/search.md +230 -0
- package/skills/videodb/reference/streaming.md +406 -0
- package/skills/videodb/reference/use-cases.md +118 -0
- package/skills/videodb/scripts/ws_listener.py +282 -0
- package/skills/visa-doc-translate/README.md +86 -0
- package/skills/visa-doc-translate/SKILL.md +117 -0
- package/skills/x-api/SKILL.md +208 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-quality-review
|
|
3
|
+
description: Reviews skills for correctness, clarity, effectiveness, and maintainability. Use when auditing a new or updated skill, reviewing a skill PR, or troubleshooting an underperforming skill before shipping it.
|
|
4
|
+
origin: ECC
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill Quality Review
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
`skill-quality-review` is the focused reviewer lens for one skill or one small batch of closely related skill changes.
|
|
12
|
+
It turns vague "this skill feels off" feedback into evidence-backed findings and small, actionable fixes.
|
|
13
|
+
|
|
14
|
+
Use `skill-stocktake` for full inventory audits across many skills.
|
|
15
|
+
That command may call this skill for its per-skill evaluation rubric.
|
|
16
|
+
|
|
17
|
+
## When to Use
|
|
18
|
+
|
|
19
|
+
- a new skill is being added and should be reviewed before merge
|
|
20
|
+
- an existing skill was updated and the PR needs structured feedback
|
|
21
|
+
- a skill feels ambiguous, inconsistent, or underperforming in practice
|
|
22
|
+
- `skill-stocktake` flagged a skill as `Improve`, `Update`, `Retire`, or `Merge`
|
|
23
|
+
- you want a reusable rubric instead of ad hoc taste-based comments
|
|
24
|
+
|
|
25
|
+
Do not use this as a full repo inventory workflow.
|
|
26
|
+
For broad catalog audits, use `skill-stocktake`.
|
|
27
|
+
|
|
28
|
+
## Workflow
|
|
29
|
+
|
|
30
|
+
1. Establish scope and the promised behavior.
|
|
31
|
+
Read the target `SKILL.md`, the diff if this is a PR, and only the bundled scripts or references that materially affect the review.
|
|
32
|
+
Restate the skill's promise from its `name`, `description`, trigger language, and body.
|
|
33
|
+
2. Review correctness first.
|
|
34
|
+
Confirm commands, tool names, file paths, relative references, and workflow order are internally consistent.
|
|
35
|
+
For unstable external details such as marketplace installs, CLI flags, or API names, verify them with current sources before approving the skill.
|
|
36
|
+
3. Review clarity.
|
|
37
|
+
Check that entry conditions, scope boundaries, stop conditions, and output expectations are explicit.
|
|
38
|
+
Prefer concise wording and progressive disclosure over long, duplicated explanation.
|
|
39
|
+
4. Review effectiveness.
|
|
40
|
+
Ask whether a cold agent would reliably do the right thing after loading this skill.
|
|
41
|
+
The workflow should make the next action obvious, avoid hidden prerequisites, and provide enough structure for fragile steps without over-constraining flexible work.
|
|
42
|
+
5. Review maintainability.
|
|
43
|
+
Look for overlap with other skills, duplicated baseline policy, stale specifics, oversized bodies, fragile references, or bundled detail that should move into a reference file.
|
|
44
|
+
6. Use the detailed rubric when needed.
|
|
45
|
+
Load `references/review-rubric.md` for the full checklist, anti-pattern list, and verdict guidance.
|
|
46
|
+
7. Produce findings and the smallest useful verdict.
|
|
47
|
+
For a focused review, classify blocking findings separately from advisory improvements.
|
|
48
|
+
For portfolio decisions, use `Keep`, `Improve`, `Update`, `Retire`, or `Merge into <skill>`.
|
|
49
|
+
8. Recommend the smallest corrective action.
|
|
50
|
+
Prefer targeted edits, moved reference material, trimmed duplication, or explicit verification wording over broad rewrites.
|
|
51
|
+
|
|
52
|
+
## Review Priorities
|
|
53
|
+
|
|
54
|
+
Review in this order:
|
|
55
|
+
|
|
56
|
+
1. correctness
|
|
57
|
+
2. clarity
|
|
58
|
+
3. effectiveness
|
|
59
|
+
4. maintainability
|
|
60
|
+
|
|
61
|
+
If correctness is broken, do not spend time polishing prose first.
|
|
62
|
+
|
|
63
|
+
## Common Rationalizations
|
|
64
|
+
|
|
65
|
+
| Rationalization | Reality |
|
|
66
|
+
|---|---|
|
|
67
|
+
| "The skill sounds right, so it is probably fine." | Skill quality depends on whether the instructions can actually be followed. |
|
|
68
|
+
| "This section is long, but extra detail cannot hurt." | Bloated skills reduce trigger precision and make the workflow harder to follow. |
|
|
69
|
+
| "The command probably still works." | Unverified installs, CLI flags, and external tools are correctness issues. |
|
|
70
|
+
| "We can merge it and improve later." | Weak skills create bad behavior at load time, so review should happen before shipping. |
|
|
71
|
+
|
|
72
|
+
## Red Flags
|
|
73
|
+
|
|
74
|
+
- name, description, and body promise different things
|
|
75
|
+
- the workflow hides prerequisites or assumes unstated context
|
|
76
|
+
- examples, commands, or links are stale or unverifiable
|
|
77
|
+
- the body duplicates baseline rules or another skill with no clear added value
|
|
78
|
+
- the skill tries to cover portfolio audit, creation, and execution all at once
|
|
79
|
+
- the output shape is implicit, so reviewers cannot tell what "good" looks like
|
|
80
|
+
|
|
81
|
+
## Verification
|
|
82
|
+
|
|
83
|
+
Before leaving the review, confirm:
|
|
84
|
+
|
|
85
|
+
- [ ] the skill's promise was restated and checked against the body
|
|
86
|
+
- [ ] correctness issues were reviewed before style or wording improvements
|
|
87
|
+
- [ ] unstable external details were verified or explicitly flagged as unverified
|
|
88
|
+
- [ ] overlap with existing skills, rules, or baseline docs was considered
|
|
89
|
+
- [ ] blockers and advisories are separated clearly
|
|
90
|
+
- [ ] the recommended fixes are smaller than a rewrite unless a rewrite is truly necessary
|
|
91
|
+
|
|
92
|
+
## Final Output Shape
|
|
93
|
+
|
|
94
|
+
Always end with:
|
|
95
|
+
|
|
96
|
+
- `Mode`
|
|
97
|
+
- `Scope`
|
|
98
|
+
- `Skill Promise`
|
|
99
|
+
- `Blocking Findings`
|
|
100
|
+
- `Advisory Improvements`
|
|
101
|
+
- `Verdict`
|
|
102
|
+
- `Next`
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Skill Quality Review Rubric
|
|
2
|
+
|
|
3
|
+
Use this rubric when a review needs more than a quick sanity pass.
|
|
4
|
+
|
|
5
|
+
## 1. Correctness
|
|
6
|
+
|
|
7
|
+
Check whether the skill is factually and operationally correct.
|
|
8
|
+
|
|
9
|
+
- `name` and `description` match the actual behavior
|
|
10
|
+
- referenced files, scripts, and relative paths exist
|
|
11
|
+
- commands can plausibly run in the target environment
|
|
12
|
+
- tool names, CLI flags, and API names are current
|
|
13
|
+
- steps do not contradict one another
|
|
14
|
+
- validation guidance matches the claimed workflow
|
|
15
|
+
|
|
16
|
+
Common failures:
|
|
17
|
+
|
|
18
|
+
- dead file references
|
|
19
|
+
- stale install commands
|
|
20
|
+
- missing bundled resources
|
|
21
|
+
- hidden assumptions about tools or directory layout
|
|
22
|
+
|
|
23
|
+
## 2. Clarity
|
|
24
|
+
|
|
25
|
+
Check whether a cold reader can understand when and how to use the skill.
|
|
26
|
+
|
|
27
|
+
- trigger conditions are explicit
|
|
28
|
+
- the skill says when not to use it
|
|
29
|
+
- the main workflow is ordered clearly
|
|
30
|
+
- output expectations are visible
|
|
31
|
+
- important terms are concrete rather than vague
|
|
32
|
+
- detail lives in references when it would otherwise bloat `SKILL.md`
|
|
33
|
+
|
|
34
|
+
Common failures:
|
|
35
|
+
|
|
36
|
+
- rambling overview sections
|
|
37
|
+
- multiple unrelated goals in one skill
|
|
38
|
+
- missing stop conditions
|
|
39
|
+
- buried output shapes
|
|
40
|
+
|
|
41
|
+
## 3. Effectiveness
|
|
42
|
+
|
|
43
|
+
Check whether the skill is likely to change behavior in the intended way.
|
|
44
|
+
|
|
45
|
+
- the first action after loading the skill is obvious
|
|
46
|
+
- fragile or safety-critical steps are constrained enough
|
|
47
|
+
- flexible tasks keep the right degree of freedom
|
|
48
|
+
- examples or templates are present where ambiguity would otherwise be high
|
|
49
|
+
- the skill does not require hidden knowledge from another doc to be usable
|
|
50
|
+
|
|
51
|
+
Common failures:
|
|
52
|
+
|
|
53
|
+
- generic advice disguised as workflow
|
|
54
|
+
- no concrete ordering for multi-step tasks
|
|
55
|
+
- overfitted scripts for work that needs judgment
|
|
56
|
+
- under-specified steps for brittle operations
|
|
57
|
+
|
|
58
|
+
## 4. Maintainability
|
|
59
|
+
|
|
60
|
+
Check whether the skill can stay healthy as the catalog evolves.
|
|
61
|
+
|
|
62
|
+
- baseline policy is not duplicated unnecessarily
|
|
63
|
+
- overlap with existing skills is minimal and intentional
|
|
64
|
+
- long detail is pushed into references or scripts
|
|
65
|
+
- the body is concise enough to justify its context cost
|
|
66
|
+
- external dependencies are limited and clearly named
|
|
67
|
+
- verdicts can be acted on without rereading the whole skill
|
|
68
|
+
|
|
69
|
+
Common failures:
|
|
70
|
+
|
|
71
|
+
- copy-pasted policy from root docs
|
|
72
|
+
- large monolithic `SKILL.md` files
|
|
73
|
+
- hidden dependency on another skill without naming it
|
|
74
|
+
- outdated product or tool specifics embedded in core workflow text
|
|
75
|
+
|
|
76
|
+
## Anti-Patterns
|
|
77
|
+
|
|
78
|
+
- `Promise Drift`: frontmatter says one thing, workflow does another
|
|
79
|
+
- `Catalog Overlap`: two skills solve the same problem with only wording changes
|
|
80
|
+
- `Reference Rot`: links or commands look real but were never verified
|
|
81
|
+
- `Context Hoarding`: long sections that belong in references or scripts
|
|
82
|
+
- `Hidden Handoff`: the skill assumes another skill or doc without saying so
|
|
83
|
+
- `Taste Review`: feedback describes preference, not an operational problem
|
|
84
|
+
|
|
85
|
+
## Verdict Guidance
|
|
86
|
+
|
|
87
|
+
| Verdict | Use when |
|
|
88
|
+
|---|---|
|
|
89
|
+
| `Keep` | The skill is current, distinct, and operationally sound |
|
|
90
|
+
| `Improve` | The core idea is worth keeping, but wording, structure, or scope needs targeted fixes |
|
|
91
|
+
| `Update` | The workflow is still useful, but references or technical details are stale |
|
|
92
|
+
| `Retire` | The skill is broken, redundant, or cost-asymmetric to maintain |
|
|
93
|
+
| `Merge into <skill>` | Another existing skill already owns the workflow and this one should fold into it |
|
|
94
|
+
|
|
95
|
+
## Feedback Template
|
|
96
|
+
|
|
97
|
+
Use this shape when the review needs a compact written summary:
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
Mode: focused-review | portfolio-review
|
|
101
|
+
Scope: <skill path or PR slice>
|
|
102
|
+
Skill Promise: <one sentence>
|
|
103
|
+
|
|
104
|
+
Blocking Findings:
|
|
105
|
+
- <finding with evidence>
|
|
106
|
+
|
|
107
|
+
Advisory Improvements:
|
|
108
|
+
- <small, non-blocking improvement>
|
|
109
|
+
|
|
110
|
+
Verdict: Keep | Improve | Update | Retire | Merge into <skill>
|
|
111
|
+
Next: <smallest corrective action>
|
|
112
|
+
```
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Use when auditing Claude skills and commands for quality. Supports Quick Scan (changed skills only) and Full Stocktake modes with sequential subagent batch evaluation using the shared skill-quality-review rubric."
|
|
3
|
+
origin: ECC
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# skill-stocktake
|
|
7
|
+
|
|
8
|
+
Slash command (`/skill-stocktake`) that audits all Claude skills and commands using the shared `skill-quality-review` rubric plus AI holistic judgment. Supports two modes: Quick Scan for recently changed skills, and Full Stocktake for a complete review.
|
|
9
|
+
|
|
10
|
+
## Scope
|
|
11
|
+
|
|
12
|
+
The command targets the following paths **relative to the directory where it is invoked**:
|
|
13
|
+
|
|
14
|
+
| Path | Description |
|
|
15
|
+
|------|-------------|
|
|
16
|
+
| `~/.claude/skills/` | Global skills (all projects) |
|
|
17
|
+
| `{cwd}/.claude/skills/` | Project-level skills (if the directory exists) |
|
|
18
|
+
|
|
19
|
+
**At the start of Phase 1, the command explicitly lists which paths were found and scanned.**
|
|
20
|
+
|
|
21
|
+
### Targeting a specific project
|
|
22
|
+
|
|
23
|
+
To include project-level skills, run from that project's root directory:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
cd ~/path/to/my-project
|
|
27
|
+
/skill-stocktake
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
If the project has no `.claude/skills/` directory, only global skills and commands are evaluated.
|
|
31
|
+
|
|
32
|
+
## Modes
|
|
33
|
+
|
|
34
|
+
| Mode | Trigger | Duration |
|
|
35
|
+
|------|---------|---------|
|
|
36
|
+
| Quick Scan | `results.json` exists (default) | 5–10 min |
|
|
37
|
+
| Full Stocktake | `results.json` absent, or `/skill-stocktake full` | 20–30 min |
|
|
38
|
+
|
|
39
|
+
**Results cache:** `~/.claude/skills/skill-stocktake/results.json`
|
|
40
|
+
|
|
41
|
+
## Quick Scan Flow
|
|
42
|
+
|
|
43
|
+
Re-evaluate only skills that have changed since the last run (5–10 min).
|
|
44
|
+
|
|
45
|
+
1. Read `~/.claude/skills/skill-stocktake/results.json`
|
|
46
|
+
2. Run: `bash ~/.claude/skills/skill-stocktake/scripts/quick-diff.sh \
|
|
47
|
+
~/.claude/skills/skill-stocktake/results.json`
|
|
48
|
+
(Project dir is auto-detected from `$PWD/.claude/skills`; pass it explicitly only if needed)
|
|
49
|
+
3. If output is `[]`: report "No changes since last run." and stop
|
|
50
|
+
4. Re-evaluate only those changed files using the same Phase 2 criteria
|
|
51
|
+
5. Carry forward unchanged skills from previous results
|
|
52
|
+
6. Output only the diff
|
|
53
|
+
7. Run: `bash ~/.claude/skills/skill-stocktake/scripts/save-results.sh \
|
|
54
|
+
~/.claude/skills/skill-stocktake/results.json <<< "$EVAL_RESULTS"`
|
|
55
|
+
|
|
56
|
+
## Full Stocktake Flow
|
|
57
|
+
|
|
58
|
+
### Phase 1 — Inventory
|
|
59
|
+
|
|
60
|
+
Run: `bash ~/.claude/skills/skill-stocktake/scripts/scan.sh`
|
|
61
|
+
|
|
62
|
+
The script enumerates skill files, extracts frontmatter, and collects UTC mtimes.
|
|
63
|
+
Project dir is auto-detected from `$PWD/.claude/skills`; pass it explicitly only if needed.
|
|
64
|
+
Present the scan summary and inventory table from the script output:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
Scanning:
|
|
68
|
+
✓ ~/.claude/skills/ (17 files)
|
|
69
|
+
✗ {cwd}/.claude/skills/ (not found — global skills only)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
| Skill | 7d use | 30d use | Description |
|
|
73
|
+
|-------|--------|---------|-------------|
|
|
74
|
+
|
|
75
|
+
### Phase 2 — Quality Evaluation
|
|
76
|
+
|
|
77
|
+
Launch an Agent tool subagent (**general-purpose agent**) with the full inventory and the shared skill-review rubric:
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
Agent(
|
|
81
|
+
subagent_type="general-purpose",
|
|
82
|
+
prompt="
|
|
83
|
+
Evaluate the following skill inventory against the rubric.
|
|
84
|
+
|
|
85
|
+
Load the local `skill-quality-review` skill first and use its rubric for per-skill judgments.
|
|
86
|
+
|
|
87
|
+
[INVENTORY]
|
|
88
|
+
|
|
89
|
+
[RUBRIC]
|
|
90
|
+
|
|
91
|
+
Return JSON for each skill:
|
|
92
|
+
{ \"verdict\": \"Keep\"|\"Improve\"|\"Update\"|\"Retire\"|\"Merge into [X]\", \"reason\": \"...\" }
|
|
93
|
+
"
|
|
94
|
+
)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The subagent reads each skill, applies `skill-quality-review`, and returns per-skill JSON:
|
|
98
|
+
|
|
99
|
+
`{ "verdict": "Keep"|"Improve"|"Update"|"Retire"|"Merge into [X]", "reason": "..." }`
|
|
100
|
+
|
|
101
|
+
**Chunk guidance:** Process ~20 skills per subagent invocation to keep context manageable. Save intermediate results to `results.json` (`status: "in_progress"`) after each chunk.
|
|
102
|
+
|
|
103
|
+
After all skills are evaluated: set `status: "completed"`, proceed to Phase 3.
|
|
104
|
+
|
|
105
|
+
**Resume detection:** If `status: "in_progress"` is found on startup, resume from the first unevaluated skill.
|
|
106
|
+
|
|
107
|
+
Each skill is evaluated against the `skill-quality-review` rubric:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
- [ ] Correctness checked: commands, paths, references, and technical claims are internally valid
|
|
111
|
+
- [ ] Clarity checked: trigger, scope, and output expectations are explicit
|
|
112
|
+
- [ ] Effectiveness checked: a cold reader can follow the workflow without hidden prerequisites
|
|
113
|
+
- [ ] Maintainability checked: overlap, duplication, and context cost are justified
|
|
114
|
+
- [ ] Freshness of unstable technical references verified (use WebSearch if tool names / CLI flags / APIs are present)
|
|
115
|
+
- [ ] Usage frequency considered
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Verdict criteria:
|
|
119
|
+
|
|
120
|
+
| Verdict | Meaning |
|
|
121
|
+
|---------|---------|
|
|
122
|
+
| Keep | Useful and current |
|
|
123
|
+
| Improve | Worth keeping, but specific improvements needed |
|
|
124
|
+
| Update | Referenced technology is outdated (verify with WebSearch) |
|
|
125
|
+
| Retire | Low quality, stale, or cost-asymmetric |
|
|
126
|
+
| Merge into [X] | Substantial overlap with another skill; name the merge target |
|
|
127
|
+
|
|
128
|
+
Evaluation is **holistic AI judgment** — not a numeric rubric. Guiding dimensions:
|
|
129
|
+
- **Actionability**: code examples, commands, or steps that let you act immediately
|
|
130
|
+
- **Scope fit**: name, trigger, and content are aligned; not too broad or narrow
|
|
131
|
+
- **Uniqueness**: value not replaceable by MEMORY.md / CLAUDE.md / another skill
|
|
132
|
+
- **Currency**: technical references work in the current environment
|
|
133
|
+
|
|
134
|
+
**Reason quality requirements** — the `reason` field must be self-contained and decision-enabling:
|
|
135
|
+
- Do NOT write "unchanged" alone — always restate the core evidence
|
|
136
|
+
- For **Retire**: state (1) what specific defect was found, (2) what covers the same need instead
|
|
137
|
+
- Bad: `"Superseded"`
|
|
138
|
+
- Good: `"disable-model-invocation: true already set; superseded by continuous-learning-v2 which covers all the same patterns plus confidence scoring. No unique content remains."`
|
|
139
|
+
- For **Merge**: name the target and describe what content to integrate
|
|
140
|
+
- Bad: `"Overlaps with X"`
|
|
141
|
+
- Good: `"42-line thin content; Step 4 of chatlog-to-article already covers the same workflow. Integrate the 'article angle' tip as a note in that skill."`
|
|
142
|
+
- For **Improve**: describe the specific change needed (what section, what action, target size if relevant)
|
|
143
|
+
- Bad: `"Too long"`
|
|
144
|
+
- Good: `"276 lines; Section 'Framework Comparison' (L80–140) duplicates ai-era-architecture-principles; delete it to reach ~150 lines."`
|
|
145
|
+
- For **Keep** (mtime-only change in Quick Scan): restate the original verdict rationale, do not write "unchanged"
|
|
146
|
+
- Bad: `"Unchanged"`
|
|
147
|
+
- Good: `"mtime updated but content unchanged. Unique Python reference explicitly imported by rules/python/; no overlap found."`
|
|
148
|
+
|
|
149
|
+
### Phase 3 — Summary Table
|
|
150
|
+
|
|
151
|
+
| Skill | 7d use | Verdict | Reason |
|
|
152
|
+
|-------|--------|---------|--------|
|
|
153
|
+
|
|
154
|
+
### Phase 4 — Consolidation
|
|
155
|
+
|
|
156
|
+
1. **Retire / Merge**: present detailed justification per file before confirming with user:
|
|
157
|
+
- What specific problem was found (overlap, staleness, broken references, etc.)
|
|
158
|
+
- What alternative covers the same functionality (for Retire: which existing skill/rule; for Merge: the target file and what content to integrate)
|
|
159
|
+
- Impact of removal (any dependent skills, MEMORY.md references, or workflows affected)
|
|
160
|
+
2. **Improve**: present specific improvement suggestions with rationale:
|
|
161
|
+
- What to change and why (e.g., "trim 430→200 lines because sections X/Y duplicate python-patterns")
|
|
162
|
+
- User decides whether to act
|
|
163
|
+
3. **Update**: present updated content with sources checked
|
|
164
|
+
4. Check MEMORY.md line count; propose compression if >100 lines
|
|
165
|
+
|
|
166
|
+
## Results File Schema
|
|
167
|
+
|
|
168
|
+
`~/.claude/skills/skill-stocktake/results.json`:
|
|
169
|
+
|
|
170
|
+
**`evaluated_at`**: Must be set to the actual UTC time of evaluation completion.
|
|
171
|
+
Obtain via Bash: `date -u +%Y-%m-%dT%H:%M:%SZ`. Never use a date-only approximation like `T00:00:00Z`.
|
|
172
|
+
|
|
173
|
+
```json
|
|
174
|
+
{
|
|
175
|
+
"evaluated_at": "2026-02-21T10:00:00Z",
|
|
176
|
+
"mode": "full",
|
|
177
|
+
"batch_progress": {
|
|
178
|
+
"total": 80,
|
|
179
|
+
"evaluated": 80,
|
|
180
|
+
"status": "completed"
|
|
181
|
+
},
|
|
182
|
+
"skills": {
|
|
183
|
+
"skill-name": {
|
|
184
|
+
"path": "~/.claude/skills/skill-name/SKILL.md",
|
|
185
|
+
"verdict": "Keep",
|
|
186
|
+
"reason": "Concrete, actionable, unique value for X workflow",
|
|
187
|
+
"mtime": "2026-01-15T08:30:00Z"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Notes
|
|
194
|
+
|
|
195
|
+
- Evaluation is blind: the same rubric applies to all skills regardless of origin (ECC, self-authored, auto-extracted)
|
|
196
|
+
- Archive / delete operations always require explicit user confirmation
|
|
197
|
+
- No verdict branching by skill origin
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# quick-diff.sh — compare skill file mtimes against results.json evaluated_at
|
|
3
|
+
# Usage: quick-diff.sh RESULTS_JSON [CWD_SKILLS_DIR]
|
|
4
|
+
# Output: JSON array of changed/new files to stdout (empty [] if no changes)
|
|
5
|
+
#
|
|
6
|
+
# When CWD_SKILLS_DIR is omitted, defaults to $PWD/.claude/skills so the
|
|
7
|
+
# script always picks up project-level skills without relying on the caller.
|
|
8
|
+
#
|
|
9
|
+
# Environment:
|
|
10
|
+
# SKILL_STOCKTAKE_GLOBAL_DIR Override ~/.claude/skills (for testing only;
|
|
11
|
+
# do not set in production — intended for bats tests)
|
|
12
|
+
# SKILL_STOCKTAKE_PROJECT_DIR Override project dir detection (for testing only)
|
|
13
|
+
|
|
14
|
+
set -euo pipefail
|
|
15
|
+
|
|
16
|
+
RESULTS_JSON="${1:-}"
|
|
17
|
+
CWD_SKILLS_DIR="${SKILL_STOCKTAKE_PROJECT_DIR:-${2:-$PWD/.claude/skills}}"
|
|
18
|
+
GLOBAL_DIR="${SKILL_STOCKTAKE_GLOBAL_DIR:-$HOME/.claude/skills}"
|
|
19
|
+
|
|
20
|
+
if [[ -z "$RESULTS_JSON" || ! -f "$RESULTS_JSON" ]]; then
|
|
21
|
+
echo "Error: RESULTS_JSON not found: ${RESULTS_JSON:-<empty>}" >&2
|
|
22
|
+
exit 1
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
# Validate CWD_SKILLS_DIR looks like a .claude/skills path (defense-in-depth).
|
|
26
|
+
# Only warn when the path exists — a nonexistent path poses no traversal risk.
|
|
27
|
+
if [[ -n "$CWD_SKILLS_DIR" && -d "$CWD_SKILLS_DIR" && "$CWD_SKILLS_DIR" != */.claude/skills* ]]; then
|
|
28
|
+
echo "Warning: CWD_SKILLS_DIR does not look like a .claude/skills path: $CWD_SKILLS_DIR" >&2
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
evaluated_at=$(jq -r '.evaluated_at' "$RESULTS_JSON")
|
|
32
|
+
|
|
33
|
+
# Fail fast on a missing or malformed evaluated_at rather than producing
|
|
34
|
+
# unpredictable results from ISO 8601 string comparison against "null".
|
|
35
|
+
if [[ ! "$evaluated_at" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$ ]]; then
|
|
36
|
+
echo "Error: invalid or missing evaluated_at in $RESULTS_JSON: $evaluated_at" >&2
|
|
37
|
+
exit 1
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
# Pre-extract known paths from results.json once (O(1) lookup per file instead of O(n*m))
|
|
41
|
+
known_paths=$(jq -r '.skills[].path' "$RESULTS_JSON" 2>/dev/null)
|
|
42
|
+
|
|
43
|
+
tmpdir=$(mktemp -d)
|
|
44
|
+
# Use a function to avoid embedding $tmpdir in a quoted string (prevents injection
|
|
45
|
+
# if TMPDIR were crafted to contain shell metacharacters).
|
|
46
|
+
_cleanup() { rm -rf "$tmpdir"; }
|
|
47
|
+
trap _cleanup EXIT
|
|
48
|
+
|
|
49
|
+
# Shared counter across process_dir calls — intentionally NOT local
|
|
50
|
+
i=0
|
|
51
|
+
|
|
52
|
+
process_dir() {
|
|
53
|
+
local dir="$1"
|
|
54
|
+
while IFS= read -r file; do
|
|
55
|
+
local mtime dp is_new
|
|
56
|
+
mtime=$(date -u -r "$file" +%Y-%m-%dT%H:%M:%SZ)
|
|
57
|
+
dp="${file/#$HOME/~}"
|
|
58
|
+
|
|
59
|
+
# Check if this file is known to results.json (exact whole-line match to
|
|
60
|
+
# avoid substring false-positives, e.g. "python-patterns" matching "python-patterns-v2").
|
|
61
|
+
if echo "$known_paths" | grep -qxF "$dp"; then
|
|
62
|
+
is_new="false"
|
|
63
|
+
# Known file: only emit if mtime changed (ISO 8601 string comparison is safe)
|
|
64
|
+
[[ "$mtime" > "$evaluated_at" ]] || continue
|
|
65
|
+
else
|
|
66
|
+
is_new="true"
|
|
67
|
+
# New file: always emit regardless of mtime
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
jq -n \
|
|
71
|
+
--arg path "$dp" \
|
|
72
|
+
--arg mtime "$mtime" \
|
|
73
|
+
--argjson is_new "$is_new" \
|
|
74
|
+
'{path:$path,mtime:$mtime,is_new:$is_new}' \
|
|
75
|
+
> "$tmpdir/$i.json"
|
|
76
|
+
i=$((i+1))
|
|
77
|
+
done < <(find "$dir" -name "*.md" -type f 2>/dev/null | sort)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[[ -d "$GLOBAL_DIR" ]] && process_dir "$GLOBAL_DIR"
|
|
81
|
+
[[ -n "$CWD_SKILLS_DIR" && -d "$CWD_SKILLS_DIR" ]] && process_dir "$CWD_SKILLS_DIR"
|
|
82
|
+
|
|
83
|
+
if [[ $i -eq 0 ]]; then
|
|
84
|
+
echo "[]"
|
|
85
|
+
else
|
|
86
|
+
jq -s '.' "$tmpdir"/*.json
|
|
87
|
+
fi
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# save-results.sh — merge evaluated skills into results.json with correct UTC timestamp
|
|
3
|
+
# Usage: save-results.sh RESULTS_JSON <<< "$EVAL_JSON"
|
|
4
|
+
#
|
|
5
|
+
# stdin format:
|
|
6
|
+
# { "skills": {...}, "mode"?: "full"|"quick", "batch_progress"?: {...} }
|
|
7
|
+
#
|
|
8
|
+
# Always sets evaluated_at to current UTC time via `date -u`.
|
|
9
|
+
# Merges stdin .skills into existing results.json (new entries override old).
|
|
10
|
+
# Optionally updates .mode and .batch_progress if present in stdin.
|
|
11
|
+
|
|
12
|
+
set -euo pipefail
|
|
13
|
+
|
|
14
|
+
RESULTS_JSON="${1:-}"
|
|
15
|
+
|
|
16
|
+
if [[ -z "$RESULTS_JSON" ]]; then
|
|
17
|
+
echo "Error: RESULTS_JSON argument required" >&2
|
|
18
|
+
echo "Usage: save-results.sh RESULTS_JSON <<< \"\$EVAL_JSON\"" >&2
|
|
19
|
+
exit 1
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
EVALUATED_AT=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
23
|
+
|
|
24
|
+
# Read eval results from stdin and validate JSON before touching the results file
|
|
25
|
+
input_json=$(cat)
|
|
26
|
+
if ! echo "$input_json" | jq empty 2>/dev/null; then
|
|
27
|
+
echo "Error: stdin is not valid JSON" >&2
|
|
28
|
+
exit 1
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
if [[ ! -f "$RESULTS_JSON" ]]; then
|
|
32
|
+
# Bootstrap: create new results.json from stdin JSON + current UTC timestamp
|
|
33
|
+
echo "$input_json" | jq --arg ea "$EVALUATED_AT" \
|
|
34
|
+
'. + { evaluated_at: $ea }' > "$RESULTS_JSON"
|
|
35
|
+
exit 0
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
# Merge: new .skills override existing ones; old skills not in input_json are kept.
|
|
39
|
+
# Optionally update .mode and .batch_progress if provided.
|
|
40
|
+
#
|
|
41
|
+
# Use mktemp for a collision-safe temp file (concurrent runs on the same RESULTS_JSON
|
|
42
|
+
# would race on a predictable ".tmp" suffix; random suffix prevents silent overwrites).
|
|
43
|
+
tmp=$(mktemp "${RESULTS_JSON}.XXXXXX")
|
|
44
|
+
trap 'rm -f "$tmp"' EXIT
|
|
45
|
+
|
|
46
|
+
jq -s \
|
|
47
|
+
--arg ea "$EVALUATED_AT" \
|
|
48
|
+
'.[0] as $existing | .[1] as $new |
|
|
49
|
+
$existing |
|
|
50
|
+
.evaluated_at = $ea |
|
|
51
|
+
.skills = ($existing.skills + ($new.skills // {})) |
|
|
52
|
+
if ($new | has("mode")) then .mode = $new.mode else . end |
|
|
53
|
+
if ($new | has("batch_progress")) then .batch_progress = $new.batch_progress else . end' \
|
|
54
|
+
"$RESULTS_JSON" <(echo "$input_json") > "$tmp"
|
|
55
|
+
|
|
56
|
+
mv "$tmp" "$RESULTS_JSON"
|