Repository navigation
Conversation
Define validated plan artifacts and the intrinsic submit_plan tool so every runtime uses one normalized, bounded representation for planning output.
Persist collaboration mode, submitted plans, resolutions, and accepted continuations through validated append-only session history and branch replay.
- The plan persistence work called normalizeSessionHeader, which is defined only on the task profile stack, so the entry parser did not compile against main - Returning the parsed entry directly keeps plan artifact parsing intact and leaves relatedSessions normalization to the stack that owns it
Issacboy123
requested changes
Aug 17, 2026
Issacboy123
left a comment
Contributor
There was a problem hiding this comment.
The explicit PlanArtifact lifecycle and one-shot continuation model looks good. The continuation still treats raw Markdown as approved even though a host can render only part of it, such as omitting a link title. I think you should one canonical approved representation for both the UI and implementation. This issue remains in the rest of the stack.
|
|
||
| # ${plan.title} | ||
|
|
||
| ${plan.markdown} |
Contributor
There was a problem hiding this comment.
This raw Markdown is placed under an assertion that the user approved it, but a rendered approval view may omit source metadata such as link titles. Use a canonical representation identical to the approved view, or reject/display every non-visible Markdown field before acceptance.
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
Introduces the persistent foundation for native plan mode.
A plan is now a first-class session artifact with a stable shape, a
submit_plantool that produces it, and session entries that record collaboration-mode changes, submitted plans, and their resolutions.Replaces #63, which could not build against
main.Reasoning
Plan mode is only useful if an accepted plan survives resume and tree navigation, so persistence has to come before any runtime or UI behaviour.
Modelling the plan as a session entry rather than transient state means the active branch determines the pending plan, which keeps resume and fork correct without a separate store.
The entry parser deliberately does not normalize session headers here.
That helper belongs to the task profile stack, and plan mode must build on
mainwithout it.Changes
core/plan-mode.tswithPlanArtifact,PlanResolution,CollaborationMode, and thesubmit_plantool definitionplan,plan_resolution, andcollaboration_mode_changesession entries with strict parsing that rejects malformed artifactsTesting
npx vitest --run test/plan-mode-tools.test.ts test/session-manager/file-operations.test.tstsgo --noEmitreports zero errorsbiome check .clean