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,366 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "GENERATED from phase_loop_runtime.models.PhaseLoopCloseout by `phase-loop export-schema`. Do not hand-edit; regenerate instead.",
|
|
3
|
+
"$id": "phase_loop_closeout.v1",
|
|
4
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"properties": {
|
|
7
|
+
"artifacts": {
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"artifact_paths": {
|
|
11
|
+
"type": "object"
|
|
12
|
+
},
|
|
13
|
+
"changed_paths": {
|
|
14
|
+
"items": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"type": "array"
|
|
18
|
+
},
|
|
19
|
+
"evidence_refs": {
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "object"
|
|
22
|
+
},
|
|
23
|
+
"type": "array"
|
|
24
|
+
},
|
|
25
|
+
"plan_path": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"plan_sha256": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"required": [
|
|
33
|
+
"artifact_paths",
|
|
34
|
+
"changed_paths",
|
|
35
|
+
"evidence_refs",
|
|
36
|
+
"plan_path",
|
|
37
|
+
"plan_sha256"
|
|
38
|
+
],
|
|
39
|
+
"type": "object"
|
|
40
|
+
},
|
|
41
|
+
"automation": {
|
|
42
|
+
"additionalProperties": false,
|
|
43
|
+
"properties": {
|
|
44
|
+
"artifact": {
|
|
45
|
+
"type": [
|
|
46
|
+
"string",
|
|
47
|
+
"null"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"artifact_state": {
|
|
51
|
+
"type": [
|
|
52
|
+
"string",
|
|
53
|
+
"null"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"blocker_class": {
|
|
57
|
+
"type": [
|
|
58
|
+
"string",
|
|
59
|
+
"null"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"blocker_summary": {
|
|
63
|
+
"type": [
|
|
64
|
+
"string",
|
|
65
|
+
"null"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"human_required": {
|
|
69
|
+
"type": "boolean"
|
|
70
|
+
},
|
|
71
|
+
"next_command": {
|
|
72
|
+
"type": [
|
|
73
|
+
"string",
|
|
74
|
+
"null"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"next_effort_hint": {
|
|
78
|
+
"type": [
|
|
79
|
+
"string",
|
|
80
|
+
"null"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"next_model_hint": {
|
|
84
|
+
"type": [
|
|
85
|
+
"string",
|
|
86
|
+
"null"
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"next_skill": {
|
|
90
|
+
"type": [
|
|
91
|
+
"string",
|
|
92
|
+
"null"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"required_human_inputs": {
|
|
96
|
+
"items": {
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
"type": "array"
|
|
100
|
+
},
|
|
101
|
+
"status": {
|
|
102
|
+
"type": "string"
|
|
103
|
+
},
|
|
104
|
+
"verification_status": {
|
|
105
|
+
"type": "string"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"required": [
|
|
109
|
+
"human_required",
|
|
110
|
+
"required_human_inputs",
|
|
111
|
+
"status",
|
|
112
|
+
"verification_status"
|
|
113
|
+
],
|
|
114
|
+
"type": "object"
|
|
115
|
+
},
|
|
116
|
+
"blocker": {
|
|
117
|
+
"additionalProperties": false,
|
|
118
|
+
"properties": {
|
|
119
|
+
"access_attempts": {
|
|
120
|
+
"items": {
|
|
121
|
+
"type": "object"
|
|
122
|
+
},
|
|
123
|
+
"type": "array"
|
|
124
|
+
},
|
|
125
|
+
"blocker_class": {
|
|
126
|
+
"type": [
|
|
127
|
+
"string",
|
|
128
|
+
"null"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"blocker_summary": {
|
|
132
|
+
"type": [
|
|
133
|
+
"string",
|
|
134
|
+
"null"
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
"human_required": {
|
|
138
|
+
"type": "boolean"
|
|
139
|
+
},
|
|
140
|
+
"required_human_inputs": {
|
|
141
|
+
"items": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"type": "array"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"required": [
|
|
148
|
+
"access_attempts",
|
|
149
|
+
"human_required",
|
|
150
|
+
"required_human_inputs"
|
|
151
|
+
],
|
|
152
|
+
"type": "object"
|
|
153
|
+
},
|
|
154
|
+
"doc_delta_closeout": {
|
|
155
|
+
"additionalProperties": false,
|
|
156
|
+
"properties": {
|
|
157
|
+
"decision": {
|
|
158
|
+
"type": "string"
|
|
159
|
+
},
|
|
160
|
+
"evidence_paths": {
|
|
161
|
+
"items": {
|
|
162
|
+
"type": "string"
|
|
163
|
+
},
|
|
164
|
+
"type": "array"
|
|
165
|
+
},
|
|
166
|
+
"justification": {
|
|
167
|
+
"type": [
|
|
168
|
+
"string",
|
|
169
|
+
"null"
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
"schema": {
|
|
173
|
+
"type": "string"
|
|
174
|
+
},
|
|
175
|
+
"target_surfaces": {
|
|
176
|
+
"items": {
|
|
177
|
+
"type": "string"
|
|
178
|
+
},
|
|
179
|
+
"type": "array"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"required": [
|
|
183
|
+
"decision",
|
|
184
|
+
"evidence_paths",
|
|
185
|
+
"schema",
|
|
186
|
+
"target_surfaces"
|
|
187
|
+
],
|
|
188
|
+
"type": [
|
|
189
|
+
"object",
|
|
190
|
+
"null"
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
"phase": {
|
|
194
|
+
"type": "string"
|
|
195
|
+
},
|
|
196
|
+
"schema": {
|
|
197
|
+
"const": "phase_loop_closeout.v1",
|
|
198
|
+
"type": "string"
|
|
199
|
+
},
|
|
200
|
+
"source_bundle": {
|
|
201
|
+
"additionalProperties": false,
|
|
202
|
+
"properties": {
|
|
203
|
+
"path": {
|
|
204
|
+
"type": [
|
|
205
|
+
"string",
|
|
206
|
+
"null"
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
"phase_id": {
|
|
210
|
+
"type": [
|
|
211
|
+
"string",
|
|
212
|
+
"null"
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
"pipeline_mode": {
|
|
216
|
+
"type": "string"
|
|
217
|
+
},
|
|
218
|
+
"protected_sources": {
|
|
219
|
+
"items": {
|
|
220
|
+
"type": "object"
|
|
221
|
+
},
|
|
222
|
+
"type": "array"
|
|
223
|
+
},
|
|
224
|
+
"sha256": {
|
|
225
|
+
"type": [
|
|
226
|
+
"string",
|
|
227
|
+
"null"
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"required": [
|
|
232
|
+
"pipeline_mode",
|
|
233
|
+
"protected_sources"
|
|
234
|
+
],
|
|
235
|
+
"type": "object"
|
|
236
|
+
},
|
|
237
|
+
"source_truth_impact": {
|
|
238
|
+
"additionalProperties": false,
|
|
239
|
+
"properties": {
|
|
240
|
+
"canonical_refresh_reason_codes": {
|
|
241
|
+
"items": {
|
|
242
|
+
"type": "string"
|
|
243
|
+
},
|
|
244
|
+
"type": "array"
|
|
245
|
+
},
|
|
246
|
+
"canonical_refresh_recommended": {
|
|
247
|
+
"type": "boolean"
|
|
248
|
+
},
|
|
249
|
+
"changed_path_boundaries": {
|
|
250
|
+
"items": {
|
|
251
|
+
"type": "object"
|
|
252
|
+
},
|
|
253
|
+
"type": "array"
|
|
254
|
+
},
|
|
255
|
+
"redaction_posture": {
|
|
256
|
+
"type": "string"
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"required": [
|
|
260
|
+
"canonical_refresh_reason_codes",
|
|
261
|
+
"canonical_refresh_recommended",
|
|
262
|
+
"changed_path_boundaries",
|
|
263
|
+
"redaction_posture"
|
|
264
|
+
],
|
|
265
|
+
"type": "object"
|
|
266
|
+
},
|
|
267
|
+
"spec_delta_closeout": {
|
|
268
|
+
"additionalProperties": false,
|
|
269
|
+
"properties": {
|
|
270
|
+
"blocker_class": {
|
|
271
|
+
"type": [
|
|
272
|
+
"string",
|
|
273
|
+
"null"
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
"decision": {
|
|
277
|
+
"type": "string"
|
|
278
|
+
},
|
|
279
|
+
"evidence_paths": {
|
|
280
|
+
"items": {
|
|
281
|
+
"type": "string"
|
|
282
|
+
},
|
|
283
|
+
"type": "array"
|
|
284
|
+
},
|
|
285
|
+
"redaction_posture": {
|
|
286
|
+
"type": "string"
|
|
287
|
+
},
|
|
288
|
+
"schema": {
|
|
289
|
+
"type": "string"
|
|
290
|
+
},
|
|
291
|
+
"target_surfaces": {
|
|
292
|
+
"items": {
|
|
293
|
+
"type": "string"
|
|
294
|
+
},
|
|
295
|
+
"type": "array"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"required": [
|
|
299
|
+
"decision",
|
|
300
|
+
"evidence_paths",
|
|
301
|
+
"redaction_posture",
|
|
302
|
+
"schema",
|
|
303
|
+
"target_surfaces"
|
|
304
|
+
],
|
|
305
|
+
"type": [
|
|
306
|
+
"object",
|
|
307
|
+
"null"
|
|
308
|
+
]
|
|
309
|
+
},
|
|
310
|
+
"terminal_status": {
|
|
311
|
+
"enum": [
|
|
312
|
+
"blocked",
|
|
313
|
+
"complete",
|
|
314
|
+
"failed_verification",
|
|
315
|
+
"human_required",
|
|
316
|
+
"stale_input"
|
|
317
|
+
],
|
|
318
|
+
"type": "string"
|
|
319
|
+
},
|
|
320
|
+
"verification": {
|
|
321
|
+
"additionalProperties": false,
|
|
322
|
+
"properties": {
|
|
323
|
+
"agent_reported_verification_status": {
|
|
324
|
+
"type": [
|
|
325
|
+
"string",
|
|
326
|
+
"null"
|
|
327
|
+
]
|
|
328
|
+
},
|
|
329
|
+
"commands": {
|
|
330
|
+
"items": {
|
|
331
|
+
"type": "string"
|
|
332
|
+
},
|
|
333
|
+
"type": "array"
|
|
334
|
+
},
|
|
335
|
+
"results": {
|
|
336
|
+
"items": {
|
|
337
|
+
"type": "object"
|
|
338
|
+
},
|
|
339
|
+
"type": "array"
|
|
340
|
+
},
|
|
341
|
+
"status": {
|
|
342
|
+
"type": "string"
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
"required": [
|
|
346
|
+
"commands",
|
|
347
|
+
"results",
|
|
348
|
+
"status"
|
|
349
|
+
],
|
|
350
|
+
"type": "object"
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"required": [
|
|
354
|
+
"artifacts",
|
|
355
|
+
"automation",
|
|
356
|
+
"blocker",
|
|
357
|
+
"phase",
|
|
358
|
+
"schema",
|
|
359
|
+
"source_bundle",
|
|
360
|
+
"source_truth_impact",
|
|
361
|
+
"terminal_status",
|
|
362
|
+
"verification"
|
|
363
|
+
],
|
|
364
|
+
"title": "phase_loop_closeout",
|
|
365
|
+
"type": "object"
|
|
366
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import shutil
|
|
5
|
+
from dataclasses import asdict, dataclass
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
from .skill_paths import HARNESS_DEFAULT_SKILL_ROOTS, current_harness, resolve_skill_bundle_root
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
REQUIRED_SKILLS: tuple[str, ...] = (
|
|
12
|
+
"advisor-board",
|
|
13
|
+
"execute-detailed",
|
|
14
|
+
"execute-phase",
|
|
15
|
+
"plan-phase",
|
|
16
|
+
"plan-detailed",
|
|
17
|
+
"phase-roadmap-builder",
|
|
18
|
+
"phase-loop",
|
|
19
|
+
"run-train",
|
|
20
|
+
"skill-editor",
|
|
21
|
+
"skill-improvement-planner",
|
|
22
|
+
"task-contextualizer",
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
# Prior skill names kept resolvable as ALIASES so existing agent instructions do
|
|
26
|
+
# not break across a rename (ABDRESOLVE: advisor-panel -> advisor-board). The
|
|
27
|
+
# canonical installed skill is ``<harness>-<canonical>``; the alias installs the
|
|
28
|
+
# SAME skill under the historical prefixed name ``<harness>-<alias>`` so a
|
|
29
|
+
# maintainer's ``/<harness>-advisor-panel`` invocation resolves to the CURRENT
|
|
30
|
+
# canonical skill. The alias is installed FROM the canonical source on every run,
|
|
31
|
+
# so a reinstall refreshes it (and overwrites a stale pre-rename dir) rather than
|
|
32
|
+
# leaving it dangling. ``canonical_skill_name`` maps a typed alias back to the
|
|
33
|
+
# canonical name for callers that resolve by string.
|
|
34
|
+
SKILL_ALIASES: dict[str, str] = {
|
|
35
|
+
"advisor-panel": "advisor-board",
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def canonical_skill_name(name: str) -> str:
|
|
40
|
+
"""Map a (possibly aliased, possibly harness-prefixed) skill name to its
|
|
41
|
+
canonical unprefixed skill name. ``advisor-panel`` and any
|
|
42
|
+
``<harness>-advisor-panel`` resolve to ``advisor-board``."""
|
|
43
|
+
raw = (name or "").strip()
|
|
44
|
+
for harness in ("claude", "codex", "gemini", "opencode"):
|
|
45
|
+
prefix = f"{harness}-"
|
|
46
|
+
if raw.startswith(prefix):
|
|
47
|
+
raw = raw[len(prefix):]
|
|
48
|
+
break
|
|
49
|
+
return SKILL_ALIASES.get(raw, raw)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
@dataclass(frozen=True)
|
|
53
|
+
class InstallAction:
|
|
54
|
+
harness: str
|
|
55
|
+
skill_name: str
|
|
56
|
+
installed_name: str
|
|
57
|
+
source: str
|
|
58
|
+
destination: str
|
|
59
|
+
mode: str
|
|
60
|
+
action: str
|
|
61
|
+
overlay: str | None = None
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def install_skills(
|
|
65
|
+
*,
|
|
66
|
+
harness: str,
|
|
67
|
+
source: Path,
|
|
68
|
+
destination: Path | None = None,
|
|
69
|
+
mode: str = "symlink",
|
|
70
|
+
apply: bool = False,
|
|
71
|
+
expand_body: bool = True,
|
|
72
|
+
) -> list[InstallAction]:
|
|
73
|
+
normalized = current_harness(harness)
|
|
74
|
+
if mode not in {"symlink", "copy"}:
|
|
75
|
+
raise ValueError("mode must be 'symlink' or 'copy'")
|
|
76
|
+
|
|
77
|
+
source_root = Path(source).expanduser().resolve()
|
|
78
|
+
destination_root = Path(destination).expanduser() if destination else resolve_skill_bundle_root(normalized)
|
|
79
|
+
_validate_bundle(source_root)
|
|
80
|
+
|
|
81
|
+
actions: list[InstallAction] = []
|
|
82
|
+
|
|
83
|
+
def _install_one(skill_name: str, source_skill: str, installed_name: str) -> None:
|
|
84
|
+
source_dir = source_root / source_skill
|
|
85
|
+
destination_dir = destination_root / installed_name
|
|
86
|
+
overlay_dir = source_dir / "_overrides" / normalized
|
|
87
|
+
overlay = str(overlay_dir) if overlay_dir.exists() else None
|
|
88
|
+
action = _planned_action(source_dir, destination_dir, mode, overlay_dir if overlay else None)
|
|
89
|
+
record = InstallAction(
|
|
90
|
+
harness=normalized,
|
|
91
|
+
skill_name=skill_name,
|
|
92
|
+
installed_name=installed_name,
|
|
93
|
+
source=str(source_dir),
|
|
94
|
+
destination=str(destination_dir),
|
|
95
|
+
mode=mode,
|
|
96
|
+
action=action,
|
|
97
|
+
overlay=overlay,
|
|
98
|
+
)
|
|
99
|
+
actions.append(record)
|
|
100
|
+
if apply:
|
|
101
|
+
_apply_action(source_dir, destination_dir, mode, installed_name, normalized, overlay_dir if overlay else None, expand_body=expand_body)
|
|
102
|
+
|
|
103
|
+
for skill_name in REQUIRED_SKILLS:
|
|
104
|
+
_install_one(skill_name, skill_name, f"{normalized}-{skill_name}")
|
|
105
|
+
|
|
106
|
+
# Historical-name aliases: install the canonical skill a second time under the
|
|
107
|
+
# prefixed alias name so ``/<harness>-advisor-panel`` resolves to today's
|
|
108
|
+
# advisor-board. Installed FROM the canonical source, so each run refreshes the
|
|
109
|
+
# alias (a stale pre-rename dir is overwritten, not orphaned).
|
|
110
|
+
for alias, canonical in SKILL_ALIASES.items():
|
|
111
|
+
_install_one(alias, canonical, f"{normalized}-{alias}")
|
|
112
|
+
|
|
113
|
+
return actions
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def actions_to_json(actions: list[InstallAction]) -> str:
|
|
117
|
+
return json.dumps([asdict(action) for action in actions], indent=2, sort_keys=True)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def _validate_bundle(source_root: Path) -> None:
|
|
121
|
+
missing = [name for name in REQUIRED_SKILLS if not (source_root / name / "SKILL.md").is_file()]
|
|
122
|
+
if missing:
|
|
123
|
+
raise FileNotFoundError(f"missing required phase-loop skills: {', '.join(missing)}")
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def _planned_action(source_dir: Path, destination_dir: Path, mode: str, overlay_dir: Path | None) -> str:
|
|
127
|
+
if destination_dir.is_symlink() and destination_dir.resolve() == source_dir and mode == "symlink" and overlay_dir is None:
|
|
128
|
+
return "unchanged"
|
|
129
|
+
if destination_dir.exists() or destination_dir.is_symlink():
|
|
130
|
+
return "replace"
|
|
131
|
+
return "create"
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def _apply_action(source_dir: Path, destination_dir: Path, mode: str, installed_name: str, harness: str, overlay_dir: Path | None, *, expand_body: bool = True) -> None:
|
|
135
|
+
destination_dir.parent.mkdir(parents=True, exist_ok=True)
|
|
136
|
+
if destination_dir.is_symlink() or destination_dir.exists():
|
|
137
|
+
if destination_dir.is_dir() and not destination_dir.is_symlink():
|
|
138
|
+
shutil.rmtree(destination_dir)
|
|
139
|
+
else:
|
|
140
|
+
destination_dir.unlink()
|
|
141
|
+
|
|
142
|
+
shutil.copytree(source_dir, destination_dir, ignore=shutil.ignore_patterns("_overrides"))
|
|
143
|
+
if overlay_dir is not None:
|
|
144
|
+
_copy_overlay(overlay_dir, destination_dir)
|
|
145
|
+
_rewrite_skill_name(destination_dir / "SKILL.md", installed_name, harness, expand_body=expand_body)
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def _copy_overlay(overlay_dir: Path, destination_dir: Path) -> None:
|
|
149
|
+
for path in overlay_dir.rglob("*"):
|
|
150
|
+
relative = path.relative_to(overlay_dir)
|
|
151
|
+
target = destination_dir / relative
|
|
152
|
+
if path.is_dir():
|
|
153
|
+
target.mkdir(parents=True, exist_ok=True)
|
|
154
|
+
else:
|
|
155
|
+
target.parent.mkdir(parents=True, exist_ok=True)
|
|
156
|
+
shutil.copy2(path, target)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
def _rewrite_skill_name(path: Path, installed_name: str, harness: str, *, expand_body: bool = True) -> None:
|
|
160
|
+
text = path.read_text(encoding="utf-8")
|
|
161
|
+
# #26 item 2: the canonical bundle keeps skill-name references harness-neutral
|
|
162
|
+
# as the ``<harness>-<skill>`` placeholder in prose (so the base collapses and
|
|
163
|
+
# avoids per-harness override bloat). On the FINAL install to a harness's skill
|
|
164
|
+
# root, re-expand it to the concrete per-harness form so the installed body
|
|
165
|
+
# references its real sibling skills (e.g. ``claude-execute-phase``), not the
|
|
166
|
+
# literal ``<harness>-execute-phase``. The package-data bundle build
|
|
167
|
+
# (``sync_skills_bundle``) passes ``expand_body=False`` so the shipped bundle
|
|
168
|
+
# stays harness-neutral (and the #12 drift guard stays byte-identical).
|
|
169
|
+
if expand_body:
|
|
170
|
+
text = text.replace("<harness>-", f"{harness}-")
|
|
171
|
+
lines = text.splitlines()
|
|
172
|
+
for index, line in enumerate(lines[:8]):
|
|
173
|
+
if line.startswith("name: "):
|
|
174
|
+
lines[index] = f"name: {installed_name}"
|
|
175
|
+
break
|
|
176
|
+
path.write_text("\n".join(lines) + ("\n" if text.endswith("\n") else ""), encoding="utf-8")
|