Skip to content

docs: add INVARIANTS.md for repo governance#52

Merged
nahiyankhan merged 1 commit intomainfrom
block/docs/invariants
Apr 23, 2026
Merged

docs: add INVARIANTS.md for repo governance#52
nahiyankhan merged 1 commit intomainfrom
block/docs/invariants

Conversation

@nahiyankhan
Copy link
Copy Markdown
Collaborator

Summary

Introduces INVARIANTS.md at 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:

  1. The CLI is deterministic. No verb calls an LLM.
  2. fingerprint.md is the single canonical artifact. One on-disk format.
  3. The frontmatter / body partition is strict. Machine layer vs. prose layer stays separated.
  4. Judgement lives in the skill bundle, not the CLI. Recipes guide host agents; verbs don't wrap them.
  5. Fingerprints evolve by deliberate act, not by schedule. No background re-profile.
  6. CLI verbs are orthogonal. Each does one thing; no --mode flags that swap operation.

Invariants are amendable but amending one is a distinct act — own PR, explicit commit message.

Wiring

  • CLAUDE.md opens with a pointer to INVARIANTS.md.
  • AGENTS.md is a symlink to CLAUDE.md so 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 check passes (biome + typecheck + file-size + docs + cli-manifest)
  • pnpm test passes (182 tests)
  • pnpm build passes
  • AGENTS.md symlink resolves on a fresh clone (macOS/Linux — git stores symlinks natively)

🤖 Generated with Claude Code

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>
@nahiyankhan nahiyankhan merged commit 77b8f6a into main Apr 23, 2026
6 checks passed
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