Skip to content

Add spec-review plugin: adversarial panel between brainstorming and writing-plans - #124

Merged
Jodre11 merged 2 commits into
mainfrom
feat/spec-review-plugin
Sep 7, 2026
Merged

Jodre11 merged 2 commits into
mainfrom
feat/spec-review-plugin

Conversation

@Jodre11

@Jodre11 Jodre11 commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

When we design something with the superpowers workflow, the written spec is checked only by the
same assistant that wrote it, and then by a human. There is no independent second opinion at the
point where mistakes are cheapest to fix — before any code exists. This adds a small plugin that
fills that gap: a panel of independent reviewers reads the finished spec, and their findings are
filtered before anything is changed.

It sits between the two existing stages: brainstorming produces the spec, this reviews it, then
writing-plans turns it into an implementation plan.

Why this rather than an existing tool

code-review-suite reviews a diff after implementation. Its vocabulary is code-shaped —
includes/severity-definitions.md is about SQL injection and unclosed resources, and
includes/verdict-rubric.md is explicitly "PR mode only" with a GitHub posting policy. Neither
transfers to a spec, where the real defects are "solves the wrong problem", "readable two ways",
and "over-scoped". So this ships its own small spec-shaped severity vocabulary instead of
importing an ill-fitting one, and lives in its own plugin rather than accreting onto the PR
machinery.

Changes

  • plugins/spec-review/skills/review-spec/SKILL.md — the workflow. Resolves the spec, dispatches
    the panel, verifies findings, classifies them, batches choices, applies, commits, hands over.
  • plugins/spec-review/agents/spec-reviewer.md — the reviewer subagent. Read-only tools, one
    assigned lens, spec-shaped severity tiers (BLOCKING / IMPORTANT / SUGGESTION), strict
    output shape with a mandatory SUBTRACTIONS section, capped at 60 lines.
  • plugins/spec-review/.claude-plugin/plugin.json — manifest.
  • .claude-plugin/marketplace.json — register the plugin.

Design decisions worth reviewing

  • Three lenses, ordered by marginal value (subtraction → completeness → framing) rather than
    scaled by blast radius. Reviewer count should follow how many genuinely orthogonal questions you
    can ask, and a spec can be wrong in exactly three non-overlapping ways: wrong problem,
    incomplete answer, over-built answer. framing is the documented one to drop for a two-lens
    panel, since the brainstorming dialogue usually already interrogated it.
  • No model: in the agent frontmatter, deliberately. An alias that fails to resolve silently
    inherits the parent model, so a pinned alias can yield a review that only looks independent. The
    caller picks the model at dispatch under the rule "not weaker than the authoring session,
    superior where available".
  • The receipt claims only what is verifiable. It reports lenses, findings, and adjudications,
    but never asserts model independence, because the skill cannot confirm which model actually ran.
  • Escalation is narrow by design. A finding reaches the author only if it changes scope or
    user-visible behaviour, or reviewers disagree and neither spec nor repo settles it, or it trades
    off a stated preference. Four choices is the cap; more means the spec needs rework rather than a
    four-round interrogation.
  • No hooks. Both trigger paths live in the skill description — explicit mention and the
    post-brainstorming seam. Deliberately avoids the every-prompt reminder pattern, which costs
    context in every session.

Test plan

  • jq -e parses marketplace.json and plugin.json
  • Both markdown frontmatter blocks parse as YAML with expected keys; neither declares model
  • No CRLF, no tab indentation, all files end with a newline (the conventions test_conventions.sh enforces)
  • tests/run.sh green in CI
  • Install locally and run /review-spec against a real spec — not yet done; the skill has
    never been executed
    , only structurally validated
  • Confirm the two-lens fallback reads sensibly when framing is dropped

Unrelated issues noticed, not addressed here

  • tests/run.sh cannot run unless the working directory is inside the repo:
    tests/lib/test_specialist_score.sh:5 calls git rev-parse --show-toplevel at source time under
    set -euo pipefail, aborting the whole harness. Other tests resolve REPO_ROOT from
    BASH_SOURCE, so this one looks like an oversight.
  • plugins/s3-search/ exists on disk but is not registered in .claude-plugin/marketplace.json.

phase-efficacy test added 2 commits September 7, 2026 08:53
…riting-plans

Superpowers reviews its own specs. Both brainstorming's spec self-review and
writing-plans' self-review are same-agent, same-context passes that end "fix
inline and move on", so the only independent critic of a spec in that flow is
the human. This adds the missing pass.

A panel of independent reviewers judges the committed spec under one lens each
— subtraction, completeness, framing — then the lead verifies every finding
against the spec and the repo, applies the unambiguous ones, and escalates only
genuine trade-offs, batched into a single choice with a recommendation.
Escalating trivia is treated as a failure of the adjudication step.

Lenses are ordered by marginal value rather than by blast radius: subtraction
first, because brainstorming tells itself to apply YAGNI ruthlessly but only
ever self-checks it, and framing last, because the brainstorming dialogue has
usually already interrogated it.

The reviewer model is chosen at dispatch, never pinned in agent frontmatter: an
unresolvable alias silently inherits the parent model, which produces a review
that only looks independent. The rule is "not weaker than the authoring
session, superior where available" — a reviewer below the author's capability
rubber-stamps. For the same reason the receipt states only what is verifiable
and never claims model independence.
Every plugin directory must ship a README.md — enforced by
tests/lib/test_cross_references.sh::test_every_plugin_has_readme, which was the
sole failure on the previous commit.
@Jodre11
Jodre11 merged commit d1a5ffe into main Sep 7, 2026
3 checks passed
@Jodre11
Jodre11 deleted the feat/spec-review-plugin branch September 7, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant