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,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fixture_id": "borderline-threshold-edge",
|
|
3
|
+
"category": "borderline",
|
|
4
|
+
"expected_verdict_class": "uncertain",
|
|
5
|
+
"expected_confidence": 0.84,
|
|
6
|
+
"expected_artifact_characteristics": "Ambiguous evidence near the default confidence threshold.",
|
|
7
|
+
"sample_artifact_paths": ["edge.txt"],
|
|
8
|
+
"rationale": "Confidence just below 0.85 should not become a hard real or fake assertion.",
|
|
9
|
+
"tier2_signal_summary": {
|
|
10
|
+
"kind": "calibration_borderline",
|
|
11
|
+
"signals": ["near threshold", "plausible evidence", "insufficient corroboration"]
|
|
12
|
+
},
|
|
13
|
+
"estimated_input_tokens": 660,
|
|
14
|
+
"estimated_output_tokens": 205,
|
|
15
|
+
"estimated_cost_usd": 0.0069
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fixture_id": "fake-duplicate-png",
|
|
3
|
+
"category": "known-fake",
|
|
4
|
+
"expected_verdict_class": "fake",
|
|
5
|
+
"expected_confidence": 0.96,
|
|
6
|
+
"expected_artifact_characteristics": "Suspicious evidence where multiple claimed screenshots share identical placeholder bytes.",
|
|
7
|
+
"sample_artifact_paths": ["shot-a.txt", "shot-b.txt", "shot-c.txt"],
|
|
8
|
+
"rationale": "Covers the obvious duplicate-artifact fake evidence pattern.",
|
|
9
|
+
"tier2_signal_summary": {
|
|
10
|
+
"kind": "calibration_known_fake",
|
|
11
|
+
"signals": ["duplicate artifact content", "claimed distinct screenshots", "same byte length"]
|
|
12
|
+
},
|
|
13
|
+
"estimated_input_tokens": 680,
|
|
14
|
+
"estimated_output_tokens": 210,
|
|
15
|
+
"estimated_cost_usd": 0.0072
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
placeholder screenshot bytes 8d7f1750 repeated for every viewport
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
placeholder screenshot bytes 8d7f1750 repeated for every viewport
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
placeholder screenshot bytes 8d7f1750 repeated for every viewport
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fixture_id": "fake-missing-references",
|
|
3
|
+
"category": "known-fake",
|
|
4
|
+
"expected_verdict_class": "fake",
|
|
5
|
+
"expected_confidence": 0.93,
|
|
6
|
+
"expected_artifact_characteristics": "Suspicious evidence cites artifacts that are not present in the bundle.",
|
|
7
|
+
"sample_artifact_paths": ["claimed-results.json"],
|
|
8
|
+
"rationale": "Covers fabricated references where the manifest names files that do not exist.",
|
|
9
|
+
"tier2_signal_summary": {
|
|
10
|
+
"kind": "calibration_known_fake",
|
|
11
|
+
"signals": ["missing referenced path", "claim-only evidence", "no supporting artifact"]
|
|
12
|
+
},
|
|
13
|
+
"estimated_input_tokens": 695,
|
|
14
|
+
"estimated_output_tokens": 208,
|
|
15
|
+
"estimated_cost_usd": 0.0071
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fixture_id": "fake-subtle-low-variance",
|
|
3
|
+
"category": "known-fake",
|
|
4
|
+
"expected_verdict_class": "fake",
|
|
5
|
+
"expected_confidence": 0.87,
|
|
6
|
+
"expected_artifact_characteristics": "Suspicious evidence with varied but implausibly low-variance measurements and vague labels.",
|
|
7
|
+
"sample_artifact_paths": ["metrics.json"],
|
|
8
|
+
"rationale": "Covers a subtler fake pattern where values are not identical but remain too uniform.",
|
|
9
|
+
"tier2_signal_summary": {
|
|
10
|
+
"kind": "calibration_known_fake",
|
|
11
|
+
"signals": ["near-uniform numeric values", "low coefficient of variation", "generic labels"]
|
|
12
|
+
},
|
|
13
|
+
"estimated_input_tokens": 700,
|
|
14
|
+
"estimated_output_tokens": 210,
|
|
15
|
+
"estimated_cost_usd": 0.0074
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Findings
|
|
2
|
+
|
|
3
|
+
The checkout route passed because the component rendered correctly with no
|
|
4
|
+
visible issues and all checks were successful.
|
|
5
|
+
|
|
6
|
+
The billing route passed because the component rendered correctly with no
|
|
7
|
+
visible issues and all checks were successful.
|
|
8
|
+
|
|
9
|
+
The reports route passed because the component rendered correctly with no
|
|
10
|
+
visible issues and all checks were successful.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fixture_id": "fake-templated-prose",
|
|
3
|
+
"category": "known-fake",
|
|
4
|
+
"expected_verdict_class": "fake",
|
|
5
|
+
"expected_confidence": 0.91,
|
|
6
|
+
"expected_artifact_characteristics": "Suspicious evidence where distinct findings repeat the same templated sentence with only labels changed.",
|
|
7
|
+
"sample_artifact_paths": ["findings.md"],
|
|
8
|
+
"rationale": "Covers high-overlap boilerplate evidence that claims independent review.",
|
|
9
|
+
"tier2_signal_summary": {
|
|
10
|
+
"kind": "calibration_known_fake",
|
|
11
|
+
"signals": ["boilerplate text", "label-only variation", "missing concrete commands"]
|
|
12
|
+
},
|
|
13
|
+
"estimated_input_tokens": 710,
|
|
14
|
+
"estimated_output_tokens": 220,
|
|
15
|
+
"estimated_cost_usd": 0.0077
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fixture_id": "fake-uniform-scores",
|
|
3
|
+
"category": "known-fake",
|
|
4
|
+
"expected_verdict_class": "fake",
|
|
5
|
+
"expected_confidence": 0.94,
|
|
6
|
+
"expected_artifact_characteristics": "Suspicious evidence with a long uniform numeric series and generic success prose.",
|
|
7
|
+
"sample_artifact_paths": ["scores.json", "summary.txt"],
|
|
8
|
+
"rationale": "Covers the exact-uniform score pattern common in fabricated visual evidence.",
|
|
9
|
+
"tier2_signal_summary": {
|
|
10
|
+
"kind": "calibration_known_fake",
|
|
11
|
+
"signals": ["uniform numeric array", "all values 0.999999", "generic prose"]
|
|
12
|
+
},
|
|
13
|
+
"estimated_input_tokens": 690,
|
|
14
|
+
"estimated_output_tokens": 215,
|
|
15
|
+
"estimated_cost_usd": 0.0073
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
All screens matched perfectly. Everything passed. All screens matched perfectly.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"generated_at": "2026-05-22T00:00:00Z",
|
|
3
|
+
"schema_refs": [
|
|
4
|
+
{"source_path": "vendor/phase-loop-runtime/src/phase_loop_runtime/baml_src/emit_phase_closeout.baml", "digest": "sha256:2e7b4d36d80a4cf3a1b39d6dbe61e42cf4761c2cc4f2e8b4db02f1844f12b64e"},
|
|
5
|
+
{"source_path": "vendor/phase-loop-runtime/src/phase_loop_runtime/baml_src/evaluate_suspected_fake_evidence.baml", "digest": "sha256:6a7a07c2d517fe4c4029436d89e0e4a9c8379d0bb0a15d9f60d648a61d8c5b32"}
|
|
6
|
+
],
|
|
7
|
+
"verification": {"fixture_matches_generator": true, "stable_json_bytes": true}
|
|
8
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fixture_id": "real-adoption-bundle",
|
|
3
|
+
"category": "known-real",
|
|
4
|
+
"expected_verdict_class": "real",
|
|
5
|
+
"expected_confidence": 0.91,
|
|
6
|
+
"expected_artifact_characteristics": "Deterministic adoption bundle evidence with schema references and sha256 digests that vary by source file.",
|
|
7
|
+
"sample_artifact_paths": ["bundle-check.json", "operator-note.txt"],
|
|
8
|
+
"rationale": "A valid adoption-bundle check should contain stable but varied digests and source paths.",
|
|
9
|
+
"tier2_signal_summary": {
|
|
10
|
+
"kind": "calibration_known_real",
|
|
11
|
+
"signals": ["schema refs match current bytes", "non-identical digests", "stable generator timestamp"]
|
|
12
|
+
},
|
|
13
|
+
"estimated_input_tokens": 830,
|
|
14
|
+
"estimated_output_tokens": 230,
|
|
15
|
+
"estimated_cost_usd": 0.0088
|
|
16
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
{"timestamp":"2026-05-22T10:00:01Z","phase":"ALPHA","action":"phase_plan","status":"planned","metadata":{"artifact":"plans/phase-plan-alpha.md"}}
|
|
2
|
+
{"timestamp":"2026-05-22T10:07:42Z","phase":"ALPHA","action":"phase_execute","status":"complete","metadata":{"verification_status":"passed"}}
|
|
3
|
+
{"timestamp":"2026-05-22T10:12:06Z","phase":"BETA","action":"phase_plan","status":"planned","metadata":{"artifact":"plans/phase-plan-beta.md"}}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fixture_id": "real-handoff-ledger",
|
|
3
|
+
"category": "known-real",
|
|
4
|
+
"expected_verdict_class": "real",
|
|
5
|
+
"expected_confidence": 0.88,
|
|
6
|
+
"expected_artifact_characteristics": "Legitimate handoff ledger with ordered events, distinct timestamps, and metadata-only summaries.",
|
|
7
|
+
"sample_artifact_paths": ["events-sample.jsonl", "receipt.txt"],
|
|
8
|
+
"rationale": "Represents real event metadata without private prompt or response payloads.",
|
|
9
|
+
"tier2_signal_summary": {
|
|
10
|
+
"kind": "calibration_known_real",
|
|
11
|
+
"signals": ["monotonic timestamps", "metadata-only records", "different phases"]
|
|
12
|
+
},
|
|
13
|
+
"estimated_input_tokens": 700,
|
|
14
|
+
"estimated_output_tokens": 205,
|
|
15
|
+
"estimated_cost_usd": 0.0074
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Ledger sample contains metadata-only event summaries with no raw model payloads.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"phase": "DOCSYNC",
|
|
3
|
+
"commands": [
|
|
4
|
+
{"name": "python3 -m unittest tests.test_docsync", "exit_code": 0, "duration_ms": 1384},
|
|
5
|
+
{"name": "rg -n \"DOCSYNC\" docs specs", "exit_code": 0, "duration_ms": 91},
|
|
6
|
+
{"name": "git diff --check -- docs/spec.md tests/test_docsync.py", "exit_code": 0, "duration_ms": 43}
|
|
7
|
+
],
|
|
8
|
+
"changed_files": [
|
|
9
|
+
{"path": "docs/spec.md", "bytes": 4281},
|
|
10
|
+
{"path": "tests/test_docsync.py", "bytes": 3197}
|
|
11
|
+
],
|
|
12
|
+
"scores": [0.74, 0.81, 0.93, 0.88, 0.79]
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fixture_id": "real-runner-diff",
|
|
3
|
+
"category": "known-real",
|
|
4
|
+
"expected_verdict_class": "real",
|
|
5
|
+
"expected_confidence": 0.92,
|
|
6
|
+
"expected_artifact_characteristics": "Legitimate closeout evidence with varied file sizes, specific command output, and non-uniform timing and count values.",
|
|
7
|
+
"sample_artifact_paths": ["evidence.json", "summary.txt"],
|
|
8
|
+
"rationale": "Represents a normal runner closeout with distinct artifacts and concrete verification details.",
|
|
9
|
+
"tier2_signal_summary": {
|
|
10
|
+
"kind": "calibration_known_real",
|
|
11
|
+
"signals": ["varied command durations", "specific filenames", "non-uniform counts"]
|
|
12
|
+
},
|
|
13
|
+
"estimated_input_tokens": 780,
|
|
14
|
+
"estimated_output_tokens": 220,
|
|
15
|
+
"estimated_cost_usd": 0.0081
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fixture_id": "real-test-matrix",
|
|
3
|
+
"category": "known-real",
|
|
4
|
+
"expected_verdict_class": "real",
|
|
5
|
+
"expected_confidence": 0.89,
|
|
6
|
+
"expected_artifact_characteristics": "Legitimate test matrix with varied runtimes, failure-free statuses, and different scenario labels.",
|
|
7
|
+
"sample_artifact_paths": ["matrix.json", "notes.md"],
|
|
8
|
+
"rationale": "Normal regression evidence has stable structure but varied measurements and scenario names.",
|
|
9
|
+
"tier2_signal_summary": {
|
|
10
|
+
"kind": "calibration_known_real",
|
|
11
|
+
"signals": ["distinct scenario names", "varied runtimes", "no duplicated artifact hashes"]
|
|
12
|
+
},
|
|
13
|
+
"estimated_input_tokens": 760,
|
|
14
|
+
"estimated_output_tokens": 210,
|
|
15
|
+
"estimated_cost_usd": 0.0079
|
|
16
|
+
}
|
phase_loop_runtime/_test_fixtures/evidence-audit-calibration/known-real/real-test-matrix/matrix.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"scenarios": [
|
|
3
|
+
{"name": "empty-history", "status": "passed", "duration_ms": 38},
|
|
4
|
+
{"name": "single-tier3-event", "status": "passed", "duration_ms": 72},
|
|
5
|
+
{"name": "json-history", "status": "passed", "duration_ms": 65},
|
|
6
|
+
{"name": "redaction-check", "status": "passed", "duration_ms": 84}
|
|
7
|
+
],
|
|
8
|
+
"coverage": [0.61, 0.77, 0.83, 0.92]
|
|
9
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fixture_id": "real-ui-screenshot-standin",
|
|
3
|
+
"category": "known-real",
|
|
4
|
+
"expected_verdict_class": "real",
|
|
5
|
+
"expected_confidence": 0.9,
|
|
6
|
+
"expected_artifact_characteristics": "Legitimate UI verification with a unique screenshot standin and paired console summary.",
|
|
7
|
+
"sample_artifact_paths": ["screenshot-standin.ppm", "console-summary.txt"],
|
|
8
|
+
"rationale": "Uses a unique binary-safe PPM placeholder instead of duplicated PNG bytes.",
|
|
9
|
+
"tier2_signal_summary": {
|
|
10
|
+
"kind": "calibration_known_real",
|
|
11
|
+
"signals": ["unique visual placeholder", "distinct console findings", "manual viewport dimensions"]
|
|
12
|
+
},
|
|
13
|
+
"estimated_input_tokens": 720,
|
|
14
|
+
"estimated_output_tokens": 210,
|
|
15
|
+
"estimated_cost_usd": 0.0076
|
|
16
|
+
}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import hashlib
|
|
4
|
+
import json
|
|
5
|
+
import re
|
|
6
|
+
import subprocess
|
|
7
|
+
from pathlib import Path, PurePath
|
|
8
|
+
from typing import Any
|
|
9
|
+
|
|
10
|
+
from .baml_modular import parse_baml_response
|
|
11
|
+
from .plan_manifest import read_manifest
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
SOURCE_AUTHORITY_CONTRACT = Path("docs/dotfiles-source-authority-contract.md")
|
|
15
|
+
VISIBILITY_CONTRACT = Path("docs/dotfiles-visibility-contract.md")
|
|
16
|
+
C4_DOCUMENT = Path("docs/c4/phase-loop-runtime-c4-document.md")
|
|
17
|
+
TASK_CATALOG = Path("docs/tasks/dotfiles-task-catalog.md")
|
|
18
|
+
RUNTIME_PROJECTION_SURFACE = "phase-loop status --runtime-projection --json"
|
|
19
|
+
BAML_SCHEMA_ROOT = Path("vendor/phase-loop-runtime/src/phase_loop_runtime/baml_src")
|
|
20
|
+
ADOPTION_BUNDLE_PATH = Path("docs/adoption/dotfiles-adoption-bundle.json")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def generate_adoption_bundle(
|
|
24
|
+
repo: Path,
|
|
25
|
+
generated_at: str | None = None,
|
|
26
|
+
operating_mode: str = "standalone",
|
|
27
|
+
) -> dict[str, object]:
|
|
28
|
+
root = repo.resolve()
|
|
29
|
+
payload: dict[str, object] = {
|
|
30
|
+
"source_roots": _source_roots(root),
|
|
31
|
+
"schema_refs": _schema_refs(root),
|
|
32
|
+
"plan_refs": _plan_refs(root),
|
|
33
|
+
"c4_document_refs": _c4_document_refs(root),
|
|
34
|
+
"task_catalog_refs": _task_catalog_refs(root),
|
|
35
|
+
"operating_mode": operating_mode,
|
|
36
|
+
"redacted_metadata_ref": RUNTIME_PROJECTION_SURFACE,
|
|
37
|
+
"visibility_contract_ref": str(VISIBILITY_CONTRACT),
|
|
38
|
+
"version": "v1",
|
|
39
|
+
"generated_at": generated_at or _stable_generated_at(root),
|
|
40
|
+
}
|
|
41
|
+
parse_baml_response("DotfilesAdoptionManifest", json.dumps(payload, sort_keys=True))
|
|
42
|
+
return payload
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def stable_json_bytes(payload: dict[str, object]) -> bytes:
|
|
46
|
+
return (json.dumps(payload, indent=2, sort_keys=True) + "\n").encode("utf-8")
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def adoption_bundle_status(repo: Path) -> dict[str, object]:
|
|
50
|
+
root = repo.resolve()
|
|
51
|
+
bundle_path = root / ADOPTION_BUNDLE_PATH
|
|
52
|
+
bundle = _load_committed_bundle(bundle_path)
|
|
53
|
+
current_refs = _schema_refs(root)
|
|
54
|
+
bundled_refs = bundle.get("schema_refs")
|
|
55
|
+
if not isinstance(bundled_refs, list):
|
|
56
|
+
raise ValueError("adoption bundle schema_refs must be a list")
|
|
57
|
+
stale_refs = _stale_schema_refs(bundled_refs, current_refs)
|
|
58
|
+
return {
|
|
59
|
+
"status": "stale" if stale_refs else "fresh",
|
|
60
|
+
"bundle": str(ADOPTION_BUNDLE_PATH),
|
|
61
|
+
"stale_refs": stale_refs,
|
|
62
|
+
"schema_refs": current_refs,
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def refresh_adoption_bundle(repo: Path) -> dict[str, object]:
|
|
67
|
+
root = repo.resolve()
|
|
68
|
+
bundle_path = root / ADOPTION_BUNDLE_PATH
|
|
69
|
+
bundle = _load_committed_bundle(bundle_path)
|
|
70
|
+
generated = generate_adoption_bundle(
|
|
71
|
+
root,
|
|
72
|
+
generated_at=str(bundle.get("generated_at") or ""),
|
|
73
|
+
operating_mode=str(bundle.get("operating_mode") or "standalone"),
|
|
74
|
+
)
|
|
75
|
+
refreshed = stable_json_bytes(generated) != bundle_path.read_bytes()
|
|
76
|
+
if refreshed:
|
|
77
|
+
bundle_path.write_bytes(stable_json_bytes(generated))
|
|
78
|
+
return {
|
|
79
|
+
"status": "fresh",
|
|
80
|
+
"bundle": str(ADOPTION_BUNDLE_PATH),
|
|
81
|
+
"refreshed": refreshed,
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def _load_committed_bundle(path: Path) -> dict[str, object]:
|
|
86
|
+
if not path.exists():
|
|
87
|
+
raise FileNotFoundError(f"adoption bundle not found: {path}")
|
|
88
|
+
payload = json.loads(path.read_text(encoding="utf-8"))
|
|
89
|
+
if not isinstance(payload, dict):
|
|
90
|
+
raise ValueError("adoption bundle must be a JSON object")
|
|
91
|
+
parse_baml_response("DotfilesAdoptionManifest", json.dumps(payload, sort_keys=True))
|
|
92
|
+
return payload
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def _stale_schema_refs(bundled_refs: list[object], current_refs: list[dict[str, str]]) -> list[dict[str, str]]:
|
|
96
|
+
current_by_path = {ref["source_path"]: ref["digest"] for ref in current_refs}
|
|
97
|
+
bundled_by_path: dict[str, str] = {}
|
|
98
|
+
for ref in bundled_refs:
|
|
99
|
+
if not isinstance(ref, dict):
|
|
100
|
+
raise ValueError("adoption bundle schema_refs entries must be objects")
|
|
101
|
+
source_path = ref.get("source_path")
|
|
102
|
+
digest = ref.get("digest")
|
|
103
|
+
if not isinstance(source_path, str) or not isinstance(digest, str):
|
|
104
|
+
raise ValueError("adoption bundle schema_refs entries require source_path and digest")
|
|
105
|
+
bundled_by_path[source_path] = digest
|
|
106
|
+
stale: list[dict[str, str]] = []
|
|
107
|
+
for source_path, current_digest in current_by_path.items():
|
|
108
|
+
bundled_digest = bundled_by_path.get(source_path)
|
|
109
|
+
if bundled_digest != current_digest:
|
|
110
|
+
stale.append(
|
|
111
|
+
{
|
|
112
|
+
"source_path": source_path,
|
|
113
|
+
"bundle_digest": bundled_digest or "missing",
|
|
114
|
+
"current_digest": current_digest,
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
for source_path, bundled_digest in bundled_by_path.items():
|
|
118
|
+
if source_path not in current_by_path:
|
|
119
|
+
stale.append(
|
|
120
|
+
{
|
|
121
|
+
"source_path": source_path,
|
|
122
|
+
"bundle_digest": bundled_digest,
|
|
123
|
+
"current_digest": "missing",
|
|
124
|
+
}
|
|
125
|
+
)
|
|
126
|
+
return sorted(stale, key=lambda item: item["source_path"])
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def _source_roots(repo: Path) -> list[dict[str, str]]:
|
|
130
|
+
rows = _contract_rows(repo / SOURCE_AUTHORITY_CONTRACT)
|
|
131
|
+
roots = [
|
|
132
|
+
{
|
|
133
|
+
"path_glob": row["path_glob"],
|
|
134
|
+
"classification": row["classification"],
|
|
135
|
+
"owner": row["owner"],
|
|
136
|
+
"ingestion_policy": row["ingestion_policy"],
|
|
137
|
+
}
|
|
138
|
+
for row in rows
|
|
139
|
+
if row.get("classification") == "authority"
|
|
140
|
+
]
|
|
141
|
+
return sorted(roots, key=lambda item: item["path_glob"])
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def _schema_refs(repo: Path) -> list[dict[str, str]]:
|
|
145
|
+
refs: list[dict[str, str]] = []
|
|
146
|
+
for path in sorted((repo / BAML_SCHEMA_ROOT).glob("*.baml")):
|
|
147
|
+
source_path = _repo_relative(repo, path)
|
|
148
|
+
refs.append(
|
|
149
|
+
{
|
|
150
|
+
"class_name": _schema_ref_name(path),
|
|
151
|
+
"source_path": source_path,
|
|
152
|
+
"digest": f"sha256:{hashlib.sha256(path.read_bytes()).hexdigest()}",
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
return refs
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def _plan_refs(repo: Path) -> list[dict[str, str]]:
|
|
159
|
+
try:
|
|
160
|
+
manifest = read_manifest(repo)
|
|
161
|
+
except (OSError, ValueError):
|
|
162
|
+
return []
|
|
163
|
+
refs: list[dict[str, str]] = []
|
|
164
|
+
for entry in manifest.plans:
|
|
165
|
+
path = PurePath(entry.file)
|
|
166
|
+
if path.is_absolute() or ".." in path.parts:
|
|
167
|
+
continue
|
|
168
|
+
plan_path = repo / Path(entry.file)
|
|
169
|
+
if not plan_path.is_file():
|
|
170
|
+
continue
|
|
171
|
+
refs.append(
|
|
172
|
+
{
|
|
173
|
+
"slug": entry.slug,
|
|
174
|
+
"type": entry.type,
|
|
175
|
+
"file": entry.file,
|
|
176
|
+
"digest": f"sha256:{hashlib.sha256(plan_path.read_bytes()).hexdigest()}",
|
|
177
|
+
"status": entry.status,
|
|
178
|
+
}
|
|
179
|
+
)
|
|
180
|
+
return sorted(refs, key=lambda item: (item["type"], item["slug"], item["file"]))
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
def _c4_document_refs(repo: Path) -> list[dict[str, str]]:
|
|
184
|
+
document = (repo / C4_DOCUMENT).read_text(encoding="utf-8")
|
|
185
|
+
anchors: list[dict[str, str]] = []
|
|
186
|
+
for block in _section_after(document, "Anchors").strip().split("\n- "):
|
|
187
|
+
fields = _bulleted_mapping(block.removeprefix("- ").strip())
|
|
188
|
+
if not fields:
|
|
189
|
+
continue
|
|
190
|
+
anchors.append(
|
|
191
|
+
{
|
|
192
|
+
"title": fields["title"],
|
|
193
|
+
"source_path": fields["source_path"],
|
|
194
|
+
"anchor": fields["id"],
|
|
195
|
+
}
|
|
196
|
+
)
|
|
197
|
+
return sorted(anchors, key=lambda item: (item["source_path"], item["anchor"]))
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
def _task_catalog_refs(repo: Path) -> list[dict[str, str]]:
|
|
201
|
+
catalog = (repo / TASK_CATALOG).read_text(encoding="utf-8")
|
|
202
|
+
audiences = re.findall(r"^- ([a-z_]+)$", _section_after(catalog, "Audiences"), re.MULTILINE)
|
|
203
|
+
return [
|
|
204
|
+
{
|
|
205
|
+
"catalog_id": f"dotfiles-task-catalog-{audience}",
|
|
206
|
+
"source_path": str(TASK_CATALOG),
|
|
207
|
+
"audience": audience,
|
|
208
|
+
}
|
|
209
|
+
for audience in sorted(audiences)
|
|
210
|
+
]
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
def _contract_rows(path: Path) -> list[dict[str, str]]:
|
|
214
|
+
rows: list[dict[str, str]] = []
|
|
215
|
+
for line in path.read_text(encoding="utf-8").splitlines():
|
|
216
|
+
if not line.startswith("| `"):
|
|
217
|
+
continue
|
|
218
|
+
cells = [cell.strip() for cell in line.strip().strip("|").split("|")]
|
|
219
|
+
if len(cells) < 5:
|
|
220
|
+
continue
|
|
221
|
+
rows.append(
|
|
222
|
+
{
|
|
223
|
+
"path_glob": cells[0].strip("`"),
|
|
224
|
+
"classification": cells[1],
|
|
225
|
+
"owner": cells[2],
|
|
226
|
+
"ingestion_policy": cells[3],
|
|
227
|
+
}
|
|
228
|
+
)
|
|
229
|
+
return rows
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
def _schema_ref_name(path: Path) -> str:
|
|
233
|
+
text = path.read_text(encoding="utf-8")
|
|
234
|
+
classes = re.findall(r"^class\s+([A-Za-z_][A-Za-z0-9_]*)\s*\{", text, re.MULTILINE)
|
|
235
|
+
exported = [name for name in classes if name.startswith("Dotfiles") or name == "PhaseLoopCloseoutV1"]
|
|
236
|
+
return exported[-1] if exported else path.stem
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
def _section_after(text: str, heading: str) -> str:
|
|
240
|
+
marker = f"## {heading}"
|
|
241
|
+
start = text.index(marker) + len(marker)
|
|
242
|
+
next_heading = text.find("\n## ", start)
|
|
243
|
+
if next_heading == -1:
|
|
244
|
+
return text[start:]
|
|
245
|
+
return text[start:next_heading]
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
def _bulleted_mapping(section: str) -> dict[str, str]:
|
|
249
|
+
values: dict[str, str] = {}
|
|
250
|
+
for line in section.splitlines():
|
|
251
|
+
match = re.match(r"\s*(?:- )?([^:]+):\s*(.*)", line)
|
|
252
|
+
if match:
|
|
253
|
+
values[match.group(1)] = match.group(2)
|
|
254
|
+
return values
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
def _stable_generated_at(repo: Path) -> str:
|
|
258
|
+
try:
|
|
259
|
+
result = subprocess.run(
|
|
260
|
+
["git", "-C", str(repo), "log", "-1", "--format=%cI", "--"],
|
|
261
|
+
check=True,
|
|
262
|
+
stdout=subprocess.PIPE,
|
|
263
|
+
stderr=subprocess.DEVNULL,
|
|
264
|
+
text=True,
|
|
265
|
+
)
|
|
266
|
+
except (OSError, subprocess.CalledProcessError):
|
|
267
|
+
return "1970-01-01T00:00:00Z"
|
|
268
|
+
value = result.stdout.strip()
|
|
269
|
+
return value.replace("+00:00", "Z") if value else "1970-01-01T00:00:00Z"
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
def _repo_relative(repo: Path, path: Path) -> str:
|
|
273
|
+
return path.resolve().relative_to(repo).as_posix()
|