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,96 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# verify_harness.sh — pre-flight capability check for claude-execute-phase.
|
|
3
|
+
#
|
|
4
|
+
# Usage:
|
|
5
|
+
# verify_harness.sh [merge-target]
|
|
6
|
+
#
|
|
7
|
+
# merge-target Defaults to 'main'.
|
|
8
|
+
#
|
|
9
|
+
# Checks (all run; exit code reflects aggregate — non-zero if any FAIL):
|
|
10
|
+
# (1) `git` + `git worktree` available
|
|
11
|
+
# (2) Running inside a git work tree (`rev-parse --show-toplevel` succeeds)
|
|
12
|
+
# (3) Merge target branch exists locally
|
|
13
|
+
# (4) Working tree is clean (no uncommitted changes)
|
|
14
|
+
# (5) `.gitignore` mentions worktree paths — WARN only
|
|
15
|
+
#
|
|
16
|
+
# Does NOT exercise EnterWorktree itself — that's a Claude tool, not a CLI.
|
|
17
|
+
# The SKILL's Step 2 tells the LLM to follow this script with a throwaway-
|
|
18
|
+
# teammate probe that calls EnterWorktree and reports whether the tool is
|
|
19
|
+
# available in the teammate's registry.
|
|
20
|
+
|
|
21
|
+
set -uo pipefail
|
|
22
|
+
|
|
23
|
+
target="${1:-main}"
|
|
24
|
+
|
|
25
|
+
errors=0
|
|
26
|
+
warnings=0
|
|
27
|
+
|
|
28
|
+
pass() { echo "verify_harness: PASS — $*"; }
|
|
29
|
+
warn() { echo "verify_harness: WARN — $*" >&2; warnings=$((warnings + 1)); }
|
|
30
|
+
fail() { echo "verify_harness: FAIL — $*" >&2; errors=$((errors + 1)); }
|
|
31
|
+
|
|
32
|
+
# (1) git + worktree subcommand
|
|
33
|
+
if ! command -v git >/dev/null 2>&1; then
|
|
34
|
+
fail "(1) git not found on PATH"
|
|
35
|
+
elif ! git worktree list >/dev/null 2>&1; then
|
|
36
|
+
fail "(1) 'git worktree' subcommand unavailable"
|
|
37
|
+
else
|
|
38
|
+
pass "(1) git + git-worktree available"
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
# (2) inside a git work tree
|
|
42
|
+
toplevel=""
|
|
43
|
+
if toplevel="$(git rev-parse --show-toplevel 2>/dev/null)"; then
|
|
44
|
+
pass "(2) inside git work tree: $toplevel"
|
|
45
|
+
else
|
|
46
|
+
fail "(2) not inside a git work tree"
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
# (3) merge target branch exists locally
|
|
50
|
+
if git show-ref --verify --quiet "refs/heads/$target"; then
|
|
51
|
+
pass "(3) merge target '$target' exists locally"
|
|
52
|
+
else
|
|
53
|
+
fail "(3) merge target '$target' does not exist locally (try: git fetch origin $target:$target)"
|
|
54
|
+
fi
|
|
55
|
+
|
|
56
|
+
# (4) working tree clean (allowlist excludes orchestrator-owned paths)
|
|
57
|
+
#
|
|
58
|
+
# Allowlist: paths that may appear in `git status --porcelain` during normal
|
|
59
|
+
# phase execution without blocking dispatch:
|
|
60
|
+
# `?? .claude/worktrees/` — untracked dir holding live lane worktrees
|
|
61
|
+
# `?? .claude/claude-execute-phase-state.json` — orchestrator state file
|
|
62
|
+
#
|
|
63
|
+
# Everything else (including gitignore-exempted `.index_metadata.json`, any
|
|
64
|
+
# tracked-file modification, any other untracked file) must be committed,
|
|
65
|
+
# stashed, or explicitly resolved via AskUserQuestion BEFORE dispatch —
|
|
66
|
+
# no orchestrator-side rationalization.
|
|
67
|
+
dirty_lines="$(git status --porcelain 2>/dev/null | \
|
|
68
|
+
grep -vE '^\?\? \.claude/worktrees/?$|^\?\? \.claude/claude-execute-phase-state\.json$' || true)"
|
|
69
|
+
dirty_count=0
|
|
70
|
+
if [[ -n "$dirty_lines" ]]; then
|
|
71
|
+
dirty_count=$(echo "$dirty_lines" | wc -l)
|
|
72
|
+
fi
|
|
73
|
+
if [[ "$dirty_count" -eq 0 ]]; then
|
|
74
|
+
pass "(4) working tree clean (or only allowlisted orchestrator paths dirty)"
|
|
75
|
+
else
|
|
76
|
+
fail "(4) working tree has $dirty_count non-allowlisted uncommitted change(s); commit, stash, or abort before /claude-execute-phase. Offending paths:"
|
|
77
|
+
echo "$dirty_lines" | sed 's/^/verify_harness: /' >&2
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
# (5) .gitignore covers worktree paths — WARN only, not a hard-fail.
|
|
81
|
+
gitignore="$toplevel/.gitignore"
|
|
82
|
+
if [[ -f "$gitignore" ]]; then
|
|
83
|
+
if grep -qE '^(\.worktrees/?|\.claude/worktrees/?)' "$gitignore"; then
|
|
84
|
+
pass "(5) .gitignore covers worktree paths"
|
|
85
|
+
else
|
|
86
|
+
warn "(5) .gitignore does not list '.worktrees/' or '.claude/worktrees/'; claude-execute-phase will append on first run"
|
|
87
|
+
fi
|
|
88
|
+
else
|
|
89
|
+
warn "(5) no .gitignore at $gitignore"
|
|
90
|
+
fi
|
|
91
|
+
|
|
92
|
+
echo "verify_harness: summary — $errors error(s), $warnings warning(s)"
|
|
93
|
+
if [[ "$errors" -gt 0 ]]; then
|
|
94
|
+
exit 1
|
|
95
|
+
fi
|
|
96
|
+
exit 0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Harness-specific overlay files for this workflow skill.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: opencode-phase-loop
|
|
3
|
+
description: "OpenCode bridge for the repo-local phase-loop runner. Use when the user wants phase-loop status, resume, bounded run, dry-run, or monitor flows from OpenCode."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# OpenCode Phase Loop
|
|
7
|
+
|
|
8
|
+
Thin bridge for the repo-local phase-loop runner. This skill points OpenCode
|
|
9
|
+
operators at the shared loop state and command surface; it does not reimplement
|
|
10
|
+
phase selection, reconciliation, event writing, or execution logic.
|
|
11
|
+
|
|
12
|
+
## Core Rules
|
|
13
|
+
|
|
14
|
+
Use `phase_loop_runtime.skill_paths` resolver helpers for harness skill roots, handoff roots, helper roots, and reflection roots.
|
|
15
|
+
|
|
16
|
+
- Use the repo-local phase-loop CLI or wrapper documented by the repo; do not invent a second runner.
|
|
17
|
+
- Preserve manual OpenCode use of `<harness>-phase-roadmap-builder`, `<harness>-plan-phase`, and `<harness>-execute-phase`.
|
|
18
|
+
- Inspect `shared/phase-loop/protocol.md` and `<harness>-config/shared/runtime-state.md` before describing artifact or blocker semantics.
|
|
19
|
+
- Before reporting a human-required access blocker, inspect repo-local docs/config and safe metadata from available CLIs. Never print secret values.
|
|
20
|
+
|
|
21
|
+
## Inputs
|
|
22
|
+
|
|
23
|
+
- `handoff`
|
|
24
|
+
- `status`
|
|
25
|
+
- `monitor`
|
|
26
|
+
- `resume`
|
|
27
|
+
- `run`
|
|
28
|
+
- `dry-run`
|
|
29
|
+
- `sync-skills`
|
|
30
|
+
|
|
31
|
+
Keep `run` bounded. Prefer `--max-phases 1` unless the user names another
|
|
32
|
+
bound.
|
|
33
|
+
|
|
34
|
+
## Shared State Surface
|
|
35
|
+
|
|
36
|
+
- `.phase-loop/state.json`
|
|
37
|
+
- `.phase-loop/events.jsonl`
|
|
38
|
+
- `.phase-loop/tui-handoff.md`
|
|
39
|
+
- `.phase-loop/runs/<run-id>/heartbeat.json`
|
|
40
|
+
- `.phase-loop/runs/<run-id>/terminal-summary.json`
|
|
41
|
+
|
|
42
|
+
Use CLI output such as `status --json` and `monitor --once --json` when exact
|
|
43
|
+
machine state is needed.
|
|
44
|
+
|
|
45
|
+
## What This Bridge Must Cover
|
|
46
|
+
|
|
47
|
+
- bounded `run`, `dry-run`, `resume`, `status`, and `monitor` flows
|
|
48
|
+
- manual event import expectations from `shared/phase-loop/protocol.md`
|
|
49
|
+
- injected-skill metadata and installed-skill drift guidance from the shared loop state
|
|
50
|
+
- downstream roadmap amendments that invalidate older downstream phase plans or handoffs
|
|
51
|
+
|
|
52
|
+
## Operator Notes
|
|
53
|
+
|
|
54
|
+
Repo-sourced injected workflow bundles remain authoritative for autonomous
|
|
55
|
+
phase-loop child launches. Installed workflow skills under
|
|
56
|
+
`resolve_skill_bundle_root("opencode")/` are the recommended manual reentry surface, but
|
|
57
|
+
they are not required for the runner to launch or continue work. If the
|
|
58
|
+
advisory bridge record reports `missing_root`, `missing_skill`, or `drifted`,
|
|
59
|
+
repair the local bridge with `codex-phase-loop sync-skills --apply` before
|
|
60
|
+
trusting manual OpenCode reentry.
|
|
61
|
+
|
|
62
|
+
Use the shared loop state to reason about:
|
|
63
|
+
|
|
64
|
+
- current `automation` status and `verification_status`
|
|
65
|
+
- whether a blocker is `branch_sync_conflict`, `dirty_worktree_conflict`, or another frozen blocker literal
|
|
66
|
+
- whether the selected harness skill pack matches injected metadata or shows installed-skill drift
|
|
67
|
+
- whether the latest OpenCode launch used explicit `<harness> run` metadata for
|
|
68
|
+
`--agent`, provider-qualified `--model`, optional `--variant`, and recorded
|
|
69
|
+
permission posture instead of silently accepting permissive defaults
|
|
70
|
+
|
|
71
|
+
If the local TUI may be stale because another harness or shell session drove
|
|
72
|
+
the loop, start from `handoff` or `monitor --once --json` before resuming.
|
|
73
|
+
Manual imports must append shared-protocol events instead of inventing
|
|
74
|
+
harness-private state.
|
|
75
|
+
|
|
76
|
+
If a downstream roadmap amendment lands, route the next step back through the
|
|
77
|
+
planner and treat older downstream plans as stale.
|
|
78
|
+
|
|
79
|
+
## Branch-governance preflight
|
|
80
|
+
|
|
81
|
+
Issue #83: in pipeline-mode with branchgov on (the default), a dispatch switches
|
|
82
|
+
to `consiliency/pipeline/<v>` cut from `origin/main`. If the roadmap is committed
|
|
83
|
+
only on the operator's own branch (unpushed / ahead of `origin/main`), the
|
|
84
|
+
runtime guard refuses cleanly with a `branch_sync_conflict` blocker rather than
|
|
85
|
+
crashing — push the roadmap to the base, or pass `--allow-branchgov` to switch
|
|
86
|
+
anyway (it then still fails cleanly if the roadmap isn't on the base). The
|
|
87
|
+
runtime guard is the authoritative fail-safe; see
|
|
88
|
+
`docs/phase-loop/branchgov-preflight.md`.
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
## Runner Evidence Contract
|
|
92
|
+
|
|
93
|
+
Use artifact-backed re-verdicting for blocked gates: a gate changes verdict only by rerunning the originally specified runner check and reading the runner-owned artifact. proxy evidence requires a roadmap amendment before the bridge reports the gate as passed. When both canonical `.phase-loop/` state and legacy `.codex/phase-loop/` compatibility files exist, canonical `.phase-loop/` state takes precedence for status, monitor, resume, reconcile, and repair decisions.
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
## Spec Delta Closeout
|
|
97
|
+
|
|
98
|
+
Phase-loop handoffs and terminal closeouts must preserve one `spec_delta_closeout.v1` decision from the executor: `no_spec_delta`, `roadmap_amendment`, `canonical_spec_update`, `governed_pipeline_refresh`, `mirror_cutover_required`, `dotfiles_skill_source_update`, or `human_source_judgment_required`. Treat missing or malformed spec-closeout evidence as a repairable automation blocker with `blocker_class=contract_bug`, unless the decision is `human_source_judgment_required`. The record is metadata-only with `redaction_posture=metadata_only`: keep target surfaces, evidence paths, decision literals, IF gates, and artifact names, but never raw specs, raw diffs, credentials, provider payloads, local env values, or ignored/private evidence-source contents.
|
|
99
|
+
|
|
100
|
+
## Command Mapping
|
|
101
|
+
|
|
102
|
+
- `<harness>-phase-loop handoff`: use `phase-loop handoff` or `codex-phase-loop handoff`.
|
|
103
|
+
- `<harness>-phase-loop status`: use `phase-loop status` or `codex-phase-loop status`.
|
|
104
|
+
- `<harness>-phase-loop state`: use `phase-loop state --json` when exact machine state is needed.
|
|
105
|
+
- `<harness>-phase-loop monitor`: use `phase-loop monitor --once --json`.
|
|
106
|
+
- `<harness>-phase-loop run`: use `phase-loop run --max-phases <N> --closeout-mode manual` unless the operator explicitly chooses another closeout mode.
|
|
107
|
+
- `<harness>-phase-loop dry-run`: use `phase-loop dry-run --max-phases <N>`.
|
|
108
|
+
- `<harness>-phase-loop sync-skills`: use `phase-loop sync-skills --check`, and use `--apply` only when the operator explicitly wants bridge repair.
|
|
109
|
+
|
|
110
|
+
OpenCode is live-supported through the shared runner contract. Keep explicit
|
|
111
|
+
permission posture, selected agent, provider-qualified model, and optional
|
|
112
|
+
reasoning variant visible in launch metadata rather than assuming permissive
|
|
113
|
+
defaults are acceptable.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Harness-specific overlay files for this workflow skill.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: opencode-phase-roadmap-builder
|
|
3
|
+
description: "OpenCode-optimized roadmap planner. Use when the user wants to turn a conversation, architecture discussion, or markdown spec into a multi-phase roadmap for later OpenCode planning and execution. Creates or extends versioned phase roadmap specs in execution mode, but in Plan Mode returns a proposed plan only. Do not use for single bounded changes; use <harness>-plan-detailed instead."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# OpenCode Phase Roadmap Builder
|
|
7
|
+
|
|
8
|
+
Builds a multi-phase roadmap that downstream `<harness>-plan-phase` can turn into implementation lanes. This is the OpenCode port of the Claude-oriented roadmap builder; do not edit or depend on the original skill at runtime.
|
|
9
|
+
|
|
10
|
+
## Shared Protocol
|
|
11
|
+
|
|
12
|
+
Follow `shared/phase-loop/protocol.md` for the shared closeout contract.
|
|
13
|
+
Roadmap-builder closeout must emit `automation:` metadata that agrees with the
|
|
14
|
+
human-readable `Next phase`, `next_skill`, `next_command`, and
|
|
15
|
+
`verification_status` fields.
|
|
16
|
+
|
|
17
|
+
## Core Rules
|
|
18
|
+
|
|
19
|
+
Use `phase_loop_runtime.skill_paths` resolver helpers for harness skill roots, handoff roots, helper roots, and reflection roots.
|
|
20
|
+
|
|
21
|
+
- Preserve Plan Mode boundaries. In Plan Mode, inspect files and produce a `<proposed_plan>` roadmap only; do not create or edit repo-tracked files.
|
|
22
|
+
- In Default mode, write the roadmap artifact only after enough context is available.
|
|
23
|
+
- During planning-only roadmap creation, do not execute test suites, builds, formatters, generators, or migrations. Capture end-to-end verification commands in the roadmap without running them.
|
|
24
|
+
- Use local truth first: read named specs, `AGENTS.md`, and repo docs the user explicitly points at. Do not invent phases from vague context.
|
|
25
|
+
- Use PMCP for external capability research when current docs or third-party tooling facts affect the roadmap. Prefer `gateway_catalog_search`, then `gateway_describe`, then `gateway_invoke`; use Context7 for library/product docs. Use Bright Data only if PMCP exposes it in the current environment.
|
|
26
|
+
- Use `request_user_input` only when available; in Default mode ask one concise plain-text question only if a missing decision would make the roadmap wrong.
|
|
27
|
+
- Prefer fewer serial phases and more parallel work inside each phase. A phase boundary exists only when a contract must freeze before downstream work starts.
|
|
28
|
+
- Do not spawn subagents unless the user explicitly asks for agents, subagents, delegation, or parallel agent work.
|
|
29
|
+
|
|
30
|
+
## Inputs
|
|
31
|
+
|
|
32
|
+
- Optional spec path: markdown file to fold into the roadmap.
|
|
33
|
+
- Optional output path: default `specs/phase-plans-v<N>.md`, choosing the highest existing version or `v1` if none exists.
|
|
34
|
+
- Append mode: if the output roadmap exists, add phases without rewriting prior phases unless the user explicitly requests a replacement.
|
|
35
|
+
|
|
36
|
+
## Workflow
|
|
37
|
+
|
|
38
|
+
1. Resolve repo root with `git rev-parse --show-toplevel`, then inspect:
|
|
39
|
+
- the named spec, if any;
|
|
40
|
+
- `AGENTS.md` and `CLAUDE.md`, if present;
|
|
41
|
+
- existing `specs/phase-plans-v*.md`;
|
|
42
|
+
- markdown files the user named.
|
|
43
|
+
2. Choose create or append mode:
|
|
44
|
+
- Create mode writes a full roadmap.
|
|
45
|
+
- Append mode reads existing aliases, phase numbers, dependencies, and interface gates, then appends only new phases.
|
|
46
|
+
3. Write top-level context:
|
|
47
|
+
- `Context`
|
|
48
|
+
- `Architecture North Star` when structural
|
|
49
|
+
- `Assumptions`
|
|
50
|
+
- `Non-Goals`
|
|
51
|
+
- `Cross-Cutting Principles`
|
|
52
|
+
4. Decompose into phases:
|
|
53
|
+
- serial phases only at interface-freeze boundaries;
|
|
54
|
+
- sibling phases for independent subtrees;
|
|
55
|
+
- at least two likely lanes per implementation phase unless it is a preamble or interface-only phase;
|
|
56
|
+
- explicit `Depends on` and `Produces` entries.
|
|
57
|
+
5. Add:
|
|
58
|
+
- `Top Interface-Freeze Gates`;
|
|
59
|
+
- `Phase Dependency DAG`;
|
|
60
|
+
- `Execution Notes` that name which phases can be planned or executed concurrently;
|
|
61
|
+
- end-to-end `Verification` commands.
|
|
62
|
+
6. Validate mechanically, then by eye:
|
|
63
|
+
- run `phase-loop validate-roadmap <output-path>` (or `python3 -m phase_loop_runtime.roadmap_lint <output-path>`) — always available wherever the phase-loop runtime is installed; it mechanically checks stable headings, unique aliases, acyclic DAG, IF-gate reconciliation, and the lane-count hint. Fix every reported issue, then confirm by eye:
|
|
64
|
+
- stable headings are present;
|
|
65
|
+
- aliases are unique;
|
|
66
|
+
- dependency graph is acyclic;
|
|
67
|
+
- every produced gate has a producing phase;
|
|
68
|
+
- append mode did not silently rewrite old phases.
|
|
69
|
+
|
|
70
|
+
## Artifact Contract
|
|
71
|
+
|
|
72
|
+
Use this shape so `<harness>-plan-phase` can parse it:
|
|
73
|
+
|
|
74
|
+
```markdown
|
|
75
|
+
# Phase roadmap v<N>
|
|
76
|
+
|
|
77
|
+
## Context
|
|
78
|
+
|
|
79
|
+
## Architecture North Star
|
|
80
|
+
|
|
81
|
+
## Assumptions
|
|
82
|
+
|
|
83
|
+
## Non-Goals
|
|
84
|
+
|
|
85
|
+
## Cross-Cutting Principles
|
|
86
|
+
|
|
87
|
+
## Top Interface-Freeze Gates
|
|
88
|
+
- IF-0-<ALIAS>-<N> — <frozen contract>
|
|
89
|
+
|
|
90
|
+
## Phases
|
|
91
|
+
|
|
92
|
+
### Phase N — <Name> (<ALIAS>)
|
|
93
|
+
**Objective**
|
|
94
|
+
|
|
95
|
+
**Exit criteria**
|
|
96
|
+
- [ ] <testable criterion>
|
|
97
|
+
|
|
98
|
+
**Scope notes**
|
|
99
|
+
|
|
100
|
+
**Non-goals**
|
|
101
|
+
|
|
102
|
+
**Key files**
|
|
103
|
+
|
|
104
|
+
**Depends on**
|
|
105
|
+
- (none)
|
|
106
|
+
|
|
107
|
+
**Produces**
|
|
108
|
+
- IF-0-<ALIAS>-<N> — <contract>
|
|
109
|
+
|
|
110
|
+
## Phase Dependency DAG
|
|
111
|
+
|
|
112
|
+
## Execution Notes
|
|
113
|
+
|
|
114
|
+
## Verification
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
## Spec Delta Policy
|
|
120
|
+
|
|
121
|
+
Every roadmap phase must declare its expected `spec_delta_closeout.v1` policy. Add a phase-local `**Spec closeout policy**` block that names `schema: spec_delta_closeout.v1`, the expected decision (`no_spec_delta`, `roadmap_amendment`, `canonical_spec_update`, `governed_pipeline_refresh`, `mirror_cutover_required`, `dotfiles_skill_source_update`, or `human_source_judgment_required`), target surfaces, evidence paths, `redaction_posture: metadata_only`, and any non-human `blocker_class=contract_bug` routing for missing or malformed evidence. Use `no_spec_delta` for phases that do not change reusable specs, `dotfiles_skill_source_update` for dotfiles-owned skill/source updates, and downstream routing decisions such as `governed_pipeline_refresh` or `mirror_cutover_required` only as metadata-only deferrals, not as write authorization.
|
|
122
|
+
|
|
123
|
+
## Verification Contract
|
|
124
|
+
|
|
125
|
+
Roadmap phases must set the expectation that downstream plans include machine-checkable verification commands and an effective `automation.suite_command`. If a phase depends on operational evidence that cannot be machine-checked directly, name the operational evidence artifact and the runner-stamped amendment mechanism that records it. proxy evidence requires a roadmap amendment before any downstream plan treats it as a gate verdict.
|
|
126
|
+
|
|
127
|
+
## Closeout
|
|
128
|
+
|
|
129
|
+
In Default mode, write the roadmap with the active session's file-editing tool, then run `git status --short -- <artifact>`. If the artifact is untracked or modified and the user did not explicitly forbid staging, run `git add <artifact>` and include the `_reviews.md` sibling if one was produced. Rerun `git status --short -- <artifact>` and report `Artifact state: staged|tracked|modified|unstaged|blocked`. Do not commit unless the user asked for a commit.
|
|
130
|
+
|
|
131
|
+
Before final response and handoff, choose the next phase to plan from the roadmap DAG. If at least one phase is ready, report `Next phase: <alias> - <phase name>` and `Next command: <harness>-plan-phase <artifact> <alias>`. If no phase should be planned next, report `Next phase: none - <reason>` and `Next command: none - <reason>`.
|
|
132
|
+
|
|
133
|
+
Add a machine-readable automation handoff that agrees with the human-readable next step fields. Closeout payload shape is defined by `EmitPhaseCloseout` in `phase_loop_runtime/baml_src/emit_phase_closeout.baml` (if that path is absent in the checkout, use the operator/prompt-supplied field contract or the installed `phase_loop_runtime` package — the missing vendored BAML source is not a blocker); keep skill text focused on value selection and handoff routing, not duplicated field ceremony.
|
|
134
|
+
|
|
135
|
+
If a roadmap edit changes downstream scope, amend the nearest downstream phase
|
|
136
|
+
that is not already executing and treat any older downstream phase plan or
|
|
137
|
+
handoff as stale until it is regenerated.
|
|
138
|
+
|
|
139
|
+
Before final response, write a reflection for every non-trivial run. Write it to `resolve_skill_bundle_root("codex")/<harness>-phase-roadmap-builder/reflections/<repo_hash>/<branch_slug>/<run_id>.md`. The reflection must include `## Run context` with skill name, ISO timestamp, repo, branch, commit, and artifact path if any, followed by `## What worked`, `## What didn't`, and `## Improvements to SKILL.md`. skip only when no artifact was produced AND no decision was made AND the run was pure inspection.
|
|
140
|
+
|
|
141
|
+
Resolve closeout writes through `shared/phase-loop/handoff_path.py` and the repo-local handoff resolver; legacy harness handoff roots are read only for migration. Follow `<harness>-config/shared/runtime-state.md` and use OpenCode paths only:
|
|
142
|
+
|
|
143
|
+
- Reflection: `resolve_skill_bundle_root("codex")/<harness>-phase-roadmap-builder/reflections/<repo_hash>/<branch_slug>/<run_id>.md`
|
|
144
|
+
- Handoff: `<repo>/.dev-skills/handoffs/<harness>-phase-roadmap-builder/<run_id>.md`
|
|
145
|
+
- Latest handoff pointer: `<repo>/.dev-skills/handoffs/<harness>-phase-roadmap-builder/latest.md`
|
|
146
|
+
|
|
147
|
+
Handoff frontmatter must include `from: <harness>-phase-roadmap-builder`, `timestamp:`, `repo:`, `repo_root:`, `branch:`, `branch_slug:`, `commit:`, `run_id:`, `artifact:`, `artifact_state:`, `next_skill:`, `next_command:`, and `next_phase:`. Update `latest.md` with the same handoff content.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Review the following multi-phase roadmap document produced by `/claude-phase-roadmap-builder`. The roadmap describes a sequence of phases that `/claude-plan-phase` will decompose into swim lanes; the goal of the roadmap format is to maximize end-to-end parallel execution time.
|
|
2
|
+
|
|
3
|
+
Assess, concretely:
|
|
4
|
+
|
|
5
|
+
1. **Phase-count justification** — is any phase actually two or more independent bodies of work that could have been sibling lanes within a single phase? A new phase is only justified when downstream work genuinely cannot proceed until an upstream contract is finalized. Flag phases whose `**Depends on**` is vacuous or whose subtrees are independent.
|
|
6
|
+
|
|
7
|
+
2. **Cross-phase parallelism in the DAG** — does the `## Phase Dependency DAG` call out every sibling-pair opportunity (the `P6A || P6B parallel after P1` pattern)? Any two phases with no shared ancestor in the DAG should be labeled parallel. Flag missed opportunities.
|
|
8
|
+
|
|
9
|
+
3. **Freeze narrowness** — each `**Produces**` entry should name a concrete, narrow symbol / endpoint / schema / migration, not a broad surface. Flag any produces line that reads "the full X module" or "the API of Y" instead of a specific symbol.
|
|
10
|
+
|
|
11
|
+
4. **Non-Goals completeness** — list three things likely to scope-creep during execution (common scope-creep drifts in a project of this type). For each, confirm whether `## Non-Goals` explicitly defers it. Flag silent scope creep vectors.
|
|
12
|
+
|
|
13
|
+
5. **Assumptions fail-loud check** — are there silent assumptions embedded in `## Context` or `## Cross-Cutting Principles` that should have been listed as numbered assumptions in `## Assumptions`? Flag any that, if wrong, would invalidate the plan.
|
|
14
|
+
|
|
15
|
+
Additionally: if any `**Produces**` IF-gate (`IF-0-<ALIAS>-<N>`) is referenced in `## Top Interface-Freeze Gates` but not listed in its owning phase's `**Produces**` block, or vice versa, flag the mismatch.
|
|
16
|
+
|
|
17
|
+
Be specific. Cite phase aliases (P1, P2A, P2B, …), line numbers, and the exact assertion at issue. Prefer "Phase P3's `Produces: IF-0-P3-1` is 'the plugin API' — not narrow; should name the specific `plugins_for(repo_id)` function signature" over general critique.
|
|
18
|
+
|
|
19
|
+
ARTIFACT:
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Parallelization Heuristics
|
|
2
|
+
|
|
3
|
+
Extended rules for phase/lane decomposition. The goal is to minimize wall-clock time to deliver the full roadmap. The main SKILL.md carries the seven core rules; this doc expands them for edge cases.
|
|
4
|
+
|
|
5
|
+
## Core model
|
|
6
|
+
|
|
7
|
+
- **Phases are serial checkpoints.** Each phase closes an interface freeze that the next phase consumes. Wall-clock cost of a phase = wall-clock cost of its slowest lane.
|
|
8
|
+
- **Lanes within a phase are parallel.** Multiple teammates, disjoint files, same wave.
|
|
9
|
+
- **Total wall time ≈ sum over critical path of (slowest lane per phase).** Minimize this sum.
|
|
10
|
+
|
|
11
|
+
## Rule 1 — Fewer phases, more lanes
|
|
12
|
+
|
|
13
|
+
If two bodies of work can both start from today's codebase and don't depend on each other's output, they go in the same phase as sibling lanes. Do not split them into sequential phases just because they touch different modules.
|
|
14
|
+
|
|
15
|
+
**Counter-example (don't do this):**
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Phase 1 — Auth module
|
|
19
|
+
Phase 2 — Billing module ← billing doesn't depend on auth; why is it a separate phase?
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Correct:**
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Phase 1
|
|
26
|
+
Lane 1 — Auth module
|
|
27
|
+
Lane 2 — Billing module
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Rule 2 — A phase boundary exists only at a necessary interface freeze
|
|
31
|
+
|
|
32
|
+
Ask: "Can any work in the next phase start before this phase's output is final?" If yes, the phase boundary is arbitrary — collapse it.
|
|
33
|
+
|
|
34
|
+
The only legitimate reason to introduce a phase boundary:
|
|
35
|
+
|
|
36
|
+
- Downstream lanes need an interface (signature, schema, enum, migration number) that must be fixed before they can write code against it.
|
|
37
|
+
- That interface is not yet fixed (either doesn't exist or is subject to change).
|
|
38
|
+
|
|
39
|
+
If the interface is already stable (in the existing codebase, in a vendored library, in a finalized spec), no phase boundary is needed — parallelize now.
|
|
40
|
+
|
|
41
|
+
## Rule 3 — Prefer narrow, early freezes
|
|
42
|
+
|
|
43
|
+
A freeze on "the authentication module" blocks a lot. A freeze on "`login(email, password) -> Session`" blocks almost nothing. Write the tightest possible contract in the `**Produces**` block.
|
|
44
|
+
|
|
45
|
+
Narrow freezes let you push more lanes into earlier phases. Phase 1 can freeze the minimum surface; Phase 2 starts on the wider surface while Phase 1's lanes fill in the implementation.
|
|
46
|
+
|
|
47
|
+
**Anti-pattern**: `**Produces**: full implementation of X`. That's not a freeze, that's just done work. A freeze is a contract about shape, not content.
|
|
48
|
+
|
|
49
|
+
## Rule 4 — Split fat phases into parallel sibling phases
|
|
50
|
+
|
|
51
|
+
When a phase has two or more subtrees that don't share an interface dependency on each other, split them into parallel-safe sibling phases. Use the aliased-branch pattern:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
P6A — Dep hygiene parallel after P1
|
|
55
|
+
P6B — Docs alignment parallel after P4
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Sibling phases with distinct aliases let `/claude-execute-phase` schedule them concurrently instead of serially.
|
|
59
|
+
|
|
60
|
+
**Test**: if `Phase N` lists `Depends on: P3` and `Phase N+1` also lists `Depends on: P3`, and neither lists the other, they are siblings. Mark them as `NA` / `NB` aliases, not `N` / `N+1`.
|
|
61
|
+
|
|
62
|
+
## Rule 5 — ≥2 lanes per phase (with exceptions)
|
|
63
|
+
|
|
64
|
+
A single-lane phase is a code smell. Investigate:
|
|
65
|
+
|
|
66
|
+
- Is the work actually a single atomic unit? → Likely belongs as one lane inside an adjacent phase, not its own phase.
|
|
67
|
+
- Is the work too coarse? → Split the file-ownership further until ≥2 disjoint lanes emerge.
|
|
68
|
+
- Is it a pure interface-freeze phase (Phase 0 / Phase 1 preamble)? → This is the exception. Mark `Scope notes` with "preamble / interface-only phase — single lane justified".
|
|
69
|
+
|
|
70
|
+
The validator enforces this rule but allows the preamble escape hatch via explicit `Scope notes` marking.
|
|
71
|
+
|
|
72
|
+
## Rule 6 — Parallelism hints in Scope notes
|
|
73
|
+
|
|
74
|
+
Every phase's `Scope notes` must make the parallelization plan machine-readable to `/claude-plan-phase`:
|
|
75
|
+
|
|
76
|
+
- Suggested lane count (e.g., "decompose into 3 lanes").
|
|
77
|
+
- Disjoint-file partitions per lane (e.g., "lane A owns `auth/**`, lane B owns `billing/**`, lane C owns `shared/types.ts`").
|
|
78
|
+
- Single-writer files (e.g., "`routes/index.ts` is single-writer; lane A owns it, others append via imports").
|
|
79
|
+
- Test-file placement (e.g., "tests go in each lane's directory; no shared test fixture file").
|
|
80
|
+
|
|
81
|
+
Without these hints, `/claude-plan-phase` has to re-derive the partition from scratch, which it may do incorrectly.
|
|
82
|
+
|
|
83
|
+
## Rule 7 — Cross-phase parallelism in the DAG
|
|
84
|
+
|
|
85
|
+
Two phases can execute concurrently when the DAG shows no path between them. Identify these explicitly:
|
|
86
|
+
|
|
87
|
+
- Annotate the DAG with `parallel after <X>` on branch phases.
|
|
88
|
+
- List cross-phase parallelism in `## Execution Notes` so `/claude-execute-phase` doesn't serialize by default.
|
|
89
|
+
|
|
90
|
+
Critical path = longest path from root phases to the terminal phase. If you can split a node on the critical path into a sibling pair (Rule 4), the critical path shrinks.
|
|
91
|
+
|
|
92
|
+
## Anti-patterns
|
|
93
|
+
|
|
94
|
+
- **Waterfall in disguise**: `Phase 1 — Design; Phase 2 — Implement; Phase 3 — Test.` This is one phase with three task types, not three phases. Tests are written before impl (TDD) within each real phase.
|
|
95
|
+
- **Phase-per-module**: "Phase 1 = auth, Phase 2 = billing, Phase 3 = notifications." Almost always wrong — these should be sibling lanes in one phase unless they genuinely depend on each other's interfaces.
|
|
96
|
+
- **Vague freezes**: `**Produces**: improved database layer`. Not a freeze. Specify the symbols, types, or migration numbers that will be stable.
|
|
97
|
+
- **Too-wide freezes**: `**Produces**: full public API of module X`. Downstream lanes will need to wait for every function in X to be final, not just the ones they call. Freeze only what's consumed.
|
|
98
|
+
- **Phantom phase dependencies**: listing `Depends on: P2` in `P3` when P3 only needs one symbol from P2 that P2 freezes on day one. Either narrow the freeze so P3 can start immediately, or promote the freeze to P1 where it belongs.
|
|
99
|
+
|
|
100
|
+
## Diagnostic questions
|
|
101
|
+
|
|
102
|
+
When sizing phases, ask:
|
|
103
|
+
|
|
104
|
+
1. What's the minimum interface `Phase N+1` needs from `Phase N`?
|
|
105
|
+
2. Can that interface be frozen on `Phase N`'s first day instead of its last?
|
|
106
|
+
3. If yes — move the freeze earlier and parallelize. If no — you've found the real phase boundary.
|
|
107
|
+
4. Inside `Phase N`, what are the natural file-ownership partitions?
|
|
108
|
+
5. Are any of those partitions independent enough to be lanes that won't block each other?
|
|
109
|
+
6. Is there any file multiple lanes want to write? If yes, assign a single owner and have others append via imports or extension points.
|
|
110
|
+
|
|
111
|
+
Answering these yields a roadmap where the critical path is the actual minimum serialization inherent in the work — not arbitrary process overhead.
|