feat: Review Army — parallel specialist reviewers for /review (v0.14.3.0) (#692)

* feat: extend gstack-diff-scope with SCOPE_MIGRATIONS, SCOPE_API, SCOPE_AUTH

Three new scope signals for Review Army specialist activation:
- SCOPE_MIGRATIONS: db/migrate/, prisma/migrations/, alembic/, *.sql
- SCOPE_API: *controller*, *route*, *endpoint*, *.graphql, openapi.*
- SCOPE_AUTH: *auth*, *session*, *jwt*, *oauth*, *permission*, *role*

* feat: add 7 specialist checklist files for Review Army

- testing.md (always-on): coverage gaps, flaky patterns, security enforcement
- maintainability.md (always-on): dead code, DRY, stale comments
- security.md (conditional): OWASP deep analysis, auth bypass, injection
- performance.md (conditional): N+1 queries, bundle impact, complexity
- data-migration.md (conditional): reversibility, lock duration, backfill
- api-contract.md (conditional): breaking changes, versioning, error format
- red-team.md (conditional): adversarial analysis, cross-cutting concerns

All use standard header with JSON output schema and NO FINDINGS fallback.

* feat: Review Army resolver — parallel specialist dispatch + merge

New resolver in review-army.ts generates template prose for:
- Stack detection and specialist selection
- Parallel Agent tool dispatch with learning-informed prompts
- JSON finding collection, fingerprint dedup, consensus highlighting
- PR quality score computation
- Red Team conditional dispatch

Registered as REVIEW_ARMY in resolvers/index.ts.

* refactor: restructure /review template for Review Army

- Replace Steps 4-4.75 with CRITICAL pass + {{REVIEW_ARMY}}
- Remove {{DESIGN_REVIEW_LITE}} and {{TEST_COVERAGE_AUDIT_REVIEW}}
  (subsumed into Design and Testing specialists respectively)
- Extract specialist-covered categories from checklist.md
- Keep CRITICAL + uncovered INFORMATIONAL in main agent pass

* test: Review Army — 14 diff-scope tests + 7 E2E tests

- test/diff-scope.test.ts: 14 tests for all 9 scope signals
- test/skill-e2e-review-army.test.ts: 7 E2E tests
  Gate: migration safety, N+1 detection, delivery audit,
        quality score, JSON findings
  Periodic: red team, consensus
- Updated gen-skill-docs tests for new review structure
- Added touchfile entries and tier classifications

* docs: update SELF_LEARNING_V0.md with Release 2 status + Release 2.5

Mark Release 2 (Review Army) as in-progress. Add Release 2.5 for
deferred expansions (E1 adaptive gating, E3 test stubs, E5 cross-review
dedup, E7 specialist tracking).

* chore: bump version and changelog (v0.14.3.0)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-03-30 22:07:50 -06:00
committed by GitHub
parent a0328be04c
commit a4a181ca92
24 changed files with 1666 additions and 308 deletions
+29 -5
View File
@@ -91,11 +91,35 @@ gstack-review-log pattern.
**Headline:** 10 specialist reviewers on every PR.
What ships:
- Parallel review agents: always-on (correctness, testing, maintainability) +
conditional (security, performance, API, data-migrations, reliability) +
stack-specific (Rails, TypeScript, Python, frontend-races)
- Red team reviewer activated for large diffs and high-risk domains
- Structured findings with confidence scores + merge/dedup across agents
- 7 parallel specialist subagents: always-on (testing, maintainability) +
conditional (security, performance, data-migration, API contract, design) +
red team (large diffs / critical findings)
- JSON-structured findings with confidence scores + fingerprint dedup across agents
- PR quality score (0-10) logged per review + /retro trending (E2)
- Learning-informed specialist prompts — past pitfalls injected per domain (E4)
- Multi-specialist consensus highlighting — confirmed findings get boosted (E6)
- Enhanced Delivery Integrity via PLAN_COMPLETION_AUDIT — investigation depth,
commit message fallback, plan-file learnings logging
- Checklist refactored: CRITICAL categories stay in main pass, specialist
categories extracted to focused checklists in review/specialists/
### Release 2.5: "Review Army Expansions" (v0.15.x)
**Headline:** Ship after R2 proves stable. Check in on how the core loop is performing.
Pre-check: review R2 quality metrics (PR quality scores, specialist hit rates,
false positive rates, E2E test stability). If core loop has issues, fix those first.
What ships:
- E1: Adaptive specialist gating — auto-skip specialists with 0-finding track record.
Store per-project hit rates via gstack-learnings-log. User can force with --security etc.
- E3: Test stub generation — each specialist outputs TEST_STUB alongside findings.
Framework detected from project (Jest/Vitest/RSpec/pytest/Go test).
Flows into Fix-First: AUTO-FIX applies fix + creates test file.
- E5: Cross-review finding dedup — read gstack-review-read for prior review entries.
Suppress findings matching a prior user-skipped finding.
- E7: Specialist performance tracking — log per-specialist metrics via gstack-review-log.
/retro integration: "Top finding specialist: Performance (7 findings)."
### Release 3: "Smart Ceremony" (v0.16)