004-codebase-index
Codebase index and the file/section/symbol unit grammar
Lifecycle approvedImplementation completeVerification unknownQualification unknown
The codebase indexer (code-as-source view): discover compilation units via the configurable manifest namespace, link code to specs three ways, resolve the file/section/symbol unit grammar to physical (file, line-span) locations (tree-sitter for symbols, Rust + TypeScript in v1), emit a deterministic index.json with a content-hash staleness mechanism, and answer authorities(unit). Establishes the manifest/section/symbol resolution layer and the `spec-spine index` CLI subcommand.
Read the full pinned specification ↗Relationships
depends on
depended on by
- 005-coupling-gate
- 010-index-render-orphans
- 011-index-hash-slices
- 016-directory-crate-module-units
- 017-constrains-discriminator-optional-unit
- 020-keypath-section-anchors
- 021-ledger-seal
- 022-index-sharding
- 023-unresolved-unit-severity
- 024-resolution-discovery-fixes
- 025-symbol-resolution-feature-gate
- 027-cargo-workflow-dependency-waiver
- 029-ownership-coverage
- 031-references-non-owning-paths
- 033-configured-corpus-root
- 034-machine-readable-verdicts
- 036-declared-state-dir
- 038-completion-held-to-claims
- 048-the-ledger-answers-what-consumers-rebuild
- 050-claimed-but-unwitnessed
- 058-the-shipped-default-hashes-what-it-names
- 060-a-workflow-bump-is-not-a-governed-change
- 062-one-name-one-freshness-verb
- 063-planned-territory-is-declared-not-inferred
- 067-a-short-id-names-the-same-spec-at-every-verb
- 069-the-committed-index-is-compared-not-trusted
- 075-a-claim-below-the-header-window-is-not-silent
- 079-a-blocking-claim-is-not-a-stale-shard
Claimed units
- establishes
{ "kind": "file", "path": "crates/spec-spine-core/src/index.rs" } - establishes
{ "kind": "file", "path": "crates/spec-spine-core/src/manifest.rs" } - establishes
{ "kind": "file", "path": "crates/spec-spine-core/src/sections.rs" } - establishes
{ "kind": "file", "path": "crates/spec-spine-core/src/symbols.rs" } - establishes
{ "kind": "file", "path": "crates/spec-spine-core/src/pathutil.rs" } - establishes
{ "kind": "file", "path": "crates/spec-spine-core/tests/index.rs" } - establishes
{ "kind": "file", "path": "crates/spec-spine-cli/src/cmd_index.rs" }
Source headings
- 004: Codebase index and the unit grammar
- 1. Purpose
- 2. Territory
- 3. Behavior
- 3.1 Package discovery (manifest scan)
- 3.2 Linkage (code → spec), three sources
- 3.3 Unit resolution (the grammar → physical locations)
- 3.4 Determinism
- 3.5 Content hash & staleness
- 3.6 Traceability and diagnostics
- 3.7 authorities(unit)
- 4. Out of scope
Frozen anchors
No frozen anchors declared.