nw-ab-validate-spec (PROCEDURE)
Kind: PROCEDURE | One job: validate an agent spec | One trigger: an existing agent spec must be checked for compliance (standalone, or composed by create/migrate/merge after a write).
This is the SHARED composition target. nw-ab-create-agent, nw-ab-migrate-monolith, and nw-ab-merge-agents all invoke this skill after writing — never re-inline the checklist.
Deterministic step-sequence (run every time, in order)
Run these steps in order:
- Frontmatter — name, description, model, tools, maxTurns, skills present. Gate: all required fields present.
- Line Count —
wc -ltotal under 400; domain knowledge in skills. Gate: count reported, under threshold. - Divergence Only — flag any instruction restating Claude defaults. Gate: zero redundant instructions.
- Least Privilege — tools list contains only what the agent needs; no Write/Edit for reviewers. Gate: no unnecessary tools.
- Safety by construction (GDP-0) — which producer makes the unsafe action unrepresentable? Tool-surface frontmatter fields and typed grammar first; a hook only with a recorded reason, never prose. Gate: zero prose security sections; any hook cites its construction-can't-cover reason.
- Affirmative Phrasing — convert "Don't do Y" to "Do X". Gate: zero negative phrasings.
- Terminology — one term per concept. Gate: consistent terminology.
- Description Quality — description states WHEN to delegate. Gate: trigger condition present.
- Success Criteria Format — criteria are numbered/checkbox list, not prose. Gate: structured.
- Caveman House Style — dry/declarative, tables + compact lists, lean body, deep knowledge in skills. Gate: confirmed.
- Reasoning Mandate Present —
## Reasoning Mandatesection present. Gate: present. - One Job, One Trigger — one job + one trigger per asset; KNOWLEDGE vs PROCEDURE classified; PROCEDURE states trigger + deterministic sequence + composition; zero multi-job parameterized switches; existing command + agent NAMES preserved (no rename/proliferation; new command is the rare
/nw-*exception). Gate: confirmed.
Then run the anti-pattern scan (nw-ab-anti-patterns). Gate: zero anti-patterns.
Composition
- COMPOSES (KNOWLEDGE):
nw-ab-validation-checklist(the 19-item data),nw-ab-anti-patterns,nw-ab-critique-dimensions,nw-agent-testing. - Note: the validator script
scripts/validation/validate_framework_templates.pychecks frontmatter, identity, reviewer write isolation, and declared-skill references.
Success Criteria
- Applicable checklist items run as ordered tasks
- Anti-pattern scan run
- Pass/fail reported per item