Skip to content

instruction-placement:audit: script the anchor/v1 and finding_id derivation #5166

Description

@kyle-sexton

Problem

context/findings-artifact.md requires audit to write a Suppression key (with anchor/v1 and finding_id) on every finding, and says only audit and delta may derive them. No script in the plugin (0.15.5) computes either value. detect.sh emits SECTION records, and glob-tools.sh validates globs, but nothing hashes a heading path or a finding id.

So the model computes both by hand on every run. In a repo-sweep run on melodic-software/.github, the agent had to borrow the formula from claude-config's skills/audit-pass/scripts/finding-identity.sh (sha256(check 0x1F claim 0x1F surface 0x1F anchor) truncated to 16 hex) and compute it inline with python. That script's own header describes the risk: a fully specified derivation performed by hand gives a different anchor per run. If a stored decline's key drifts, it silently stops suppressing, and delta re-proposes a finding the operator already declined.

Fix

Add a deterministic subcommand, e.g. detect.sh identity --file <path> --start <n> --lane <demote|promote> --destination <rung>. It would walk the SECTION chain to build the enclosing heading path, then print anchor/v1 and finding_id. Have audit and delta call it instead of deriving by hand, and add a test next to detect.test.sh.

Evidence

🤖 Generated with Claude Code

Activity

  1. added
    needs-triage
    on Sep 28, 2026
  2. kyle-sexton commented on Sep 29, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during triage.

    Agent Brief

    Type: Feature
    Summary: instruction-placement derives anchor/v1 and finding_id with a script instead of by hand.

    Current behavior:
    audit and delta derive the suppression key by hand; no instruction-placement script computes identity.

    Desired behavior:
    A detect.sh identity --file --start --lane --destination subcommand walks the section chain and prints anchor/v1 and finding_id (sha256 of check 0x1F claim 0x1F surface 0x1F anchor, first 16 hex). audit and delta call it. Prefer sharing the formula with claude-config's audit-pass finding identity over copying it.

    Acceptance criteria:

    • Output is deterministic across runs.
    • A test in the detect tests covers it.
    • The formula matches claude-config's finding identity.
  3. added
    agent-ready
    and removed
    needs-triage
    on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-ready

    Fields

    No fields configured for Feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions