Thesis
Commits and branches are bad native primitives for agent-era source control. Glyph should track work continuously as it happens, then let humans and agents shape, explain, review, and publish that work later. The native primitive is not a commit or a branch. It is a work graph: a structured record of edits, snapshots, intentions, dependencies, reviews, and publication events.Problem
Git makes developers think about history while they are still thinking about code. The result:- Work is lost unless explicitly committed.
- People manufacture commits for the machine instead of for understanding.
- Branches become overloaded as isolation, naming, review, deployment, and collaboration units.
- Agents inherit human Git rituals that do not match how they work.
- Parallel work requires worktrees, stashes, rebases, and other accidental complexity.
Goals
- Capture source changes continuously without requiring explicit commits.
- Replace branches with named work contexts and graph relationships.
- Represent human and agent work uniformly.
- Allow multiple simultaneous work contexts over the same source graph.
- Preserve intent, provenance, review, and publication metadata.
- Support later export to Git commits without making Git commits canonical.
Non-Goals
- Defining the full storage engine.
- Designing every CLI command.
- Eliminating meaningful history. Glyph should improve history, not erase it.
- Making every keystroke a permanent public event.
- Perfectly reproducing Git branch semantics.
Core Concepts
Work Graph
The work graph records active and historical work over the source graph. It contains:- Work contexts
- Snapshots
- Edits
- Intent records
- Dependencies
- Review events
- Publication events
- Provenance links
Work Context
A work context is a scoped unit of active work. Examples:auth-fixsecurity/openssl-advisoryagent/refactor-routerdocs/bootstrap
- Identity or owner
- Visible realms
- Base projection
- Current working state
- Captured snapshots
- Intent and task metadata
- Review and publication state
Workspace Integration
Workspace integration is the act of folding a completed work context into another realm or context. Integration supports two history modes:preserve: publish the workspace’s internal checkpoints and relevant snapshots as reviewable history.squash: publish the final source state as one coherent publication event while retaining detailed workspace history privately according to policy.
Snapshot
A snapshot is a captured state of a work context. Glyph may create snapshots:- On file write
- Before and after commands
- Before tool or agent actions
- Before publication
- At user request
- On idle or checkpoint intervals
- Before an agent write
- After an agent write
- Before command execution
- After command execution if files changed
- Before publication requests
- At explicit human or agent snapshot requests
glyph checkpoint. A checkpoint creates a user-facing named snapshot for history shaping, review, or recovery, but it is not required for safety because automatic capture still happens at mediated boundaries.
Edit
An edit is a source-level change observed by Glyph. Edits can be produced by:- Human filesystem writes
- Agent API writes
- Refactoring tools
- Generated code
- Import translators
Intent
Intent is metadata describing why work exists. Examples:- “Fix auth token refresh race”
- “Generate bindings for new API”
- “Patch embargoed vulnerability”
- “Explore replacing parser”
Publication
Publication is the act of moving selected work into another realm, usually from a private or active context intopublic.
Publication may produce:
- Glyph publication event
- Public source graph update
- Review artifact
- Git commit export
- GitHub pull request or push
Pruning
Pruning removes inactive workspace projections and other disposable workspace material after work is finished. Pruning is separate from deleting history. A pruned workspace should no longer occupy active workspace storage, but its source graph objects, snapshots, publication records, and audit events remain governed by retention policy. Pruning may happen after:- Successful publication
- Explicit discard
- Supersession by another work context
- Expiration of an inactive workspace
- Policy-driven cleanup
- Keep published history and audit records.
- Keep discarded work for the configured retention window.
- Remove materialized filesystem projections that can be regenerated.
- Preserve enough metadata to explain what happened and recover when policy allows it.
Required Invariants
- Work is captured by default Glyph should not rely on users remembering to save history manually.
- History shaping is separate from capture Users can organize, squash, explain, or discard work after it has been captured.
- Branches are not required for parallel work Multiple work contexts can exist over the same source graph without Git branches or worktrees.
- Publication is explicit Captured work does not become public merely because it exists.
- Intent is first-class Work records should preserve why work happened, not only what bytes changed.
- Agents are accountable Agent-produced work records include agent identity, allowed context, and tool provenance.
- Git commits are export artifacts Git commits may be generated from publication events but are not Glyph’s native work unit.
Work Context Lifecycle
- Create a work context from a realm projection.
- Edit through filesystem projection, API, or agent tools.
- Glyph captures edits and snapshots automatically.
- User or agent annotates intent where needed.
- Work is reviewed, split, combined, discarded, or published.
- Publication integrates the work into the destination realm using a preserve or squash history mode.
- Publication creates an audit record and updates the destination realm.
- Completed or discarded workspace projections may be pruned according to policy.
- Translators may export the publication to Git or GitHub.
Relationship To Realms
Work contexts exist inside visibility boundaries. A work context may:- Start from one or more realm projections.
- Contain private work not visible to
public. - Depend on another work context without merging into it.
- Request publication into another realm.
- Be visible only to selected users or agents.
Prototype Defaults
- A work context is a named directory-like projection plus metadata.
- Snapshots are captured on explicit Glyph API writes and before publication.
- Agent writes, command execution, and publication requests are automatic snapshot boundaries.
- Filesystem writes can be captured by scanning in the first prototype.
- Work context IDs are stable.
- Git export maps one publication event to one Git commit by default.
- Branch import from Git is represented as provenance, not native Glyph branches.
- Publication defaults to
squashfor noisy agent work unless policy or user flags requestpreserve. - Pruning removes active workspace projections but retains history according to policy.
Success Criteria
This spec is successful if a prototype can:- Create two simultaneous work contexts over the same source graph.
- Capture file changes without explicit commits.
- Record snapshots before publication.
- Attach intent and provenance to work.
- Publish selected work into
public. - Publish work with preserved or squashed history.
- Prune completed workspace projections without losing retained history.
- Export a publication as a Git commit without treating the commit as canonical.