docs(habitat): add D0 public contract inventory for deep refactor - #1809
Draft
mateicanavra wants to merge 1 commit into
Draft
Conversation
Owner
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
mateicanavra
force-pushed
the
codex/deep-habitat-d0-public-contract-inventory
branch
3 times, most recently
from
June 18, 2026 01:31
3286a6e to
fd6a5e8
Compare
Add the D0 public contract inventory and OpenSpec workstream records for the Deep Habitat refactor. The inventory classifies Habitat command, script, package, generator, hook, and JSON/receipt surfaces without changing runtime behavior. Record dependency/build grounding for command-entrypoint validation and downstream realignment obligations for proof-shaped compatibility surfaces, command help drift, and implemented-surface docs. Validation: - bun run openspec -- validate deep-habitat-d0-public-contract-inventory --strict - bun run openspec:validate - bun install --frozen-lockfile - bun run --cwd tools/habitat-harness build - bun run --cwd tools/habitat-harness test -- test/commands/habitat-entrypoints.test.ts - bun run habitat classify tools/habitat-harness/src/plugin.js - bun run nx g @internal/habitat-harness:project unsupported-d0-probe --kind=mod --dry-run - bun run lint - git diff --check
mateicanavra
force-pushed
the
codex/deep-habitat-d0-public-contract-inventory
branch
from
June 18, 2026 01:32
fd6a5e8 to
25d6f43
Compare
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.

This PR establishes the D0 public contract inventory for the Deep Habitat refactor, creating a durable compatibility ledger that all later refactor packets (D1–D14) must consult before moving, narrowing, removing, or versioning any Habitat surface.
The core artifact is
docs/projects/habitat-harness/deep-refactor/D0-public-contract-inventory.md, which classifies every current Habitat surface into one of eight contract states: public stable, public versioned, package-internal, command-only DTO, test-only, generated/derived, deprecated, or refused. Coverage includes:check,classify,verify,fix,graph,hook) with their flags, human output contracts, and machine JSON/receipt DTO contractsCheckReport,Classification,DiffClassification,VerifyProof,GritApplyTransactionProof,HookTrace) distinguished from internal helpers that happen to be exportedsrc/index.tsexport matrix classifying every exported symbol across baseline, command-engine, Grit, hooks, process, receipt artifact, rule registry, and Pattern Authority modulesKey compatibility decisions recorded:
bun run habitat check --jsonis canonical;bun run habitat check -- --jsonis a product compatibility issue, not a typobun run habitat:check -- --json) is a separate public surface from nested forwardingVerifyProof,GritApplyTransactionProof,ProofArtifactWriter) are current compatibility facts only — downstream packets must simplify them into minimal command receipts where product scenarios justify them, not treat artifact generation as target-domain authorityClassificationcurrently lacks top-level schema versioning; D4 must preserve or explicitly version it before changing fieldsbun install --frozen-lockfile+bun run --cwd tools/habitat-harness build) before claiming command behavior, as staledist/**artifacts produce false resultsThe accompanying OpenSpec change (
deep-habitat-d0-public-contract-inventory) adds requirements that gate all later refactor packet closure on consulting this ledger. The downstream realignment ledger tracks watched obligations for D1 through D14. No command behavior, package exports, generators, hooks, or generated artifacts are changed.