@tyroneross/build-loop 0.30.3
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/plugins/marketplace.json +10 -0
- package/.claude-plugin/marketplace.json +38 -0
- package/.claude-plugin/plugin.json +30 -0
- package/.codex-plugin/plugin.json +41 -0
- package/.cursor/rules/build-loop-surface.mdc +22 -0
- package/AGENTS.md +498 -0
- package/LICENSE +202 -0
- package/README.md +403 -0
- package/agents/alignment-checker.md +124 -0
- package/agents/api-assessor.md +136 -0
- package/agents/architecture-scout.md +185 -0
- package/agents/assessment-orchestrator.md +163 -0
- package/agents/build-orchestrator.md +198 -0
- package/agents/database-assessor.md +133 -0
- package/agents/design-contract-specialist.md +239 -0
- package/agents/fact-checker.md +69 -0
- package/agents/fix-critique.md +161 -0
- package/agents/frontend-assessor.md +136 -0
- package/agents/implementer.md +185 -0
- package/agents/independent-auditor.md +143 -0
- package/agents/mock-scanner.md +78 -0
- package/agents/optimize-runner.md +112 -0
- package/agents/overfitting-reviewer.md +96 -0
- package/agents/performance-assessor.md +159 -0
- package/agents/plan-critic.md +85 -0
- package/agents/promotion-reviewer.md +121 -0
- package/agents/recurring-pattern-detector.md +248 -0
- package/agents/retrospective-synthesizer.md +109 -0
- package/agents/root-cause-investigator.md +285 -0
- package/agents/scope-auditor.md +121 -0
- package/agents/security-reviewer.md +151 -0
- package/agents/self-improvement-architect.md +125 -0
- package/agents/synthesis-critic.md +99 -0
- package/agents/transcript-pattern-miner.md +165 -0
- package/agents/ui-validator.md +193 -0
- package/codex-skills/build-loop/SKILL.md +20 -0
- package/codex-skills/debug-loop/SKILL.md +18 -0
- package/codex-skills/handoff/SKILL.md +22 -0
- package/codex-skills/knowledge/SKILL.md +21 -0
- package/codex-skills/optimize/SKILL.md +18 -0
- package/codex-skills/research/SKILL.md +18 -0
- package/commands/agent-rally-point.md +301 -0
- package/commands/assess.md +41 -0
- package/commands/debug.md +20 -0
- package/commands/debugger-detail.md +34 -0
- package/commands/debugger-scan.md +15 -0
- package/commands/debugger-status.md +20 -0
- package/commands/debugger.md +32 -0
- package/commands/handoff.md +113 -0
- package/commands/knowledge-review.md +16 -0
- package/commands/optimize.md +31 -0
- package/commands/plan-verify.md +39 -0
- package/commands/promote-experiment.md +129 -0
- package/commands/research.md +22 -0
- package/commands/run.md +12 -0
- package/commands/self-review.md +51 -0
- package/commands/start-prd.md +57 -0
- package/commands/test.md +34 -0
- package/dist/src/assessment-orchestrator.d.ts +78 -0
- package/dist/src/assessment-orchestrator.d.ts.map +1 -0
- package/dist/src/assessment-orchestrator.js +304 -0
- package/dist/src/assessment-orchestrator.js.map +1 -0
- package/dist/src/audit-miner.d.ts +21 -0
- package/dist/src/audit-miner.d.ts.map +1 -0
- package/dist/src/audit-miner.js +421 -0
- package/dist/src/audit-miner.js.map +1 -0
- package/dist/src/batch-operations.d.ts +30 -0
- package/dist/src/batch-operations.d.ts.map +1 -0
- package/dist/src/batch-operations.js +339 -0
- package/dist/src/batch-operations.js.map +1 -0
- package/dist/src/config.d.ts +83 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +176 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/context-engine.d.ts +45 -0
- package/dist/src/context-engine.d.ts.map +1 -0
- package/dist/src/context-engine.js +135 -0
- package/dist/src/context-engine.js.map +1 -0
- package/dist/src/debug-wrapper.d.ts +58 -0
- package/dist/src/debug-wrapper.d.ts.map +1 -0
- package/dist/src/debug-wrapper.js +285 -0
- package/dist/src/debug-wrapper.js.map +1 -0
- package/dist/src/index.d.ts +31 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +149 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/interactive-verifier.d.ts +26 -0
- package/dist/src/interactive-verifier.d.ts.map +1 -0
- package/dist/src/interactive-verifier.js +435 -0
- package/dist/src/interactive-verifier.js.map +1 -0
- package/dist/src/lessons.d.ts +59 -0
- package/dist/src/lessons.d.ts.map +1 -0
- package/dist/src/lessons.js +172 -0
- package/dist/src/lessons.js.map +1 -0
- package/dist/src/log-reader.d.ts +39 -0
- package/dist/src/log-reader.d.ts.map +1 -0
- package/dist/src/log-reader.js +291 -0
- package/dist/src/log-reader.js.map +1 -0
- package/dist/src/logger.d.ts +59 -0
- package/dist/src/logger.d.ts.map +1 -0
- package/dist/src/logger.js +328 -0
- package/dist/src/logger.js.map +1 -0
- package/dist/src/parallel-retrieval.d.ts +52 -0
- package/dist/src/parallel-retrieval.d.ts.map +1 -0
- package/dist/src/parallel-retrieval.js +309 -0
- package/dist/src/parallel-retrieval.js.map +1 -0
- package/dist/src/pattern-extractor.d.ts +30 -0
- package/dist/src/pattern-extractor.d.ts.map +1 -0
- package/dist/src/pattern-extractor.js +386 -0
- package/dist/src/pattern-extractor.js.map +1 -0
- package/dist/src/result-aggregator.d.ts +44 -0
- package/dist/src/result-aggregator.d.ts.map +1 -0
- package/dist/src/result-aggregator.js +315 -0
- package/dist/src/result-aggregator.js.map +1 -0
- package/dist/src/retrieval.d.ts +139 -0
- package/dist/src/retrieval.d.ts.map +1 -0
- package/dist/src/retrieval.js +724 -0
- package/dist/src/retrieval.js.map +1 -0
- package/dist/src/setup/auto-setup.d.ts +15 -0
- package/dist/src/setup/auto-setup.d.ts.map +1 -0
- package/dist/src/setup/auto-setup.js +157 -0
- package/dist/src/setup/auto-setup.js.map +1 -0
- package/dist/src/setup/configure-hooks.d.ts +8 -0
- package/dist/src/setup/configure-hooks.d.ts.map +1 -0
- package/dist/src/setup/configure-hooks.js +16 -0
- package/dist/src/setup/configure-hooks.js.map +1 -0
- package/dist/src/setup/create-slash-commands.d.ts +8 -0
- package/dist/src/setup/create-slash-commands.d.ts.map +1 -0
- package/dist/src/setup/create-slash-commands.js +101 -0
- package/dist/src/setup/create-slash-commands.js.map +1 -0
- package/dist/src/setup/index.d.ts +8 -0
- package/dist/src/setup/index.d.ts.map +1 -0
- package/dist/src/setup/index.js +17 -0
- package/dist/src/setup/index.js.map +1 -0
- package/dist/src/setup/inject-claude-md.d.ts +10 -0
- package/dist/src/setup/inject-claude-md.d.ts.map +1 -0
- package/dist/src/setup/inject-claude-md.js +150 -0
- package/dist/src/setup/inject-claude-md.js.map +1 -0
- package/dist/src/setup/uninstall.d.ts +22 -0
- package/dist/src/setup/uninstall.d.ts.map +1 -0
- package/dist/src/setup/uninstall.js +235 -0
- package/dist/src/setup/uninstall.js.map +1 -0
- package/dist/src/storage.d.ts +192 -0
- package/dist/src/storage.d.ts.map +1 -0
- package/dist/src/storage.js +1037 -0
- package/dist/src/storage.js.map +1 -0
- package/dist/src/string-similarity.d.ts +8 -0
- package/dist/src/string-similarity.d.ts.map +1 -0
- package/dist/src/string-similarity.js +57 -0
- package/dist/src/string-similarity.js.map +1 -0
- package/dist/src/traces/adapters/browser.d.ts +69 -0
- package/dist/src/traces/adapters/browser.d.ts.map +1 -0
- package/dist/src/traces/adapters/browser.js +280 -0
- package/dist/src/traces/adapters/browser.js.map +1 -0
- package/dist/src/traces/adapters/index.d.ts +23 -0
- package/dist/src/traces/adapters/index.d.ts.map +1 -0
- package/dist/src/traces/adapters/index.js +67 -0
- package/dist/src/traces/adapters/index.js.map +1 -0
- package/dist/src/traces/adapters/langchain.d.ts +42 -0
- package/dist/src/traces/adapters/langchain.d.ts.map +1 -0
- package/dist/src/traces/adapters/langchain.js +151 -0
- package/dist/src/traces/adapters/langchain.js.map +1 -0
- package/dist/src/traces/adapters/opentelemetry.d.ts +46 -0
- package/dist/src/traces/adapters/opentelemetry.d.ts.map +1 -0
- package/dist/src/traces/adapters/opentelemetry.js +164 -0
- package/dist/src/traces/adapters/opentelemetry.js.map +1 -0
- package/dist/src/traces/adapters/sentry.d.ts +58 -0
- package/dist/src/traces/adapters/sentry.d.ts.map +1 -0
- package/dist/src/traces/adapters/sentry.js +212 -0
- package/dist/src/traces/adapters/sentry.js.map +1 -0
- package/dist/src/traces/index.d.ts +10 -0
- package/dist/src/traces/index.d.ts.map +1 -0
- package/dist/src/traces/index.js +45 -0
- package/dist/src/traces/index.js.map +1 -0
- package/dist/src/traces/storage.d.ts +78 -0
- package/dist/src/traces/storage.d.ts.map +1 -0
- package/dist/src/traces/storage.js +399 -0
- package/dist/src/traces/storage.js.map +1 -0
- package/dist/src/traces/summarizer.d.ts +83 -0
- package/dist/src/traces/summarizer.d.ts.map +1 -0
- package/dist/src/traces/summarizer.js +247 -0
- package/dist/src/traces/summarizer.js.map +1 -0
- package/dist/src/traces/types.d.ts +365 -0
- package/dist/src/traces/types.d.ts.map +1 -0
- package/dist/src/traces/types.js +14 -0
- package/dist/src/traces/types.js.map +1 -0
- package/dist/src/types.d.ts +495 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +27 -0
- package/dist/src/types.js.map +1 -0
- package/docs/agent-surface-policy.md +45 -0
- package/docs/memory-setup.md +226 -0
- package/hooks/_arch_scan_bg.py +88 -0
- package/hooks/_plugin_drift_check_bg.py +85 -0
- package/hooks/_session_start_lib.sh +42 -0
- package/hooks/git/pre-push +141 -0
- package/hooks/hooks.json +126 -0
- package/hooks/post-commit +30 -0
- package/hooks/pre-commit +29 -0
- package/hooks/pre-edit-apppulse.sh +6 -0
- package/hooks/pre-edit-architecture.sh +106 -0
- package/hooks/pre-edit-rally-point.sh +92 -0
- package/hooks/session-start-apppulse.sh +6 -0
- package/hooks/session-start-architecture.sh +10 -0
- package/hooks/session-start-git-hooks.sh +12 -0
- package/hooks/session-start-plugin-drift.sh +27 -0
- package/hooks/session-start-rally-point.sh +44 -0
- package/hooks/session-start-retrieval.sh +24 -0
- package/hooks/session-start-worktree-gc.sh +105 -0
- package/hooks/test_apppulse_hooks.sh +6 -0
- package/hooks/test_rally_point_hooks.sh +388 -0
- package/hooks/test_sec008_hooks.sh +66 -0
- package/package.json +111 -0
- package/scripts/README.md +301 -0
- package/scripts/_db_url.py +61 -0
- package/scripts/_paths.py +445 -0
- package/scripts/blm.py +162 -0
- package/scripts/blm_api.py +263 -0
- package/scripts/check_cache_sync.py +490 -0
- package/scripts/embed_backend.py +475 -0
- package/scripts/install_memory.py +556 -0
- package/scripts/lessons_index/__init__.py +77 -0
- package/scripts/lessons_index/__main__.py +135 -0
- package/scripts/lessons_index/ingest.py +288 -0
- package/scripts/lessons_index/query.py +285 -0
- package/scripts/lessons_index/schema.py +114 -0
- package/scripts/memory_context/__init__.py +610 -0
- package/scripts/memory_graph/__init__.py +393 -0
- package/scripts/project_resolver.py +172 -0
- package/scripts/prune_codex_plugin_cache.py +23 -0
- package/scripts/prune_plugin_cache.py +359 -0
- package/scripts/semantic_index/__init__.py +482 -0
- package/scripts/semantic_index/_bench_hybrid.py +175 -0
- package/scripts/semantic_index/backfill.py +263 -0
- package/scripts/semantic_index/hybrid.py +174 -0
- package/scripts/semantic_index/test_backfill.py +292 -0
- package/scripts/semantic_index/test_hybrid.py +541 -0
- package/scripts/sync_navgator_lessons.py +666 -0
- package/scripts/sync_plugin_cache.py +388 -0
- package/skills/agent-rally-point/SKILL.md +165 -0
- package/skills/agent-rally-watcher/SKILL.md +83 -0
- package/skills/api-registry-bridge/SKILL.md +59 -0
- package/skills/architecture/dead/SKILL.md +56 -0
- package/skills/architecture/impact/SKILL.md +88 -0
- package/skills/architecture/review/SKILL.md +227 -0
- package/skills/architecture/rules/SKILL.md +72 -0
- package/skills/architecture/scan/SKILL.md +79 -0
- package/skills/architecture/trace/SKILL.md +65 -0
- package/skills/attribution-standard/SKILL.md +122 -0
- package/skills/authentication/SKILL.md +81 -0
- package/skills/authentication/references/better-auth-magic-link.md +135 -0
- package/skills/authentication/references/better-auth-setup.md +224 -0
- package/skills/authentication/references/google-calendar-sync.md +278 -0
- package/skills/authentication/references/google-cloud-console.md +159 -0
- package/skills/authentication/references/google-geocoding-directions.md +126 -0
- package/skills/authentication/references/google-lessons-example-web-app.md +177 -0
- package/skills/authentication/references/google-maps.md +162 -0
- package/skills/authentication/references/google-oauth-setup.md +343 -0
- package/skills/authentication/references/google-places.md +173 -0
- package/skills/authentication/references/lessons-example-web-app-better-auth.md +126 -0
- package/skills/authentication/references/resend-email.md +227 -0
- package/skills/authentication/references/resend-otp-magic-link.md +153 -0
- package/skills/authentication/references/supabase-auth.md +172 -0
- package/skills/auto-decision-capture/SKILL.md +419 -0
- package/skills/build-loop/SKILL.md +516 -0
- package/skills/build-loop/detect-plugins.mjs +82 -0
- package/skills/build-loop/eval-guide.md +65 -0
- package/skills/build-loop/fallbacks.md +549 -0
- package/skills/build-loop/phases/fact-check.md +42 -0
- package/skills/build-loop/phases/ui-validation.md +267 -0
- package/skills/build-loop/references/apple-native-planning.md +439 -0
- package/skills/build-loop/references/capability-routing.md +181 -0
- package/skills/build-loop/references/codex-subagents.md +98 -0
- package/skills/build-loop/references/coordination.md +161 -0
- package/skills/build-loop/references/correction-aware-capture.md +177 -0
- package/skills/build-loop/references/independent-auditor.md +72 -0
- package/skills/build-loop/references/intent-capability-pack.md +170 -0
- package/skills/build-loop/references/intent-exploration-prompts.md +96 -0
- package/skills/build-loop/references/leadership.md +72 -0
- package/skills/build-loop/references/memory.md +284 -0
- package/skills/build-loop/references/modular-systems-pack.md +96 -0
- package/skills/build-loop/references/output-style.md +129 -0
- package/skills/build-loop/references/pay-it-forward-arch.md +98 -0
- package/skills/build-loop/references/phase-1-assess.md +218 -0
- package/skills/build-loop/references/phase-2-plan.md +77 -0
- package/skills/build-loop/references/phase-3-execute.md +47 -0
- package/skills/build-loop/references/phase-4-review.md +310 -0
- package/skills/build-loop/references/phase-5-iterate.md +71 -0
- package/skills/build-loop/references/phase-6-learn.md +56 -0
- package/skills/build-loop/references/recent-design-structures.md +274 -0
- package/skills/build-loop/references/refactor-history/ASSESSMENT.md +85 -0
- package/skills/build-loop/references/refactor-history/STANDALONE_TEST_RUN.md +149 -0
- package/skills/build-loop/references/refactor-history/scenarios/01-simple-bugfix.md +32 -0
- package/skills/build-loop/references/refactor-history/scenarios/02-ui-build-with-iteration.md +48 -0
- package/skills/build-loop/references/refactor-history/scenarios/03-multi-failure-escalation.md +60 -0
- package/skills/build-loop/references/refactor-history/scenarios/04-ui-build-ibr-absent.md +51 -0
- package/skills/build-loop/references/refactor-history/scenarios/05-refactor-navgator-absent.md +71 -0
- package/skills/build-loop/references/refactor-history/scenarios/06-recurring-bug-debugger-absent.md +52 -0
- package/skills/build-loop/references/refactor-history/trace-comparison.md +202 -0
- package/skills/build-loop/references/self-recursive-dev.md +77 -0
- package/skills/build-loop/references/self-review.md +232 -0
- package/skills/build-loop/references/ui-io-contract.md +116 -0
- package/skills/build-loop/scanners/audit-design-rules.mjs +476 -0
- package/skills/build-loop/scanners/require-visual-evidence.mjs +239 -0
- package/skills/build-loop/templates/backlog-item.md +35 -0
- package/skills/build-loop/templates/codex-worker-prompt.md +89 -0
- package/skills/build-loop/templates/ui-subagent-prompt.md +179 -0
- package/skills/build-loop/templates/ux-fix-plan.md +40 -0
- package/skills/building-with-deepagents/SKILL.md +195 -0
- package/skills/building-with-deepagents/references/anti-patterns.md +141 -0
- package/skills/building-with-deepagents/references/api-quick-reference.md +184 -0
- package/skills/capabilities/SKILL.md +91 -0
- package/skills/debug-loop/SKILL.md +278 -0
- package/skills/debug-loop/references/convergence-rules.md +145 -0
- package/skills/debug-loop/references/swiftui-macos-clunky-ui-debugger.html +823 -0
- package/skills/debugging/assess/SKILL.md +111 -0
- package/skills/debugging/debug-loop/SKILL.md +231 -0
- package/skills/debugging/memory/SKILL.md +147 -0
- package/skills/debugging/store/SKILL.md +153 -0
- package/skills/debugging-memory/SKILL.md +440 -0
- package/skills/debugging-memory/examples/incident-example.json +67 -0
- package/skills/debugging-memory/references/incident-documentation.md +280 -0
- package/skills/debugging-memory/references/ios-notification-alarm-playbook.md +300 -0
- package/skills/debugging-memory/references/pattern-extraction.md +163 -0
- package/skills/debugging-memory/references/subagent-integration.md +312 -0
- package/skills/defenseclaw-bridge/SKILL.md +156 -0
- package/skills/defenseclaw-bridge/references/dc-config-mapping.md +162 -0
- package/skills/defenseclaw-bridge/references/output-format.md +108 -0
- package/skills/handoff/SKILL.md +94 -0
- package/skills/ibr-bridge/SKILL.md +68 -0
- package/skills/knowledge/SKILL.md +127 -0
- package/skills/knowledge/references/recall-integration.md +83 -0
- package/skills/knowledge/templates/madr-minimal.md +56 -0
- package/skills/knowledge-review/SKILL.md +112 -0
- package/skills/logging-tracer/SKILL.md +202 -0
- package/skills/logging-tracer/references/log-analysis.md +128 -0
- package/skills/logging-tracer/references/stack-templates.md +274 -0
- package/skills/logging-tracer-bridge/SKILL.md +70 -0
- package/skills/mcp-builder/SKILL.md +278 -0
- package/skills/mcp-builder/references/mcp-security.md +106 -0
- package/skills/model-tiering/SKILL.md +216 -0
- package/skills/native-ax-driver/SKILL.md +220 -0
- package/skills/native-ax-driver/scripts/layout_fill.py +222 -0
- package/skills/native-ax-driver/scripts/native_driver.py +495 -0
- package/skills/native-ax-driver/swift/bl-ax-driver/Package.swift +20 -0
- package/skills/native-ax-driver/swift/bl-ax-driver/Sources/main.swift +542 -0
- package/skills/optimize/SKILL.md +202 -0
- package/skills/optimize/profiles.md +61 -0
- package/skills/plan-verify/SKILL.md +115 -0
- package/skills/plan-verify/test-fixtures/example-app-v20-findings.json +27 -0
- package/skills/plan-verify/test-fixtures/example-app-v20.md +42 -0
- package/skills/plan-verify/test-fixtures/example-app-v22-findings.json +15 -0
- package/skills/plan-verify/test-fixtures/example-app-v22.md +1608 -0
- package/skills/plan-verify/test-fixtures/unrelated-good-plan-findings.json +15 -0
- package/skills/plan-verify/test-fixtures/unrelated-good-plan.md +55 -0
- package/skills/plugin-builder/SKILL.md +329 -0
- package/skills/plugin-builder/references/authoritative-sources.md +104 -0
- package/skills/plugin-builder/references/build-loop-phase-guidance.md +94 -0
- package/skills/plugin-builder/references/components-guide.md +221 -0
- package/skills/plugin-builder/references/distribution.md +317 -0
- package/skills/plugin-builder/references/dual-host-claude-codex.md +220 -0
- package/skills/plugin-builder/references/hooks-reference.md +210 -0
- package/skills/plugin-builder/references/manifest-schema.md +111 -0
- package/skills/plugin-builder/references/plugin-hygiene-lessons.md +307 -0
- package/skills/plugin-tests/SKILL.md +94 -0
- package/skills/prd-bridge/SKILL.md +135 -0
- package/skills/research/SKILL.md +80 -0
- package/skills/security-methodology/SKILL.md +105 -0
- package/skills/security-methodology/references/cross-source-matrix.md +77 -0
- package/skills/security-methodology/references/mitre-atlas-starter.md +83 -0
- package/skills/security-methodology/references/nist-600-1-mapping.md +119 -0
- package/skills/security-methodology/references/owasp-agentic-top-10.md +157 -0
- package/skills/security-methodology/references/owasp-llm-top-10.md +144 -0
- package/skills/security-methodology/references/owasp-web-top-10.md +65 -0
- package/skills/self-improve/SKILL.md +298 -0
- package/skills/spec-writing/SKILL.md +548 -0
- package/skills/spec-writing/scripts/check_checklist.py +478 -0
- package/skills/sync-skills/SKILL.md +132 -0
- package/skills/telemetry/SKILL.md +66 -0
- package/skills/ui-design/SKILL.md +75 -0
- package/skills/ui-design/references/design-patterns-multi.md +165 -0
- package/skills/ui-design/references/design-preferences-from-owned-apps.md +150 -0
- package/skills/ui-design/references/evidence-capture-policy.md +55 -0
- package/skills/ui-design/references/ui-guidance-sources.md +330 -0
- package/skills/ui-design/references/universal-design-principles.alt.md +182 -0
- package/skills/ui-design/references/universal-design-principles.md +419 -0
- package/templates/memory/MEMORY.md.template +55 -0
- package/templates/memory/constitution.md.template +64 -0
- package/templates/memory/manifest.json +47 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fixture": "unrelated-good-plan.md",
|
|
3
|
+
"expected_exit_code": 0,
|
|
4
|
+
"description": "False-positive control. Clean plan from a different project. Should produce zero BLOCKERs.",
|
|
5
|
+
"expectations_by_rule_id": {
|
|
6
|
+
"delete-with-callers": { "max_blocker_count": 0 },
|
|
7
|
+
"numeric-drift": { "max_blocker_count": 0 },
|
|
8
|
+
"route-change-evidence": { "max_blocker_count": 0 },
|
|
9
|
+
"package-state": { "max_blocker_count": 0 },
|
|
10
|
+
"missing-evidence": {
|
|
11
|
+
"max_warn_count": 5,
|
|
12
|
+
"rationale": "Clean plan, but warn budget allows for a few unmarked stylistic claims."
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
|
|
3
|
+
override: reads-from-dependency — pre-dates the reads-from section requirement; fixture demonstrates other rules only
|
|
4
|
+
|
|
5
|
+
# Travel Planner — Summer Camp Listings
|
|
6
|
+
|
|
7
|
+
> Clean plan from another project. False-positive control fixture for `plan_verify.py`.
|
|
8
|
+
|
|
9
|
+
## Goal
|
|
10
|
+
|
|
11
|
+
Add summer-camp listings to the existing trips dashboard. Reuse the `Trip` schema; do not introduce a new entity type. ✅ verified by reading `src/db/schema.ts` lines 14-32.
|
|
12
|
+
|
|
13
|
+
## Approach
|
|
14
|
+
|
|
15
|
+
Add a `category` enum field to `Trip` with values `vacation | camp | conference`. Default is `vacation` to preserve existing rows. ✅ verified by checking current Drizzle migration history shows no `category` column exists.
|
|
16
|
+
|
|
17
|
+
Render camps in the same TripCard component. The card already accepts an optional badge prop; we wire `category === 'camp'` to a "Camp" badge.
|
|
18
|
+
|
|
19
|
+
## Failure Modes
|
|
20
|
+
|
|
21
|
+
- **Primary invariant:** existing vacation trips continue rendering exactly as before while camp trips get the new category badge.
|
|
22
|
+
- **Likely failure modes:** migration default omitted, enum value misspelled, existing TripCard badge prop bypassed.
|
|
23
|
+
- **Observability signal:** failing migration, snapshot diff missing the badge, or existing trip snapshot changing unexpectedly.
|
|
24
|
+
- **Proof check:** run the migration in CI and update the TripCard snapshot test with both `vacation` and `camp` categories.
|
|
25
|
+
- **Rollback/containment:** revert the UI badge wiring and leave the additive defaulted column in place until a follow-up migration removes it.
|
|
26
|
+
|
|
27
|
+
## Phase 1 — Schema
|
|
28
|
+
|
|
29
|
+
Add migration `0014_trip_category.sql`:
|
|
30
|
+
|
|
31
|
+
```sql
|
|
32
|
+
ALTER TABLE trips ADD COLUMN category text NOT NULL DEFAULT 'vacation';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Backfill is the default value, so the migration is idempotent.
|
|
36
|
+
|
|
37
|
+
## Phase 2 — UI
|
|
38
|
+
|
|
39
|
+
Update `TripCard.tsx` to render the badge. ✅ verified TripCard already supports a `badge` slot via prop drilling.
|
|
40
|
+
|
|
41
|
+
## Phase 3 — Tests
|
|
42
|
+
|
|
43
|
+
Add a snapshot test for the camp badge. Test data uses real category values; no mocks.
|
|
44
|
+
|
|
45
|
+
## Verification
|
|
46
|
+
|
|
47
|
+
- Migration runs cleanly on staging — ✅ verified by running `pnpm db:migrate` in CI.
|
|
48
|
+
- TripCard snapshot updated — ⚠️ untested, will run after merge.
|
|
49
|
+
- No regressions in existing trip flows — ❓ uncertain; needs a manual spot-check.
|
|
50
|
+
|
|
51
|
+
## Out of scope
|
|
52
|
+
|
|
53
|
+
- No new database table.
|
|
54
|
+
- No changes to auth.
|
|
55
|
+
- No new package dependencies.
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plugin-builder
|
|
3
|
+
description: Use when the user asks to create, build, scaffold, convert, or migrate a Claude Code plugin, or needs guidance on plugin.json, directory layout, hooks, MCP servers, agents, LSP, or distribution.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
8
|
+
|
|
9
|
+
# Plugin Builder
|
|
10
|
+
|
|
11
|
+
Build Claude Code plugins following official documentation and best practices.
|
|
12
|
+
|
|
13
|
+
## When to Use Plugins vs Standalone
|
|
14
|
+
|
|
15
|
+
| Approach | Skill names | Best for |
|
|
16
|
+
|----------|-------------|----------|
|
|
17
|
+
| **Standalone** (`.claude/`) | `/hello` | Personal workflows, single-project, quick experiments |
|
|
18
|
+
| **Plugin** (`.claude-plugin/plugin.json`) | `/plugin-name:hello` | Sharing with team, distributing, versioned, reusable across projects |
|
|
19
|
+
|
|
20
|
+
**Use standalone when:** Single project, personal, experimenting, want short names.
|
|
21
|
+
**Use plugins when:** Sharing with team/community, need same skills across projects, want version control.
|
|
22
|
+
|
|
23
|
+
## Plugin Creation Workflow
|
|
24
|
+
|
|
25
|
+
### Step 1: Create the Directory Structure
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
mkdir -p my-plugin/.claude-plugin
|
|
29
|
+
mkdir -p my-plugin/{commands,agents,skills,hooks,scripts}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Standard layout:**
|
|
33
|
+
```
|
|
34
|
+
my-plugin/
|
|
35
|
+
├── .claude-plugin/
|
|
36
|
+
│ └── plugin.json # ONLY manifest here
|
|
37
|
+
├── commands/ # Slash commands (*.md files)
|
|
38
|
+
├── agents/ # Subagent definitions (*.md files)
|
|
39
|
+
├── skills/ # Skills (subdirs with SKILL.md)
|
|
40
|
+
│ └── my-skill/
|
|
41
|
+
│ ├── SKILL.md
|
|
42
|
+
│ └── references/
|
|
43
|
+
├── hooks/
|
|
44
|
+
│ └── hooks.json # Event handlers
|
|
45
|
+
├── scripts/ # Utility scripts
|
|
46
|
+
├── .mcp.json # MCP server configs
|
|
47
|
+
├── .lsp.json # LSP server configs
|
|
48
|
+
├── settings.json # Default settings
|
|
49
|
+
└── CHANGELOG.md
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**CRITICAL:** Components go at plugin root, NOT inside `.claude-plugin/`. Only `plugin.json` goes in `.claude-plugin/`.
|
|
53
|
+
|
|
54
|
+
### Step 2: Create the Manifest
|
|
55
|
+
|
|
56
|
+
Create `.claude-plugin/plugin.json`:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"name": "my-plugin",
|
|
61
|
+
"description": "Brief description of what the plugin does",
|
|
62
|
+
"version": "1.0.0",
|
|
63
|
+
"author": {
|
|
64
|
+
"name": "Your Name"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**`name` is the only required field.** It becomes the namespace prefix for all components (`/my-plugin:skill-name`).
|
|
70
|
+
|
|
71
|
+
**Naming rules:**
|
|
72
|
+
- kebab-case, no spaces
|
|
73
|
+
- Used as namespace for all skills/commands
|
|
74
|
+
- Cannot use "claude" or "anthropic"
|
|
75
|
+
|
|
76
|
+
For the complete manifest schema with all optional fields, see `references/manifest-schema.md`.
|
|
77
|
+
|
|
78
|
+
### Step 3: Add Components
|
|
79
|
+
|
|
80
|
+
#### Skills (Recommended)
|
|
81
|
+
Create a subdirectory under `skills/` with a `SKILL.md`:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
skills/code-review/
|
|
85
|
+
└── SKILL.md
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Skills are auto-discovered — no manifest entry needed. See the `skill-builder` skill for detailed SKILL.md guidance.
|
|
89
|
+
|
|
90
|
+
#### Commands
|
|
91
|
+
Simple markdown files in `commands/`:
|
|
92
|
+
|
|
93
|
+
```markdown
|
|
94
|
+
---
|
|
95
|
+
description: Greet the user
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
Greet the user warmly and ask how you can help.
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
#### Agents
|
|
102
|
+
Markdown files in `agents/` defining subagent behavior:
|
|
103
|
+
|
|
104
|
+
```markdown
|
|
105
|
+
---
|
|
106
|
+
name: security-reviewer
|
|
107
|
+
description: Reviews code for security vulnerabilities
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
Detailed system prompt for the agent...
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
#### Hooks
|
|
114
|
+
Create `hooks/hooks.json`:
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"hooks": {
|
|
119
|
+
"PostToolUse": [
|
|
120
|
+
{
|
|
121
|
+
"matcher": "Write|Edit",
|
|
122
|
+
"hooks": [
|
|
123
|
+
{
|
|
124
|
+
"type": "command",
|
|
125
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/format.sh"
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Hook types:** `command` (shell), `prompt` (LLM evaluation), `agent` (agentic verification)
|
|
135
|
+
|
|
136
|
+
**Available events:** PreToolUse, PostToolUse, PostToolUseFailure, UserPromptSubmit, Stop, SubagentStop, SessionStart, SessionEnd, PreCompact, Notification, TaskCompleted, TeammateIdle, PermissionRequest, SubagentStart
|
|
137
|
+
|
|
138
|
+
For detailed hooks configuration, see `references/hooks-reference.md`.
|
|
139
|
+
|
|
140
|
+
**Lint hooks before shipping.** Run `python3 scripts/hook_hygiene_lint.py --hooks hooks/hooks.json --json` against any hooks.json change. It operationalizes §17 of `references/plugin-hygiene-lessons.md`: HH001 (bare-binary on minimal PATH), HH002 (`set -e` + unguarded substitution), HH003 (no fail-open tail), HH004 (advisory-deny without safety marker). WARN-level — surfaces in the run report, never blocks; consistent with build-loop's "judges route, never stop" rule. Build-loop's own `hooks/hooks.json` is the passing reference fixture (`scripts/test_hook_hygiene_lint.py`).
|
|
141
|
+
|
|
142
|
+
#### MCP Servers
|
|
143
|
+
Create `.mcp.json` at plugin root:
|
|
144
|
+
|
|
145
|
+
```json
|
|
146
|
+
{
|
|
147
|
+
"mcpServers": {
|
|
148
|
+
"my-service": {
|
|
149
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/servers/my-server",
|
|
150
|
+
"args": ["--config", "${CLAUDE_PLUGIN_ROOT}/config.json"]
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Always use `${CLAUDE_PLUGIN_ROOT}` for paths — plugins are cached to a different location after install.
|
|
157
|
+
|
|
158
|
+
#### LSP Servers
|
|
159
|
+
Create `.lsp.json` at plugin root:
|
|
160
|
+
|
|
161
|
+
```json
|
|
162
|
+
{
|
|
163
|
+
"go": {
|
|
164
|
+
"command": "gopls",
|
|
165
|
+
"args": ["serve"],
|
|
166
|
+
"extensionToLanguage": { ".go": "go" }
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Users must install the language server binary separately.
|
|
172
|
+
|
|
173
|
+
#### Default Settings
|
|
174
|
+
Create `settings.json` to activate a default agent:
|
|
175
|
+
|
|
176
|
+
```json
|
|
177
|
+
{
|
|
178
|
+
"agent": "security-reviewer"
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Step 4: Test Locally
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
claude --plugin-dir ./my-plugin
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**Test each component:**
|
|
189
|
+
- Skills: `/my-plugin:skill-name`
|
|
190
|
+
- Commands: `/my-plugin:command-name`
|
|
191
|
+
- Agents: Check `/agents`
|
|
192
|
+
- Hooks: Trigger the relevant events
|
|
193
|
+
- MCP: Verify tools appear
|
|
194
|
+
|
|
195
|
+
Load multiple plugins: `claude --plugin-dir ./plugin-one --plugin-dir ./plugin-two`
|
|
196
|
+
|
|
197
|
+
**Debug issues:** `claude --debug` shows plugin loading details, errors, registration.
|
|
198
|
+
|
|
199
|
+
### Step 5: Distribute
|
|
200
|
+
|
|
201
|
+
**Version management:** Semantic versioning (MAJOR.MINOR.PATCH). Bump version before distributing — users won't see changes without a version bump due to caching.
|
|
202
|
+
|
|
203
|
+
**Distribution options:**
|
|
204
|
+
1. Host on GitHub with README and installation guide
|
|
205
|
+
2. Create a marketplace (see `references/distribution.md`)
|
|
206
|
+
3. Submit to official Anthropic marketplace
|
|
207
|
+
|
|
208
|
+
## Key Environment Variables
|
|
209
|
+
|
|
210
|
+
| Variable | Description |
|
|
211
|
+
|----------|-------------|
|
|
212
|
+
| `${CLAUDE_PLUGIN_ROOT}` | Absolute path to plugin directory. Use in hooks, MCP, scripts. |
|
|
213
|
+
|
|
214
|
+
## Auto-Discovery Rules
|
|
215
|
+
|
|
216
|
+
Claude Code automatically discovers components in default locations:
|
|
217
|
+
- `commands/` → `*.md` files become slash commands
|
|
218
|
+
- `agents/` → `*.md` files become subagents
|
|
219
|
+
- `skills/` → subdirectories with `SKILL.md` become skills
|
|
220
|
+
- `hooks/hooks.json` → hook configurations
|
|
221
|
+
- `.mcp.json` → MCP server definitions
|
|
222
|
+
- `.lsp.json` → LSP server configurations
|
|
223
|
+
|
|
224
|
+
Custom paths in `plugin.json` **supplement** defaults, they don't replace them.
|
|
225
|
+
|
|
226
|
+
## Converting Standalone to Plugin
|
|
227
|
+
|
|
228
|
+
1. Create plugin structure with `.claude-plugin/plugin.json`
|
|
229
|
+
2. Copy `.claude/commands/` → `my-plugin/commands/`
|
|
230
|
+
3. Copy `.claude/agents/` → `my-plugin/agents/`
|
|
231
|
+
4. Copy `.claude/skills/` → `my-plugin/skills/`
|
|
232
|
+
5. Move hooks from `settings.json` to `hooks/hooks.json`
|
|
233
|
+
6. Test with `claude --plugin-dir ./my-plugin`
|
|
234
|
+
|
|
235
|
+
## Common Mistakes
|
|
236
|
+
|
|
237
|
+
| Mistake | Fix |
|
|
238
|
+
|---------|-----|
|
|
239
|
+
| Components inside `.claude-plugin/` | Move to plugin root |
|
|
240
|
+
| Absolute paths in hooks/MCP | Use `${CLAUDE_PLUGIN_ROOT}` |
|
|
241
|
+
| Script not executable | `chmod +x scripts/*.sh` |
|
|
242
|
+
| Hook event name wrong case | Use PascalCase: `PostToolUse` not `postToolUse` |
|
|
243
|
+
| Version not bumped | Users won't see updates without version change |
|
|
244
|
+
| Path traversal (`../shared/`) | Won't work after install — use symlinks if needed |
|
|
245
|
+
| Redeclaring `"hooks": "./hooks/hooks.json"` in manifest | Remove it. `hooks/hooks.json` is auto-loaded; redeclaring produces `Duplicate hooks file detected` in `/doctor`. Same for `.mcp.json` at default path. Only declare when using a non-standard path. |
|
|
246
|
+
| `type: "prompt"` hooks on high-frequency events | Never use `type: "prompt"` on `PostToolUse:Bash` or `UserPromptSubmit`. They fire on every tool call — LLM must evaluate the prompt each time, which spams "hook stopped continuation" messages and costs tokens. Use `type: "command"` with silent exit (exit 0) for conditional nudges; `type: "prompt"` is only OK on low-frequency events like `SessionStart`. |
|
|
247
|
+
| Identical hook in source repo and marketplace aggregator | Edit the source repo manifest — cache under `~/.claude/plugins/cache/` is regenerated from the marketplace repo on every sync, overwriting local edits. Commit + push before expecting changes to persist. |
|
|
248
|
+
| Flat `.mcp.json` without `mcpServers` wrapper | Always wrap: `{"mcpServers": {"<name>": {...}}}`. Flat form `{"<name>": {...}}` silently passes `/doctor` but fails at MCP startup — only visible in `/mcp`. |
|
|
249
|
+
| Claude-only plugin (no `.codex-plugin/plugin.json`) | Add a Codex manifest per `references/dual-host-claude-codex.md` so users on either host get the same plugin. Name/version must match the Claude manifest; skills and MCP config paths are shared. |
|
|
250
|
+
| Divergent `name` or `version` across Claude/Codex manifests | Keep identical. Users think of it as one plugin; split versions cause support confusion. |
|
|
251
|
+
| Plugin ships without pre-built `dist/` | Either bundle with `tsup` (single-file output, no runtime deps) OR commit `dist/` to the repo OR add a postinstall rebuild. `tsc`-only output that depends on `node_modules/` will fail when the marketplace sync excludes those dirs. |
|
|
252
|
+
| Removing a marketplace doesn't stick after `/reload-plugins` | Multiple sources re-seed `known_marketplaces.json`: `extraKnownMarketplaces` in `settings.json`, `~/.claude/plugins/.install-manifests/*.json`, and `~/.claude/plugins/marketplaces/<name>/`. Clean all three sources, then rewrite `known_marketplaces.json` last. See `references/plugin-hygiene-lessons.md` § 9. |
|
|
253
|
+
| Partial cache dirs from interrupted `/plugin update` | Two version dirs for the same plugin (one complete, one missing `dist/`/`node_modules/`). Align `installed_plugins.json`'s `version`+`installPath` and delete the incomplete one. See § 10. |
|
|
254
|
+
| `plugin.json` at plugin root instead of `.claude-plugin/plugin.json` | Move it. Only `plugin.json` lives in `.claude-plugin/`; everything else (commands/, skills/, agents/, hooks/) stays at plugin root. |
|
|
255
|
+
| Reserved marketplace name | Avoid `claude-code-marketplace`, `claude-code-plugins`, `claude-plugins-official`, `anthropic-*`, `agent-skills`, `knowledge-work-plugins`, `life-sciences`, plus impersonating variants. Rejected at claude.ai sync. |
|
|
256
|
+
| Non-kebab-case plugin or marketplace name | Local flow tolerates it with a warning; claude.ai sync rejects outright. Use `[a-z0-9][a-z0-9-]*`. Validate with `claude plugin validate .`. |
|
|
257
|
+
|
|
258
|
+
## Plugin Hygiene (Preventing Install Chaos)
|
|
259
|
+
|
|
260
|
+
Accumulating installs cause MCP server conflicts, phantom Stop-hook errors, and /doctor warnings. Rules:
|
|
261
|
+
|
|
262
|
+
**One canonical marketplace per plugin.** If a plugin is shipped via an aggregator (e.g. `rosslabs-ai-toolkit`), do not also register a per-plugin marketplace pointing at the same repo. `extraKnownMarketplaces` in `settings.json` bloats when every source gets added.
|
|
263
|
+
|
|
264
|
+
**Never `@local` + `@marketplace` for the same plugin concurrently.** When iterating in the source directory, disable the marketplace install first. Dual installs both start MCP servers, both compete for the same `.mcp.json` tools, and one always fails.
|
|
265
|
+
|
|
266
|
+
**Renaming a marketplace is a full migration.** When a marketplace is renamed (e.g. `RossLabs-claude-plugins` → `rosslabs-ai-toolkit`, kebab-case is required by the schema), every plugin installed from the old name stays in `installed_plugins.json` with a stale install path forever. Uninstall every plugin from the old marketplace, then reinstall from the new one. Edit `installed_plugins.json` by hand only as a last resort — corruption bricks the plugin system.
|
|
267
|
+
|
|
268
|
+
**Audit periodically:**
|
|
269
|
+
```bash
|
|
270
|
+
jq 'keys | group_by(split("@")[0]) | map(select(length > 1))' \
|
|
271
|
+
~/.claude/plugins/installed_plugins.json
|
|
272
|
+
```
|
|
273
|
+
Returns plugins with multiple install sources. Anything in that list is a duplicate.
|
|
274
|
+
|
|
275
|
+
**`extraKnownMarketplaces` hygiene.** Each entry is a registered marketplace that `/plugin` can pull from. If you added a directory source for local dev and later moved to the aggregator, remove the dev entry.
|
|
276
|
+
|
|
277
|
+
## Building an MCP Server
|
|
278
|
+
|
|
279
|
+
When the plugin exposes MCP tools (not just hooks/skills/agents), see the dedicated **`mcp-builder` skill** for server implementation, bundling strategies (`tsup` vs `tsc` + SessionStart install hook), stdio transport, tool design rules, and a standalone smoke-test. Plugin-builder covers the `.mcp.json` config; mcp-builder covers the server itself.
|
|
280
|
+
|
|
281
|
+
## Debugging MCP Failures
|
|
282
|
+
|
|
283
|
+
When `/plugin` shows "MCP · ✗ failed":
|
|
284
|
+
|
|
285
|
+
1. **Standalone handshake test.** Launch the server directly with an `initialize` RPC — if it returns valid JSON-RPC, the server is fine and the UI is stale:
|
|
286
|
+
```bash
|
|
287
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | \
|
|
288
|
+
CLAUDE_PLUGIN_ROOT=<plugin-path> node <plugin-path>/dist/mcp/server.js
|
|
289
|
+
```
|
|
290
|
+
2. **Schema check.** Verify `.mcp.json` has the top-level `"mcpServers"` wrapper (most common root cause).
|
|
291
|
+
3. **Cache completeness.** Confirm `dist/` and (if needed) `node_modules/` exist at the `installPath` listed in `installed_plugins.json`.
|
|
292
|
+
4. **Version alignment.** `version` field and `installPath` dir must agree — mismatches produce phantom failures.
|
|
293
|
+
|
|
294
|
+
Full playbook in `references/plugin-hygiene-lessons.md` § 13.
|
|
295
|
+
|
|
296
|
+
## Dual-Host: Shipping to Claude Code AND Codex
|
|
297
|
+
|
|
298
|
+
Plugins ship to both Claude Code and Codex from one repo with thin per-host manifests. For the full pattern — `.codex-plugin/plugin.json` schema, agent-neutral surfaces (skills, MCP), Claude-only surfaces (hooks, agents), README/install-script conventions — see **`references/dual-host-claude-codex.md`**.
|
|
299
|
+
|
|
300
|
+
Quick summary:
|
|
301
|
+
|
|
302
|
+
| Surface | Location | Host |
|
|
303
|
+
|---|---|---|
|
|
304
|
+
| Claude manifest | `.claude-plugin/plugin.json` | Claude Code |
|
|
305
|
+
| Codex manifest | `.codex-plugin/plugin.json` | Codex |
|
|
306
|
+
| Workspace install metadata (optional) | `.agents/plugins/marketplace.json` | Codex (local dev) |
|
|
307
|
+
| Skills (agent-neutral) | `./skills/<name>/SKILL.md` | Both |
|
|
308
|
+
| MCP servers (agent-neutral) | `./.mcp.json` | Both |
|
|
309
|
+
| Agent definitions | `./agents/*.md` | Claude only |
|
|
310
|
+
| Hooks | `./hooks/hooks.json` | Claude only (Codex has its own system) |
|
|
311
|
+
|
|
312
|
+
Keep `name` and `version` identical across the two-or-three manifests — users think of it as one plugin. **Include `.claude-plugin/marketplace.json` if the plugin ships its own marketplace listing** (both `metadata.version` AND the `plugins[name=<plugin>].version` entry must match). The version-sync test enforces all enforced manifests; treat the test (`scripts/test_plugin_manifest.py` for build-loop; equivalent elsewhere) as the **source of truth** — read its failure output to enumerate every enforced manifest before drafting a version-bump brief. Prose can undercount silently; the test cannot. See `references/coordination-rules.md` §"Verification of release surface" for the cross-cutting release-surface rule that includes this lockstep check (memory: `feedback_three_file_lockstep_plugin_manifest`).
|
|
313
|
+
|
|
314
|
+
## Additional Resources
|
|
315
|
+
|
|
316
|
+
Core references (load as needed — don't pre-load all):
|
|
317
|
+
|
|
318
|
+
- **`references/authoritative-sources.md`** — Anthropic + MCP doc URLs, validation tooling, sanity-test commands, canonical behavior rules. Start here when you need to verify a claim.
|
|
319
|
+
- **`references/manifest-schema.md`** — Complete `plugin.json` schema with all fields
|
|
320
|
+
- **`references/hooks-reference.md`** — All hook events, types, matchers, and patterns
|
|
321
|
+
- **`references/components-guide.md`** — Detailed guide for each component type
|
|
322
|
+
- **`references/distribution.md`** — Marketplace creation, versioning, and sharing
|
|
323
|
+
- **`references/dual-host-claude-codex.md`** — Codex plugin surface, dual-host shape, schema for `.codex-plugin/plugin.json` and `.agents/plugins/marketplace.json`, README/install-script patterns
|
|
324
|
+
- **`references/plugin-hygiene-lessons.md`** — 16 real-world incidents from shipping plugins (duplicate installs, `.mcp.json` schema, marketplace zombies, partial cache dirs, `${CLAUDE_PLUGIN_DATA}` patterns, UI failure-badge persistence)
|
|
325
|
+
- **`references/build-loop-phase-guidance.md`** — How build-loop phases should handle plugin edits (Assess → Plan → Execute → Review → Iterate)
|
|
326
|
+
|
|
327
|
+
Related skills:
|
|
328
|
+
- **`mcp-builder`** — MCP server implementation companion
|
|
329
|
+
- **`skill-builder`** — SKILL.md authoring (for skills shipped inside a plugin)
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
|
|
3
|
+
# Authoritative Sources for Claude Code Plugin Development
|
|
4
|
+
|
|
5
|
+
When the plugin-builder skill or any build-loop phase needs to verify a claim about plugin behavior, cite from this list. T1 sources override training data — if the docs changed, the docs win.
|
|
6
|
+
|
|
7
|
+
## Tier 1 — Anthropic official (ground truth)
|
|
8
|
+
|
|
9
|
+
| Topic | URL |
|
|
10
|
+
|---|---|
|
|
11
|
+
| Plugins reference (full schema, all components) | https://code.claude.com/docs/en/plugins-reference |
|
|
12
|
+
| Plugin marketplaces (how to create/host/publish) | https://code.claude.com/docs/en/plugin-marketplaces |
|
|
13
|
+
| Plugins tutorial | https://code.claude.com/docs/en/plugins |
|
|
14
|
+
| Discover and install plugins | https://code.claude.com/docs/en/discover-plugins |
|
|
15
|
+
| Plugin dependencies | https://code.claude.com/docs/en/plugin-dependencies |
|
|
16
|
+
| Settings (enabledPlugins, extraKnownMarketplaces, strictKnownMarketplaces) | https://code.claude.com/docs/en/settings |
|
|
17
|
+
| Hooks reference | https://code.claude.com/docs/en/hooks |
|
|
18
|
+
| Skills | https://code.claude.com/docs/en/skills |
|
|
19
|
+
| Subagents | https://code.claude.com/docs/en/sub-agents |
|
|
20
|
+
| Tools reference (Monitor, etc.) | https://code.claude.com/docs/en/tools-reference |
|
|
21
|
+
|
|
22
|
+
Anthropic also ships a documentation index at https://code.claude.com/docs/llms.txt — fetch it first if you don't know the exact page.
|
|
23
|
+
|
|
24
|
+
## Tier 1 — MCP protocol
|
|
25
|
+
|
|
26
|
+
| Topic | URL |
|
|
27
|
+
|---|---|
|
|
28
|
+
| Model Context Protocol spec | https://modelcontextprotocol.io/ |
|
|
29
|
+
| MCP specification (versioned) | https://spec.modelcontextprotocol.io/ |
|
|
30
|
+
| TypeScript SDK | https://github.com/modelcontextprotocol/typescript-sdk |
|
|
31
|
+
| Python SDK | https://github.com/modelcontextprotocol/python-sdk |
|
|
32
|
+
|
|
33
|
+
## Tier 2 — Working plugin examples (reference implementations)
|
|
34
|
+
|
|
35
|
+
Use these when you want to see a specific pattern in production code. Prefer bundled-with-`tsup` plugins as the cleanest MCP packaging pattern.
|
|
36
|
+
|
|
37
|
+
| Pattern | Repo |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `tsup`-bundled MCP server (single-file `dist/`, no runtime deps) | https://github.com/tyroneross/interface-built-right |
|
|
40
|
+
| Aggregator marketplace with 16 symlinked plugins | https://github.com/tyroneross/RossLabs-AI-Toolkit |
|
|
41
|
+
| Session-continuity plugin (hooks + MCP + CLI) | https://github.com/tyroneross/bookmark |
|
|
42
|
+
| Architecture-scan plugin (CLI-heavy, TypeScript + tsc) | https://github.com/tyroneross/NavGator |
|
|
43
|
+
| Build-loop orchestrator plugin (multiple subagents + skills) | https://github.com/tyroneross/build-loop |
|
|
44
|
+
| Anthropic's official plugins | https://github.com/anthropics/claude-plugins-official |
|
|
45
|
+
|
|
46
|
+
## Validation tooling
|
|
47
|
+
|
|
48
|
+
| Tool | What it checks |
|
|
49
|
+
|---|---|
|
|
50
|
+
| `claude plugin validate <path>` | `plugin.json`, skill/agent/command frontmatter, `hooks/hooks.json` schema |
|
|
51
|
+
| `claude --debug` at startup | Plugin load errors, MCP init errors |
|
|
52
|
+
| `/plugin` → "Needs attention" tab | Runtime MCP failures |
|
|
53
|
+
| `/mcp` | Live MCP server status (more detail than `/plugin`) |
|
|
54
|
+
| `/doctor` | Manifest drift, duplicate hook declarations |
|
|
55
|
+
|
|
56
|
+
## Sanity tests
|
|
57
|
+
|
|
58
|
+
**MCP server standalone**:
|
|
59
|
+
```bash
|
|
60
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | \
|
|
61
|
+
CLAUDE_PLUGIN_ROOT=<plugin-path> node <plugin-path>/dist/mcp/server.js
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Duplicate-install audit**:
|
|
65
|
+
```bash
|
|
66
|
+
jq 'keys | group_by(split("@")[0]) | map(select(length > 1))' \
|
|
67
|
+
~/.claude/plugins/installed_plugins.json
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Cache completeness audit**:
|
|
71
|
+
```bash
|
|
72
|
+
for p in ~/.claude/plugins/cache/*/*/; do
|
|
73
|
+
name=$(basename $(dirname $p))
|
|
74
|
+
ver=$(basename $p)
|
|
75
|
+
nm=$([ -d "$p/node_modules" ] && echo y || echo n)
|
|
76
|
+
dist=$([ -d "$p/dist" ] && echo y || echo n)
|
|
77
|
+
echo "$name/$ver: node_modules=$nm dist=$dist"
|
|
78
|
+
done
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Zombie-marketplace audit** (after a cleanup, verify nothing re-seeds):
|
|
82
|
+
```bash
|
|
83
|
+
ls ~/.claude/plugins/.install-manifests/
|
|
84
|
+
ls ~/.claude/plugins/marketplaces/
|
|
85
|
+
jq '.extraKnownMarketplaces | keys' ~/.claude/settings.json
|
|
86
|
+
jq 'keys' ~/.claude/plugins/known_marketplaces.json
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Behavior rules worth remembering
|
|
90
|
+
|
|
91
|
+
These are extracted from the docs above; cite the URL when quoting.
|
|
92
|
+
|
|
93
|
+
1. **Plugin manifest is optional.** If omitted, Claude Code auto-discovers components and derives the name from the directory. Use a manifest only when you need metadata or custom component paths. ([plugins-reference](https://code.claude.com/docs/en/plugins-reference#plugin-manifest-schema))
|
|
94
|
+
2. **`name` is the only required manifest field.** Kebab-case, no spaces.
|
|
95
|
+
3. **`${CLAUDE_PLUGIN_ROOT}`** — path to plugin install dir. Changes on every plugin update.
|
|
96
|
+
4. **`${CLAUDE_PLUGIN_DATA}`** — persistent state dir at `~/.claude/plugins/data/<id>/`. Survives updates. Right place for `node_modules/`, virtualenvs, generated code.
|
|
97
|
+
5. **Plugin cache lives at `~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/`.** Each version is a separate dir. Orphaned versions are removed 7 days after an update or uninstall.
|
|
98
|
+
6. **Path traversal (`../shared-utils`) fails after install** — cached plugins can't see files outside their dir. Use symlinks if needed; they're preserved in the cache.
|
|
99
|
+
7. **Relative paths** in the manifest must start with `./` and be relative to the plugin root.
|
|
100
|
+
8. **Marketplace schema** requires `name` (kebab-case), `owner.name`, and `plugins[]`. Reserved names: see lesson #12 in `plugin-hygiene-lessons.md`.
|
|
101
|
+
9. **`strict: true`** (default) means `plugin.json` is authoritative. Marketplace entry can supplement. `strict: false` = marketplace entry is the full definition.
|
|
102
|
+
10. **Version precedence** — `plugin.json.version` wins over `marketplace.json` plugin entry silently. Set in one place only; for relative-path plugins, set in the marketplace; for everything else, in `plugin.json`.
|
|
103
|
+
|
|
104
|
+
Always verify before acting: open the relevant page above, quote the section, then apply.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
|
|
3
|
+
# Plugin Hygiene — Build-Loop Lessons
|
|
4
|
+
|
|
5
|
+
When build-loop phases produce, modify, or ship Claude Code plugins, apply these rules. Each is traceable to a real failure in the `rosslabs-ai-toolkit` marketplace.
|
|
6
|
+
|
|
7
|
+
## Assess phase
|
|
8
|
+
|
|
9
|
+
Before modifying a plugin, check for duplicate installs:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
jq 'keys | group_by(split("@")[0]) | map(select(length > 1))' \
|
|
13
|
+
~/.claude/plugins/installed_plugins.json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Any duplicate entry means the user has the same plugin installed from multiple sources (e.g. `@local` + `@marketplace`). Edits to one source don't reach the other. **Flag this in the Assess report and offer to consolidate before proceeding.**
|
|
17
|
+
|
|
18
|
+
## Plan phase
|
|
19
|
+
|
|
20
|
+
When the plan touches `plugin.json`, require an explicit field inventory. Do not write these fields if the referenced file is at its default path:
|
|
21
|
+
|
|
22
|
+
| Field | Auto-loaded path | When to declare |
|
|
23
|
+
|-------|------------------|-----------------|
|
|
24
|
+
| `hooks` | `hooks/hooks.json` | Only for non-standard path |
|
|
25
|
+
| `mcpServers` | `.mcp.json` | Only for non-standard path or inline definitions |
|
|
26
|
+
| `lsp` | `.lsp.json` | Only for non-standard path |
|
|
27
|
+
|
|
28
|
+
Declaring a default-path file produces `Duplicate hooks file detected` errors in `/doctor`. Fact-check this in Review-D.
|
|
29
|
+
|
|
30
|
+
## Execute phase
|
|
31
|
+
|
|
32
|
+
**Never emit `type: "prompt"` hooks on per-turn events.** PostToolUse:Bash, UserPromptSubmit, and PreToolUse:Bash fire on every tool call. A prompt hook there runs the LLM on every event — expensive in tokens, disruptive in UX (streams "hook stopped continuation" messages). If a plugin needs conditional nudges, use `type: "command"` with silent exit 0.
|
|
33
|
+
|
|
34
|
+
Allowed locations for `type: "prompt"` hooks:
|
|
35
|
+
- SessionStart (fires once per session)
|
|
36
|
+
- Stop (fires once per turn-end)
|
|
37
|
+
- PreCompact (fires once per compaction)
|
|
38
|
+
|
|
39
|
+
## Review phase (sub-step D: Fact-Check)
|
|
40
|
+
|
|
41
|
+
Add to the manifest-drift check:
|
|
42
|
+
1. Grep plugin.json files in the diff for `"hooks":`, `"mcpServers":`, `"lsp":`
|
|
43
|
+
2. For each match, verify the referenced file is NOT at the auto-loaded default path
|
|
44
|
+
3. Grep hook files for `"type": "prompt"` inside `PostToolUse`, `PreToolUse`, `UserPromptSubmit`
|
|
45
|
+
4. If the plugin ships in an aggregator marketplace, verify marketplace.json version matches plugin.json version
|
|
46
|
+
5. **`.mcp.json` schema**: verify top-level key is `"mcpServers"`. Flat form `{"<name>": {...}}` silently passes `/doctor` but fails at MCP startup — only `/mcp` surfaces the failure. Correct form is `{"mcpServers": {"<name>": {...}}}`.
|
|
47
|
+
6. **Build artifacts**: if plugin.json's `mcpServers.*.args` references `${CLAUDE_PLUGIN_ROOT}/dist/...`, verify `dist/` is not gitignored and is checked into the repo. Alternative: plugin uses `tsup` to bundle into a single self-contained file (preferred — ibr's pattern).
|
|
48
|
+
|
|
49
|
+
## Iterate phase
|
|
50
|
+
|
|
51
|
+
If `/doctor` still reports errors after Review, common root causes in order of likelihood:
|
|
52
|
+
|
|
53
|
+
1. Duplicate hooks/mcpServers declaration → remove field from manifest
|
|
54
|
+
2. `type: "prompt"` on high-frequency event → change to command or move to SessionStart
|
|
55
|
+
3. Stale install record → user needs to `/plugin` uninstall old-marketplace copy
|
|
56
|
+
4. Cache regenerated from marketplace, overwriting local fix → commit+push source repo, re-sync
|
|
57
|
+
|
|
58
|
+
## Marketplace rename checklist
|
|
59
|
+
|
|
60
|
+
If build-loop is executing a marketplace rename (e.g. detected in the Assess phase via `extraKnownMarketplaces` showing old + new names simultaneously), generate this task list:
|
|
61
|
+
|
|
62
|
+
- [ ] `/plugin` → uninstall every plugin from the old marketplace name
|
|
63
|
+
- [ ] Remove old marketplace entry from `settings.json` → `extraKnownMarketplaces`
|
|
64
|
+
- [ ] Re-add new marketplace (kebab-case name — Anthropic schema requires it)
|
|
65
|
+
- [ ] Reinstall each plugin from the new name
|
|
66
|
+
- [ ] Audit `installed_plugins.json` for residual old-name keys
|
|
67
|
+
- [ ] Update any CLAUDE.md memory referencing the old name
|
|
68
|
+
- [ ] Update README.md in the marketplace repo
|
|
69
|
+
- [ ] Bump marketplace.json version
|
|
70
|
+
|
|
71
|
+
The rename is a full migration, not a metadata change. Partial renames produce permanent stale install paths.
|
|
72
|
+
|
|
73
|
+
## Source-of-truth flow
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
~/Desktop/git-folder/<plugin-repo>/ ← author-owned, edit here, commit
|
|
77
|
+
│
|
|
78
|
+
▼ (git push)
|
|
79
|
+
GitHub: tyroneross/<marketplace>/ ← marketplace pulls from here
|
|
80
|
+
│
|
|
81
|
+
▼ (plugin sync)
|
|
82
|
+
~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/ ← generated, never edit long-term
|
|
83
|
+
│
|
|
84
|
+
▼ (runtime)
|
|
85
|
+
Claude Code session
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Build-loop must edit the source repo, not the cache. Cache edits survive until the next sync, then vanish. If an edit MUST land this session, edit both source and cache, then commit source before Review ends.
|
|
89
|
+
|
|
90
|
+
## References
|
|
91
|
+
|
|
92
|
+
- `~/.claude/skills/plugin-builder/references/plugin-hygiene-lessons.md` — full incident log
|
|
93
|
+
- `~/.claude/projects/-Users-tyroneross/memory/feedback_hook_design.md` — hook design rules
|
|
94
|
+
- `~/.claude/projects/-Users-tyroneross/memory/feedback_rosslabs_toolkit_sync.md` — marketplace rename sync
|