pi-dev-team 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/PORTING.md +134 -0
- package/README.md +207 -0
- package/UPSTREAM.json +64 -0
- package/agents/Explore.md +15 -0
- package/agents/a11y-review.md +118 -0
- package/agents/adr-author.md +70 -0
- package/agents/ai-provenance-review.md +120 -0
- package/agents/angular-reactivity-review.md +95 -0
- package/agents/arch-review.md +135 -0
- package/agents/architect.md +78 -0
- package/agents/autoship-batch-proposer.md +69 -0
- package/agents/claude-setup-review.md +136 -0
- package/agents/codebase-recon.md +184 -0
- package/agents/component-architecture-review.md +119 -0
- package/agents/concurrency-review.md +109 -0
- package/agents/correctness-review.md +290 -0
- package/agents/data-flow-tracer.md +120 -0
- package/agents/doc-review.md +165 -0
- package/agents/domain-review.md +136 -0
- package/agents/general-purpose.md +10 -0
- package/agents/gherkin-quality-critic.md +113 -0
- package/agents/js-fp-review.md +114 -0
- package/agents/mutation-kill.md +684 -0
- package/agents/naming-review.md +142 -0
- package/agents/orchestrator.md +339 -0
- package/agents/performance-review.md +105 -0
- package/agents/plan-review-acceptance.md +115 -0
- package/agents/plan-review-design.md +90 -0
- package/agents/plan-review-parallelization.md +84 -0
- package/agents/plan-review-strategic.md +96 -0
- package/agents/plan-review-ux.md +110 -0
- package/agents/platform-engineer.md +64 -0
- package/agents/product-manager.md +68 -0
- package/agents/progress-guardian.md +79 -0
- package/agents/qa-engineer.md +289 -0
- package/agents/quality-reviewer.md +132 -0
- package/agents/react-reactivity-review.md +102 -0
- package/agents/refactor-opportunity-review.md +128 -0
- package/agents/security-engineer.md +60 -0
- package/agents/security-review.md +218 -0
- package/agents/session-analysis.md +95 -0
- package/agents/software-engineer.md +105 -0
- package/agents/spec-compliance-review.md +100 -0
- package/agents/spec-reviewer.md +114 -0
- package/agents/structure-review.md +146 -0
- package/agents/tech-writer.md +84 -0
- package/agents/test-review.md +246 -0
- package/agents/test-smell-review.md +188 -0
- package/agents/token-efficiency-review.md +139 -0
- package/agents/ui-ux-designer.md +54 -0
- package/agents/vue-reactivity-review.md +95 -0
- package/bin/__pycache__/claudecpython-314.pyc +0 -0
- package/bin/claude +258 -0
- package/docs/upstream/.pages +1 -0
- package/docs/upstream/CHANGELOG.md +2586 -0
- package/docs/upstream/README.md +155 -0
- package/docs/upstream/agent-architecture.md +214 -0
- package/docs/upstream/agent_info.md +187 -0
- package/docs/upstream/artifact-migration.md +124 -0
- package/docs/upstream/code-intelligence-nudge.md +149 -0
- package/docs/upstream/code-review-process.md +294 -0
- package/docs/upstream/concurrent-use.md +73 -0
- package/docs/upstream/context-management.md +111 -0
- package/docs/upstream/developer-notes.md +280 -0
- package/docs/upstream/diagrams/architecture-overview.svg +101 -0
- package/docs/upstream/diagrams/review-dispatch.svg +139 -0
- package/docs/upstream/diagrams/team-agents.svg +128 -0
- package/docs/upstream/diagrams/test-improve-flow.svg +166 -0
- package/docs/upstream/diagrams/workflow-linear.svg +66 -0
- package/docs/upstream/diagrams/workflow-three-phase.svg +200 -0
- package/docs/upstream/eval-maintenance.md +95 -0
- package/docs/upstream/eval-running-guide.md +147 -0
- package/docs/upstream/eval-system.md +291 -0
- package/docs/upstream/session-review-oss-complements.md +75 -0
- package/docs/upstream/session-review.md +212 -0
- package/docs/upstream/skills.md +188 -0
- package/docs/upstream/team-structure.md +21 -0
- package/docs/upstream/telemetry-ci-access.md +129 -0
- package/docs/upstream/telemetry-repo-security.md +120 -0
- package/docs/upstream/test-evaluation.md +277 -0
- package/docs/upstream/test-improve.md +154 -0
- package/docs/upstream/triage-workflow.md +282 -0
- package/docs/upstream/workflows.md +289 -0
- package/extensions/dev-team/index.ts +539 -0
- package/extensions/dev-team/lib/agents.ts +272 -0
- package/extensions/dev-team/lib/ai-credits.ts +92 -0
- package/extensions/dev-team/lib/autocompact.ts +81 -0
- package/extensions/dev-team/lib/child-run.ts +102 -0
- package/extensions/dev-team/lib/config.ts +236 -0
- package/extensions/dev-team/lib/gh-command.ts +103 -0
- package/extensions/dev-team/lib/github-style.ts +307 -0
- package/extensions/dev-team/lib/hooks.ts +350 -0
- package/extensions/dev-team/lib/metrics.ts +115 -0
- package/extensions/dev-team/lib/safe-read.ts +49 -0
- package/extensions/dev-team/lib/session-files.ts +57 -0
- package/extensions/dev-team/lib/session-spend.ts +123 -0
- package/extensions/dev-team/lib/shell-scan.ts +205 -0
- package/extensions/dev-team/lib/skills.ts +213 -0
- package/extensions/dev-team/lib/subagent-render.ts +245 -0
- package/extensions/dev-team/lib/subagent-types.ts +164 -0
- package/extensions/dev-team/lib/subagent.ts +596 -0
- package/extensions/dev-team/lib/terminal-text.ts +54 -0
- package/extensions/dev-team/lib/tools-misc.ts +152 -0
- package/extensions/dev-team/lib/transcript.ts +110 -0
- package/extensions/dev-team/lib/trust.ts +52 -0
- package/extensions/dev-team/lib/usage-breakdown.ts +176 -0
- package/extensions/dev-team/lib/usage-chart.ts +153 -0
- package/extensions/dev-team/lib/usage-command.ts +107 -0
- package/extensions/dev-team/lib/usage-history.ts +203 -0
- package/extensions/dev-team/lib/usage-render.ts +225 -0
- package/extensions/dev-team/lib/usage-split-bar.ts +127 -0
- package/extensions/dev-team/lib/usage-state.ts +116 -0
- package/extensions/dev-team/lib/usage-text.ts +159 -0
- package/extensions/dev-team/lib/usage-view.ts +109 -0
- package/hooks/__pycache__/refactor_test_freeze_guard.cpython-314.pyc +0 -0
- package/hooks/agent_dispatch_ledger.py +190 -0
- package/hooks/autocompact_setup_nudge.py +99 -0
- package/hooks/bash_retry_guard.py +228 -0
- package/hooks/boundary_events_write_guard.py +352 -0
- package/hooks/code_intelligence_nudge.py +293 -0
- package/hooks/code_intelligence_turn_mark.py +317 -0
- package/hooks/codegraph_bootstrap.py +139 -0
- package/hooks/contract_version_guard.py +362 -0
- package/hooks/cost_meter.py +106 -0
- package/hooks/destructive-commands.json +62 -0
- package/hooks/destructive_guard.py +477 -0
- package/hooks/eval_compliance_check.py +440 -0
- package/hooks/guards.json +17 -0
- package/hooks/hooks.json +323 -0
- package/hooks/internal_double_gate.py +296 -0
- package/hooks/js_fp_review.py +212 -0
- package/hooks/knowledge_index.py +119 -0
- package/hooks/lib/__pycache__/artifact_paths.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/atomic_state.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/autocompact_config.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/boundary_events.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/doc_classification.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/gh_pr_create_detect.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/git_safe_diff.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/instrument_log.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/metrics_query.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/plugin_version.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/pre_commit_doc_classifier.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/review_agent_registry.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/review_gate_corroboration.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/review_gate_hash.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/review_verdicts.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/stdin_json.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/stryker_invocation.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/telemetry_consent.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/test_file_classify.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/token_efficiency_limits.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/verify_guard_state.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/xunit_v3_operator_gate.cpython-314.pyc +0 -0
- package/hooks/lib/agent_skill_hints.py +74 -0
- package/hooks/lib/artifact_paths.py +263 -0
- package/hooks/lib/atomic_state.py +557 -0
- package/hooks/lib/autocompact_config.py +103 -0
- package/hooks/lib/autoship_log.py +106 -0
- package/hooks/lib/banned_scripts_policy.py +51 -0
- package/hooks/lib/boundary_events.py +436 -0
- package/hooks/lib/build_knowledge_index.py +504 -0
- package/hooks/lib/build_skills_index.py +361 -0
- package/hooks/lib/build_state.py +116 -0
- package/hooks/lib/classify_ship_outcome.py +126 -0
- package/hooks/lib/config_changelog_schema.py +115 -0
- package/hooks/lib/cost_meter.py +955 -0
- package/hooks/lib/doc_classification.py +116 -0
- package/hooks/lib/gh_pr_create_detect.py +136 -0
- package/hooks/lib/git_safe_diff.py +123 -0
- package/hooks/lib/instrument_log.py +66 -0
- package/hooks/lib/iteration_journal_gate.py +197 -0
- package/hooks/lib/knowledge_index_paths.py +88 -0
- package/hooks/lib/mcp_json_repowise.py +177 -0
- package/hooks/lib/metrics_query.py +202 -0
- package/hooks/lib/minimal_yaml.py +434 -0
- package/hooks/lib/plugin_version.py +142 -0
- package/hooks/lib/pre_commit_detect.py +537 -0
- package/hooks/lib/pre_commit_doc_classifier.py +126 -0
- package/hooks/lib/pricing.py +118 -0
- package/hooks/lib/report_pdf.py +371 -0
- package/hooks/lib/review_agent_registry.py +142 -0
- package/hooks/lib/review_dispatch_ledger.py +101 -0
- package/hooks/lib/review_gate_corroboration.py +521 -0
- package/hooks/lib/review_gate_hash.py +252 -0
- package/hooks/lib/review_gate_normalized_hash.py +1115 -0
- package/hooks/lib/review_verdicts.py +301 -0
- package/hooks/lib/run_report.py +160 -0
- package/hooks/lib/skill_categories.yaml +125 -0
- package/hooks/lib/stdin_json.py +57 -0
- package/hooks/lib/stryker_invocation.py +102 -0
- package/hooks/lib/telemetry_consent.py +41 -0
- package/hooks/lib/telemetry_report.py +108 -0
- package/hooks/lib/test_file_classify.py +160 -0
- package/hooks/lib/token_efficiency_limits.py +51 -0
- package/hooks/lib/turn_identity.py +77 -0
- package/hooks/lib/verify_guard_state.py +110 -0
- package/hooks/lib/workflow_state.py +206 -0
- package/hooks/lib/xunit_v3_operator_gate.py +596 -0
- package/hooks/mcp_json_repowise_nudge.py +74 -0
- package/hooks/mutation_adapters/__init__.py +7 -0
- package/hooks/mutation_adapters/__pycache__/__init__.cpython-314.pyc +0 -0
- package/hooks/mutation_adapters/__pycache__/lib.cpython-314.pyc +0 -0
- package/hooks/mutation_adapters/__pycache__/mutmut.cpython-314.pyc +0 -0
- package/hooks/mutation_adapters/__pycache__/pitest.cpython-314.pyc +0 -0
- package/hooks/mutation_adapters/__pycache__/stryker.cpython-314.pyc +0 -0
- package/hooks/mutation_adapters/__pycache__/stryker_net.cpython-314.pyc +0 -0
- package/hooks/mutation_adapters/lib.py +478 -0
- package/hooks/mutation_adapters/mutmut.py +188 -0
- package/hooks/mutation_adapters/pitest.py +266 -0
- package/hooks/mutation_adapters/stryker.py +157 -0
- package/hooks/mutation_adapters/stryker_net.py +264 -0
- package/hooks/mutation_gate.py +193 -0
- package/hooks/mutation_testing_smoke_gate.py +371 -0
- package/hooks/pending_review_notify.py +121 -0
- package/hooks/phase_marker.py +138 -0
- package/hooks/post_compact_state_reinject.py +180 -0
- package/hooks/post_format.py +115 -0
- package/hooks/pre_commit_knowledge_index.py +128 -0
- package/hooks/pre_commit_review.py +66 -0
- package/hooks/pre_pr_review.py +694 -0
- package/hooks/pre_tool_guard.py +405 -0
- package/hooks/py.sh +73 -0
- package/hooks/refactor-bash-write-patterns.json +29 -0
- package/hooks/refactor_test_bash_guard.py +253 -0
- package/hooks/refactor_test_freeze_guard.py +139 -0
- package/hooks/refactor_test_revert_guard.py +186 -0
- package/hooks/repo_review_nudge.py +287 -0
- package/hooks/review_verdict_recorder.py +464 -0
- package/hooks/scan_bash_command_for_banned_scripts.py +428 -0
- package/hooks/scan_worktree_for_banned_scripts.py +238 -0
- package/hooks/session_learning_trigger.py +248 -0
- package/hooks/skills_index.py +126 -0
- package/hooks/stryker_xunit_shim_guard.py +571 -0
- package/hooks/subagent_completion_guard.py +309 -0
- package/hooks/subagent_skill_context.py +139 -0
- package/hooks/task_completion_metrics.py +216 -0
- package/hooks/tdd_guard.py +229 -0
- package/hooks/telemetry.py +341 -0
- package/hooks/token_efficiency_review.py +194 -0
- package/hooks/verify_guard.py +183 -0
- package/hooks/verify_guard_edit_marker.py +73 -0
- package/hooks/version_check.py +173 -0
- package/knowledge/accepted-risks-schema.md +98 -0
- package/knowledge/adr-decision-criteria.md +64 -0
- package/knowledge/adversarial-review-protocol.md +139 -0
- package/knowledge/agent-registry.md +228 -0
- package/knowledge/agent-review-methodology.md +80 -0
- package/knowledge/ai-friendly-repo-guidelines.md +67 -0
- package/knowledge/architecture-assessment.md +96 -0
- package/knowledge/artifact-lifecycle.md +57 -0
- package/knowledge/cd-maturity-model.md +82 -0
- package/knowledge/cd-test-architecture.md +190 -0
- package/knowledge/ci-cd-file-scope.md +24 -0
- package/knowledge/codegraph-vs-graphify.md +192 -0
- package/knowledge/component-test-patterns.md +139 -0
- package/knowledge/database-change-management.md +80 -0
- package/knowledge/database-test-patterns.md +79 -0
- package/knowledge/decision-defaults.md +88 -0
- package/knowledge/dependency-breaking-techniques.md +116 -0
- package/knowledge/deployment-pipeline.md +86 -0
- package/knowledge/design-smells.md +122 -0
- package/knowledge/directory-enumeration.md +38 -0
- package/knowledge/domain-modeling.md +123 -0
- package/knowledge/evidence-bundle.md +90 -0
- package/knowledge/exploratory-testing-field-guide.md +122 -0
- package/knowledge/failure-routing.md +28 -0
- package/knowledge/fixture-construction.md +56 -0
- package/knowledge/frontend-component-architecture.md +139 -0
- package/knowledge/gherkin-quality-review-dispatch.md +135 -0
- package/knowledge/index.json +6766 -0
- package/knowledge/internal-collaborator-doubling.md +101 -0
- package/knowledge/legacy-test-strategy.md +71 -0
- package/knowledge/long-run-waiting.md +66 -0
- package/knowledge/microservice-testing.md +71 -0
- package/knowledge/model-pricing.json +23 -0
- package/knowledge/mutation-score-formulas.md +60 -0
- package/knowledge/object-calisthenics.md +147 -0
- package/knowledge/oracle-provenance.md +94 -0
- package/knowledge/orchestrator-script-implementation.md +185 -0
- package/knowledge/owasp-detection.md +148 -0
- package/knowledge/plan-review-rubric.md +56 -0
- package/knowledge/proxy-connectivity.md +62 -0
- package/knowledge/reactive-effect-patterns.md +73 -0
- package/knowledge/recon-inventory-excludes.txt +32 -0
- package/knowledge/references/bdd-value-guide.md +61 -0
- package/knowledge/references/csharp-http-client-testing.md +264 -0
- package/knowledge/release-strategies.md +74 -0
- package/knowledge/report-output-location.md +117 -0
- package/knowledge/report-pdf-integration.md +63 -0
- package/knowledge/report-print.css +129 -0
- package/knowledge/report-template.md +114 -0
- package/knowledge/report-to-pdf.md +69 -0
- package/knowledge/request-processing-flow.md +63 -0
- package/knowledge/result-verification.md +52 -0
- package/knowledge/review-agent-output-contract.md +121 -0
- package/knowledge/review-lens-classification.md +113 -0
- package/knowledge/review-rubric.md +62 -0
- package/knowledge/review-template.md +104 -0
- package/knowledge/rule-fixtures/A02.insecure-random-js/negative.js +1 -0
- package/knowledge/rule-fixtures/A02.insecure-random-js/positive.js +1 -0
- package/knowledge/rule-fixtures/A02.weak-hashing-md5/negative.py +1 -0
- package/knowledge/rule-fixtures/A02.weak-hashing-md5/positive.py +1 -0
- package/knowledge/rule-fixtures/A03.command-injection/negative.js +1 -0
- package/knowledge/rule-fixtures/A03.command-injection/positive.js +1 -0
- package/knowledge/rule-fixtures/A03.sql-injection/negative.js +1 -0
- package/knowledge/rule-fixtures/A03.sql-injection/positive.js +1 -0
- package/knowledge/rule-fixtures/A03.xss-innerhtml/negative.js +1 -0
- package/knowledge/rule-fixtures/A03.xss-innerhtml/positive.js +1 -0
- package/knowledge/rule-fixtures/A05.cors-wildcard/negative.js +1 -0
- package/knowledge/rule-fixtures/A05.cors-wildcard/positive.js +1 -0
- package/knowledge/rule-fixtures/A05.default-credentials/negative.js +1 -0
- package/knowledge/rule-fixtures/A05.default-credentials/positive.js +1 -0
- package/knowledge/rule-fixtures/A07.jwt-alg-none/negative.js +1 -0
- package/knowledge/rule-fixtures/A07.jwt-alg-none/positive.js +1 -0
- package/knowledge/rule-fixtures/A08.binary-formatter/negative.cs +1 -0
- package/knowledge/rule-fixtures/A08.binary-formatter/positive.cs +1 -0
- package/knowledge/rule-fixtures/A08.js-eval/negative.js +1 -0
- package/knowledge/rule-fixtures/A08.js-eval/positive.js +1 -0
- package/knowledge/rule-fixtures/A08.object-input-stream/negative.java +1 -0
- package/knowledge/rule-fixtures/A08.object-input-stream/positive.java +1 -0
- package/knowledge/schemas/disposition-register-v1.json +65 -0
- package/knowledge/schemas/recon-envelope-v1.json +198 -0
- package/knowledge/schemas/unified-finding-v1.json +72 -0
- package/knowledge/security-primitives-contract.md +301 -0
- package/knowledge/security-review-rule-map.yaml +107 -0
- package/knowledge/skills-registry.md +72 -0
- package/knowledge/task-size-classifier.md +103 -0
- package/knowledge/telemetry-schema.md +881 -0
- package/knowledge/test-automation-maturity.md +56 -0
- package/knowledge/test-automation-principles.md +71 -0
- package/knowledge/test-cadence-tradeoffs.md +68 -0
- package/knowledge/test-doubles.md +105 -0
- package/knowledge/test-file-indicators.md +22 -0
- package/knowledge/test-layer-gates.md +35 -0
- package/knowledge/test-matrix-examples/django-batch.md +24 -0
- package/knowledge/test-matrix-examples/dotnet-grpc-fronting-api.md +90 -0
- package/knowledge/test-matrix-examples/dotnet-http-consumer.md +131 -0
- package/knowledge/test-matrix-examples/react-node-spa.md +24 -0
- package/knowledge/test-matrix-examples/spring-boot-service.md +25 -0
- package/knowledge/test-matrix-examples/ssr-htmx.md +24 -0
- package/knowledge/test-organization.md +70 -0
- package/knowledge/test-pyramid.md +84 -0
- package/knowledge/test-refactoring.md +67 -0
- package/knowledge/test-review-division-of-labor.md +85 -0
- package/knowledge/test-smells.md +80 -0
- package/knowledge/test-stack-profiles/bdd-frameworks.md +235 -0
- package/knowledge/test-stack-profiles/django.md +13 -0
- package/knowledge/test-stack-profiles/dotnet.md +18 -0
- package/knowledge/test-stack-profiles/go.md +16 -0
- package/knowledge/test-stack-profiles/node.md +16 -0
- package/knowledge/test-stack-profiles/react.md +12 -0
- package/knowledge/test-stack-profiles/spring-boot.md +16 -0
- package/knowledge/test-stack-profiles/ssr-htmx.md +14 -0
- package/knowledge/test-stack-profiles/vue.md +12 -0
- package/knowledge/test-strategy.md +70 -0
- package/knowledge/testability-patterns.md +240 -0
- package/knowledge/testing-quadrants.md +44 -0
- package/knowledge/testing-techniques/approval.md +15 -0
- package/knowledge/testing-techniques/chaos.md +17 -0
- package/knowledge/testing-techniques/fuzz.md +15 -0
- package/knowledge/testing-techniques/property-based.md +15 -0
- package/knowledge/testing-techniques/schema-validation.md +15 -0
- package/knowledge/testing-techniques/screenshot.md +15 -0
- package/knowledge/three-phase-workflow.md +198 -0
- package/knowledge/value-patterns.md +55 -0
- package/knowledge/verification-mode.md +116 -0
- package/knowledge/virtual-service-libraries.md +75 -0
- package/knowledge/wave-consolidation-guidance.md +21 -0
- package/overrides/agents/Explore.md +15 -0
- package/overrides/agents/general-purpose.md +10 -0
- package/overrides/notes/autoship.md +6 -0
- package/overrides/notes/issues-from-assessment.md +3 -0
- package/overrides/notes/issues-from-plan.md +3 -0
- package/overrides/notes/mutation-night-watch.md +3 -0
- package/overrides/notes/mutation-testing.md +3 -0
- package/overrides/notes/pr.md +7 -0
- package/overrides/notes/project-init.md +6 -0
- package/overrides/notes/setup.md +13 -0
- package/overrides/notes/specs.md +3 -0
- package/overrides/skills/headless-run/SKILL.md +45 -0
- package/overrides/skills/upgrade/SKILL.md +30 -0
- package/overrides/skills/version/SKILL.md +25 -0
- package/package.json +36 -0
- package/scripts/authoring_digest.py +93 -0
- package/scripts/autoship_discover.py +121 -0
- package/scripts/autoship_group.py +409 -0
- package/scripts/autoship_proposals.py +494 -0
- package/scripts/autoship_queue.py +291 -0
- package/scripts/autoship_reclaim.py +495 -0
- package/scripts/build_jobs.py +108 -0
- package/scripts/build_rollback_point.py +240 -0
- package/scripts/build_slice_scope.py +157 -0
- package/scripts/build_wave.py +109 -0
- package/scripts/build_wave_reconcile.py +252 -0
- package/scripts/build_worktree_baseref.py +113 -0
- package/scripts/check_agent_scope.py +117 -0
- package/scripts/check_agent_tool_mapping.py +213 -0
- package/scripts/check_review_agent_mcp_tools.py +317 -0
- package/scripts/check_security_assessment_mcp_tools.py +165 -0
- package/scripts/checkpoint_abort.py +502 -0
- package/scripts/claude_setup_review.py +438 -0
- package/scripts/codebase_recon.py +556 -0
- package/scripts/coverage_config.py +623 -0
- package/scripts/coverage_delta_steering.py +330 -0
- package/scripts/coverage_discovery_dotnet.py +315 -0
- package/scripts/coverage_discovery_java.py +742 -0
- package/scripts/coverage_discovery_js.py +546 -0
- package/scripts/coverage_gap_ranking.py +556 -0
- package/scripts/coverage_readiness.py +455 -0
- package/scripts/coverage_report_parse.py +521 -0
- package/scripts/detect_bdd_convention.py +252 -0
- package/scripts/eval_ablation.py +376 -0
- package/scripts/gherkin_analysis_coverage_gate.py +306 -0
- package/scripts/gherkin_cross_feature_duplicate_titles_gate.py +173 -0
- package/scripts/gherkin_effectiveness_rollup.py +238 -0
- package/scripts/gherkin_failure_path_gate.py +206 -0
- package/scripts/gherkin_feature_merge.py +720 -0
- package/scripts/gherkin_stub_gate.py +163 -0
- package/scripts/gherkin_stub_merge.py +479 -0
- package/scripts/git_origin_host.py +88 -0
- package/scripts/install-java-static-analysis.py +110 -0
- package/scripts/issue_deps.py +74 -0
- package/scripts/lib/_bdd_markers.py +28 -0
- package/scripts/lib/_gherkin_text.py +93 -0
- package/scripts/lib/_vendored_tree.py +70 -0
- package/scripts/lib/autoship_state.py +397 -0
- package/scripts/lib/claude_md_guard.py +226 -0
- package/scripts/lib/deterministic_recon.py +446 -0
- package/scripts/lib/mcp_tool_grants.py +211 -0
- package/scripts/lib/plan_parse.py +386 -0
- package/scripts/lib/review_result.py +84 -0
- package/scripts/lib/review_roster.py +86 -0
- package/scripts/lib/session_log/__init__.py +34 -0
- package/scripts/lib/session_log/__pycache__/__init__.cpython-314.pyc +0 -0
- package/scripts/lib/session_log/__pycache__/records.cpython-314.pyc +0 -0
- package/scripts/lib/session_log/classify.py +231 -0
- package/scripts/lib/session_log/corrections.py +194 -0
- package/scripts/lib/session_log/discovery.py +108 -0
- package/scripts/lib/session_log/records.py +218 -0
- package/scripts/lib/session_log/redact.py +76 -0
- package/scripts/lib/session_log/signals.py +373 -0
- package/scripts/lib/session_report_downstream.py +614 -0
- package/scripts/lib/session_report_maintainer.py +1273 -0
- package/scripts/lib/session_report_shared.py +262 -0
- package/scripts/lib/settings_hook_guard.py +157 -0
- package/scripts/lib/slug.py +33 -0
- package/scripts/lib/stub_extractors/__init__.py +82 -0
- package/scripts/lib/stub_extractors/_common.py +328 -0
- package/scripts/lib/stub_extractors/csharp.py +19 -0
- package/scripts/lib/stub_extractors/go.py +173 -0
- package/scripts/lib/stub_extractors/java.py +18 -0
- package/scripts/lib/stub_extractors/jsts.py +126 -0
- package/scripts/mutation_stack_sections.py +149 -0
- package/scripts/mutation_yield_steering.py +345 -0
- package/scripts/orchestrator.py +895 -0
- package/scripts/plan_gherkin_export.py +227 -0
- package/scripts/plan_waves.py +208 -0
- package/scripts/pr_close_keyword_lint.py +108 -0
- package/scripts/progress_guardian.py +888 -0
- package/scripts/recon_inventory.py +273 -0
- package/scripts/review_findings_log.py +93 -0
- package/scripts/run_invariants.py +124 -0
- package/scripts/select_lenses.py +640 -0
- package/scripts/session_report.py +486 -0
- package/scripts/set_autocompact_env.py +221 -0
- package/scripts/ship_resume_guard.py +135 -0
- package/scripts/ship_review_gate.py +63 -0
- package/scripts/specs_convention_marker.py +103 -0
- package/scripts/test_improve_resume.py +277 -0
- package/scripts/test_review_mechanics.py +958 -0
- package/scripts/token_efficiency_review.py +322 -0
- package/scripts/verdict_scope.py +285 -0
- package/scripts/verify_gherkin_quality_critic_isolation.py +296 -0
- package/scripts/verify_tier.py +157 -0
- package/skills/adr-tools/SKILL.md +118 -0
- package/skills/agent-readiness/SKILL.md +105 -0
- package/skills/agent-readiness/ai_friendly_analyzers.py +326 -0
- package/skills/agent-readiness/scanner.py +441 -0
- package/skills/agent-readiness/scorecard.yaml +88 -0
- package/skills/api-design/SKILL.md +115 -0
- package/skills/apply-fixes/SKILL.md +171 -0
- package/skills/apply-test-doubles/SKILL.md +321 -0
- package/skills/artifact-lifecycle/SKILL.md +127 -0
- package/skills/autoship/SKILL.md +1124 -0
- package/skills/benchmark/SKILL.md +105 -0
- package/skills/branch-workflow/SKILL.md +89 -0
- package/skills/browse/SKILL.md +184 -0
- package/skills/browser-testing/SKILL.md +62 -0
- package/skills/browser-testing/references/playwright-patterns.md +216 -0
- package/skills/build/SKILL.md +422 -0
- package/skills/build/references/static-self-heal.md +245 -0
- package/skills/careful/SKILL.md +72 -0
- package/skills/cd-test-architecture/SKILL.md +371 -0
- package/skills/ci-debugging/SKILL.md +105 -0
- package/skills/co-evolution-audit/SKILL.md +269 -0
- package/skills/code-review/SKILL.md +1015 -0
- package/skills/code-review/examples/aggregated-sample.json +56 -0
- package/skills/code-review/examples/sample-report.md +41 -0
- package/skills/code-review/output-format.md +478 -0
- package/skills/code-review/scripts/activation.py +86 -0
- package/skills/code-review/scripts/change_impact.py +357 -0
- package/skills/code-review/scripts/change_shape.py +372 -0
- package/skills/code-review/scripts/change_size.py +212 -0
- package/skills/code-review/scripts/changed_file_list.py +141 -0
- package/skills/code-review/scripts/closing_pass.py +187 -0
- package/skills/code-review/scripts/consolidate.py +277 -0
- package/skills/code-review/scripts/contract_failure_report.py +185 -0
- package/skills/code-review/scripts/dispatch_reconcile.py +66 -0
- package/skills/code-review/scripts/dispatch_waves.py +164 -0
- package/skills/code-review/scripts/finding_signature.py +446 -0
- package/skills/code-review/scripts/ledger.py +283 -0
- package/skills/code-review/scripts/partition.py +169 -0
- package/skills/code-review/scripts/render_tiered_findings.py +274 -0
- package/skills/code-review/scripts/repo_invariants.py +1066 -0
- package/skills/code-review/scripts/review_context_pack.py +306 -0
- package/skills/code-review/scripts/review_round_log.py +345 -0
- package/skills/code-review/scripts/review_value_coverage.py +297 -0
- package/skills/code-review/scripts/validate_review_output.py +467 -0
- package/skills/code-review/sliced-mode.md +205 -0
- package/skills/competitive-analysis/SKILL.md +191 -0
- package/skills/context-loading-protocol/SKILL.md +157 -0
- package/skills/continue/SKILL.md +90 -0
- package/skills/cost-report/SKILL.md +178 -0
- package/skills/coverage-baseline/SKILL.md +335 -0
- package/skills/coverage-baseline/references/multi-project-discovery.md +202 -0
- package/skills/coverage-delta/SKILL.md +181 -0
- package/skills/coverage-delta/references/mutation-gate.md +70 -0
- package/skills/design-doc/SKILL.md +95 -0
- package/skills/design-interrogation/SKILL.md +89 -0
- package/skills/design-it-twice/SKILL.md +91 -0
- package/skills/docker-image-audit/SKILL.md +108 -0
- package/skills/docker-image-audit/references/install-guide.md +64 -0
- package/skills/docker-image-audit/references/report-template.md +73 -0
- package/skills/docker-image-create/SKILL.md +185 -0
- package/skills/domain-analysis/SKILL.md +183 -0
- package/skills/domain-driven-design/SKILL.md +194 -0
- package/skills/exploratory-testing/SKILL.md +108 -0
- package/skills/explore/SKILL.md +51 -0
- package/skills/farley-score/SKILL.md +165 -0
- package/skills/feature-file-validation/SKILL.md +78 -0
- package/skills/feature-file-validation/references/validation-rules.md +115 -0
- package/skills/feedback-learning/SKILL.md +414 -0
- package/skills/fix/SKILL.md +450 -0
- package/skills/freeze/SKILL.md +68 -0
- package/skills/frontend-architecture/SKILL.md +113 -0
- package/skills/gherkin-derive/SKILL.md +630 -0
- package/skills/gherkin-public/SKILL.md +266 -0
- package/skills/governance-compliance/SKILL.md +150 -0
- package/skills/guard/SKILL.md +75 -0
- package/skills/handoff/SKILL.md +139 -0
- package/skills/handoff/references/summary-templates.md +242 -0
- package/skills/harness-audit/SKILL.md +751 -0
- package/skills/harness-audit/scripts/lesson_validate.py +386 -0
- package/skills/harness-audit/scripts/redundancy_criterion.py +188 -0
- package/skills/headless-run/SKILL.md +45 -0
- package/skills/headless-run/scripts/isolated_dispatch.py +381 -0
- package/skills/help/SKILL.md +72 -0
- package/skills/hexagonal-architecture/SKILL.md +85 -0
- package/skills/human-oversight-protocol/SKILL.md +224 -0
- package/skills/issues-from-assessment/SKILL.md +223 -0
- package/skills/issues-from-plan/SKILL.md +133 -0
- package/skills/legacy-code/SKILL.md +132 -0
- package/skills/mermaid-diagramming/SKILL.md +120 -0
- package/skills/mutation-night-watch/SKILL.md +154 -0
- package/skills/mutation-night-watch/references/scheduling.md +135 -0
- package/skills/mutation-testing/SKILL.md +396 -0
- package/skills/mutation-testing/references/languages/csharp-stryker-net.md +676 -0
- package/skills/mutation-testing/references/languages/go-go-mutesting.md +95 -0
- package/skills/mutation-testing/references/languages/java-pitest.md +77 -0
- package/skills/mutation-testing/references/languages/javascript-stryker.md +188 -0
- package/skills/mutation-testing/references/languages/python-mutmut.md +97 -0
- package/skills/mutation-testing/references/time-estimation.md +34 -0
- package/skills/mutation-testing/references/tool-detection.md +15 -0
- package/skills/mutation-testing/references/workflow-callers.md +23 -0
- package/skills/mutation-testing/scripts/__pycache__/xunit_v3_feature_detector.cpython-314.pyc +0 -0
- package/skills/mutation-testing/scripts/csharp_stryker_net_slice_runner.py +635 -0
- package/skills/mutation-testing/scripts/csharp_stryker_net_status_loop.py +525 -0
- package/skills/mutation-testing/scripts/csharp_stryker_net_wrapper.py +681 -0
- package/skills/mutation-testing/scripts/mutation_baseline_reuse.py +292 -0
- package/skills/mutation-testing/scripts/mutation_exclude_policy.py +268 -0
- package/skills/mutation-testing/scripts/mutation_feasibility_gate.py +463 -0
- package/skills/mutation-testing/scripts/mutation_kill_headless.py +331 -0
- package/skills/mutation-testing/scripts/mutation_kill_insert.py +199 -0
- package/skills/mutation-testing/scripts/mutation_kill_insert_python.py +150 -0
- package/skills/mutation-testing/scripts/mutation_kill_loop.py +869 -0
- package/skills/mutation-testing/scripts/mutation_kill_loop_python.py +949 -0
- package/skills/mutation-testing/scripts/mutation_kill_retry.py +592 -0
- package/skills/mutation-testing/scripts/mutation_kill_shared.py +620 -0
- package/skills/mutation-testing/scripts/mutation_nightwatch.py +462 -0
- package/skills/mutation-testing/scripts/mutation_nightwatch_stacks.py +425 -0
- package/skills/mutation-testing/scripts/mutation_report.py +743 -0
- package/skills/mutation-testing/scripts/mutation_report_cli.py +175 -0
- package/skills/mutation-testing/scripts/mutation_safety_gate.py +69 -0
- package/skills/mutation-testing/scripts/stryker_shard_pipeline.py +847 -0
- package/skills/mutation-testing/scripts/stryker_shard_setup.py +440 -0
- package/skills/mutation-testing/scripts/stryker_timeout_retry.py +142 -0
- package/skills/mutation-testing/scripts/xunit_v3_feature_detector.py +341 -0
- package/skills/performance-benchmark/SKILL.md +174 -0
- package/skills/performance-benchmark/examples/report-format.md +43 -0
- package/skills/performance-benchmark/references/benchmark-script.md +169 -0
- package/skills/performance-metrics/SKILL.md +265 -0
- package/skills/plan/SKILL.md +199 -0
- package/skills/plan/references/gherkin-persistence.md +43 -0
- package/skills/plan/references/plan-template.md +182 -0
- package/skills/pr/SKILL.md +289 -0
- package/skills/pr/scripts/gate_retry_state.py +368 -0
- package/skills/project-init/README.md +141 -0
- package/skills/project-init/SKILL.md +1197 -0
- package/skills/project-init/evals/evals.json +200 -0
- package/skills/project-init/references/capability-tools.md +55 -0
- package/skills/project-init/references/configs.md +221 -0
- package/skills/property-based-testing/SKILL.md +121 -0
- package/skills/property-based-testing/fixtures/invariant_fixture.py +15 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/README.md +42 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/fast-check/LICENSE +21 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/fast-check/README.md +263 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/fast-check/lib/cjs/fast-check.d.ts +5165 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/fast-check/lib/cjs/fast-check.js +12147 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/fast-check/lib/cjs/package.json +3 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/fast-check/lib/cjs/types57/fast-check.d.ts +5165 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/fast-check/lib/fast-check.d.ts +5165 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/fast-check/lib/fast-check.js +12011 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/fast-check/lib/rolldown-runtime-D7D4PA-g.js +13 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/fast-check/lib/types57/fast-check.d.ts +5165 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/fast-check/package.json +94 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/LICENSE +21 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/README.md +168 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/RandomGenerator-DcXj09Ch.d.ts +14 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/distribution/uniformBigInt.d.ts +15 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/distribution/uniformBigInt.js +38 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/distribution/uniformFloat32.d.ts +15 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/distribution/uniformFloat32.js +18 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/distribution/uniformFloat64.d.ts +15 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/distribution/uniformFloat64.js +22 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/distribution/uniformInt.d.ts +15 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/distribution/uniformInt.js +134 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/RandomGenerator-DcXj09Ch.d.ts +14 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/distribution/uniformBigInt.d.ts +15 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/distribution/uniformBigInt.js +37 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/distribution/uniformFloat32.d.ts +15 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/distribution/uniformFloat32.js +17 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/distribution/uniformFloat64.d.ts +15 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/distribution/uniformFloat64.js +21 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/distribution/uniformInt.d.ts +15 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/distribution/uniformInt.js +133 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/generator/congruential32.d.ts +7 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/generator/congruential32.js +44 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/generator/mersenne.d.ts +7 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/generator/mersenne.js +90 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/generator/xoroshiro128plus.d.ts +7 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/generator/xoroshiro128plus.js +80 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/generator/xorshift128plus.d.ts +7 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/generator/xorshift128plus.js +78 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/package.json +3 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/types/JumpableRandomGenerator.d.ts +16 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/types/JumpableRandomGenerator.js +0 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/types/RandomGenerator.d.ts +2 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/types/RandomGenerator.js +0 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/utils/generateN.d.ts +6 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/utils/generateN.js +8 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/utils/purify.d.ts +12 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/utils/purify.js +9 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/utils/skipN.d.ts +6 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/esm/utils/skipN.js +6 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/generator/congruential32.d.ts +7 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/generator/congruential32.js +46 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/generator/mersenne.d.ts +7 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/generator/mersenne.js +92 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/generator/xoroshiro128plus.d.ts +7 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/generator/xoroshiro128plus.js +82 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/generator/xorshift128plus.d.ts +7 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/generator/xorshift128plus.js +80 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/types/JumpableRandomGenerator.d.ts +16 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/types/JumpableRandomGenerator.js +0 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/types/RandomGenerator.d.ts +2 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/types/RandomGenerator.js +0 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/utils/generateN.d.ts +6 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/utils/generateN.js +9 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/utils/purify.d.ts +12 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/utils/purify.js +10 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/utils/skipN.d.ts +6 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/lib/utils/skipN.js +7 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/node_modules/pure-rand/package.json +133 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/package-lock.json +1179 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/package.json +14 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/roundtrip.js +29 -0
- package/skills/property-based-testing/fixtures/js-roundtrip/roundtrip.properties.test.js +16 -0
- package/skills/property-based-testing/fixtures/no_property_fixture.py +10 -0
- package/skills/property-based-testing/fixtures/roundtrip_fixture.py +16 -0
- package/skills/property-based-testing/references/languages/javascript.md +54 -0
- package/skills/property-based-testing/scripts/detect_and_dispatch.py +80 -0
- package/skills/property-based-testing/scripts/hypothesis_scaffold.py +276 -0
- package/skills/proxy-resilience/SKILL.md +84 -0
- package/skills/quality-gate-pipeline/SKILL.md +184 -0
- package/skills/quality-targets-converge/SKILL.md +254 -0
- package/skills/repo-review/SKILL.md +159 -0
- package/skills/report-pdf/SKILL.md +66 -0
- package/skills/review/SKILL.md +47 -0
- package/skills/review-agent/SKILL.md +152 -0
- package/skills/review-summary/SKILL.md +73 -0
- package/skills/run-report/SKILL.md +70 -0
- package/skills/semantic-duplication-scan/SKILL.md +337 -0
- package/skills/semantic-scan/SKILL.md +53 -0
- package/skills/semgrep-analyze/SKILL.md +139 -0
- package/skills/setup/SKILL.md +1122 -0
- package/skills/ship/SKILL.md +240 -0
- package/skills/source-verification/SKILL.md +210 -0
- package/skills/source-verification/scripts/claim_extractor.py +155 -0
- package/skills/specs/.size-baseline.json +4 -0
- package/skills/specs/SKILL.md +243 -0
- package/skills/specs/references/completeness-checklist.md +83 -0
- package/skills/specs/references/extraction.md +58 -0
- package/skills/specs/references/glossary.md +59 -0
- package/skills/specs/references/persistence.md +115 -0
- package/skills/specs/references/predictability-check.md +77 -0
- package/skills/static-analysis-integration/SKILL.md +235 -0
- package/skills/static-analysis-integration/adapters/_envelope.py +26 -0
- package/skills/static-analysis-integration/adapters/jscpd-adapter.py +66 -0
- package/skills/static-analysis-integration/adapters/lizard-adapter.py +81 -0
- package/skills/static-analysis-integration/adapters/mypy-adapter.py +50 -0
- package/skills/static-analysis-integration/adapters/mypy-src-layout.py +93 -0
- package/skills/static-analysis-integration/adapters/security-review-adapter.py +212 -0
- package/skills/static-analysis-integration/maintenance.md +23 -0
- package/skills/static-analysis-integration/references/language-setup.md +228 -0
- package/skills/static-analysis-integration/references/sarif-parser.md +124 -0
- package/skills/static-analysis-integration/references/security-review-adapter.md +118 -0
- package/skills/static-analysis-integration/references/tool-configs.md +617 -0
- package/skills/static-analysis-integration/rulesets/pmd-quickstart.xml +24 -0
- package/skills/stryker-xunit-v2-shim/SKILL.md +274 -0
- package/skills/stryker-xunit-v2-shim/references/shim-howto.md +256 -0
- package/skills/stryker-xunit-v2-shim/scripts/generate_shim.py +143 -0
- package/skills/systematic-debugging/SKILL.md +130 -0
- package/skills/telemetry/SKILL.md +75 -0
- package/skills/test-audit-disable/SKILL.md +129 -0
- package/skills/test-design/SKILL.md +177 -0
- package/skills/test-design/scripts/__pycache__/internal_double_detector.cpython-314.pyc +0 -0
- package/skills/test-design/scripts/internal_double_detector.py +631 -0
- package/skills/test-design-advisor/SKILL.md +166 -0
- package/skills/test-driven-development/SKILL.md +169 -0
- package/skills/test-health/SKILL.md +262 -0
- package/skills/test-improve/SKILL.md +239 -0
- package/skills/test-improve/references/phase-0-approach-contract.md +228 -0
- package/skills/test-improve/references/phase-1-analyze.md +131 -0
- package/skills/test-improve/references/phase-2-baseline.md +121 -0
- package/skills/test-improve/references/phase-3-derive-gherkin.md +53 -0
- package/skills/test-improve/references/phase-4-plan-fixes.md +34 -0
- package/skills/test-improve/references/phase-5-improve.md +215 -0
- package/skills/test-improve/references/phase-6-refactor-decision.md +45 -0
- package/skills/test-improve/references/phase-7-refactor.md +44 -0
- package/skills/test-improve/references/phase-8-validate.md +66 -0
- package/skills/test-improve/references/phase-9-close-out-prompt.md +11 -0
- package/skills/test-improve/references/phase-9-report.md +62 -0
- package/skills/test-improve/references/review-loop.md +92 -0
- package/skills/test-improve/templates/executive-summary.md +123 -0
- package/skills/threat-modeling/SKILL.md +108 -0
- package/skills/triage/SKILL.md +211 -0
- package/skills/ubiquitous-language/SKILL.md +192 -0
- package/skills/ubiquitous-language/scripts/collect_domain_signals.py +300 -0
- package/skills/unfreeze/SKILL.md +37 -0
- package/skills/upgrade/SKILL.md +31 -0
- package/skills/upgrade/scripts/check_version_drift.py +113 -0
- package/skills/upgrade/scripts/enable_autoupdate.py +149 -0
- package/skills/version/SKILL.md +25 -0
- package/sync/__pycache__/sync_upstream.cpython-314.pyc +0 -0
- package/sync/sync_upstream.py +293 -0
- package/templates/ACCEPTED-RISKS.md.tmpl +46 -0
- package/templates/agents/agent-template.md +151 -0
- package/templates/agents/angular-testing.md +66 -0
- package/templates/agents/csharp-quality.md +63 -0
- package/templates/agents/esm-enforcer.md +52 -0
- package/templates/agents/front-end-testing.md +65 -0
- package/templates/agents/go-quality.md +65 -0
- package/templates/agents/python-quality.md +62 -0
- package/templates/agents/react-testing.md +61 -0
- package/templates/agents/ts-enforcer.md +60 -0
- package/templates/agents/twelve-factor-audit.md +49 -0
- package/tools/entropy-check.py +250 -0
- package/tools/model-hash-verify.py +213 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quality-gate-pipeline
|
|
3
|
+
description: Unified quality gate for agent output — self-validation, verification evidence, and review-correction loops. Consolidates accuracy-validation, verification-before-completion, and task-review-correction into a single three-phase pipeline. Use before delivery, at completion, and during rework.
|
|
4
|
+
role: worker
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Quality Gate Pipeline
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
Single quality gate that every agent passes through before output is accepted. Replaces three formerly separate skills (accuracy-validation, verification-before-completion, task-review-correction) with a unified pipeline of three phases that run in sequence.
|
|
13
|
+
|
|
14
|
+
## Constraints
|
|
15
|
+
|
|
16
|
+
- Do not deliver output containing unverified claims; pause and verify first
|
|
17
|
+
- Do not claim completion without fresh verification evidence from this session
|
|
18
|
+
- Do not reference test results or tool output from earlier in the conversation — re-run and show current output
|
|
19
|
+
- Do not substitute reasoning or explanation for actual evidence
|
|
20
|
+
- Max 3 review-correction cycles before escalating to the Orchestrator
|
|
21
|
+
- Each correction cycle must reduce total defect count; flat or increasing defects trigger escalation
|
|
22
|
+
|
|
23
|
+
## The Three Phases
|
|
24
|
+
|
|
25
|
+
### Phase 1: Self-Validation (before delivery)
|
|
26
|
+
|
|
27
|
+
Every agent runs this checklist mentally before presenting output.
|
|
28
|
+
|
|
29
|
+
**Factual Accuracy**
|
|
30
|
+
|
|
31
|
+
- [ ] All file paths referenced actually exist (verify with tool, don't assume)
|
|
32
|
+
- [ ] All function/class/variable names match what's in the codebase
|
|
33
|
+
- [ ] Version numbers, API signatures, and config values are verified, not recalled from training
|
|
34
|
+
- [ ] No statistics or citations are fabricated
|
|
35
|
+
- [ ] Claims about an external tool or product's UI (menu paths, button/control labels, screen layouts, settings locations) are backed by a citation the agent actually has — a fetched doc, a user-provided screenshot/description, or tool output — not recalled from training as if current and authoritative. When no citation exists, say so plainly (e.g. "I don't have a verified/current view of this menu — check the tool's current UI") rather than describing specifics; this is the same **Low** confidence fallback as any other recalled/guessed claim (see Confidence Assessment below).
|
|
36
|
+
|
|
37
|
+
**Instruction Fidelity**
|
|
38
|
+
|
|
39
|
+
- [ ] Output addresses what the user actually asked, not a reinterpretation
|
|
40
|
+
- [ ] All acceptance criteria from the task are met
|
|
41
|
+
- [ ] No scope creep beyond the request
|
|
42
|
+
- [ ] Constraints from the agent persona are respected
|
|
43
|
+
|
|
44
|
+
**Internal Consistency**
|
|
45
|
+
|
|
46
|
+
- [ ] No contradictions within the output
|
|
47
|
+
- [ ] Code samples compile/run conceptually (correct syntax, valid imports)
|
|
48
|
+
- [ ] Referenced earlier decisions are accurately recalled (if unsure, re-read from .claude/memory/)
|
|
49
|
+
|
|
50
|
+
**Confidence Assessment**
|
|
51
|
+
|
|
52
|
+
| Confidence | Meaning | Action |
|
|
53
|
+
| --- | --- | --- |
|
|
54
|
+
| **High** | Verified via tool output or direct file read | Deliver as-is |
|
|
55
|
+
| **Medium** | Inferred from context, not directly verified | Flag with caveat |
|
|
56
|
+
| **Low** | Recalled from training or guessed | Verify before delivering, or mark as unverified |
|
|
57
|
+
|
|
58
|
+
**Hallucination Detection Signals**
|
|
59
|
+
|
|
60
|
+
Strong signals (likely hallucination):
|
|
61
|
+
|
|
62
|
+
- Referencing a file, function, or API that was never read in this session
|
|
63
|
+
- Quoting specific numbers without a source
|
|
64
|
+
- Describing behavior that contradicts tool observations
|
|
65
|
+
- Generating imports for packages not in dependencies
|
|
66
|
+
- Describing a specific control, menu path, or screen in an external tool/product without a citation the agent can point to
|
|
67
|
+
|
|
68
|
+
When a signal fires: **Pause** → **Verify** (use tools) → **Correct** → **Log** (`hallucination_detected: true` in metrics)
|
|
69
|
+
|
|
70
|
+
### Phase 2: Verification Evidence (before completion claims)
|
|
71
|
+
|
|
72
|
+
**Iron Law**: No completion claims without fresh verification evidence. Skipping any step is falsification, not verification.
|
|
73
|
+
|
|
74
|
+
**The Gate Function**:
|
|
75
|
+
|
|
76
|
+
1. **IDENTIFY** — What command proves your claim? (e.g., `npm test`, `cargo build`)
|
|
77
|
+
2. **RUN** — Execute the command fresh and completely. Not from cache, not from memory.
|
|
78
|
+
3. **READ** — Read the complete output and exit code. Don't skim.
|
|
79
|
+
4. **VERIFY** — Does the output actually confirm your claim? If not, report actual status.
|
|
80
|
+
5. **ONLY THEN** — Make the claim, with supporting evidence pasted.
|
|
81
|
+
|
|
82
|
+
**Required Evidence (all tasks)**:
|
|
83
|
+
|
|
84
|
+
1. **Tests pass**: Run the **whole** test suite. Paste output with pass/fail counts.
|
|
85
|
+
2. **Build succeeds**: If the project has a build step, run it. Paste output.
|
|
86
|
+
3. **Lint clean**: If the project has a linter, run it. Paste output.
|
|
87
|
+
4. **No regressions**: Test count should not decrease.
|
|
88
|
+
5. **Coverage & Mutation (necessary-not-sufficient)**: Coverage thresholds and mutation score gate entry but do not alone gate exit. Saturating at 100% line coverage and 1.0 mutation score on small slices is expected and does not indicate structural quality. They are required to pass but are not the final signal.
|
|
89
|
+
6. **Structural Quality gate**: Before claiming "done", the work must carry a clean-or-triaged `structure-review` signal (nesting depth, cognitive load, and async-pattern judgment are folded into this lens, #2093). Options:
|
|
90
|
+
- **Clean**: The agent produced no `error`/`warning` findings on the latest diff.
|
|
91
|
+
- **Triaged**: Every `error`/`warning` finding is logged as a deferred item (with owner + tracking reference) per the Phase 3 exit criteria — and surfaced in the completion summary.
|
|
92
|
+
- **Waiver**: For hotfixes, documentation-only changes, or work pre-approved by the Orchestrator as out-of-scope for structural review, include a waiver statement: `structural-review-waiver: <reason>` in the completion summary. Waivers are surfaced, not hidden.
|
|
93
|
+
|
|
94
|
+
**Quality Ownership**: green means the **entire suite**, not just the tests your
|
|
95
|
+
change touched. A failing test is a failing test **regardless of whether this change
|
|
96
|
+
caused it** — "already broken" / "not my diff" is not a pass. A red signal you
|
|
97
|
+
observe must be **fixed**, or **explicitly surfaced and triaged** (file an issue, or
|
|
98
|
+
record a quarantine with a reason via `/triage`) and reported as **not green**.
|
|
99
|
+
Never claim completion over a red suite by attributing the failure to someone else's
|
|
100
|
+
change. You own the quality state you can see, not just your delta.
|
|
101
|
+
|
|
102
|
+
**Additional Evidence by task type**:
|
|
103
|
+
|
|
104
|
+
| Task Type | Additional Evidence |
|
|
105
|
+
| ----------- | ------------------- |
|
|
106
|
+
| Bug fix | Red-green cycle: failing test → passing test |
|
|
107
|
+
| New feature | Feature working via test output or demo command |
|
|
108
|
+
| Refactor | Same test count, same pass count |
|
|
109
|
+
| Config change | Config loads without error |
|
|
110
|
+
| Documentation | Commands/code blocks in doc actually work |
|
|
111
|
+
| Agent work | Inspect VCS diff independently — don't trust self-report |
|
|
112
|
+
|
|
113
|
+
**Evidence Format**:
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
## Verification
|
|
117
|
+
- Tests: `npm test` → 47 passed, 0 failed (output below)
|
|
118
|
+
- Build: `npm run build` → success, 0 warnings
|
|
119
|
+
- Lint: `npm run lint` → 0 errors, 0 warnings
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Red Flag Language** — stop and verify when you catch yourself saying:
|
|
123
|
+
|
|
124
|
+
- "should work now" / "should be fixed" / "probably" / "I believe"
|
|
125
|
+
- Expressing satisfaction before running verification
|
|
126
|
+
- Preparing commits without verification output
|
|
127
|
+
|
|
128
|
+
### Phase 3: Review-Correction Loop (post-delivery rework)
|
|
129
|
+
|
|
130
|
+
Activated when output is returned for rework, during peer review, or when self-reviewing before delivery (complements Phase 1).
|
|
131
|
+
|
|
132
|
+
**Defect Severity**:
|
|
133
|
+
|
|
134
|
+
| Severity | Definition | Required Action |
|
|
135
|
+
| --- | --- | --- |
|
|
136
|
+
| **Critical** | Wrong, breaks functionality, contradicts requirements | Immediate correction, block delivery |
|
|
137
|
+
| **Major** | Significant gap in completeness or correctness | Correct before acceptance |
|
|
138
|
+
| **Minor** | Small inaccuracy, suboptimal approach | Correct if time permits |
|
|
139
|
+
| **Cosmetic** | Formatting, naming, style | Bundle with next change |
|
|
140
|
+
|
|
141
|
+
**Correction Scope**:
|
|
142
|
+
|
|
143
|
+
- **Isolated fix**: Self-contained; fix doesn't affect other outputs
|
|
144
|
+
- **Cascading fix**: Implies other outputs may also be wrong; verify related work
|
|
145
|
+
- **Rework**: Fundamental approach flawed; redo from requirements
|
|
146
|
+
|
|
147
|
+
**Review Checklist**:
|
|
148
|
+
|
|
149
|
+
1. Requirements compliance — all acceptance criteria addressed, no silent scope changes
|
|
150
|
+
2. Correctness — intended result, edge cases handled, no regressions
|
|
151
|
+
3. Completeness — all files touched, no TODOs remain, integration points addressed
|
|
152
|
+
4. Consistency — matches project conventions, no contradictions
|
|
153
|
+
5. Quality — appropriately simple, readable, sufficient documentation
|
|
154
|
+
|
|
155
|
+
**Iteration Rules**:
|
|
156
|
+
|
|
157
|
+
- Max 3 review-correction cycles before escalation
|
|
158
|
+
- Each cycle must reduce total defect count
|
|
159
|
+
- If defects increase or stay flat after 2 cycles, escalate to Orchestrator
|
|
160
|
+
- Exit criteria: all critical and major defects **resolved** (fixed and re-verified). Minor defects may be **deferred** — but deferred ≠ resolved: each must be logged with an owner and a tracking reference and **surfaced in the completion summary**, never folded into "done." A slice carrying deferred items is "complete with known follow-ups," not silently "complete."
|
|
161
|
+
|
|
162
|
+
**Escalation**: Summarize defect pattern and attempted corrections → escalate to Orchestrator for re-routing → log with `escalation_reason` in task metrics.
|
|
163
|
+
|
|
164
|
+
## When to Apply Each Phase
|
|
165
|
+
|
|
166
|
+
| Situation | Phases to run |
|
|
167
|
+
| ----------- | -------------- |
|
|
168
|
+
| Initial development, about to deliver | Phase 1 → Phase 2 |
|
|
169
|
+
| Claiming task completion | Phase 2 (at minimum) |
|
|
170
|
+
| Output returned for rework | Phase 3 → Phase 2 |
|
|
171
|
+
| Peer-reviewing another agent's output | Phase 1 (as reviewer) → Phase 3 if defects found |
|
|
172
|
+
| Trivial one-line fix | Phase 2 only (verify it works) |
|
|
173
|
+
|
|
174
|
+
## Output
|
|
175
|
+
|
|
176
|
+
Phase 1: Confidence-scored validation — report failures only.
|
|
177
|
+
Phase 2: Verification evidence block with tool output.
|
|
178
|
+
Phase 3: Defect table (severity, scope, status: fixed/deferred/escalated).
|
|
179
|
+
|
|
180
|
+
## Integration
|
|
181
|
+
|
|
182
|
+
- **Performance Metrics**: `hallucination_detected`, `rework_cycles`, `defects_found` are logged automatically by `hooks/task_completion_metrics.py` on task completion — no skill-level logging step needed. To surface non-default values, populate `.claude/session-metrics.json` with the relevant fields before the session ends.
|
|
183
|
+
- **Context Summarization**: When context is high, increase Phase 1 rigor
|
|
184
|
+
- **Human Oversight Protocol**: Escalation from Phase 3 feeds into the approval gate system
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quality-targets-converge
|
|
3
|
+
description: >-
|
|
4
|
+
Multi-workflow convergence worker. Closes the gap between the current test
|
|
5
|
+
suite and the four quality targets (line+branch coverage ≥ 90%, zero
|
|
6
|
+
surviving mutants, 100% deterministic, fastest pre-merge wall-clock
|
|
7
|
+
achievable on-machine). Each iteration reads the latest measurements,
|
|
8
|
+
picks the largest gap, and dispatches the smallest action that moves it.
|
|
9
|
+
Stops only when all four targets are green or each gap is explicitly
|
|
10
|
+
waived by the operator with a recorded reason. Called by `/test-improve`
|
|
11
|
+
(Phase 8) via `--workflow test-improve`.
|
|
12
|
+
argument-hint: "<repo-path> [--parent <issue-url>] [--repo-slug <slug>] [--workflow <name>] [--max-iterations <n>] [--refactor-mode <no-refactor|refactor-allowed>]"
|
|
13
|
+
user-invocable: true
|
|
14
|
+
allowed-tools: Read, Glob, Grep, Bash, Write, Skill(coverage-delta *), Skill(mutation-testing *)
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Quality Targets Converge
|
|
18
|
+
|
|
19
|
+
Role: worker. The convergence close-out loop. Reads coverage, mutation, determinism, and wall-clock measurements; picks the largest gap; dispatches the smallest action that moves it; re-measures; repeats. The operator gates the loop and can waive any individual target.
|
|
20
|
+
|
|
21
|
+
You have been invoked with the `/quality-targets-converge` command.
|
|
22
|
+
|
|
23
|
+
## Parse Arguments
|
|
24
|
+
|
|
25
|
+
Arguments: $ARGUMENTS
|
|
26
|
+
|
|
27
|
+
- Positional: `<repo-path>`.
|
|
28
|
+
- `--parent <issue-url>` — parent issue URL (or empty).
|
|
29
|
+
- `--repo-slug <slug>` — `.claude/memory/<workflow>/` namespace.
|
|
30
|
+
- `--workflow <name>` — the workflow namespace under `.claude/memory/` and `.claude/plans/`. Defaults to `test-improve`. Callers pass their own namespace so parallel runs stay quarantined.
|
|
31
|
+
- `--max-iterations <n>` — safety cap. Default 10. The operator can extend mid-run.
|
|
32
|
+
- `--refactor-mode <no-refactor|refactor-allowed>` — gates whether Step 4's
|
|
33
|
+
"coverage gap, no existing seam" action may propose a paired
|
|
34
|
+
`[Refactor-for-testability]` Story (see Step 4). **Default
|
|
35
|
+
`refactor-allowed`** when the flag is absent or carries an unrecognized
|
|
36
|
+
value — this preserves today's unconditional-propose behavior for callers
|
|
37
|
+
other than `/test-improve` that don't pass the flag. Whenever the default
|
|
38
|
+
fires because the flag was absent or unrecognized, print
|
|
39
|
+
`"refactor-mode not specified by caller — defaulting to refactor-allowed"`
|
|
40
|
+
(naming the unrecognized value received, if any) so a caller that forgot
|
|
41
|
+
to wire the flag is visible in the run output rather than silently
|
|
42
|
+
indistinguishable from one that explicitly wants `refactor-allowed`.
|
|
43
|
+
|
|
44
|
+
**Path templates.** Every filesystem path in the Steps below carries `<workflow>` as a placeholder; the skill interpolates the resolved `--workflow` value at run time. There is no literal workflow-name string inside a path.
|
|
45
|
+
|
|
46
|
+
## Steps
|
|
47
|
+
|
|
48
|
+
### 1. Load targets
|
|
49
|
+
|
|
50
|
+
Read `.dev-team/quality-targets.json` if it exists; otherwise use defaults:
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"line_pct_min": 90,
|
|
55
|
+
"branch_pct_min": 90,
|
|
56
|
+
"surviving_mutants_max": 0,
|
|
57
|
+
"determinism_runs": 5,
|
|
58
|
+
"determinism_required_pass_rate": 1.0,
|
|
59
|
+
"wall_clock_target_seconds": null
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`wall_clock_target_seconds = null` means "fastest achievable" — the loop tracks it but does not gate on a number.
|
|
64
|
+
|
|
65
|
+
### 2. Measure all four dimensions
|
|
66
|
+
|
|
67
|
+
In one pass before the loop body:
|
|
68
|
+
|
|
69
|
+
- **Coverage** — invoke `/coverage-delta <repo> --workflow <workflow>` (no `--story`). Result lives in `.dev-team-reports/<workflow>/<slug>/data/coverage-history.json`.
|
|
70
|
+
- **Mutation scope — branch-vs-base changed set (cumulative, NOT whole-repo).** Phase-8 validation measures mutation only over the code this branch changed, accumulated across every session on the branch — never the whole repo (issue #1208). Resolve the scope in three moves:
|
|
71
|
+
|
|
72
|
+
1. **Resolve the branch base** (same idiom as `/build`'s Farley-Score step — `skills/build/SKILL.md` Step 7 sub-step 1): `git merge-base HEAD origin/HEAD`, falling back to `origin/main`, then `main`, `master`, `develop`. **Degenerate-base guard (issue #916):** treat **base == HEAD, or every candidate ref unresolvable** (single-branch / no-remote repo where `merge-base` fails outright, or every commit landed directly on the fallback branch so `merge-base` resolves to HEAD) as a resolution **failure**, not a valid base. On resolution failure, fall back to the plan's recorded plan-start anchor — the same anchor `/build` resolves against (issue #865): `python3 ${CLAUDE_PLUGIN_ROOT}/scripts/build_rollback_point.py get-by-symbolic --path .claude/memory/build-rollback.json --symbolic plan-start --repo <repo> --ancestor-of HEAD` (the `--repo`/`--ancestor-of` args reject a stale `plan-start` from an unrelated earlier build). If a qualifying entry is found, use its `sha` as `<base>`. If none is found, print `Branch-base resolution degraded — cannot bound the changed set; scoping to the full in-scope component list this run.` and scope to the full in-scope component list **only as a surfaced last resort** — so a widened run is visible in the output, never a silent whole-repo default.
|
|
73
|
+
2. **Cumulative changed set:** `git diff --name-only <base>...HEAD` (three-dot — everything the branch added since it forked, across all sessions, not just the last commit).
|
|
74
|
+
3. **Scope is the source covered by the changed TESTS, not just changed source files.** A test-improvement branch commonly changes no production source at all, so mapping only changed `*.ts`/`*.py`/etc. would scope to nothing. From the changed set, take every changed **test** file and resolve the production source it exercises: a co-located `X.spec.ts` / `X.test.ts` maps to its sibling `X.ts` (same basename, same directory); an a11y / contract / integration spec that names no co-located sibling maps to the first-party production modules it **imports** (parse the spec's import statements, drop third-party paths). Union that resolved-source set with any changed production source files. That union is the mutation `--scope`.
|
|
75
|
+
|
|
76
|
+
- **Mutation — reuse rule (applied BEFORE the fresh `/mutation-testing` invocation below).** The upstream phase already measured mutation per `[Component tests]` Story; that evidence is in `.dev-team-reports/<workflow>/<slug>/data/mutation-history.json`. Use it instead of re-running mutation against files (from the branch-scoped set above) the upstream phase already exercised:
|
|
77
|
+
|
|
78
|
+
1. For each in-scope file, look up the most recent entry in `mutation-history.json`.
|
|
79
|
+
2. Compare the entry's `captured_at` to the file's last committer date: `git log -1 --format=%cI -- <file>` (committer date — not file mtime. Uncommitted edits intentionally won't trigger re-measure; convergence runs over committed code).
|
|
80
|
+
3. If the entry post-dates the file's last commit AND `status != "tool_unavailable"`, **reuse** the entry's `survivors_after` as the current count. Drop the file from the `--scope` glob passed to the fresh `/mutation-testing` run below.
|
|
81
|
+
4. Otherwise (no entry, stale entry, or prior `status: "tool_unavailable"`) — measure the file fresh in the next bullet. The fresh result is written back to `.dev-team-reports/<workflow>/<slug>/data/mutation-history.json` as a **synthetic entry** with `story: "converge-<iteration>"` so within-iteration reuse works and so the next iteration sees the same evidence the upstream phase would have.
|
|
82
|
+
|
|
83
|
+
**Backward compatibility — `mutation-history.json` absent.** Workflows that pre-date this contract have no upstream mutation evidence. When the file is absent, fall through to measuring fresh: the next bullet runs `/mutation-testing` over every file **in the branch-vs-base changed set** defined above — the reuse rule is opportunistic, not required, but absence of history never widens the run back to whole-repo.
|
|
84
|
+
|
|
85
|
+
- **Mutation (fresh measurement on files the reuse rule didn't cover).** Invoke `/mutation-testing <repo> --scope <remaining-files> --workflow-managed-approval --emit-json <tmp>` (where `<remaining-files>` is the branch-scoped set minus the files the reuse rule covered). Parse the surviving-mutant list from its JSON output (filter `status: "equivalent"` AND `status: "accepted"` — both carry a `reason` and neither counts against convergence). Capture file + line + mutant operator for each survivor. Write back each freshly-measured file as a synthetic entry to `.dev-team-reports/<workflow>/<slug>/data/mutation-history.json` (see reuse rule above) via **temp-file-then-rename** (write to `<path>.tmp` then `mv -f <path>.tmp <path>`) — the same idiom [`coverage-delta/SKILL.md`](../coverage-delta/SKILL.md) Step 2b uses for the same now-shared, git-tracked file, so both writers stay safe against interleaved writes.
|
|
86
|
+
|
|
87
|
+
- **Unmeasurable modules — held at baseline, never dropped (issue #1208, criterion 4).** A module `/mutation-testing` cannot finish — reported OOM, or a tool crash, or a run so slow that `mutation-testing`'s per-mutant wall-clock timeout (which counts a timed-out *mutant* as killed) still leaves the whole *module's* score unestablished — must NOT be silently omitted and must NOT be reported with an invented number. Instead:
|
|
88
|
+
|
|
89
|
+
1. First retry the module's **non-static** subset with `ignoreStatic` (static initializers are the common OOM trigger); if that subset now measures, use it and mark only the static remainder held-at-baseline.
|
|
90
|
+
2. For whatever still cannot be measured, **hold it at its persisted baseline count** — the `survivors_after` recorded for that file in `baseline-mutation.json` / `mutation-history.json` — and record it in the snapshot's `held_at_baseline` list.
|
|
91
|
+
3. Report it in Step 6 verbatim as **"held at baseline (could not measure — needs ≥N GB agent)"** — never as a fresh zero, never dropped from the module list.
|
|
92
|
+
|
|
93
|
+
- **Whole-repo score via splice over the persisted baseline (issue #1208, criterion 2).** Report BOTH the branch-scoped result AND a whole-repo number, but do **not** re-run the whole repo to obtain it. The whole-repo score is a **splice**: the freshly-measured changed files (above) layered over the **persisted per-file baseline** for every untouched file. The baseline of record is `baseline-mutation.json` plus the per-file `survivors_after` in `mutation-history.json` (see `/coverage-delta`'s [`references/mutation-gate.md`](../coverage-delta/references/mutation-gate.md)). Both files are written directly to `.dev-team-reports/<workflow>/<slug>/data/` at capture/append time — `baseline-mutation.json` by `/test-improve` Phase 2 (`/mutation-testing` owns no persistence of its own), `mutation-history.json` by `/coverage-delta` (other agents are landing those write paths concurrently) — so the splice source is always available for every convergence session.
|
|
94
|
+
|
|
95
|
+
- **Determinism** — re-run the test suite `determinism_runs` times. Capture: pass rate, the names of any test that failed in some runs but passed in others, the total wall-clock per run (lowest = current baseline).
|
|
96
|
+
|
|
97
|
+
- **Wall-clock** — already captured as part of determinism. Take the median.
|
|
98
|
+
|
|
99
|
+
Write the snapshot to `.claude/memory/<workflow>/<slug>/converge-<iteration>.json`:
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"iteration": <n>,
|
|
104
|
+
"captured_at": "<ISO-8601>",
|
|
105
|
+
"line_pct": …, "branch_pct": …,
|
|
106
|
+
"surviving_mutants": [ { "file":…, "line":…, "op":… }, … ],
|
|
107
|
+
"surviving_mutants_whole_repo_spliced": <count>,
|
|
108
|
+
"held_at_baseline": [ { "module":…, "baseline_survivors":…, "reason": "oom|timeout|tool_crash" }, … ],
|
|
109
|
+
"mutation_scope": {
|
|
110
|
+
"base_ref": "<sha>",
|
|
111
|
+
"changed_test_files": <count>,
|
|
112
|
+
"resolved_source_files": <count>
|
|
113
|
+
},
|
|
114
|
+
"mutation_reuse": {
|
|
115
|
+
"reused_from_history": <count>,
|
|
116
|
+
"measured_fresh": <count>,
|
|
117
|
+
"total_files": <count>
|
|
118
|
+
},
|
|
119
|
+
"determinism_pass_rate": …, "flaky_tests": [ … ],
|
|
120
|
+
"wall_clock_median_sec": …, "wall_clock_runs": [ …, … ]
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The operator-visible iteration report (Step 6) names the cost saving directly: `mutation: reused N, measured M` — without that line, the reuse rule is invisible and the operator can't tell whether upstream mutation evidence actually paid off.
|
|
125
|
+
|
|
126
|
+
### 3. Compute the gap to each target
|
|
127
|
+
|
|
128
|
+
For each of the four, compute "distance to target":
|
|
129
|
+
|
|
130
|
+
- Line: `target - current` (clamped at 0).
|
|
131
|
+
- Branch: `target - current`.
|
|
132
|
+
- Mutants: the **whole-repo spliced score** (`surviving_mutants_whole_repo_spliced`) — survivors in the branch-scoped changed set plus the persisted-baseline survivor counts held for every untouched module and every held-at-baseline / unmeasurable module. Gate `surviving_mutants_max` on this spliced number, never on a partial branch-only count, so a convergence run is judged against the whole repo's honest score.
|
|
133
|
+
- Determinism: `determinism_runs - passes`.
|
|
134
|
+
- Wall-clock: tracked, not gated unless the operator set a number.
|
|
135
|
+
|
|
136
|
+
### 4. Pick the largest gap + dispatch the smallest action
|
|
137
|
+
|
|
138
|
+
Use this priority order (matches the spec's order of operations) when two gaps tie:
|
|
139
|
+
|
|
140
|
+
1. Determinism (a flaky suite invalidates every other metric).
|
|
141
|
+
2. Surviving mutants (coverage you can't trust isn't coverage).
|
|
142
|
+
3. Line + branch coverage.
|
|
143
|
+
4. Wall-clock (only if the operator set a target).
|
|
144
|
+
|
|
145
|
+
For the picked gap, dispatch the smallest action — by emitting a recommendation, not by editing code (the actual edit happens via `/build` against a downstream Story):
|
|
146
|
+
|
|
147
|
+
| Gap | Smallest action |
|
|
148
|
+
| --- | --- |
|
|
149
|
+
| Flaky test | Identify the source of non-determinism (real clock, RNG, sleep, shared state, order dependence). Propose a downstream Story to remove it. |
|
|
150
|
+
| Surviving mutant on a covered line | The test asserts coverage but not behavior; propose a downstream Story to add the specific assertion that kills this mutant. |
|
|
151
|
+
| Surviving mutant on an uncovered line | Propose a downstream Story to add a test that hits the line *and* asserts the behavior. |
|
|
152
|
+
| Coverage gap on a single file, existing seam | Propose a downstream Story to add a component test for the uncovered branch at the existing seam. |
|
|
153
|
+
| Coverage gap on a single file, no existing seam, `--refactor-mode refactor-allowed` | Propose a paired `[Refactor-for-testability]` Story (today's behavior, unchanged). |
|
|
154
|
+
| Coverage gap on a single file, no existing seam, `--refactor-mode no-refactor` | Do **not** propose a `[Refactor-for-testability]` Story — the operator already closed that decision at Phase 6. Instead, write an entry (seam-needed / behavior-gained / estimated-risk) to `.dev-team-reports/<workflow>/<slug>/refactor-backlog.md`, appending to the file Phase 6 writes if it already exists rather than creating a second backlog file. |
|
|
155
|
+
| Behavior-preserving (invariant) test refactor — a `done()`→`async`/`await` rewrite, a real-timer→`fakeAsync` migration, a callback→promise conversion that changes no assertion and kills no mutant | **Skip it — do not dispatch a Story.** These migrations preserve test semantics, so they close no coverage / mutation / determinism gap; dispatching work for them is pure churn. Log the skip with its rationale to `.dev-team-reports/<workflow>/<slug>/refactor-backlog.md` (the same backlog the no-refactor row appends to) as `invariant-refactor-skipped: <file> — <migration> — no gap closed`, so the decision is auditable rather than silent. |
|
|
156
|
+
| Wall-clock regression | Identify the slowest tests (top 10). Propose a Story to swap a local container for an in-memory double where both prove the behavior. |
|
|
157
|
+
|
|
158
|
+
**Invariant refactors are skipped, not dispatched (issue #1208).** The "behavior-preserving (invariant) test refactor" row exists because a convergence loop scanning changed tests will encounter semantics-preserving migrations. They change no assertion and kill no mutant, so they close no target gap — proposing a Story for them only adds churn. Skip them and log the rationale to the backlog so the skip is auditable rather than silent.
|
|
159
|
+
|
|
160
|
+
**Gherkin binding for proposed component tests.** When the smallest action is "add a component test" (the surviving-mutant rows, or the coverage-gap-with-existing-seam row above), first check `.claude/memory/<workflow>/<slug>/gherkin-bindings.json` for an approved Scenario covering that behavior at the relevant public surface:
|
|
161
|
+
|
|
162
|
+
- **Scenario exists** — the proposed Story extends the matching `[Component tests]` Story rather than creating a new one. The recommendation cites `<feature-file>::<scenario-name>` and the test added in `/build` binds to that scenario in the binding mode recorded in `phase-0.md`.
|
|
163
|
+
- **Scenario is missing** — do NOT invent a Scenario inside a downstream Story. Pause the convergence loop and hand back to the orchestrator: the operator remains the single author of intent, and the Gherkin surface must be updated via the workflow's standard Phase-2 sign-off before this loop resumes. Do not open ad-hoc amendment Stories from inside this worker; that route would bypass the human gate and is intentionally not available here.
|
|
164
|
+
|
|
165
|
+
This keeps the approved Gherkin as the single source of intended behavior even when convergence discovers a gap. The operator stays the only author of intent.
|
|
166
|
+
|
|
167
|
+
Each recommendation lands as a new child issue on the parent (via the same CLI dispatch convention as `/issues-from-assessment`) or as a new file under `.claude/plans/<workflow>/phase-7/`. The orchestrator then drives `/build` against each.
|
|
168
|
+
|
|
169
|
+
### 5. Re-measure + decide whether to loop
|
|
170
|
+
|
|
171
|
+
After `/build` closes the dispatched Story:
|
|
172
|
+
|
|
173
|
+
- Re-measure (Step 2).
|
|
174
|
+
- If all four targets met → exit loop, mark the close-out Story Done.
|
|
175
|
+
- If `--max-iterations` reached → halt, print current state, ask the operator to waive remaining gaps or extend.
|
|
176
|
+
- Otherwise → next iteration.
|
|
177
|
+
|
|
178
|
+
### 6. Post the converge history
|
|
179
|
+
|
|
180
|
+
Append a markdown block to the parent (or `FEATURE.md`):
|
|
181
|
+
|
|
182
|
+
```markdown
|
|
183
|
+
### Convergence iteration <n> (<ISO-8601>)
|
|
184
|
+
- Coverage: line <pct>% (target 90%) · branch <pct>% (target 90%)
|
|
185
|
+
- Surviving mutants (branch-scoped changed set): <n> (target 0) · mutation: reused <N>, measured <M>
|
|
186
|
+
- Surviving mutants (whole-repo, spliced over persisted baseline): <n> · Δ vs baseline: <±n>
|
|
187
|
+
- Held at baseline (could not measure — needs ≥N GB agent): <module list, or "none">
|
|
188
|
+
- Determinism: <passes>/<runs> (target <runs>/<runs>)
|
|
189
|
+
- Wall-clock median: <sec>s (target: fastest achievable / <n>s if set)
|
|
190
|
+
- Largest gap: <dimension>
|
|
191
|
+
- Dispatched: <story title / id>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Same CLI pattern as `/coverage-baseline` and `/coverage-delta`.
|
|
195
|
+
|
|
196
|
+
### 6b. Gherkin effectiveness roll-up (conditional)
|
|
197
|
+
|
|
198
|
+
When `.claude/memory/<workflow>/<slug>/gherkin.md` exists (Phase 3 ran — see
|
|
199
|
+
`/gherkin-derive`), run the roll-up after every iteration's re-measure so
|
|
200
|
+
there is a standing signal on whether the derived scenarios track real
|
|
201
|
+
coverage/mutation movement (issue #1296):
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/gherkin_effectiveness_rollup.py" \
|
|
205
|
+
--gherkin-md .claude/memory/<workflow>/<slug>/gherkin.md \
|
|
206
|
+
--bindings-json .claude/memory/<workflow>/<slug>/gherkin-bindings.json \
|
|
207
|
+
--baseline-coverage .dev-team-reports/<workflow>/<slug>/data/baseline-coverage.json \
|
|
208
|
+
--current-coverage <this iteration's coverage measurement> \
|
|
209
|
+
--baseline-mutation .dev-team-reports/<workflow>/<slug>/data/baseline-mutation.json \
|
|
210
|
+
--current-mutation <this iteration's mutation measurement> \
|
|
211
|
+
--out .claude/metrics/gherkin-derive-effectiveness.jsonl
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Omit any flag whose file doesn't exist for this run (e.g. no
|
|
215
|
+
`gherkin-bindings.json` when the workflow only derived scenarios via
|
|
216
|
+
`/gherkin-derive` and never ran `/gherkin-public`) — the script degrades
|
|
217
|
+
gracefully and still records provenance/binding-mode per scenario with the
|
|
218
|
+
correlated field left `null`. When `gherkin.md` is absent (binding mode
|
|
219
|
+
`none`, or Phase 3 never ran), skip this step entirely — there is nothing
|
|
220
|
+
to roll up. This is a metrics side-effect only; it never changes convergence
|
|
221
|
+
gaps or which action Step 4 dispatches.
|
|
222
|
+
|
|
223
|
+
### 7. Waiver handling
|
|
224
|
+
|
|
225
|
+
If the operator chooses to waive a target:
|
|
226
|
+
|
|
227
|
+
- Capture the reason verbatim.
|
|
228
|
+
- Record it in `.claude/memory/<workflow>/<slug>/waivers.json`.
|
|
229
|
+
- Append a `**Waived**: <target> — <reason> (<ISO-8601>)` line to the parent issue / `FEATURE.md`.
|
|
230
|
+
|
|
231
|
+
A waiver counts as "met" for the loop's exit condition but is surfaced in the orchestrator's final Report.
|
|
232
|
+
|
|
233
|
+
### 8. Report
|
|
234
|
+
|
|
235
|
+
Print:
|
|
236
|
+
|
|
237
|
+
- Current state of all four dimensions.
|
|
238
|
+
- Whether the loop converged, halted, or is mid-iteration.
|
|
239
|
+
- Any waivers recorded.
|
|
240
|
+
- The path to `converge-<iteration>.json` and to `waivers.json` (if any).
|
|
241
|
+
- The path to `.claude/metrics/gherkin-derive-effectiveness.jsonl` when Step 6b ran.
|
|
242
|
+
|
|
243
|
+
## Examples / Integration
|
|
244
|
+
|
|
245
|
+
- `/test-improve` invokes this worker from Phase 8 with `--workflow test-improve`; paths resolve as `.claude/memory/test-improve/<slug>/` and `.claude/plans/test-improve/phase-8/`, with tracked evidence (coverage/mutation history, baselines) under `.dev-team-reports/test-improve/<slug>/data/`.
|
|
246
|
+
- `/test-improve` invokes this worker from Phase 8 with `--workflow test-improve`; the same template resolves with `<workflow>` = `test-improve`.
|
|
247
|
+
|
|
248
|
+
## Notes
|
|
249
|
+
|
|
250
|
+
- This worker does not write tests or edit production code. Its output is recommendations + dispatched Stories that `/build` then implements. That keeps the workflow's "every change goes through a Story with Acceptance Criteria" invariant intact.
|
|
251
|
+
- The 10-iteration default is a backstop, not a target. Most repos should converge in 3–5; persistent failure to converge means the dispatched actions aren't the smallest — surface the loop to the operator for a strategy decision.
|
|
252
|
+
- Wall-clock is measured but only gated when the operator sets a number; the spec's "fastest achievable" phrasing is reported as the trend across iterations.
|
|
253
|
+
- Adding a new workflow caller means passing a new `--workflow <name>` value; no path edits inside this skill are required because paths are templated.
|
|
254
|
+
- **Locating seams and existing tests (Step 4).** When determining whether a coverage gap has an existing seam or which test exercises a given line/mutant, prefer CodeGraph/Repowise over raw `Grep` — they return the actual call graph rather than a text match, which is what distinguishes a real seam from a coincidental identifier match. See [`knowledge/codegraph-vs-graphify.md`](../../knowledge/codegraph-vs-graphify.md) for tool selection and the fallback contract.
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: repo-review
|
|
3
|
+
description: >-
|
|
4
|
+
Whole-repository drift review for the review agents that a per-diff
|
|
5
|
+
/code-review pass cannot meaningfully evaluate — accumulated file/CLAUDE.md
|
|
6
|
+
size drift, AI-provenance verification debt, harness-config completeness,
|
|
7
|
+
and cross-file frontend component duplication. Use when the user asks for a
|
|
8
|
+
"repo review", "drift review", "whole-tree review", wants to check
|
|
9
|
+
accumulated size/token drift, verification debt, or duplicated frontend
|
|
10
|
+
components across the WHOLE codebase rather than a single diff, or
|
|
11
|
+
periodically (e.g. every N merged PRs) to catch drift no single diff-scoped
|
|
12
|
+
review would surface. Report-only — never gates a commit.
|
|
13
|
+
argument-hint: "[--path <dir>] [--json] [--pdf]"
|
|
14
|
+
user-invocable: true
|
|
15
|
+
allowed-tools: Read, Write, Grep, Glob, AskUserQuestion, Agent, Bash(git rev-list *), Bash(git rev-parse *), Bash(sh *)
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Repo Review
|
|
19
|
+
|
|
20
|
+
Role: orchestrator. Route work to review agents; do not review code yourself.
|
|
21
|
+
|
|
22
|
+
**Why this skill exists (#1733, #1735).** `/code-review` dispatches its panel
|
|
23
|
+
per diff. Four agents' findings are properties of the *whole tree* — absolute
|
|
24
|
+
size, accumulated drift, or the full component inventory — not of any single
|
|
25
|
+
diff's delta, so a diff-scoped pass either can't see the pattern they exist to
|
|
26
|
+
catch (a file that crept past a size threshold over 10 separate small PRs) or
|
|
27
|
+
re-derives a whole-codebase judgment independently on every review. This
|
|
28
|
+
skill runs those four agents against the whole repository instead, on a
|
|
29
|
+
cadence the operator controls (manual invocation today — see "Cadence" below),
|
|
30
|
+
and writes a report rather than gating anything.
|
|
31
|
+
|
|
32
|
+
**Not `/code-review`.** No staging, no gate-hash, no `.pr-review-passed` write,
|
|
33
|
+
no interactive fix loop, no pre-flight lint/typecheck/secret-scan gates —
|
|
34
|
+
there is no commit to gate. This is a read-only report, structurally closer
|
|
35
|
+
to `/harness-audit`/`/co-evolution-audit` than to `/code-review`.
|
|
36
|
+
|
|
37
|
+
## Orchestrator constraints
|
|
38
|
+
|
|
39
|
+
1. **Do not review code yourself.** Delegate all analysis to the four agents below.
|
|
40
|
+
2. **Fixed roster — not resolver-selected.** Unlike `/code-review`'s `select_lenses.py`-driven panel, this skill's roster is fixed and unconditional (see Roster). Do not add or drop agents based on file type; each agent's own `## Skip` clause handles the case where it has nothing to say.
|
|
41
|
+
3. **Write the report to a file.** Present only the summary table and next-steps in chat — do not repeat the full report.
|
|
42
|
+
4. **Be concise.** Tables and JSON, no preambles, no filler.
|
|
43
|
+
|
|
44
|
+
## Parse Arguments
|
|
45
|
+
|
|
46
|
+
Arguments: $ARGUMENTS
|
|
47
|
+
|
|
48
|
+
| Flag | Behavior |
|
|
49
|
+
| --- | --- |
|
|
50
|
+
| `--path <dir>` | Review only files under this directory (still whole-subtree, not a diff) |
|
|
51
|
+
| `--json` | Emit aggregated JSON to stdout instead of prose; writes no report file |
|
|
52
|
+
| `--pdf` | After the report is written, render a sibling PDF via `hooks/lib/report_pdf.py`. No-op under `--json` (no report file is written) |
|
|
53
|
+
| (no flags) | Review the whole repository |
|
|
54
|
+
|
|
55
|
+
## Steps
|
|
56
|
+
|
|
57
|
+
### 1. Determine target files
|
|
58
|
+
|
|
59
|
+
`--path <dir>`: `Glob("<dir>/**/*")`, excluding `node_modules`, `.git`, `dist`, `build`, `coverage`. No `--path`: the whole repository, same exclusions. **Never `Read` a directory path directly** — `Read` on a directory throws `EISDIR`; always enumerate with `Glob`. See `${CLAUDE_PLUGIN_ROOT}/knowledge/directory-enumeration.md`.
|
|
60
|
+
|
|
61
|
+
**Scope validation** (mirrors `/code-review`'s own table, without its sliced-mode machinery — that is a `--path`-narrowing hint here, not an auto-engaged mode):
|
|
62
|
+
|
|
63
|
+
| File count | Action |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| ≤500 | Proceed |
|
|
66
|
+
| >500 | Warn: "Reviewing {N} files — consider `--path` to narrow scope, or expect a slower, larger-context pass." Proceed anyway — this skill has no sliced-mode equivalent to fall back to. |
|
|
67
|
+
|
|
68
|
+
### 2. Load drift state
|
|
69
|
+
|
|
70
|
+
Read `.claude/memory/repo-review-state.json` if it exists: `{"last_commit": "<sha>", "last_run_at": "<ISO 8601>"}`.
|
|
71
|
+
|
|
72
|
+
**Validate `last_commit` before it touches a shell command — this file is not trusted input.** It is written by step 7 below, but nothing stops a hostile PR from committing its own `.claude/memory/repo-review-state.json` (see step 7's `.gitignore` note) with an arbitrary string in `last_commit`, which a maintainer's later `/repo-review` run would then read. Treat any value that does not match `^[0-9a-fA-F]{7,40}$` exactly like "no prior state" — do not interpolate it into a command. Only once it matches that pattern, confirm it is actually reachable and count commits since it, in one call with no pipe:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
git rev-list --count "<validated-sha>"..HEAD
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
A non-zero exit (unreachable commit — e.g. history was rewritten) is the same "no prior state" case as a missing file: carry `null` for the drift count, not an error. Carry the count (or `null` if there is no prior state, the repo is not a git repository, `last_commit` failed validation, or it is no longer reachable) into the report as the drift signal. This is informational only — it does not gate or skip anything, and a missing/unreadable/invalid state file is not an error, just "first run."
|
|
79
|
+
|
|
80
|
+
**Known limitation, accepted by design:** the read here (step 2) and the write in step 7 are not atomic. Two `/repo-review` invocations racing on the same repository can lose one's drift-state update to the other. Since the count is informational only — never gating or blocking anything — this is an accepted limitation, not a defect to fix: at most it costs one run's drift signal, never a wrong review result.
|
|
81
|
+
|
|
82
|
+
**Cadence (#1735 non-goal, addressed minimally here).** This skill is
|
|
83
|
+
invoked manually — there is no scheduled trigger, matching the existing
|
|
84
|
+
`/harness-audit` and `/co-evolution-audit` precedent of pure on-demand
|
|
85
|
+
invocation rather than a cron-style mechanism. The commits-since-last-audit
|
|
86
|
+
count above is what lets an operator decide *for themselves* whether enough
|
|
87
|
+
has changed to be worth another pass (or wire it into their own CI cadence,
|
|
88
|
+
e.g. "run every 50 merged PRs") without this skill inventing a scheduler.
|
|
89
|
+
|
|
90
|
+
### 3. Confirm agent-dispatch capability
|
|
91
|
+
|
|
92
|
+
Before dispatching anything, confirm the `Agent`/`Task` tool is present in this toolset. If it is not: **STOP.** Do not review the files yourself as a substitute — report which capability is missing and that this skill cannot run until re-invoked from a session that has it. Do not write a report claiming a review ran.
|
|
93
|
+
|
|
94
|
+
### 4. Dispatch the fixed roster
|
|
95
|
+
|
|
96
|
+
Spawn all four as parallel subagents in a single message using the `Agent` tool. Every one of these was **removed from `/code-review`'s per-diff panel** for the same reason (#1733) — do not re-add them there; this skill is where they run now.
|
|
97
|
+
|
|
98
|
+
| Agent | Why whole-tree, not per-diff |
|
|
99
|
+
| --- | --- |
|
|
100
|
+
| `token-efficiency-review` | File length, CLAUDE.md size, LLM anti-patterns are properties of absolute size/drift, invisible to a single diff |
|
|
101
|
+
| `ai-provenance-review` | "Verification debt" and "regeneration risk" are trend/accumulation metrics by definition |
|
|
102
|
+
| `claude-setup-review` | Reviews the harness (CLAUDE.md, rules, skills, agent frontmatter), not the changeset |
|
|
103
|
+
| `component-architecture-review` | Cross-file duplication/reusable-component extraction is best judged against the *entire* component inventory. **Note:** this agent also stays in `/code-review`'s per-diff panel, narrowed to newly-*added* component files only (`Scope: added-only`, #1733) — its dispatch here is unconditional and independent of that narrower rule. |
|
|
104
|
+
|
|
105
|
+
**Context payload**: enumerate the target files and directory tree once (step 1 already did this) and pass the same full files + tree to every agent — no diff exists to describe, so there is no changed-file list to pass, unlike `/code-review`'s `project-structure` payload. Pass each agent's declared `model:`/`effort:` frontmatter unchanged, per `agents/orchestrator.md` → Model/Effort Resolution (ADR 0026). Skip an agent's dispatch only if step 1's target set is empty.
|
|
106
|
+
|
|
107
|
+
**Per-agent output**: the shared contract in [`../../knowledge/review-agent-output-contract.md`](../../knowledge/review-agent-output-contract.md), wrapped with `agentName`/`modelTier` — same envelope `/code-review` uses, so tooling that already parses one parses the other.
|
|
108
|
+
|
|
109
|
+
Wait for all four to complete before aggregating.
|
|
110
|
+
|
|
111
|
+
### 5. Aggregate and score
|
|
112
|
+
|
|
113
|
+
Consolidate findings the same way `/code-review` step 5c does: when multiple agents flag the same `file:line`, one `topFindings` entry with `severity` = the highest single enum, `agents` = the reporting agents array. No slash/comma-joined severities.
|
|
114
|
+
|
|
115
|
+
Score overall health with the general-case formula from [`../../knowledge/review-rubric.md`](../../knowledge/review-rubric.md) § Health Score Calculation (0 fail AND ≤2 warn = 🟢; 1-2 fail OR 3+ warn = 🟠; 3+ fail = 🔴) — the rubric's category-weight table names other agents and does not apply here; use only the general pass/warn/fail counting rule. `skip` results are excluded from scoring, same as `/code-review`.
|
|
116
|
+
|
|
117
|
+
### 6. Generate report
|
|
118
|
+
|
|
119
|
+
**`--json`**: emit the aggregated JSON object (same shape as `/code-review`'s `--json` output — see [`../code-review/output-format.md`](../code-review/output-format.md#aggregated-json-result-json-flag), plus a top-level `commitsSinceLastAudit` field from step 2) to **stdout**. Write no file. Stop — do not proceed to step 7.
|
|
120
|
+
|
|
121
|
+
**Otherwise**, emit a prose summary:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
# Repo Review — <date>
|
|
125
|
+
|
|
126
|
+
Scope: <whole repository | `--path <dir>`>
|
|
127
|
+
Commits since last audit: <N | "first run">
|
|
128
|
+
|
|
129
|
+
## Health: <🟢|🟠|🔴>
|
|
130
|
+
|
|
131
|
+
| Agent | Status | Issues |
|
|
132
|
+
| --- | --- | --- |
|
|
133
|
+
| token-efficiency-review | ... | ... |
|
|
134
|
+
| ai-provenance-review | ... | ... |
|
|
135
|
+
| claude-setup-review | ... | ... |
|
|
136
|
+
| component-architecture-review | ... | ... |
|
|
137
|
+
|
|
138
|
+
## Top Findings
|
|
139
|
+
|
|
140
|
+
<topFindings table — file:line, severity, agents, message>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### 7. Write the report and update drift state
|
|
144
|
+
|
|
145
|
+
**Skip this step entirely if `--json`** (already stopped in step 6).
|
|
146
|
+
|
|
147
|
+
Write the prose summary to `.dev-team-reports/repo-review.md`, creating the directory if absent, overwriting any existing file — write it even when every agent passed clean. Print `Report written: .dev-team-reports/repo-review.md` (or `(replaced previous run)` when a file already existed). A write failure (permission/read-only) is non-fatal: report `Cannot write .dev-team-reports/repo-review.md: <error>` and continue.
|
|
148
|
+
|
|
149
|
+
Then, if the target was a git repository, update the drift state for next run: run `git rev-parse HEAD` and write `.claude/memory/repo-review-state.json` (creating `.claude/memory/` if absent) as `{"last_commit": "<that sha>", "last_run_at": "<current ISO 8601 timestamp>"}`, overwriting any prior state. If the target is not a git repository, skip this write — there is no commit to anchor the next drift count to.
|
|
150
|
+
|
|
151
|
+
**This repository's own `.gitignore` covers that path already** (step 2's trust-boundary note relies on it). A downstream project running this skill from the plugin should add an equivalent ignore rule for `.claude/memory/repo-review-state.json` — it is a per-run, regeneratable artifact, and leaving it trackable reopens the exact commit-and-plant precondition step 2 defends against.
|
|
152
|
+
|
|
153
|
+
**`--pdf`**: when passed and a report file was written this run, render it per `knowledge/report-pdf-integration.md`:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
sh "$CLAUDE_PLUGIN_ROOT/hooks/py.sh" "$CLAUDE_PLUGIN_ROOT/hooks/lib/report_pdf.py" .dev-team-reports/repo-review.md
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
No-op (state the reason, do nothing else) when no report file was written this run.
|