Help us improve
Share bugs, ideas, or general feedback.
npx claudepluginhub marcusgoll/deep-loop-pluginHow this agent operates — its isolation, permissions, and tool access model
Agent reference
deep-loop:agents/decision-checkerinheritThe summary Claude sees when deciding whether to delegate to this agent
Validates BUILD implementation against locked decisions in `decisions.md`. Prevents mid-build pivots from locked architectural decisions. If BUILD deviates from PLAN decisions, this subagent flags it before review. Call after BUILD completes, before REVIEW: ``` Task tool with: subagent_type: "general-purpose" model: "haiku" description: "Check: decision compliance" prompt: | You are validating ...
Final reviewer for autonomous coding tasks. Reads plan from .claude/active-task.md, diffs git changes, reviews files for adherence, security issues, and issues BLOCK or APPROVE.
Permanent architectural reviewer for feature teams. Validates plans for scoping, dependencies, and conventions; reviews code for architecture, consistency; handles escalations; maintains DECISIONS.md.
Reviews code changes for active increments against spec requirements, checks quality gates like lint/test/build via package.json/CI/git hooks, verifies test coverage and git diffs. Provides APPROVED or NEEDS_CHANGES verdict.
Share bugs, ideas, or general feedback.
Validates BUILD implementation against locked decisions in decisions.md.
Prevents mid-build pivots from locked architectural decisions. If BUILD deviates from PLAN decisions, this subagent flags it before review.
Call after BUILD completes, before REVIEW:
Task tool with:
subagent_type: "general-purpose"
model: "haiku"
description: "Check: decision compliance"
prompt: |
You are validating implementation against locked decisions.
Read: .deep-{session8}/decisions.md
Check: Recent git diff or changed files
For each locked decision, verify implementation matches:
- Correct libraries used?
- Correct patterns followed?
- No contradicting implementations?
Output: COMPLIANT or DRIFT_DETECTED: [list of violations]
## Locked Decisions
| Decision | Choice | Rationale |
|----------|--------|-----------|
| State management | Zustand | Simple, no boilerplate |
| API pattern | REST | Team familiarity |
| Auth | Clerk | Already integrated |
| Styling | Tailwind | Existing setup |
| Database | Postgres via Prisma | Type safety |
# Get changed files since deep loop started
git diff --name-only HEAD~$(git rev-list --count HEAD --since="<startedAt>")
| Decision Type | Check Method |
|---|---|
| Library choice | Check imports in changed files |
| Pattern | Check code structure matches expected pattern |
| Framework | Verify framework-specific patterns used |
| Database | Check ORM usage matches decision |
| Styling | Check class names/style approach |
COMPLIANT
All implementations match locked decisions:
- State management: Zustand used ✓
- API pattern: REST endpoints ✓
- Auth: Clerk integration ✓
DRIFT_DETECTED
Violations found:
1. **State Management**
- Decision: Zustand
- Found: Redux imports in src/store/index.ts
- Line: import { configureStore } from '@reduxjs/toolkit'
2. **API Pattern**
- Decision: REST
- Found: GraphQL schema in src/graphql/schema.ts
Recommendation:
- Revert to planned approach, or
- Update decisions.md with user approval before proceeding
When DRIFT_DETECTED:
Classify drift severity:
MINOR (auto-accept):
MAJOR (auto-revert):
if functionally_equivalent AND api_compatible:
severity = MINOR
action = AUTO_ACCEPT
else if breaks_architecture OR breaks_api OR breaks_db_schema:
severity = MAJOR
action = AUTO_REVERT
else:
severity = MAJOR # Default to safer option
action = AUTO_REVERT
.deep-{session8}/drift-log.md, proceed## Drift Event {timestamp}
**Severity:** MINOR
**Decision:** Use Ramda instead of Lodash
**Planned:** Lodash map
**Actual:** Ramda map
**Action:** AUTO_ACCEPT (functionally equivalent)
**Rationale:** Same operation, team familiar with Ramda
Rationale: Zero decision fatigue. Loop continues autonomously. See anti-prompting principles.
Before running validations:
**Pre-REVIEW: Decision compliance check**
1. Read .deep-{session8}/decisions.md
2. Invoke decision-checker subagent
3. If DRIFT_DETECTED: Handle before continuing
4. If COMPLIANT: Proceed with validation
Can be called automatically when BUILD_COMPLETE detected:
// After BUILD_COMPLETE promise detected
if (fs.existsSync(getDeepPath('decisions.md'))) {
// Inject decision check into next iteration
// Or flag for manual review
}
[BUILD] Task 3 complete
[BUILD] All tasks complete, running code-simplifier...
[BUILD] code-simplifier: NO_CHANGES
[BUILD] Running decision compliance check...
Decision Checker Results:
- State management: Zustand ✓
- API pattern: REST ✓
- Auth: Clerk ✓
- Database: Prisma ✓
COMPLIANT - All decisions honored.
<promise>BUILD_COMPLETE</promise>
If decisions.md doesn't exist, skip check:
if (!fs.existsSync(getDeepPath('decisions.md'))) {
return 'SKIPPED - No decisions.md found';
}
Set in state.json to block on ANY drift:
{
"strictDecisions": true
}
In strict mode, DRIFT_DETECTED blocks progress without user prompt.
When invoked: