From codebrain
Use when checking if implementation matches a plan or spec, after completing code changes, before claiming work is done, or when you need to run build/test/lint checks. Checks EARS acceptance criteria, runs automated checks, detects spec deviations, categorizes issues by severity.
npx claudepluginhub chrsmay/codebrain-plugin --plugin codebrainThis skill uses the workspace's default tool permissions.
Spec compliance and code quality verification. Checks implementation against a plan/spec, runs build/test/lint, detects spec-code divergence, and categorizes issues.
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.
Spec compliance and code quality verification. Checks implementation against a plan/spec, runs build/test/lint, detects spec-code divergence, and categorizes issues.
/codebrain:verify [path-to-spec]
.codebrain/active/plan.mdLoad the spec.
.codebrain/active/plan.md)- [ ] criterionLoad constitution and project config.
.codebrain/memory/constitution.md — check for principle compliancemcp__codebrain__codebrain_config_read to get build/test/lint commandsRun checks in order of speed and cost. Stop early if fast checks fail.
Run these BEFORE spawning any agents. These are deterministic — no LLM needed.
mcp__eslint__eslint_lint on changed files only.npx tsc --noEmit 2>&1 | tail -20 (TypeScript) or ruff check --select E,F . 2>&1 | tail -20 (Python).git diff --name-only HEAD or from the plan's file list.npx jest --findRelatedTests <changed-files> 2>&1 | tail -50pytest <changed-files-dirs> 2>&1 | tail -50Only runs AFTER Tier 1 and Tier 2 complete. The agent receives all Tier 1+2 results as input.
API verification (if spec references API routes or third-party SDKs):
api-researcher agent for official docs verificationSpawn the verifier agent with:
Key principle: The agent does NOT run build/test/lint — those already ran deterministically. The agent ANALYZES the results and checks semantic correctness that tools can't.
[SPEC_DEVIATION] markers with recommendationsHandle failures.
[SPEC_DEVIATION] markers — ask the user:
Persist the report.
mcp__codebrain__codebrain_artifact_write to save to .codebrain/active/verification.mdLinear Sync (when linearSync is enabled):
Read .codebrain/config.json for linearSync, linearProjectId, linearIssueMap.
If Linear sync is active:
a. Post verification report as a Linear comment:
linearIssueMap)create_comment with the verification report in markdown:
## Verification Report — [date]
**Verdict:** PASS / FAIL
**Spec:** [spec file path]
### Automated Checks
| Check | Result |
|-------|--------|
| Build | PASS/FAIL |
| Tests | PASS/FAIL |
| Lint | PASS/FAIL |
### Acceptance Criteria
| # | Criterion | Result | Evidence |
|---|-----------|--------|----------|
| 1 | [criterion] | PASS/FAIL | [file:line] |
### Spec Deviations
[any SPEC_DEVIATION markers]
b. Update issue status:
update_issue to set status to "Done"c. Update spec deviations in Linear:
[SPEC_DEVIATION] that the user chose to accept:
d. Flag unblocked tickets:
list_issues to find related blocked issues and note them in the report# Verification Report
**Verdict:** PASS | FAIL
**Spec:** [path to spec file]
**Date:** [ISO date]
**Constitution:** COMPLIANT | [N] VIOLATIONS
## Automated Checks
| Check | Result | Details |
|-------|--------|---------|
| Build | PASS/FAIL | [output] |
| Tests | PASS/FAIL | [output] |
| Lint (ESLint) | PASS/FAIL | [error count, rule names] |
| Coverage | N% | [files below threshold] |
| Deps (Socket) | SAFE/WARN | [flagged packages] |
| Deps (Sonatype) | SAFE/WARN | [vulnerable versions] |
## Acceptance Criteria (EARS / Given-When-Then)
| # | Criterion | Result | Evidence |
|---|-----------|--------|----------|
| 1 | When POST /users with valid payload, system shall return 201 | PASS | api/users.ts:42 |
| 2 | Given no auth token, When GET /profile, Then return 401 | FAIL | Returns 500 instead |
## Spec Deviations
- [SPEC_DEVIATION] spec:prd.md:23 says "paginated list (20 per page)" but code:api/users.ts:55 returns all records
**Recommendation:** Update code (spec is intentional)
## Constitution Compliance
| Principle | Status | Notes |
|-----------|--------|-------|
| No speculation | OK | |
| Test-first | VIOLATED | Tests written after implementation |
| Existing patterns | OK | Reused existing auth middleware |
## Issues
### Critical
- ...
### Major
- ...
### Minor
- ...