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,630 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gherkin-derive
|
|
3
|
+
description: >-
|
|
4
|
+
Derive Gherkin scenarios directly from a codebase — standalone, with no
|
|
5
|
+
prior legacy-modernization analysis. Discovers the public surface (OpenAPI,
|
|
6
|
+
routes, existing tests, exported signatures, plus message-queue, cron, and
|
|
7
|
+
websocket/GraphQL surfaces), recommends a BDD binding
|
|
8
|
+
mode via the bdd-value-guide rubric, and merges scenarios into `.feature`
|
|
9
|
+
files (preserving prior enrichment, never overwriting) plus
|
|
10
|
+
(in bdd-runner mode) pending step-definition stubs. Use it on its own to
|
|
11
|
+
capture intended behavior before changing tests, or as Phase 3 of
|
|
12
|
+
`/test-improve`. Creates no tracker Stories.
|
|
13
|
+
argument-hint: "<repo-path> [--mode none|xunit-with-annotations|bdd-runner] [--repo-slug <slug>]"
|
|
14
|
+
role: worker
|
|
15
|
+
user-invocable: true
|
|
16
|
+
allowed-tools: Read, Glob, Grep, Bash, Write
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Gherkin Derive
|
|
20
|
+
|
|
21
|
+
Role: worker. A **standalone** Gherkin derivation skill. It derives scenarios for
|
|
22
|
+
a repo's public surface directly from code — it does **not** require any prior
|
|
23
|
+
`/cd-test-architecture` analysis, and it does **not** create tracker Stories
|
|
24
|
+
(the calling orchestrator owns triage). `/gherkin-public` remains a
|
|
25
|
+
public-boundary Gherkin authoring worker used standalone.
|
|
26
|
+
|
|
27
|
+
Usable two ways: on its own to capture intended behavior before any test change,
|
|
28
|
+
or as the Phase-3 sub-step of `/test-improve`.
|
|
29
|
+
|
|
30
|
+
## Parse Arguments
|
|
31
|
+
|
|
32
|
+
- Positional: `<repo-path>` (default: cwd).
|
|
33
|
+
- `--mode <none|xunit-with-annotations|bdd-runner>` — the binding mode. When
|
|
34
|
+
omitted, present the BDD value rubric (Step 1) and let the operator choose.
|
|
35
|
+
- `--repo-slug <slug>` — namespace for the surface inventory under
|
|
36
|
+
`.claude/memory/<workflow>/<slug>/` (`/test-improve` passes `--workflow test-improve`).
|
|
37
|
+
|
|
38
|
+
## Step 1 — Choose the binding mode (BDD value rubric)
|
|
39
|
+
|
|
40
|
+
If `--mode` was **not** supplied, present the 5-question rubric from
|
|
41
|
+
`knowledge/references/bdd-value-guide.md` and recommend a mode from the score:
|
|
42
|
+
|
|
43
|
+
- `≥ 3 yes` → **`bdd-runner`**
|
|
44
|
+
- `1–2 yes` → **`xunit-with-annotations`**
|
|
45
|
+
- `0 yes` → **`none`**
|
|
46
|
+
|
|
47
|
+
Show the recommendation and let the operator override. The three modes:
|
|
48
|
+
|
|
49
|
+
- **`none`** — emit no Gherkin. Exit immediately with a one-line recommendation
|
|
50
|
+
to use plain xUnit (e.g. *"0/5 BDD signals — use plain xUnit; no `.feature`
|
|
51
|
+
files written."*). **Write no files.**
|
|
52
|
+
- **`xunit-with-annotations`** — derive scenarios and write `.feature` files, but
|
|
53
|
+
do **NOT** wire a BDD runner or install any framework. The files are
|
|
54
|
+
documentation that `/build` cites in test method names and leading comments.
|
|
55
|
+
- **`bdd-runner`** — derive scenarios, write `.feature` files, wire the
|
|
56
|
+
language-appropriate BDD framework (Step 4), and generate pending step
|
|
57
|
+
definition stubs.
|
|
58
|
+
|
|
59
|
+
## Step 2 — Discover the public surface
|
|
60
|
+
|
|
61
|
+
No pre-computed component map is required. Discover surfaces in this **priority
|
|
62
|
+
order**, most authoritative first:
|
|
63
|
+
|
|
64
|
+
1. **OpenAPI / Swagger spec** (`openapi.yaml`, `openapi.json`, `swagger.json`) —
|
|
65
|
+
the most authoritative description of the public surface. Each path+method is
|
|
66
|
+
a surface.
|
|
67
|
+
2. **Route definitions** — Express/Fastify handlers, Spring `@Controller` /
|
|
68
|
+
`@RestController`, ASP.NET `[ApiController]`, Go `http.HandleFunc` / Chi / Gin
|
|
69
|
+
routes. Each registered route is a surface.
|
|
70
|
+
3. **Existing test names** — `describe` / `it` / `[Fact]` / `@Test` blocks. These
|
|
71
|
+
yield **characterization** scenarios (current behavior, not intended
|
|
72
|
+
behavior). Use them as the primary source only when OpenAPI and routes do
|
|
73
|
+
not already cover the surface. **Never treat a test's assertion as ground
|
|
74
|
+
truth on its own** — before accepting a test-derived scenario, cross-check
|
|
75
|
+
it against any other available signal (docstrings, comments, adjacent
|
|
76
|
+
OpenAPI/route info, obvious status-code conventions). Record what was
|
|
77
|
+
cross-checked (or that nothing was found) per Step 3.
|
|
78
|
+
4. **Public function signatures + docstrings** — exported functions/classes with
|
|
79
|
+
doc comments. The lowest-priority fallback for libraries with no HTTP surface.
|
|
80
|
+
|
|
81
|
+
Stop climbing the list for the **same surface description** once a
|
|
82
|
+
higher-priority source covers it — do not duplicate a route's success/failure
|
|
83
|
+
scenarios from its tests. But do not let this rule discard information: even
|
|
84
|
+
when a surface is already covered by OpenAPI or a route, still scan its
|
|
85
|
+
existing tests for error/edge branches that are **not** present in the
|
|
86
|
+
documented spec, and add those as *supplemental* characterization scenarios
|
|
87
|
+
rather than dropping them.
|
|
88
|
+
|
|
89
|
+
**Graph-assisted discovery.** Prefer CodeGraph/Repowise over raw `Grep` for
|
|
90
|
+
locating routes, handlers, and exported signatures — see
|
|
91
|
+
[`knowledge/codegraph-vs-graphify.md`](../../knowledge/codegraph-vs-graphify.md)
|
|
92
|
+
for tool selection and the fallback contract.
|
|
93
|
+
|
|
94
|
+
**Async / event / scheduled surfaces — a separate discovery pass, run
|
|
95
|
+
regardless of the cascade above.** These have no OpenAPI equivalent and the
|
|
96
|
+
1–4 cascade will never find them, yet Step 3 already has templates
|
|
97
|
+
(**Batch / Scheduled Job**, **API / Event Consumer**) waiting to describe
|
|
98
|
+
them. Scan for:
|
|
99
|
+
|
|
100
|
+
- **Message-queue consumers/producers** — Kafka `@KafkaListener` /
|
|
101
|
+
`KafkaConsumer`, SQS handlers, RabbitMQ `@RabbitListener`, generic
|
|
102
|
+
`consume(...)` / `on_message(...)` callback registrations.
|
|
103
|
+
- **Scheduled/cron entry points** — Spring `@Scheduled`, `node-cron` /
|
|
104
|
+
`cron.schedule(...)`, Quartz jobs, Kubernetes `CronJob` manifests.
|
|
105
|
+
- **WebSocket / GraphQL handlers** — `@SubscribeMessage`, `io.on(...)` /
|
|
106
|
+
`socket.on(...)`, GraphQL resolver definitions (`Query`/`Mutation`/
|
|
107
|
+
`Subscription` fields).
|
|
108
|
+
|
|
109
|
+
Each hit is its own surface: route message-queue and event hits to the
|
|
110
|
+
**API / Event Consumer** template, and cron/scheduled hits to the
|
|
111
|
+
**Batch / Scheduled Job** template.
|
|
112
|
+
|
|
113
|
+
**In-depth, codebase-wide analysis is the mandatory default — always on,
|
|
114
|
+
never operator-supplied (issue #1450).** Every invocation of this step
|
|
115
|
+
performs an in-depth analysis of the codebase, not a shallow scan limited to
|
|
116
|
+
registered entry points. Beyond the cascade above and the async/event/
|
|
117
|
+
scheduled sweep, explicitly analyze **controllers, handlers, services,
|
|
118
|
+
domain logic, workflows, validation rules, error handling, and business
|
|
119
|
+
processes** to identify behavior-driven scenarios that an entry point's bare
|
|
120
|
+
signature does not reveal — e.g. a thin route handler backed by a service
|
|
121
|
+
that enforces three distinct business rules yields three scenarios, one per
|
|
122
|
+
rule, not one generic "invalid input" scenario. This depth requirement is
|
|
123
|
+
unconditional: it is never gated behind an operator-supplied instruction, a
|
|
124
|
+
flag, or a specific prompt phrasing — a run that skips this analysis is a
|
|
125
|
+
spec violation of this skill, not an acceptable shallow default. Record what
|
|
126
|
+
was analyzed for each of these eight categories in the Step 5 surface
|
|
127
|
+
inventory's `## Analysis Coverage` section (see Step 5), so a thin run is
|
|
128
|
+
detectable rather than merely asserted.
|
|
129
|
+
|
|
130
|
+
**Resolve the existing file before authoring (issue #1420).** Run
|
|
131
|
+
`detect_bdd_convention.py` once per repo to get the project's `.feature`
|
|
132
|
+
destination directory, then compose each surface's path yourself as
|
|
133
|
+
`<dir>/<surface>.feature` — `detect_bdd_convention.py`'s own contract stays a
|
|
134
|
+
single project-wide directory probe; this skill composes the per-surface
|
|
135
|
+
path, it never asks the script to resolve one itself:
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/detect_bdd_convention.py"
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
A `"dir": null` result (`"signal": "none"`) means the script found no usable
|
|
142
|
+
convention — including, since issue #1462, a repo whose only existing
|
|
143
|
+
`.feature` root sits under a non-conventionally-named directory. Never
|
|
144
|
+
compose a path from `null`; fall back to
|
|
145
|
+
`../plan/references/gherkin-persistence.md`'s no-signal handling (prompt the
|
|
146
|
+
operator, or its non-interactive default) instead of guessing a destination.
|
|
147
|
+
|
|
148
|
+
If a file already exists at that composed path, **read it** before authoring
|
|
149
|
+
anything for that surface — Step 5 merges into it rather than overwriting.
|
|
150
|
+
|
|
151
|
+
**Surface identifiers must be unique per method+path (or equivalent
|
|
152
|
+
distinguishing element for non-HTTP surfaces) — never collapse two different
|
|
153
|
+
surfaces onto the same `<surface>` stem (issue #1526).** For an API Provider
|
|
154
|
+
surface, derive `<surface>` from both the HTTP method and the normalized
|
|
155
|
+
path (e.g. `GET /users/{id}` → `get_users_id`, `DELETE /users/{id}` →
|
|
156
|
+
`delete_users_id`) so two endpoints that differ only by method or path never
|
|
157
|
+
compose the same file/feature-title pair. For a non-HTTP surface
|
|
158
|
+
(message-queue consumer, cron job, CLI command, exported function), use the
|
|
159
|
+
fully-qualified name (queue/topic name, job name, module.function) for the
|
|
160
|
+
same reason. A surface-identifier collision is a defect regardless of how it
|
|
161
|
+
happens — it silently merges two unrelated behaviors' scenarios into one
|
|
162
|
+
Feature block, where the exact-title dedup in Step 5 will treat a second
|
|
163
|
+
surface's same-titled scenario as an existing duplicate and drop it.
|
|
164
|
+
|
|
165
|
+
## Step 3 — Author scenarios
|
|
166
|
+
|
|
167
|
+
Use the same templates as `/gherkin-public`: **API Provider**, **UI**,
|
|
168
|
+
**Batch / Scheduled Job**, **CLI / Library**, **API / Event Consumer**. Every
|
|
169
|
+
scenario covers at least one success and one failure path, and every step is
|
|
170
|
+
observable at the boundary — no internal calls.
|
|
171
|
+
|
|
172
|
+
**Ground every failure path in an observed condition.** Before filling a
|
|
173
|
+
failure-scenario placeholder, locate a specific failure condition actually
|
|
174
|
+
present in the code — a conditional, a thrown/raised exception, a documented
|
|
175
|
+
or observed HTTP status code, a validation rule — and cite it in the scenario
|
|
176
|
+
body. When CodeGraph/Repowise are available, use `codegraph_explore` (or
|
|
177
|
+
Repowise `get_context`/`search_codebase`) to inspect a surface's actual
|
|
178
|
+
branches and error-handling depth for this; fall back to reading the source
|
|
179
|
+
directly when the tools are unavailable. Do not invent a generic
|
|
180
|
+
`<invalid request>` / `<failure-mode-summary>` placeholder as a paraphrase of
|
|
181
|
+
the surface's name or signature. When no such condition is discoverable for a
|
|
182
|
+
surface, mark that scenario `# TODO: no observed failure path — hand-author`
|
|
183
|
+
instead of fabricating one — an honest gap beats an invented scenario.
|
|
184
|
+
|
|
185
|
+
**Titles must be specific enough to identify the surface without relying on
|
|
186
|
+
the `Feature:` header for context (issue #1526).** A `Scenario:` title read
|
|
187
|
+
in isolation — in a CI report, a BDD runner's scenario list, or a coverage
|
|
188
|
+
dashboard — must be recognizable as belonging to its specific surface, not a
|
|
189
|
+
generic category label that could describe any endpoint (e.g. `returns error
|
|
190
|
+
for invalid input`, `handles success case`). Prefer wording that names the
|
|
191
|
+
concrete condition or resource involved (e.g. `rejects the request when the
|
|
192
|
+
id path parameter is non-numeric`, `returns the created order with a 201 and
|
|
193
|
+
Location header`) over a bare category name. This applies to success-path
|
|
194
|
+
titles as well as failure-path titles — the no-generic-placeholder rule
|
|
195
|
+
above already covers failure-path *content*; this rule covers *all* scenario
|
|
196
|
+
*titles*. A title that is merely a paraphrase of the surface name (the same
|
|
197
|
+
words as the `Feature:` line, reworded) fails this rule the same way a
|
|
198
|
+
placeholder failure condition does.
|
|
199
|
+
|
|
200
|
+
**Label the provenance** in each `.feature` file header:
|
|
201
|
+
|
|
202
|
+
- Scenarios derived from OpenAPI or docstrings are **specification** scenarios
|
|
203
|
+
(intended behavior).
|
|
204
|
+
- Scenarios derived from existing tests or code are **characterization**
|
|
205
|
+
scenarios — the header MUST state `# Characterization: current behavior, not
|
|
206
|
+
intended behavior` so a reader never mistakes a captured bug for a spec.
|
|
207
|
+
They are hypotheses about intended behavior, not confirmed specs.
|
|
208
|
+
|
|
209
|
+
```gherkin
|
|
210
|
+
# Source: <openapi path | route | test file | signature>
|
|
211
|
+
# Provenance: specification | characterization
|
|
212
|
+
# Characterization: current behavior, not intended behavior (characterization only)
|
|
213
|
+
# Cross-check: <docstring/OpenAPI/route signal that corroborates this, or "none found — unverified against intended behavior"> (characterization only)
|
|
214
|
+
Feature: <surface>
|
|
215
|
+
Scenario: <success path>
|
|
216
|
+
...
|
|
217
|
+
Scenario: <failure path — a real observed condition, or the hand-author TODO>
|
|
218
|
+
...
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Detect drift in retained scenarios (issue #1420).** For each existing
|
|
222
|
+
scenario retained (not replaced) during Step 5's merge, extract the observed
|
|
223
|
+
condition for that same path exactly the way this step already does when
|
|
224
|
+
authoring a fresh scenario — a status code, exception, or validation rule.
|
|
225
|
+
Then call `gherkin_feature_merge.py check-stale` to decide match/mismatch
|
|
226
|
+
deterministically, never by eyeballing the comparison yourself:
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/gherkin_feature_merge.py" check-stale \
|
|
230
|
+
--existing <dir>/<surface>.feature --feature-title "<surface>" \
|
|
231
|
+
--observed "<scenario title>=<observed value>" --json
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
On a reported mismatch, leave the retained scenario's text unmodified — do
|
|
235
|
+
not rewrite it — and record it for the Step 6 report.
|
|
236
|
+
|
|
237
|
+
## Step 4 — Wire the BDD framework (bdd-runner mode only)
|
|
238
|
+
|
|
239
|
+
Skip this step entirely in `none` and `xunit-with-annotations` modes.
|
|
240
|
+
|
|
241
|
+
Read `knowledge/test-stack-profiles/bdd-frameworks.md` for the per-language install steps
|
|
242
|
+
and directory layout, then generate **pending** step-definition stubs so the
|
|
243
|
+
suite **compiles and fails intentionally** (red before green) — never empty stubs
|
|
244
|
+
that pass silently.
|
|
245
|
+
|
|
246
|
+
| Language | Framework | Pending stub |
|
|
247
|
+
|---|---|---|
|
|
248
|
+
| JS/TS | Cucumber.js | `return this.pending();` |
|
|
249
|
+
| Java (Maven) | Cucumber-JVM + `cucumber-junit-platform-engine` | `throw new io.cucumber.java.PendingException();` |
|
|
250
|
+
| Java (Gradle) | Same via Gradle config | `throw new io.cucumber.java.PendingException();` |
|
|
251
|
+
| C# | Reqnroll (xUnit / NUnit / MSTest) | `throw new PendingStepException();` (Reqnroll's own auto-suggested stub; `ScenarioContext.StepIsPending()` is deprecated as of Reqnroll 3.3.4 — see `bdd-frameworks.md`) |
|
|
252
|
+
| Go | Godog | `return godog.ErrPending` |
|
|
253
|
+
|
|
254
|
+
**Merge, never overwrite (issue #1421).** Step-definition stubs are merged
|
|
255
|
+
into the existing file the same way Step 5 merges `.feature` scenarios —
|
|
256
|
+
never a raw `Write`, which would silently discard any step a human (or
|
|
257
|
+
`/build`) has already implemented. For each surface's step-definition file,
|
|
258
|
+
write the newly-derived stub text (using the pending-stub form from the
|
|
259
|
+
table above) to a scratch candidates file, then invoke
|
|
260
|
+
`gherkin_stub_merge.py merge`:
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/gherkin_stub_merge.py" merge \
|
|
264
|
+
--existing <dir>/<surface>_steps.<ext> --candidates <scratch-file> \
|
|
265
|
+
--ext <.js|.ts|.mjs|.cjs|.java|.cs|.go> --json
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
This is exactly one write path whether or not a step-definition file already
|
|
269
|
+
existed at that path. Any step already bound in the file — pending or
|
|
270
|
+
already implemented — is left byte-for-byte untouched; only genuinely new
|
|
271
|
+
step patterns are appended, as pending stubs, after the file's last existing
|
|
272
|
+
binding. **Exit 2 means no write occurred** — read the `--json` payload's
|
|
273
|
+
`error` field to know why, and report the specific cause per Step 6 rather
|
|
274
|
+
than a generic "could not merge" (never retry with a raw `Write`, whichever
|
|
275
|
+
cause it is):
|
|
276
|
+
- `unbalanced-braces` — the existing file's braces/parens don't lexically
|
|
277
|
+
balance, so no binding's body can be safely bounded. The file needs
|
|
278
|
+
hand-repair before any merge can succeed.
|
|
279
|
+
- `dangling-annotation` — a step marker (a call, annotation, or attribute)
|
|
280
|
+
was found with no attached, boundable body. Same remediation — hand-repair
|
|
281
|
+
the file first.
|
|
282
|
+
- `unsafe-path` — the composed `--existing` path contained a `..` component
|
|
283
|
+
and was rejected before any read or write. Fix how the surface name was
|
|
284
|
+
derived into a path; do not retry with the same value.
|
|
285
|
+
- `malformed-candidates` — the scratch candidates file (this skill's own
|
|
286
|
+
intermediate output, not the operator's step-definition file) itself
|
|
287
|
+
couldn't be bounded. Re-author the candidates text for that surface and
|
|
288
|
+
retry.
|
|
289
|
+
- `unreadable-candidates` — the scratch candidates file (this skill's own
|
|
290
|
+
intermediate output) is missing or couldn't be read at all. Re-check how
|
|
291
|
+
this skill wrote that scratch file for the surface before retrying — not
|
|
292
|
+
the operator's step-definition file.
|
|
293
|
+
- `unsupported-extension` — the `--ext` value doesn't name a language this
|
|
294
|
+
script recognizes (`.js`/`.ts`/`.mjs`/`.cjs`/`.java`/`.cs`/`.go`). Fix how
|
|
295
|
+
this skill derived `--ext` from the surface's language before retrying.
|
|
296
|
+
|
|
297
|
+
**Batch shared context-file edits (issue #1775).** When multiple surfaces
|
|
298
|
+
discovered in this run add to the same shared acceptance-test-context file
|
|
299
|
+
(e.g. a shared step-definition registration/support file, hooks module, or
|
|
300
|
+
world/context setup shared across surfaces), collect every surface's
|
|
301
|
+
addition to that shared file first, then apply them in **one edit pass** for
|
|
302
|
+
that file — never reopen and re-edit the same shared context file once per
|
|
303
|
+
step definition or per surface. Reopening it N times for N step
|
|
304
|
+
registrations produces N redundant read/write round-trips for content that
|
|
305
|
+
could have been composed once. **"One edit pass" still means one merge, never
|
|
306
|
+
one raw `Write`, when the shared file is a step-definition/registration
|
|
307
|
+
file** — collecting every surface's addition first is a batching optimization
|
|
308
|
+
over how many times you invoke `gherkin_stub_merge.py merge`, not a license
|
|
309
|
+
to replace it with a single `Write`; combine all the batched additions into
|
|
310
|
+
one `--candidates` scratch file and make exactly one `gherkin_stub_merge.py
|
|
311
|
+
merge` call against the shared file, per the Merge, never overwrite rule
|
|
312
|
+
above (issue #1421).
|
|
313
|
+
|
|
314
|
+
## Step 5 — Output
|
|
315
|
+
|
|
316
|
+
- `features/<surface>.feature` files (all non-`none` modes) — **merged, not
|
|
317
|
+
replaced (issue #1420).** For each surface, write the newly-authored
|
|
318
|
+
scenario text to a scratch candidates file, then invoke
|
|
319
|
+
`gherkin_feature_merge.py merge` — never a raw `Write` — to produce the
|
|
320
|
+
file on disk:
|
|
321
|
+
|
|
322
|
+
```
|
|
323
|
+
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/gherkin_feature_merge.py" merge \
|
|
324
|
+
--existing <dir>/<surface>.feature --candidates <scratch-file> \
|
|
325
|
+
--feature-title "<surface>" --json
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
This is exactly one write path whether or not a file already existed at
|
|
329
|
+
that path — a surface with no prior file goes through the same `merge`
|
|
330
|
+
subcommand, which synthesizes a fresh block, so there is never a second,
|
|
331
|
+
divergent write path to keep in sync. Any prior enrichment already in
|
|
332
|
+
the file (hand-authored or from `/feature-coverage-analyzer`) — including
|
|
333
|
+
`Background:` sections, `@tag`s, and `Scenario Outline:`/`Examples:` tables
|
|
334
|
+
— is preserved byte-for-byte; only genuinely new scenario titles are
|
|
335
|
+
appended, after the block's last existing unit. **Exit 2 means no write
|
|
336
|
+
occurred** — read the `--json` payload's `error` field to know why, and
|
|
337
|
+
report the specific cause per Step 6 rather than a generic "could not
|
|
338
|
+
merge" (never retry with a raw `Write`, whichever cause it is):
|
|
339
|
+
- `feature-not-found` — the named `Feature:` title isn't in the existing
|
|
340
|
+
file; most likely a human renamed it. Reconcile `--feature-title` with
|
|
341
|
+
the file's actual header.
|
|
342
|
+
- `malformed-feature-block` — the title was found but the block's
|
|
343
|
+
structure can't be bounded (a dangling `@tag` line, or a `Scenario
|
|
344
|
+
Outline:` missing its `Examples:` table). The existing file needs
|
|
345
|
+
hand-repair before any merge can succeed.
|
|
346
|
+
- `unsafe-path` — the composed `--existing` path contained a `..`
|
|
347
|
+
component and was rejected before any read or write. Fix how the
|
|
348
|
+
surface name was derived into a path; do not retry with the same value.
|
|
349
|
+
- A malformed `--candidates` scratch file (this skill's own intermediate
|
|
350
|
+
output, not the operator's `.feature` file) — re-author the candidates
|
|
351
|
+
text for that surface and retry.
|
|
352
|
+
- `step_definitions/<surface>_steps.<ext>` pending stubs (`bdd-runner` only) —
|
|
353
|
+
written via Step 4's `gherkin_stub_merge.py merge` invocation, never a raw
|
|
354
|
+
`Write`, so an already-implemented step is never clobbered.
|
|
355
|
+
- A surface inventory at `.claude/memory/<workflow>/<slug>/gherkin.md` listing each
|
|
356
|
+
discovered surface, its discovery source, provenance, mode, and the files
|
|
357
|
+
written. `/test-improve` reads this at Phase 4 (plan fixes) and Phase 5
|
|
358
|
+
(build) to bind tests to the derived scenarios. **The inventory MUST also
|
|
359
|
+
include an `## Analysis Coverage` section** (issue #1450) recording, for
|
|
360
|
+
each of the eight mandatory analysis categories named in Step 2 —
|
|
361
|
+
controllers, handlers, services, domain logic, workflows, validation
|
|
362
|
+
rules, error handling, business processes — either what was found for
|
|
363
|
+
that category or an explicit "none found in this codebase" statement.
|
|
364
|
+
Never omit a category silently: an omitted or empty entry is exactly the
|
|
365
|
+
thin-analysis gap this section exists to make detectable (see Step 6's
|
|
366
|
+
`gherkin_analysis_coverage_gate.py` invocation).
|
|
367
|
+
|
|
368
|
+
## Step 5b — Adversarial Gherkin Quality Review
|
|
369
|
+
|
|
370
|
+
Whenever this run wrote or merged at least one `.feature` file in Step 5,
|
|
371
|
+
dispatch the adversarial review before Step 6's report — no operator opt-in
|
|
372
|
+
required. **Skip entirely** in `none` mode (no `.feature` files exist) or on a
|
|
373
|
+
run that wrote/merged zero `.feature` content.
|
|
374
|
+
|
|
375
|
+
Follow `knowledge/gherkin-quality-review-dispatch.md` for the shared dispatch,
|
|
376
|
+
aggregation, failure-handling, and zero-findings mechanics — this step states
|
|
377
|
+
only what's specific to `/gherkin-derive`: each of the two
|
|
378
|
+
`gherkin-quality-critic` instances receives, for every surface reviewed, that
|
|
379
|
+
surface's `.feature` file content plus its Step 3 `# Source:` header (the
|
|
380
|
+
route, OpenAPI path, test file, or signature it was derived from), so the
|
|
381
|
+
agent can check scenarios against the actual cited source. The resulting
|
|
382
|
+
`agreed`/`single-source` buckets feed Step 6's two new report sections below.
|
|
383
|
+
|
|
384
|
+
## Step 6 — Report
|
|
385
|
+
|
|
386
|
+
Print the mode, the count of surfaces by discovery source (OpenAPI / route /
|
|
387
|
+
test / signature / message-queue / scheduled-cron / websocket-graphql), the
|
|
388
|
+
specification-vs-characterization split, and the paths written. In `none`
|
|
389
|
+
mode, print only the one-line recommendation.
|
|
390
|
+
|
|
391
|
+
**Print Step 5b's two Gherkin quality sections — "Agreed Gherkin quality
|
|
392
|
+
findings" and "Single-source (unconfirmed) Gherkin quality findings":**
|
|
393
|
+
whenever Step 5b ran (skip this pair of sections entirely when it was skipped
|
|
394
|
+
— `none` mode or zero `.feature` writes), follow
|
|
395
|
+
`knowledge/gherkin-quality-review-dispatch.md`'s Report section format for the
|
|
396
|
+
exact per-finding line format, the zero-findings sentence, and the
|
|
397
|
+
failure-handling wording.
|
|
398
|
+
|
|
399
|
+
Neither section is folded into the characterization, possibly-stale,
|
|
400
|
+
title-mismatch, or skipped-duplicate callouts below — this is semantic
|
|
401
|
+
gap/balance judgment from an independent reviewer, not a structural-presence
|
|
402
|
+
check.
|
|
403
|
+
|
|
404
|
+
**Call out characterization scenarios separately — never fold them into the
|
|
405
|
+
same summary line as specification scenarios.** Print a distinct line: "N
|
|
406
|
+
scenarios captured from existing tests — confirm these are intended behavior,
|
|
407
|
+
not bugs, before treating them as spec," listing which had no cross-check
|
|
408
|
+
signal. This is what the operator uses to affirmatively accept each
|
|
409
|
+
characterization scenario at the human gate (`/test-improve` Phase 3's
|
|
410
|
+
review, before Phase 4 proceeds) before it is treated as accepted
|
|
411
|
+
living documentation rather than an unverified hypothesis.
|
|
412
|
+
|
|
413
|
+
**Call out possibly-stale retained scenarios separately (issue #1420) — never
|
|
414
|
+
fold them into the general summary,** mirroring the characterization
|
|
415
|
+
call-out above. Print a distinct "possibly stale existing scenario" section
|
|
416
|
+
listing every `check-stale` finding as `<file>:<line> — asserts <X>, code now
|
|
417
|
+
does <Y> — verify whether the code regressed or the requirement changed
|
|
418
|
+
before editing either the scenario or the code`. This is the same
|
|
419
|
+
action-oriented framing the characterization call-out already uses, not a
|
|
420
|
+
bare data dump — it tells the operator what decision to make, not just that
|
|
421
|
+
one exists.
|
|
422
|
+
|
|
423
|
+
**Call out `check-stale` title mismatches too, distinctly from staleness
|
|
424
|
+
findings (issue #1420).** `check-stale --json`'s `unmatched_titles` array
|
|
425
|
+
lists every `--observed` title that isn't an exact key among the retained
|
|
426
|
+
scenarios — this is a different problem from a stale assertion: it means the
|
|
427
|
+
title-extraction step and the retained scenario's exact text have diverged,
|
|
428
|
+
not that the code's behavior changed. Report each as "title mismatch: `<X>`
|
|
429
|
+
not found among retained scenarios in `<feature-title>` — check for a typo or
|
|
430
|
+
drift between the observed title and the scenario it should describe",
|
|
431
|
+
separate from the "possibly stale" section above. The operator action
|
|
432
|
+
differs (fix title extraction vs. verify a behavior change), so folding the
|
|
433
|
+
two together would obscure which one applies.
|
|
434
|
+
|
|
435
|
+
**Call out `merge`'s skipped duplicate scenarios too (issue #1420).**
|
|
436
|
+
`merge --json`'s `skipped_duplicate_titles` lists every candidate scenario
|
|
437
|
+
that was *not* written — either it matched a title already in the file (the
|
|
438
|
+
scenario is present either way, low stakes), or it collided with another
|
|
439
|
+
candidate authored in the same run (the dropped one is not written anywhere
|
|
440
|
+
and never will be, unless re-authored). Report each as "skipped duplicate:
|
|
441
|
+
`<title>` — a scenario with this exact title already exists in
|
|
442
|
+
`<feature-title>`, or two authored candidates shared it; confirm the
|
|
443
|
+
retained one actually covers the intended behavior before treating the
|
|
444
|
+
surface as covered." Do not fold this into the surface-count summary — a
|
|
445
|
+
dropped candidate is exactly the kind of silent gap this report exists to
|
|
446
|
+
surface.
|
|
447
|
+
|
|
448
|
+
**Call out `gherkin_stub_merge.py`'s skipped duplicate steps too, mirroring
|
|
449
|
+
the scenario-merge callout above (issue #1421).** `merge --json`'s
|
|
450
|
+
`skipped_duplicate_patterns` lists every candidate step that was *not*
|
|
451
|
+
written — either it matched a pattern already bound in the file (the step
|
|
452
|
+
is present either way, low stakes), or it collided with another candidate
|
|
453
|
+
authored in the same run (the dropped one is not written anywhere and never
|
|
454
|
+
will be, unless re-authored). Report each as "skipped duplicate step:
|
|
455
|
+
`<pattern>` — a binding with this exact pattern already exists in `<path>`,
|
|
456
|
+
or two derived candidates shared it; confirm the retained binding actually
|
|
457
|
+
covers the intended step before treating the surface as covered." Do not
|
|
458
|
+
fold this into the surface-count summary — a dropped candidate is exactly
|
|
459
|
+
the kind of silent gap this report exists to surface, the same reasoning
|
|
460
|
+
that already applies to `skipped_duplicate_titles` above.
|
|
461
|
+
|
|
462
|
+
**Call out step-definition merge structural errors, distinctly from the
|
|
463
|
+
scenario-merge callouts above (issue #1421).** When Step 4's
|
|
464
|
+
`gherkin_stub_merge.py merge` invocation exits 2, report it using this exact
|
|
465
|
+
template, naming the concrete problem, file, and sentinel: `"Could not merge
|
|
466
|
+
step-definition stubs into <path>: <language> structure not recognized
|
|
467
|
+
(<sentinel>). No changes were made — fix the file's syntax and re-run, or
|
|
468
|
+
report the file:line if the structure looks valid."` for the two
|
|
469
|
+
step-definition-specific structural sentinels the `stub_extractors` package
|
|
470
|
+
returns (`unbalanced-braces` — the existing file's braces/parens don't
|
|
471
|
+
lexically balance; `dangling-annotation` — a step marker has no attached,
|
|
472
|
+
boundable body). The other four sentinels `gherkin_stub_merge.py` can return
|
|
473
|
+
are **not** step-definition syntax problems and need their own remediation,
|
|
474
|
+
reusing Step 4's own per-cause text rather than the template above:
|
|
475
|
+
`unsafe-path` — "fix how the surface name was derived into a path; do not
|
|
476
|
+
retry with the same value" (a bug in how this skill composed the path, not
|
|
477
|
+
in the operator's file); `malformed-candidates` — "re-author the candidates
|
|
478
|
+
text for that surface and retry" (this skill's own scratch file, not the
|
|
479
|
+
operator's step-definition file); `unreadable-candidates` — "re-check how
|
|
480
|
+
this skill wrote that scratch file for the surface before retrying" (this
|
|
481
|
+
skill's own scratch file was missing or couldn't be read, not the
|
|
482
|
+
operator's step-definition file); `unsupported-extension` — "fix how this
|
|
483
|
+
skill derived `--ext` from the surface's language before retrying" (a bug
|
|
484
|
+
in how this skill chose the extension, not in the operator's file). This is
|
|
485
|
+
a distinct failure mode from the scenario-merge callouts above: no scenario
|
|
486
|
+
was skipped or retained here, the step-definition file was never written at
|
|
487
|
+
all.
|
|
488
|
+
|
|
489
|
+
**`bdd-runner` mode — state completion plainly, as the report's headline
|
|
490
|
+
(issues #1391, #1420).** Choosing `bdd-runner` mode is a decision to end up
|
|
491
|
+
with fully executing, Gherkin-bound tests, not just scaffolded placeholders —
|
|
492
|
+
but this skill's own Step 4 only ever *generates* pending stubs; it never
|
|
493
|
+
fills them in (that happens later, in `/test-improve` Phase 5 or whatever
|
|
494
|
+
follow-up work the operator does after a standalone run). Run the gate:
|
|
495
|
+
|
|
496
|
+
```
|
|
497
|
+
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/gherkin_stub_gate.py" --dir <step-definitions-dir>
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
- **Pending stubs remain → print one consolidated statement as the FIRST
|
|
501
|
+
line of this mode's report**, replacing (not sitting alongside) the
|
|
502
|
+
previous secondary aside about binding status: `This run is not done — N
|
|
503
|
+
step definition(s) pending, listing each file:line the gate names. Run
|
|
504
|
+
/build against the derived scenarios to fill them in.` This applies identically
|
|
505
|
+
regardless of caller (standalone or a `/test-improve` Phase 3 sub-step) —
|
|
506
|
+
it is one shared code path, not a standalone-specific branch. **No other
|
|
507
|
+
part of this report** (the surface-count summary, the characterization
|
|
508
|
+
call-out, the possibly-stale-scenario section, the failure-path gate
|
|
509
|
+
section) may use unqualified "complete"/"done"/"success" language for this
|
|
510
|
+
run when this statement applies — the not-done headline governs the whole
|
|
511
|
+
report's tone, not just its own line.
|
|
512
|
+
- **Proactive hand-off (standalone invocations only).** After printing the
|
|
513
|
+
statement, ask the operator whether to continue into `/build` now,
|
|
514
|
+
rather than only printing the recommendation and moving on. When
|
|
515
|
+
gherkin-derive runs as a `/test-improve` Phase 3 sub-step, **do not ask**
|
|
516
|
+
— Phase 3's own human gate, Phase 4's triage, and Phase 5's fill-in loop
|
|
517
|
+
already own that decision (see below).
|
|
518
|
+
- **Non-interactive fallback.** When no interactive response is possible
|
|
519
|
+
(headless/CI invocation), print the statement and the `/build`
|
|
520
|
+
recommendation in full and never ask the question — it is best-effort
|
|
521
|
+
and never blocks the run.
|
|
522
|
+
- **Never fills in an already-pending stub itself.** Reporting this state
|
|
523
|
+
never modifies a step-definition file or clears an existing pending
|
|
524
|
+
marker — that is distinct from, and never blocks, Step 4's normal job of
|
|
525
|
+
scaffolding *new* pending stubs for newly-discovered scenarios, which
|
|
526
|
+
legitimately changes the pending-stub count on an ordinary re-run.
|
|
527
|
+
- **Zero pending stubs → print `bdd-runner binding complete — 0 pending step
|
|
528
|
+
definitions`**, with no recommendation and no continue-into-`/build`
|
|
529
|
+
question.
|
|
530
|
+
- **The gate exits 2 when it did not run** (no step-definition files were
|
|
531
|
+
found under `--dir` — most often a mistyped or mis-probed directory, not
|
|
532
|
+
an empty-but-legitimate `0 pending`). Never report this as `bdd-runner
|
|
533
|
+
binding complete`; print "gate did not run — no step-definition files
|
|
534
|
+
found under `<dir>`, re-check the step-definitions directory" instead.
|
|
535
|
+
- Skip entirely in `none` and `xunit-with-annotations` modes (no step
|
|
536
|
+
definitions are generated in either).
|
|
537
|
+
|
|
538
|
+
**Consistency with `/test-improve` Phase 5's own gate.** Phase 3's headline
|
|
539
|
+
statement and Phase 5's later hard block (`../test-improve/SKILL.md`'s Phase 5
|
|
540
|
+
section) describe the *same* pending-stub state at two different
|
|
541
|
+
checkpoints, not two different requirements — both name `/build`
|
|
542
|
+
(Phase 5's own per-Story build loop) as the remediation, so an operator never
|
|
543
|
+
receives two conflicting instructions for the same fact.
|
|
544
|
+
|
|
545
|
+
**Every mode that writes `.feature` files — report the failure-path
|
|
546
|
+
coverage gate (issue #1420).** Unlike the pending-stub gate above, which is
|
|
547
|
+
`bdd-runner`-only, this one is **not `bdd-runner`-only** — `xunit-with-annotations`
|
|
548
|
+
mode is in scope here too, since the coverage gap this checks for exists
|
|
549
|
+
whenever `.feature` files exist, independent of whether `bdd-runner` mode
|
|
550
|
+
wired a runner:
|
|
551
|
+
|
|
552
|
+
```
|
|
553
|
+
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/gherkin_failure_path_gate.py" --dir <feature-files-dir>
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
Print the gate's result as its own report section, never folded into the
|
|
557
|
+
general summary: `N Feature block(s) missing a failure-path scenario`,
|
|
558
|
+
listing each `file:line — <feature title>` the gate names, or `OK: all
|
|
559
|
+
Feature block(s) have a failure-path scenario` when it exits 0. **A third
|
|
560
|
+
outcome exists — exit 2 means the gate did not run** (no `.feature` files
|
|
561
|
+
were found under the scanned directory, most often a mistyped or
|
|
562
|
+
mis-probed `--dir`); report this as "gate did not run — no `.feature`
|
|
563
|
+
files found under `<dir>`, re-check the feature-files directory," never as
|
|
564
|
+
an `OK`/all-clear (a scan of zero files finding zero problems is not the
|
|
565
|
+
same as zero problems). Skip entirely in `none` mode (no `.feature` files
|
|
566
|
+
are written).
|
|
567
|
+
|
|
568
|
+
**Every mode that writes `.feature` files — report the cross-feature
|
|
569
|
+
duplicate-title gate (issue #1526).** Same scope as the failure-path gate
|
|
570
|
+
immediately above — not `bdd-runner`-only, since the collision this checks
|
|
571
|
+
for exists whenever `.feature` files exist:
|
|
572
|
+
|
|
573
|
+
```
|
|
574
|
+
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/gherkin_cross_feature_duplicate_titles_gate.py" --dir <feature-files-dir>
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
Print the gate's result as its own report section, never folded into the
|
|
578
|
+
general summary: `OK: no scenario title is duplicated across distinct
|
|
579
|
+
Feature blocks` when it exits 0, or `N scenario title(s) duplicated across
|
|
580
|
+
distinct Feature blocks` when it exits 1, listing each finding as `"<title>"
|
|
581
|
+
appears in <feature-title-A> (<file>:<line>) and <feature-title-B>
|
|
582
|
+
(<file>:<line>) — confirm these are genuinely the same behavior, or rename
|
|
583
|
+
one to be surface-specific`. **A third outcome exists — exit 2 means the
|
|
584
|
+
gate did not run** (no `.feature` files were found under the scanned
|
|
585
|
+
directory, most often a mistyped or mis-probed `--dir`); report this as
|
|
586
|
+
"gate did not run — no `.feature` files found under `<dir>`, re-check the
|
|
587
|
+
feature-files directory," never as an `OK`/all-clear. Skip entirely in
|
|
588
|
+
`none` mode (no `.feature` files are written).
|
|
589
|
+
|
|
590
|
+
**Every mode — report the analysis-coverage gate (issue #1450).** Unlike
|
|
591
|
+
the two gates above, this one runs even in `none` mode: the surface
|
|
592
|
+
inventory (and its `## Analysis Coverage` section) is written regardless of
|
|
593
|
+
binding mode, since the mandatory in-depth analysis (Step 2) happens before
|
|
594
|
+
mode-specific output does:
|
|
595
|
+
|
|
596
|
+
```
|
|
597
|
+
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/gherkin_analysis_coverage_gate.py" --file <inventory-path>
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
Print the gate's result as its own report section: `OK: all 8 analysis
|
|
601
|
+
categories recorded` when it exits 0, or `N analysis categor(y/ies) missing
|
|
602
|
+
from the coverage record`, listing each missing category, when it exits 1.
|
|
603
|
+
**A third outcome exists — exit 2 means the gate did not run** (no
|
|
604
|
+
`## Analysis Coverage` section was found in the inventory, or the inventory
|
|
605
|
+
file itself is missing); report this as "gate did not run — no Analysis
|
|
606
|
+
Coverage section found in `<path>`, re-check the surface inventory," never
|
|
607
|
+
as an `OK`/all-clear.
|
|
608
|
+
|
|
609
|
+
## Key differences from `/gherkin-public`
|
|
610
|
+
|
|
611
|
+
- Does **not** require any prior assessment file — derives the surface itself
|
|
612
|
+
from code.
|
|
613
|
+
- Does **not** create tracker Stories — the calling orchestrator (e.g.
|
|
614
|
+
`/test-improve` Phase 4) owns triage.
|
|
615
|
+
- Usable standalone or as `/test-improve` Phase 3.
|
|
616
|
+
- `/gherkin-public` remains a separate public-boundary Gherkin authoring
|
|
617
|
+
worker.
|
|
618
|
+
|
|
619
|
+
## Notes
|
|
620
|
+
|
|
621
|
+
- Characterization scenarios capture *what the code does now* — never treat an
|
|
622
|
+
existing test as ground truth on its own. They are hypotheses about intended
|
|
623
|
+
behavior, not confirmed specs: cross-check them against any other signal
|
|
624
|
+
(docstrings, comments, adjacent OpenAPI/route info, status-code conventions),
|
|
625
|
+
record "none found" when no cross-check exists, and call them out separately
|
|
626
|
+
in the Step 6 report so the operator must affirmatively accept each one
|
|
627
|
+
before it becomes living documentation.
|
|
628
|
+
- Where a UI flow cannot be inferred from code alone, emit a stub `.feature` with
|
|
629
|
+
the header and a `# TODO: hand-author scenarios here` block — surface the gap
|
|
630
|
+
rather than invent steps.
|