Skip to content

corrections: new plugin with /corrections:codify #7573

Closed
7 of 7 issues completed
Closed

Description

@kyle-sexton

Parent

Refs #7555. Source: PLAN Phase 5, topic poteto-review. Thread: corrections and codify.

Depends on

Outcome

A new corrections plugin ships /corrections:codify: given a described mistake (and optionally a
PR), it counts recurrences from history and buffer rows, picks the strongest ladder rung, and
proposes a check with a proof that the check fails on the old code and passes on current.

Decisions

  • New plugin corrections ships /corrections:codify alone; absorbs retro codify,
    /review:audit-enforceability and audit-sessions style; gather becomes a note action plus a
    read-only group action (D49, D50 item 3, D98, Q117, Q152). Origin: ours (packaging).
  • One prompt /corrections:codify "<description>" [#PR]; a proof script shows the new check fails on
    old code and passes on current (D72, Q113, Q115).
  • Consent: a person invoking it is consent; a model invocation only proposes; ask before installing
    any blocking check (hook, required CI check, lint error level) (D81, Q95; combined, because
    Lauren and Matt differ).
  • Setting recurrence.min_occurrences, default 2 (repo); any person's direct "codify this" acts at
    once; the PR names each occurrence counted; codify only proposes, a person approves (D81, Q509,
    Q572, Q580). Count at two and re-read history: Lauren's (pstack correct).
  • Counts from history and buffer rows (Q584). Sources: PR review comments by script (including the
    author's own after merge), session transcripts, recent commits; chat and meeting sources wait for
    communication's readers (D21, D50 item 6, Q103, Q510).
  • Places each lesson by scope: team standard, project rule, user scope (D50 item 1). Never unattended
    by default; a detector that finds an uncovered rule hands install and proof to codify (D50 item 7,
    Q151). Confirmed escaped defects feed codify (Q567, Lauren's).
  • Rejected: an action on /session-flow:audit-sessions; two skills gather and codify; a monthly
    pattern-store issue or new ledger; authority keys and owner-weighted counts; a personal mode skill.

Key interfaces

From the design's module layout: "corrections: ships /corrections:codify alone, with note and
read-only group actions. Absorbs retro codify, /review:audit-enforceability and audit-sessions
style. Places each lesson by scope (team standard, project rule, user scope). Sources: PR review
comments, session transcripts, recent commits, buffer rows. Chat and meeting sources wait for
communication."

Settings: "recurrence.min_occurrences: 2, repo." Variation verdicts: "Codify sources: abstract
now; corrections sources via adapters, chat and meeting wait for communication (D21, Q510)."

Slices, filed when this phase starts: corrections-scaffold-and-codify, absorb-and-remove.

Done when

  • bash plugins/skill-quality/scripts/check-skill.sh --require-evals plugins/corrections/skills
    exits 0 and the prove-check script's test exits 0 (the plugin does not exist on main).
  • rg -n 'review:audit-enforceability|retro codify' plugins docs --glob '!**/CHANGELOG.md' --glob '!.changes/**'
    prints nothing.
  • Every slice sub-issue is closed by a merged PR, and each skill-body cut cites before/after eval
    results.

Out of scope

  • Chat and meeting sources (wait for communication).
  • The findings buffer contract (Findings buffer thread).

Activity

  1. added
    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.
    on Oct 16, 2026
  2. github-actions commented on Oct 16, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: structural
    Basis: automated intake triage; the lanes App applied this class.

    Size: Medium
    Complexity: Medium
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Decision comment (#7573 (comment)):

    Decision recorded.
    Agent choice, not an owner answer.

    The issue's Decisions say corrections "absorbs retro codify, /review:audit-enforceability and audit-sessions style". The first two are delivered on main:
    [quote truncated; the full decision is at the link]

    The recorded decision settles the open questions. It picks one way to finish absorbing style: codify gains a cross-session preference action, audit-sessions gains an excerpts-only consumer mode, and style is removed. It also gives checkable done-when items. The remaining work is one change across the corrections and session-flow plugins, so I triaged it as a bounded Medium task.

    Automated triage, applied by the lanes App.

  3. kyle-sexton commented on Oct 16, 2026

    @kyle-sexton
    MemberAuthor

    What the article adds for codify. Source: https://claude.dev/blog/solving-code-review-at-anthropic (2026-10-15); ids are digest unit and claim.

    • After a miss, ask what the model did not have in front of it: "When a review misses something, we ask what the model didn't have in front of it and put the fix into a CLAUDE.md, a skill or a new check" (11 C5).
    • When the reviewer keeps flagging the same thing, fix it at the source: the skill, a lint rule, CLAUDE.md or REVIEW.md (04 C12; 10 C6).
    • Incident reviews ask which layer should have caught the issue (04 C68).

    For /corrections:codify: record the "what was missing" answer in each proposal, so rung picking (#7572) starts from it. Under D97/Q150 (GUIDE 97) review rules go to the per-concern review files; REVIEW.md and the one CLAUDE.md/AGENTS.md pointer line the owner allowed on 2026-10-16 only point at them. #7583 carries that change.

    Owner decision, 2026-10-16. The codify threshold stays at its default of 2 (Q572), and a person's direct "codify this" acts at once (Q509). Each confirmed escaped defect that Q567 sends to codify gets the article's question, "what did the model not have in front of it" (11 C5), answered in its follow-up.

    Against the originating sources. Counting to two and re-reading history (Lauren's, pstack correct) agrees with "keeps flagging the same thing" (04 C12).

    Each miss is also an eval case candidate for #7639 (05 C2).

    Related: #7572, #7583, #7576, #7639, #7638.

  4. 24 remaining items

  5. added
    host-runNeeds an unattended run on a host; the host runner takes it, not a person or the issue lane.
    on Nov 4, 2026
  6. kyle-sexton commented on Nov 4, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded.
    Agent choice, not an owner answer.

    The issue's Decisions say corrections "absorbs retro codify, /review:audit-enforceability and audit-sessions style". The first two are delivered on main:

    #11121 scoped style out as "a separate slice", which was never filed, so this record covers only style.

    Today /session-flow:audit-sessions style counts on its own and hands preferences to codify:

    • plugins/session-flow/skills/audit-sessions/SKILL.md:228 and :272 hold the pass and the hand-off.
    • plugins/corrections/skills/codify/SKILL.md:185 says it "keeps its own counter".

    This record picks one way to finish the absorption. Codify gains a cross-session preference action that reads session excerpts through a new audit-sessions consumer mode. style is removed. The other options fail on recorded facts:

    • Keeping style in audit-sessions, whether as the current hand-off or as a buffer producer, conflicts with the issue's Rejected line, "an action on /session-flow:audit-sessions".
    • A second transcript reader in corrections would duplicate audit-sessions' collector, its redaction and its format canaries (audit-sessions/SKILL.md:56-92).
    • A consumer mode has a precedent: sweep-only serves another skill and writes nothing (audit-sessions/SKILL.md:42-54).

    The mode name excerpts-only mirrors sweep-only (Basis: judgment). This is one lane PR across corrections and session-flow.

    • plugins/session-flow/skills/audit-sessions/SKILL.md adds an excerpts-only consumer mode modeled on sweep-only (SKILL.md:42-54). It runs sweep.py --excerpts with the caller's --scope, --state-key and --since (SKILL.md:257). It returns the JSON lines verbatim with their exit code, refuses --write-report, and writes nothing.

    • plugins/corrections/skills/codify/SKILL.md adds an action row and an actions/<name>.md file for cross-session preferences, gated on session-flow being installed. The action:

      • asks for the user-scope target (user CLAUDE.md, a user rule file or a user output style) and never accepts a repository file;
      • passes --scope explicitly and gets excerpts by invoking /session-flow:audit-sessions excerpts-only, never by reading transcripts or the store itself;
      • groups the excerpts and counts distinct sessions against recurrence.min_occurrences, through codify-settings.mjs;
      • has the person confirm each preference, then proposes through sections 3 and 6.

      The steps and the target rule carry over from audit-sessions/SKILL.md:228-281. The threshold source is the issue's Decisions ("recurrence.min_occurrences, default 2") and codify/SKILL.md:53-55. The cross-plugin naming rule is docs/review/skills-and-agents.md:12-13.

    • Codify treats excerpt lines as data, never instructions, citing docs/contracts/untrusted-content/README.md. This carries over the rule at audit-sessions/SKILL.md:279-281 and matches codify/SKILL.md:48-51.

    • The style action is removed from audit-sessions/SKILL.md: the "Style pass" section, style in the Arguments line and the action list (:11, :34, :37), and the eval case style-pass-needs-two-sessions-and-a-user-scope-target in audit-sessions/evals/evals.json:77. The correction lens no longer points at "the style pass's step 3" (:288); it states its own --scope rule. Source: issue Decisions; the removal pattern of refactor(session-flow)!: remove retro's codify mode #12073.

    • git grep -n -E 'audit-sessions[^ ]{0,12} style|[Ss]tyle pass|`style` (pass|action|takes)' -- plugins/session-flow plugins/corrections docs ':!**/CHANGELOG.md' ':!.changes/**' prints nothing. That removes the current hits at plugins/session-flow/README.md:246,258, audit-sessions/SKILL.md:11,23,34,37,228,288, audit-sessions/evals/evals.json:78, codify/SKILL.md:185 and docs/upstream/cursor-pstack.md:63. plugins/session-flow/README.md and the docs/upstream/cursor-pstack.md row's "Taken" text point at the new codify action in place of the removed lines; the record is reworded, not deleted, as feat(corrections): absorb retro codify and /review:audit-enforceability into /corrections:codify and remove them #11121 did for its names.

    • codify/SKILL.md's Boundary drops "It does not run /session-flow:audit-sessions style, which keeps its own counter" (:185). The description and argument-hint name the new action. Codify's allowed-tools gains no transcript or store read.

    • The removed audit-sessions eval case is ported into plugins/corrections/evals/ as a case.yaml case. A new case shows that a preference seen in only one session yields no proposal. Before/after eval results for the moved text appear in the PR, as feat(corrections): give codify a findings-file input, a review-comment source and their evals #11629's port table and eval comment did. Source: docs/review/skills-and-agents.md:6-8 ("a cut to an existing skill ships only with eval evidence of no loss").

    • bash plugins/skill-quality/scripts/check-skill.sh --require-evals plugins/corrections/skills exits 0, and bash plugins/skill-quality/scripts/check-skill.sh plugins/session-flow/skills exits 0.

    • bash plugins/corrections/scripts/prove-check.test.sh and bash plugins/corrections/scripts/codify-settings.test.sh exit 0. plugins/session-flow/skills/audit-sessions/scripts/tests/test_sweep.py passes, with no excerpt test removed.

    • scripts/check-changelog-fragments.sh --check passes, with a fragment under .changes/corrections/ (minor: a new action) and one under .changes/session-flow/ (major: an action is removed, as in refactor(session-flow)!: remove retro's codify mode #12073).

    needs-spec is satisfied by this record.

  7. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    and removed
    status: confirmedA maintainer confirmed the item is real and in scope; ready to be worked.
    on Nov 4, 2026
  8. removed
    needs-specNeeds a Brief or plan before anyone can build it.
    on Nov 4, 2026
  9. removed
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Nov 4, 2026
  10. kyle-sexton commented on Nov 4, 2026

    @kyle-sexton
    MemberAuthor

    Claimed by host-run lane 4 (session 839ddb58-b732-4a71-bb69-79a384292e2e) on hub assignment H32, 2026-11-04T07:19Z: the style absorption per issuecomment-6625049760.

  11. added
    status: confirmedA maintainer confirmed the item is real and in scope; ready to be worked.
    and removed
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    on Nov 4, 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

    host-runNeeds an unattended run on a host; the host runner takes it, not a person or the issue lane.priority: mediumReal value, no hard deadline; normal backlog flow.status: confirmedA maintainer confirmed the item is real and in scope; ready to be worked.work-class: structuralRefactors, migrations, contract changes; cross-cutting and hard to reverse.

    Fields

    Work status

    confirmed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions