Skip to content
doc-maintenance logo

Documentation Maintenance

doc-maintenance

Automatic documentation updates after task completion. Use when: (1) completing tasks, (2) adding features, (3) fixing bugs, (4) refactoring code. Updates root PLAN.md (consolidated) and README.md when features change. Chains markdown-writer for style.

SKILL.md

Full skill instructions

Documentation Maintenance

Automatically updates project documentation after task completion.

Consolidated Plan Location

All plan updates go to root PLAN.md. This is the single source of truth for project planning. Package-level PLAN.md files should be consolidated into the root PLAN.md.

Trigger Conditions

Invoke after:

  • Completing any task
  • Adding a new feature
  • Fixing a bug
  • Refactoring code
  • Resolving a blocked item

Also invoke explicitly with:

  • /​doc-maintenance
  • "update documentation"
  • "sync docs"

Pre-Merge Cleanup

When owner says "clean up before merge" or similar, run this checklist:

# 1. Sync CLAUDE.md with installed skills (removes stale refs)
skills claudemd sync

# 2. Scan for test artifacts and slop
skills hygiene scan

# 3. If slop found, clean it
skills hygiene clean --confirm

# 4. Validate chain config (if chain files changed)
chain validate

# 5. Update PLAN.md with completed work
# (follow doc-maintenance procedure below)

# 6. Commit and push
git add -A && git commit -m "chore: pre-merge cleanup" && git push

This is the standard cleanup before any PR merge.

Procedure

Step 1: Read Current State

Read these files:

  • PLAN.md (root, consolidated project plan)
  • README.md (feature documentation)
  • packages/​*/​PLAN.md (check for package-level plans to consolidate into root)
  • Recent git commits (what changed)

Step 2: Consolidate Package Plans

If packages/​*/​PLAN.md files exist, consolidate their content into root PLAN.md:

  1. Each package gets a section: ## Package: {name}
  2. Move completed items to the Completed section
  3. Move pending items to the appropriate sprint/​backlog section
  4. Delete the package-level PLAN.md after consolidation

Structure for root PLAN.md:

# Project Plan

## Current Sprint
- Active work items across all packages

## Package: chain
- Package-specific in-progress work

## Package: cli
- Package-specific in-progress work

## Backlog
- Future work items

## Completed
- Timestamped completed items

## Blocked
- Items waiting on dependencies

Step 3: Analyze Changes

Determine what was accomplished:

  • Which PLAN.md items are now complete?
  • Were new features added?
  • Were bugs fixed?
  • Did refactoring occur?
  • Were new issues discovered?

Step 4: Update PLAN.md

Mark completed items:

## Current Sprint
- [x] Implement user authentication  # Was [ ]
- [ ] Add password reset flow

Add discovered work:

## Backlog
- [ ] Discovered: Need rate limiting for auth endpoints
- [ ] Tech debt: Refactor auth middleware

Move completed items with timestamp:

## Completed
- [x] Implement user authentication (2026-01-30)

Update blocked items:

## Blocked
- Password reset: Waiting for email service setup

Step 5: Update README.md (If Features Changed)

When to update README.md:

  • New user-facing feature added
  • API changed
  • New command available
  • Installation steps changed

What to update:

  • Features list
  • Usage examples
  • API reference
  • Installation instructions

Step 6: Report Changes

Output a summary:

Documentation updated:

PLAN.md:
  - Marked complete: "Implement user authentication"
  - Added to backlog: "Need rate limiting for auth endpoints"
  - Moved to completed: 1 item
  - Consolidated from: packages/​chain/​PLAN.md

README.md:
  - Updated features list with authentication
  - Added auth usage example

Skill Chaining

With markdown-writer

All documentation updates MUST follow markdown-writer style:

  • Short sentences, direct claims
  • No em dashes
  • Active voice
  • Tables for structured data

Implicitly chain markdown-writer when editing any .md file.

After TDD Completion

When TDD workflow completes (GREEN phase):

  1. Mark the related PLAN.md task as complete
  2. Add any discovered edge cases to backlog

After Bug Fix

When a bug is fixed:

  1. Mark bug item as complete in PLAN.md
  2. Add regression test to PLAN.md if not present

After Refactoring

When refactoring completes:

  1. Mark refactoring task as complete
  2. Update any affected API documentation

Terminal Chain

After any documentation update: repo-hygiene (clean stale references)

Update Patterns

Marking Tasks Complete

Before:

- [ ] Implement feature X

After:

- [x] Implement feature X

Adding Discovered Work

When you discover new tasks during implementation:

## Backlog
- [ ] (discovered) New task from implementation
- [ ] (tech debt) Code that needs cleanup
- [ ] (bug) Issue found during testing

Timestamping Completed Items

Add date to completed items:

## Completed
- [x] Task description (2026-01-30)

Feature Documentation

When adding a feature to README.md:

## Features

- **Authentication**: Secure user login with JWT tokens
- **Password Reset**: Email-based password recovery

Rationalizations (Do Not Skip)

RationalizationWhy It's WrongRequired Action
"Too small to document"Small changes accumulateUpdate PLAN.md
"I'll remember"Context is lost between sessionsWrite it down
"README is fine"Feature docs get staleVerify accuracy
"Just a bug fix"Bugs deserve trackingMark complete
"Package has its own PLAN"Fragmentation causes confusionConsolidate to root PLAN.md

Example Session

Task: Add user authentication

After completion:

/​doc-maintenance

Analyzing changes...

Found:
- New auth middleware in src/​middleware/​auth.ts
- New login endpoint in src/​routes/​auth.ts
- 5 new test files
- Git commit: "Add JWT authentication"
- packages/​chain/​PLAN.md exists (needs consolidation)

Updates:

PLAN.md:
  Current Sprint:
    - [x] Implement user authentication
  Backlog:
    + [ ] (discovered) Add refresh token support
    + [ ] (discovered) Rate limit login attempts
  Consolidated:
    - Merged packages/​chain/​PLAN.md content

README.md:
  Features:
    + Authentication: JWT-based user authentication
  Usage:
    + Added auth example code

Notes

  • All plan updates go to root PLAN.md (consolidated)
  • Package-level PLAN.md files should be consolidated, not maintained separately
  • Never removes items from PLAN.md (only marks complete)
  • Preserves existing formatting
  • Adds timestamps to completed items
  • Creates backlog items for discovered work
  • Only updates README.md when features change
  • Always follows markdown-writer style

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View