fix(atlas): tighten plan contract and preserve start-work handoff#2602
Draft
Jrakru wants to merge 3 commits intocode-yeongyu:devfrom
Draft
fix(atlas): tighten plan contract and preserve start-work handoff#2602Jrakru wants to merge 3 commits intocode-yeongyu:devfrom
Jrakru wants to merge 3 commits intocode-yeongyu:devfrom
Conversation
Contributor
|
All contributors have signed the CLA. Thank you! ✅ |
This was referenced Mar 16, 2026
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
Contributor
Author
|
I have signed the CLA and rechecked the branch on top of current A few framing notes for reviewers:
Focused local verification for this branch was: bun test src/agents/atlas/atlas-prompt.test.ts src/hooks/atlas/verification-reminders.test.ts src/hooks/atlas/index.test.ts src/hooks/start-work/index.test.tsIf maintainers want the fully structured parser version for #2600, I am treating that as a follow-up rather than expanding this PR further. |
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
This PR tightens Atlas's execution contract around plan mutation and
/start-workhandoff, while also making Atlas treat Prometheus task metadata as the default execution contract instead of pure ad hoc reclassification.It fixes the concrete contract inconsistencies described in:
What changed
1. Tighten Atlas plan-mutation rules
Atlas prompts and reminders now say explicitly:
Files:
src/agents/atlas/default.tssrc/agents/atlas/gpt.tssrc/agents/atlas/gemini.tssrc/hooks/atlas/system-reminder-templates.tssrc/hooks/atlas/verification-reminders.ts2. Remove commit instructions from the Atlas reminder flow
The Atlas reminder flow no longer tells Atlas to
COMMIT ATOMIC UNITdirectly.This keeps the execution contract coherent with Atlas's orchestrator role and avoids mixing plan-state tracking with direct git instructions in the same reminder path.
Files:
src/hooks/atlas/verification-reminders.tssrc/hooks/atlas/index.test.ts3. Prefer planner metadata over Atlas re-planning
Atlas prompts now explicitly treat existing plan metadata as the default execution contract when the current task block already includes fields such as:
Parallel Execution GraphDelegation RecommendationRecommended Agent ProfileParallelizationDepends OnBlocked ByThe dynamic decision matrix is now framed as fallback guidance rather than the primary execution authority.
Files:
src/agents/atlas/default.tssrc/agents/atlas/gpt.tssrc/agents/atlas/gemini.tssrc/agents/atlas/prompt-section-builder.ts4. Preserve Atlas handoff in
/start-work/start-workalready updates the session agent to Atlas, but follow-up events can still lose that handoff if the outgoing message is not stamped consistently.This PR stamps the outgoing message with the Atlas display name so downstream orchestration logic sees the same handoff.
Files:
src/hooks/start-work/start-work-hook.tssrc/hooks/start-work/index.test.ts5. Remove dead Atlas auto-commit reminder plumbing
This branch also removes the Atlas-hook plumbing that only existed to thread
start_work.auto_commitinto the old reminder text.That parameter no longer changed runtime behavior once the direct commit instructions were removed, so keeping it in the Atlas reminder path would just leave dead wiring in the PR.
For config compatibility, the existing
start_work.auto_commitschema field is left in place but treated as legacy compatibility rather than active Atlas reminder behavior.Files:
src/hooks/atlas/atlas-hook.tssrc/hooks/atlas/tool-execute-after.tssrc/hooks/atlas/types.tssrc/plugin/hooks/create-continuation-hooks.tssrc/config/schema/start-work.ts6. Add regression coverage
This adds focused tests to lock in:
/start-workhandoff message stampingFiles:
src/agents/atlas/atlas-prompt.test.tssrc/hooks/atlas/index.test.tssrc/hooks/atlas/verification-reminders.test.tssrc/hooks/start-work/index.test.tsWhy this matters
Before this change, Atlas behavior was internally inconsistent in a few important ways:
/start-worksession handoff was updated in state but not reflected on the outgoing messageThe result was a fuzzier planner / executor boundary than the architecture implies.
This PR makes the runtime contract more coherent without introducing a new parser or changing the plan file format.
Scope / non-goals
This PR does not implement a fully structured runtime parser for Prometheus execution metadata.
Issue #2600 is addressed here at the contract layer:
But a future, stronger implementation could still parse task metadata into typed execution state rather than relying on prompt / reminder compliance alone.
Verification
Focused tests run locally:
bun test src/agents/atlas/atlas-prompt.test.ts src/hooks/atlas/verification-reminders.test.ts src/hooks/atlas/index.test.ts src/hooks/start-work/index.test.tsThese passed on the dev-based replay branch.