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

depended on by

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

  1. 004: Codebase index and the unit grammar
  2. 1. Purpose
  3. 2. Territory
  4. 3. Behavior
  5. 3.1 Package discovery (manifest scan)
  6. 3.2 Linkage (code → spec), three sources
  7. 3.3 Unit resolution (the grammar → physical locations)
  8. 3.4 Determinism
  9. 3.5 Content hash & staleness
  10. 3.6 Traceability and diagnostics
  11. 3.7 authorities(unit)
  12. 4. Out of scope

Frozen anchors

No frozen anchors declared.