feat(planner): require trycycle-ready bead contracts before trycycle worker runs - #722
Open
shaug wants to merge 16 commits into
Open
feat(planner): require trycycle-ready bead contracts before trycycle worker runs#722shaug wants to merge 16 commits into
shaug wants to merge 16 commits into
Conversation
- add a complete trycycle-planning execution plan for GitHub issue #719\n- define behavior contracts, invariants, architecture decisions, and cutover risks\n- break implementation into TDD task slices with exact files, tests, commands, and commit checkpoints
- close startup bypass gaps by requiring trycycle gating across explicit, review-feedback, and merge-conflict claim paths - add missing test-surface updates for next-changeset protocol consumers and focused regression commands - capture epic-as-single-unit approval metadata expectations to avoid promotion-time audit gaps
- add a prioritized, source-of-truth-mapped test plan for issue #719\n- define harness prerequisites for planner scripts, startup gating, and projected runtime\n- enumerate coverage and explicit exclusions for trycycle contract gating
- add shared trycycle readiness schema and parser - add deterministic readiness validation and diagnostics
- wire guardrail script to shared trycycle readiness validator - add deterministic contract violation coverage
- block promotion when trycycle contract validation fails - persist approval metadata and planning evidence audit trail
- add startup claim gate for trycycle contract readiness across all claim paths - preserve existing non-trycycle claim behavior
- align planner template and skill docs with trycycle gating contract - update bootstrap and docs coverage for new shared contract usage
- close verification gaps across planner validation and worker gating - ensure format/lint/test gates pass with fail-closed invariants
- hydrate startup claim candidates before trycycle eligibility checks across review-feedback and merge-conflict paths - hydrate sparse startup-runtime payloads before delegating to shared trycycle validator - persist trycycle approval evidence before lifecycle transitions so failed metadata writes do not partially promote work - extend worker and promotion tests for shared-validator parity and fail-closed transition sequencing
- fail closed when startup claim candidates cannot load metadata before trycycle eligibility checks - require explicit ATELIER_AGENT_ID for targeted approval recording in promotion flow - validate malformed trycycle approval message identifiers in shared contract checks - add differential parity and regression tests across evaluator, guardrails, promotion preflight, and worker adapters
- require to be a timezone-aware datetime with a time component - add red/green readiness tests for date-only and naive approval timestamps - add projected runtime execution coverage proving prefers repo imports for Fixes #719
- rename the shared planner/worker contract module and APIs to refined terminology\n- switch metadata defaults to execution.strategy/planning.* while preserving legacy trycycle key compatibility reads\n- update planner skills, template guidance, and worker startup claim eligibility wiring\n- add the plan-refined-deliberation skill and refresh coverage/docs for refined planning semantics
- drop all trycycle.* metadata fallback reads in refined planning readiness checks\n- require execution.strategy=refined and planning.* fields exclusively\n- add regression coverage proving legacy trycycle fields are ignored
- expand plan-refined-deliberation with strategy challenge, assumption handling, and plan quality rubric\n- add planner template instructions for low-bar replan and high-bar user escalation\n- add test coverage that locks in strategy-challenge language for planner template and skill docs
- thread strategy-challenge and boundary-first drafting guidance through planner template and core planning skills\n- keep refined planning focused on iterative evaluation/sign-off while reusing the same drafting strategy\n- extend planner template and packaged-skill tests to lock in the cross-skill planning discipline wording
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
trycycle.approved_atvalidation insrc/atelier/trycycle_contract.pyto require an auditable timestamp format: must include a time component and timezone offset (date-only and naive datetime values are now rejected fail-closed).tests/atelier/test_trycycle_contract.pyfor the new failing cases:approved_atapproved_attests/atelier/skills/test_projected_skill_runtime_bootstrap.pyforplan-promote-epic, proving projected reposrc/is preferred fortrycycle_contractimport resolution.Test Plan
uv run pytest tests/atelier/test_trycycle_contract.py -k "date_only_approved_timestamp or naive_approved_timestamp" -vuv run pytest tests/atelier/test_trycycle_contract.py -v11 passed).uv run pytest tests/atelier/skills/test_projected_skill_runtime_bootstrap.py -k "projected_promote_epic_reorders_repo_src_ahead_of_installed_package or check_guardrails" -v4 passed).just formatjust lintjust test1699 passedpytest + shell suites passed).Residual Issues
_parse_boolintrycycle_contract.pycurrently treats1,yes,onas targeted in addition totrue; behavior docs describe targeting astrycycle.targeted: true.main()path coverage remains incomplete (_evaluate_guardrailsis covered;main()path not yet explicitly covered).--yescurrently covers non---yespath only.