Thesis
Review and publication are the bridge between private work and visible source. Glyph must make that bridge explicit: what is being proposed, who reviewed it, what checks passed, what conflicts exist, and exactly which realms become able to see the result.Problem
Git collapses several different ideas into commits, branches, pull requests, and merges. Glyph separates them into work contexts, publication requests, policy checks, and projection exports. That separation needs a clear review model. Without one, Glyph cannot safely answer:- Can this agent change become public?
- Did the required people approve it?
- Did CI pass?
- Did two work contexts edit the same source object?
- Does an imported GitHub pull request become canonical?
- What happens when publication is revoked or superseded?
Goals
- Define review and publication request states.
- Define how approvals and checks attach to publication.
- Define conflict detection between work contexts and imported proposals.
- Support partial publication.
- Support preserved and squashed workspace integration.
- Support pruning completed workspace projections without erasing retained history.
- Support supersession and revocation without rewriting visibility history.
- Give GitHub pull requests a clear mapping into Glyph.
Non-Goals
- Designing a hosted review UI.
- Recreating Git merge semantics exactly.
- Solving every semantic merge conflict.
- Defining the full CI integration protocol.
Core Concepts
Publication Request
A publication request proposes moving selected work from one realm or work context into another realm. Fields:- Request ID
- Source work context or realm
- Destination realm
- Included source objects
- Excluded source objects
- Actor
- Required reviewers
- Approvals
- External check results
- Conflict status
- Policy decision
- Final publication object, if accepted
Review State
Publication requests use these states:draft: still being preparedready: available for reviewblocked: policy, conflict, or check failureapproved: required reviewers approvedpublished: destination realm updatedrejected: intentionally declinedsuperseded: replaced by a newer requestrevoked: future access withdrawn after publication
revoked and superseded never erase the earlier visibility event.
Approval
An approval is an identity-bound review event. Approvals record:- Reviewer identity
- Provider
- Timestamp
- Scope of approval
- Policy version
- Optional comment
Conflict
A conflict exists when two work contexts or imported proposals make incompatible changes to the same source object, path, generated artifact, policy object, or publication target. Conflicts can be:- Content conflicts
- Path conflicts
- Visibility conflicts
- Policy conflicts
- Mount conflicts
- External remote conflicts
Integration Mode
A publication request declares how the source work should appear in the destination realm’s visible history. Supported modes:preserve: carry selected checkpoints and relevant snapshots into the destination realm as visible history.squash: publish the final selected source state as one publication event.
Conflict Resolution
The first prototype should use conservative, explicit conflict handling:- Detect changed source objects and paths.
- If two contexts changed the same object, mark a conflict unless the change is identical.
- If a path was renamed or deleted in one context and edited in another, mark a path conflict.
- If publication would widen visibility differently than a dependency expects, mark a visibility conflict.
- Require a human or policy-authorized actor to resolve conflicts.
Partial Publication
A publication request may include only part of a work context. Partial publication must:- Identify included and excluded source objects.
- Check that excluded private objects are not referenced by included public objects.
- Re-run generated artifact and secret checks.
- Record the partial selection in the publication audit.
Workspace Pruning
After a work context is published, rejected, superseded, or discarded, Glyph may prune its active workspace projection. Pruning may remove:- Materialized filesystem directories
- Temporary indexes
- Cached diffs
- Regenerable projection metadata
- Published source graph objects
- Required audit events
- Retained snapshots
- Publication request records
- Policy decisions
- Approval records
GitHub Mapping
Imported GitHub pull requests become Glyph publication requests by default. GitHub comments, commits, and check runs become external provenance attached to the request. They do not become canonical review state until adopted by Glyph policy. Exported Glyph publication requests may create GitHub pull requests as public review artifacts, but Glyph remains canonical for Glyph-native projects.Prototype Defaults
- Publication requests are required for moving work into
public. - Review state is stored in Glyph, not GitHub.
- Required approvals are policy-driven.
- GitHub Actions checks attach as external check results.
- Conflicts block publication until explicitly resolved.
- Partial publication is allowed only at source-object granularity in v1.
- Publication supports
squashandpreservehistory modes. - Pruning is explicit in v1 and removes projections, not retained history.
- Revocation and supersession append new events.
Success Criteria
This spec is successful if a prototype can:- Create a publication request from a work context.
- Attach approvals and external check results.
- Detect conflicting edits between two work contexts.
- Block publication on unresolved conflicts.
- Publish an approved request into
public. - Publish with squashed or preserved history.
- Prune a completed workspace projection while retaining required history.
- Import a GitHub pull request as a Glyph publication request.
- Supersede or revoke a publication without deleting history.