From foundry
Review decomposed spec files for ambiguity, missing details, and drift risk
How this skill is triggered — by the user, by Claude, or both
Slash command
/foundry:scrutinizeopusThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Review each decomposed spec file against 7 quality checks. Can run on a single file or an entire decomposed directory. Supports auto-fix mode where failing files are automatically improved and re-checked.
Review each decomposed spec file against 7 quality checks. Can run on a single file or an entire decomposed directory. Supports auto-fix mode where failing files are automatically improved and re-checked.
/scrutinize <path> — path to a single .md file or a decomposed directory
/scrutinize <path> --fix — enable auto-fix loop (max 3 iterations per file)
/scrutinize <path> --fix --master-spec <spec-path> — auto-fix with master spec context
Check if the provided path is a file or directory:
R=$PWD; while [ -n "$R" ] && [ "$R" != / ] && [ ! -d "$R/.claude" ]; do R=${R%/*}; done
"$R/.claude/scripts/scrutinize.sh" detect-mode "$ARGUMENTS"
.md files (excluding manifest.json)Before running the 7 content checks, verify the file has valid structure:
R=$PWD; while [ -n "$R" ] && [ "$R" != / ] && [ ! -d "$R/.claude" ]; do R=${R%/*}; done
"$R/.claude/scripts/scrutinize.sh" check-structure <file-path>
If structural check fails (missing sections, no frontmatter), report those as immediate failures before running content checks.
For each file, evaluate ALL 7 checks independently. Each check is binary pass/fail.
depends_on matches Dependencies section; all upstream files are listeddepends_on array with files mentioned in Dependencies sectionSingle file output:
Scrutiny Report: backend/api-contracts.md
══════════════════════════════════════════
[PASS] 1. File size — 3 user stories, session-scoped
[PASS] 2. Specificity — All requirements have concrete values
[FAIL] 3. Unwritten knowledge — References "UserRole enum" not defined here or in deps
[PASS] 4. Dependencies — Frontmatter matches prose
[FAIL] 5. Interfaces — Missing response schema for POST /users
[PASS] 6. Edge cases — 4 edge cases with expected behaviors
[PASS] 7. Ambiguity — Instructions are unambiguous
Result: FAIL (2 issues)
Issues:
- Check 3: "UserRole enum" referenced but not defined in this file or data/schema.md
- Check 5: POST /users response body shape not specified
Directory output:
Scrutiny Report: docs/specs/auth-decomposed/
═════════════════════════════════════════════
| File | Status | Issues |
|-----------------------------|--------|--------|
| foundation/project-setup.md | PASS | — |
| data/schema.md | PASS | — |
| backend/api-contracts.md | FAIL | 2 |
| backend/business-logic.md | PASS | — |
| frontend/components.md | FAIL | 1 |
| testing/strategy.md | PASS | — |
Summary: 4/6 passed, 2 failed
For each failing file:
--master-spec provided)Update manifest.json scrutiny fields after each iteration:
R=$PWD; while [ -n "$R" ] && [ "$R" != / ] && [ ! -d "$R/.claude" ]; do R=${R%/*}; done
"$R/.claude/scripts/scrutinize.sh" update-manifest <output-dir> <domain/file> <status> <iteration> <failures-json>
Auto-Fix Report: docs/specs/auth-decomposed/
══════════════════════════════════════════════
| File | Before | After | Iterations |
|-----------------------------|--------|-------|------------|
| backend/api-contracts.md | FAIL | PASS | 2 |
| frontend/components.md | FAIL | STUCK | 3 |
Fixed: 1 file
Stuck: 1 file (frontend/components.md)
Stuck file issues:
frontend/components.md:
- Check 7: Ambiguous component naming convention — needs human decision
npx claudepluginhub alphabravocompany/codsworth-marketplace --plugin foundryReviews spec.md files for completeness, clarity, implementability, testability, and structure. Identifies ambiguities, gaps, and missing sections before implementation.
Reviews PRDs and specs for completeness, ambiguities, edge cases, acceptance criteria quality. Structures findings by severity and offers direct fixes.
Analyzes specs and plans for soundness before sign-off. Auto-fixes inferrable issues and surfaces design decisions for review.