/spwf:doc-lintfrom spwf
Cross-cutting — Validate project documentation against governance rules and naming conventions. Supports --fix mode for interactive fixes and --auto-fix for automatic safe fixes. Use when checking docs for naming violations, missing metadata, staleness, or structural issues. Called as a step by /spwf:retrospective (Part 3) and the retrospector agent, which is why Claude may invoke it. Do not start it unprompted: run it standalone only when the user asks.
Ships in spwf. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Validate project documentation against governance rules and naming conventions.
# Report only (no fixes)
/spwf:doc-lint
# Interactive fix mode (asks before each fix)
/spwf:doc-lint --fix
# Automatic fix mode (applies safe fixes without prompting)
/spwf:doc-lint --auto-fix
# Quick validation (naming + metadata + staleness only)
/spwf:doc-lint --quick
# Scoped validation (specific directory)
/spwf:doc-lint docs/deployment/
| Issue Type | Auto-Fix | Interactive Fix |
|---|---|---|
| Naming conventions (kebab-case) | ✅ Yes | ✅ Yes |
| Missing metadata headers | ❌ No | ✅ Yes (asks for values) |
| Missing READMEs | ✅ Yes (template) | ✅ Yes |
| Stale documents | ❌ No | ✅ Yes (archive or update) |
| Banned directories | ❌ No | ✅ Yes (move or delete) |
| Component folder violations | ❌ No | ✅ Yes (rename or move) |
| CLAUDE.md scope | ❌ No | ⚠️ Suggestions only |
You are a documentation linter. Validate the docs/ folder against the canonical rules in docs/documentation-rules.md.
Ensure documentation:
CRITICAL: docs/documentation-rules.md is REQUIRED.
Load order:
docs/documentation-rules.md (project-specific governance - MUST exist)If docs/documentation-rules.md doesn't exist:
ERROR: docs/documentation-rules.md is REQUIRED but not found.
This file is the single source of truth for documentation governance.
Action required:
1. Create it manually using the template, OR
2. Copy from another project and customize
Until this file exists, documentation validation cannot proceed.
| Rule | Description |
|---|---|
| Naming | kebab-case for docs, ALL CAPS only for root special files (README.md, CLAUDE.md, etc.) |
| Metadata | Every doc has Status, Owner, Last Reviewed headers |
| READMEs | Required at docs/, components/*, top-level buckets |
| Depth | No path exceeds 4 levels below docs/components// |
| Banned dirs | No misc/, notes/, temp/, scratch/, old/, backup/ |
| Component allowlist | Only specs/, api/, runbooks/, assets/ in component folders |
Use Glob, Read, and Bash tools to validate each rule:
find docs/ -name "*.md" -type f | grep -E "[A-Z]{2,}" | grep -v "README.md\|CLAUDE.md\|AGENTS.md"
find docs/ -name "*_*" -type f
For each .md file in docs/, check first 10 lines for:
> **Status**: Canonical | Operational | Investigative | Archived
> **Owner**: [team name]
> **Last Reviewed**: YYYY-MM
Check existence:
docs/README.mddocs/components/README.md (if components/ exists)docs/[bucket]/README.md for each top-level bucketdocs/components/[name]/README.md for each componentParse Last Reviewed: dates and flag:
find docs/components -mindepth 5 -type f
find docs/ -type d \( -name "misc" -o -name "notes" -o -name "temp" -o -name "scratch" -o -name "old" -o -name "backup" \)
For each docs/components/[name]/, allowed subdirectories: specs/, api/, runbooks/, assets/.
For each */CLAUDE.md, warn if > 150 lines for component CLAUDE.md.
Check docs/operations/troubleshooting/ — only README.md, common-issues.md, [component]-issues.md expected.
# Documentation Lint Report
**Project**: [name]
**Date**: [current date]
**Files Scanned**: [count]
**Overall**: [🟢 Pass | 🟡 Warnings | 🔴 Errors]
## Summary
| Check | Status | Issues |
|-------|--------|--------|
| Naming Conventions | [✅/⚠️/❌] | [count] |
| Metadata Headers | [✅/⚠️/❌] | [count] |
| README Coverage | [✅/⚠️/❌] | [count] |
| Staleness | [✅/⚠️/❌] | [count] |
| Depth Limits | [✅/⚠️/❌] | [count] |
| Banned Directories | [✅/⚠️/❌] | [count] |
| Component Allowlist | [✅/⚠️/❌] | [count] |
| CLAUDE.md Scope | [✅/⚠️/❌] | [count] |
| Troubleshooting Cap | [✅/⚠️/❌] | [count] |
## Errors (Must Fix)
[List errors]
## Warnings (Should Fix)
[List warnings]
Detect flags from skill invocation args. Set:
--fix → Interactive mode (ask before each fix)--auto-fix → Automatic mode (apply safe fixes without prompting)mv_archive/When NOT in fix mode, end with:
Run /spwf:doc-lint --fix to fix interactively
Run /spwf:doc-lint --auto-fix for safe automatic fixes (naming, READMEs)
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub simon-potter/spwf --plugin spwf38 skills in this plugin
/address-reviewPhase 6.5 — Address Review. Turn review feedback into action. Sources feedback from either a local report file (e.g. {branch}-review.md from /spwf:pr-review or {branch}-self-review.md from /spwf:simplify) or fetched human comments on an open PR/MR. For each item runs READ → VERIFY → EVALUATE → implement-or-push-back, in priority order (blocking → important → nit). Forbids performative agreement ("you're absolutely right"). Use after pr-review, or whenever a reviewer leaves comments./agent-optimiseCross-cutting — Audit both the project .claude/ and personal ~/.claude/ for quality issues. Covers CLAUDE.md scope and length, agent descriptions, skill frontmatter, and settings.json conflicts. Always audits both scopes. Produces a prioritised P1/P2/P3 fix list./approve-planPhase 2 — Approve plan. Reviews the task list from spec for quality (atomicity, testability, clarity), then applies four adversarial lenses (Skeptic, Architect, Minimalist, Security) as advisory input for the human reviewer. Quality issues are blocking; adversarial findings are advisory. Security lens identifies tasks touching auth, billing, user input, or secrets so the builder has explicit awareness before writing those tasks. Presents everything for explicit human go/no-go before building starts./branch-rescueRecovery skill — moves commits that landed on the base branch onto a proper feature branch and resets local base, without touching origin. Resolves the active OpenSpec change, detects the pre-spec base commit (subject-line grep with manual-confirm fallback), performs three local-only safe git operations, and surfaces the force-push command for the user to run manually. Run standalone; pr-create's rescue offer runs the same procedure inline (_shared/branch-management.md §4), because this skill is user-only./briefPhase 1.5 — Explain a planned change before it is built. Runs between spec and approve-plan, so a mismatch costs a conversation rather than a change. Five sections, expanding then summarising — what will be built, why this way, the choices you didn't make, what it touches, and a short summary. Never blocks: it prints, offers one skippable prompt, and returns. Calibrated via .spwf/learner.md. Companion to recap and understand, which teach after the fact; this teaches before. Runs on changes, not bug fixes./buildPhase 3 orchestrator — Full Red-Green-Refactor cycle. For each pending task: invokes write-tests (Red: write failing tests), then opsx:apply (Green: implement via OpenSpec), then run-tests (Verify: confirm green before moving on). Loops until all tasks complete. After all tasks complete, runs opsx:verify (spec sign-off), then recommends simplify (Refactor).