Skip to content

Comments

feat(review): add code-review-pipeline with parallel specialist agents#432

Closed
guyathomas wants to merge 12 commits intoobra:mainfrom
guyathomas:refine-superpowers-agents
Closed

feat(review): add code-review-pipeline with parallel specialist agents#432
guyathomas wants to merge 12 commits intoobra:mainfrom
guyathomas:refine-superpowers-agents

Conversation

@guyathomas
Copy link

@guyathomas guyathomas commented Feb 6, 2026

Summary

  • Add code-review-pipeline skill that orchestrates parallel code review across 5 specialist agents (implementation, test, architecture, tech-practices, UI/a11y)
  • Add review-nudge Stop hook that reminds the agent to run reviews after code changes (non-blocking)
  • Add pre-commit-quality-gate PreToolUse hook that blocks git commit if lint/typecheck fails (fail-open when no tooling detected)
  • Cleanup stale plan docs, test artifacts, and bump version

New files

  • skills/code-review-pipeline/SKILL.md — orchestration (DIFF → DISPATCH → AGGREGATE → ACT)
  • agents/{implementation,test,architecture,tech-practices,ui}-reviewer.md — 5 specialist agents (sonnet, confidence-scored findings)
  • hooks/review-nudge-hook.sh — Stop hook, nudge only
  • hooks/pre-commit-quality-gate.sh — PreToolUse hook for Bash, auto-detects project tooling

Design decisions

  • All agents use model: sonnet for cost efficiency (run up to 5 in parallel)
  • Confidence threshold of 80 filters low-confidence noise
  • Critical/high findings fixed inline; medium/low reported as suggestions
  • Pre-commit hook fail-opens if no lint/typecheck tools detected

Test plan

  • Run /code-review-pipeline on a branch with mixed file types (.ts, .svelte, .py)
  • Verify correct reviewers dispatched based on file extensions
  • Verify findings below confidence 80 are filtered
  • Verify review-nudge hook fires after code changes and exits fast when no changes
  • Verify pre-commit hook blocks on lint failure and passes on clean code
  • Verify pre-commit hook exits immediately for non-commit Bash commands

Summary by CodeRabbit

Release Notes

  • New Features

    • Added /research command for deep research with source verification and parallel subagent investigation.
    • Introduced specialized code reviewers for architecture, implementation, test coverage, technical practices, and UI/accessibility.
    • Added planning skill with research-first validation of approaches.
    • New UX/UI design skill with Figma integration and WCAG AA accessibility checks.
    • Pre-commit quality gates for linting and type checking.
  • Bug Fixes

    • Enhanced code reviewer with broader tooling capabilities.
  • Chores

    • Plugin version bumped to 4.1.1.
    • Streamlined command structure and skill framework.

Rick Hightower and others added 12 commits January 31, 2026 15:27
Comprehensive improvements based on skill grading report.

Score Improvements:
- PDA: 22/30 -> 28/30 (+6)
- Ease of Use: 20/25 -> 24/25 (+4)
- Spec Compliance: 11/15 -> 13/15 (+2)
- Writing Style: 8/10 -> 10/10 (+2)
- Utility: 14/20 -> 19/20 (+5)
- Modifiers: -4 -> +3 (+7)
- TOTAL: 71/100 -> 97/100 (+26)

Changes Made:
- Added trigger phrases to description
- Restructured workflow into 17 numbered steps across 5 phases
- Fixed second-person voice to imperative form
- Removed redundancy between Overview and Key Principles
- Created references/design-template.md
- Created references/example-session.md
New skill for comprehensive research using:
- State machine: INIT → DECOMPOSE → RESEARCH → EVALUATE → SYNTHESIZE
- 8-question decomposition framework covering all research angles
- Parallel subagent dispatch (max 3 per batch)
- Source tiering (Tier 1: .gov/.edu, Tier 2: publications, Tier 3: blogs)
- Confidence-based iteration with explicit exit criteria
- MCP tool fallback (firecrawl → WebFetch)
- State recovery for interrupted sessions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- test-reviewer: Independent subagent for catching AI "cheat tests"
  - Pure XML structure with 5-category checklist
  - Detects tests that verify implementation instead of behavior
  - Catches tautological mocks, over-mocking, coverage gaming
  - Uses fresh context to avoid implementer bias

- test-planning: Minimal skill for test strategy decisions
  - Granularity guidance (unit/integration/e2e)
  - Testing pyramid reference
  - Integrates with TDD skill and test-reviewer subagent

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Bumps version to 4.0.4.

UX/UI design skill (skills/ux-ui-design/):
- Router pattern with 5 workflows: ideate, design, review, implement, iterate
- 8 reference files: accessibility, design-systems, usability-heuristics,
  visual-design, user-research, patterns, anti-patterns, tools
- Figma MCP integration for design context extraction
- WCAG AA accessibility requirements built into workflows
- Design system token compliance enforcement
- Disambiguation to prevent confusion with architecture design

/research slash command (commands/research.md):
- Thin wrapper exposing superpowers:research skill
- No code duplication

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add research-stop-hook.sh that blocks exit until targetSources is met
- Add /research-cancel command for graceful abort with progress report
- Migrate research skill to pure XML structure
- Add resource tracking: sourcesGathered, subagentCalls, findingsCount, startTime
- Update EVALUATE phase with two-stage decision (source gate + quality gate)
- Add resource usage reporting on completion/cancel
- Update README with research skill documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add PostToolUse hooks for Skill and Task tools to log usage
- Create skill-analytics.sh to append events to JSONL file
- Create render-skill-tree.sh to display ASCII call tree at session end
- Add /skill-stats slash command for aggregate frequency and flow analysis
- Bump version to 4.0.6

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Delete commands/research-cancel.md slash command
- Increment version from 4.0.6 to 4.0.7 in plugin.json
Skill orchestrates parallel code review via specialist agents:
- implementation-reviewer, test-reviewer, architecture-reviewer,
  tech-practices-reviewer, ui-reviewer
- review-nudge stop hook nudges review after code changes
- pre-commit-quality-gate blocks commits on lint/typecheck failure
@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

Version bump to 4.1.1 introduces research workflow, specialized reviewer agents (architecture, implementation, tech-practices, test, UI), a code-review-pipeline skill, planning capability, and pre-commit quality gates. Concurrent removal of bundled procedural skills (brainstorming, executing-plans, requesting-code-review, writing-plans) and extensive documentation consolidation, while extending hook infrastructure and agent specifications.

Changes

Cohort / File(s) Summary
Version & Release Metadata
.claude-plugin/marketplace.json, RELEASE-NOTES.md
Bumped plugin version from 4.0.3 to 4.1.1; added v4.0.4 release notes introducing research command and UX/UI design skill.
Research Workflow
commands/research.md, skills/research/SKILL.md
New /research command with multi-phase INIT→DECOMPOSE→RESEARCH→EVALUATE→SYNTHESIZE state machine; source-gated synthesis requiring minimum sourced findings; parallel subagent research with confidence tracking and structured report generation.
Specialized Reviewer Agents
agents/architecture-reviewer.md, agents/implementation-reviewer.md, agents/tech-practices-reviewer.md, agents/test-reviewer.md, agents/ui-reviewer.md
Added five new agent specifications: architecture (coupling/cohesion/dependency analysis), implementation (correctness/safety/robustness), tech-practices (framework-specific best practices), test (coverage quality), and ui-reviewer (WCAG AA accessibility and UX); each with review checklists and JSON output schemas.
Code Review & Planning
agents/code-reviewer.md, skills/code-review-pipeline/SKILL.md, skills/planning/SKILL.md
Added tools field to code-reviewer; new code-review-pipeline skill with DIFF→DISPATCH→AGGREGATE→ACT phases; research-first planning skill with MCP-backed approach validation.
Hook Infrastructure
hooks/hooks.json, hooks/pre-commit-quality-gate.sh, hooks/research-stop-hook.sh, hooks/review-nudge-hook.sh, hooks/session-start.sh, lib/escape-json.sh
Refactored hook system: added Stop and PreToolUse hook sections; introduced pre-commit linting/typecheck gate; research-stop-hook enforces source-gate enforcement and progress tracking; review-nudge-hook triggers code review suggestions; session-start now uses external escape-json utility with lighter additionalContext.
Skill Removals & Consolidation
commands/brainstorm.md, commands/execute-plan.md, commands/write-plan.md, skills/brainstorming/SKILL.md, skills/dispatching-parallel-agents/SKILL.md, skills/executing-plans/SKILL.md, skills/requesting-code-review/..., skills/receiving-code-review/SKILL.md, skills/using-superpowers/SKILL.md, skills/writing-plans/SKILL.md
Removed nine procedural skill files and related command docs; consolidated guidance now embedded in agents/reviewer specs and code-review-pipeline.
Skill Updates & Deprecations
skills/finishing-a-development-branch/SKILL.md, skills/subagent-driven-development/SKILL.md, skills/subagent-driven-development/code-quality-reviewer-prompt.md, skills/systematic-debugging/SKILL.md, skills/test-driven-development/SKILL.md, skills/using-git-worktrees/SKILL.md
Removed worktree cleanup orchestration from finishing-a-development-branch; updated subagent-driven-development with TaskCreate/TaskUpdate nomenclature and code-review-template section; replaced test-driven-development reference with explicit red-green-refactor guidance; removed git-worktrees skill documentation.
Documentation Cleanup
docs/plans/2025-11-22-*.md, docs/plans/2025-11-28-*.md, skills/systematic-debugging/CREATION-LOG.md, skills/systematic-debugging/test-*.md, skills/writing-skills/...
Removed OpenCode support design/implementation plans (~1390 lines); deleted skills-improvement planning doc (~711 lines); removed systematic-debugging test files; deleted entire writing-skills directory including SKILL.md (~655 lines), best-practices guide (~1150 lines), CLAUDE_MD_TESTING.md (~189 lines), persuasion-principles.md (~187 lines), render-graphs.js utility, and testing-skills-with-subagents.md (~384 lines).
Test Suite Modifications
tests/explicit-skill-requests/..., tests/skill-triggering/prompts/..., tests/skill-triggering/run-all.sh
Removed brainstorming and mid-conversation-execute-plan explicit-skill-request tests; deleted trigger-test prompts for writing-plans, dispatching-parallel-agents, executing-plans, requesting-code-review; reduced skill-triggering test suite from 6 to 2 tests.
Documentation Updates
README.md
Added /superpowers:research command to help output; expanded Skills Library with new Research section and Collaboration entries (dispatching-parallel-agents, requesting-code-review, receiving-code-review, using-git-worktrees, finishing-a-development-branch, subagent-driven-development).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

The diff involves substantial architectural changes across multiple categories: new research workflow with complex state management and gating logic, five new agent specifications with distinct review frameworks, refactored hook infrastructure with external utilities, removal of nine bundled skills plus extensive documentation (~3000+ lines deleted), and coordinated test suite updates. While many deletions are straightforward, the research skill's state machine complexity (INIT→DECOMPOSE→RESEARCH→EVALUATE→SYNTHESIZE with source gating), hook script logic (pre-commit checks, research progress tracking), and multiple agent output schemas require careful verification of correctness and integration points. The heterogeneity of changes—combining feature additions with consolidation and removals—demands separate reasoning for each cohort.

Possibly related issues

Possibly related PRs

Poem

🐰 Deep research questions dance in parallel,
source gates ensure findings ring true and clear,
agents review code with wisdom and care—
no more tangled plans, just crisp, structured air!
Superpowers 4.1 hops forth with grace. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: introducing a code-review-pipeline that coordinates multiple specialist agents in parallel.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@guyathomas guyathomas closed this Feb 6, 2026
@guyathomas guyathomas deleted the refine-superpowers-agents branch February 6, 2026 04:26
@guyathomas guyathomas restored the refine-superpowers-agents branch February 6, 2026 04:27
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

🤖 Fix all issues with AI agents
In `@agents/tech-practices-reviewer.md`:
- Line 43: Update the severity enum usage so all reviewer agents and the
pipeline agree: either add "critical" to the severity field in reviewer configs
(e.g., update "severity": "high|medium|low" in tech-practices-reviewer.md,
architecture-reviewer.md, test-reviewer.md to "critical|high|medium|low") and
ensure code that emits findings (implementation-reviewer, ui-reviewer, etc.)
uses the same enum, or remove the Critical tier from the code-review-pipeline
SKILL.md and any grouping logic; choose one approach and apply it consistently
across the unique symbols: severity fields in tech-practices-reviewer.md,
architecture-reviewer.md, test-reviewer.md, implementation-reviewer.md,
ui-reviewer.md and the grouping logic in code-review-pipeline SKILL.md so all
files share the same set of severity values.

In `@hooks/pre-commit-quality-gate.sh`:
- Around line 140-148: The script currently uses set -e which makes run_lint or
run_typecheck abort the script immediately on non-zero exit, preventing both
checks from running and preventing the intended final exit code handling; modify
the calls to run_lint and run_typecheck so their failures are suppressed and
captured (e.g. run them with a construct that prevents immediate exit and
captures their exit status) and append any error output or status into the
existing errors variable, then let the subsequent if [[ -n "$errors" ]] block
decide to echo and exit 2; specifically update the invocations of run_lint and
run_typecheck and their handling so they do not trigger set -e but instead
record failures into errors.
- Around line 61-71: The current logic collects staged_files and pipes them
through plain xargs which breaks on filenames with spaces and also misses
ESLint's TypeScript flat config; change the git diff invocation to produce
NUL-delimited output (use git ... -z --name-only --diff-filter=ACMR) and consume
it with xargs -0 when calling eslint/ruff/pyright so filenames with spaces are
preserved; also include eslint.config.ts in the config file existence checks
(alongside .eslintrc, .eslintrc.js, .eslintrc.json, eslint.config.js,
eslint.config.mjs) and apply the same -z / xargs -0 pattern to the ruff and
pyright sections (refer to the staged_files variable and the eslint/ruff/pyright
command invocations and output handling).

In `@hooks/research-stop-hook.sh`:
- Around line 12-13: The script currently assigns HOOK_INPUT=$(cat) but never
uses HOOK_INPUT; remove this unused assignment or rename it to _HOOK_INPUT to
indicate intentional discard and silence SC2034; locate the assignment of
HOOK_INPUT in hooks/research-stop-hook.sh (the HOOK_INPUT variable) and either
delete that line or change the variable name to _HOOK_INPUT if the value must be
consumed for side effects.
- Around line 196-201: The cancelled/complete branches currently echo raw text
from generate_report which breaks consumers; instead wrap the report into the
hook JSON shape used elsewhere. Update the branches handling current_phase ==
"CANCELLED" and "COMPLETE" to emit a single JSON object like
{"hookSpecificOutput": <report>} (ensuring <report> is valid JSON or properly
escaped), e.g. capture report=$(generate_report ...) and then printf
'{"hookSpecificOutput": %s}\n' "$report" (or use jq to build the object) before
exiting; keep function/name references generate_report and current_phase so you
modify the same code paths.

In `@hooks/review-nudge-hook.sh`:
- Around line 9-12: The check against stop_hook_active in review-nudge-hook.sh
is dead/unassigned; either remove the conditional block (the if [[
"${stop_hook_active:-}" == "true" ]]; then exit 0 fi) or explicitly document and
enforce how stop_hook_active is set/exported (e.g., add a comment above the
check stating it must be exported by a prior stop hook such as
research-stop-hook.sh or add an export in that prior hook) so the coordination
mechanism is explicit; update the code to match one of these two approaches and
ensure any referenced hook (research-stop-hook.sh) actually sets/export
stop_hook_active when chosen.

In `@RELEASE-NOTES.md`:
- Around line 54-73: Add a new release notes entry (e.g., v4.1.2) documenting
the three headline features introduced by this PR: the code-review-pipeline
skill, the pre-commit-quality-gate hook, and the review-nudge hook; describe
each briefly (what it does and triggers or integration points), mention any
CLI/slash command or config names if applicable, and place it alongside the
existing v4.0.4 section so users can discover these additions in
RELEASE-NOTES.md.

In `@skills/code-review-pipeline/SKILL.md`:
- Around line 30-44: The classification table in the DIFF phase currently
conflicts with the dispatch map: update the DIFF phase's file-pattern
classification and/or dispatch map so they agree—pick one authority (preferably
keep the dispatch map's conditional gates) and modify the classification rows
(e.g., the `.ts, .js, .py, .rs, .go` row in the table) to remove unconditional
`architecture`, `test`, or `ui` tags and instead document that `architecture` is
added only for new/moved files or changed exports, `test` is added only when
source files (not just tests) changed, and `ui` only for UI component files;
ensure the deduplication step and the phrase "The `implementation` reviewer is
ALWAYS dispatched" remain consistent with the chosen authority so the DIFF phase
logic (phase name "DIFF") and subsequent deduplication produce the intended
reviewer set.
- Around line 79-91: The AGGREGATE/ACT pipeline references a "Critical" severity
but none of the reviewer agents (architecture reviewer, implementation reviewer,
tech-practices reviewer, test reviewer, UI reviewer) produce it because their
severity enums only include "high|medium|low"; update those reviewer agents'
severity enum definitions to include "critical" (so findings can be promoted to
AGGREGATE's Critical tier) and ensure any place branching on severity (e.g., ACT
handling logic) accepts "critical"; alternatively, if you prefer one change,
collapse the pipeline's "Critical" tier into "High" in the AGGREGATE and ACT
phases so the existing enums remain valid—choose one approach and apply
consistently across the reviewer agent enums and AGGREGATE/ACT logic.

In `@skills/research/SKILL.md`:
- Around line 73-75: Add a language identifier to the fenced code block
containing "INIT → DECOMPOSE → RESEARCH → EVALUATE → [RESEARCH or SYNTHESIZE] →
DONE" in SKILL.md to satisfy markdownlint MD040; change the opening fence from
``` to ```text so the block reads with a language tag (e.g., use ```text).
- Line 62: Update the table entry that currently reads "Scrape full page content
(preferred)" to use the hyphenated compound adjective "full-page" so it reads
"Scrape full-page content (preferred)"; locate the row containing the
`firecrawl-mcp:firecrawl_scrape` identifier in SKILL.md and replace the phrase
accordingly.
- Around line 372-380: The error_handling table in SKILL.md is missing the
required leading/trailing pipes and blank lines around the table which triggers
markdownlint; edit the <error_handling> section to add a blank line before and
after the table and ensure every header and row starts and ends with a pipe
(e.g., "| Error | Action |" and "|-------|--------|", and each data row "|
Malformed JSON | Retry once, then mark low confidence |", etc.) so the table is
properly formatted for markdownlint to pass.
- Around line 393-404: The markdown table under the <red_flags> block (starting
with "STOP if you catch yourself thinking any of these:") has inconsistent pipe
usage and mismatched column counts; fix it by updating the header and every
table row to include leading and trailing pipes and ensure the header separator
(the --- row) has the same number of columns as the header (two columns:
"Thought" and "Reality"), e.g., add a leading | and trailing | to each line and
make the separator |---------|---------| match the columns so markdownlint
passes.
🧹 Nitpick comments (12)
agents/tech-practices-reviewer.md (1)

34-53: Output instructions may conflict: "no markdown fences" but example uses fenced block.

Line 34 says "Return ONLY this JSON (no markdown fences, no commentary)" but the example itself is wrapped in a markdown code fence (lines 36–53). This could confuse the agent — it may return the output with fences (mimicking the example) or without (following the instruction). This same pattern appears in the other reviewer agents too.

Consider either removing the fences from the example or rewording the instruction to clarify that the fences in the document are just for formatting.

agents/architecture-reviewer.md (1)

37-54: Add a language identifier to the fenced code block.

The static analysis tool flagged MD040: fenced code blocks should have a language specified. Adding json to the opening fence improves rendering and lint compliance.

Proposed fix
-```
+```json
 {
   "agent": "architecture-reviewer",
agents/test-reviewer.md (1)

36-56: Add a language tag to the JSON fence.

The JSON example is a fenced block without a language identifier, which violates MD040 and reduces readability.

✍️ Suggested fix
-```
+```json
 {
   "agent": "test-reviewer",
   "filesReviewed": ["src/foo.ts", "src/foo.test.ts"],
   "findings": [
     {
       "severity": "high|medium|low",
       "confidence": 85,
       "file": "src/foo.ts",
       "line": 42,
       "issue": "New error handling branch has no test coverage",
       "recommendation": "Add test case for when fetchUser throws NetworkError",
       "category": "test-quality"
     }
   ],
   "missingTests": [
     "Test error path when fetchUser throws NetworkError in src/foo.ts:42",
     "Test boundary condition for empty array input in src/bar.ts:15"
   ],
   "summary": "3 coverage gaps, 1 antipattern found"
 }
skills/planning/SKILL.md (1)

57-97: Add language tags to the fenced step blocks.

Several fenced blocks are untyped, which triggers MD040 and makes intent less clear. Use text (or remove fences) for these numbered step examples.

✍️ Suggested fix
-```
+```text
 1. resolve-library-id for each relevant library
 2. query-docs for the specific feature/API needed
 3. Note: version-specific gotchas, recommended patterns, deprecations
-```
+```

-```
+```text
 1. Search for "[feature] [framework] implementation"
 2. Search for "[feature] best practices [year]"
 3. Look for: blog posts with code, official guides, comparison articles
-```
+```

-```
+```text
 1. search-code for the pattern/API in real projects
 2. search-repositories for projects solving the same problem
 3. Look for: how production codebases structure this, common pitfalls
-```
+```

-```
+```text
 ### Approach N: [Name]

 **How it works:** [2-3 sentences]

 **Evidence:**
 - Context7: [what the docs say about this approach]
 - Serper: [what real-world articles recommend]
 - GitHub: [how production codebases do it]

 **Trade-offs:**
 - Pro: [concrete benefit with source]
 - Pro: [concrete benefit with source]
 - Con: [concrete drawback with source]

 **Fits this project because:** [why this works for the specific codebase]
-```
+```
agents/implementation-reviewer.md (1)

38-56: Add a language tag to the JSON fence.

MD040 flagged the untyped fenced block. A json tag improves readability and lint compliance.

✍️ Suggested fix
-```
+```json
 {
   "agent": "implementation-reviewer",
   "filesReviewed": ["path/to/file.ts"],
   "findings": [
     {
       "severity": "critical|high|medium|low",
       "confidence": 95,
       "file": "path/to/file.ts",
       "line": 42,
       "issue": "Concise description of the bug or vulnerability",
       "recommendation": "Specific fix suggestion",
       "category": "security|logic|error-handling|race-condition|resource-leak|type-safety|edge-case"
     }
   ],
   "missingTests": [],
   "summary": "2 critical, 1 high found"
 }
agents/ui-reviewer.md (1)

46-73: Add a language tag to the JSON fence.

Please add json to the fenced block for lint compliance and readability.

✍️ Suggested fix
-```
+```json
 {
   "agent": "ui-reviewer",
   "filesReviewed": ["src/components/Modal.svelte"],
   "findings": [
     {
       "severity": "critical|high|medium|low",
       "confidence": 95,
       "file": "src/components/Modal.svelte",
       "line": 8,
       "issue": "Modal has no focus trap — keyboard users can tab behind the overlay",
       "recommendation": "Add focus trap that cycles between first and last focusable element, restore focus on close",
       "category": "a11y"
     },
     {
       "severity": "medium",
       "confidence": 85,
       "file": "src/components/Modal.svelte",
       "line": 22,
       "issue": "No loading state while async content fetches",
       "recommendation": "Add spinner or skeleton screen during data fetch",
       "category": "ux"
     }
   ],
   "missingTests": [],
   "summary": "1 critical a11y, 1 medium ux found"
 }
skills/subagent-driven-development/SKILL.md (1)

83-155: Add a language tag to the example workflow fence.

The example workflow is an untyped fenced block, which triggers MD040. Use text for clarity.

✍️ Suggested fix
-```
+```text
 You: I'm using Subagent-Driven Development to execute this plan.

 [Read plan file once: docs/plans/feature-plan.md]
 [Extract all 5 tasks with full text and context]
 [Create all tasks with TaskCreate]

 Task 1: Hook installation script
 ...
 Done!
-```
+```
lib/escape-json.sh (1)

4-20: Missing escaping for some JSON control characters.

The function handles \, ", \n, \r, \t but omits \b (backspace), \f (form feed), and other control characters (U+0000–U+001F). Per the JSON spec, all control characters must be escaped. This is unlikely to matter for the current hook messages, but could cause malformed JSON if state data or error output containing these characters is ever passed through.

Additionally, the character-by-character loop with += is O(n²) in bash due to string reallocation. Fine for short hook messages, but worth noting if this utility is ever reused for larger payloads.

💡 Alternative: use a `sed` pipeline for correctness and performance
 escape_for_json() {
     local input="$1"
-    local output=""
-    local i char
-    for (( i=0; i<${`#input`}; i++ )); do
-        char="${input:$i:1}"
-        case "$char" in
-            $'\\') output+='\\' ;;
-            '"') output+='\"' ;;
-            $'\n') output+='\n' ;;
-            $'\r') output+='\r' ;;
-            $'\t') output+='\t' ;;
-            *) output+="$char" ;;
-        esac
-    done
-    printf '%s' "$output"
+    printf '%s' "$input" | sed \
+        -e 's/\\/\\\\/g' \
+        -e 's/"/\\"/g' \
+        -e 's/\t/\\t/g' \
+        -e '$! s/$/\\n/' | tr -d '\n'
 }

Or for full spec compliance, a small python3 -c "import json,sys; print(json.dumps(sys.stdin.read())[1:-1], end='')" one-liner would handle all edge cases.

hooks/review-nudge-hook.sh (1)

14-18: git diff --name-only HEAD includes both staged and unstaged changes.

This is likely intentional (detecting all session work), but note it won't detect new untracked files. If an agent creates a new .ts file but hasn't staged it, this hook won't see it. If the intent is "any code changes in the working tree," consider adding git ls-files --others --exclude-standard for untracked files as well.

hooks/session-start.sh (1)

23-23: Extremely long line is hard to maintain.

This ~900-character line embeds the entire skill list and instructions. Consider building it in a variable with concatenation or a multiline approach before interpolation, which would make future edits (adding/removing skills) less error-prone.

hooks/pre-commit-quality-gate.sh (1)

18-21: Compound and piped commands containing git commit won't be intercepted.

The regex ^\s*git\s+commit\b only matches when git commit is the first command in the string. Commands like cd repo && git commit -m "msg" or git add . && git commit will bypass the gate. This may be acceptable for the intended use case (Claude Code typically issues simple commands), but it's worth documenting.

skills/research/SKILL.md (1)

58-70: Add blank lines around the required-tools table.

markdownlint (MD058) flags tables not surrounded by blank lines. Add a blank line before and after the table to satisfy the rule.

Suggested fix
 <required_tools>
-| Tool | Purpose | Required |
-|------|---------|----------|
-| `WebSearch` | Search queries (built-in) | Yes |
-| `Task` | Spawn research subagents | Yes |
-| `firecrawl-mcp:firecrawl_scrape` | Scrape full page content (preferred) | No |
-| `WebFetch` | Fetch page content (built-in fallback) | Fallback |
+ 
+| Tool | Purpose | Required |
+|------|---------|----------|
+| `WebSearch` | Search queries (built-in) | Yes |
+| `Task` | Spawn research subagents | Yes |
+| `firecrawl-mcp:firecrawl_scrape` | Scrape full-page content (preferred) | No |
+| `WebFetch` | Fetch page content (built-in fallback) | Fallback |
+

"findings": [
{
"severity": "high|medium|low",
"confidence": 90,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find all agent and pipeline files to inspect severity definitions
echo "=== Repository structure ==="
fd -e md . agents/ skills/ 2>/dev/null | head -20

echo ""
echo "=== Checking for severity field definitions in agents/ ==="
fd -e md . agents/ 2>/dev/null --exec grep -l "severity" {} \;

echo ""
echo "=== Checking for severity enum patterns in reviewer agents ==="
fd -e md . agents/ 2>/dev/null -exec grep -A 2 -B 2 "severity" {} + 2>/dev/null | head -50

echo ""
echo "=== Checking pipeline SKILL.md for severity references ==="
find . -name "SKILL.md" -path "*/code-review-pipeline*" 2>/dev/null | head -5

Repository: obra/superpowers

Length of output: 1274


🏁 Script executed:

#!/bin/bash
# Read tech-practices-reviewer.md around line 43 to see the severity enum
echo "=== tech-practices-reviewer.md (severity context) ==="
grep -n "severity" agents/tech-practices-reviewer.md -A 1 -B 1

echo ""
echo "=== architecture-reviewer.md (for comparison) ==="
grep -n "severity" agents/architecture-reviewer.md -A 1 -B 1

echo ""
echo "=== Full output schema section in tech-practices-reviewer.md ==="
sed -n '/## Output/,/^## /p' agents/tech-practices-reviewer.md | head -60

echo ""
echo "=== Pipeline SKILL.md severity expectations (lines 80-110) ==="
sed -n '80,110p' skills/code-review-pipeline/SKILL.md

Repository: obra/superpowers

Length of output: 2028


🏁 Script executed:

#!/bin/bash
# Check ALL reviewer agents for severity definitions
echo "=== All agent severity definitions ==="
for file in agents/*.md; do
  echo "--- $file ---"
  grep -A 1 '"severity"' "$file" || echo "  (no severity field)"
done

echo ""
echo "=== Verify pipeline uses all four severity levels ==="
grep -i "critical\|high\|medium\|low" skills/code-review-pipeline/SKILL.md | grep -E "^\s*-\s" | head -10

Repository: obra/superpowers

Length of output: 1104


Severity enums are inconsistent across reviewer agents — some support critical, others don't.

The tech-practices-reviewer.md defines "severity": "high|medium|low", but the code-review-pipeline SKILL.md expects findings grouped into four tiers: Critical, High, Medium, and Low. However, this inconsistency is worse than initially stated:

  • With critical: implementation-reviewer.md, ui-reviewer.md
  • Without critical: architecture-reviewer.md, tech-practices-reviewer.md, test-reviewer.md

Only 2 of 5 reviewer agents support critical-level findings. This means the pipeline's Critical tier will be sparsely populated and dependent on which agents are invoked, creating unpredictable behavior. Either standardize all agents to include critical in the severity enum, or remove the Critical tier from the pipeline.

🤖 Prompt for AI Agents
In `@agents/tech-practices-reviewer.md` at line 43, Update the severity enum usage
so all reviewer agents and the pipeline agree: either add "critical" to the
severity field in reviewer configs (e.g., update "severity": "high|medium|low"
in tech-practices-reviewer.md, architecture-reviewer.md, test-reviewer.md to
"critical|high|medium|low") and ensure code that emits findings
(implementation-reviewer, ui-reviewer, etc.) uses the same enum, or remove the
Critical tier from the code-review-pipeline SKILL.md and any grouping logic;
choose one approach and apply it consistently across the unique symbols:
severity fields in tech-practices-reviewer.md, architecture-reviewer.md,
test-reviewer.md, implementation-reviewer.md, ui-reviewer.md and the grouping
logic in code-review-pipeline SKILL.md so all files share the same set of
severity values.

Comment on lines +61 to +71
if command -v eslint >/dev/null 2>&1 && [[ -f "$project_root/.eslintrc" || -f "$project_root/.eslintrc.js" || -f "$project_root/.eslintrc.json" || -f "$project_root/eslint.config.js" || -f "$project_root/eslint.config.mjs" ]]; then
local staged_files
staged_files=$(git diff --cached --name-only --diff-filter=ACMR | grep -E '\.(ts|js|tsx|jsx)$' || true)
if [[ -n "$staged_files" ]]; then
local output
if ! output=$(cd "$project_root" && echo "$staged_files" | xargs eslint 2>&1); then
errors+="ESLint failed:\n$output\n\n"
return 1
fi
fi
return 0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Filenames with spaces will break xargs splitting, and ESLint flat config .ts variant is missing.

echo "$staged_files" | xargs eslint splits on whitespace, so filenames containing spaces would be misinterpreted. Also, ESLint 9+ supports eslint.config.ts which isn't checked.

Proposed fix
-    if command -v eslint >/dev/null 2>&1 && [[ -f "$project_root/.eslintrc" || -f "$project_root/.eslintrc.js" || -f "$project_root/.eslintrc.json" || -f "$project_root/eslint.config.js" || -f "$project_root/eslint.config.mjs" ]]; then
+    if command -v eslint >/dev/null 2>&1 && [[ -f "$project_root/.eslintrc" || -f "$project_root/.eslintrc.js" || -f "$project_root/.eslintrc.json" || -f "$project_root/eslint.config.js" || -f "$project_root/eslint.config.mjs" || -f "$project_root/eslint.config.ts" ]]; then
         local staged_files
         staged_files=$(git diff --cached --name-only --diff-filter=ACMR | grep -E '\.(ts|js|tsx|jsx)$' || true)
         if [[ -n "$staged_files" ]]; then
             local output
-            if ! output=$(cd "$project_root" && echo "$staged_files" | xargs eslint 2>&1); then
+            if ! output=$(cd "$project_root" && echo "$staged_files" | xargs -I{} eslint {} 2>&1); then
                 errors+="ESLint failed:\n$output\n\n"

The same xargs issue applies to the ruff (line 79) and pyright (line 119) invocations.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if command -v eslint >/dev/null 2>&1 && [[ -f "$project_root/.eslintrc" || -f "$project_root/.eslintrc.js" || -f "$project_root/.eslintrc.json" || -f "$project_root/eslint.config.js" || -f "$project_root/eslint.config.mjs" ]]; then
local staged_files
staged_files=$(git diff --cached --name-only --diff-filter=ACMR | grep -E '\.(ts|js|tsx|jsx)$' || true)
if [[ -n "$staged_files" ]]; then
local output
if ! output=$(cd "$project_root" && echo "$staged_files" | xargs eslint 2>&1); then
errors+="ESLint failed:\n$output\n\n"
return 1
fi
fi
return 0
if command -v eslint >/dev/null 2>&1 && [[ -f "$project_root/.eslintrc" || -f "$project_root/.eslintrc.js" || -f "$project_root/.eslintrc.json" || -f "$project_root/eslint.config.js" || -f "$project_root/eslint.config.mjs" || -f "$project_root/eslint.config.ts" ]]; then
local staged_files
staged_files=$(git diff --cached --name-only --diff-filter=ACMR | grep -E '\.(ts|js|tsx|jsx)$' || true)
if [[ -n "$staged_files" ]]; then
local output
if ! output=$(cd "$project_root" && echo "$staged_files" | xargs -I{} eslint {} 2>&1); then
errors+="ESLint failed:\n$output\n\n"
return 1
fi
fi
return 0
🤖 Prompt for AI Agents
In `@hooks/pre-commit-quality-gate.sh` around lines 61 - 71, The current logic
collects staged_files and pipes them through plain xargs which breaks on
filenames with spaces and also misses ESLint's TypeScript flat config; change
the git diff invocation to produce NUL-delimited output (use git ... -z
--name-only --diff-filter=ACMR) and consume it with xargs -0 when calling
eslint/ruff/pyright so filenames with spaces are preserved; also include
eslint.config.ts in the config file existence checks (alongside .eslintrc,
.eslintrc.js, .eslintrc.json, eslint.config.js, eslint.config.mjs) and apply the
same -z / xargs -0 pattern to the ruff and pyright sections (refer to the
staged_files variable and the eslint/ruff/pyright command invocations and output
handling).

Comment on lines +140 to +148
# Run checks
run_lint
run_typecheck

if [[ -n "$errors" ]]; then
# Block the commit
echo "$errors" >&2
exit 2
fi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

set -e causes premature exit — lint failures kill the script before typecheck runs, with wrong exit code.

With set -euo pipefail (line 7), when run_lint returns 1 on a lint failure, the script immediately exits with code 1run_typecheck never executes, the errors check on line 144 is never reached, and the intended exit code 2 is never used. The same applies if run_lint passes but run_typecheck fails.

🐛 Proposed fix: suppress non-zero returns so errors accumulate
 # Run checks
-run_lint
-run_typecheck
+run_lint || true
+run_typecheck || true
 
 if [[ -n "$errors" ]]; then

This allows both checks to run and accumulate their errors in $errors, then the script exits with 2 only if there were failures.

🤖 Prompt for AI Agents
In `@hooks/pre-commit-quality-gate.sh` around lines 140 - 148, The script
currently uses set -e which makes run_lint or run_typecheck abort the script
immediately on non-zero exit, preventing both checks from running and preventing
the intended final exit code handling; modify the calls to run_lint and
run_typecheck so their failures are suppressed and captured (e.g. run them with
a construct that prevents immediate exit and captures their exit status) and
append any error output or status into the existing errors variable, then let
the subsequent if [[ -n "$errors" ]] block decide to echo and exit 2;
specifically update the invocations of run_lint and run_typecheck and their
handling so they do not trigger set -e but instead record failures into errors.

Comment on lines +12 to +13
# Read hook input from stdin
HOOK_INPUT=$(cat)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

HOOK_INPUT is read but never used.

Static analysis (SC2034) confirms this. Either remove it or, if you intend to use it later, prefix with _ to signal intentional discard.

Proposed fix
-# Read hook input from stdin
-HOOK_INPUT=$(cat)
+# Consume hook input from stdin (not used by this hook)
+cat > /dev/null
🧰 Tools
🪛 Shellcheck (0.11.0)

[warning] 13-13: HOOK_INPUT appears unused. Verify use (or export if used externally).

(SC2034)

🤖 Prompt for AI Agents
In `@hooks/research-stop-hook.sh` around lines 12 - 13, The script currently
assigns HOOK_INPUT=$(cat) but never uses HOOK_INPUT; remove this unused
assignment or rename it to _HOOK_INPUT to indicate intentional discard and
silence SC2034; locate the assignment of HOOK_INPUT in
hooks/research-stop-hook.sh (the HOOK_INPUT variable) and either delete that
line or change the variable name to _HOOK_INPUT if the value must be consumed
for side effects.

Comment on lines +196 to +201
if [[ "$current_phase" == "CANCELLED" ]]; then
# Generate cancellation report and allow exit
local report
report=$(generate_report "$state_file" "$findings_file" "cancelled")
echo "$report"
exit 0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, find and list the hooks directory
find . -type f -name "*hook*" | head -20

Repository: obra/superpowers

Length of output: 191


🏁 Script executed:

# Check the structure of the hooks directory
ls -la hooks/

Repository: obra/superpowers

Length of output: 584


🏁 Script executed:

# Read the research-stop-hook.sh file to see the lines in question
cat -n hooks/research-stop-hook.sh | sed -n '190,260p'

Repository: obra/superpowers

Length of output: 2893


🏁 Script executed:

# Read the review-nudge-hook.sh file to understand the reference
cat -n hooks/review-nudge-hook.sh

Repository: obra/superpowers

Length of output: 1614


🏁 Script executed:

# Search for hookSpecificOutput and decision patterns in all shell scripts
rg -n 'hookSpecificOutput|"decision"' --type=sh

Repository: obra/superpowers

Length of output: 224


Fix inconsistent output format: use structured JSON for all hook outputs.

Lines 199–200 and 228–229 output plain text via echo "$report" for cancelled and complete statuses, while lines 253–259 output structured JSON with "decision": "block" for the blocked status. This inconsistency conflicts with the hook system's expectations—other hooks in the repository (review-nudge-hook.sh, session-start.sh) consistently use JSON structures with hookSpecificOutput. The plain text outputs may be silently ignored or cause parse errors.

🤖 Prompt for AI Agents
In `@hooks/research-stop-hook.sh` around lines 196 - 201, The cancelled/complete
branches currently echo raw text from generate_report which breaks consumers;
instead wrap the report into the hook JSON shape used elsewhere. Update the
branches handling current_phase == "CANCELLED" and "COMPLETE" to emit a single
JSON object like {"hookSpecificOutput": <report>} (ensuring <report> is valid
JSON or properly escaped), e.g. capture report=$(generate_report ...) and then
printf '{"hookSpecificOutput": %s}\n' "$report" (or use jq to build the object)
before exiting; keep function/name references generate_report and current_phase
so you modify the same code paths.

Comment on lines +79 to +91
<phase name="AGGREGATE">
1. Collect JSON responses from all reviewers
2. Parse each response (if malformed, skip with warning)
3. **Filter:** Remove findings with `confidence < 80`
4. **Deduplicate:** If multiple reviewers flag the same file:line, keep the higher-confidence finding
5. **Group by severity:**
- **Critical** — Must fix before proceeding
- **High** — Should fix now
- **Medium** — Suggestions worth considering
- **Low** — Minor improvements

6. **Compile missing tests** list from all reviewers
</phase>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

critical severity is referenced in AGGREGATE/ACT but no reviewer agent produces it.

Lines 85–88 define four severity tiers including "Critical — Must fix before proceeding", and lines 96–100/112–113 in the ACT phase handle critical findings with inline fixes. However, all specialist reviewer agents (architecture, implementation, tech-practices, test, UI) define their severity enum as "high|medium|low" — none include critical.

This means the Critical tier will always be empty, and the most severe findings will only ever be classified as high. Either:

  1. Add critical to each reviewer agent's severity enum, or
  2. Collapse Critical and High into a single tier in the pipeline.
🤖 Prompt for AI Agents
In `@skills/code-review-pipeline/SKILL.md` around lines 79 - 91, The AGGREGATE/ACT
pipeline references a "Critical" severity but none of the reviewer agents
(architecture reviewer, implementation reviewer, tech-practices reviewer, test
reviewer, UI reviewer) produce it because their severity enums only include
"high|medium|low"; update those reviewer agents' severity enum definitions to
include "critical" (so findings can be promoted to AGGREGATE's Critical tier)
and ensure any place branching on severity (e.g., ACT handling logic) accepts
"critical"; alternatively, if you prefer one change, collapse the pipeline's
"Critical" tier into "High" in the AGGREGATE and ACT phases so the existing
enums remain valid—choose one approach and apply consistently across the
reviewer agent enums and AGGREGATE/ACT logic.

|------|---------|----------|
| `WebSearch` | Search queries (built-in) | Yes |
| `Task` | Spawn research subagents | Yes |
| `firecrawl-mcp:firecrawl_scrape` | Scrape full page content (preferred) | No |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Hyphenate the compound adjective “full-page”.

LanguageTool flags this as a compound adjective before a noun.

Suggested fix
-| `firecrawl-mcp:firecrawl_scrape` | Scrape full page content (preferred) | No |
+| `firecrawl-mcp:firecrawl_scrape` | Scrape full-page content (preferred) | No |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| `firecrawl-mcp:firecrawl_scrape` | Scrape full page content (preferred) | No |
| `firecrawl-mcp:firecrawl_scrape` | Scrape full-page content (preferred) | No |
🧰 Tools
🪛 LanguageTool

[uncategorized] ~62-~62: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...irecrawl-mcp:firecrawl_scrape| Scrape full page content (preferred) | No | |WebFetch`...

(EN_COMPOUND_ADJECTIVE_INTERNAL)

🤖 Prompt for AI Agents
In `@skills/research/SKILL.md` at line 62, Update the table entry that currently
reads "Scrape full page content (preferred)" to use the hyphenated compound
adjective "full-page" so it reads "Scrape full-page content (preferred)"; locate
the row containing the `firecrawl-mcp:firecrawl_scrape` identifier in SKILL.md
and replace the phrase accordingly.

Comment on lines +73 to +75
```
INIT → DECOMPOSE → RESEARCH → EVALUATE → [RESEARCH or SYNTHESIZE] → DONE
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Specify a language for the fenced code block.

markdownlint (MD040) requires a language on fenced code blocks.

Suggested fix
-```
+```text
 INIT → DECOMPOSE → RESEARCH → EVALUATE → [RESEARCH or SYNTHESIZE] → DONE
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🧰 Tools
🪛 markdownlint-cli2 (0.20.0)

[warning] 73-73: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In `@skills/research/SKILL.md` around lines 73 - 75, Add a language identifier to
the fenced code block containing "INIT → DECOMPOSE → RESEARCH → EVALUATE →
[RESEARCH or SYNTHESIZE] → DONE" in SKILL.md to satisfy markdownlint MD040;
change the opening fence from ``` to ```text so the block reads with a language
tag (e.g., use ```text).

Comment on lines +372 to +380
<error_handling>
| Error | Action |
|-------|--------|
| Malformed JSON | Retry once, then mark low confidence |
| Scrape fails | Continue with other URLs |
| Rate limit | Wait 60s, reduce batch to 2 |
| No results | Mark low confidence, rephrase as follow-up |
| Tool not found | Fall back to WebFetch, update state.json |
</error_handling>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix table formatting and add blank lines in error handling.

markdownlint flags missing leading/trailing pipes and missing blank lines around the table.

Suggested fix
 <error_handling>
-| Error | Action |
-|-------|--------|
-| Malformed JSON | Retry once, then mark low confidence |
-| Scrape fails | Continue with other URLs |
-| Rate limit | Wait 60s, reduce batch to 2 |
-| No results | Mark low confidence, rephrase as follow-up |
-| Tool not found | Fall back to WebFetch, update state.json |
+
+| Error | Action |
+|-------|--------|
+| Malformed JSON | Retry once, then mark low confidence |
+| Scrape fails | Continue with other URLs |
+| Rate limit | Wait 60s, reduce batch to 2 |
+| No results | Mark low confidence, rephrase as follow-up |
+| Tool not found | Fall back to WebFetch, update state.json |
+
 </error_handling>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<error_handling>
| Error | Action |
|-------|--------|
| Malformed JSON | Retry once, then mark low confidence |
| Scrape fails | Continue with other URLs |
| Rate limit | Wait 60s, reduce batch to 2 |
| No results | Mark low confidence, rephrase as follow-up |
| Tool not found | Fall back to WebFetch, update state.json |
</error_handling>
<error_handling>
| Error | Action |
|-------|--------|
| Malformed JSON | Retry once, then mark low confidence |
| Scrape fails | Continue with other URLs |
| Rate limit | Wait 60s, reduce batch to 2 |
| No results | Mark low confidence, rephrase as follow-up |
| Tool not found | Fall back to WebFetch, update state.json |
</error_handling>
🧰 Tools
🪛 markdownlint-cli2 (0.20.0)

[warning] 373-373: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


[warning] 380-380: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


[warning] 380-380: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


[warning] 380-380: Table column count
Expected: 2; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)

🤖 Prompt for AI Agents
In `@skills/research/SKILL.md` around lines 372 - 380, The error_handling table in
SKILL.md is missing the required leading/trailing pipes and blank lines around
the table which triggers markdownlint; edit the <error_handling> section to add
a blank line before and after the table and ensure every header and row starts
and ends with a pipe (e.g., "| Error | Action |" and "|-------|--------|", and
each data row "| Malformed JSON | Retry once, then mark low confidence |", etc.)
so the table is properly formatted for markdownlint to pass.

Comment on lines +393 to +404
<red_flags>
STOP if you catch yourself thinking any of these:

| Thought | Reality |
|---------|---------|
| "I have high confidence, I can skip the source target" | The Stop hook will block you. Gather the sources—it's non-negotiable. |
| "This topic is too broad for 8 questions" | Narrow the scope first. Don't start research on vague topics. |
| "I'll just synthesize what I have" | Check `sourcesGathered >= targetSources`. If not met, you cannot proceed. |
| "I don't need to update state.json" | You will lose track. Always read/write state.json. |
| "All sources are equal" | Weight Tier 1 sources higher in synthesis. |
| "I'm stuck, I'll just finish" | Narrow the scope or generate better follow-up questions. The source gate is non-negotiable. |
</red_flags>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix table formatting in red flags.

markdownlint flags missing leading/trailing pipes and column count issues.

Suggested fix
 <red_flags>
 STOP if you catch yourself thinking any of these:
 
-| Thought | Reality |
-|---------|---------|
-| "I have high confidence, I can skip the source target" | The Stop hook will block you. Gather the sources—it's non-negotiable. |
-| "This topic is too broad for 8 questions" | Narrow the scope first. Don't start research on vague topics. |
-| "I'll just synthesize what I have" | Check `sourcesGathered >= targetSources`. If not met, you cannot proceed. |
-| "I don't need to update state.json" | You will lose track. Always read/write state.json. |
-| "All sources are equal" | Weight Tier 1 sources higher in synthesis. |
-| "I'm stuck, I'll just finish" | Narrow the scope or generate better follow-up questions. The source gate is non-negotiable. |
+| Thought | Reality |
+|---------|---------|
+| "I have high confidence, I can skip the source target" | The Stop hook will block you. Gather the sources—it's non-negotiable. |
+| "This topic is too broad for 8 questions" | Narrow the scope first. Don't start research on vague topics. |
+| "I'll just synthesize what I have" | Check `sourcesGathered >= targetSources`. If not met, you cannot proceed. |
+| "I don't need to update state.json" | You will lose track. Always read/write state.json. |
+| "All sources are equal" | Weight Tier 1 sources higher in synthesis. |
+| "I'm stuck, I'll just finish" | Narrow the scope or generate better follow-up questions. The source gate is non-negotiable. |
 </red_flags>
🧰 Tools
🪛 markdownlint-cli2 (0.20.0)

[warning] 404-404: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe

(MD055, table-pipe-style)


[warning] 404-404: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe

(MD055, table-pipe-style)


[warning] 404-404: Table column count
Expected: 2; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)

🤖 Prompt for AI Agents
In `@skills/research/SKILL.md` around lines 393 - 404, The markdown table under
the <red_flags> block (starting with "STOP if you catch yourself thinking any of
these:") has inconsistent pipe usage and mismatched column counts; fix it by
updating the header and every table row to include leading and trailing pipes
and ensure the header separator (the --- row) has the same number of columns as
the header (two columns: "Thought" and "Reality"), e.g., add a leading | and
trailing | to each line and make the separator |---------|---------| match the
columns so markdownlint passes.

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.

4 participants