Skip to content

feat: add planning skills, reviewer agent, Linear MCP#20

Merged
rivodotlove merged 2 commits into
mainfrom
feat/planning-skills
Jun 3, 2026
Merged

feat: add planning skills, reviewer agent, Linear MCP#20
rivodotlove merged 2 commits into
mainfrom
feat/planning-skills

Conversation

@rivodotlove

@rivodotlove rivodotlove commented Jun 3, 2026

Copy link
Copy Markdown
Owner

What

Adds a plan→build pipeline as Claude Code project tooling.

  • write-plan skill — turns an issue URL (Linear/Jira/GitHub) into a self-contained two-section HTML plan: a human-readable section (current/proposed Mermaid diagrams + before-after screenshots) and a machine-consumed implementation section, then spawns a reviewer for gaps. Includes template.html.
  • implement-plan skill — executes the implementation section between the IMPLEMENT-PLAN markers, folds in the reviewer's blocker/major gaps, writes/updates e2e tests, then runs vp check + vp test and /simplify.
  • plan-reviewer agent — Opus, read-only, adversarial gap-finding; verifies file/dep/API claims against the real codebase.
  • .mcp.json — Linear MCP server (https://mcp.linear.app/mcp) so issues are fetched directly instead of via brittle WebFetch.

Why

Standardizes how issues become reviewed plans and then real changes, with the review step catching gaps before code is written.

Scope

Tooling only — .claude/agents, .claude/skills/{write-plan,implement-plan}, .mcp.json. No app/source changes.

Verification

Exercised end-to-end this session: fetched RIV-5 via Linear MCP, generated + reviewed a plan, implemented it on a separate branch. Pre-commit vp check --fix passed.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Added comprehensive skill docs for creating, reviewing, and implementing “write-plan” workflows, including a strict reviewer output format and guidance for merging reviewer gaps into tasks.
    • Added a dark-themed plan HTML template with navigation, diagram support, implementation sections, and reviewer note placeholders.
  • Chores

    • Configured an MCP server integration for improved issue-tracking connectivity.

Introduce a plan→build pipeline as Claude Code tooling:

- write-plan: turns an issue (Linear/Jira/GitHub) into a two-section
  HTML plan — human-readable (diagrams + before/after screenshots) and
  a machine-consumed implementation section — then has a subagent review
  it for gaps.
- implement-plan: executes that implementation section, folding in the
  reviewer's blocker/major gaps, writing e2e tests, then running
  vp check + vp test and /simplify.
- plan-reviewer agent: Opus, read-only, adversarial gap-finding used by
  write-plan.
- .mcp.json: Linear MCP server so issues are fetched directly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rivodotlove rivodotlove self-assigned this Jun 3, 2026
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: fbdaa597-e709-42a4-9164-2847c411174a

📥 Commits

Reviewing files that changed from the base of the PR and between 287bd32 and d73aede.

📒 Files selected for processing (1)
  • .claude/skills/implement-plan/SKILL.md
✅ Files skipped from review due to trivial changes (1)
  • .claude/skills/implement-plan/SKILL.md

📝 Walkthrough

Walkthrough

This PR adds a write-plan skill and HTML template to generate issue-based implementation plans, a plan-reviewer agent prompt to adversarially validate those plans, an implement-plan skill to execute tracked tasks with verification, and a .mcp.json entry registering a Linear MCP server.

Changes

Issue-Driven Plan and Implementation Workflow

Layer / File(s) Summary
Plan Reviewer Agent
.claude/agents/plan-reviewer.md
Agent prompt that verifies file paths, imports, dependencies, APIs/config keys against the repo, reports gaps using [BLOCKER]/[MAJOR]/[MINOR], and emits a single VERDICT: ship or VERDICT: fix-first.
Plan Template Structure
.claude/skills/write-plan/template.html
Dark-themed HTML template with sticky navigation, Section 1 for human-facing plan (summary, current/proposed Mermaid diagrams, optional UI comparison), and Section 2 marked for /implement-plan consumption containing repeatable Task blocks and reviewer gaps markup.
Write-Plan Skill: Issue-to-Plan Generation
.claude/skills/write-plan/SKILL.md
Skill that resolves an issue URL (prefer MCP), explores the codebase for affected files, captures screenshots when possible, generates current/proposed diagrams, fills the plan template with exact file paths and implementation tasks, and invokes the plan-reviewer subagent to validate the plan.
Implement-Plan Skill: Task Execution and Verification
.claude/skills/implement-plan/SKILL.md
Skill that resolves a plan file, parses IMPLEMENT-PLAN markers into dependency-ordered tracked tasks, folds reviewer [BLOCKER]/[MAJOR] gaps into implementation tasks, creates module-focused e2e tests, runs vp check, vp test, and e2e, applies /simplify, and produces a final report with real command output.
Linear MCP Server Configuration
.mcp.json
Adds mcpServers.linear HTTP configuration pointing to https://mcp.linear.app/mcp for MCP-based issue fetching.

Sequence Diagrams

sequenceDiagram
  participant User
  participant WritePlan
  participant Codebase as Codebase Explorer
  participant PlanReviewer
  participant User2 as User (Report)
  
  User->>WritePlan: /write-plan <issue-url>
  WritePlan->>WritePlan: Resolve issue provider and fetch issue
  WritePlan->>Codebase: Identify affected routes/components/stores
  WritePlan->>WritePlan: Capture current/proposed screenshots via Playwright
  WritePlan->>WritePlan: Generate Mermaid diagrams (current/proposed)
  WritePlan->>WritePlan: Fill HTML template with plan and implementation sections
  WritePlan->>PlanReviewer: Validate plan file and issue summary
  PlanReviewer->>PlanReviewer: Verify file paths and dependencies
  PlanReviewer->>PlanReviewer: Check APIs, tokens, config keys
  PlanReviewer->>PlanReviewer: Identify gaps and edge cases
  PlanReviewer-->>WritePlan: VERDICT: ship | fix-first
  WritePlan->>User2: Print plan path and reviewer verdict
Loading
sequenceDiagram
  participant Agent
  participant Plan as Plan Parser
  participant TaskExecutor
  participant E2E
  participant Verify as Verification
  participant Report
  
  Agent->>Plan: Resolve plan file (path/issue-id/newest)
  Plan->>Plan: Parse implementation tasks from markers
  Plan->>Plan: Read reviewer gaps verdict
  Plan->>Plan: Fold BLOCKER/MAJOR/MINOR gaps into tasks
  Plan->>TaskExecutor: Build tracked task list in dependency order
  TaskExecutor->>Agent: Execute tasks on current branch
  Agent->>E2E: Create/update e2e specs per module and acceptance criteria
  E2E->>E2E: Conditional harness setup if needed
  Agent->>Verify: Run vp check, vp test, and e2e
  Verify->>Verify: Fix failures introduced by changes
  Agent->>Agent: Apply /simplify post-implementation cleanup
  Agent->>Verify: Re-run vp check, vp test, and e2e
  Agent->>Report: Generate final report with files, gaps, e2e updates, and real outputs
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hop from issue to tidy plan,
I sketch the paths where code will span.
Reviewer eyes catch what may slip,
Executors run — then polish and zip.
A carrot for tests, and off we land!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately captures the main additions: planning skills (write-plan and implement-plan), a reviewer agent, and Linear MCP configuration. It is concise, clear, and directly reflects the core changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/planning-skills

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 3, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
devbox d73aede Commit Preview URL

Branch Preview URL
Jun 03 2026, 04:58 PM

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
.claude/skills/write-plan/SKILL.md (2)

66-66: ⚡ Quick win

Add instruction to check if dev server is already running before starting.

Line 66 says "Ensure the dev server is up (vp dev; reuse it if already running)" but doesn't explain how to check. The Notes section (line 136) mentions preferring to reuse, but the procedure should include explicit instructions to check for a running server (e.g., via process list or port check) before spawning a new one.

📝 Suggested addition
 If the change affects a visible screen AND the app can run:

 1. Identify the affected route/page.
-2. Ensure the dev server is up (`vp dev`; reuse it if already running).
+2. Check if the dev server is already running (e.g., `lsof -i :5173` or check process list).
+   If not running, start it with `vp dev` and wait for ready signal. If already running, reuse it.
 3. Use the **playwright** MCP: `browser_navigate` to the route, then
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/write-plan/SKILL.md at line 66, Update the step that says
"Ensure the dev server is up (`vp dev`; reuse it if already running)" to include
a concrete check before starting: instruct the user to test the known dev-server
port (e.g., with curl or netstat/ss) or look for the running process (e.g.,
ps/pgrep for the vp dev command) and only run `vp dev` if the port is not
responding or the process is absent; reference the exact text "vp dev" and the
dev-server port check so readers know what to probe and to prefer reusing an
existing instance.

29-53: 💤 Low value

Consider handling the case where all fetch methods fail.

While the fallback chain is comprehensive (MCP → CLI → paste), there's no explicit instruction for what to do if the user doesn't paste the issue text when asked. Consider adding a note to handle this gracefully (e.g., abort with a clear message).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/write-plan/SKILL.md around lines 29 - 53, Add explicit
handling for the case where every fetch method (mcp__linear__get_issue +
mcp__linear__list_comments, gh issue view, mcp__atlassian__getJiraIssue and CLI
fallbacks) fails and the user declines to paste the issue: detect this terminal
failure after the fallback chain and abort with a clear user-facing message
instructing next steps (e.g., run /mcp to authenticate MCP servers, re-run gh
issue view, or paste title+description); ensure the code path (where you call
ToolSearch/select:mcp__linear__get_issue and the subsequent MCP/CLI/paste
fallback logic) returns an error/terminates instead of creating a plan file
(.claude/plans/<issue-id>-<slug>.html) with missing content.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/skills/implement-plan/SKILL.md:
- Around line 55-73: Update the misleading paragraph under "5. Write / update
e2e tests for the module" that claims "current state of this repo — `e2e/` is
empty, no Playwright dep, no `browser` test config": replace it with text that
acknowledges an existing Playwright harness (detectable via
playwright.config.ts) and an existing e2e spec (e2e/base64.e2e.ts), and change
the guidance so implementers should extend the existing Playwright tests rather
than setting up a new Vitest browser harness; ensure references to creating a
Vitest harness (the "If no e2e harness exists yet" block) are removed or
conditional only if no playwright.config.ts and no e2e/*.e2e.ts files are
present.

---

Nitpick comments:
In @.claude/skills/write-plan/SKILL.md:
- Line 66: Update the step that says "Ensure the dev server is up (`vp dev`;
reuse it if already running)" to include a concrete check before starting:
instruct the user to test the known dev-server port (e.g., with curl or
netstat/ss) or look for the running process (e.g., ps/pgrep for the vp dev
command) and only run `vp dev` if the port is not responding or the process is
absent; reference the exact text "vp dev" and the dev-server port check so
readers know what to probe and to prefer reusing an existing instance.
- Around line 29-53: Add explicit handling for the case where every fetch method
(mcp__linear__get_issue + mcp__linear__list_comments, gh issue view,
mcp__atlassian__getJiraIssue and CLI fallbacks) fails and the user declines to
paste the issue: detect this terminal failure after the fallback chain and abort
with a clear user-facing message instructing next steps (e.g., run /mcp to
authenticate MCP servers, re-run gh issue view, or paste title+description);
ensure the code path (where you call ToolSearch/select:mcp__linear__get_issue
and the subsequent MCP/CLI/paste fallback logic) returns an error/terminates
instead of creating a plan file (.claude/plans/<issue-id>-<slug>.html) with
missing content.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 143fc7d0-df1f-4b62-8f47-6cdb2c1f7409

📥 Commits

Reviewing files that changed from the base of the PR and between e8cc0cb and 287bd32.

📒 Files selected for processing (5)
  • .claude/agents/plan-reviewer.md
  • .claude/skills/implement-plan/SKILL.md
  • .claude/skills/write-plan/SKILL.md
  • .claude/skills/write-plan/template.html
  • .mcp.json

Comment thread .claude/skills/implement-plan/SKILL.md
#19 added Playwright, so the skill's "no e2e harness exists" branch was
false and would mislead the agent into setting up a duplicate Vitest
harness. Make Playwright the established path; keep no-harness as a
generic future fallback. (CodeRabbit, PR #20)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rivodotlove rivodotlove merged commit 494fe24 into main Jun 3, 2026
2 checks passed
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