phase-loop-runtime 0.2.0__py3-none-any.whl
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.
- phase_loop_runtime/__init__.py +20 -0
- phase_loop_runtime/_contract_docs/phase-loop/extraction-readiness.md +90 -0
- phase_loop_runtime/_contract_docs/phase-loop/granular-execution-policy.md +137 -0
- phase_loop_runtime/_contract_docs/phase-loop/harness-capability-matrix.md +510 -0
- phase_loop_runtime/_contract_docs/phase-loop/harness-skill-matrix.md +125 -0
- phase_loop_runtime/_contract_docs/phase-loop/harness-substrate-manifest.md +232 -0
- phase_loop_runtime/_contract_docs/phase-loop/pi-loop-control.md +247 -0
- phase_loop_runtime/_contract_docs/phase-loop/protocol.md +2759 -0
- phase_loop_runtime/_contract_docs/phase-loop/runtime-boundary.md +289 -0
- phase_loop_runtime/_contract_docs/phase-loop/spec-discovery-roots.md +47 -0
- phase_loop_runtime/_contract_docs/phase-loop/substrate-soak-governed-pipeline.md +42 -0
- phase_loop_runtime/_contract_docs/phase-loop/substrate-soak-portal-projection.md +34 -0
- phase_loop_runtime/_contract_docs/phase-loop/substrate-soak-regenesis.md +29 -0
- phase_loop_runtime/_contract_docs/phase-loop/substrate-soak-report.md +32 -0
- phase_loop_runtime/_contract_docs/runtime/verification-evidence-contract.md +52 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/borderline/borderline-mixed-signals/commands.txt +2 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/borderline/borderline-mixed-signals/manifest.json +16 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/borderline/borderline-mixed-signals/mixed.json +5 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/borderline/borderline-provider-timeout/manifest.json +16 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/borderline/borderline-provider-timeout/timeout-note.txt +2 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/borderline/borderline-redacted-summary/manifest.json +16 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/borderline/borderline-redacted-summary/redacted-summary.json +6 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/borderline/borderline-small-sample/manifest.json +16 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/borderline/borderline-small-sample/sample.json +7 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/borderline/borderline-threshold-edge/edge.txt +2 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/borderline/borderline-threshold-edge/manifest.json +16 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-fake/fake-duplicate-png/manifest.json +16 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-fake/fake-duplicate-png/shot-a.txt +1 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-fake/fake-duplicate-png/shot-b.txt +1 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-fake/fake-duplicate-png/shot-c.txt +1 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-fake/fake-missing-references/claimed-results.json +5 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-fake/fake-missing-references/manifest.json +16 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-fake/fake-subtle-low-variance/manifest.json +16 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-fake/fake-subtle-low-variance/metrics.json +9 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-fake/fake-templated-prose/findings.md +10 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-fake/fake-templated-prose/manifest.json +16 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-fake/fake-uniform-scores/manifest.json +16 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-fake/fake-uniform-scores/scores.json +4 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-fake/fake-uniform-scores/summary.txt +1 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-real/real-adoption-bundle/bundle-check.json +8 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-real/real-adoption-bundle/manifest.json +16 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-real/real-adoption-bundle/operator-note.txt +2 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-real/real-handoff-ledger/events-sample.jsonl +3 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-real/real-handoff-ledger/manifest.json +16 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-real/real-handoff-ledger/receipt.txt +1 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-real/real-runner-diff/evidence.json +13 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-real/real-runner-diff/manifest.json +16 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-real/real-runner-diff/summary.txt +2 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-real/real-test-matrix/manifest.json +16 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-real/real-test-matrix/matrix.json +9 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-real/real-test-matrix/notes.md +4 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-real/real-ui-screenshot-standin/console-summary.txt +2 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-real/real-ui-screenshot-standin/manifest.json +16 -0
- phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-real/real-ui-screenshot-standin/screenshot-standin.ppm +5 -0
- phase_loop_runtime/adoption_bundle.py +273 -0
- phase_loop_runtime/advisor_board/CONTRACTS.md +257 -0
- phase_loop_runtime/advisor_board/__init__.py +288 -0
- phase_loop_runtime/advisor_board/backing.py +137 -0
- phase_loop_runtime/advisor_board/backing_omnigent.py +498 -0
- phase_loop_runtime/advisor_board/config.py +225 -0
- phase_loop_runtime/advisor_board/events.py +115 -0
- phase_loop_runtime/advisor_board/fixtures/advisor-boards.example.toml +59 -0
- phase_loop_runtime/advisor_board/fixtures.py +91 -0
- phase_loop_runtime/advisor_board/harness_mapping.py +125 -0
- phase_loop_runtime/advisor_board/matrix.py +146 -0
- phase_loop_runtime/advisor_board/observability.py +481 -0
- phase_loop_runtime/advisor_board/presets.py +188 -0
- phase_loop_runtime/advisor_board/registries.py +309 -0
- phase_loop_runtime/advisor_board/resolver.py +253 -0
- phase_loop_runtime/advisor_board/schema.py +269 -0
- phase_loop_runtime/advisor_board/standin.py +166 -0
- phase_loop_runtime/advisor_board/validation.py +159 -0
- phase_loop_runtime/agent_runtime_provider.py +676 -0
- phase_loop_runtime/baml_modular.py +656 -0
- phase_loop_runtime/baml_src/dotfiles_adoption_manifest.baml +37 -0
- phase_loop_runtime/baml_src/dotfiles_c4_document.baml +14 -0
- phase_loop_runtime/baml_src/dotfiles_plan_manifest.baml +50 -0
- phase_loop_runtime/baml_src/dotfiles_runtime_projection.baml +16 -0
- phase_loop_runtime/baml_src/dotfiles_task_catalog.baml +20 -0
- phase_loop_runtime/baml_src/emit_phase_closeout.baml +86 -0
- phase_loop_runtime/baml_src/evaluate_suspected_fake_evidence.baml +36 -0
- phase_loop_runtime/baml_src/verification_evidence.baml +40 -0
- phase_loop_runtime/broker.py +181 -0
- phase_loop_runtime/build_bundle.py +294 -0
- phase_loop_runtime/capability_registry.py +835 -0
- phase_loop_runtime/classifier.py +87 -0
- phase_loop_runtime/claude_agent_view.py +625 -0
- phase_loop_runtime/claude_channel_sidecar.py +1086 -0
- phase_loop_runtime/cli.py +2599 -0
- phase_loop_runtime/closeout.py +865 -0
- phase_loop_runtime/closeout_classifier.py +120 -0
- phase_loop_runtime/closeout_evidence_audit.py +112 -0
- phase_loop_runtime/closeout_validation.py +144 -0
- phase_loop_runtime/closeout_validators.py +203 -0
- phase_loop_runtime/consiliency_gates.py +374 -0
- phase_loop_runtime/consiliency_ingest.py +399 -0
- phase_loop_runtime/consiliency_layout.py +176 -0
- phase_loop_runtime/consiliency_scaffold.py +305 -0
- phase_loop_runtime/cross_repo_channel.py +331 -0
- phase_loop_runtime/discovery.py +2368 -0
- phase_loop_runtime/dispatch_lock.py +167 -0
- phase_loop_runtime/doc_delta_validator.py +98 -0
- phase_loop_runtime/docs_audit.py +285 -0
- phase_loop_runtime/docs_freshness.py +468 -0
- phase_loop_runtime/docs_surfaces.py +150 -0
- phase_loop_runtime/dotfiles_profile_plugin.py +96 -0
- phase_loop_runtime/events.py +154 -0
- phase_loop_runtime/events_migration.py +96 -0
- phase_loop_runtime/evidence_audit.py +1082 -0
- phase_loop_runtime/evidence_audit_config.py +172 -0
- phase_loop_runtime/fleet_map.py +426 -0
- phase_loop_runtime/fleet_metrics.py +298 -0
- phase_loop_runtime/fleet_metrics_export.py +196 -0
- phase_loop_runtime/git_discipline.py +479 -0
- phase_loop_runtime/git_ops.py +122 -0
- phase_loop_runtime/git_topology.py +252 -0
- phase_loop_runtime/governed_bundle.py +137 -0
- phase_loop_runtime/governed_premerge.py +219 -0
- phase_loop_runtime/governed_review.py +264 -0
- phase_loop_runtime/handoff.py +932 -0
- phase_loop_runtime/handoff_path.py +14 -0
- phase_loop_runtime/injection.py +740 -0
- phase_loop_runtime/install_status.py +88 -0
- phase_loop_runtime/lane_scheduler.py +317 -0
- phase_loop_runtime/launcher.py +2760 -0
- phase_loop_runtime/lease_store.py +553 -0
- phase_loop_runtime/maintenance.py +401 -0
- phase_loop_runtime/migrate_handoffs.py +201 -0
- phase_loop_runtime/models.py +2144 -0
- phase_loop_runtime/observability.py +1290 -0
- phase_loop_runtime/panel_invoker.py +1638 -0
- phase_loop_runtime/phase_loop_drift_audit.py +388 -0
- phase_loop_runtime/phase_worktree_executor.py +433 -0
- phase_loop_runtime/pipeline_adapter/__init__.py +12 -0
- phase_loop_runtime/pipeline_adapter/branch_ops.py +274 -0
- phase_loop_runtime/pipeline_adapter/flag.py +55 -0
- phase_loop_runtime/pipeline_adapter/markers.py +13 -0
- phase_loop_runtime/pipeline_adapter/merge_policy.py +72 -0
- phase_loop_runtime/pipeline_adapter/ratification.py +100 -0
- phase_loop_runtime/pipeline_adapter/sibling_matcher.py +123 -0
- phase_loop_runtime/plan_ir.py +523 -0
- phase_loop_runtime/plan_manifest.py +415 -0
- phase_loop_runtime/planner_validation.py +176 -0
- phase_loop_runtime/profiles.py +462 -0
- phase_loop_runtime/prompts.py +365 -0
- phase_loop_runtime/provenance.py +165 -0
- phase_loop_runtime/publishing.py +339 -0
- phase_loop_runtime/py.typed +1 -0
- phase_loop_runtime/reconcile.py +1550 -0
- phase_loop_runtime/redaction.py +184 -0
- phase_loop_runtime/reflection_sync.py +293 -0
- phase_loop_runtime/release_guard.py +186 -0
- phase_loop_runtime/render.py +432 -0
- phase_loop_runtime/repo_validation.py +427 -0
- phase_loop_runtime/review_summary.py +150 -0
- phase_loop_runtime/roadmap_lint.py +425 -0
- phase_loop_runtime/route_log.py +59 -0
- phase_loop_runtime/route_policy/__init__.py +11 -0
- phase_loop_runtime/route_policy/fixtures/route_selection.golden.json +263 -0
- phase_loop_runtime/runner.py +8400 -0
- phase_loop_runtime/runtime_paths.py +225 -0
- phase_loop_runtime/runtime_projection.py +113 -0
- phase_loop_runtime/runtime_resources.py +36 -0
- phase_loop_runtime/schema_export.py +292 -0
- phase_loop_runtime/schemas/phase_loop_closeout.schema.json +366 -0
- phase_loop_runtime/skill_install.py +176 -0
- phase_loop_runtime/skill_inventory.py +662 -0
- phase_loop_runtime/skill_paths.py +42 -0
- phase_loop_runtime/skill_sources_plugin.py +37 -0
- phase_loop_runtime/skills_bundle/claude-advisor-board/README.md +1 -0
- phase_loop_runtime/skills_bundle/claude-advisor-board/SKILL.md +38 -0
- phase_loop_runtime/skills_bundle/claude-advisor-panel/README.md +1 -0
- phase_loop_runtime/skills_bundle/claude-advisor-panel/SKILL.md +38 -0
- phase_loop_runtime/skills_bundle/claude-execute-detailed/README.md +1 -0
- phase_loop_runtime/skills_bundle/claude-execute-detailed/SKILL.md +152 -0
- phase_loop_runtime/skills_bundle/claude-execute-phase/README.md +1 -0
- phase_loop_runtime/skills_bundle/claude-execute-phase/SKILL.md +745 -0
- phase_loop_runtime/skills_bundle/claude-execute-phase/scripts/allocate_worktree_name.sh +33 -0
- phase_loop_runtime/skills_bundle/claude-execute-phase/scripts/audit_lane_file_touches.py +197 -0
- phase_loop_runtime/skills_bundle/claude-execute-phase/scripts/cleanup_lane_worktrees.sh +103 -0
- phase_loop_runtime/skills_bundle/claude-execute-phase/scripts/parent_tree_leakage_check.sh +125 -0
- phase_loop_runtime/skills_bundle/claude-execute-phase/scripts/post_merge_import_smoke.sh +62 -0
- phase_loop_runtime/skills_bundle/claude-execute-phase/scripts/pre_merge_destructiveness_check.sh +127 -0
- phase_loop_runtime/skills_bundle/claude-execute-phase/scripts/resolve_branch_from_sha.sh +51 -0
- phase_loop_runtime/skills_bundle/claude-execute-phase/scripts/state.py +274 -0
- phase_loop_runtime/skills_bundle/claude-execute-phase/scripts/sweep_stale_worktrees.sh +62 -0
- phase_loop_runtime/skills_bundle/claude-execute-phase/scripts/team_teardown.sh +32 -0
- phase_loop_runtime/skills_bundle/claude-execute-phase/scripts/validate_plan_doc.py +642 -0
- phase_loop_runtime/skills_bundle/claude-execute-phase/scripts/verify_harness.sh +96 -0
- phase_loop_runtime/skills_bundle/claude-phase-loop/README.md +1 -0
- phase_loop_runtime/skills_bundle/claude-phase-loop/SKILL.md +115 -0
- phase_loop_runtime/skills_bundle/claude-phase-roadmap-builder/README.md +1 -0
- phase_loop_runtime/skills_bundle/claude-phase-roadmap-builder/SKILL.md +439 -0
- phase_loop_runtime/skills_bundle/claude-phase-roadmap-builder/assets/review_prompt.md +19 -0
- phase_loop_runtime/skills_bundle/claude-phase-roadmap-builder/references/parallelization-heuristics.md +111 -0
- phase_loop_runtime/skills_bundle/claude-phase-roadmap-builder/references/roadmap-template.md +193 -0
- phase_loop_runtime/skills_bundle/claude-phase-roadmap-builder/scripts/validate_roadmap.py +32 -0
- phase_loop_runtime/skills_bundle/claude-plan-detailed/README.md +1 -0
- phase_loop_runtime/skills_bundle/claude-plan-detailed/SKILL.md +334 -0
- phase_loop_runtime/skills_bundle/claude-plan-detailed/assets/review_prompt.md +25 -0
- phase_loop_runtime/skills_bundle/claude-plan-phase/README.md +1 -0
- phase_loop_runtime/skills_bundle/claude-plan-phase/SKILL.md +776 -0
- phase_loop_runtime/skills_bundle/claude-plan-phase/assets/review_prompt.md +17 -0
- phase_loop_runtime/skills_bundle/claude-plan-phase/scripts/validate_plan_doc.py +1092 -0
- phase_loop_runtime/skills_bundle/claude-run-train/README.md +1 -0
- phase_loop_runtime/skills_bundle/claude-run-train/SKILL.md +75 -0
- phase_loop_runtime/skills_bundle/claude-skill-editor/README.md +1 -0
- phase_loop_runtime/skills_bundle/claude-skill-editor/SKILL.md +243 -0
- phase_loop_runtime/skills_bundle/claude-skill-editor/assets/editor_prompt.md +72 -0
- phase_loop_runtime/skills_bundle/claude-skill-improvement-planner/README.md +1 -0
- phase_loop_runtime/skills_bundle/claude-skill-improvement-planner/SKILL.md +249 -0
- phase_loop_runtime/skills_bundle/claude-skill-improvement-planner/assets/aggregator_prompt.md +79 -0
- phase_loop_runtime/skills_bundle/claude-task-contextualizer/README.md +1 -0
- phase_loop_runtime/skills_bundle/claude-task-contextualizer/SKILL.md +74 -0
- phase_loop_runtime/skills_bundle/claude-task-contextualizer/references/task-templates.md +103 -0
- phase_loop_runtime/skills_bundle/codex-advisor-board/README.md +1 -0
- phase_loop_runtime/skills_bundle/codex-advisor-board/SKILL.md +38 -0
- phase_loop_runtime/skills_bundle/codex-advisor-panel/README.md +1 -0
- phase_loop_runtime/skills_bundle/codex-advisor-panel/SKILL.md +38 -0
- phase_loop_runtime/skills_bundle/codex-execute-detailed/README.md +1 -0
- phase_loop_runtime/skills_bundle/codex-execute-detailed/SKILL.md +154 -0
- phase_loop_runtime/skills_bundle/codex-execute-phase/README.md +1 -0
- phase_loop_runtime/skills_bundle/codex-execute-phase/SKILL.md +231 -0
- phase_loop_runtime/skills_bundle/codex-execute-phase/scripts/allocate_worktree_name.sh +33 -0
- phase_loop_runtime/skills_bundle/codex-execute-phase/scripts/audit_lane_file_touches.py +197 -0
- phase_loop_runtime/skills_bundle/codex-execute-phase/scripts/cleanup_lane_worktrees.sh +103 -0
- phase_loop_runtime/skills_bundle/codex-execute-phase/scripts/parent_tree_leakage_check.sh +125 -0
- phase_loop_runtime/skills_bundle/codex-execute-phase/scripts/post_merge_import_smoke.sh +62 -0
- phase_loop_runtime/skills_bundle/codex-execute-phase/scripts/pre_merge_destructiveness_check.sh +127 -0
- phase_loop_runtime/skills_bundle/codex-execute-phase/scripts/resolve_branch_from_sha.sh +51 -0
- phase_loop_runtime/skills_bundle/codex-execute-phase/scripts/state.py +274 -0
- phase_loop_runtime/skills_bundle/codex-execute-phase/scripts/sweep_stale_worktrees.sh +62 -0
- phase_loop_runtime/skills_bundle/codex-execute-phase/scripts/team_teardown.sh +32 -0
- phase_loop_runtime/skills_bundle/codex-execute-phase/scripts/validate_plan_doc.py +642 -0
- phase_loop_runtime/skills_bundle/codex-execute-phase/scripts/verify_harness.sh +96 -0
- phase_loop_runtime/skills_bundle/codex-phase-loop/README.md +1 -0
- phase_loop_runtime/skills_bundle/codex-phase-loop/SKILL.md +248 -0
- phase_loop_runtime/skills_bundle/codex-phase-roadmap-builder/README.md +1 -0
- phase_loop_runtime/skills_bundle/codex-phase-roadmap-builder/SKILL.md +150 -0
- phase_loop_runtime/skills_bundle/codex-phase-roadmap-builder/assets/review_prompt.md +19 -0
- phase_loop_runtime/skills_bundle/codex-phase-roadmap-builder/references/parallelization-heuristics.md +111 -0
- phase_loop_runtime/skills_bundle/codex-phase-roadmap-builder/references/roadmap-template.md +193 -0
- phase_loop_runtime/skills_bundle/codex-phase-roadmap-builder/scripts/validate_roadmap.py +32 -0
- phase_loop_runtime/skills_bundle/codex-plan-detailed/README.md +1 -0
- phase_loop_runtime/skills_bundle/codex-plan-detailed/SKILL.md +119 -0
- phase_loop_runtime/skills_bundle/codex-plan-detailed/assets/review_prompt.md +25 -0
- phase_loop_runtime/skills_bundle/codex-plan-phase/README.md +1 -0
- phase_loop_runtime/skills_bundle/codex-plan-phase/SKILL.md +307 -0
- phase_loop_runtime/skills_bundle/codex-plan-phase/assets/review_prompt.md +17 -0
- phase_loop_runtime/skills_bundle/codex-plan-phase/scripts/validate_plan_doc.py +1092 -0
- phase_loop_runtime/skills_bundle/codex-run-train/README.md +1 -0
- phase_loop_runtime/skills_bundle/codex-run-train/SKILL.md +75 -0
- phase_loop_runtime/skills_bundle/codex-skill-editor/README.md +1 -0
- phase_loop_runtime/skills_bundle/codex-skill-editor/SKILL.md +94 -0
- phase_loop_runtime/skills_bundle/codex-skill-editor/assets/editor_prompt.md +72 -0
- phase_loop_runtime/skills_bundle/codex-skill-improvement-planner/README.md +1 -0
- phase_loop_runtime/skills_bundle/codex-skill-improvement-planner/SKILL.md +114 -0
- phase_loop_runtime/skills_bundle/codex-skill-improvement-planner/assets/aggregator_prompt.md +79 -0
- phase_loop_runtime/skills_bundle/codex-task-contextualizer/README.md +1 -0
- phase_loop_runtime/skills_bundle/codex-task-contextualizer/SKILL.md +102 -0
- phase_loop_runtime/skills_bundle/codex-task-contextualizer/references/task-templates.md +103 -0
- phase_loop_runtime/skills_bundle/gemini-advisor-board/README.md +1 -0
- phase_loop_runtime/skills_bundle/gemini-advisor-board/SKILL.md +38 -0
- phase_loop_runtime/skills_bundle/gemini-advisor-panel/README.md +1 -0
- phase_loop_runtime/skills_bundle/gemini-advisor-panel/SKILL.md +38 -0
- phase_loop_runtime/skills_bundle/gemini-execute-detailed/README.md +1 -0
- phase_loop_runtime/skills_bundle/gemini-execute-detailed/SKILL.md +144 -0
- phase_loop_runtime/skills_bundle/gemini-execute-phase/README.md +1 -0
- phase_loop_runtime/skills_bundle/gemini-execute-phase/SKILL.md +198 -0
- phase_loop_runtime/skills_bundle/gemini-execute-phase/scripts/allocate_worktree_name.sh +33 -0
- phase_loop_runtime/skills_bundle/gemini-execute-phase/scripts/audit_lane_file_touches.py +197 -0
- phase_loop_runtime/skills_bundle/gemini-execute-phase/scripts/cleanup_lane_worktrees.sh +103 -0
- phase_loop_runtime/skills_bundle/gemini-execute-phase/scripts/parent_tree_leakage_check.sh +125 -0
- phase_loop_runtime/skills_bundle/gemini-execute-phase/scripts/post_merge_import_smoke.sh +62 -0
- phase_loop_runtime/skills_bundle/gemini-execute-phase/scripts/pre_merge_destructiveness_check.sh +127 -0
- phase_loop_runtime/skills_bundle/gemini-execute-phase/scripts/resolve_branch_from_sha.sh +51 -0
- phase_loop_runtime/skills_bundle/gemini-execute-phase/scripts/state.py +274 -0
- phase_loop_runtime/skills_bundle/gemini-execute-phase/scripts/sweep_stale_worktrees.sh +62 -0
- phase_loop_runtime/skills_bundle/gemini-execute-phase/scripts/team_teardown.sh +32 -0
- phase_loop_runtime/skills_bundle/gemini-execute-phase/scripts/validate_plan_doc.py +642 -0
- phase_loop_runtime/skills_bundle/gemini-execute-phase/scripts/verify_harness.sh +96 -0
- phase_loop_runtime/skills_bundle/gemini-phase-loop/README.md +1 -0
- phase_loop_runtime/skills_bundle/gemini-phase-loop/SKILL.md +111 -0
- phase_loop_runtime/skills_bundle/gemini-phase-roadmap-builder/README.md +1 -0
- phase_loop_runtime/skills_bundle/gemini-phase-roadmap-builder/SKILL.md +147 -0
- phase_loop_runtime/skills_bundle/gemini-phase-roadmap-builder/assets/review_prompt.md +19 -0
- phase_loop_runtime/skills_bundle/gemini-phase-roadmap-builder/references/parallelization-heuristics.md +111 -0
- phase_loop_runtime/skills_bundle/gemini-phase-roadmap-builder/references/roadmap-template.md +193 -0
- phase_loop_runtime/skills_bundle/gemini-phase-roadmap-builder/scripts/validate_roadmap.py +32 -0
- phase_loop_runtime/skills_bundle/gemini-plan-detailed/README.md +1 -0
- phase_loop_runtime/skills_bundle/gemini-plan-detailed/SKILL.md +119 -0
- phase_loop_runtime/skills_bundle/gemini-plan-detailed/assets/review_prompt.md +25 -0
- phase_loop_runtime/skills_bundle/gemini-plan-phase/README.md +1 -0
- phase_loop_runtime/skills_bundle/gemini-plan-phase/SKILL.md +217 -0
- phase_loop_runtime/skills_bundle/gemini-plan-phase/assets/review_prompt.md +17 -0
- phase_loop_runtime/skills_bundle/gemini-plan-phase/scripts/validate_plan_doc.py +1092 -0
- phase_loop_runtime/skills_bundle/gemini-run-train/README.md +1 -0
- phase_loop_runtime/skills_bundle/gemini-run-train/SKILL.md +75 -0
- phase_loop_runtime/skills_bundle/gemini-skill-editor/README.md +1 -0
- phase_loop_runtime/skills_bundle/gemini-skill-editor/SKILL.md +87 -0
- phase_loop_runtime/skills_bundle/gemini-skill-editor/assets/editor_prompt.md +72 -0
- phase_loop_runtime/skills_bundle/gemini-skill-improvement-planner/README.md +1 -0
- phase_loop_runtime/skills_bundle/gemini-skill-improvement-planner/SKILL.md +109 -0
- phase_loop_runtime/skills_bundle/gemini-skill-improvement-planner/assets/aggregator_prompt.md +79 -0
- phase_loop_runtime/skills_bundle/gemini-task-contextualizer/README.md +1 -0
- phase_loop_runtime/skills_bundle/gemini-task-contextualizer/SKILL.md +98 -0
- phase_loop_runtime/skills_bundle/gemini-task-contextualizer/references/task-templates.md +103 -0
- phase_loop_runtime/skills_bundle/opencode-advisor-board/README.md +1 -0
- phase_loop_runtime/skills_bundle/opencode-advisor-board/SKILL.md +38 -0
- phase_loop_runtime/skills_bundle/opencode-advisor-panel/README.md +1 -0
- phase_loop_runtime/skills_bundle/opencode-advisor-panel/SKILL.md +38 -0
- phase_loop_runtime/skills_bundle/opencode-execute-detailed/README.md +1 -0
- phase_loop_runtime/skills_bundle/opencode-execute-detailed/SKILL.md +144 -0
- phase_loop_runtime/skills_bundle/opencode-execute-phase/README.md +1 -0
- phase_loop_runtime/skills_bundle/opencode-execute-phase/SKILL.md +196 -0
- phase_loop_runtime/skills_bundle/opencode-execute-phase/scripts/allocate_worktree_name.sh +33 -0
- phase_loop_runtime/skills_bundle/opencode-execute-phase/scripts/audit_lane_file_touches.py +197 -0
- phase_loop_runtime/skills_bundle/opencode-execute-phase/scripts/cleanup_lane_worktrees.sh +103 -0
- phase_loop_runtime/skills_bundle/opencode-execute-phase/scripts/parent_tree_leakage_check.sh +125 -0
- phase_loop_runtime/skills_bundle/opencode-execute-phase/scripts/post_merge_import_smoke.sh +62 -0
- phase_loop_runtime/skills_bundle/opencode-execute-phase/scripts/pre_merge_destructiveness_check.sh +127 -0
- phase_loop_runtime/skills_bundle/opencode-execute-phase/scripts/resolve_branch_from_sha.sh +51 -0
- phase_loop_runtime/skills_bundle/opencode-execute-phase/scripts/state.py +274 -0
- phase_loop_runtime/skills_bundle/opencode-execute-phase/scripts/sweep_stale_worktrees.sh +62 -0
- phase_loop_runtime/skills_bundle/opencode-execute-phase/scripts/team_teardown.sh +32 -0
- phase_loop_runtime/skills_bundle/opencode-execute-phase/scripts/validate_plan_doc.py +642 -0
- phase_loop_runtime/skills_bundle/opencode-execute-phase/scripts/verify_harness.sh +96 -0
- phase_loop_runtime/skills_bundle/opencode-phase-loop/README.md +1 -0
- phase_loop_runtime/skills_bundle/opencode-phase-loop/SKILL.md +113 -0
- phase_loop_runtime/skills_bundle/opencode-phase-roadmap-builder/README.md +1 -0
- phase_loop_runtime/skills_bundle/opencode-phase-roadmap-builder/SKILL.md +147 -0
- phase_loop_runtime/skills_bundle/opencode-phase-roadmap-builder/assets/review_prompt.md +19 -0
- phase_loop_runtime/skills_bundle/opencode-phase-roadmap-builder/references/parallelization-heuristics.md +111 -0
- phase_loop_runtime/skills_bundle/opencode-phase-roadmap-builder/references/roadmap-template.md +193 -0
- phase_loop_runtime/skills_bundle/opencode-phase-roadmap-builder/scripts/validate_roadmap.py +32 -0
- phase_loop_runtime/skills_bundle/opencode-plan-detailed/README.md +1 -0
- phase_loop_runtime/skills_bundle/opencode-plan-detailed/SKILL.md +119 -0
- phase_loop_runtime/skills_bundle/opencode-plan-detailed/assets/review_prompt.md +25 -0
- phase_loop_runtime/skills_bundle/opencode-plan-phase/README.md +1 -0
- phase_loop_runtime/skills_bundle/opencode-plan-phase/SKILL.md +211 -0
- phase_loop_runtime/skills_bundle/opencode-plan-phase/assets/review_prompt.md +17 -0
- phase_loop_runtime/skills_bundle/opencode-plan-phase/scripts/validate_plan_doc.py +1092 -0
- phase_loop_runtime/skills_bundle/opencode-run-train/README.md +1 -0
- phase_loop_runtime/skills_bundle/opencode-run-train/SKILL.md +75 -0
- phase_loop_runtime/skills_bundle/opencode-skill-editor/README.md +1 -0
- phase_loop_runtime/skills_bundle/opencode-skill-editor/SKILL.md +87 -0
- phase_loop_runtime/skills_bundle/opencode-skill-editor/assets/editor_prompt.md +72 -0
- phase_loop_runtime/skills_bundle/opencode-skill-improvement-planner/README.md +1 -0
- phase_loop_runtime/skills_bundle/opencode-skill-improvement-planner/SKILL.md +109 -0
- phase_loop_runtime/skills_bundle/opencode-skill-improvement-planner/assets/aggregator_prompt.md +79 -0
- phase_loop_runtime/skills_bundle/opencode-task-contextualizer/README.md +1 -0
- phase_loop_runtime/skills_bundle/opencode-task-contextualizer/SKILL.md +98 -0
- phase_loop_runtime/skills_bundle/opencode-task-contextualizer/references/task-templates.md +103 -0
- phase_loop_runtime/state.py +156 -0
- phase_loop_runtime/state_degradation.py +136 -0
- phase_loop_runtime/state_ops.py +676 -0
- phase_loop_runtime/train_ledger.py +215 -0
- phase_loop_runtime/train_roadmap.py +339 -0
- phase_loop_runtime/train_runner.py +1197 -0
- phase_loop_runtime/verification_evidence.py +650 -0
- phase_loop_runtime/verification_evidence_validator.py +75 -0
- phase_loop_runtime/visual_evidence_validator.py +36 -0
- phase_loop_runtime/worker_pool.py +123 -0
- phase_loop_runtime/worktree_index.py +270 -0
- phase_loop_runtime-0.2.0.data/data/share/phase-loop-runtime/protocol/protocol.md +2475 -0
- phase_loop_runtime-0.2.0.dist-info/METADATA +106 -0
- phase_loop_runtime-0.2.0.dist-info/RECORD +370 -0
- phase_loop_runtime-0.2.0.dist-info/WHEEL +5 -0
- phase_loop_runtime-0.2.0.dist-info/entry_points.txt +9 -0
- phase_loop_runtime-0.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
"""Governed planning-review gate (model-routing-v1 P2, IF-0-P2-1).
|
|
2
|
+
|
|
3
|
+
This is the **plan-stage** gate. It is deliberately NOT the closeout
|
|
4
|
+
`_VALIDATORS` registry: that hook fires at closeout time on every closeout and
|
|
5
|
+
is warn-gated by `PHASE_LOOP_REVIEW` — the wrong host for a run_mode-aware,
|
|
6
|
+
fail-closed, planning-stage gate (panel finding, verified). This module reuses
|
|
7
|
+
only the `ReviewFinding` / `block` / `nit` vocabulary.
|
|
8
|
+
|
|
9
|
+
Run modes (the second orthogonal axis; the first is `model_policy`):
|
|
10
|
+
- `autonomous` (default): the gate does NOT run — it returns immediately and
|
|
11
|
+
**never invokes the panel** (no CLI spawn, no cost, no `human_required`).
|
|
12
|
+
- `governed` (opt-in): the panel reviews the artifact; `block` findings hold
|
|
13
|
+
promotion, `nit` findings are recorded but non-gating.
|
|
14
|
+
|
|
15
|
+
Reviewer ≠ author: the panel pool must differ from the author in vendor. If the
|
|
16
|
+
only authed reviewer is the author's vendor — or none are authed — the gate
|
|
17
|
+
holds fail-closed with a non-human review-gate blocker rather than rubber-
|
|
18
|
+
stamping a same-vendor self-review as a pass.
|
|
19
|
+
"""
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
from dataclasses import dataclass
|
|
23
|
+
from typing import Callable, Iterable, Mapping, Sequence
|
|
24
|
+
|
|
25
|
+
from .advisor_board.schema import vendor_family, vendor_of_harness
|
|
26
|
+
from .closeout_validators import ReviewFinding
|
|
27
|
+
from .panel_invoker import PanelResult, available_panel_legs, invoke_panel, terminal_verdict
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
RUN_MODES: tuple[str, ...] = ("autonomous", "governed")
|
|
31
|
+
DEFAULT_RUN_MODE = "autonomous"
|
|
32
|
+
RUN_MODE_ENV = "PHASE_LOOP_RUN_MODE"
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _leg_blocks(text: str) -> bool:
|
|
36
|
+
"""True iff a usable leg's review signals a blocking concern.
|
|
37
|
+
|
|
38
|
+
A usable leg is conforming by construction (``_classify_leg`` only returns
|
|
39
|
+
``ok`` when ``terminal_verdict`` is non-None), so this is a pure read of the
|
|
40
|
+
structured terminal verdict — only a bare ``DISAGREE`` blocks. No substring /
|
|
41
|
+
negation guessing (that whack-a-mole mis-blocked "I cannot AGREE or DISAGREE"
|
|
42
|
+
and mis-passed junk containing the words — advisor-panel reconciliation).
|
|
43
|
+
"""
|
|
44
|
+
return terminal_verdict(text) == "DISAGREE"
|
|
45
|
+
|
|
46
|
+
# Reviewer≠author disjointness is keyed on VENDOR FAMILY, and the ONE canonical
|
|
47
|
+
# model-first projection lives in ``advisor_board.schema`` (ABDFREEZE IF-0-1). These
|
|
48
|
+
# are thin wrappers onto it — NOT a parallel copy — so a custom/model-first board
|
|
49
|
+
# can never drift the executor→vendor and model→vendor mappings out of sync with the
|
|
50
|
+
# seat projection (the drift this fix exists to kill). ``vendor_of_harness`` mirrors
|
|
51
|
+
# the old ``_EXECUTOR_VENDOR`` table exactly; ``vendor_family`` reproduces the old
|
|
52
|
+
# ``author_vendor_for_model`` (family, or the bare lowercased model when
|
|
53
|
+
# inconclusive). See tests/test_advisor_board_schema.py for the byte-consistency.
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def author_vendor_for_executor(executor: str) -> str:
|
|
57
|
+
return vendor_of_harness(executor)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def author_vendor_for_model(model_id: str) -> str:
|
|
61
|
+
"""Map a concrete model id to its panel-leg vendor family (codex/gemini/claude/…).
|
|
62
|
+
|
|
63
|
+
Fallback author signal for reviewer≠author when no recorded executor is
|
|
64
|
+
available: the implementing model's vendor must be excluded from the pool.
|
|
65
|
+
Delegates to the frozen ``vendor_family`` projection (model-first, harness
|
|
66
|
+
unknown here), which returns the family or the bare lowercased model.
|
|
67
|
+
"""
|
|
68
|
+
return vendor_family(model_id)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def resolve_run_mode(env: Mapping[str, str] | None = None, explicit: str | None = None) -> str:
|
|
72
|
+
if explicit:
|
|
73
|
+
value = str(explicit).strip().lower()
|
|
74
|
+
return value if value in RUN_MODES else DEFAULT_RUN_MODE
|
|
75
|
+
value = str((env or {}).get(RUN_MODE_ENV) or "").strip().lower()
|
|
76
|
+
return value if value in RUN_MODES else DEFAULT_RUN_MODE
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def select_reviewer_pool(
|
|
80
|
+
author_vendor: str | Iterable[str],
|
|
81
|
+
available_legs: Sequence[str],
|
|
82
|
+
) -> tuple[tuple[str, ...], str | None]:
|
|
83
|
+
"""Return (pool, degraded_reason). The pool excludes EVERY author vendor.
|
|
84
|
+
|
|
85
|
+
``author_vendor`` may be a single vendor or a set of them — under
|
|
86
|
+
rotation/repair a phase can be authored by more than one vendor (e.g. codex
|
|
87
|
+
executes, claude repairs), and ALL of them must be excluded so no author
|
|
88
|
+
reviews its own work (advisor-panel reconciliation, verified).
|
|
89
|
+
``degraded_reason`` is set when no disjoint reviewer is available.
|
|
90
|
+
|
|
91
|
+
ABDHOME (model-first fix): the disjointness compares VENDOR FAMILY to VENDOR
|
|
92
|
+
FAMILY, not leg-name to family. Each available leg is projected through the
|
|
93
|
+
frozen ``vendor_of_harness`` before exclusion, so a same-vendor breadth lane
|
|
94
|
+
(e.g. an ``opencode`` reviewer over a ``codex``-authored artifact — both the
|
|
95
|
+
``codex`` family) is correctly excluded. For the built-3 / default panel the
|
|
96
|
+
leg name IS its family, so this is byte-neutral. The returned pool keeps the
|
|
97
|
+
original leg NAMES (``invoke_panel`` dispatches on those).
|
|
98
|
+
"""
|
|
99
|
+
authors = {author_vendor} if isinstance(author_vendor, str) else set(author_vendor)
|
|
100
|
+
authors = {a for a in authors if a}
|
|
101
|
+
pool = tuple(leg for leg in available_legs if vendor_of_harness(leg) not in authors)
|
|
102
|
+
if pool:
|
|
103
|
+
return pool, None
|
|
104
|
+
return (), ("no_reviewers" if not available_legs else "author_vendor_only")
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
@dataclass(frozen=True)
|
|
108
|
+
class GateResult:
|
|
109
|
+
ran: bool # did the governed gate actually evaluate?
|
|
110
|
+
promoted: bool # may the artifact advance? (False only on unresolved block)
|
|
111
|
+
findings: tuple[ReviewFinding, ...] = ()
|
|
112
|
+
degraded: bool = False # Legacy field; governed gate holds fail-closed.
|
|
113
|
+
reason: str | None = None
|
|
114
|
+
panel: PanelResult | None = None
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def _findings_from_panel(panel: PanelResult) -> tuple[ReviewFinding, ...]:
|
|
118
|
+
"""Fail-closed translation of panel leg outputs into findings. A leg that is
|
|
119
|
+
not usable (empty/timeout/degraded/unavailable) becomes a `warn` finding so
|
|
120
|
+
the reduced confidence is recorded; a usable leg whose verdict signals a
|
|
121
|
+
blocking concern becomes a `block` finding."""
|
|
122
|
+
findings: list[ReviewFinding] = []
|
|
123
|
+
for leg in panel.legs:
|
|
124
|
+
if not leg.usable:
|
|
125
|
+
# A leg with SUBSTANTIVE text but no conforming terminal verdict is a
|
|
126
|
+
# review that violated the contract — we cannot confirm it approved, so
|
|
127
|
+
# fail closed (BLOCK), never downgrade a possible objection to a
|
|
128
|
+
# non-gating warn (CR finding). A leg with no usable text
|
|
129
|
+
# (empty / timeout / unavailable / auth error) is "no review happened"
|
|
130
|
+
# → a recorded warn (reduced confidence), not a block.
|
|
131
|
+
if leg.text.strip():
|
|
132
|
+
findings.append(ReviewFinding(
|
|
133
|
+
code="panel_nonconforming",
|
|
134
|
+
reason=(
|
|
135
|
+
f"panel leg {leg.leg} produced a review with no conforming "
|
|
136
|
+
f"terminal verdict ({leg.status}); holding fail-closed"
|
|
137
|
+
),
|
|
138
|
+
severity="block",
|
|
139
|
+
blocker_class="review_gate_block",
|
|
140
|
+
))
|
|
141
|
+
else:
|
|
142
|
+
findings.append(ReviewFinding(
|
|
143
|
+
code="panel_leg_degraded",
|
|
144
|
+
reason=f"panel leg {leg.leg} unusable ({leg.status})",
|
|
145
|
+
severity="warn",
|
|
146
|
+
))
|
|
147
|
+
continue
|
|
148
|
+
if _leg_blocks(leg.text):
|
|
149
|
+
findings.append(ReviewFinding(
|
|
150
|
+
code="panel_block",
|
|
151
|
+
reason=f"panel leg {leg.leg} raised a blocking concern",
|
|
152
|
+
severity="block",
|
|
153
|
+
blocker_class="review_gate_block",
|
|
154
|
+
))
|
|
155
|
+
else:
|
|
156
|
+
# A "nit" is non-blocking; recorded at `warn` severity (the rigor-v1
|
|
157
|
+
# model has no separate nit literal — block vs not-block).
|
|
158
|
+
findings.append(ReviewFinding(
|
|
159
|
+
code="panel_nit",
|
|
160
|
+
reason=f"panel leg {leg.leg} reviewed with non-blocking notes",
|
|
161
|
+
severity="warn",
|
|
162
|
+
))
|
|
163
|
+
return tuple(findings)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
def _block_result(reason: str, code: str, detail: str) -> GateResult:
|
|
167
|
+
"""A fail-closed governed result: held (not promoted), non-degraded block."""
|
|
168
|
+
return GateResult(
|
|
169
|
+
ran=True,
|
|
170
|
+
promoted=False,
|
|
171
|
+
degraded=False,
|
|
172
|
+
reason=reason,
|
|
173
|
+
findings=(ReviewFinding(
|
|
174
|
+
code=code,
|
|
175
|
+
reason=detail,
|
|
176
|
+
severity="block",
|
|
177
|
+
blocker_class="review_gate_block",
|
|
178
|
+
),),
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
def governed_planning_gate(
|
|
183
|
+
*,
|
|
184
|
+
artifact: str,
|
|
185
|
+
author_executor: str | None = None,
|
|
186
|
+
author_vendors: Iterable[str] | None = None,
|
|
187
|
+
run_mode: str,
|
|
188
|
+
available_legs: Sequence[str] | None = None,
|
|
189
|
+
invoke: Callable[..., PanelResult] = invoke_panel,
|
|
190
|
+
spawn=None,
|
|
191
|
+
repo_dir=None,
|
|
192
|
+
max_concurrency: int | None = None,
|
|
193
|
+
) -> GateResult:
|
|
194
|
+
"""Evaluate a governed gate (plan-stage or pre-merge).
|
|
195
|
+
|
|
196
|
+
AUTONOMOUS SHORT-CIRCUIT: when `run_mode != "governed"` this returns BEFORE
|
|
197
|
+
selecting a pool or touching `invoke` — the panel is never spawned. This is
|
|
198
|
+
the zero-panel-call guarantee for the default path.
|
|
199
|
+
|
|
200
|
+
FAIL-CLOSED (governed is the opt-in enforcement mode): if there is no reviewer
|
|
201
|
+
disjoint from the author vendor(s), or every selected leg is unusable / non-
|
|
202
|
+
conforming, the gate HOLDS (non-human ``review_gate_block``) rather than
|
|
203
|
+
advisory-passing a review that never really happened (advisor-panel
|
|
204
|
+
reconciliation, verified — the prior advisory-pass was a fail-open).
|
|
205
|
+
"""
|
|
206
|
+
if run_mode != "governed":
|
|
207
|
+
return GateResult(ran=False, promoted=True)
|
|
208
|
+
|
|
209
|
+
if author_vendors is not None:
|
|
210
|
+
authors = frozenset(v for v in author_vendors if v)
|
|
211
|
+
else:
|
|
212
|
+
authors = frozenset({author_vendor_for_executor(author_executor or "")} - {""})
|
|
213
|
+
if not authors:
|
|
214
|
+
# Unknown author → CANNOT establish reviewer≠author. Fail closed (CR
|
|
215
|
+
# finding): an empty author set otherwise excluded nothing and ran the
|
|
216
|
+
# FULL panel including the author's own vendor (a silent self-review).
|
|
217
|
+
return _block_result(
|
|
218
|
+
"unknown_author",
|
|
219
|
+
"governed_unknown_author",
|
|
220
|
+
"governed mode could not determine the authoring vendor(s) for "
|
|
221
|
+
"reviewer≠author exclusion; holding (non-human) rather than risk a "
|
|
222
|
+
"self-review",
|
|
223
|
+
)
|
|
224
|
+
legs = tuple(available_legs) if available_legs is not None else available_panel_legs()
|
|
225
|
+
pool, degraded_reason = select_reviewer_pool(authors, legs)
|
|
226
|
+
if not pool:
|
|
227
|
+
return _block_result(
|
|
228
|
+
degraded_reason or "no_disjoint_reviewer",
|
|
229
|
+
"governed_no_disjoint_reviewer",
|
|
230
|
+
(
|
|
231
|
+
f"governed mode requires a reviewer disjoint from author vendor(s) "
|
|
232
|
+
f"{sorted(authors)} but none is available ({degraded_reason}); "
|
|
233
|
+
f"holding (non-human). Authenticate or install at least one available "
|
|
234
|
+
f"non-author panel leg; the Claude TUI leg can satisfy this when its "
|
|
235
|
+
f"local Claude Code subscription route is available."
|
|
236
|
+
),
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
invoke_kwargs = {"spawn": spawn}
|
|
240
|
+
if repo_dir is not None:
|
|
241
|
+
invoke_kwargs["repo_dir"] = repo_dir
|
|
242
|
+
# Parallel by default; a caller can force sequential (max_concurrency=1). Passed
|
|
243
|
+
# ONLY when set so a custom ``invoke`` with a strict signature stays unaffected
|
|
244
|
+
# (byte-neutral for the default governed path).
|
|
245
|
+
if max_concurrency is not None:
|
|
246
|
+
invoke_kwargs["max_concurrency"] = max_concurrency
|
|
247
|
+
panel = invoke(artifact, pool, **invoke_kwargs)
|
|
248
|
+
findings = _findings_from_panel(panel)
|
|
249
|
+
if not panel.usable_legs:
|
|
250
|
+
# Pool existed but no leg produced a usable, conforming review → the review
|
|
251
|
+
# did not actually happen. Fail closed, never silent-pass.
|
|
252
|
+
return _block_result(
|
|
253
|
+
"no_usable_review",
|
|
254
|
+
"governed_no_usable_review",
|
|
255
|
+
f"no disjoint reviewer produced a usable verdict ({len(panel.legs)} leg(s) unusable); holding (non-human)",
|
|
256
|
+
)
|
|
257
|
+
has_block = any(f.severity == "block" for f in findings)
|
|
258
|
+
return GateResult(
|
|
259
|
+
ran=True,
|
|
260
|
+
promoted=not has_block,
|
|
261
|
+
findings=findings,
|
|
262
|
+
degraded=False,
|
|
263
|
+
panel=panel,
|
|
264
|
+
)
|