agentsys 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agnix.toml +49 -0
- package/.claude-plugin/marketplace.json +110 -0
- package/.claude-plugin/plugin.json +20 -0
- package/AGENTS.md +260 -0
- package/CHANGELOG.md +190 -0
- package/LICENSE +21 -0
- package/README.md +916 -0
- package/SECURITY.md +45 -0
- package/adapters/README.md +258 -0
- package/adapters/codex/README.md +273 -0
- package/adapters/codex/install.sh +260 -0
- package/adapters/codex/skills/agnix/SKILL.md +138 -0
- package/adapters/codex/skills/audit-project/SKILL.md +334 -0
- package/adapters/codex/skills/audit-project-agents/SKILL.md +459 -0
- package/adapters/codex/skills/audit-project-github/SKILL.md +146 -0
- package/adapters/codex/skills/consult/SKILL.md +245 -0
- package/adapters/codex/skills/delivery-approval/SKILL.md +339 -0
- package/adapters/codex/skills/deslop/SKILL.md +167 -0
- package/adapters/codex/skills/drift-detect/SKILL.md +268 -0
- package/adapters/codex/skills/enhance/SKILL.md +177 -0
- package/adapters/codex/skills/learn/SKILL.md +188 -0
- package/adapters/codex/skills/next-task/SKILL.md +546 -0
- package/adapters/codex/skills/perf/SKILL.md +469 -0
- package/adapters/codex/skills/repo-map/SKILL.md +132 -0
- package/adapters/codex/skills/ship/SKILL.md +491 -0
- package/adapters/codex/skills/ship-ci-review-loop/SKILL.md +473 -0
- package/adapters/codex/skills/ship-deployment/SKILL.md +336 -0
- package/adapters/codex/skills/ship-error-handling/SKILL.md +260 -0
- package/adapters/codex/skills/sync-docs/SKILL.md +186 -0
- package/adapters/opencode/README.md +302 -0
- package/adapters/opencode/agents/agent-enhancer.md +65 -0
- package/adapters/opencode/agents/agnix-agent.md +56 -0
- package/adapters/opencode/agents/ci-fixer.md +104 -0
- package/adapters/opencode/agents/ci-monitor.md +127 -0
- package/adapters/opencode/agents/claudemd-enhancer.md +66 -0
- package/adapters/opencode/agents/consult-agent.md +124 -0
- package/adapters/opencode/agents/cross-file-enhancer.md +54 -0
- package/adapters/opencode/agents/delivery-validator.md +115 -0
- package/adapters/opencode/agents/deslop-agent.md +88 -0
- package/adapters/opencode/agents/docs-enhancer.md +65 -0
- package/adapters/opencode/agents/exploration-agent.md +143 -0
- package/adapters/opencode/agents/hooks-enhancer.md +66 -0
- package/adapters/opencode/agents/implementation-agent.md +206 -0
- package/adapters/opencode/agents/learn-agent.md +279 -0
- package/adapters/opencode/agents/map-validator.md +65 -0
- package/adapters/opencode/agents/perf-analyzer.md +40 -0
- package/adapters/opencode/agents/perf-code-paths.md +12 -0
- package/adapters/opencode/agents/perf-investigation-logger.md +44 -0
- package/adapters/opencode/agents/perf-orchestrator.md +147 -0
- package/adapters/opencode/agents/perf-theory-gatherer.md +18 -0
- package/adapters/opencode/agents/perf-theory-tester.md +43 -0
- package/adapters/opencode/agents/plan-synthesizer.md +229 -0
- package/adapters/opencode/agents/planning-agent.md +235 -0
- package/adapters/opencode/agents/plugin-enhancer.md +64 -0
- package/adapters/opencode/agents/prompt-enhancer.md +58 -0
- package/adapters/opencode/agents/simple-fixer.md +107 -0
- package/adapters/opencode/agents/skills-enhancer.md +66 -0
- package/adapters/opencode/agents/sync-docs-agent.md +153 -0
- package/adapters/opencode/agents/task-discoverer.md +80 -0
- package/adapters/opencode/agents/test-coverage-checker.md +144 -0
- package/adapters/opencode/agents/worktree-manager.md +209 -0
- package/adapters/opencode/commands/agnix.md +106 -0
- package/adapters/opencode/commands/audit-project-agents.md +125 -0
- package/adapters/opencode/commands/audit-project-github.md +145 -0
- package/adapters/opencode/commands/audit-project.md +268 -0
- package/adapters/opencode/commands/consult.md +252 -0
- package/adapters/opencode/commands/delivery-approval.md +212 -0
- package/adapters/opencode/commands/deslop.md +132 -0
- package/adapters/opencode/commands/drift-detect.md +173 -0
- package/adapters/opencode/commands/enhance.md +183 -0
- package/adapters/opencode/commands/learn.md +116 -0
- package/adapters/opencode/commands/next-task.md +393 -0
- package/adapters/opencode/commands/perf.md +49 -0
- package/adapters/opencode/commands/repo-map.md +69 -0
- package/adapters/opencode/commands/ship-ci-review-loop.md +334 -0
- package/adapters/opencode/commands/ship-deployment.md +336 -0
- package/adapters/opencode/commands/ship-error-handling.md +248 -0
- package/adapters/opencode/commands/ship.md +371 -0
- package/adapters/opencode/commands/sync-docs.md +108 -0
- package/adapters/opencode/install.sh +322 -0
- package/adapters/opencode/skills/agnix/SKILL.md +139 -0
- package/adapters/opencode/skills/consult/SKILL.md +292 -0
- package/adapters/opencode/skills/deslop/SKILL.md +169 -0
- package/adapters/opencode/skills/discover-tasks/SKILL.md +102 -0
- package/adapters/opencode/skills/drift-analysis/SKILL.md +279 -0
- package/adapters/opencode/skills/enhance-agent-prompts/SKILL.md +279 -0
- package/adapters/opencode/skills/enhance-claude-memory/SKILL.md +390 -0
- package/adapters/opencode/skills/enhance-cross-file/SKILL.md +112 -0
- package/adapters/opencode/skills/enhance-docs/SKILL.md +288 -0
- package/adapters/opencode/skills/enhance-hooks/SKILL.md +557 -0
- package/adapters/opencode/skills/enhance-orchestrator/SKILL.md +114 -0
- package/adapters/opencode/skills/enhance-plugins/SKILL.md +314 -0
- package/adapters/opencode/skills/enhance-prompts/SKILL.md +341 -0
- package/adapters/opencode/skills/enhance-skills/SKILL.md +443 -0
- package/adapters/opencode/skills/learn/SKILL.md +352 -0
- package/adapters/opencode/skills/orchestrate-review/SKILL.md +95 -0
- package/adapters/opencode/skills/perf-analyzer/SKILL.md +38 -0
- package/adapters/opencode/skills/perf-baseline-manager/SKILL.md +31 -0
- package/adapters/opencode/skills/perf-benchmarker/SKILL.md +49 -0
- package/adapters/opencode/skills/perf-code-paths/SKILL.md +33 -0
- package/adapters/opencode/skills/perf-investigation-logger/SKILL.md +42 -0
- package/adapters/opencode/skills/perf-profiler/SKILL.md +39 -0
- package/adapters/opencode/skills/perf-theory-gatherer/SKILL.md +36 -0
- package/adapters/opencode/skills/perf-theory-tester/SKILL.md +37 -0
- package/adapters/opencode/skills/repo-mapping/SKILL.md +86 -0
- package/adapters/opencode/skills/sync-docs/SKILL.md +246 -0
- package/adapters/opencode/skills/validate-delivery/SKILL.md +112 -0
- package/adapters/opencode-plugin/index.ts +346 -0
- package/adapters/opencode-plugin/package.json +21 -0
- package/agent-knowledge/AGENTS.md +62 -0
- package/agent-knowledge/ai-cli-advanced-integration-patterns.md +670 -0
- package/agent-knowledge/ai-cli-non-interactive-programmatic-usage.md +1394 -0
- package/agent-knowledge/resources/ai-cli-non-interactive-programmatic-usage-sources.json +500 -0
- package/bin/cli.js +719 -0
- package/bin/dev-cli.js +587 -0
- package/lib/adapter-transforms.js +278 -0
- package/lib/collectors/codebase.js +392 -0
- package/lib/collectors/docs-patterns.js +713 -0
- package/lib/collectors/documentation.js +219 -0
- package/lib/collectors/github.js +266 -0
- package/lib/collectors/index.js +126 -0
- package/lib/config/index.js +14 -0
- package/lib/cross-platform/index.js +539 -0
- package/lib/discovery/index.js +352 -0
- package/lib/drift-detect/collectors.js +37 -0
- package/lib/enhance/agent-analyzer.js +421 -0
- package/lib/enhance/agent-patterns.js +571 -0
- package/lib/enhance/auto-suppression.js +622 -0
- package/lib/enhance/benchmark.js +417 -0
- package/lib/enhance/cross-file-analyzer.js +930 -0
- package/lib/enhance/cross-file-patterns.js +370 -0
- package/lib/enhance/docs-analyzer.js +325 -0
- package/lib/enhance/docs-patterns.js +671 -0
- package/lib/enhance/fixer.js +721 -0
- package/lib/enhance/hook-analyzer.js +135 -0
- package/lib/enhance/hook-patterns.js +40 -0
- package/lib/enhance/index.js +127 -0
- package/lib/enhance/plugin-analyzer.js +402 -0
- package/lib/enhance/plugin-patterns.js +326 -0
- package/lib/enhance/projectmemory-analyzer.js +551 -0
- package/lib/enhance/projectmemory-patterns.js +617 -0
- package/lib/enhance/prompt-analyzer.js +457 -0
- package/lib/enhance/prompt-patterns.js +1484 -0
- package/lib/enhance/reporter.js +1348 -0
- package/lib/enhance/security-patterns.js +284 -0
- package/lib/enhance/skill-analyzer.js +182 -0
- package/lib/enhance/skill-patterns.js +147 -0
- package/lib/enhance/suppression.js +352 -0
- package/lib/enhance/tool-patterns.js +373 -0
- package/lib/index.js +270 -0
- package/lib/package.json +25 -0
- package/lib/patterns/cli-enhancers.js +611 -0
- package/lib/patterns/pipeline.js +948 -0
- package/lib/patterns/review-patterns.js +558 -0
- package/lib/patterns/slop-analyzers.js +2305 -0
- package/lib/patterns/slop-patterns.js +1187 -0
- package/lib/perf/analyzer/index.js +22 -0
- package/lib/perf/argument-parser.js +105 -0
- package/lib/perf/baseline-comparator.js +50 -0
- package/lib/perf/baseline-store.js +127 -0
- package/lib/perf/benchmark-runner.js +399 -0
- package/lib/perf/breaking-point-finder.js +52 -0
- package/lib/perf/breaking-point-runner.js +60 -0
- package/lib/perf/checkpoint.js +123 -0
- package/lib/perf/code-paths.js +86 -0
- package/lib/perf/consolidation.js +37 -0
- package/lib/perf/constraint-runner.js +71 -0
- package/lib/perf/experiment-runner.js +32 -0
- package/lib/perf/index.js +41 -0
- package/lib/perf/investigation-state.js +875 -0
- package/lib/perf/optimization-runner.js +79 -0
- package/lib/perf/profilers/go.js +22 -0
- package/lib/perf/profilers/index.js +46 -0
- package/lib/perf/profilers/java.js +23 -0
- package/lib/perf/profilers/node.js +27 -0
- package/lib/perf/profilers/python.js +23 -0
- package/lib/perf/profilers/rust.js +23 -0
- package/lib/perf/profiling-runner.js +56 -0
- package/lib/perf/schemas.js +140 -0
- package/lib/platform/detect-platform.js +413 -0
- package/lib/platform/detection-configs.js +93 -0
- package/lib/platform/state-dir.js +132 -0
- package/lib/platform/verify-tools.js +182 -0
- package/lib/repo-map/cache.js +152 -0
- package/lib/repo-map/index.js +222 -0
- package/lib/repo-map/installer.js +212 -0
- package/lib/repo-map/queries/go.js +27 -0
- package/lib/repo-map/queries/index.js +100 -0
- package/lib/repo-map/queries/java.js +38 -0
- package/lib/repo-map/queries/javascript.js +55 -0
- package/lib/repo-map/queries/python.js +24 -0
- package/lib/repo-map/queries/rust.js +73 -0
- package/lib/repo-map/queries/typescript.js +38 -0
- package/lib/repo-map/runner.js +1165 -0
- package/lib/repo-map/updater.js +474 -0
- package/lib/repo-map/usage-analyzer.js +407 -0
- package/lib/schemas/plugin-manifest.schema.json +57 -0
- package/lib/schemas/validator.js +247 -0
- package/lib/sources/custom-handler.js +199 -0
- package/lib/sources/policy-questions.js +246 -0
- package/lib/sources/source-cache.js +165 -0
- package/lib/state/workflow-state.js +575 -0
- package/lib/types/agent-frontmatter.d.ts +134 -0
- package/lib/types/command-frontmatter.d.ts +107 -0
- package/lib/types/hook-frontmatter.d.ts +115 -0
- package/lib/types/index.d.ts +84 -0
- package/lib/types/plugin-manifest.d.ts +102 -0
- package/lib/types/skill-frontmatter.d.ts +89 -0
- package/lib/utils/atomic-write.js +94 -0
- package/lib/utils/cache-manager.js +159 -0
- package/lib/utils/context-optimizer.js +300 -0
- package/lib/utils/deprecation.js +37 -0
- package/lib/utils/shell-escape.js +88 -0
- package/meta/skills/maintain-cross-platform/SKILL.md +1022 -0
- package/package.json +92 -0
- package/plugins/agnix/.claude-plugin/plugin.json +22 -0
- package/plugins/agnix/agents/agnix-agent.md +56 -0
- package/plugins/agnix/commands/agnix.md +139 -0
- package/plugins/agnix/skills/agnix/SKILL.md +138 -0
- package/plugins/audit-project/.claude-plugin/plugin.json +20 -0
- package/plugins/audit-project/commands/audit-project-agents.md +458 -0
- package/plugins/audit-project/commands/audit-project-github.md +144 -0
- package/plugins/audit-project/commands/audit-project.md +336 -0
- package/plugins/audit-project/lib/adapter-transforms.js +278 -0
- package/plugins/audit-project/lib/collectors/codebase.js +392 -0
- package/plugins/audit-project/lib/collectors/docs-patterns.js +713 -0
- package/plugins/audit-project/lib/collectors/documentation.js +219 -0
- package/plugins/audit-project/lib/collectors/github.js +266 -0
- package/plugins/audit-project/lib/collectors/index.js +126 -0
- package/plugins/audit-project/lib/config/index.js +14 -0
- package/plugins/audit-project/lib/cross-platform/index.js +539 -0
- package/plugins/audit-project/lib/discovery/index.js +352 -0
- package/plugins/audit-project/lib/drift-detect/collectors.js +37 -0
- package/plugins/audit-project/lib/enhance/agent-analyzer.js +421 -0
- package/plugins/audit-project/lib/enhance/agent-patterns.js +571 -0
- package/plugins/audit-project/lib/enhance/auto-suppression.js +622 -0
- package/plugins/audit-project/lib/enhance/benchmark.js +417 -0
- package/plugins/audit-project/lib/enhance/cross-file-analyzer.js +930 -0
- package/plugins/audit-project/lib/enhance/cross-file-patterns.js +370 -0
- package/plugins/audit-project/lib/enhance/docs-analyzer.js +325 -0
- package/plugins/audit-project/lib/enhance/docs-patterns.js +671 -0
- package/plugins/audit-project/lib/enhance/fixer.js +721 -0
- package/plugins/audit-project/lib/enhance/hook-analyzer.js +135 -0
- package/plugins/audit-project/lib/enhance/hook-patterns.js +40 -0
- package/plugins/audit-project/lib/enhance/index.js +127 -0
- package/plugins/audit-project/lib/enhance/plugin-analyzer.js +402 -0
- package/plugins/audit-project/lib/enhance/plugin-patterns.js +326 -0
- package/plugins/audit-project/lib/enhance/projectmemory-analyzer.js +551 -0
- package/plugins/audit-project/lib/enhance/projectmemory-patterns.js +617 -0
- package/plugins/audit-project/lib/enhance/prompt-analyzer.js +457 -0
- package/plugins/audit-project/lib/enhance/prompt-patterns.js +1484 -0
- package/plugins/audit-project/lib/enhance/reporter.js +1348 -0
- package/plugins/audit-project/lib/enhance/security-patterns.js +284 -0
- package/plugins/audit-project/lib/enhance/skill-analyzer.js +182 -0
- package/plugins/audit-project/lib/enhance/skill-patterns.js +147 -0
- package/plugins/audit-project/lib/enhance/suppression.js +352 -0
- package/plugins/audit-project/lib/enhance/tool-patterns.js +373 -0
- package/plugins/audit-project/lib/index.js +270 -0
- package/plugins/audit-project/lib/patterns/cli-enhancers.js +611 -0
- package/plugins/audit-project/lib/patterns/pipeline.js +948 -0
- package/plugins/audit-project/lib/patterns/review-patterns.js +558 -0
- package/plugins/audit-project/lib/patterns/slop-analyzers.js +2305 -0
- package/plugins/audit-project/lib/patterns/slop-patterns.js +1187 -0
- package/plugins/audit-project/lib/perf/analyzer/index.js +22 -0
- package/plugins/audit-project/lib/perf/argument-parser.js +105 -0
- package/plugins/audit-project/lib/perf/baseline-comparator.js +50 -0
- package/plugins/audit-project/lib/perf/baseline-store.js +127 -0
- package/plugins/audit-project/lib/perf/benchmark-runner.js +399 -0
- package/plugins/audit-project/lib/perf/breaking-point-finder.js +52 -0
- package/plugins/audit-project/lib/perf/breaking-point-runner.js +60 -0
- package/plugins/audit-project/lib/perf/checkpoint.js +123 -0
- package/plugins/audit-project/lib/perf/code-paths.js +86 -0
- package/plugins/audit-project/lib/perf/consolidation.js +37 -0
- package/plugins/audit-project/lib/perf/constraint-runner.js +71 -0
- package/plugins/audit-project/lib/perf/experiment-runner.js +32 -0
- package/plugins/audit-project/lib/perf/index.js +41 -0
- package/plugins/audit-project/lib/perf/investigation-state.js +875 -0
- package/plugins/audit-project/lib/perf/optimization-runner.js +79 -0
- package/plugins/audit-project/lib/perf/profilers/go.js +22 -0
- package/plugins/audit-project/lib/perf/profilers/index.js +46 -0
- package/plugins/audit-project/lib/perf/profilers/java.js +23 -0
- package/plugins/audit-project/lib/perf/profilers/node.js +27 -0
- package/plugins/audit-project/lib/perf/profilers/python.js +23 -0
- package/plugins/audit-project/lib/perf/profilers/rust.js +23 -0
- package/plugins/audit-project/lib/perf/profiling-runner.js +56 -0
- package/plugins/audit-project/lib/perf/schemas.js +140 -0
- package/plugins/audit-project/lib/platform/detect-platform.js +413 -0
- package/plugins/audit-project/lib/platform/detection-configs.js +93 -0
- package/plugins/audit-project/lib/platform/state-dir.js +132 -0
- package/plugins/audit-project/lib/platform/verify-tools.js +182 -0
- package/plugins/audit-project/lib/repo-map/cache.js +152 -0
- package/plugins/audit-project/lib/repo-map/index.js +222 -0
- package/plugins/audit-project/lib/repo-map/installer.js +212 -0
- package/plugins/audit-project/lib/repo-map/queries/go.js +27 -0
- package/plugins/audit-project/lib/repo-map/queries/index.js +100 -0
- package/plugins/audit-project/lib/repo-map/queries/java.js +38 -0
- package/plugins/audit-project/lib/repo-map/queries/javascript.js +55 -0
- package/plugins/audit-project/lib/repo-map/queries/python.js +24 -0
- package/plugins/audit-project/lib/repo-map/queries/rust.js +73 -0
- package/plugins/audit-project/lib/repo-map/queries/typescript.js +38 -0
- package/plugins/audit-project/lib/repo-map/runner.js +1165 -0
- package/plugins/audit-project/lib/repo-map/updater.js +474 -0
- package/plugins/audit-project/lib/repo-map/usage-analyzer.js +407 -0
- package/plugins/audit-project/lib/schemas/plugin-manifest.schema.json +57 -0
- package/plugins/audit-project/lib/schemas/validator.js +247 -0
- package/plugins/audit-project/lib/sources/custom-handler.js +199 -0
- package/plugins/audit-project/lib/sources/policy-questions.js +246 -0
- package/plugins/audit-project/lib/sources/source-cache.js +165 -0
- package/plugins/audit-project/lib/state/workflow-state.js +575 -0
- package/plugins/audit-project/lib/types/agent-frontmatter.d.ts +134 -0
- package/plugins/audit-project/lib/types/command-frontmatter.d.ts +107 -0
- package/plugins/audit-project/lib/types/hook-frontmatter.d.ts +115 -0
- package/plugins/audit-project/lib/types/index.d.ts +84 -0
- package/plugins/audit-project/lib/types/plugin-manifest.d.ts +102 -0
- package/plugins/audit-project/lib/types/skill-frontmatter.d.ts +89 -0
- package/plugins/audit-project/lib/utils/atomic-write.js +94 -0
- package/plugins/audit-project/lib/utils/cache-manager.js +159 -0
- package/plugins/audit-project/lib/utils/context-optimizer.js +300 -0
- package/plugins/audit-project/lib/utils/deprecation.js +37 -0
- package/plugins/audit-project/lib/utils/shell-escape.js +88 -0
- package/plugins/consult/.claude-plugin/plugin.json +24 -0
- package/plugins/consult/agents/consult-agent.md +129 -0
- package/plugins/consult/commands/consult.md +248 -0
- package/plugins/consult/skills/consult/SKILL.md +285 -0
- package/plugins/deslop/.claude-plugin/plugin.json +20 -0
- package/plugins/deslop/agents/deslop-agent.md +88 -0
- package/plugins/deslop/commands/deslop.md +168 -0
- package/plugins/deslop/lib/adapter-transforms.js +278 -0
- package/plugins/deslop/lib/collectors/codebase.js +392 -0
- package/plugins/deslop/lib/collectors/docs-patterns.js +713 -0
- package/plugins/deslop/lib/collectors/documentation.js +219 -0
- package/plugins/deslop/lib/collectors/github.js +266 -0
- package/plugins/deslop/lib/collectors/index.js +126 -0
- package/plugins/deslop/lib/config/index.js +14 -0
- package/plugins/deslop/lib/cross-platform/index.js +539 -0
- package/plugins/deslop/lib/discovery/index.js +352 -0
- package/plugins/deslop/lib/drift-detect/collectors.js +37 -0
- package/plugins/deslop/lib/enhance/agent-analyzer.js +421 -0
- package/plugins/deslop/lib/enhance/agent-patterns.js +571 -0
- package/plugins/deslop/lib/enhance/auto-suppression.js +622 -0
- package/plugins/deslop/lib/enhance/benchmark.js +417 -0
- package/plugins/deslop/lib/enhance/cross-file-analyzer.js +930 -0
- package/plugins/deslop/lib/enhance/cross-file-patterns.js +370 -0
- package/plugins/deslop/lib/enhance/docs-analyzer.js +325 -0
- package/plugins/deslop/lib/enhance/docs-patterns.js +671 -0
- package/plugins/deslop/lib/enhance/fixer.js +721 -0
- package/plugins/deslop/lib/enhance/hook-analyzer.js +135 -0
- package/plugins/deslop/lib/enhance/hook-patterns.js +40 -0
- package/plugins/deslop/lib/enhance/index.js +127 -0
- package/plugins/deslop/lib/enhance/plugin-analyzer.js +402 -0
- package/plugins/deslop/lib/enhance/plugin-patterns.js +326 -0
- package/plugins/deslop/lib/enhance/projectmemory-analyzer.js +551 -0
- package/plugins/deslop/lib/enhance/projectmemory-patterns.js +617 -0
- package/plugins/deslop/lib/enhance/prompt-analyzer.js +457 -0
- package/plugins/deslop/lib/enhance/prompt-patterns.js +1484 -0
- package/plugins/deslop/lib/enhance/reporter.js +1348 -0
- package/plugins/deslop/lib/enhance/security-patterns.js +284 -0
- package/plugins/deslop/lib/enhance/skill-analyzer.js +182 -0
- package/plugins/deslop/lib/enhance/skill-patterns.js +147 -0
- package/plugins/deslop/lib/enhance/suppression.js +352 -0
- package/plugins/deslop/lib/enhance/tool-patterns.js +373 -0
- package/plugins/deslop/lib/index.js +270 -0
- package/plugins/deslop/lib/patterns/cli-enhancers.js +611 -0
- package/plugins/deslop/lib/patterns/pipeline.js +948 -0
- package/plugins/deslop/lib/patterns/review-patterns.js +558 -0
- package/plugins/deslop/lib/patterns/slop-analyzers.js +2305 -0
- package/plugins/deslop/lib/patterns/slop-patterns.js +1187 -0
- package/plugins/deslop/lib/perf/analyzer/index.js +22 -0
- package/plugins/deslop/lib/perf/argument-parser.js +105 -0
- package/plugins/deslop/lib/perf/baseline-comparator.js +50 -0
- package/plugins/deslop/lib/perf/baseline-store.js +127 -0
- package/plugins/deslop/lib/perf/benchmark-runner.js +399 -0
- package/plugins/deslop/lib/perf/breaking-point-finder.js +52 -0
- package/plugins/deslop/lib/perf/breaking-point-runner.js +60 -0
- package/plugins/deslop/lib/perf/checkpoint.js +123 -0
- package/plugins/deslop/lib/perf/code-paths.js +86 -0
- package/plugins/deslop/lib/perf/consolidation.js +37 -0
- package/plugins/deslop/lib/perf/constraint-runner.js +71 -0
- package/plugins/deslop/lib/perf/experiment-runner.js +32 -0
- package/plugins/deslop/lib/perf/index.js +41 -0
- package/plugins/deslop/lib/perf/investigation-state.js +875 -0
- package/plugins/deslop/lib/perf/optimization-runner.js +79 -0
- package/plugins/deslop/lib/perf/profilers/go.js +22 -0
- package/plugins/deslop/lib/perf/profilers/index.js +46 -0
- package/plugins/deslop/lib/perf/profilers/java.js +23 -0
- package/plugins/deslop/lib/perf/profilers/node.js +27 -0
- package/plugins/deslop/lib/perf/profilers/python.js +23 -0
- package/plugins/deslop/lib/perf/profilers/rust.js +23 -0
- package/plugins/deslop/lib/perf/profiling-runner.js +56 -0
- package/plugins/deslop/lib/perf/schemas.js +140 -0
- package/plugins/deslop/lib/platform/detect-platform.js +413 -0
- package/plugins/deslop/lib/platform/detection-configs.js +93 -0
- package/plugins/deslop/lib/platform/state-dir.js +132 -0
- package/plugins/deslop/lib/platform/verify-tools.js +182 -0
- package/plugins/deslop/lib/repo-map/cache.js +152 -0
- package/plugins/deslop/lib/repo-map/index.js +222 -0
- package/plugins/deslop/lib/repo-map/installer.js +212 -0
- package/plugins/deslop/lib/repo-map/queries/go.js +27 -0
- package/plugins/deslop/lib/repo-map/queries/index.js +100 -0
- package/plugins/deslop/lib/repo-map/queries/java.js +38 -0
- package/plugins/deslop/lib/repo-map/queries/javascript.js +55 -0
- package/plugins/deslop/lib/repo-map/queries/python.js +24 -0
- package/plugins/deslop/lib/repo-map/queries/rust.js +73 -0
- package/plugins/deslop/lib/repo-map/queries/typescript.js +38 -0
- package/plugins/deslop/lib/repo-map/runner.js +1165 -0
- package/plugins/deslop/lib/repo-map/updater.js +474 -0
- package/plugins/deslop/lib/repo-map/usage-analyzer.js +407 -0
- package/plugins/deslop/lib/schemas/plugin-manifest.schema.json +57 -0
- package/plugins/deslop/lib/schemas/validator.js +247 -0
- package/plugins/deslop/lib/sources/custom-handler.js +199 -0
- package/plugins/deslop/lib/sources/policy-questions.js +246 -0
- package/plugins/deslop/lib/sources/source-cache.js +165 -0
- package/plugins/deslop/lib/state/workflow-state.js +575 -0
- package/plugins/deslop/lib/types/agent-frontmatter.d.ts +134 -0
- package/plugins/deslop/lib/types/command-frontmatter.d.ts +107 -0
- package/plugins/deslop/lib/types/hook-frontmatter.d.ts +115 -0
- package/plugins/deslop/lib/types/index.d.ts +84 -0
- package/plugins/deslop/lib/types/plugin-manifest.d.ts +102 -0
- package/plugins/deslop/lib/types/skill-frontmatter.d.ts +89 -0
- package/plugins/deslop/lib/utils/atomic-write.js +94 -0
- package/plugins/deslop/lib/utils/cache-manager.js +159 -0
- package/plugins/deslop/lib/utils/context-optimizer.js +300 -0
- package/plugins/deslop/lib/utils/deprecation.js +37 -0
- package/plugins/deslop/lib/utils/shell-escape.js +88 -0
- package/plugins/deslop/references/slop-categories.md +122 -0
- package/plugins/deslop/scripts/detect.js +134 -0
- package/plugins/deslop/skills/deslop/SKILL.md +204 -0
- package/plugins/drift-detect/.claude-plugin/plugin.json +23 -0
- package/plugins/drift-detect/agents/plan-synthesizer.md +225 -0
- package/plugins/drift-detect/commands/drift-detect.md +269 -0
- package/plugins/drift-detect/lib/adapter-transforms.js +278 -0
- package/plugins/drift-detect/lib/collectors/codebase.js +392 -0
- package/plugins/drift-detect/lib/collectors/docs-patterns.js +713 -0
- package/plugins/drift-detect/lib/collectors/documentation.js +219 -0
- package/plugins/drift-detect/lib/collectors/github.js +266 -0
- package/plugins/drift-detect/lib/collectors/index.js +126 -0
- package/plugins/drift-detect/lib/config/index.js +14 -0
- package/plugins/drift-detect/lib/cross-platform/index.js +539 -0
- package/plugins/drift-detect/lib/discovery/index.js +352 -0
- package/plugins/drift-detect/lib/drift-detect/collectors.js +37 -0
- package/plugins/drift-detect/lib/enhance/agent-analyzer.js +421 -0
- package/plugins/drift-detect/lib/enhance/agent-patterns.js +571 -0
- package/plugins/drift-detect/lib/enhance/auto-suppression.js +622 -0
- package/plugins/drift-detect/lib/enhance/benchmark.js +417 -0
- package/plugins/drift-detect/lib/enhance/cross-file-analyzer.js +930 -0
- package/plugins/drift-detect/lib/enhance/cross-file-patterns.js +370 -0
- package/plugins/drift-detect/lib/enhance/docs-analyzer.js +325 -0
- package/plugins/drift-detect/lib/enhance/docs-patterns.js +671 -0
- package/plugins/drift-detect/lib/enhance/fixer.js +721 -0
- package/plugins/drift-detect/lib/enhance/hook-analyzer.js +135 -0
- package/plugins/drift-detect/lib/enhance/hook-patterns.js +40 -0
- package/plugins/drift-detect/lib/enhance/index.js +127 -0
- package/plugins/drift-detect/lib/enhance/plugin-analyzer.js +402 -0
- package/plugins/drift-detect/lib/enhance/plugin-patterns.js +326 -0
- package/plugins/drift-detect/lib/enhance/projectmemory-analyzer.js +551 -0
- package/plugins/drift-detect/lib/enhance/projectmemory-patterns.js +617 -0
- package/plugins/drift-detect/lib/enhance/prompt-analyzer.js +457 -0
- package/plugins/drift-detect/lib/enhance/prompt-patterns.js +1484 -0
- package/plugins/drift-detect/lib/enhance/reporter.js +1348 -0
- package/plugins/drift-detect/lib/enhance/security-patterns.js +284 -0
- package/plugins/drift-detect/lib/enhance/skill-analyzer.js +182 -0
- package/plugins/drift-detect/lib/enhance/skill-patterns.js +147 -0
- package/plugins/drift-detect/lib/enhance/suppression.js +352 -0
- package/plugins/drift-detect/lib/enhance/tool-patterns.js +373 -0
- package/plugins/drift-detect/lib/index.js +270 -0
- package/plugins/drift-detect/lib/patterns/cli-enhancers.js +611 -0
- package/plugins/drift-detect/lib/patterns/pipeline.js +948 -0
- package/plugins/drift-detect/lib/patterns/review-patterns.js +558 -0
- package/plugins/drift-detect/lib/patterns/slop-analyzers.js +2305 -0
- package/plugins/drift-detect/lib/patterns/slop-patterns.js +1187 -0
- package/plugins/drift-detect/lib/perf/analyzer/index.js +22 -0
- package/plugins/drift-detect/lib/perf/argument-parser.js +105 -0
- package/plugins/drift-detect/lib/perf/baseline-comparator.js +50 -0
- package/plugins/drift-detect/lib/perf/baseline-store.js +127 -0
- package/plugins/drift-detect/lib/perf/benchmark-runner.js +399 -0
- package/plugins/drift-detect/lib/perf/breaking-point-finder.js +52 -0
- package/plugins/drift-detect/lib/perf/breaking-point-runner.js +60 -0
- package/plugins/drift-detect/lib/perf/checkpoint.js +123 -0
- package/plugins/drift-detect/lib/perf/code-paths.js +86 -0
- package/plugins/drift-detect/lib/perf/consolidation.js +37 -0
- package/plugins/drift-detect/lib/perf/constraint-runner.js +71 -0
- package/plugins/drift-detect/lib/perf/experiment-runner.js +32 -0
- package/plugins/drift-detect/lib/perf/index.js +41 -0
- package/plugins/drift-detect/lib/perf/investigation-state.js +875 -0
- package/plugins/drift-detect/lib/perf/optimization-runner.js +79 -0
- package/plugins/drift-detect/lib/perf/profilers/go.js +22 -0
- package/plugins/drift-detect/lib/perf/profilers/index.js +46 -0
- package/plugins/drift-detect/lib/perf/profilers/java.js +23 -0
- package/plugins/drift-detect/lib/perf/profilers/node.js +27 -0
- package/plugins/drift-detect/lib/perf/profilers/python.js +23 -0
- package/plugins/drift-detect/lib/perf/profilers/rust.js +23 -0
- package/plugins/drift-detect/lib/perf/profiling-runner.js +56 -0
- package/plugins/drift-detect/lib/perf/schemas.js +140 -0
- package/plugins/drift-detect/lib/platform/detect-platform.js +413 -0
- package/plugins/drift-detect/lib/platform/detection-configs.js +93 -0
- package/plugins/drift-detect/lib/platform/state-dir.js +132 -0
- package/plugins/drift-detect/lib/platform/verify-tools.js +182 -0
- package/plugins/drift-detect/lib/repo-map/cache.js +152 -0
- package/plugins/drift-detect/lib/repo-map/index.js +222 -0
- package/plugins/drift-detect/lib/repo-map/installer.js +212 -0
- package/plugins/drift-detect/lib/repo-map/queries/go.js +27 -0
- package/plugins/drift-detect/lib/repo-map/queries/index.js +100 -0
- package/plugins/drift-detect/lib/repo-map/queries/java.js +38 -0
- package/plugins/drift-detect/lib/repo-map/queries/javascript.js +55 -0
- package/plugins/drift-detect/lib/repo-map/queries/python.js +24 -0
- package/plugins/drift-detect/lib/repo-map/queries/rust.js +73 -0
- package/plugins/drift-detect/lib/repo-map/queries/typescript.js +38 -0
- package/plugins/drift-detect/lib/repo-map/runner.js +1165 -0
- package/plugins/drift-detect/lib/repo-map/updater.js +474 -0
- package/plugins/drift-detect/lib/repo-map/usage-analyzer.js +407 -0
- package/plugins/drift-detect/lib/schemas/plugin-manifest.schema.json +57 -0
- package/plugins/drift-detect/lib/schemas/validator.js +247 -0
- package/plugins/drift-detect/lib/sources/custom-handler.js +199 -0
- package/plugins/drift-detect/lib/sources/policy-questions.js +246 -0
- package/plugins/drift-detect/lib/sources/source-cache.js +165 -0
- package/plugins/drift-detect/lib/state/workflow-state.js +575 -0
- package/plugins/drift-detect/lib/types/agent-frontmatter.d.ts +134 -0
- package/plugins/drift-detect/lib/types/command-frontmatter.d.ts +107 -0
- package/plugins/drift-detect/lib/types/hook-frontmatter.d.ts +115 -0
- package/plugins/drift-detect/lib/types/index.d.ts +84 -0
- package/plugins/drift-detect/lib/types/plugin-manifest.d.ts +102 -0
- package/plugins/drift-detect/lib/types/skill-frontmatter.d.ts +89 -0
- package/plugins/drift-detect/lib/utils/atomic-write.js +94 -0
- package/plugins/drift-detect/lib/utils/cache-manager.js +159 -0
- package/plugins/drift-detect/lib/utils/context-optimizer.js +300 -0
- package/plugins/drift-detect/lib/utils/deprecation.js +37 -0
- package/plugins/drift-detect/lib/utils/shell-escape.js +88 -0
- package/plugins/drift-detect/skills/drift-analysis/SKILL.md +324 -0
- package/plugins/enhance/.claude-plugin/plugin.json +20 -0
- package/plugins/enhance/agents/agent-enhancer.md +64 -0
- package/plugins/enhance/agents/claudemd-enhancer.md +65 -0
- package/plugins/enhance/agents/cross-file-enhancer.md +54 -0
- package/plugins/enhance/agents/docs-enhancer.md +64 -0
- package/plugins/enhance/agents/hooks-enhancer.md +64 -0
- package/plugins/enhance/agents/plugin-enhancer.md +63 -0
- package/plugins/enhance/agents/prompt-enhancer.md +58 -0
- package/plugins/enhance/agents/skills-enhancer.md +64 -0
- package/plugins/enhance/commands/enhance.md +178 -0
- package/plugins/enhance/lib/adapter-transforms.js +278 -0
- package/plugins/enhance/lib/collectors/codebase.js +392 -0
- package/plugins/enhance/lib/collectors/docs-patterns.js +713 -0
- package/plugins/enhance/lib/collectors/documentation.js +219 -0
- package/plugins/enhance/lib/collectors/github.js +266 -0
- package/plugins/enhance/lib/collectors/index.js +126 -0
- package/plugins/enhance/lib/config/index.js +14 -0
- package/plugins/enhance/lib/cross-platform/index.js +539 -0
- package/plugins/enhance/lib/discovery/index.js +352 -0
- package/plugins/enhance/lib/drift-detect/collectors.js +37 -0
- package/plugins/enhance/lib/enhance/agent-analyzer.js +421 -0
- package/plugins/enhance/lib/enhance/agent-patterns.js +571 -0
- package/plugins/enhance/lib/enhance/auto-suppression.js +622 -0
- package/plugins/enhance/lib/enhance/benchmark.js +417 -0
- package/plugins/enhance/lib/enhance/cross-file-analyzer.js +930 -0
- package/plugins/enhance/lib/enhance/cross-file-patterns.js +370 -0
- package/plugins/enhance/lib/enhance/docs-analyzer.js +325 -0
- package/plugins/enhance/lib/enhance/docs-patterns.js +671 -0
- package/plugins/enhance/lib/enhance/fixer.js +721 -0
- package/plugins/enhance/lib/enhance/hook-analyzer.js +135 -0
- package/plugins/enhance/lib/enhance/hook-patterns.js +40 -0
- package/plugins/enhance/lib/enhance/index.js +127 -0
- package/plugins/enhance/lib/enhance/plugin-analyzer.js +402 -0
- package/plugins/enhance/lib/enhance/plugin-patterns.js +326 -0
- package/plugins/enhance/lib/enhance/projectmemory-analyzer.js +551 -0
- package/plugins/enhance/lib/enhance/projectmemory-patterns.js +617 -0
- package/plugins/enhance/lib/enhance/prompt-analyzer.js +457 -0
- package/plugins/enhance/lib/enhance/prompt-patterns.js +1484 -0
- package/plugins/enhance/lib/enhance/reporter.js +1348 -0
- package/plugins/enhance/lib/enhance/security-patterns.js +284 -0
- package/plugins/enhance/lib/enhance/skill-analyzer.js +182 -0
- package/plugins/enhance/lib/enhance/skill-patterns.js +147 -0
- package/plugins/enhance/lib/enhance/suppression.js +352 -0
- package/plugins/enhance/lib/enhance/tool-patterns.js +373 -0
- package/plugins/enhance/lib/index.js +270 -0
- package/plugins/enhance/lib/patterns/cli-enhancers.js +611 -0
- package/plugins/enhance/lib/patterns/pipeline.js +948 -0
- package/plugins/enhance/lib/patterns/review-patterns.js +558 -0
- package/plugins/enhance/lib/patterns/slop-analyzers.js +2305 -0
- package/plugins/enhance/lib/patterns/slop-patterns.js +1187 -0
- package/plugins/enhance/lib/perf/analyzer/index.js +22 -0
- package/plugins/enhance/lib/perf/argument-parser.js +105 -0
- package/plugins/enhance/lib/perf/baseline-comparator.js +50 -0
- package/plugins/enhance/lib/perf/baseline-store.js +127 -0
- package/plugins/enhance/lib/perf/benchmark-runner.js +399 -0
- package/plugins/enhance/lib/perf/breaking-point-finder.js +52 -0
- package/plugins/enhance/lib/perf/breaking-point-runner.js +60 -0
- package/plugins/enhance/lib/perf/checkpoint.js +123 -0
- package/plugins/enhance/lib/perf/code-paths.js +86 -0
- package/plugins/enhance/lib/perf/consolidation.js +37 -0
- package/plugins/enhance/lib/perf/constraint-runner.js +71 -0
- package/plugins/enhance/lib/perf/experiment-runner.js +32 -0
- package/plugins/enhance/lib/perf/index.js +41 -0
- package/plugins/enhance/lib/perf/investigation-state.js +875 -0
- package/plugins/enhance/lib/perf/optimization-runner.js +79 -0
- package/plugins/enhance/lib/perf/profilers/go.js +22 -0
- package/plugins/enhance/lib/perf/profilers/index.js +46 -0
- package/plugins/enhance/lib/perf/profilers/java.js +23 -0
- package/plugins/enhance/lib/perf/profilers/node.js +27 -0
- package/plugins/enhance/lib/perf/profilers/python.js +23 -0
- package/plugins/enhance/lib/perf/profilers/rust.js +23 -0
- package/plugins/enhance/lib/perf/profiling-runner.js +56 -0
- package/plugins/enhance/lib/perf/schemas.js +140 -0
- package/plugins/enhance/lib/platform/detect-platform.js +413 -0
- package/plugins/enhance/lib/platform/detection-configs.js +93 -0
- package/plugins/enhance/lib/platform/state-dir.js +132 -0
- package/plugins/enhance/lib/platform/verify-tools.js +182 -0
- package/plugins/enhance/lib/repo-map/cache.js +152 -0
- package/plugins/enhance/lib/repo-map/index.js +222 -0
- package/plugins/enhance/lib/repo-map/installer.js +212 -0
- package/plugins/enhance/lib/repo-map/queries/go.js +27 -0
- package/plugins/enhance/lib/repo-map/queries/index.js +100 -0
- package/plugins/enhance/lib/repo-map/queries/java.js +38 -0
- package/plugins/enhance/lib/repo-map/queries/javascript.js +55 -0
- package/plugins/enhance/lib/repo-map/queries/python.js +24 -0
- package/plugins/enhance/lib/repo-map/queries/rust.js +73 -0
- package/plugins/enhance/lib/repo-map/queries/typescript.js +38 -0
- package/plugins/enhance/lib/repo-map/runner.js +1165 -0
- package/plugins/enhance/lib/repo-map/updater.js +474 -0
- package/plugins/enhance/lib/repo-map/usage-analyzer.js +407 -0
- package/plugins/enhance/lib/schemas/plugin-manifest.schema.json +57 -0
- package/plugins/enhance/lib/schemas/validator.js +247 -0
- package/plugins/enhance/lib/sources/custom-handler.js +199 -0
- package/plugins/enhance/lib/sources/policy-questions.js +246 -0
- package/plugins/enhance/lib/sources/source-cache.js +165 -0
- package/plugins/enhance/lib/state/workflow-state.js +575 -0
- package/plugins/enhance/lib/types/agent-frontmatter.d.ts +134 -0
- package/plugins/enhance/lib/types/command-frontmatter.d.ts +107 -0
- package/plugins/enhance/lib/types/hook-frontmatter.d.ts +115 -0
- package/plugins/enhance/lib/types/index.d.ts +84 -0
- package/plugins/enhance/lib/types/plugin-manifest.d.ts +102 -0
- package/plugins/enhance/lib/types/skill-frontmatter.d.ts +89 -0
- package/plugins/enhance/lib/utils/atomic-write.js +94 -0
- package/plugins/enhance/lib/utils/cache-manager.js +159 -0
- package/plugins/enhance/lib/utils/context-optimizer.js +300 -0
- package/plugins/enhance/lib/utils/deprecation.js +37 -0
- package/plugins/enhance/lib/utils/shell-escape.js +88 -0
- package/plugins/enhance/skills/enhance-agent-prompts/SKILL.md +277 -0
- package/plugins/enhance/skills/enhance-claude-memory/SKILL.md +387 -0
- package/plugins/enhance/skills/enhance-cross-file/SKILL.md +110 -0
- package/plugins/enhance/skills/enhance-docs/SKILL.md +298 -0
- package/plugins/enhance/skills/enhance-hooks/SKILL.md +554 -0
- package/plugins/enhance/skills/enhance-orchestrator/SKILL.md +255 -0
- package/plugins/enhance/skills/enhance-plugins/SKILL.md +319 -0
- package/plugins/enhance/skills/enhance-prompts/SKILL.md +340 -0
- package/plugins/enhance/skills/enhance-skills/SKILL.md +436 -0
- package/plugins/learn/.claude-plugin/plugin.json +21 -0
- package/plugins/learn/agents/learn-agent.md +331 -0
- package/plugins/learn/commands/learn.md +190 -0
- package/plugins/learn/lib/adapter-transforms.js +278 -0
- package/plugins/learn/lib/collectors/codebase.js +392 -0
- package/plugins/learn/lib/collectors/docs-patterns.js +713 -0
- package/plugins/learn/lib/collectors/documentation.js +219 -0
- package/plugins/learn/lib/collectors/github.js +266 -0
- package/plugins/learn/lib/collectors/index.js +126 -0
- package/plugins/learn/lib/config/index.js +14 -0
- package/plugins/learn/lib/cross-platform/index.js +539 -0
- package/plugins/learn/lib/discovery/index.js +352 -0
- package/plugins/learn/lib/drift-detect/collectors.js +37 -0
- package/plugins/learn/lib/enhance/agent-analyzer.js +421 -0
- package/plugins/learn/lib/enhance/agent-patterns.js +571 -0
- package/plugins/learn/lib/enhance/auto-suppression.js +622 -0
- package/plugins/learn/lib/enhance/benchmark.js +417 -0
- package/plugins/learn/lib/enhance/cross-file-analyzer.js +930 -0
- package/plugins/learn/lib/enhance/cross-file-patterns.js +370 -0
- package/plugins/learn/lib/enhance/docs-analyzer.js +325 -0
- package/plugins/learn/lib/enhance/docs-patterns.js +671 -0
- package/plugins/learn/lib/enhance/fixer.js +721 -0
- package/plugins/learn/lib/enhance/hook-analyzer.js +135 -0
- package/plugins/learn/lib/enhance/hook-patterns.js +40 -0
- package/plugins/learn/lib/enhance/index.js +127 -0
- package/plugins/learn/lib/enhance/plugin-analyzer.js +402 -0
- package/plugins/learn/lib/enhance/plugin-patterns.js +326 -0
- package/plugins/learn/lib/enhance/projectmemory-analyzer.js +551 -0
- package/plugins/learn/lib/enhance/projectmemory-patterns.js +617 -0
- package/plugins/learn/lib/enhance/prompt-analyzer.js +457 -0
- package/plugins/learn/lib/enhance/prompt-patterns.js +1484 -0
- package/plugins/learn/lib/enhance/reporter.js +1348 -0
- package/plugins/learn/lib/enhance/security-patterns.js +284 -0
- package/plugins/learn/lib/enhance/skill-analyzer.js +182 -0
- package/plugins/learn/lib/enhance/skill-patterns.js +147 -0
- package/plugins/learn/lib/enhance/suppression.js +352 -0
- package/plugins/learn/lib/enhance/tool-patterns.js +373 -0
- package/plugins/learn/lib/index.js +270 -0
- package/plugins/learn/lib/patterns/cli-enhancers.js +611 -0
- package/plugins/learn/lib/patterns/pipeline.js +948 -0
- package/plugins/learn/lib/patterns/review-patterns.js +558 -0
- package/plugins/learn/lib/patterns/slop-analyzers.js +2305 -0
- package/plugins/learn/lib/patterns/slop-patterns.js +1187 -0
- package/plugins/learn/lib/perf/analyzer/index.js +22 -0
- package/plugins/learn/lib/perf/argument-parser.js +105 -0
- package/plugins/learn/lib/perf/baseline-comparator.js +50 -0
- package/plugins/learn/lib/perf/baseline-store.js +127 -0
- package/plugins/learn/lib/perf/benchmark-runner.js +399 -0
- package/plugins/learn/lib/perf/breaking-point-finder.js +52 -0
- package/plugins/learn/lib/perf/breaking-point-runner.js +60 -0
- package/plugins/learn/lib/perf/checkpoint.js +123 -0
- package/plugins/learn/lib/perf/code-paths.js +86 -0
- package/plugins/learn/lib/perf/consolidation.js +37 -0
- package/plugins/learn/lib/perf/constraint-runner.js +71 -0
- package/plugins/learn/lib/perf/experiment-runner.js +32 -0
- package/plugins/learn/lib/perf/index.js +41 -0
- package/plugins/learn/lib/perf/investigation-state.js +875 -0
- package/plugins/learn/lib/perf/optimization-runner.js +79 -0
- package/plugins/learn/lib/perf/profilers/go.js +22 -0
- package/plugins/learn/lib/perf/profilers/index.js +46 -0
- package/plugins/learn/lib/perf/profilers/java.js +23 -0
- package/plugins/learn/lib/perf/profilers/node.js +27 -0
- package/plugins/learn/lib/perf/profilers/python.js +23 -0
- package/plugins/learn/lib/perf/profilers/rust.js +23 -0
- package/plugins/learn/lib/perf/profiling-runner.js +56 -0
- package/plugins/learn/lib/perf/schemas.js +140 -0
- package/plugins/learn/lib/platform/detect-platform.js +413 -0
- package/plugins/learn/lib/platform/detection-configs.js +93 -0
- package/plugins/learn/lib/platform/state-dir.js +132 -0
- package/plugins/learn/lib/platform/verify-tools.js +182 -0
- package/plugins/learn/lib/repo-map/cache.js +152 -0
- package/plugins/learn/lib/repo-map/index.js +222 -0
- package/plugins/learn/lib/repo-map/installer.js +212 -0
- package/plugins/learn/lib/repo-map/queries/go.js +27 -0
- package/plugins/learn/lib/repo-map/queries/index.js +100 -0
- package/plugins/learn/lib/repo-map/queries/java.js +38 -0
- package/plugins/learn/lib/repo-map/queries/javascript.js +55 -0
- package/plugins/learn/lib/repo-map/queries/python.js +24 -0
- package/plugins/learn/lib/repo-map/queries/rust.js +73 -0
- package/plugins/learn/lib/repo-map/queries/typescript.js +38 -0
- package/plugins/learn/lib/repo-map/runner.js +1165 -0
- package/plugins/learn/lib/repo-map/updater.js +474 -0
- package/plugins/learn/lib/repo-map/usage-analyzer.js +407 -0
- package/plugins/learn/lib/schemas/plugin-manifest.schema.json +57 -0
- package/plugins/learn/lib/schemas/validator.js +247 -0
- package/plugins/learn/lib/sources/custom-handler.js +199 -0
- package/plugins/learn/lib/sources/policy-questions.js +246 -0
- package/plugins/learn/lib/sources/source-cache.js +165 -0
- package/plugins/learn/lib/state/workflow-state.js +575 -0
- package/plugins/learn/lib/types/agent-frontmatter.d.ts +134 -0
- package/plugins/learn/lib/types/command-frontmatter.d.ts +107 -0
- package/plugins/learn/lib/types/hook-frontmatter.d.ts +115 -0
- package/plugins/learn/lib/types/index.d.ts +84 -0
- package/plugins/learn/lib/types/plugin-manifest.d.ts +102 -0
- package/plugins/learn/lib/types/skill-frontmatter.d.ts +89 -0
- package/plugins/learn/lib/utils/atomic-write.js +94 -0
- package/plugins/learn/lib/utils/cache-manager.js +159 -0
- package/plugins/learn/lib/utils/context-optimizer.js +300 -0
- package/plugins/learn/lib/utils/deprecation.js +37 -0
- package/plugins/learn/lib/utils/shell-escape.js +88 -0
- package/plugins/learn/skills/learn/SKILL.md +349 -0
- package/plugins/next-task/.claude-plugin/plugin.json +24 -0
- package/plugins/next-task/agents/ci-fixer.md +259 -0
- package/plugins/next-task/agents/ci-monitor.md +342 -0
- package/plugins/next-task/agents/delivery-validator.md +115 -0
- package/plugins/next-task/agents/exploration-agent.md +316 -0
- package/plugins/next-task/agents/implementation-agent.md +465 -0
- package/plugins/next-task/agents/planning-agent.md +377 -0
- package/plugins/next-task/agents/simple-fixer.md +139 -0
- package/plugins/next-task/agents/task-discoverer.md +89 -0
- package/plugins/next-task/agents/test-coverage-checker.md +451 -0
- package/plugins/next-task/agents/worktree-manager.md +257 -0
- package/plugins/next-task/commands/delivery-approval.md +341 -0
- package/plugins/next-task/commands/next-task.md +547 -0
- package/plugins/next-task/hooks/hooks.json +14 -0
- package/plugins/next-task/lib/adapter-transforms.js +278 -0
- package/plugins/next-task/lib/collectors/codebase.js +392 -0
- package/plugins/next-task/lib/collectors/docs-patterns.js +713 -0
- package/plugins/next-task/lib/collectors/documentation.js +219 -0
- package/plugins/next-task/lib/collectors/github.js +266 -0
- package/plugins/next-task/lib/collectors/index.js +126 -0
- package/plugins/next-task/lib/config/index.js +14 -0
- package/plugins/next-task/lib/cross-platform/index.js +539 -0
- package/plugins/next-task/lib/discovery/index.js +352 -0
- package/plugins/next-task/lib/drift-detect/collectors.js +37 -0
- package/plugins/next-task/lib/enhance/agent-analyzer.js +421 -0
- package/plugins/next-task/lib/enhance/agent-patterns.js +571 -0
- package/plugins/next-task/lib/enhance/auto-suppression.js +622 -0
- package/plugins/next-task/lib/enhance/benchmark.js +417 -0
- package/plugins/next-task/lib/enhance/cross-file-analyzer.js +930 -0
- package/plugins/next-task/lib/enhance/cross-file-patterns.js +370 -0
- package/plugins/next-task/lib/enhance/docs-analyzer.js +325 -0
- package/plugins/next-task/lib/enhance/docs-patterns.js +671 -0
- package/plugins/next-task/lib/enhance/fixer.js +721 -0
- package/plugins/next-task/lib/enhance/hook-analyzer.js +135 -0
- package/plugins/next-task/lib/enhance/hook-patterns.js +40 -0
- package/plugins/next-task/lib/enhance/index.js +127 -0
- package/plugins/next-task/lib/enhance/plugin-analyzer.js +402 -0
- package/plugins/next-task/lib/enhance/plugin-patterns.js +326 -0
- package/plugins/next-task/lib/enhance/projectmemory-analyzer.js +551 -0
- package/plugins/next-task/lib/enhance/projectmemory-patterns.js +617 -0
- package/plugins/next-task/lib/enhance/prompt-analyzer.js +457 -0
- package/plugins/next-task/lib/enhance/prompt-patterns.js +1484 -0
- package/plugins/next-task/lib/enhance/reporter.js +1348 -0
- package/plugins/next-task/lib/enhance/security-patterns.js +284 -0
- package/plugins/next-task/lib/enhance/skill-analyzer.js +182 -0
- package/plugins/next-task/lib/enhance/skill-patterns.js +147 -0
- package/plugins/next-task/lib/enhance/suppression.js +352 -0
- package/plugins/next-task/lib/enhance/tool-patterns.js +373 -0
- package/plugins/next-task/lib/index.js +270 -0
- package/plugins/next-task/lib/patterns/cli-enhancers.js +611 -0
- package/plugins/next-task/lib/patterns/pipeline.js +948 -0
- package/plugins/next-task/lib/patterns/review-patterns.js +558 -0
- package/plugins/next-task/lib/patterns/slop-analyzers.js +2305 -0
- package/plugins/next-task/lib/patterns/slop-patterns.js +1187 -0
- package/plugins/next-task/lib/perf/analyzer/index.js +22 -0
- package/plugins/next-task/lib/perf/argument-parser.js +105 -0
- package/plugins/next-task/lib/perf/baseline-comparator.js +50 -0
- package/plugins/next-task/lib/perf/baseline-store.js +127 -0
- package/plugins/next-task/lib/perf/benchmark-runner.js +399 -0
- package/plugins/next-task/lib/perf/breaking-point-finder.js +52 -0
- package/plugins/next-task/lib/perf/breaking-point-runner.js +60 -0
- package/plugins/next-task/lib/perf/checkpoint.js +123 -0
- package/plugins/next-task/lib/perf/code-paths.js +86 -0
- package/plugins/next-task/lib/perf/consolidation.js +37 -0
- package/plugins/next-task/lib/perf/constraint-runner.js +71 -0
- package/plugins/next-task/lib/perf/experiment-runner.js +32 -0
- package/plugins/next-task/lib/perf/index.js +41 -0
- package/plugins/next-task/lib/perf/investigation-state.js +875 -0
- package/plugins/next-task/lib/perf/optimization-runner.js +79 -0
- package/plugins/next-task/lib/perf/profilers/go.js +22 -0
- package/plugins/next-task/lib/perf/profilers/index.js +46 -0
- package/plugins/next-task/lib/perf/profilers/java.js +23 -0
- package/plugins/next-task/lib/perf/profilers/node.js +27 -0
- package/plugins/next-task/lib/perf/profilers/python.js +23 -0
- package/plugins/next-task/lib/perf/profilers/rust.js +23 -0
- package/plugins/next-task/lib/perf/profiling-runner.js +56 -0
- package/plugins/next-task/lib/perf/schemas.js +140 -0
- package/plugins/next-task/lib/platform/detect-platform.js +413 -0
- package/plugins/next-task/lib/platform/detection-configs.js +93 -0
- package/plugins/next-task/lib/platform/state-dir.js +132 -0
- package/plugins/next-task/lib/platform/verify-tools.js +182 -0
- package/plugins/next-task/lib/repo-map/cache.js +152 -0
- package/plugins/next-task/lib/repo-map/index.js +222 -0
- package/plugins/next-task/lib/repo-map/installer.js +212 -0
- package/plugins/next-task/lib/repo-map/queries/go.js +27 -0
- package/plugins/next-task/lib/repo-map/queries/index.js +100 -0
- package/plugins/next-task/lib/repo-map/queries/java.js +38 -0
- package/plugins/next-task/lib/repo-map/queries/javascript.js +55 -0
- package/plugins/next-task/lib/repo-map/queries/python.js +24 -0
- package/plugins/next-task/lib/repo-map/queries/rust.js +73 -0
- package/plugins/next-task/lib/repo-map/queries/typescript.js +38 -0
- package/plugins/next-task/lib/repo-map/runner.js +1165 -0
- package/plugins/next-task/lib/repo-map/updater.js +474 -0
- package/plugins/next-task/lib/repo-map/usage-analyzer.js +407 -0
- package/plugins/next-task/lib/schemas/plugin-manifest.schema.json +57 -0
- package/plugins/next-task/lib/schemas/validator.js +247 -0
- package/plugins/next-task/lib/sources/custom-handler.js +199 -0
- package/plugins/next-task/lib/sources/policy-questions.js +246 -0
- package/plugins/next-task/lib/sources/source-cache.js +165 -0
- package/plugins/next-task/lib/state/workflow-state.js +575 -0
- package/plugins/next-task/lib/types/agent-frontmatter.d.ts +134 -0
- package/plugins/next-task/lib/types/command-frontmatter.d.ts +107 -0
- package/plugins/next-task/lib/types/hook-frontmatter.d.ts +115 -0
- package/plugins/next-task/lib/types/index.d.ts +84 -0
- package/plugins/next-task/lib/types/plugin-manifest.d.ts +102 -0
- package/plugins/next-task/lib/types/skill-frontmatter.d.ts +89 -0
- package/plugins/next-task/lib/utils/atomic-write.js +94 -0
- package/plugins/next-task/lib/utils/cache-manager.js +159 -0
- package/plugins/next-task/lib/utils/context-optimizer.js +300 -0
- package/plugins/next-task/lib/utils/deprecation.js +37 -0
- package/plugins/next-task/lib/utils/shell-escape.js +88 -0
- package/plugins/next-task/skills/discover-tasks/SKILL.md +191 -0
- package/plugins/next-task/skills/orchestrate-review/SKILL.md +239 -0
- package/plugins/next-task/skills/validate-delivery/SKILL.md +186 -0
- package/plugins/perf/.claude-plugin/plugin.json +20 -0
- package/plugins/perf/agents/perf-analyzer.md +43 -0
- package/plugins/perf/agents/perf-code-paths.md +16 -0
- package/plugins/perf/agents/perf-investigation-logger.md +47 -0
- package/plugins/perf/agents/perf-orchestrator.md +344 -0
- package/plugins/perf/agents/perf-theory-gatherer.md +25 -0
- package/plugins/perf/agents/perf-theory-tester.md +58 -0
- package/plugins/perf/commands/perf.md +470 -0
- package/plugins/perf/hooks/checkpoint.md +35 -0
- package/plugins/perf/hooks/constraint-tester.md +40 -0
- package/plugins/perf/lib/adapter-transforms.js +278 -0
- package/plugins/perf/lib/collectors/codebase.js +392 -0
- package/plugins/perf/lib/collectors/docs-patterns.js +713 -0
- package/plugins/perf/lib/collectors/documentation.js +219 -0
- package/plugins/perf/lib/collectors/github.js +266 -0
- package/plugins/perf/lib/collectors/index.js +126 -0
- package/plugins/perf/lib/config/index.js +14 -0
- package/plugins/perf/lib/cross-platform/index.js +539 -0
- package/plugins/perf/lib/discovery/index.js +352 -0
- package/plugins/perf/lib/drift-detect/collectors.js +37 -0
- package/plugins/perf/lib/enhance/agent-analyzer.js +421 -0
- package/plugins/perf/lib/enhance/agent-patterns.js +571 -0
- package/plugins/perf/lib/enhance/auto-suppression.js +622 -0
- package/plugins/perf/lib/enhance/benchmark.js +417 -0
- package/plugins/perf/lib/enhance/cross-file-analyzer.js +930 -0
- package/plugins/perf/lib/enhance/cross-file-patterns.js +370 -0
- package/plugins/perf/lib/enhance/docs-analyzer.js +325 -0
- package/plugins/perf/lib/enhance/docs-patterns.js +671 -0
- package/plugins/perf/lib/enhance/fixer.js +721 -0
- package/plugins/perf/lib/enhance/hook-analyzer.js +135 -0
- package/plugins/perf/lib/enhance/hook-patterns.js +40 -0
- package/plugins/perf/lib/enhance/index.js +127 -0
- package/plugins/perf/lib/enhance/plugin-analyzer.js +402 -0
- package/plugins/perf/lib/enhance/plugin-patterns.js +326 -0
- package/plugins/perf/lib/enhance/projectmemory-analyzer.js +551 -0
- package/plugins/perf/lib/enhance/projectmemory-patterns.js +617 -0
- package/plugins/perf/lib/enhance/prompt-analyzer.js +457 -0
- package/plugins/perf/lib/enhance/prompt-patterns.js +1484 -0
- package/plugins/perf/lib/enhance/reporter.js +1348 -0
- package/plugins/perf/lib/enhance/security-patterns.js +284 -0
- package/plugins/perf/lib/enhance/skill-analyzer.js +182 -0
- package/plugins/perf/lib/enhance/skill-patterns.js +147 -0
- package/plugins/perf/lib/enhance/suppression.js +352 -0
- package/plugins/perf/lib/enhance/tool-patterns.js +373 -0
- package/plugins/perf/lib/index.js +270 -0
- package/plugins/perf/lib/patterns/cli-enhancers.js +611 -0
- package/plugins/perf/lib/patterns/pipeline.js +948 -0
- package/plugins/perf/lib/patterns/review-patterns.js +558 -0
- package/plugins/perf/lib/patterns/slop-analyzers.js +2305 -0
- package/plugins/perf/lib/patterns/slop-patterns.js +1187 -0
- package/plugins/perf/lib/perf/analyzer/index.js +22 -0
- package/plugins/perf/lib/perf/argument-parser.js +105 -0
- package/plugins/perf/lib/perf/baseline-comparator.js +50 -0
- package/plugins/perf/lib/perf/baseline-store.js +127 -0
- package/plugins/perf/lib/perf/benchmark-runner.js +399 -0
- package/plugins/perf/lib/perf/breaking-point-finder.js +52 -0
- package/plugins/perf/lib/perf/breaking-point-runner.js +60 -0
- package/plugins/perf/lib/perf/checkpoint.js +123 -0
- package/plugins/perf/lib/perf/code-paths.js +86 -0
- package/plugins/perf/lib/perf/consolidation.js +37 -0
- package/plugins/perf/lib/perf/constraint-runner.js +71 -0
- package/plugins/perf/lib/perf/experiment-runner.js +32 -0
- package/plugins/perf/lib/perf/index.js +41 -0
- package/plugins/perf/lib/perf/investigation-state.js +875 -0
- package/plugins/perf/lib/perf/optimization-runner.js +79 -0
- package/plugins/perf/lib/perf/profilers/go.js +22 -0
- package/plugins/perf/lib/perf/profilers/index.js +46 -0
- package/plugins/perf/lib/perf/profilers/java.js +23 -0
- package/plugins/perf/lib/perf/profilers/node.js +27 -0
- package/plugins/perf/lib/perf/profilers/python.js +23 -0
- package/plugins/perf/lib/perf/profilers/rust.js +23 -0
- package/plugins/perf/lib/perf/profiling-runner.js +56 -0
- package/plugins/perf/lib/perf/schemas.js +140 -0
- package/plugins/perf/lib/platform/detect-platform.js +413 -0
- package/plugins/perf/lib/platform/detection-configs.js +93 -0
- package/plugins/perf/lib/platform/state-dir.js +132 -0
- package/plugins/perf/lib/platform/verify-tools.js +182 -0
- package/plugins/perf/lib/repo-map/cache.js +152 -0
- package/plugins/perf/lib/repo-map/index.js +222 -0
- package/plugins/perf/lib/repo-map/installer.js +212 -0
- package/plugins/perf/lib/repo-map/queries/go.js +27 -0
- package/plugins/perf/lib/repo-map/queries/index.js +100 -0
- package/plugins/perf/lib/repo-map/queries/java.js +38 -0
- package/plugins/perf/lib/repo-map/queries/javascript.js +55 -0
- package/plugins/perf/lib/repo-map/queries/python.js +24 -0
- package/plugins/perf/lib/repo-map/queries/rust.js +73 -0
- package/plugins/perf/lib/repo-map/queries/typescript.js +38 -0
- package/plugins/perf/lib/repo-map/runner.js +1165 -0
- package/plugins/perf/lib/repo-map/updater.js +474 -0
- package/plugins/perf/lib/repo-map/usage-analyzer.js +407 -0
- package/plugins/perf/lib/schemas/plugin-manifest.schema.json +57 -0
- package/plugins/perf/lib/schemas/validator.js +247 -0
- package/plugins/perf/lib/sources/custom-handler.js +199 -0
- package/plugins/perf/lib/sources/policy-questions.js +246 -0
- package/plugins/perf/lib/sources/source-cache.js +165 -0
- package/plugins/perf/lib/state/workflow-state.js +575 -0
- package/plugins/perf/lib/types/agent-frontmatter.d.ts +134 -0
- package/plugins/perf/lib/types/command-frontmatter.d.ts +107 -0
- package/plugins/perf/lib/types/hook-frontmatter.d.ts +115 -0
- package/plugins/perf/lib/types/index.d.ts +84 -0
- package/plugins/perf/lib/types/plugin-manifest.d.ts +102 -0
- package/plugins/perf/lib/types/skill-frontmatter.d.ts +89 -0
- package/plugins/perf/lib/utils/atomic-write.js +94 -0
- package/plugins/perf/lib/utils/cache-manager.js +159 -0
- package/plugins/perf/lib/utils/context-optimizer.js +300 -0
- package/plugins/perf/lib/utils/deprecation.js +37 -0
- package/plugins/perf/lib/utils/shell-escape.js +88 -0
- package/plugins/perf/skills/perf-analyzer/SKILL.md +37 -0
- package/plugins/perf/skills/perf-baseline-manager/SKILL.md +30 -0
- package/plugins/perf/skills/perf-benchmarker/SKILL.md +52 -0
- package/plugins/perf/skills/perf-code-paths/SKILL.md +32 -0
- package/plugins/perf/skills/perf-investigation-logger/SKILL.md +41 -0
- package/plugins/perf/skills/perf-profiler/SKILL.md +42 -0
- package/plugins/perf/skills/perf-theory-gatherer/SKILL.md +35 -0
- package/plugins/perf/skills/perf-theory-tester/SKILL.md +36 -0
- package/plugins/repo-map/.claude-plugin/plugin.json +22 -0
- package/plugins/repo-map/agents/map-validator.md +60 -0
- package/plugins/repo-map/commands/repo-map.md +133 -0
- package/plugins/repo-map/lib/adapter-transforms.js +278 -0
- package/plugins/repo-map/lib/collectors/codebase.js +392 -0
- package/plugins/repo-map/lib/collectors/docs-patterns.js +713 -0
- package/plugins/repo-map/lib/collectors/documentation.js +219 -0
- package/plugins/repo-map/lib/collectors/github.js +266 -0
- package/plugins/repo-map/lib/collectors/index.js +126 -0
- package/plugins/repo-map/lib/config/index.js +14 -0
- package/plugins/repo-map/lib/cross-platform/index.js +539 -0
- package/plugins/repo-map/lib/discovery/index.js +352 -0
- package/plugins/repo-map/lib/drift-detect/collectors.js +37 -0
- package/plugins/repo-map/lib/enhance/agent-analyzer.js +421 -0
- package/plugins/repo-map/lib/enhance/agent-patterns.js +571 -0
- package/plugins/repo-map/lib/enhance/auto-suppression.js +622 -0
- package/plugins/repo-map/lib/enhance/benchmark.js +417 -0
- package/plugins/repo-map/lib/enhance/cross-file-analyzer.js +930 -0
- package/plugins/repo-map/lib/enhance/cross-file-patterns.js +370 -0
- package/plugins/repo-map/lib/enhance/docs-analyzer.js +325 -0
- package/plugins/repo-map/lib/enhance/docs-patterns.js +671 -0
- package/plugins/repo-map/lib/enhance/fixer.js +721 -0
- package/plugins/repo-map/lib/enhance/hook-analyzer.js +135 -0
- package/plugins/repo-map/lib/enhance/hook-patterns.js +40 -0
- package/plugins/repo-map/lib/enhance/index.js +127 -0
- package/plugins/repo-map/lib/enhance/plugin-analyzer.js +402 -0
- package/plugins/repo-map/lib/enhance/plugin-patterns.js +326 -0
- package/plugins/repo-map/lib/enhance/projectmemory-analyzer.js +551 -0
- package/plugins/repo-map/lib/enhance/projectmemory-patterns.js +617 -0
- package/plugins/repo-map/lib/enhance/prompt-analyzer.js +457 -0
- package/plugins/repo-map/lib/enhance/prompt-patterns.js +1484 -0
- package/plugins/repo-map/lib/enhance/reporter.js +1348 -0
- package/plugins/repo-map/lib/enhance/security-patterns.js +284 -0
- package/plugins/repo-map/lib/enhance/skill-analyzer.js +182 -0
- package/plugins/repo-map/lib/enhance/skill-patterns.js +147 -0
- package/plugins/repo-map/lib/enhance/suppression.js +352 -0
- package/plugins/repo-map/lib/enhance/tool-patterns.js +373 -0
- package/plugins/repo-map/lib/index.js +270 -0
- package/plugins/repo-map/lib/patterns/cli-enhancers.js +611 -0
- package/plugins/repo-map/lib/patterns/pipeline.js +948 -0
- package/plugins/repo-map/lib/patterns/review-patterns.js +558 -0
- package/plugins/repo-map/lib/patterns/slop-analyzers.js +2305 -0
- package/plugins/repo-map/lib/patterns/slop-patterns.js +1187 -0
- package/plugins/repo-map/lib/perf/analyzer/index.js +22 -0
- package/plugins/repo-map/lib/perf/argument-parser.js +105 -0
- package/plugins/repo-map/lib/perf/baseline-comparator.js +50 -0
- package/plugins/repo-map/lib/perf/baseline-store.js +127 -0
- package/plugins/repo-map/lib/perf/benchmark-runner.js +399 -0
- package/plugins/repo-map/lib/perf/breaking-point-finder.js +52 -0
- package/plugins/repo-map/lib/perf/breaking-point-runner.js +60 -0
- package/plugins/repo-map/lib/perf/checkpoint.js +123 -0
- package/plugins/repo-map/lib/perf/code-paths.js +86 -0
- package/plugins/repo-map/lib/perf/consolidation.js +37 -0
- package/plugins/repo-map/lib/perf/constraint-runner.js +71 -0
- package/plugins/repo-map/lib/perf/experiment-runner.js +32 -0
- package/plugins/repo-map/lib/perf/index.js +41 -0
- package/plugins/repo-map/lib/perf/investigation-state.js +875 -0
- package/plugins/repo-map/lib/perf/optimization-runner.js +79 -0
- package/plugins/repo-map/lib/perf/profilers/go.js +22 -0
- package/plugins/repo-map/lib/perf/profilers/index.js +46 -0
- package/plugins/repo-map/lib/perf/profilers/java.js +23 -0
- package/plugins/repo-map/lib/perf/profilers/node.js +27 -0
- package/plugins/repo-map/lib/perf/profilers/python.js +23 -0
- package/plugins/repo-map/lib/perf/profilers/rust.js +23 -0
- package/plugins/repo-map/lib/perf/profiling-runner.js +56 -0
- package/plugins/repo-map/lib/perf/schemas.js +140 -0
- package/plugins/repo-map/lib/platform/detect-platform.js +413 -0
- package/plugins/repo-map/lib/platform/detection-configs.js +93 -0
- package/plugins/repo-map/lib/platform/state-dir.js +132 -0
- package/plugins/repo-map/lib/platform/verify-tools.js +182 -0
- package/plugins/repo-map/lib/repo-map/cache.js +152 -0
- package/plugins/repo-map/lib/repo-map/index.js +222 -0
- package/plugins/repo-map/lib/repo-map/installer.js +212 -0
- package/plugins/repo-map/lib/repo-map/queries/go.js +27 -0
- package/plugins/repo-map/lib/repo-map/queries/index.js +100 -0
- package/plugins/repo-map/lib/repo-map/queries/java.js +38 -0
- package/plugins/repo-map/lib/repo-map/queries/javascript.js +55 -0
- package/plugins/repo-map/lib/repo-map/queries/python.js +24 -0
- package/plugins/repo-map/lib/repo-map/queries/rust.js +73 -0
- package/plugins/repo-map/lib/repo-map/queries/typescript.js +38 -0
- package/plugins/repo-map/lib/repo-map/runner.js +1165 -0
- package/plugins/repo-map/lib/repo-map/updater.js +474 -0
- package/plugins/repo-map/lib/repo-map/usage-analyzer.js +407 -0
- package/plugins/repo-map/lib/schemas/plugin-manifest.schema.json +57 -0
- package/plugins/repo-map/lib/schemas/validator.js +247 -0
- package/plugins/repo-map/lib/sources/custom-handler.js +199 -0
- package/plugins/repo-map/lib/sources/policy-questions.js +246 -0
- package/plugins/repo-map/lib/sources/source-cache.js +165 -0
- package/plugins/repo-map/lib/state/workflow-state.js +575 -0
- package/plugins/repo-map/lib/types/agent-frontmatter.d.ts +134 -0
- package/plugins/repo-map/lib/types/command-frontmatter.d.ts +107 -0
- package/plugins/repo-map/lib/types/hook-frontmatter.d.ts +115 -0
- package/plugins/repo-map/lib/types/index.d.ts +84 -0
- package/plugins/repo-map/lib/types/plugin-manifest.d.ts +102 -0
- package/plugins/repo-map/lib/types/skill-frontmatter.d.ts +89 -0
- package/plugins/repo-map/lib/utils/atomic-write.js +94 -0
- package/plugins/repo-map/lib/utils/cache-manager.js +159 -0
- package/plugins/repo-map/lib/utils/context-optimizer.js +300 -0
- package/plugins/repo-map/lib/utils/deprecation.js +37 -0
- package/plugins/repo-map/lib/utils/shell-escape.js +88 -0
- package/plugins/repo-map/skills/repo-mapping/SKILL.md +83 -0
- package/plugins/ship/.claude-plugin/plugin.json +21 -0
- package/plugins/ship/commands/ship-ci-review-loop.md +472 -0
- package/plugins/ship/commands/ship-deployment.md +335 -0
- package/plugins/ship/commands/ship-error-handling.md +258 -0
- package/plugins/ship/commands/ship.md +492 -0
- package/plugins/ship/lib/adapter-transforms.js +278 -0
- package/plugins/ship/lib/collectors/codebase.js +392 -0
- package/plugins/ship/lib/collectors/docs-patterns.js +713 -0
- package/plugins/ship/lib/collectors/documentation.js +219 -0
- package/plugins/ship/lib/collectors/github.js +266 -0
- package/plugins/ship/lib/collectors/index.js +126 -0
- package/plugins/ship/lib/config/index.js +14 -0
- package/plugins/ship/lib/cross-platform/index.js +539 -0
- package/plugins/ship/lib/discovery/index.js +352 -0
- package/plugins/ship/lib/drift-detect/collectors.js +37 -0
- package/plugins/ship/lib/enhance/agent-analyzer.js +421 -0
- package/plugins/ship/lib/enhance/agent-patterns.js +571 -0
- package/plugins/ship/lib/enhance/auto-suppression.js +622 -0
- package/plugins/ship/lib/enhance/benchmark.js +417 -0
- package/plugins/ship/lib/enhance/cross-file-analyzer.js +930 -0
- package/plugins/ship/lib/enhance/cross-file-patterns.js +370 -0
- package/plugins/ship/lib/enhance/docs-analyzer.js +325 -0
- package/plugins/ship/lib/enhance/docs-patterns.js +671 -0
- package/plugins/ship/lib/enhance/fixer.js +721 -0
- package/plugins/ship/lib/enhance/hook-analyzer.js +135 -0
- package/plugins/ship/lib/enhance/hook-patterns.js +40 -0
- package/plugins/ship/lib/enhance/index.js +127 -0
- package/plugins/ship/lib/enhance/plugin-analyzer.js +402 -0
- package/plugins/ship/lib/enhance/plugin-patterns.js +326 -0
- package/plugins/ship/lib/enhance/projectmemory-analyzer.js +551 -0
- package/plugins/ship/lib/enhance/projectmemory-patterns.js +617 -0
- package/plugins/ship/lib/enhance/prompt-analyzer.js +457 -0
- package/plugins/ship/lib/enhance/prompt-patterns.js +1484 -0
- package/plugins/ship/lib/enhance/reporter.js +1348 -0
- package/plugins/ship/lib/enhance/security-patterns.js +284 -0
- package/plugins/ship/lib/enhance/skill-analyzer.js +182 -0
- package/plugins/ship/lib/enhance/skill-patterns.js +147 -0
- package/plugins/ship/lib/enhance/suppression.js +352 -0
- package/plugins/ship/lib/enhance/tool-patterns.js +373 -0
- package/plugins/ship/lib/index.js +270 -0
- package/plugins/ship/lib/patterns/cli-enhancers.js +611 -0
- package/plugins/ship/lib/patterns/pipeline.js +948 -0
- package/plugins/ship/lib/patterns/review-patterns.js +558 -0
- package/plugins/ship/lib/patterns/slop-analyzers.js +2305 -0
- package/plugins/ship/lib/patterns/slop-patterns.js +1187 -0
- package/plugins/ship/lib/perf/analyzer/index.js +22 -0
- package/plugins/ship/lib/perf/argument-parser.js +105 -0
- package/plugins/ship/lib/perf/baseline-comparator.js +50 -0
- package/plugins/ship/lib/perf/baseline-store.js +127 -0
- package/plugins/ship/lib/perf/benchmark-runner.js +399 -0
- package/plugins/ship/lib/perf/breaking-point-finder.js +52 -0
- package/plugins/ship/lib/perf/breaking-point-runner.js +60 -0
- package/plugins/ship/lib/perf/checkpoint.js +123 -0
- package/plugins/ship/lib/perf/code-paths.js +86 -0
- package/plugins/ship/lib/perf/consolidation.js +37 -0
- package/plugins/ship/lib/perf/constraint-runner.js +71 -0
- package/plugins/ship/lib/perf/experiment-runner.js +32 -0
- package/plugins/ship/lib/perf/index.js +41 -0
- package/plugins/ship/lib/perf/investigation-state.js +875 -0
- package/plugins/ship/lib/perf/optimization-runner.js +79 -0
- package/plugins/ship/lib/perf/profilers/go.js +22 -0
- package/plugins/ship/lib/perf/profilers/index.js +46 -0
- package/plugins/ship/lib/perf/profilers/java.js +23 -0
- package/plugins/ship/lib/perf/profilers/node.js +27 -0
- package/plugins/ship/lib/perf/profilers/python.js +23 -0
- package/plugins/ship/lib/perf/profilers/rust.js +23 -0
- package/plugins/ship/lib/perf/profiling-runner.js +56 -0
- package/plugins/ship/lib/perf/schemas.js +140 -0
- package/plugins/ship/lib/platform/detect-platform.js +413 -0
- package/plugins/ship/lib/platform/detection-configs.js +93 -0
- package/plugins/ship/lib/platform/state-dir.js +132 -0
- package/plugins/ship/lib/platform/verify-tools.js +182 -0
- package/plugins/ship/lib/repo-map/cache.js +152 -0
- package/plugins/ship/lib/repo-map/index.js +222 -0
- package/plugins/ship/lib/repo-map/installer.js +212 -0
- package/plugins/ship/lib/repo-map/queries/go.js +27 -0
- package/plugins/ship/lib/repo-map/queries/index.js +100 -0
- package/plugins/ship/lib/repo-map/queries/java.js +38 -0
- package/plugins/ship/lib/repo-map/queries/javascript.js +55 -0
- package/plugins/ship/lib/repo-map/queries/python.js +24 -0
- package/plugins/ship/lib/repo-map/queries/rust.js +73 -0
- package/plugins/ship/lib/repo-map/queries/typescript.js +38 -0
- package/plugins/ship/lib/repo-map/runner.js +1165 -0
- package/plugins/ship/lib/repo-map/updater.js +474 -0
- package/plugins/ship/lib/repo-map/usage-analyzer.js +407 -0
- package/plugins/ship/lib/schemas/plugin-manifest.schema.json +57 -0
- package/plugins/ship/lib/schemas/validator.js +247 -0
- package/plugins/ship/lib/sources/custom-handler.js +199 -0
- package/plugins/ship/lib/sources/policy-questions.js +246 -0
- package/plugins/ship/lib/sources/source-cache.js +165 -0
- package/plugins/ship/lib/state/workflow-state.js +575 -0
- package/plugins/ship/lib/types/agent-frontmatter.d.ts +134 -0
- package/plugins/ship/lib/types/command-frontmatter.d.ts +107 -0
- package/plugins/ship/lib/types/hook-frontmatter.d.ts +115 -0
- package/plugins/ship/lib/types/index.d.ts +84 -0
- package/plugins/ship/lib/types/plugin-manifest.d.ts +102 -0
- package/plugins/ship/lib/types/skill-frontmatter.d.ts +89 -0
- package/plugins/ship/lib/utils/atomic-write.js +94 -0
- package/plugins/ship/lib/utils/cache-manager.js +159 -0
- package/plugins/ship/lib/utils/context-optimizer.js +300 -0
- package/plugins/ship/lib/utils/deprecation.js +37 -0
- package/plugins/ship/lib/utils/shell-escape.js +88 -0
- package/plugins/sync-docs/.claude-plugin/plugin.json +20 -0
- package/plugins/sync-docs/agents/sync-docs-agent.md +154 -0
- package/plugins/sync-docs/commands/sync-docs.md +186 -0
- package/plugins/sync-docs/lib/adapter-transforms.js +278 -0
- package/plugins/sync-docs/lib/collectors/codebase.js +392 -0
- package/plugins/sync-docs/lib/collectors/docs-patterns.js +713 -0
- package/plugins/sync-docs/lib/collectors/documentation.js +219 -0
- package/plugins/sync-docs/lib/collectors/github.js +266 -0
- package/plugins/sync-docs/lib/collectors/index.js +126 -0
- package/plugins/sync-docs/lib/config/index.js +14 -0
- package/plugins/sync-docs/lib/cross-platform/index.js +539 -0
- package/plugins/sync-docs/lib/discovery/index.js +352 -0
- package/plugins/sync-docs/lib/drift-detect/collectors.js +37 -0
- package/plugins/sync-docs/lib/enhance/agent-analyzer.js +421 -0
- package/plugins/sync-docs/lib/enhance/agent-patterns.js +571 -0
- package/plugins/sync-docs/lib/enhance/auto-suppression.js +622 -0
- package/plugins/sync-docs/lib/enhance/benchmark.js +417 -0
- package/plugins/sync-docs/lib/enhance/cross-file-analyzer.js +930 -0
- package/plugins/sync-docs/lib/enhance/cross-file-patterns.js +370 -0
- package/plugins/sync-docs/lib/enhance/docs-analyzer.js +325 -0
- package/plugins/sync-docs/lib/enhance/docs-patterns.js +671 -0
- package/plugins/sync-docs/lib/enhance/fixer.js +721 -0
- package/plugins/sync-docs/lib/enhance/hook-analyzer.js +135 -0
- package/plugins/sync-docs/lib/enhance/hook-patterns.js +40 -0
- package/plugins/sync-docs/lib/enhance/index.js +127 -0
- package/plugins/sync-docs/lib/enhance/plugin-analyzer.js +402 -0
- package/plugins/sync-docs/lib/enhance/plugin-patterns.js +326 -0
- package/plugins/sync-docs/lib/enhance/projectmemory-analyzer.js +551 -0
- package/plugins/sync-docs/lib/enhance/projectmemory-patterns.js +617 -0
- package/plugins/sync-docs/lib/enhance/prompt-analyzer.js +457 -0
- package/plugins/sync-docs/lib/enhance/prompt-patterns.js +1484 -0
- package/plugins/sync-docs/lib/enhance/reporter.js +1348 -0
- package/plugins/sync-docs/lib/enhance/security-patterns.js +284 -0
- package/plugins/sync-docs/lib/enhance/skill-analyzer.js +182 -0
- package/plugins/sync-docs/lib/enhance/skill-patterns.js +147 -0
- package/plugins/sync-docs/lib/enhance/suppression.js +352 -0
- package/plugins/sync-docs/lib/enhance/tool-patterns.js +373 -0
- package/plugins/sync-docs/lib/index.js +270 -0
- package/plugins/sync-docs/lib/patterns/cli-enhancers.js +611 -0
- package/plugins/sync-docs/lib/patterns/pipeline.js +948 -0
- package/plugins/sync-docs/lib/patterns/review-patterns.js +558 -0
- package/plugins/sync-docs/lib/patterns/slop-analyzers.js +2305 -0
- package/plugins/sync-docs/lib/patterns/slop-patterns.js +1187 -0
- package/plugins/sync-docs/lib/perf/analyzer/index.js +22 -0
- package/plugins/sync-docs/lib/perf/argument-parser.js +105 -0
- package/plugins/sync-docs/lib/perf/baseline-comparator.js +50 -0
- package/plugins/sync-docs/lib/perf/baseline-store.js +127 -0
- package/plugins/sync-docs/lib/perf/benchmark-runner.js +399 -0
- package/plugins/sync-docs/lib/perf/breaking-point-finder.js +52 -0
- package/plugins/sync-docs/lib/perf/breaking-point-runner.js +60 -0
- package/plugins/sync-docs/lib/perf/checkpoint.js +123 -0
- package/plugins/sync-docs/lib/perf/code-paths.js +86 -0
- package/plugins/sync-docs/lib/perf/consolidation.js +37 -0
- package/plugins/sync-docs/lib/perf/constraint-runner.js +71 -0
- package/plugins/sync-docs/lib/perf/experiment-runner.js +32 -0
- package/plugins/sync-docs/lib/perf/index.js +41 -0
- package/plugins/sync-docs/lib/perf/investigation-state.js +875 -0
- package/plugins/sync-docs/lib/perf/optimization-runner.js +79 -0
- package/plugins/sync-docs/lib/perf/profilers/go.js +22 -0
- package/plugins/sync-docs/lib/perf/profilers/index.js +46 -0
- package/plugins/sync-docs/lib/perf/profilers/java.js +23 -0
- package/plugins/sync-docs/lib/perf/profilers/node.js +27 -0
- package/plugins/sync-docs/lib/perf/profilers/python.js +23 -0
- package/plugins/sync-docs/lib/perf/profilers/rust.js +23 -0
- package/plugins/sync-docs/lib/perf/profiling-runner.js +56 -0
- package/plugins/sync-docs/lib/perf/schemas.js +140 -0
- package/plugins/sync-docs/lib/platform/detect-platform.js +413 -0
- package/plugins/sync-docs/lib/platform/detection-configs.js +93 -0
- package/plugins/sync-docs/lib/platform/state-dir.js +132 -0
- package/plugins/sync-docs/lib/platform/verify-tools.js +182 -0
- package/plugins/sync-docs/lib/repo-map/cache.js +152 -0
- package/plugins/sync-docs/lib/repo-map/index.js +222 -0
- package/plugins/sync-docs/lib/repo-map/installer.js +212 -0
- package/plugins/sync-docs/lib/repo-map/queries/go.js +27 -0
- package/plugins/sync-docs/lib/repo-map/queries/index.js +100 -0
- package/plugins/sync-docs/lib/repo-map/queries/java.js +38 -0
- package/plugins/sync-docs/lib/repo-map/queries/javascript.js +55 -0
- package/plugins/sync-docs/lib/repo-map/queries/python.js +24 -0
- package/plugins/sync-docs/lib/repo-map/queries/rust.js +73 -0
- package/plugins/sync-docs/lib/repo-map/queries/typescript.js +38 -0
- package/plugins/sync-docs/lib/repo-map/runner.js +1165 -0
- package/plugins/sync-docs/lib/repo-map/updater.js +474 -0
- package/plugins/sync-docs/lib/repo-map/usage-analyzer.js +407 -0
- package/plugins/sync-docs/lib/schemas/plugin-manifest.schema.json +57 -0
- package/plugins/sync-docs/lib/schemas/validator.js +247 -0
- package/plugins/sync-docs/lib/sources/custom-handler.js +199 -0
- package/plugins/sync-docs/lib/sources/policy-questions.js +246 -0
- package/plugins/sync-docs/lib/sources/source-cache.js +165 -0
- package/plugins/sync-docs/lib/state/workflow-state.js +575 -0
- package/plugins/sync-docs/lib/types/agent-frontmatter.d.ts +134 -0
- package/plugins/sync-docs/lib/types/command-frontmatter.d.ts +107 -0
- package/plugins/sync-docs/lib/types/hook-frontmatter.d.ts +115 -0
- package/plugins/sync-docs/lib/types/index.d.ts +84 -0
- package/plugins/sync-docs/lib/types/plugin-manifest.d.ts +102 -0
- package/plugins/sync-docs/lib/types/skill-frontmatter.d.ts +89 -0
- package/plugins/sync-docs/lib/utils/atomic-write.js +94 -0
- package/plugins/sync-docs/lib/utils/cache-manager.js +159 -0
- package/plugins/sync-docs/lib/utils/context-optimizer.js +300 -0
- package/plugins/sync-docs/lib/utils/deprecation.js +37 -0
- package/plugins/sync-docs/lib/utils/shell-escape.js +88 -0
- package/plugins/sync-docs/skills/sync-docs/SKILL.md +351 -0
- package/scripts/bump-version.js +92 -0
- package/scripts/check-hardcoded-paths.js +199 -0
- package/scripts/dev-install.js +493 -0
- package/scripts/expand-templates.js +269 -0
- package/scripts/gen-adapters.js +323 -0
- package/scripts/generate-docs.js +558 -0
- package/scripts/generate-plugin-list.js +20 -0
- package/scripts/migrate-opencode.js +307 -0
- package/scripts/perf/repo-map-create.js +46 -0
- package/scripts/plugins.txt +12 -0
- package/scripts/preflight.js +1263 -0
- package/scripts/scaffold.js +490 -0
- package/scripts/setup-hooks.js +169 -0
- package/scripts/stamp-version.js +175 -0
- package/scripts/test-transform.js +85 -0
- package/scripts/validate-agent-skill-compliance.js +284 -0
- package/scripts/validate-counts.js +457 -0
- package/scripts/validate-cross-platform-docs.js +550 -0
- package/scripts/validate-opencode-install.js +182 -0
- package/site/assets/css/main.css +1525 -0
- package/site/assets/css/tokens.css +493 -0
- package/site/assets/favicon.svg +23 -0
- package/site/assets/js/main.js +801 -0
- package/site/assets/logo.png +0 -0
- package/site/assets/og-image.html +163 -0
- package/site/content.json +453 -0
- package/site/index.html +698 -0
- package/site/ux-spec.md +683 -0
- package/site/version.json +5 -0
- package/templates/agent-snippets/enhance-integration-points.md +6 -0
- package/templates/agent-snippets/enhance-skill-delegation.md +18 -0
- package/templates/agent-snippets/model-choice.md +6 -0
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-coverage-checker
|
|
3
|
+
description: Validate test coverage quality for new code. Use this agent before the first review round to verify tests exist, are meaningful, and actually exercise the new code (not just path matching).
|
|
4
|
+
tools:
|
|
5
|
+
- Bash(git:*)
|
|
6
|
+
- Read
|
|
7
|
+
- Grep
|
|
8
|
+
- Glob
|
|
9
|
+
model: sonnet
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Test Coverage Checker Agent
|
|
13
|
+
|
|
14
|
+
Validate that new work has appropriate, meaningful test coverage.
|
|
15
|
+
This is an advisory agent - it reports coverage gaps but does NOT block the workflow.
|
|
16
|
+
|
|
17
|
+
**Important**: This agent validates test QUALITY, not just test EXISTENCE. A test file
|
|
18
|
+
that exists but doesn't meaningfully exercise the new code is flagged as a gap.
|
|
19
|
+
|
|
20
|
+
## Scope
|
|
21
|
+
|
|
22
|
+
Analyze files in: `git diff --name-only origin/main..HEAD`
|
|
23
|
+
|
|
24
|
+
## Phase 1: Get Changed Files
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Get base branch
|
|
28
|
+
BASE_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo "main")
|
|
29
|
+
|
|
30
|
+
# Get changed source files (exclude test files)
|
|
31
|
+
CHANGED_SOURCE=$(git diff --name-only origin/${BASE_BRANCH}..HEAD 2>/dev/null | \
|
|
32
|
+
grep -E '\.(js|ts|jsx|tsx|py|rs|go|rb|java|kt|swift|cpp|c|cs)$' | \
|
|
33
|
+
grep -v -E '(test|spec|_test|Test)\.')
|
|
34
|
+
|
|
35
|
+
# Get changed test files
|
|
36
|
+
CHANGED_TESTS=$(git diff --name-only origin/${BASE_BRANCH}..HEAD 2>/dev/null | \
|
|
37
|
+
grep -E '(test|spec|_test|Test)\.')
|
|
38
|
+
|
|
39
|
+
echo "SOURCE_FILES=$CHANGED_SOURCE"
|
|
40
|
+
echo "TEST_FILES=$CHANGED_TESTS"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Phase 2: Detect Test Conventions
|
|
44
|
+
|
|
45
|
+
Detect the project's test file naming convention:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Check for common test patterns
|
|
49
|
+
if ls tests/ 2>/dev/null | head -1; then
|
|
50
|
+
echo "TEST_DIR=tests"
|
|
51
|
+
elif ls __tests__/ 2>/dev/null | head -1; then
|
|
52
|
+
echo "TEST_DIR=__tests__"
|
|
53
|
+
elif ls test/ 2>/dev/null | head -1; then
|
|
54
|
+
echo "TEST_DIR=test"
|
|
55
|
+
elif ls spec/ 2>/dev/null | head -1; then
|
|
56
|
+
echo "TEST_DIR=spec"
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
# Check naming convention
|
|
60
|
+
if ls **/*.test.* 2>/dev/null | head -1; then
|
|
61
|
+
echo "TEST_PATTERN=.test."
|
|
62
|
+
elif ls **/*.spec.* 2>/dev/null | head -1; then
|
|
63
|
+
echo "TEST_PATTERN=.spec."
|
|
64
|
+
elif ls **/test_*.* 2>/dev/null | head -1; then
|
|
65
|
+
echo "TEST_PATTERN=test_"
|
|
66
|
+
fi
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Phase 3: Map Source to Test Files
|
|
70
|
+
|
|
71
|
+
For each source file, find corresponding test file:
|
|
72
|
+
|
|
73
|
+
```javascript
|
|
74
|
+
const testMappings = {
|
|
75
|
+
// JavaScript/TypeScript patterns
|
|
76
|
+
'src/foo.ts': ['tests/foo.test.ts', '__tests__/foo.test.ts', 'src/foo.test.ts', 'src/__tests__/foo.test.ts'],
|
|
77
|
+
'lib/bar.js': ['tests/bar.test.js', 'lib/bar.test.js', 'test/bar.test.js'],
|
|
78
|
+
|
|
79
|
+
// Python patterns
|
|
80
|
+
'src/module.py': ['tests/test_module.py', 'test/test_module.py', 'src/test_module.py'],
|
|
81
|
+
|
|
82
|
+
// Rust patterns
|
|
83
|
+
'src/lib.rs': ['tests/lib_test.rs', 'src/lib_tests.rs'],
|
|
84
|
+
|
|
85
|
+
// Go patterns
|
|
86
|
+
'pkg/handler.go': ['pkg/handler_test.go']
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
function findTestFile(sourceFile) {
|
|
90
|
+
const basename = sourceFile.split('/').pop().replace(/\.[^.]+$/, '');
|
|
91
|
+
const dir = sourceFile.split('/').slice(0, -1).join('/');
|
|
92
|
+
const ext = sourceFile.split('.').pop();
|
|
93
|
+
|
|
94
|
+
// Generate possible test file locations
|
|
95
|
+
const candidates = [
|
|
96
|
+
`tests/${basename}.test.${ext}`,
|
|
97
|
+
`tests/${basename}.spec.${ext}`,
|
|
98
|
+
`test/${basename}.test.${ext}`,
|
|
99
|
+
`__tests__/${basename}.test.${ext}`,
|
|
100
|
+
`${dir}/${basename}.test.${ext}`,
|
|
101
|
+
`${dir}/${basename}.spec.${ext}`,
|
|
102
|
+
`${dir}/__tests__/${basename}.test.${ext}`,
|
|
103
|
+
// Python style
|
|
104
|
+
`tests/test_${basename}.${ext}`,
|
|
105
|
+
`test/test_${basename}.${ext}`,
|
|
106
|
+
// Go style (test in same dir)
|
|
107
|
+
`${dir}/${basename}_test.${ext}`
|
|
108
|
+
];
|
|
109
|
+
|
|
110
|
+
return candidates;
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Phase 4: Check Coverage
|
|
115
|
+
|
|
116
|
+
For each changed source file:
|
|
117
|
+
1. Find corresponding test file
|
|
118
|
+
2. Check if test file exists
|
|
119
|
+
3. If source modified, check if test was also modified
|
|
120
|
+
4. Analyze new functions/classes for test coverage
|
|
121
|
+
|
|
122
|
+
```javascript
|
|
123
|
+
const gaps = [];
|
|
124
|
+
const covered = [];
|
|
125
|
+
|
|
126
|
+
for (const sourceFile of changedSourceFiles) {
|
|
127
|
+
const testCandidates = findTestFile(sourceFile);
|
|
128
|
+
const existingTest = testCandidates.find(t => fileExists(t));
|
|
129
|
+
|
|
130
|
+
if (!existingTest) {
|
|
131
|
+
gaps.push({
|
|
132
|
+
file: sourceFile,
|
|
133
|
+
reason: 'No test file found',
|
|
134
|
+
candidates: testCandidates.slice(0, 3)
|
|
135
|
+
});
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Check if test was updated along with source
|
|
140
|
+
const testModified = changedTestFiles.includes(existingTest);
|
|
141
|
+
|
|
142
|
+
if (!testModified) {
|
|
143
|
+
gaps.push({
|
|
144
|
+
file: sourceFile,
|
|
145
|
+
reason: 'Source modified but test file not updated',
|
|
146
|
+
testFile: existingTest
|
|
147
|
+
});
|
|
148
|
+
} else {
|
|
149
|
+
covered.push({
|
|
150
|
+
file: sourceFile,
|
|
151
|
+
testFile: existingTest
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Phase 5: Analyze New Exports
|
|
158
|
+
|
|
159
|
+
Check for new functions/classes that might need tests:
|
|
160
|
+
|
|
161
|
+
```javascript
|
|
162
|
+
async function findNewExports(file) {
|
|
163
|
+
// Get diff for the file
|
|
164
|
+
const diff = await exec(`git diff origin/${BASE_BRANCH}..HEAD -- ${file}`);
|
|
165
|
+
|
|
166
|
+
// Find added function/class declarations
|
|
167
|
+
const newExports = [];
|
|
168
|
+
const patterns = [
|
|
169
|
+
/^\+\s*export\s+(function|const|class|async function)\s+(\w+)/gm,
|
|
170
|
+
/^\+\s*export\s+default\s+(function|class)\s*(\w*)/gm,
|
|
171
|
+
/^\+\s*module\.exports\s*=\s*\{([^}]+)\}/gm,
|
|
172
|
+
/^\+\s*def\s+(\w+)\(/gm, // Python
|
|
173
|
+
/^\+\s*pub\s+fn\s+(\w+)/gm, // Rust
|
|
174
|
+
/^\+\s*func\s+(\w+)/gm // Go
|
|
175
|
+
];
|
|
176
|
+
|
|
177
|
+
for (const pattern of patterns) {
|
|
178
|
+
let match;
|
|
179
|
+
while ((match = pattern.exec(diff)) !== null) {
|
|
180
|
+
newExports.push(match[2] || match[1]);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return newExports;
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Phase 6: Validate Test Quality
|
|
189
|
+
|
|
190
|
+
**Critical**: Don't just check if test files exist - verify tests actually exercise the new code.
|
|
191
|
+
|
|
192
|
+
```javascript
|
|
193
|
+
async function validateTestQuality(sourceFile, testFile, newExports) {
|
|
194
|
+
const testContent = await readFile(testFile);
|
|
195
|
+
const sourceContent = await readFile(sourceFile);
|
|
196
|
+
const issues = [];
|
|
197
|
+
|
|
198
|
+
// 1. Check if new exports are actually tested
|
|
199
|
+
for (const exportName of newExports) {
|
|
200
|
+
const testMentions = testContent.match(new RegExp(exportName, 'g'));
|
|
201
|
+
if (!testMentions || testMentions.length === 0) {
|
|
202
|
+
issues.push({
|
|
203
|
+
type: 'untested-export',
|
|
204
|
+
export: exportName,
|
|
205
|
+
message: `New export '${exportName}' is not referenced in test file`
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// 2. Check for meaningful assertions (not just trivial tests)
|
|
211
|
+
const trivialPatterns = [
|
|
212
|
+
/expect\s*\(\s*true\s*\)/,
|
|
213
|
+
/expect\s*\(\s*1\s*\)\s*\.toBe\s*\(\s*1\s*\)/,
|
|
214
|
+
/assert\s*\(\s*True\s*\)/,
|
|
215
|
+
/\.toBeDefined\s*\(\s*\)/ // Only toBeDefined without other checks
|
|
216
|
+
];
|
|
217
|
+
|
|
218
|
+
for (const pattern of trivialPatterns) {
|
|
219
|
+
if (pattern.test(testContent)) {
|
|
220
|
+
issues.push({
|
|
221
|
+
type: 'trivial-assertion',
|
|
222
|
+
message: 'Test contains trivial assertions that don\'t validate behavior'
|
|
223
|
+
});
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// 3. Check test describes/its match the source functionality
|
|
229
|
+
const describeTitles = testContent.match(/describe\s*\(\s*['"`]([^'"`]+)['"`]/g) || [];
|
|
230
|
+
const itTitles = testContent.match(/it\s*\(\s*['"`]([^'"`]+)['"`]/g) || [];
|
|
231
|
+
|
|
232
|
+
if (describeTitles.length === 0 && itTitles.length === 0) {
|
|
233
|
+
issues.push({
|
|
234
|
+
type: 'no-test-structure',
|
|
235
|
+
message: 'Test file lacks describe/it blocks - may not be a real test'
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// 4. Check for edge case coverage hints
|
|
240
|
+
const edgeCasePatterns = ['null', 'undefined', 'empty', 'error', 'invalid', 'edge', 'boundary'];
|
|
241
|
+
const hasEdgeCases = edgeCasePatterns.some(p => testContent.toLowerCase().includes(p));
|
|
242
|
+
|
|
243
|
+
if (!hasEdgeCases && newExports.length > 0) {
|
|
244
|
+
issues.push({
|
|
245
|
+
type: 'missing-edge-cases',
|
|
246
|
+
message: 'Tests may lack edge case coverage (no null/error/boundary tests detected)',
|
|
247
|
+
severity: 'warning'
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// 5. Check if test actually imports/requires the source
|
|
252
|
+
const sourceBasename = sourceFile.split('/').pop().replace(/\.[^.]+$/, '');
|
|
253
|
+
const importPatterns = [
|
|
254
|
+
new RegExp(`from\\s+['"][^'"]*${sourceBasename}['"]`),
|
|
255
|
+
new RegExp(`require\\s*\\(\\s*['"][^'"]*${sourceBasename}['"]`),
|
|
256
|
+
new RegExp(`import\\s+.*${sourceBasename}`)
|
|
257
|
+
];
|
|
258
|
+
|
|
259
|
+
const importsSource = importPatterns.some(p => p.test(testContent));
|
|
260
|
+
if (!importsSource) {
|
|
261
|
+
issues.push({
|
|
262
|
+
type: 'no-source-import',
|
|
263
|
+
message: `Test file doesn't appear to import '${sourceBasename}'`,
|
|
264
|
+
severity: 'critical'
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
return {
|
|
269
|
+
testFile,
|
|
270
|
+
sourceFile,
|
|
271
|
+
quality: issues.length === 0 ? 'good' : issues.some(i => i.severity === 'critical') ? 'poor' : 'needs-improvement',
|
|
272
|
+
issues
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
## Phase 7: Analyze Test Coverage Depth
|
|
278
|
+
|
|
279
|
+
Check if tests cover the actual logic paths in the new code:
|
|
280
|
+
|
|
281
|
+
```javascript
|
|
282
|
+
async function analyzeTestDepth(sourceFile, testFile, diff) {
|
|
283
|
+
const analysis = {
|
|
284
|
+
sourceComplexity: 'unknown',
|
|
285
|
+
testCoverage: 'unknown',
|
|
286
|
+
suggestions: []
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
// Extract conditionals and branches from new code
|
|
290
|
+
const newBranches = [];
|
|
291
|
+
const branchPatterns = [
|
|
292
|
+
/^\+.*if\s*\(/gm,
|
|
293
|
+
/^\+.*else\s*\{/gm,
|
|
294
|
+
/^\+.*\?\s*.*:/gm, // Ternary
|
|
295
|
+
/^\+.*switch\s*\(/gm,
|
|
296
|
+
/^\+.*case\s+/gm,
|
|
297
|
+
/^\+.*catch\s*\(/gm
|
|
298
|
+
];
|
|
299
|
+
|
|
300
|
+
for (const pattern of branchPatterns) {
|
|
301
|
+
const matches = diff.match(pattern) || [];
|
|
302
|
+
newBranches.push(...matches);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
if (newBranches.length > 3) {
|
|
306
|
+
analysis.sourceComplexity = 'high';
|
|
307
|
+
analysis.suggestions.push('New code has multiple branches - ensure each path is tested');
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// Check for async/await patterns that need error testing
|
|
311
|
+
const hasAsync = /^\+.*async\s+|^\+.*await\s+/m.test(diff);
|
|
312
|
+
if (hasAsync) {
|
|
313
|
+
const testContent = await readFile(testFile);
|
|
314
|
+
const hasAsyncTests = /\.rejects|\.resolves|async.*expect|try.*catch.*expect/i.test(testContent);
|
|
315
|
+
|
|
316
|
+
if (!hasAsyncTests) {
|
|
317
|
+
analysis.suggestions.push('New async code detected - add tests for promise rejection scenarios');
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
return analysis;
|
|
322
|
+
}
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
## Output Format (JSON)
|
|
326
|
+
|
|
327
|
+
```json
|
|
328
|
+
{
|
|
329
|
+
"scope": "new-work-only",
|
|
330
|
+
"coverage": {
|
|
331
|
+
"filesAnalyzed": 5,
|
|
332
|
+
"filesWithTests": 3,
|
|
333
|
+
"filesMissingTests": 2,
|
|
334
|
+
"coveragePercent": 60
|
|
335
|
+
},
|
|
336
|
+
"gaps": [
|
|
337
|
+
{
|
|
338
|
+
"file": "src/new-feature.ts",
|
|
339
|
+
"reason": "No test file found",
|
|
340
|
+
"candidates": ["tests/new-feature.test.ts", "__tests__/new-feature.test.ts"],
|
|
341
|
+
"newExports": ["handleFeature", "FeatureConfig"]
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"file": "src/modified.ts",
|
|
345
|
+
"reason": "Source modified but test file not updated",
|
|
346
|
+
"testFile": "tests/modified.test.ts",
|
|
347
|
+
"newExports": ["newFunction"]
|
|
348
|
+
}
|
|
349
|
+
],
|
|
350
|
+
"qualityIssues": [
|
|
351
|
+
{
|
|
352
|
+
"file": "src/api-client.ts",
|
|
353
|
+
"testFile": "tests/api-client.test.ts",
|
|
354
|
+
"quality": "needs-improvement",
|
|
355
|
+
"issues": [
|
|
356
|
+
{
|
|
357
|
+
"type": "untested-export",
|
|
358
|
+
"export": "handleRetry",
|
|
359
|
+
"message": "New export 'handleRetry' is not referenced in test file"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"type": "missing-edge-cases",
|
|
363
|
+
"message": "Tests may lack edge case coverage",
|
|
364
|
+
"severity": "warning"
|
|
365
|
+
}
|
|
366
|
+
],
|
|
367
|
+
"suggestions": ["New async code detected - add tests for promise rejection scenarios"]
|
|
368
|
+
}
|
|
369
|
+
],
|
|
370
|
+
"covered": [
|
|
371
|
+
{
|
|
372
|
+
"file": "src/utils.ts",
|
|
373
|
+
"testFile": "tests/utils.test.ts",
|
|
374
|
+
"quality": "good"
|
|
375
|
+
}
|
|
376
|
+
],
|
|
377
|
+
"summary": {
|
|
378
|
+
"status": "quality-issues-found",
|
|
379
|
+
"recommendation": "2 files missing tests, 1 file has tests but doesn't exercise new code"
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
## Report Output
|
|
385
|
+
|
|
386
|
+
```markdown
|
|
387
|
+
## Test Coverage Report
|
|
388
|
+
|
|
389
|
+
### Summary
|
|
390
|
+
| Metric | Value |
|
|
391
|
+
|--------|-------|
|
|
392
|
+
| Files Analyzed | ${filesAnalyzed} |
|
|
393
|
+
| Files with Tests | ${filesWithTests} |
|
|
394
|
+
| Files Missing Tests | ${filesMissingTests} |
|
|
395
|
+
| Tests with Quality Issues | ${qualityIssues.length} |
|
|
396
|
+
| Effective Coverage | ${effectiveCoveragePercent}% |
|
|
397
|
+
|
|
398
|
+
### Missing Test Files
|
|
399
|
+
${gaps.map(g => `
|
|
400
|
+
**${g.file}**
|
|
401
|
+
- Reason: ${g.reason}
|
|
402
|
+
- New exports: ${g.newExports?.join(', ') || 'N/A'}
|
|
403
|
+
${g.candidates ? `- Suggested test location: ${g.candidates[0]}` : ''}
|
|
404
|
+
`).join('\n')}
|
|
405
|
+
|
|
406
|
+
### Test Quality Issues
|
|
407
|
+
${qualityIssues.map(q => `
|
|
408
|
+
**${q.file}** → ${q.testFile} (Quality: ${q.quality})
|
|
409
|
+
${q.issues.map(i => `- [WARN] ${i.message}`).join('\n')}
|
|
410
|
+
${q.suggestions?.map(s => `- [TIP] ${s}`).join('\n') || ''}
|
|
411
|
+
`).join('\n')}
|
|
412
|
+
|
|
413
|
+
### Well-Covered Files
|
|
414
|
+
${covered.filter(c => c.quality === 'good').map(c => `- [OK] ${c.file} -> ${c.testFile}`).join('\n')}
|
|
415
|
+
|
|
416
|
+
### Recommendation
|
|
417
|
+
${summary.recommendation}
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
## Behavior
|
|
421
|
+
|
|
422
|
+
- **Advisory only** - Does NOT block workflow
|
|
423
|
+
- Reports coverage gaps to Phase 9 review loop
|
|
424
|
+
- Suggestions included in PR description
|
|
425
|
+
- Implementation-agent may optionally add tests based on findings
|
|
426
|
+
|
|
427
|
+
## Integration Points
|
|
428
|
+
|
|
429
|
+
This agent is called:
|
|
430
|
+
1. **Before first review round** - In parallel with deslop:deslop-agent
|
|
431
|
+
2. Results passed to Phase 9 review loop for context
|
|
432
|
+
|
|
433
|
+
## Success Criteria
|
|
434
|
+
|
|
435
|
+
- Correctly identifies test file conventions
|
|
436
|
+
- Maps source files to test files
|
|
437
|
+
- Detects new exports that need testing
|
|
438
|
+
- **Validates tests actually exercise the new code** (not just path matching)
|
|
439
|
+
- **Flags trivial or meaningless tests** (e.g., `expect(true).toBe(true)`)
|
|
440
|
+
- **Checks for edge case coverage** in tests
|
|
441
|
+
- **Verifies tests import the source file** they claim to test
|
|
442
|
+
- Provides actionable recommendations
|
|
443
|
+
- Does NOT block workflow on missing tests
|
|
444
|
+
|
|
445
|
+
## Model Choice: Sonnet
|
|
446
|
+
|
|
447
|
+
This agent uses **sonnet** because:
|
|
448
|
+
- Test quality validation requires understanding code relationships
|
|
449
|
+
- Pattern detection needs more than simple matching
|
|
450
|
+
- Analyzing test meaningfulness requires moderate reasoning
|
|
451
|
+
- Advisory role means occasional misses are acceptable
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: worktree-manager
|
|
3
|
+
description: Create and manage git worktrees for isolated task development. Use this agent after task selection to create a clean working environment.
|
|
4
|
+
tools:
|
|
5
|
+
- Bash(git:*)
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
model: haiku
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Worktree Manager Agent
|
|
12
|
+
|
|
13
|
+
You manage git worktrees to provide isolated development environments for each task.
|
|
14
|
+
This prevents work-in-progress from polluting the main working directory.
|
|
15
|
+
|
|
16
|
+
## Phase 1: Pre-flight Checks
|
|
17
|
+
|
|
18
|
+
Verify git is available and check current status:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Verify git
|
|
22
|
+
git --version || { echo "ERROR: git not available"; exit 1; }
|
|
23
|
+
|
|
24
|
+
# Check if already in a worktree
|
|
25
|
+
CURRENT_DIR=$(pwd)
|
|
26
|
+
MAIN_WORKTREE=$(git worktree list --porcelain | head -1 | cut -d' ' -f2)
|
|
27
|
+
|
|
28
|
+
if [ "$CURRENT_DIR" != "$MAIN_WORKTREE" ]; then
|
|
29
|
+
echo "WARNING: Already in a worktree at $CURRENT_DIR"
|
|
30
|
+
echo "ALREADY_IN_WORKTREE=true"
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
# Get current branch
|
|
34
|
+
ORIGINAL_BRANCH=$(git branch --show-current)
|
|
35
|
+
echo "ORIGINAL_BRANCH=$ORIGINAL_BRANCH"
|
|
36
|
+
|
|
37
|
+
# Check for uncommitted changes
|
|
38
|
+
if [ -n "$(git status --porcelain)" ]; then
|
|
39
|
+
echo "HAS_UNCOMMITTED_CHANGES=true"
|
|
40
|
+
git status --short
|
|
41
|
+
fi
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Phase 2: Generate Worktree Path
|
|
45
|
+
|
|
46
|
+
Create a slug from the task title and generate paths:
|
|
47
|
+
|
|
48
|
+
```javascript
|
|
49
|
+
function generateWorktreePath(task) {
|
|
50
|
+
// Create slug from task title
|
|
51
|
+
const slug = task.title
|
|
52
|
+
.toLowerCase()
|
|
53
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
54
|
+
.replace(/^-|-$/g, '')
|
|
55
|
+
.substring(0, 40); // Limit slug length for filesystem compatibility
|
|
56
|
+
|
|
57
|
+
// Include task ID for uniqueness
|
|
58
|
+
const fullSlug = task.id ? `${slug}-${task.id}` : slug;
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
slug: fullSlug,
|
|
62
|
+
branchName: `feature/${fullSlug}`,
|
|
63
|
+
worktreePath: `../worktrees/${fullSlug}`
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Phase 3: Check for Existing Worktree
|
|
69
|
+
|
|
70
|
+
Check if worktree already exists (for resume scenarios):
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
WORKTREE_PATH="../worktrees/${SLUG}"
|
|
74
|
+
BRANCH_NAME="feature/${SLUG}"
|
|
75
|
+
|
|
76
|
+
# Check if worktree exists
|
|
77
|
+
if git worktree list | grep -q "$WORKTREE_PATH"; then
|
|
78
|
+
echo "WORKTREE_EXISTS=true"
|
|
79
|
+
echo "Worktree already exists at $WORKTREE_PATH"
|
|
80
|
+
fi
|
|
81
|
+
|
|
82
|
+
# Check if branch exists
|
|
83
|
+
if git branch --list "$BRANCH_NAME" | grep -q "$BRANCH_NAME"; then
|
|
84
|
+
echo "BRANCH_EXISTS=true"
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
# Check remote branch
|
|
88
|
+
if git ls-remote --heads origin "$BRANCH_NAME" | grep -q "$BRANCH_NAME"; then
|
|
89
|
+
echo "REMOTE_BRANCH_EXISTS=true"
|
|
90
|
+
fi
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Phase 4: Handle Uncommitted Changes
|
|
94
|
+
|
|
95
|
+
If there are uncommitted changes, handle them:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
if [ "$HAS_UNCOMMITTED_CHANGES" = "true" ]; then
|
|
99
|
+
echo "Stashing uncommitted changes..."
|
|
100
|
+
git stash push -m "Auto-stash before worktree creation for task ${TASK_ID}"
|
|
101
|
+
STASH_CREATED="true"
|
|
102
|
+
fi
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Phase 5: Create Worktree
|
|
106
|
+
|
|
107
|
+
Create the worktree with a new feature branch:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Ensure worktrees directory exists
|
|
111
|
+
mkdir -p ../worktrees
|
|
112
|
+
|
|
113
|
+
# Create worktree with new branch
|
|
114
|
+
if [ "$WORKTREE_EXISTS" = "true" ]; then
|
|
115
|
+
echo "Using existing worktree at $WORKTREE_PATH"
|
|
116
|
+
else
|
|
117
|
+
if [ "$BRANCH_EXISTS" = "true" ]; then
|
|
118
|
+
# Branch exists, create worktree from it
|
|
119
|
+
git worktree add "$WORKTREE_PATH" "$BRANCH_NAME"
|
|
120
|
+
elif [ "$REMOTE_BRANCH_EXISTS" = "true" ]; then
|
|
121
|
+
# Remote branch exists, track it
|
|
122
|
+
git worktree add --track -b "$BRANCH_NAME" "$WORKTREE_PATH" "origin/$BRANCH_NAME"
|
|
123
|
+
else
|
|
124
|
+
# Create new branch from main
|
|
125
|
+
git worktree add -b "$BRANCH_NAME" "$WORKTREE_PATH"
|
|
126
|
+
fi
|
|
127
|
+
|
|
128
|
+
if [ $? -eq 0 ]; then
|
|
129
|
+
echo "[OK] Created worktree at $WORKTREE_PATH"
|
|
130
|
+
echo "[OK] Created branch $BRANCH_NAME"
|
|
131
|
+
else
|
|
132
|
+
echo "ERROR: Failed to create worktree"
|
|
133
|
+
exit 1
|
|
134
|
+
fi
|
|
135
|
+
fi
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Phase 6: Claim Task in Registry
|
|
139
|
+
|
|
140
|
+
Add task to `${STATE_DIR}/tasks.json` to prevent other workflows from claiming it:
|
|
141
|
+
|
|
142
|
+
```javascript
|
|
143
|
+
const fs = require('fs');
|
|
144
|
+
const stateDir = process.env.AI_STATE_DIR || '.claude';
|
|
145
|
+
if (!fs.existsSync(stateDir)) fs.mkdirSync(stateDir, { recursive: true });
|
|
146
|
+
|
|
147
|
+
let registry = fs.existsSync(`${stateDir}/tasks.json`)
|
|
148
|
+
? JSON.parse(fs.readFileSync(`${stateDir}/tasks.json`))
|
|
149
|
+
: { version: '1.0.0', tasks: [] };
|
|
150
|
+
|
|
151
|
+
const entry = {
|
|
152
|
+
id: task.id, source: task.source, title: task.title,
|
|
153
|
+
branch, worktreePath: path.resolve(worktreePath),
|
|
154
|
+
claimedAt: new Date().toISOString(), claimedBy: state.workflow.id,
|
|
155
|
+
status: 'claimed', lastActivityAt: new Date().toISOString()
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
const idx = registry.tasks.findIndex(t => t.id === task.id);
|
|
159
|
+
if (idx >= 0) registry.tasks[idx] = entry;
|
|
160
|
+
else registry.tasks.push(entry);
|
|
161
|
+
|
|
162
|
+
fs.writeFileSync(`${stateDir}/tasks.json`, JSON.stringify(registry, null, 2));
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Phase 7: Anchor PWD to Worktree
|
|
166
|
+
|
|
167
|
+
**Important**: Change to the worktree directory to anchor all subsequent operations.
|
|
168
|
+
|
|
169
|
+
**Note**: The `cd` command within a single Bash call does not persist across separate Bash tool invocations. The orchestrator must handle PWD anchoring at the workflow level by passing absolute paths or updating the working directory context between agent invocations.
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
cd "$WORKTREE_PATH"
|
|
173
|
+
|
|
174
|
+
# Verify we're in the right place
|
|
175
|
+
CURRENT_BRANCH=$(git branch --show-current)
|
|
176
|
+
if [ "$CURRENT_BRANCH" != "$BRANCH_NAME" ]; then
|
|
177
|
+
echo "ERROR: Not on expected branch. Expected $BRANCH_NAME, got $CURRENT_BRANCH"
|
|
178
|
+
exit 1
|
|
179
|
+
fi
|
|
180
|
+
|
|
181
|
+
echo "[OK] Working directory anchored to: $(pwd)"
|
|
182
|
+
echo "[OK] On branch: $CURRENT_BRANCH"
|
|
183
|
+
# Note: Orchestrator must use this path for subsequent operations
|
|
184
|
+
echo "WORKTREE_ABSOLUTE_PATH=$(pwd)"
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Phase 8: Create Worktree Status File
|
|
188
|
+
|
|
189
|
+
Create `${STATE_DIR}/workflow-status.json` with task, workflow, git info, and resume state.
|
|
190
|
+
|
|
191
|
+
Key fields: `task` (id, source, title), `workflow` (id, status, currentPhase), `git` (branch, baseSha, mainRepoPath), `resume` (canResume, resumeFromStep).
|
|
192
|
+
|
|
193
|
+
## Phase 9: Update Workflow State
|
|
194
|
+
|
|
195
|
+
Call `workflowState.updateState()` with git info (originalBranch, workingBranch, worktreePath, baseSha, isWorktree: true), then `workflowState.completePhase()`.
|
|
196
|
+
|
|
197
|
+
## Phase 10: Output Summary
|
|
198
|
+
|
|
199
|
+
Report: branch name, worktree path, base commit. Confirm PWD anchored to worktree.
|
|
200
|
+
|
|
201
|
+
## Cleanup Responsibilities
|
|
202
|
+
|
|
203
|
+
| Component | Creates | Cleans Up |
|
|
204
|
+
|-----------|---------|-----------|
|
|
205
|
+
| worktree-manager | worktrees, tasks.json entries, workflow-status.json | Nothing |
|
|
206
|
+
| /ship | - | worktrees (after merge), tasks.json entries |
|
|
207
|
+
| --abort | - | worktrees, tasks.json entries |
|
|
208
|
+
|
|
209
|
+
**Agents MUST NOT**: clean up worktrees, remove tasks from registry, or delete branches.
|
|
210
|
+
|
|
211
|
+
## Cleanup Reference (for /ship and --abort)
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
cleanup_worktree() {
|
|
215
|
+
cd "$ORIGINAL_DIR"
|
|
216
|
+
git worktree remove "$WORKTREE_PATH" --force 2>/dev/null
|
|
217
|
+
git worktree prune
|
|
218
|
+
[ -f "${STATE_DIR}/tasks.json" ] && node -e "
|
|
219
|
+
const fs = require('fs');
|
|
220
|
+
const r = JSON.parse(fs.readFileSync('${STATE_DIR}/tasks.json'));
|
|
221
|
+
r.tasks = r.tasks.filter(t => t.id !== '$TASK_ID');
|
|
222
|
+
fs.writeFileSync('${STATE_DIR}/tasks.json', JSON.stringify(r, null, 2));
|
|
223
|
+
"
|
|
224
|
+
}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## Error Handling
|
|
228
|
+
|
|
229
|
+
On failure: remove partial worktree, prune refs, update state with `failPhase()`, exit 1.
|
|
230
|
+
|
|
231
|
+
## Success Criteria
|
|
232
|
+
|
|
233
|
+
- **Task claimed in main repo's tasks.json** (prevents collisions)
|
|
234
|
+
- Worktree created at `../worktrees/{task-slug}`
|
|
235
|
+
- Feature branch created: `feature/{task-slug}`
|
|
236
|
+
- **workflow-status.json created in worktree** (for resume capability)
|
|
237
|
+
- PWD anchored to worktree directory
|
|
238
|
+
- Workflow state updated with git info
|
|
239
|
+
- Phase advanced to exploration
|
|
240
|
+
|
|
241
|
+
## Constraints
|
|
242
|
+
|
|
243
|
+
- Only create worktrees - never delete them (cleanup is handled by /ship or --abort)
|
|
244
|
+
- Do not remove tasks from tasks.json registry
|
|
245
|
+
- Do not delete branches
|
|
246
|
+
- Do not modify files in the main repository after switching to worktree
|
|
247
|
+
- Always claim tasks in registry before creating worktree
|
|
248
|
+
- Always create workflow-status.json in the new worktree
|
|
249
|
+
- Do not proceed if uncommitted changes exist without stashing first
|
|
250
|
+
|
|
251
|
+
## Model Choice: Haiku
|
|
252
|
+
|
|
253
|
+
This agent uses **haiku** because:
|
|
254
|
+
- Executes scripted git commands (deterministic)
|
|
255
|
+
- No complex reasoning about code or architecture
|
|
256
|
+
- Simple string manipulation for slugs/paths
|
|
257
|
+
- Fast execution for setup operations
|