docs: add INVARIANTS.md for repo governance#52
Merged
nahiyankhan merged 1 commit intomainfrom Apr 23, 2026
Merged
Conversation
Six hard constraints that shape what Ghost is: deterministic CLI, fingerprint.md as single canonical artifact, strict frontmatter/body partition, judgement in skill bundle not CLI, deliberate fingerprint evolution, orthogonal verbs. Each entry has a rule, a Why, and an explicit override clause so future edge cases have context to reason from. CLAUDE.md now opens with a pointer to the file; AGENTS.md symlinks to CLAUDE.md so non-Claude harnesses pick up the same surface. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Introduces
INVARIANTS.mdat repo root — six hard constraints that shape what Ghost is, each with a rule + Why + Override so future edge cases have context to reason from rather than a bare rule to rationalize around.The six:
fingerprint.mdis the single canonical artifact. One on-disk format.--modeflags that swap operation.Invariants are amendable but amending one is a distinct act — own PR, explicit commit message.
Wiring
CLAUDE.mdopens with a pointer toINVARIANTS.md.AGENTS.mdis a symlink toCLAUDE.mdso non-Claude harnesses (Cursor, Codex, etc.) pick up the same surface.Not included
No changeset — this is repo governance, doesn't touch
ghost-drift's published surface.Test plan
pnpm checkpasses (biome + typecheck + file-size + docs + cli-manifest)pnpm testpasses (182 tests)pnpm buildpassesAGENTS.mdsymlink resolves on a fresh clone (macOS/Linux — git stores symlinks natively)🤖 Generated with Claude Code