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,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: claude-phase-loop
|
|
3
|
+
description: "Harness Code 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 Harness."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Harness Phase Loop
|
|
7
|
+
|
|
8
|
+
Thin bridge for the repo-local phase-loop runner. This skill points Harness
|
|
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 Harness 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`: print the canonical TUI recovery handoff.
|
|
24
|
+
- `status`: report reconciled or current loop state.
|
|
25
|
+
- `monitor`: observe state/heartbeat/terminal summaries without launching phases.
|
|
26
|
+
- `resume`: reconcile durable state and write the current snapshot.
|
|
27
|
+
- `run`: execute a bounded loop run. Prefer `--max-phases 1` unless the user names another bound.
|
|
28
|
+
- `dry-run`: show the commands the runner would launch without executing them.
|
|
29
|
+
- `sync-skills`: audit or repair the installed `<harness>-phase-loop` bridge skill used for local manual reentry.
|
|
30
|
+
|
|
31
|
+
Keep `run` bounded. If the user asks for an unbounded TUI run, clamp it to
|
|
32
|
+
`--max-phases 1` and say that the bridge keeps interactive runs bounded.
|
|
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 `resolve_skill_bundle_root("claude")/`
|
|
56
|
+
are the recommended manual reentry surface, but they are not required for the
|
|
57
|
+
runner to launch or continue work. If the advisory bridge record reports
|
|
58
|
+
`missing_root`, `missing_skill`, or `drifted`, repair the local bridge with
|
|
59
|
+
`codex-phase-loop sync-skills --apply` before trusting manual Harness reentry.
|
|
60
|
+
The injected Harness bundle carries the full workflow pack
|
|
61
|
+
(`<harness>-phase-roadmap-builder`, `<harness>-plan-phase`,
|
|
62
|
+
`<harness>-execute-phase`, and `<harness>-phase-loop`) from the repo-owned source
|
|
63
|
+
tree under `.phase-loop/runs/<run-id>/<harness>-bundle/`.
|
|
64
|
+
|
|
65
|
+
Use the shared loop state to reason about:
|
|
66
|
+
|
|
67
|
+
- current `automation` status and `verification_status`
|
|
68
|
+
- whether a blocker is `dirty_worktree_conflict`, `branch_sync_conflict`, or another frozen blocker literal
|
|
69
|
+
- whether the selected harness skill pack matches injected metadata or shows installed-skill drift
|
|
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
|
+
Harness Code uses the shared runner contract, but autonomous live dispatch is
|
|
111
|
+
proof-blocked until the authenticated non-interactive planning smoke completes
|
|
112
|
+
inside the runner timeout. Manual TUI reentry and manual-import closeout remain
|
|
113
|
+
supported through `.phase-loop/` state. ThawedCode stays grouped with
|
|
114
|
+
Harness only for docs and manual imports; do not claim a separate live
|
|
115
|
+
ThawedCode automation contract unless a later roadmap proves it.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Harness-specific overlay files for this workflow skill.
|
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: claude-phase-roadmap-builder
|
|
3
|
+
description: "Harness Code roadmap planner. Produces or extends a multi-phase roadmap spec that <harness>-plan-phase can ingest, with phase dependencies and interface-freeze gates."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# <harness>-phase-roadmap-builder
|
|
7
|
+
|
|
8
|
+
## Runtime State
|
|
9
|
+
|
|
10
|
+
For reflections, handoffs, and latest handoff pointers, follow `<harness>-config/shared/runtime-state.md`. This repo/branch/run-isolated contract supersedes any older flat closeout examples retained for historical context in this skill.
|
|
11
|
+
|
|
12
|
+
`shared/phase-loop/protocol.md` is the canonical shared contract for
|
|
13
|
+
`automation:`, `next_skill`, `next_command`, `verification_status`, and
|
|
14
|
+
downstream roadmap-amendment semantics. Harness-specific closeout text must
|
|
15
|
+
agree with that shared protocol.
|
|
16
|
+
|
|
17
|
+
When this skill runs through the phase-loop Harness adapter, the repo-owned
|
|
18
|
+
injected plugin bundle is authoritative. That bundle carries the full Harness
|
|
19
|
+
workflow pack (`<harness>-phase-roadmap-builder`, `<harness>-plan-phase`,
|
|
20
|
+
`<harness>-execute-phase`, and `<harness>-phase-loop`) even if installed bridge
|
|
21
|
+
skills under `resolve_skill_bundle_root("claude")/` are missing or drifted.
|
|
22
|
+
|
|
23
|
+
Produces the `specs/phase-plans-v<N>.md` roadmap that `/<harness>-plan-phase` consumes. Digests the prior conversation and any markdown files the user points at, then writes a phased roadmap whose structure maximizes parallel execution. Creates a new roadmap if none exists; appends phases (never edits existing phases) if one does.
|
|
24
|
+
|
|
25
|
+
## When to use
|
|
26
|
+
|
|
27
|
+
- User wants to formalize a conversation's plan into a phased roadmap.
|
|
28
|
+
- User points at a markdown spec and asks to "phase it."
|
|
29
|
+
- User wants to add phases to an existing `specs/phase-plans-v*.md`.
|
|
30
|
+
- User wants the output to be ingestible by `/<harness>-plan-phase`.
|
|
31
|
+
|
|
32
|
+
## When NOT to use
|
|
33
|
+
|
|
34
|
+
- Single-phase or single-concern change → use `/<harness>-plan-detailed`.
|
|
35
|
+
- Lane-level planning for one phase → the user wants `/<harness>-plan-phase`, not this skill.
|
|
36
|
+
- Pure research / "how does X work" → use `Agent(subagent_type: "Explore")` directly.
|
|
37
|
+
|
|
38
|
+
## Inputs
|
|
39
|
+
|
|
40
|
+
| Arg | Required | Meaning |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| `<spec-path>` | no | Path to an input markdown spec to fold into the roadmap. Optional; conversation context is the primary source. |
|
|
43
|
+
| `--output <path>` | no | Override the default output path. Default: `specs/phase-plans-v<N>.md` at the repo root. |
|
|
44
|
+
| `--append` | no | Force append mode even if the resolved output path is new (rare). |
|
|
45
|
+
| `--review-external` | no | After writing the roadmap, run Gemini + Codex CLIs in parallel to review it. Requires `gemini` and `codex` installed and authenticated. Produces a `_reviews.md` sibling file. |
|
|
46
|
+
|
|
47
|
+
## Prerequisites
|
|
48
|
+
|
|
49
|
+
Expected helpers under `.claude/skills/_shared/` (check existence before invocation; fall back inline when absent):
|
|
50
|
+
|
|
51
|
+
- `_shared/scaffold_docs_catalog.py` — scaffolds the docs catalog. On absence, create `.claude/docs-catalog.json` manually as an empty-array JSON file (`[]`).
|
|
52
|
+
- `_shared/next_reflection_path.py` — legacy helper only; current closeout writes reflections to `resolve_skill_bundle_root("codex")/<harness>-phase-roadmap-builder/reflections/<repo_hash>/<branch_slug>/<run_id>.md`.
|
|
53
|
+
- `_shared/review_with_cli.py` — used only with `--review-external`; required for that flag.
|
|
54
|
+
|
|
55
|
+
## Mode detection
|
|
56
|
+
|
|
57
|
+
Resolve the output path in this order:
|
|
58
|
+
1. `--output` override.
|
|
59
|
+
2. Glob `specs/phase-plans-v*.md`; pick the highest version.
|
|
60
|
+
3. If none found, default to `specs/phase-plans-v1.md` (create mode).
|
|
61
|
+
|
|
62
|
+
If the resolved path exists → **append mode**. Otherwise → **create mode**.
|
|
63
|
+
|
|
64
|
+
## Deferred tool preloading
|
|
65
|
+
|
|
66
|
+
Load tools used later in a single query:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
ToolSearch(query: "select:AskUserQuestion,ExitPlanMode")
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Workflow — create mode
|
|
73
|
+
|
|
74
|
+
### Step 0 — Read predecessor handoff (if present)
|
|
75
|
+
|
|
76
|
+
Handoffs are keyed on the current repo so each workspace has its own slot. Resolve the predecessor path first:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
|
|
80
|
+
if [ -z "$REPO_ROOT" ]; then
|
|
81
|
+
REPO_KEY="_no-git-$(pwd | sha1sum | cut -c1-12)"
|
|
82
|
+
else
|
|
83
|
+
REPO_KEY="$(basename "$REPO_ROOT")-$(printf '%s' "$REPO_ROOT" | sha1sum | cut -c1-12)"
|
|
84
|
+
fi
|
|
85
|
+
PREDECESSOR_HANDOFF="$(python3 - <<'PYH'
|
|
86
|
+
from importlib import util
|
|
87
|
+
from pathlib import Path
|
|
88
|
+
repo = Path.cwd().resolve()
|
|
89
|
+
spec = util.spec_from_file_location("handoff_path", repo / "shared" / "phase-loop" / "handoff_path.py")
|
|
90
|
+
mod = util.module_from_spec(spec)
|
|
91
|
+
spec.loader.exec_module(mod)
|
|
92
|
+
print(mod.resolve_handoff_path(repo, "<harness>-execute-phase"))
|
|
93
|
+
PYH
|
|
94
|
+
)"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
If `$PREDECESSOR_HANDOFF` exists, `Read` it in full — a prior `/<harness>-execute-phase` run may have left context useful for the next roadmap (completed phases, decisions made, gotchas discovered mid-execution). Treat its contents as additional input to Step 1.
|
|
98
|
+
|
|
99
|
+
Defense-in-depth checks (the repo-key scheme prevents the common cross-project case, but these still catch symlink-shared workspaces, manual file copies, and stale handoffs):
|
|
100
|
+
|
|
101
|
+
- If the handoff's `from:` field is not `<harness>-execute-phase` or its timestamp is older than 7 days, flag via `AskUserQuestion` with `[use anyway, ignore, abort]`.
|
|
102
|
+
- Parse the handoff's `artifact:` field and verify at least one referenced path resolves under `$(git rev-parse --show-toplevel)`. On mismatch, surface `AskUserQuestion` with `[use anyway, ignore, abort]`.
|
|
103
|
+
|
|
104
|
+
If absent, proceed — this run is standalone.
|
|
105
|
+
|
|
106
|
+
### Step 1 — Gather inputs
|
|
107
|
+
|
|
108
|
+
Sources (permissive but bounded):
|
|
109
|
+
|
|
110
|
+
1. The current conversation's user turns, assistant plans, and any committed architectural decisions.
|
|
111
|
+
2. The spec path argument, if supplied — `Read` it in full.
|
|
112
|
+
3. `CLAUDE.md` and `AGENTS.md` at the repo root, if present.
|
|
113
|
+
4. Markdown files the user has explicitly named anywhere in the conversation.
|
|
114
|
+
|
|
115
|
+
Do not grep the repo for additional material. If context is insufficient, stop and ask the user via `AskUserQuestion` — a thin roadmap is worse than one more question.
|
|
116
|
+
|
|
117
|
+
### Step 1a — Ensure docs catalog exists
|
|
118
|
+
|
|
119
|
+
Check for the helper before invoking:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
HELPER="$(git rev-parse --show-toplevel)/.claude/skills/_shared/scaffold_docs_catalog.py"
|
|
123
|
+
if [ -f "$HELPER" ]; then
|
|
124
|
+
python3 "$HELPER"
|
|
125
|
+
else
|
|
126
|
+
CATALOG="$(git rev-parse --show-toplevel)/.claude/docs-catalog.json"
|
|
127
|
+
[ -f "$CATALOG" ] || echo '[]' > "$CATALOG"
|
|
128
|
+
fi
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Scaffolds `.claude/docs-catalog.json` if absent; no-op if already present. On helper absence, seed the catalog manually as an empty-array JSON file. The catalog drives the `SL-docs` lane that `<harness>-plan-phase` constructs for every phase. Existence matters more than content at this stage — the catalog will be refreshed (`--rescan`) by each `SL-docs` lane as the roadmap executes.
|
|
132
|
+
|
|
133
|
+
### Step 2 — Synthesize top-of-document sections
|
|
134
|
+
|
|
135
|
+
Fill these sections before touching phase decomposition:
|
|
136
|
+
|
|
137
|
+
- **Context** — one-page synthesis: the problem, current state, the thesis of the refactor/build.
|
|
138
|
+
- **Architecture North Star** — ASCII diagram of the target architecture if the work is structural. Omit if not load-bearing.
|
|
139
|
+
- **Assumptions (fail-loud if wrong)** — numbered list of preconditions; each is something that, if false, invalidates the plan.
|
|
140
|
+
- **Non-Goals** — explicit deferrals. Use to cut scope; silence here causes scope creep later.
|
|
141
|
+
- **Cross-Cutting Principles** — rules that apply across every phase (e.g., "single-writer-per-SQLite-file", "no mocks in integration tests").
|
|
142
|
+
|
|
143
|
+
### Step 3 — Decompose into phases (parallelization-maximizing)
|
|
144
|
+
|
|
145
|
+
Apply the heuristics in `references/parallelization-heuristics.md` in order:
|
|
146
|
+
|
|
147
|
+
1. **Phases are serial checkpoints; lanes within a phase are parallel.** Minimize total wall time by minimizing phase count and maximizing lanes per phase.
|
|
148
|
+
2. **A phase boundary exists only at a necessary interface freeze.** If two bodies of work share no freeze dependency and have disjoint files, they are sibling lanes inside one phase, not sequential phases.
|
|
149
|
+
3. **Prefer narrow, early freezes.** Each phase's `Produces:` lists the tightest contract that unblocks the next phase.
|
|
150
|
+
4. **Split fat phases into parallel sibling phases** when they contain independent subtrees (the `P6A || P6B` pattern).
|
|
151
|
+
5. **Every phase decomposes into ≥2 lanes** unless it is a preamble / interface-freeze-only phase (Phase 1 / P0 are the common exceptions). Single-lane phases are a code smell — merge or split.
|
|
152
|
+
6. **Each phase's `Scope notes` lists explicit parallelism hints**: suggested lane count, candidate disjoint-file partitions, and any single-writer files that would serialize lanes if ignored.
|
|
153
|
+
7. **Identify cross-phase parallelism.** Phases with no shared ancestor in the DAG can run concurrently. Call these out in the DAG.
|
|
154
|
+
8. **Day-1 intra-phase freeze publication.** When one lane's output shape can be published before its implementation lands, declare the shape as an intra-phase freeze so sibling lanes start against the contract rather than waiting.
|
|
155
|
+
9. **Soft upper bound on lanes per phase.** When a phase would contain more than 6–8 lanes AND the lanes partition into independent subtrees sharing no intra-phase freeze, split into sibling phases. When the lanes share intra-phase freezes, keep them in one phase regardless of count.
|
|
156
|
+
|
|
157
|
+
### Step 4 — Draft Top Interface-Freeze Gates
|
|
158
|
+
|
|
159
|
+
For each inter-phase freeze, write one `IF-0-<ALIAS>-<N>` entry naming the concrete symbol, schema, or endpoint being frozen. Narrow is better — a gate that names "a dataclass with fields `{a, b, c}`" lets downstream lanes start; "the data model" does not.
|
|
160
|
+
|
|
161
|
+
### Step 5 — Write each phase section
|
|
162
|
+
|
|
163
|
+
Use the skeleton from `references/roadmap-template.md`. Each phase MUST contain:
|
|
164
|
+
|
|
165
|
+
- `**Objective**` — one or two sentences.
|
|
166
|
+
- `**Exit criteria**` — checkbox list (`- [ ] …`), each item testable.
|
|
167
|
+
- `**Scope notes**` — lane decomposition hints, parallelism advice, edge cases.
|
|
168
|
+
- `**Non-goals**` — explicitly deferred.
|
|
169
|
+
- `**Key files**` — paths the phase touches.
|
|
170
|
+
- `**Depends on**` — upstream phase aliases, or `(none)` for roots. Root phases use the exact form `- (none)` with no trailing prose; put explanatory notes on a following bullet or in `Scope notes`.
|
|
171
|
+
- `**Produces**` — `IF-0-<ALIAS>-<N>` entries for freezes this phase publishes.
|
|
172
|
+
|
|
173
|
+
Phase heading format: `### Phase N — <Name> (<ALIAS>)`. Alias is short, mnemonic, alphanumeric (`P1`, `P2A`, `P2B`, `P3`, …). It becomes the filename token in `phase-plan-v<N>-<alias>.md`.
|
|
174
|
+
|
|
175
|
+
Runner compatibility hard requirement: every `### Phase ...` heading MUST include `(<ALIAS>)`, even when `--output` writes an alternate path such as `planning/**/phase-roadmap.md` instead of `specs/phase-plans-v<N>.md`. Never write prose-only headings like `### Phase 1 — Foundation`; `phase-loop` and `<harness>-plan-phase` use the alias as the stable phase identifier.
|
|
176
|
+
|
|
177
|
+
Before writing the artifact, perform an explicit alias-assignment pass:
|
|
178
|
+
|
|
179
|
+
1. List every runnable phase heading you are about to emit.
|
|
180
|
+
2. Assign one unique uppercase alias per phase.
|
|
181
|
+
3. Rewrite each heading into the exact `### Phase N — <Name> (<ALIAS>)` form.
|
|
182
|
+
4. Ensure the `## Phase Dependency DAG`, `**Depends on**`, `**Produces**`, and `## Execution Notes` sections refer to phases by those aliases, not by prose names or workstream IDs.
|
|
183
|
+
|
|
184
|
+
Do not substitute `## Phase Decomposition`, `## Workstreams`, or prose "Done when" sections for the canonical `## Phases` structure. Narrative context may exist above the phase list, but runnable roadmap content must be under `## Phases` with aliased phase headings.
|
|
185
|
+
|
|
186
|
+
### Step 6 — Build Phase Dependency DAG
|
|
187
|
+
|
|
188
|
+
Render as ASCII. Show serial arrows (`P1 → P2A → P2B`) and parallel branches (`P6A parallel after P1`). This is the source of truth for the wall-clock schedule.
|
|
189
|
+
|
|
190
|
+
### Step 7 — Write Execution Notes and Verification
|
|
191
|
+
|
|
192
|
+
- **Execution Notes**: how to invoke `/<harness>-plan-phase <ALIAS>` for each phase, and `/<harness>-execute-phase <alias>` for each. Call out which phases can be planned and executed concurrently.
|
|
193
|
+
- **Verification**: end-to-end shell commands that prove the whole roadmap delivered its goals. These are the integration tests the user will run after the last phase merges.
|
|
194
|
+
|
|
195
|
+
### Step 8 — Validate
|
|
196
|
+
|
|
197
|
+
The validator ships in the always-installed phase-loop runtime, so it does not
|
|
198
|
+
depend on the skill bundle's `scripts/` directory being present. Prefer the CLI:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
phase-loop validate-roadmap <output-path>
|
|
202
|
+
# equivalent, if you only have the runtime importable and not the console script:
|
|
203
|
+
python3 -m phase_loop_runtime.roadmap_lint <output-path>
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Both wrap `phase_loop_runtime.roadmap_lint` (the single source of truth; the
|
|
207
|
+
bundle's `scripts/validate_roadmap.py` is a thin shim over it). Run against the
|
|
208
|
+
exact artifact path written by this invocation, including custom paths such as
|
|
209
|
+
`planning/**/phase-roadmap.md`; do not validate a default
|
|
210
|
+
`specs/phase-plans-v<N>.md` path unless that is the actual output. Fix every
|
|
211
|
+
reported error before handing off. The validator enforces: required headings,
|
|
212
|
+
phase-heading aliases, alias uniqueness, DAG acyclicity, IF-gate ID format,
|
|
213
|
+
Depends-on correctness, and the ≥2-lanes-per-phase rule (with a preamble-phase
|
|
214
|
+
escape hatch).
|
|
215
|
+
|
|
216
|
+
If neither the `phase-loop` console script nor the `phase_loop_runtime` package
|
|
217
|
+
is importable (an incomplete install), do not hand off a roadmap checked only by
|
|
218
|
+
eye: install the runtime from the public agent-harness
|
|
219
|
+
(`scripts/install-agent-harness.sh`, or `uv tool install
|
|
220
|
+
"git+https://github.com/ViperJuice/agent-harness@v0.1.6#subdirectory=phase-loop-runtime"`)
|
|
221
|
+
or report a blocker. The validator itself is always available once the runtime is
|
|
222
|
+
installed — there is no "validator script missing" blocker.
|
|
223
|
+
|
|
224
|
+
### Step 8.5 — External CLI review (only if `--review-external`)
|
|
225
|
+
|
|
226
|
+
Requires `_shared/review_with_cli.py` (see Prerequisites). After the roadmap is written and validated, run:
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
python3 "$(git rev-parse --show-toplevel)/.claude/skills/_shared/review_with_cli.py" \
|
|
230
|
+
--artifact <output-path> \
|
|
231
|
+
--prompt-file "$(git rev-parse --show-toplevel)/.claude/skills/<harness>-phase-roadmap-builder/assets/review_prompt.md" \
|
|
232
|
+
--out <output-path>_reviews.md
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
If the frontier-model cache is empty, the script prints the discovery prompt to stderr. Surface to the user via `AskUserQuestion` with options `[run discovery now, skip review this run, abort]`.
|
|
236
|
+
|
|
237
|
+
Tell the user: "Review written to `<output-path>_reviews.md`. Agreements between Gemini and Codex are real signal; divergences are context."
|
|
238
|
+
|
|
239
|
+
### Step 9 — Write and exit
|
|
240
|
+
|
|
241
|
+
Write the roadmap to the resolved output path. If you are in plan mode (a plan-mode system reminder is present), call `ExitPlanMode` — the roadmap is the approval surface. If you are NOT in plan mode (adapter/non-interactive or default invocation), do not call `ExitPlanMode`; the written roadmap file is itself the deliverable — present its path and a one-line summary instead. After approval (or after writing, when not in plan mode), the hand-off message is: "Run `/<harness>-plan-phase <ALIAS>` for each phase. Phases with no shared DAG ancestor (e.g., `<list them>`) can be planned concurrently."
|
|
242
|
+
|
|
243
|
+
## Workflow — append mode
|
|
244
|
+
|
|
245
|
+
### Step A1 — Read existing roadmap
|
|
246
|
+
|
|
247
|
+
`Read` the existing `specs/phase-plans-v*.md`. Extract:
|
|
248
|
+
|
|
249
|
+
- The highest `## Phase N` number.
|
|
250
|
+
- The full existing alias set.
|
|
251
|
+
- The highest `IF-0-<ALIAS>-<N>` sequence number per phase.
|
|
252
|
+
- The existing Phase Dependency DAG edges.
|
|
253
|
+
|
|
254
|
+
### Step A2 — Identify new phases from context
|
|
255
|
+
|
|
256
|
+
Apply Step 1 above to gather new context. Then apply Step 3's heuristics to decide which new phases are needed. Do not modify existing phases — additions only. If the new context implies that an existing phase is wrong, stop and tell the user; do not silently edit.
|
|
257
|
+
|
|
258
|
+
### Step A3 — Assign numbers and aliases
|
|
259
|
+
|
|
260
|
+
- Phase numbers continue strictly increasing (highest existing + 1, +2, …).
|
|
261
|
+
- New aliases must not collide with existing ones. Extend the convention (`P8`, `P9`, or `P4B` if it branches from an existing `P4`).
|
|
262
|
+
|
|
263
|
+
### Step A4 — Wire Depends on
|
|
264
|
+
|
|
265
|
+
For each new phase, list every existing phase it depends on by alias. A new phase that depends on nothing existing is either a new root (rare — possible when introducing a parallel initiative) or misidentified.
|
|
266
|
+
|
|
267
|
+
### Step A5 — Splice into the document
|
|
268
|
+
|
|
269
|
+
Insert new phase sections under `## Phases`, after the last existing phase, before `## Execution Notes`. Update two other sections:
|
|
270
|
+
|
|
271
|
+
- `## Phase Dependency DAG` — add the new nodes and edges.
|
|
272
|
+
- `## Top Interface-Freeze Gates` — append any new `IF-0-<ALIAS>-<N>` entries.
|
|
273
|
+
|
|
274
|
+
Leave `## Context`, `## Architecture North Star`, `## Assumptions`, `## Non-Goals`, `## Cross-Cutting Principles`, `## Execution Notes`, and `## Verification` alone unless the new phases invalidate a stated assumption — in which case surface the conflict to the user and stop.
|
|
275
|
+
|
|
276
|
+
### Step A6 — Validate + exit
|
|
277
|
+
|
|
278
|
+
Same as Step 8, Step 8.5 (if `--review-external`), and Step 9. Validator must pass.
|
|
279
|
+
|
|
280
|
+
## Output contract
|
|
281
|
+
|
|
282
|
+
The output file must match `references/roadmap-template.md` structurally. `<harness>-plan-phase` parses stable headings (`## Context`, `### Phase N — <Name> (<ALIAS>)`, `**Objective**`, `**Exit criteria**`, etc.) by regex; non-standard formatting breaks downstream.
|
|
283
|
+
|
|
284
|
+
## Hand-off
|
|
285
|
+
|
|
286
|
+
After approval, invoke `/<harness>-plan-phase <ALIAS>` per phase. Phases with no shared ancestor in the DAG can be planned and executed in parallel — note which ones in the hand-off message. The wall-clock critical path is the longest DAG path through the roadmap.
|
|
287
|
+
|
|
288
|
+
## Close-out — Stage artifact (preservation guarantee)
|
|
289
|
+
|
|
290
|
+
After `ExitPlanMode` is approved (or, when not in plan mode, after the roadmap file is written), before exiting:
|
|
291
|
+
|
|
292
|
+
1. Run `git status --short -- <output-path>` and include the `_reviews.md` sibling if `--review-external` produced one.
|
|
293
|
+
2. If the roadmap or review artifact is untracked or modified and the user did not explicitly forbid staging, run `git add <output-path>` plus the review sibling if present.
|
|
294
|
+
3. Rerun `git status --short -- <output-path>` and report `Artifact state: staged|tracked|modified|unstaged|blocked`.
|
|
295
|
+
4. Do not commit unless the user explicitly asked for a commit.
|
|
296
|
+
|
|
297
|
+
Before final response and handoff, choose the next phase to plan from the roadmap DAG. If at least one phase is ready, set `Next phase: <ALIAS> - <phase name>` and `Next command: /<harness>-plan-phase <ALIAS>`. If no phase should be planned next, set `Next phase: none - <reason>` and `Next command: none - <reason>`.
|
|
298
|
+
|
|
299
|
+
## Close-out — Reflection + Handoff
|
|
300
|
+
|
|
301
|
+
Stage the roadmap/plan artifacts before writing either close-out file so the deliverable is preserved in the index unless the user explicitly forbade staging.
|
|
302
|
+
|
|
303
|
+
After artifacts are staged or confirmed tracked, resolve paths:
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
REFLECTION_PATH=resolve_skill_bundle_root("codex")/<harness>-phase-roadmap-builder/reflections/<repo_hash>/<branch_slug>/<run_id>.md
|
|
307
|
+
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
|
|
308
|
+
REPO_LOCAL_HANDOFF=$(python3 - <<'PYH'
|
|
309
|
+
from importlib import util
|
|
310
|
+
from pathlib import Path
|
|
311
|
+
repo = Path.cwd().resolve()
|
|
312
|
+
spec = util.spec_from_file_location("handoff_path", repo / "shared" / "phase-loop" / "handoff_path.py")
|
|
313
|
+
mod = util.module_from_spec(spec)
|
|
314
|
+
spec.loader.exec_module(mod)
|
|
315
|
+
print(mod.resolve_handoff_path(repo, "<harness>-phase-roadmap-builder"))
|
|
316
|
+
PYH
|
|
317
|
+
)
|
|
318
|
+
mkdir -p "$(dirname "$REPO_LOCAL_HANDOFF")"
|
|
319
|
+
SKILL_MD=resolve_skill_bundle_root("codex")/<harness>-phase-roadmap-builder/SKILL.md
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
Write BOTH files directly via the Write tool — this is the primary path.
|
|
323
|
+
|
|
324
|
+
FILE 1 — REPO-AGNOSTIC reflection → write to `<REFLECTION_PATH>`
|
|
325
|
+
|
|
326
|
+
```
|
|
327
|
+
# <harness>-phase-roadmap-builder reflection — <ISO timestamp>
|
|
328
|
+
|
|
329
|
+
## Run context
|
|
330
|
+
- Skill: <harness>-phase-roadmap-builder
|
|
331
|
+
- Timestamp: <ISO timestamp>
|
|
332
|
+
- Repo: <repo>
|
|
333
|
+
- Branch: <branch>
|
|
334
|
+
- Commit: <commit>
|
|
335
|
+
- Artifact: <artifact path if any, or none>
|
|
336
|
+
|
|
337
|
+
## What worked
|
|
338
|
+
- <bullet, about the SKILL's instructions>
|
|
339
|
+
|
|
340
|
+
## What didn't
|
|
341
|
+
- <bullet, about friction or gaps in the SKILL's instructions>
|
|
342
|
+
|
|
343
|
+
## Improvements to SKILL.md
|
|
344
|
+
- <specific, actionable change to the instructions>
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
Do NOT reference this project, codebase, filenames, or domain in FILE 1. Feedback is about how the skill's instructions performed, for a future meta-skill that digests reflections across runs.
|
|
348
|
+
|
|
349
|
+
FILE 2 — REPO-SPECIFIC handoff → write to `<REPO_LOCAL_HANDOFF>` (per-repo slot; overwrites any prior handoff from this skill in the same repo)
|
|
350
|
+
|
|
351
|
+
```
|
|
352
|
+
<!--
|
|
353
|
+
Consumer validation — before acting on this handoff:
|
|
354
|
+
1. Verify `from:` matches the expected predecessor skill.
|
|
355
|
+
2. Verify `timestamp:` is within the last 7 days.
|
|
356
|
+
3. Verify every `artifact:` path resolves under your current
|
|
357
|
+
`$(git rev-parse --show-toplevel)`. If any path points to a
|
|
358
|
+
different repo, stop and surface it to the user — the handoff
|
|
359
|
+
was written against a different workspace.
|
|
360
|
+
-->
|
|
361
|
+
---
|
|
362
|
+
from: <harness>-phase-roadmap-builder
|
|
363
|
+
timestamp: <ISO>
|
|
364
|
+
artifact: <absolute path(s) to roadmap spec + any reviews written>
|
|
365
|
+
artifact_state: <staged|tracked|modified|unstaged|blocked>
|
|
366
|
+
next_skill: <<harness>-plan-phase|none>
|
|
367
|
+
next_command: </<harness>-plan-phase ALIAS|none - reason>
|
|
368
|
+
next_phase: <ALIAS - phase name|none - reason>
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
# Handoff for the next skill
|
|
372
|
+
|
|
373
|
+
## Summary
|
|
374
|
+
<2-3 sentences: what was produced, where to find it.>
|
|
375
|
+
|
|
376
|
+
## Key decisions made this run
|
|
377
|
+
- <numbered, one line each>
|
|
378
|
+
|
|
379
|
+
## Open items for the next skill
|
|
380
|
+
- <concrete, actionable — e.g., "Lane SL-3 expects the
|
|
381
|
+
plugins_for(repo_id) signature from IF-0-P3-1; verify it
|
|
382
|
+
before planning P4">
|
|
383
|
+
|
|
384
|
+
## Repo-specific gotchas surfaced
|
|
385
|
+
- <things that surprised this run; quirks of THIS codebase>
|
|
386
|
+
|
|
387
|
+
## Planning artifacts staged this run
|
|
388
|
+
- <path> @ <artifact_state>
|
|
389
|
+
|
|
390
|
+
## Next skill's likely scope
|
|
391
|
+
- <best-effort forecast of which files/paths the next skill will touch>
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
Optionally delegate to a spawned frontier-tier Agent instead when independent review with a fresh context window is desired (e.g., after complex runs). Resolve the model via the `<harness>-execute-phase` Model tiers table:
|
|
395
|
+
|
|
396
|
+
```
|
|
397
|
+
Agent(
|
|
398
|
+
subagent_type: "general-purpose",
|
|
399
|
+
model: "<frontier-model-id>",
|
|
400
|
+
name: "<harness>-phase-roadmap-builder-closeout",
|
|
401
|
+
prompt: """
|
|
402
|
+
Review the skill at <SKILL_MD> and the current execution transcript.
|
|
403
|
+
Write FILE 1 to <REFLECTION_PATH> and FILE 2 to <REPO_LOCAL_HANDOFF> using
|
|
404
|
+
the schemas defined in the SKILL's Close-out section.
|
|
405
|
+
"""
|
|
406
|
+
)
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
After the files are written, print to the user:
|
|
410
|
+
|
|
411
|
+
> Roadmap written to `<spec-path>`.
|
|
412
|
+
> Reflection saved to `<REFLECTION_PATH>`.
|
|
413
|
+
> Handoff written to `<REPO_LOCAL_HANDOFF>`.
|
|
414
|
+
>
|
|
415
|
+
> Recommended next step: run `/clear` to reset your context window, then invoke `/<harness>-plan-phase <ALIAS>`. The next skill reads the handoff automatically.
|
|
416
|
+
|
|
417
|
+
## Reference files
|
|
418
|
+
|
|
419
|
+
- `references/roadmap-template.md` — exact structural skeleton to emit.
|
|
420
|
+
- `references/parallelization-heuristics.md` — extended rules for edge cases in phase/lane decomposition.
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
Use `phase_loop_runtime.skill_paths` resolver helpers for harness skill roots, handoff roots, helper roots, and reflection roots.
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
## Spec Delta Policy
|
|
428
|
+
|
|
429
|
+
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.
|
|
430
|
+
|
|
431
|
+
## Verification Contract
|
|
432
|
+
|
|
433
|
+
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.
|
|
434
|
+
|
|
435
|
+
## Closeout
|
|
436
|
+
|
|
437
|
+
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.
|
|
438
|
+
|
|
439
|
+
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.
|