Skip to content

KunanonJ/superstacks / plugins/superstacks/skills/interrogate

interrogate

Verified

Use for interrogate, adversarial review, multi-model review, challenge this, stress test this code, or find blind spots.

FileKindSize
SKILL.mdskill md5.3 KB
references/code-quality-review.mdmarkdown5.1 KB
references/lead-judgment.mdmarkdown4.4 KB
references/reviewer-prompt.mdmarkdown3.0 KB
references/rubric.mdmarkdown7.8 KB

references/rubric.md

View on GitHub
# Review Rubric

Review through whichever lenses are relevant. Not every lens applies to every change. Use judgment.

## Correctness

Does the code actually do what the intent says it should?

- Edge cases: empty inputs, nil/undefined, boundary values, concurrent access
- Error handling: are errors caught, propagated, or silently swallowed?
- Off-by-one, type coercion, integer overflow, string encoding
- State management: race conditions, stale closures, dangling references
- Does the happy path work? Does the sad path work?
- Idempotency: what happens if this operation runs twice, or if a previous run crashed halfway? If the answer is "it depends on what state was left behind," there's a missing reconciliation step.
- Concurrency: if multiple actors can touch the same mutable state (files, branches, shared data), is access serialized structurally (locks, sequential phases, exclusive ownership), or by conventions that won't hold?
- Write skew: under snapshot isolation, two transactions that read the same state and insert different keys do not conflict. A fence on "update the latest row" does nothing when there is no row yet. Ask whether the first-of-a-kind case has a row that both writers always change, and whether a test holds every transaction open after its read until all have arrived.
- For each call that changes something in another system, walk the lost answer: the change happened and the caller never read the reply. Read what the retry does. If the retry can close the work as "nothing to do", that is a finding.
- For each closing state, name the reply that proves it. A state that closes without such a reply must say so in its name, and must not carry the same "verified" mark as one that has it.
- When the other system keeps one status per object, an old status can confirm a new request. Evidence counts only when it is newer than a time the caller stored before sending.

When you find a potential bug, trace the execution path. Don't just flag "this could be nil". Show the call chain that makes it nil.

## Root Causes vs. Symptoms

Is the code fixing the actual problem or papering over a symptom?

Answering this often requires looking beyond the changed files. Read the surrounding code (callers, callees, type definitions, sibling modules) and understand the architecture the change lives in. Use the tools available to you (Read, Grep, Glob) to explore. Follow the call chain. Read the types. Understand why the code exists before judging whether the change addresses the right layer.

- Guard clauses that mask a deeper invariant violation
- Retry logic that hides a broken contract
- Type casts that silence a modeling error
- If you see a workaround, ask: why is the workaround needed? What would a proper fix look like?
- A fix in module A that should really be a fix in module B's contract
- Instructions where structure would be better: if the fix is a comment saying "don't do X" or a convention someone has to remember, ask whether it could instead be a type constraint, a lint rule, or a runtime check that makes the wrong thing impossible

## Structural Integrity

Does the code fit well into the system it's part of?

- Boundary discipline: is validation at system boundaries, or scattered through business logic? Validate data once where it enters the system, then trust it internally.
- Abstraction level: is the code mixing high-level orchestration with low-level detail?
- Coupling: does this change introduce dependencies that will make future changes harder?
- Data model fit: do the data structures match the actual access patterns? The right structure makes downstream code obvious. The wrong one fights you at every turn.
- Bolted-on vs. integrated: was the change patched onto the existing design, or does it read as if the design always accounted for it? If the new requirement had been known from the start, would the code look like this?
- Legacy dual-paths: does the change introduce a new API while keeping the old one alive? If there are no external consumers, migrate callers and delete the old path in the same wave. Don't leave compatibility layers that will become permanent.

Don't penalize simple code for lacking abstraction. Premature abstraction is worse than duplication.

## Verification

Can you tell that this code works from reading it?

- Are there tests? Do they test behavior or implementation details?
- Are there assertions/invariants that would catch regressions?
- If this is a bug fix: is there a test for the bug?
- If this touches an integration boundary: is the full path tested?
- Search test code for results that are logged and not asserted, and for comments that claim more than the code records. A finding backed only by a printed number is not backed.
- For anything persisted (timestamps, money amounts, identifiers): does a test read the stored value back through an independent client or a raw query, at least once under a non-UTC session or a non-default locale? A write and read through the same code cannot see an error that is undone on the way out.
- Check the real thing, not a proxy. If the code checks liveness via file mtime or cached state instead of reading the actual value, that's a verification gap.
- For delegated or async work: does the code verify actual output artifacts, or does it trust self-reports and summaries?
- A break made by hand that no test catches is a finding even when the shipped code is right. Report it as a missing test, name the smallest test that would catch it, and say which flag or line you flipped, so the author can repeat the proof.

## Complexity Budget

Is the complexity justified by what the code accomplishes?

- Code that could be simpler without losing correctness or clarity
- Abstractions that serve only one call site
- Configuration or parameterization for cases that don't exist yet
- Dead code, unused imports, vestigial parameters
- Over-engineering: "just in case" code paths with no current callers
- Obsolete compatibility paths kept alive for transitional stability that's no longer needed. If the migration is done, delete the scaffolding
- Does the user experience justify the complexity? Every feature, control, and option should earn its place. Half-finished features are worse than missing ones.

Simpler is better unless simpler is wrong. Three lines of duplication beat a premature abstraction.

## Security

For each security finding, trace the input path through the code and show it.

- User input flowing to dangerous sinks (SQL, shell, eval, innerHTML) without sanitization
- Authentication/authorization gaps in new endpoints
- Secrets in code, logs, or error messages
- TOCTOU (time-of-check-time-of-use) in security-critical paths

## Finders and Refusers

Applies when the change adds or alters code whose job is to find things or refuse things: a scanner, inventory, guard, lint rule, drift test, validator. Reading that code and its tests is not a review of it. It agrees with itself, and its blind spots are invisible from inside. Both checks below are mandatory, and you write them yourself:

1. **Independent count or trace.** Count or trace the same thing a different way, without calling or copying the code under review (a plain text search, a different parser, a hand trace of real inputs). Compare per file or per item, not only in total. Every difference is a finding until explained.
2. **Mutants and fixture probes.** Write throwaway inputs in the forms the code might miss: an alias, an indirection, a callback, a different spelling, a multi-line form. Run the code on them and record each as found or missed. Then break the guarded thing on purpose and confirm the guard fails.

For each missed form, search the real code for it. A missed form that exists in the real code today is a defect of at least high severity (report it as `critical`). A missed form that does not exist today is not a defect: record it as a stated limit of the code, in its own docs or comments.
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall