Thesis
Glyph should be agent-native without becoming ecosystem-hostile. Coding agents should interact with Glyph through direct, structured APIs for reading, writing, reviewing, and publishing source graph changes. Humans and existing platforms should still be able to use GitHub, Git, and other version-control systems through translation layers. Glyph is the canonical model. Git compatibility is an adapter, not the foundation.Problem
Git is the common language of today’s developer ecosystem, but it is a poor native interface for coding agents:- Agents do not need full filesystem checkouts for every task.
- Agents need scoped context, not repository-wide access.
- Agents need structured read/write APIs, not shelling out to
git. - Agents need to attach intent, provenance, confidence, and review metadata to work.
- Agents should not have to reason in branches, staging areas, remotes, and rebases.
- GitHub is where open source collaboration happens.
- CI/CD systems expect Git repositories and commits.
- Package registries, deploy systems, and review tools expect Git metadata.
- Developers will need migration paths from Git.
- Public Glyph projects should still be mirrorable to GitHub.
Goals
- Provide first-class APIs for coding agents.
- Make agent permissions, context, and publication boundaries explicit.
- Support Git and GitHub compatibility through projections and translators.
- Allow Glyph projects to publish public views to GitHub.
- Allow a GitHub repository to be configured as a remote origin when teams want to use GitHub infrastructure.
- Allow importing existing Git repositories into Glyph.
- Preserve useful Git metadata without adopting Git’s primitives as Glyph’s primitives.
- Support future translators for other version-control systems.
Non-Goals
- Perfect round-trip fidelity for every Git edge case in the first version.
- Reimplementing Git as Glyph’s storage layer.
- Exposing raw source graph access to agents by default.
- Depending on GitHub as Glyph’s hosted backend.
- Supporting every GitHub feature in the first prototype.
Core Concepts
Agent API
The Agent API is the native interface for coding agents. It should support:- Listing available realms and projections
- Reading files from a projection
- Writing files into an agent-scoped work context
- Searching allowed source
- Requesting relevant context bundles
- Running or requesting tests
- Producing proposed changes
- Attaching intent and provenance metadata
- Asking for publication or review
Work Context
A work context is a scoped area of active change. For agents, a work context replaces the mental model of a branch plus working tree plus staging area. It contains:- Allowed projection
- Files read
- Files written
- Commands or tools invoked
- Intent metadata
- Generated changes
- Review status
- Publication target
VCS Translator
A VCS translator maps between Glyph and an external version-control system. Initial translators:- Git export translator
- Git import translator
- GitHub publication translator
External Source Mount Translator
An external source mount translator maps a subdirectory in a Glyph project to another version-control root. For Git and GitHub, this supports the useful workflows of submodules and subtrees:- Link a GitHub repository at a subdirectory.
- Preserve that repository’s own remote origin.
- Pin the mounted source to a revision.
- Optionally export the mount as a Git submodule, vendored subtree, or generated directory.
- Optionally import upstream changes from the mounted repository.
Projection Export
Projection export materializes a Glyph projection into another system. For GitHub compatibility, the most important export is:- Glyph
publicprojection -> Git repository -> GitHub remote
.gitignore: generated from Glyph exclude rules and hard safety excludes..gitinclude: generated from Glyph include rules for humans or tools that want to inspect the Glyph import allowlist.
.gitignore or .gitinclude unless the user requests overwrite behavior.
Prototype flags:
none: do not generate the file.generated: write a Glyph-generated compatibility file only if the exported projection does not already contain that path.overwrite: write the generated compatibility file even if the exported projection already contains that path.
.glyph/** and .git/**.
Remote Origin
A remote origin is an external system that Glyph can synchronize with through a translator. For GitHub, a remote origin can provide:- Public repository hosting
- Pull request UI
- Issue tracking
- CI/CD triggers
- Release infrastructure
- Package and deployment integrations
- Contributor discovery and social proof
export-only: Glyph publishes an authorized projection to GitHub.import-only: Glyph imports from an existing GitHub repository.bidirectional-public: Glyph syncs public-compatible changes both ways.compatibility-first: GitHub/Git remains operationally canonical while Glyph provides agent APIs, policy overlays, and metadata where possible.
External Source Mount
A GitHub repository can also be configured as a mounted subdirectory rather than as the project origin. Example:pinned: parent project records a specific upstream revision.tracking: parent project can update to the latest allowed upstream state.vendored-export: public Git export includes the mounted files.submodule-export: public Git export emits a Git submodule pointer.
pinned metadata and vendored-export for public Git export. Native submodule export can come later.
Mounted GitHub repositories should export as vendored files by default for compatibility. Git submodule pointer export should be opt-in because submodules impose extra user workflow requirements.
Import
Import converts an external repository into Glyph’s source graph. For Git, import should preserve:- File contents
- Paths
- Commit authorship
- Commit timestamps
- Commit messages
- Tags
- Branch tips
- Basic rename information where available
Agent-Native Requirements
Glyph should be pleasant for agents in ways Git is not:- Scoped source access Agents receive the smallest projection needed for the task.
- API-first file operations Agents can read and update files through API calls without requiring a full OS checkout.
- Intentful changes Agent changes include task intent, touched files, rationale, and confidence metadata.
- Reviewable provenance Humans can see which agent produced work, what context it saw, and what it attempted.
- Policy-aware context Agents cannot accidentally inspect private realms or publish hidden objects through Git export.
- Multiple simultaneous agents Agents can work in separate contexts without branches or worktrees.
- Publication as explicit transition Agent work becomes public only through Glyph publication checks.
Translation-Layer Requirements
Glyph’s compatibility layer should obey these rules:- Glyph is canonical External VCS systems are projections, imports, or mirrors.
- Policy applies before translation Translators operate only on already-authorized projections.
- Translation is auditable Imports and exports produce records describing source, destination, included objects, excluded objects, and warnings.
- Compatibility is practical Glyph should support common GitHub workflows before exotic Git internals.
- No private-object ghosts Exported Git repositories must not contain unreachable private blobs, hidden refs, private paths, or private commit metadata.
- Lossiness is explicit When Glyph cannot preserve semantics across systems, the translator must report what was lost.
GitHub Compatibility
Glyph should support GitHub as a publication and collaboration surface. Minimum useful GitHub compatibility:- Configure a GitHub repository as a Glyph remote origin.
- Configure a GitHub repository as an external source mount at a subdirectory.
- Export
publicrealm to a Git repository. - Push exported repository to GitHub.
- Represent Glyph publication events as Git commits or pull requests.
- Import GitHub repository contents into Glyph.
- Pull public-compatible changes from GitHub into Glyph.
- Preserve links between Glyph work contexts and exported GitHub commits.
- Avoid exporting private realms, hidden metadata, or private agent context.
Remote Origin Modes
Export-Only Origin
Glyph pushes an authorized projection to GitHub. This is the safest default for Glyph-native projects:- Glyph maintains the canonical source graph.
- Publication moves objects into
public. - Git translator creates a clean Git export.
- GitHub origin receives commits, tags, releases, or pull requests.
Import-Only Origin
Glyph imports from GitHub but does not publish back. This is useful for migration, analysis, or agent work over an existing project before maintainers adopt Glyph as canonical.Bidirectional Public Origin
Glyph synchronizes public-compatible changes with GitHub in both directions. This mode is useful when a project wants GitHub’s collaboration UI to remain active:- Glyph exports public publications to GitHub.
- Glyph imports GitHub pull requests, commits, and tags as external proposals or provenance.
- Imported changes pass through Glyph policy before becoming canonical.
- Private Glyph objects are never pushed to GitHub unless explicitly published.
Compatibility-First Mode
Some teams may want Glyph’s agent APIs and projection model while keeping GitHub/Git as the operational source of truth. Glyph may support this mode, but it should be labeled clearly:- GitHub/Git remains canonical for public code.
- Glyph stores additional metadata, agent contexts, and policy overlays.
- Private realms may be limited or require Glyph-native storage.
- Some Glyph features may be unavailable because Git cannot represent them.
Example Workflows
Agent Fix Published To GitHub
- User asks an agent to fix a public bug.
- Glyph creates an agent work context from the
publicprojection plus any allowed maintainer context. - Agent reads and writes through the Agent API.
- Glyph records the proposed work in the source graph.
- Human reviews the work.
- Human publishes selected changes to
public. - Git translator exports the updated
publicprojection. - GitHub translator pushes a commit or opens a pull request.
GitHub Repository As Remote Origin
- User configures a GitHub repository as
origin. - Glyph records the origin URL, sync mode, allowed realms, and credentials policy.
- Glyph imports existing public state from GitHub if requested.
- Glyph publishes future
publicchanges to GitHub through clean Git export. - GitHub CI, releases, issues, and pull requests can continue to operate.
- Any inbound GitHub changes are imported as proposals or provenance and checked by Glyph policy.
GitHub Repository Mounted As Subdirectory
- User configures a GitHub repository as an external source mount at
vendor/parser. - Glyph records the mount path, remote origin, pinned revision, and export mode.
- Parent project projections include the mounted source according to policy.
- Public Git export can include vendored files for compatibility.
- The mounted source can still sync with its own GitHub repository.
- Updates to the mount are tracked as parent-project work, not as accidental directory edits.
Import Existing GitHub Project
- User points Glyph at a GitHub repository.
- Git translator imports Git objects as provenance.
- Glyph creates an initial
publicrealm from the repository contents. - Glyph records branches and tags as imported Git metadata.
- Future Glyph work uses realms and work contexts instead of native Git branches.
- Public state can continue to mirror back to GitHub.
Private Realm With Public Mirror
- Maintainers work in private realms.
- Public users see GitHub as a normal open source repository.
- Glyph stores private work in the canonical source graph.
- Publication checks decide which changes enter
public. - GitHub receives only the authorized public projection.
Metadata Mapping
Git compatibility must map intent, not just object names. Git primitives are overloaded. A Git branch can mean active work, public release lane, deploy environment, remote tracking pointer, or review artifact. A Git commit can mean savepoint, review unit, publication, imported history, or merge marker. Glyph should translate based on mode and purpose rather than pretending that one Git primitive always equals one Glyph primitive.Primitive Mapping
| Git primitive | Glyph primitive |
|---|---|
| commit | publication event, checkpoint, snapshot, or imported provenance |
| branch | work context, realm, or remote tracking view |
| HEAD | current realm projection pointer or exported Git branch tip |
| working tree | materialized workspace projection |
| index/staging area | internal projection/workspace index, not user-facing |
| merge commit | publication integrating multiple work contexts |
| squash merge | publish --mode squash |
| preserve-history merge | publish --mode preserve |
| tag | named source graph reference or release marker |
| remote | Glyph remote origin |
| submodule/subtree | external mount |
Commit Mapping
Glyph decides what a Git commit represents from context:- Git commit imported from an existing repository -> imported provenance object.
- Git commit exported from
publish --mode squash-> one Glyph publication event. - Git commits exported from
publish --mode preserve-> selected checkpoints or snapshots from the work context. - Git merge commit imported from GitHub -> imported integration provenance.
- Git commit used only for GitHub PR review -> external review artifact, not canonical Glyph history.
Branch Mapping
Glyph decides what a Git branch represents from purpose:main,master, or configured public branch on import -> initialpublicrealm seed or remote tracking view.- Feature branch on import -> imported work context or imported publication proposal.
- Protected release branch -> realm or named projection, if explicitly configured.
- GitHub PR branch exported from Glyph -> temporary external review branch for a publication request.
- Remote tracking branch -> remote tracking view, not a native realm unless policy maps it.
Publication Mapping
Glyph publication is the canonical visibility transition. Export behavior:publish --mode squash-> one Git commit on the exported branch.publish --mode preserve-> multiple Git commits derived from selected checkpoints/snapshots.- Publication with multiple dependencies -> merge-style Git history may be generated, but Glyph records the integration as a publication event.
- Publication request exported for GitHub review -> GitHub pull request plus temporary Git branch.
- Accepted publication -> exported public branch update.
- GitHub pull request -> Glyph publication request.
- GitHub review approval -> external review provenance until adopted by policy.
- GitHub Actions check run -> external check result attached to the publication request.
- GitHub merge/squash/rebase action -> imported integration provenance and candidate public realm update.
Realm Mapping
Realms are permissioned source views. Git branches are not permission boundaries. Export behavior:publicrealm usually exports tomain.- Additional public-compatible realms may export to named Git branches if configured.
- Private realms must not export to Git unless the destination can enforce equivalent policy semantics.
- A Git branch may seed a realm only when explicitly configured.
- A branch name alone must not create a private or public realm.
- Remote branch tips can be stored as remote tracking views for comparison and provenance.
Operation Mapping
Glyph operations map to Git/GitHub operations only at the translator boundary:| Glyph operation | Git/GitHub export |
|---|---|
work start | optional temporary branch for PR export |
checkpoint | optional commit in preserve export |
publish --mode squash | one commit or squash-merge result |
publish --mode preserve | commit series or merge result |
publication request | GitHub pull request |
remote sync | push/pull through configured translator mode |
mount add | subtree, vendored directory, or submodule depending on export mode |
- Public projection files -> Git tree
- Publication event -> Git commit
- Publication author -> Git author or committer metadata
- Glyph work context ID -> commit trailer
- Glyph review ID -> commit trailer or pull request metadata
- Glyph source graph object IDs -> optional commit trailers
Security Considerations
Translation layers are dangerous because they can smuggle hidden state into public systems. Important risks:- Git object databases can contain unreachable blobs.
- Commit messages can mention private filenames or vulnerabilities.
- Branch names can reveal hidden projects.
- Tags can reveal private release plans.
- Pull request descriptions can include private agent reasoning.
- CI logs can reveal generated private content.
- GitHub issue links can reveal embargoed work.
.git directory.
For GitHub remote origins, credentials must be scoped to the sync mode. An export-only origin should not need broad repository administration access. An import-only origin should not need write access.
Prototype Defaults
- The first agent integration is the
glyph --jsonCLI plus project skill document. - Agent work happens in explicit work contexts.
- The first VCS translator targets Git.
- The first platform translator targets GitHub.
- GitHub can be configured as a remote origin in
export-onlymode. - GitHub repositories can be configured as pinned external source mounts.
- GitHub pull requests import as Glyph publication requests for Glyph-native projects.
- Imported Git branches are provenance by default.
- Imported Git commits are provenance by default.
- Git branches become realms only through explicit mapping.
- Git feature branches may seed work contexts or publication proposals.
publish --mode squashexports as one Git commit by default.publish --mode preservemay export selected checkpoints as a commit series.- GitHub PR branches are external review artifacts, not canonical Glyph work.
- Inbound GitHub changes are never adopted automatically.
- GitHub Actions checks attach to publication requests as external check results.
- Git export creates a fresh repository from the
publicprojection. - Git import preserves Git commits as provenance metadata, not native Glyph work objects.
- Mounted GitHub repositories export as vendored files by default.
- Lossy translations are acceptable when warnings are explicit.
Success Criteria
This spec is successful if Glyph can support a prototype where:- An agent reads and writes source through a Glyph-native API.
- Agent work is captured in a scoped work context.
- A human can review and publish agent work into
public. - The
publicprojection can be exported into a clean Git repository. - The clean Git repository can be pushed to GitHub.
- A GitHub repository can be configured as an
export-onlyremote origin. - A GitHub repository can be mounted as a subdirectory with a pinned revision.
- Existing Git repository contents can be imported into Glyph as initial public state.
- Private Glyph objects do not appear in exported Git objects or metadata.