Skip to content

general-audit lessons: 2026-04-27 (run 2) #438

Closed

Description

@intendednull

Lessons from /general-audit run @ 00aa515 (#437). Second run on same day as #413 (yesterday); built on lessons from #426.

What worked (from #426 suggestions, now validated)

What didn't

  • Diff was so small (6 commits, 4 files) that the audit was mostly redundant w/ general-audit: main @ 401e2fc (2026-04-27) #413. Same-day re-runs produce diminishing returns. AUD-2 (TokenScope::ReadOnly leaks join_links) was missed by general-audit: main @ 401e2fc (2026-04-27) #413's 8-agent run despite being unchanged code — proving the value of some fresh sweep, but the 1-day cadence is overkill.
  • AUD-2 should have been caught by yesterday's sec-authperm agent but that agent was one of the 7 that timed out. Lesson: when agents timeout, the gaps are real and need backfill — not just absorbed into "lessons learned."
  • Worktrees skipped since no agents → setup time saved but no isolation for parallel runs if I'd needed them.

Suggested edits to .claude/skills/general-audit/SKILL.md

  1. Add a "skip-window" rule. "If HEAD is within N commits AND M hours of last audit master issue, skip — diff-only review (current PR rules apply) instead of full re-audit. Suggest N=20, M=24h." Today's run produced 2 findings on a 4-file diff; full sweep mostly re-walked yesterday's ground.

  2. Codify the orchestrator-only path as default for small diffs. Add: "Default to orchestrator-only sweep when diff < 50 files since last audit. Spawn agents only when diff is large OR when a specific concern needs deeper grep than a single context can hold."

  3. When agents do fan out, fan out narrower. Per-crate, not per-concern. E.g. audit-crate-agent (one crate, all concerns) scales better than audit-sec-input (one concern, whole tree) because the per-crate context is bounded and the agent can write incrementally without breadth-first context blowup.

  4. Document the "agent-timeout backfill" loop. When an agent times out and writes no findings, the orchestrator MUST sweep that concern manually before declaring the audit complete. Otherwise gaps compound across runs (AUD-2 missed two audits in a row).

  5. Move the existing-issue pre-fetch step into the skill explicitly. Currently buried in lesson UX navigation overhaul: tabbed settings, confirm dialogs, context menu, command palette #4 prose; should be a numbered required step before any agent spawns or any greps run.

  6. Drop the "8-agent fan-out" example from the skill entirely. The lessons-learned issues are now 2-for-2 on that pattern failing or being overkill. Replace w/ "1-3 narrow agents only when justified."

Numbers

Action

Human (or follow-up routine) to fold suggested edits into .claude/skills/general-audit/SKILL.md.

Critical: edit #4 (agent-timeout backfill) — AUD-2 sat undetected for one full audit cycle because nobody backfilled the timed-out sec-authperm agent's concern.

Activity

  1. added a commit that references this issue on Apr 29, 2026
  2. intendednull commented on Apr 30, 2026

    @intendednull
    OwnerAuthor

    already-fixed-upstream. suggested edits fold into .claude/skills/general-audit/SKILL.md via commit 8d91a11 docs(skill): fold audit lessons #426 #438 #477 #493 into general-audit.

    skip-window rule, orchestrator-direct default for small diffs, narrower agent fan-out, agent-timeout backfill loop, pre-fetch step codified, drop 8-agent example — all addressed. close completed.

    closing under /resolving-issues run on claude/friendly-maxwell-cVhhm.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions