Skip to content

feat(debugging): place the sibling-search, always-on-signal and legitimate-state principle parts in /debugging:debug #12146

Description

@kyle-sexton

Parent #7589 decides that pstack's principles are placed "as reasoned sentences in the phase-skill step that applies them, fallback when discipline is off" (D58, Q174, Q175). The owner approved this 2026-10-15 (poteto-review decision rows 58 and 105). The wording rule the owner accepted (Q175) is that each placed part states the reason and the test that shows it applies, rather than a bare rule, and names the standard or discipline it comes from.

This slice places three parts from Lauren Tan's fix-root-causes principle in /debugging:debug:

  • 8f: "check for the pattern, not just the instance". Phase 6 at plugins/debugging/skills/debug/SKILL.md:292-296 records a recurring class but never searches for siblings.
  • 8h: after a deep dig, propose the cheap always-on signal that would have shown the deciding fact at first look. Decision 58 gates it by a debugging.yaml key whose default is "instrumentation phase ran". docs/conventions/debugging.yaml does not exist on main.
  • The legitimate-state test. Q175's accepted text gives the example "a guard is a fix only when the state it handles is legitimate" and says "Recheck the parts against the four principles as merged in e5136d8241". The upstream record (docs/upstream/cursor-pstack.md:92) flags the line "A null check at the call site is fixing the symptom" as lacking that test, and leaves it to "owner to decide in debugging, under the principle placement of discipline: paved-path file and principle placement #7589". The record cites it as debug/SKILL.md:320; on main it is :343.

Done when

  • Phase 6 of plugins/debugging/skills/debug/SKILL.md says to search the codebase for the same defect shape once the cause is fixed, and to fix each sibling in the change or file it. It gives the reason: the same cause usually has more than one instance.
  • Phase 6's record step proposes one cheap, always-on signal (a log line, metric or assertion) that would have shown the deciding fact at first look. It does so only when the gating key says to.
  • The skill reads that key from the repository's docs/conventions/debugging.yaml. When the file or the key is absent, the default applies: propose the signal when Phase 4 instrumentation ran. The skill names the key and the file.
  • The line at debug/SKILL.md:343 keeps the null-check example, but now states the test: handling a state is the fix when the system can legitimately be in that state, and a guard hides the bug when the state should never exist.
  • Each added sentence states its reason and its test.
  • plugins/debugging/evals/ gains a case whose case.yaml uses schema_version: "1.1", like red-run-before-suggested-fix/case.yaml.
    • Its scaffold holds the same defect in two files and a Phase 4 instrumentation step.
    • Its graders check that the reply names the second instance, and that it proposes an always-on signal.
    • Each grader has a samples/<grader>.json with at least one pass and one fail entry.
  • A .changes/debugging/*.md fragment with bump: minor describes the additions and the key.
  • The PR's CI is green.

Out of scope

  • Gated part 8j (validate state at startup as the fix): it lands only with stumble or eval evidence.
  • A fix-until-green premise stop: decision 58 keeps it in /debugging:debug only.

Parent: #7589

Activity

  1. added
    priority: mediumReal value, no hard deadline; normal backlog flow.
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.
    on Nov 1, 2026
  2. github-actions commented on Nov 1, 2026

    @github-actions
    Contributor
    No description provided.
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-readyFully specified and briefed; eligible for autonomous pickup from the frontier.priority: mediumReal value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Fields

    No fields configured for Feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions