From vsdd-factory
Reviews AGENTS.md files for compliance with Dark Factory agent design principles. Checks token budget, contradictions, negative examples, FACTORY.md duplication, tool profile mismatches, and structural compliance with the canonical template.
How this skill is triggered — by the user, by Claude, or both
Slash command
/vsdd-factory:agent-file-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- `agents/*/AGENTS.md` files exist for the target agent(s)
agents/*/AGENTS.md files exist for the target agent(s)openclaw.json exists at repo root for tool profile verificationFACTORY.md exists at repo root (needed for duplication checks)openclaw.json for tool profile verificationRun ALL checks below. Report each as PASS / WARN / FAIL with specific findings.
Count words in the AGENTS.md file. Research shows compliance degrades significantly above ~4,000 tokens (~3,500 words).
wc -w <agents-md-path>
First line must contain:
> **Global Operating Rules:** Read `../../FACTORY.md`
Check that constraint keywords (NEVER, MUST NOT, ALWAYS, CANNOT) appear in the first 20% of the file. Primacy effect: first 20% gets 15-25% higher compliance.
The last section should restate the agent's most critical constraint. Look for a "Remember" section or equivalent at the end of the file.
Search for code blocks preceded by "WRONG", "incorrect", "bad", "don't do this". LLMs attend to code structure, not labels — negative examples teach the wrong pattern.
grep -B2 '```' <file> | grep -i 'wrong\|incorrect\|bad example\|don.t do'
Search for specific model names that should be engine config, not agent knowledge:
Exception: if the model name is in the context of "you provide cognitive diversity" without naming the specific model, that's acceptable.
Search for phase-specific references like "Phase 1d", "Phase 4", "during Phase 3" that indicate the agent knows its position in the pipeline. Station isolation principle: agents should know their inputs/outputs, not their pipeline position.
Exception: the orchestrator AGENTS.md IS allowed pipeline position knowledge. Exception: brief references like "the orchestrator spawns you" are acceptable.
Read the agent's tool profile from openclaw.json and compare to the
"Tool Restrictions" or "Tool Access" section in AGENTS.md.
Common mismatches:
Scan for sections that contradict each other:
Check if the AGENTS.md repeats rules that are already in FACTORY.md. Common duplications:
The agent should reference FACTORY.md, not repeat it.
Check for the presence of input/output/success-criteria sections:
Check for escalation/failure handling:
Check for DF-021 context discipline:
For agents that should have information walls (adversary, holdout-evaluator, code-reviewer, spec-reviewer), check that the wall is documented.
Most agents receive work from the orchestrator and don't spawn sub-agents. Only coordinator agents (orchestrator, pr-manager) should contain Agent tool dispatch references.
Exception: agents that legitimately delegate (e.g., pr-manager spawning github-ops, research-agent delegating to sub-agents) may have Agent tool references.
Use ${CLAUDE_PLUGIN_ROOT}/templates/agent-file-review-template.md for the agent file review report format.
# Agent File Review: [agent-name]
**File:** [path]
**Words:** [count] ([PASS/WARN/FAIL])
**Overall:** [PASS / WARN / FAIL] ([N] issues found)
## Results
| # | Check | Result | Details |
|---|-------|--------|---------|
| 1 | Token budget | PASS | 594 words |
| 2 | Global header | PASS | Present |
| 3 | Constraints in first 20% | WARN | No NEVER/ALWAYS in first 20 lines |
| ... | ... | ... | ... |
## Recommendations
1. [Specific actionable recommendation]
2. [Specific actionable recommendation]
When reviewing all agents, produce a summary table:
# Agent File Review — Batch Summary
| Agent | Words | FAIL | WARN | PASS | Top Issue |
|-------|-------|------|------|------|-----------|
| orchestrator | 1,057 | 0 | 1 | 14 | — |
| adversary | 2,731 | 1 | 2 | 12 | Model names |
| ... | ... | ... | ... | ... | ... |
**Agents needing attention (sorted by FAIL count):**
1. [agent] — [N] FAILs: [list]
2. [agent] — [N] FAILs: [list]
npx claudepluginhub drbothen/claude-mp --plugin vsdd-factoryProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.