020-keypath-section-anchors

Bounded keypath section anchors for first-party structured config

Lifecycle approvedImplementation completeVerification unknownQualification unknown

Widens the section-anchor grammar (`sections.rs`, spec 004 §3.3) so a `{ kind: section, file, anchor }` unit can name a bounded mapping keypath inside a first-party structured-config file: a workflow YAML (`on`, `permissions`, `env`, `jobs.<name>`, `jobs.<name>.permissions`), a `Cargo.toml` table path (`workspace`, `package.metadata.oap`), or a `package.json` member (`scripts`, `dependencies`). The anchor field is already a free string (`Unit::Section`), so this is a permissive-payload additive change with no frontmatter or JSON-schema edit, mirroring spec 016. The motivating cases are ASI security boundaries: `permissions:` (GITHUB_TOKEN scope) and `on`/`on.merge_group` (the trigger and merge-queue contract). Section ownership of those keys means any token-scope escalation or trigger change forces the owning spec's review. A hard file-eligibility predicate keeps the grammar pointed at surfaces spec-spine has a first-party reason to parse and off foreign tool schemas (deny.toml, Helm values, k8s manifests), which their owners rev independently. This retires the `# region:`-in-structured-config escape hatch for the eligible surfaces: a structural keypath is computed from the document tree and cannot silently drift from the block it claims, the way a hand-placed region marker can.

Read the full pinned specification ↗

Relationships

Claimed units

  • extends
    {
      "nature": "additive",
      "spec": "004-codebase-index",
      "unit": {
        "kind": "file",
        "path": "crates/spec-spine-core/src/sections.rs"
      }
    }

Source headings

  1. 020: bounded keypath section anchors for first-party structured config
  2. 1. Purpose
  3. 2. Territory
  4. 3. Behavior
  5. 3.1 Grammar: the bounded keypath
  6. 3.2 File eligibility: the ownership boundary (hard)
  7. 3.3 Resolution (per format)
  8. 3.4 Staleness
  9. 3.5 Diagnostics
  10. 3.6 Tests (minimum)
  11. 4. Out of scope
  12. 5. Design decisions (for review, before implementation)
  13. 6. Resolved decisions (as implemented)

Frozen anchors

No frozen anchors declared.