Skip to content

Support local Context Tree writes - #10

Merged
ggordonhall merged 6 commits into
mainfrom
local-mode
Sep 1, 2026
Merged

Support local Context Tree writes#10
ggordonhall merged 6 commits into
mainfrom
local-mode

Conversation

@ggordonhall

@ggordonhall ggordonhall commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add first-class local Context Tree setup and connections while preserving explicit GitHub-backed connections
  • introduce lifecycle operations for resolving, syncing, preparing isolated writes, finishing writes, and publishing a local tree to a new private GitHub repository
  • replace the previous init/link/write skill model with setup, connect, read, remember, and publish skills, and align the CLI, hook, policy, documentation, and plugin manifests
  • add shared Git, project-root, tree-state, naming, and lifecycle schema foundations with fail-closed validation and atomic local connection updates
  • expand core, CLI, schema, hook, skill, plugin, and packaged-artifact coverage for local and GitHub workflows

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

  • CI test job passes

…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
ggordonhall merged commit 62206aa into main Sep 1, 2026
3 checks passed
@ggordonhall
ggordonhall deleted the local-mode branch September 1, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant