Support local Context Tree writes - #10
Merged
Merged
Conversation
…cle schemas
Phase 1-2 of the local-first lifecycle simplification:
- One injectable Git/gh command runner (src/core/internal/git.ts) replaces
the duplicated spawnSync helpers.
- canonicalProjectRoot identifies projects solely by their canonical local
root; Git worktrees and separate clones are independent checkouts.
- One tree-state resolver returns the discriminated {kind: local, path} /
{kind: github, path, repository} state shared by upcoming setup, connect,
sync, publish, and write operations, with no origin backfilling.
- Redefined schema version 1 contracts (added before release, no migration):
tree state plus initializeProject, connectProject, sync, prepare-write,
finish-write, and publish results, and GITHUB_AUTH / REPOSITORY_EXISTS /
PUBLISH_INCOMPLETE error codes.
- Existing push/refresh/stage contracts remain temporarily and are removed
when the core modules flip over in the next phase.
ggordonhall
force-pushed
the
local-mode
branch
from
September 1, 2026 02:44
8d603d7 to
39ca668
Compare
ggordonhall
force-pushed
the
local-mode
branch
from
September 1, 2026 03:53
a7b5f40 to
5ab1dac
Compare
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
Behavior
Local trees remain fully offline for setup, connection, sync, reads, and writes. Writes happen in isolated worktrees and finish with a fast-forward merge into the linked local checkout. A local tree can later be published to a newly created private GitHub repository, after which the stored connection is updated to GitHub-backed state.
Testing
testjob passes