From codebrain
Use when implementing a feature, fixing a bug, refactoring, or making any code change. Generates a structured plan with EARS criteria and [NEEDS CLARIFICATION] markers, executes it, then auto-verifies with spec reconciliation. The core Plan → Execute → Verify loop.
npx claudepluginhub chrsmay/codebrain-plugin --plugin codebrainThis skill uses the workspace's default tool permissions.
Single-task implementation planning with automatic verification. The core Plan → Execute → Verify workflow.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Single-task implementation planning with automatic verification. The core Plan → Execute → Verify workflow.
/codebrain:plan <task description>
Read .codebrain/config.json for linearSync, linearProjectId, and linearIssueMap.
If linearSync is "required" or "optional" (with Linear available):
Identify the Linear issue for this task:
linearIssueMap to get the Linear issue IDget_issue with the issue ID to load:
list_comments to load:
[NEEDS CLARIFICATION] resolutions posted as commentsUpdate Linear status:
update_issue to set status to "In Progress"Load the PRD from Linear (not local cache):
list_documents for the project to find the PRD documentget_document to read the latest PRDAll context is assembled BEFORE any agent is spawned. The skill itself (not the agent) gathers everything deterministically. The agent receives a pre-assembled context package and focuses purely on planning — no discovery.
Tools to use in this phase: codebrain MCP (memory, config), codebase-memory MCP (architecture, search), Linear MCP (issue details). NO agentic tools.
mcp__codebrain__codebrain_memory_read with file: "all" to load project memory..codebrain/memory/constitution.md is non-negotiable.mcp__codebrain__codebrain_config_read to get project settings..codebrain/memory/patterns.md — if a similar task was completed before, load that pattern as a starting template for the planner. (Blueprint Reuse — Stripe Minions Pattern 8)If codebase-memory MCP is available (deterministic MCP calls, not agentic):
6. Call mcp__codebase_memory__get_architecture to get the module map.
7. Call mcp__codebase_memory__search_graph with task keywords to find relevant code.
8. Call mcp__codebase_memory__detect_changes to check for recent modifications.
If the task involves API endpoints, SDKs, or third-party integrations:
9. Spawn api-researcher agent with ONLY:
Bundle the context package:
Context package = {
task: user's task description,
constitution: full text,
memory: { continuity, architecture, patterns, known_issues, decisions },
conventions: project conventions file content,
codebase: { architecture_map, relevant_modules, recent_changes },
api_research: (if Phase 1c ran) { official_docs, correct_patterns, version_info },
reusable_pattern: (if found in Step 5) { prior_plan_template },
linear_context: (if Phase 0 ran) { issue_description, comments, status }
}
Spawn the planner agent with the context package and instructions to:
[NEEDS CLARIFICATION] markersReview the plan for [NEEDS CLARIFICATION] markers.
Present the plan to the user for approval.
.codebrain/active/plan.md via mcp__codebrain__codebrain_artifact_write./codebrain:verify .codebrain/active/plan.md to run verification.[SPEC_DEVIATION: plan says X, implementation does Y — reason: Z] markerIf Linear sync is active and this task maps to a Linear issue:
Update issue status:
update_issue to set status to "Done"Post completion comment:
create_comment on the issue with:
## Implementation Complete
**Verification:** PASS/FAIL
**Files changed:** [list of modified files]
**Spec deviations:** [any SPEC_DEVIATION markers and their resolution]
**Key decisions:** [decisions made during implementation]
Executed by codebrain:plan on [date]
Check for unblocked downstream tickets:
mcp__codebrain__codebrain_memory_update for continuity with:
[SPEC_DEVIATION] markers and their resolution[NEEDS CLARIFICATION] blocks execution. Plans with unresolved markers cannot proceed.