Doc updates

From athola/claude-night-market · View interactive version

Doc updates is an AI agent skill from the GitHub repository athola/claude-night-market. Updates documentation after code changes with quality gates, slop detection, and accuracy checks. Use when code changes require corresponding doc updates.

How to use this skill

Skill file

Documentation Update Workflow

When To Use

Use this skill when code changes require updates to the README, plans, wikis, or docstrings. Run Skill(sanctum:git-workspace-review) first to capture the change context.

System Capabilities

The documentation update workflow includes several specialized functions. It identifies redundancy through consolidation detection and enforces directory-specific style rules, with strict limits for docs/ and more lenient ones for the book/ directory. The system also verifies the accuracy of version numbers and component counts and integrates with the LSP for semantic documentation verification in supported versions of Claude Code.

When NOT To Use

Required Progress Items

  1. doc-updates:context-collected - Git context + CHANGELOG review
  2. doc-updates:targets-identified
  3. doc-updates:consolidation-checked (skippable)
  4. doc-updates:edits-applied
  5. doc-updates:guidelines-verified
  6. doc-updates:slop-scanned - AI marker detection via scribe
  7. doc-updates:plugins-synced - plugin.json ↔ disk audit
  8. doc-updates:capabilities-synced - plugin.json ↔ documentation sync
  9. doc-updates:accuracy-verified
  10. doc-updates:preview

Step 1: Collect Context (`context-collected`)

CHANGELOG Reference (critical for version sync):

# Check recent CHANGELOG entries for undocumented features
head -100 CHANGELOG.md

# Compare documented version vs plugin versions
grep -E "^\[.*\]" CHANGELOG.md | head -3
for p in plugins/*/.claude-plugin/plugin.json; do
    jq -r '"\(.name): \(.version)"' "$p"
done | head -5

Cross-reference CHANGELOG entries against:

Step 2: Identify Targets (`targets-identified`)

Step 2.5: Check for Consolidation (`consolidation-checked`)

Load: @modules/consolidation-integration.md

Purpose: Detect redundancy and bloat before making edits.

Scan for:

User approval required before:

Skip options:

Exit criteria: User has approved/skipped all consolidation opportunities.

Step 3: Apply Edits (`edits-applied`)

Step 4: Enforce Guidelines (`guidelines-verified`)

Load: @modules/directory-style-rules.md

Style Enforcement

Maintain consistent documentation by applying directory-specific rules. The system checks for and removes filler phrases such as "in order to" or "it should be noted" and ensures that no emojis are present in the body text of technical documents. Use grounded language with specific references rather than vague claims, and maintain an imperative mood for instructions. For lists of three or more items, prefer bullets over prose to improve scannability.

The audit will issue warnings for paragraphs that exceed length limits or files that surpass the established line count thresholds. We also flag marketing language and abstract adjectives like "capable" or "smooth" to maintain a technical and direct tone across all project documentation.

Step 4.25: AI Slop Detection (`slop-scanned`)

Run Skill(scribe:slop-detector) on edited documentation to detect AI-generated content markers.

Scribe Integration

The scribe plugin provides thorough AI slop detection:

Skill(scribe:slop-detector) --target [edited-files]

This detects:

density reading above 2.0 per 1000 words

ensures that", "not uncommon", and a negation-density reading per file

One command locates every finding with a file and a line, the opt-in

and low-confidence categories included:

uv run --with pyyaml python scripts/slop_score.py --audit <edited-files>

Edited .py files belong in that list. The scorer reads a Python path

as its comments and docstrings, keeping the line numbers, so a finding

names the line to open. Notation is not prose: an arrow in a mapping

table, a plus in a formula, and a character quoted because the code

matches it are all code that happens to appear in a docstring.

Audience Fit

Before rewriting a document, name its reader. Every doc under

maintenance already has one, stated or assumed, and an edit that

ignores it drifts the doc toward serving nobody.

Skill(scribe:slop-detector)   # module: audience-targeting.md

not, infer the tier from where the doc sits (README and

getting-started are newcomer; plugin guides are

practitioner; ADRs and deep dives are expert), then state

the inference in the change summary so a reviewer can correct

it. When the placement gives no answer, ask, do not guess.

before they can act, link what they need later, extract what

only a higher tier wants, delete what no tier wants.

modules/<topic>.md for a skill or docs/<topic>.md

for a repo doc, linked from the parent's lead with one line

naming who it is for.

the common drift. It is how a getting-started page becomes a

reference manual one honest paragraph at a time.

Skip this for creative output. audience-targeting.md scopes the

scribe:voice-* and session-to-post surfaces out by name.

Writing Style Guidelines

For enhanced writing quality, check for elements-of-style:writing-clearly-and-concisely:

# If superpowers/elements-of-style is installed:
Skill(elements-of-style:writing-clearly-and-concisely)

# Fallback if not installed - use scribe:doc-generator principles:
Skill(scribe:doc-generator) --remediate

The fallback provides equivalent guidance:

  1. Ground every claim with specifics
  2. Trim rhetorical crutches (no formulaic openers/closers)
  3. Use numbers, commands, filenames over adjectives
  4. Balance bullets with narrative prose
  5. Show authorial perspective (trade-offs, reasoning)

Remediation

If slop score exceeds 2.5 (moderate), run:

Agent(scribe:doc-editor) --target [file]

This provides interactive section-by-section cleanup with user approval.

Skip Options

Step 4.5: Sync Plugin Registrations (`plugins-synced`)

Audit plugin.json files against disk (prevents registration drift):

# Quick discrepancy check for all plugins
for plugin in plugins/*/; do
  name=$(basename "$plugin")
  pjson="$plugin/.claude-plugin/plugin.json"
  [ -f "$pjson" ] || continue

  # Count commands
  json_cmds=$(jq -r '.commands | length' "$pjson" 2>/dev/null || echo 0)
  disk_cmds=$(ls "$plugin/commands/"*.md 2>/dev/null | wc -l)

  # Count skills (directories only)
  json_skills=$(jq -r '.skills | length' "$pjson" 2>/dev/null || echo 0)
  disk_skills=$(ls -d "$plugin/skills"/*/ 2>/dev/null | wc -l)

  # Report mismatches
  if [ "$json_cmds" != "$disk_cmds" ] || [ "$json_skills" != "$disk_skills" ]; then
    echo "$name: commands=$json_cmds/$disk_cmds skills=$json_skills/$disk_skills"
  fi
done

If mismatches found: Run /update-plugins --fix or manually update plugin.json files.

Why this matters: Unregistered commands/skills won't appear in Claude Code's slash command menu or be discoverable.

Step 4.75: Sync Capabilities Documentation (`capabilities-synced`)

Load: @modules/capabilities-sync.md

Purpose: Ensure plugin.json registrations are reflected in reference documentation.

Sync Targets:

| Source | Documentation Target |

|--------|---------------------|

| plugin.json.skills[] | book/src/reference/capabilities-reference.md |

| plugin.json.commands[] | book/src/reference/capabilities-reference.md |

| plugin.json.agents[] | book/src/reference/capabilities-reference.md |

| hooks/hooks.json | book/src/reference/capabilities-reference.md |

| Plugin existence | book/src/plugins/{plugin}.md |

Quick Check:

# Compare registered vs documented skills
for pjson in plugins/*/.claude-plugin/plugin.json; do
  plugin=$(basename $(dirname $(dirname "$pjson")))
  jq -r --arg p "$plugin" '.skills[]? | sub("^\\./skills/"; "") | "\($p):\(.)"' "$pjson" 2>/dev/null
done | sort > /tmp/registered-skills.txt

grep -E "^\| \`[a-z-]+\` \|" book/src/reference/capabilities-reference.md | \
  head -120 | awk -F'|' '{print $2":"$3}' | sort > /tmp/documented-skills.txt

# Show missing
comm -23 /tmp/registered-skills.txt /tmp/documented-skills.txt

If discrepancies found:

  1. Missing from docs: Add entries to capabilities-reference.md tables
  2. Missing plugin pages: Create book/src/plugins/{plugin}.md
  3. Missing from SUMMARY: Add plugin to book/src/SUMMARY.md

Auto-generate entry format:

| `{skill-name}` | [{plugin}](../plugins/{plugin}.md) | {description} |

Skip options: Use --skip-capabilities to bypass this phase.

Step 5: Verify Accuracy (`accuracy-verified`)

Load: @modules/accuracy-scanning.md

Validate claims against codebase:

# Quick version check
for p in plugins/*/.claude-plugin/plugin.json; do
    jq -r '"\(.name): \(.version)"' "$p"
done

# Quick counts
echo "Plugins: $(ls -d plugins/*/.claude-plugin/plugin.json | wc -l)"
echo "Skills: $(find plugins/*/skills -name 'SKILL.md' | wc -l)"

Verification: Run the command with --help flag to verify availability.

Flag mismatches:

LSP-Enhanced Verification (2.0.74+):

When ENABLE_LSP_TOOL=1 is set, enhance accuracy verification with semantic analysis:

  1. API Documentation Coverage:
  1. Signature Verification:
  1. Reference Finding:
  1. Code Structure Validation:

Efficiency: LSP queries (50ms) vs. manual file tracing (minutes) - dramatically faster verification.

Default Strategy: Documentation updates should prefer LSP for all verification tasks. Enable ENABLE_LSP_TOOL=1 permanently for best results.

Non-blocking: Warnings are informational. The user decides whether to fix.

Step 6: Preview Changes (`preview`)

Exit Criteria

directory) with the correct status and links to related work.

no section serves a different one.

linked, never deleted to hit a tier.

Flags

| Flag | Effect |

|------|--------|

| --skip-consolidation | Skip Phase 2.5 consolidation check |

| --skip-slop | Skip Phase 4.25 AI slop detection |

| --strict | Treat all warnings as errors |

| --book-style | Apply book/ rules to all files |

Troubleshooting

Common Issues

Documentation out of sync

Run make docs-sync-check to verify the capabilities docs still

match the plugin registrations

Build failures

Check that all required dependencies are installed

Links broken

Verify relative paths in documentation files

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.