Skip to content
Back to skills

Maintaining Documentation

ASecurity

Maintains a product repo's canonical docs structure (CLAUDE.md, progress.txt, docs/product+system+design-system, context/) as single source of truth, and keeps the session history in logs/ (one file per entry) separate from the progress.txt state snapshot. Trigger after feature completion, before git push, on architecture changes, at session end, or explicit "update docs"/"sync documentation" requests. Skip for trivial changes (<10 LOC, no logic/schema/UI changes).

  • 4 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 1, 2026
documentationgobashnoderefactoringgitapidocumentation

Works with

  • api

Security analysis

A100/100

Scanned November 13, 2026

npx -y skills add alunadev/ald-skills --skill maintaining-documentation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Maintaining Documentation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Maintaining Documentation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alunadev-maintaining-documentation/badge)](https://www.skillsdirectory.com/skills/alunadev-maintaining-documentation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: maintaining-documentation
description: Maintains a product repo's canonical docs structure (CLAUDE.md, progress.txt, docs/product+system+design-system, context/) as single source of truth, and keeps the session history in logs/ (one file per entry) separate from the progress.txt state snapshot. Trigger after feature completion, before git push, on architecture changes, at session end, or explicit "update docs"/"sync documentation" requests. Skip for trivial changes (<10 LOC, no logic/schema/UI changes).
---

# Documentation Maintenance Skill

Maintains the canonical docs structure for a product repo bootstrapped from a
`templates/canonical-docs/`-style scaffold. This is for individual product repos — a system
repo with its own bespoke docs layout (a meta-repo indexing many products, for instance)
follows its own root `CLAUDE.md` instead; don't force this structure onto a repo that never
adopted it.

## When to use this skill

### Always trigger
- **Post-feature**: after completing any user story or acceptance criterion.
- **Pre-commit**: before `git push` if files changed under the app/source directories.
- **Architecture change**: DB schema, API contracts, auth logic modified.
- **Session end**: every working session should end with a new entry file in `logs/` (see below) —
  this is separate from, and in addition to, any docs updates the change itself needs.
- **Explicit request**: "update docs", "sync documentation", "cleanup docs".

### Never trigger
- Trivial changes (<10 lines, no business logic).
- Fixing typos in code comments.
- Refactoring without behavior change.
- Dependency bumps (unless a major version or a new package).

### Ask first
- Experimental features: "Document this now or wait until it's stable?"
- Breaking changes: "Document the migration path?"
- Hotfixes: "Update docs now or after the proper fix?"

---

## Canonical Structure

```
/
├── CLAUDE.md                      # AI reads this FIRST every session
├── progress.txt                   # Current-state snapshot (root, max ~50 lines)
├── logs/                          # Session history, one file per entry (created by the first)
├── agents/                        # Versioned mirror of personal subagents, if used
├── context/
│   ├── product-context.md         # Vision, value prop, strategic pillars
│   ├── team-context.md            # Team structure, ways of working, constraints
│   └── user-personas.md           # Who this is built for
└── docs/
    ├── product/
    │   ├── prd.md                 # Problem statement, success metrics, solution
    │   └── app-flow.md            # Navigation + user flows
    ├── system/
    │   ├── tech-stack.md          # Stack decisions and rationale
    │   └── implementation-plan.md # Build sequence
    └── design-system/
        └── design-system.md       # Tokens + component rules, prose and structured
```

Every doc under `docs/` carries YAML frontmatter — `title`, `status` (`draft` / `approved` /
`shipped`, adjust per doc type), `date`. Keep it current when a doc's state changes.

If the actual repo's structure differs from this (extra files, a different layout it settled
into), follow the repo's real structure — this is the default shape, not a rule to force onto
an established project.

---

## progress.txt vs. logs/ — different jobs, don't conflate them

This is the single most important distinction in this skill, and the one most likely to be
gotten wrong.

- **`progress.txt`** — the **current-state snapshot**. Overwritten in place, not appended to.
  Sections: Current State, Last Session, Active Task, Next Up, Blockers, Decisions Log. Answers
  "where do things stand right now?" Keep it under ~50 lines — it's read at the start of every
  session, so it has to stay scannable.
- **`logs/`** — the **session history, one file per entry**. Every working session adds a new
  file; existing entries are never edited or removed. Answers "what happened, session by
  session, and why?"

Update `progress.txt` whenever the state meaningfully changes. Add a `logs/` entry every
working session, regardless of whether `progress.txt` also changed — a session that only
investigated something without changing state still deserves a log entry saying so.

Why one file per entry and not one shared file: when every session adds to the same file, two
PRs open at the same time both edit it at the same spot and always conflict. Separate files
never touch each other, so the log cannot cause a merge conflict.

### Entry format

One file per entry, `logs/YYYY-MM-DD-HHMM-short-title.md`, holding exactly one `##` heading:

```markdown
## YYYY-MM-DD HH:MM — Short title of what happened
- model: <model used>
- status: done | in-progress | blocked
- issue: <the problem being worked on, or the blocker — "none" if clean>

- done: what actually changed (1-2 bullets max)
- next: the single most useful next step
```

Write only what a future session needs: decisions made and why, state changes, the concrete
next step with file paths, open blockers. Don't narrate every command, don't repeat what's
already in git history, don't summarize unchanged things. Keep each entry under ~10 lines —
if it needs more, the detail belongs in a doc or commit message, linked from the entry.

Commit the entry on the same branch as the work, before pushing, so it ships in the same PR.
The folder is created lazily, by the first entry — not preemptively.

### Repos that still keep a single `log.md`

Some older repos keep their whole history in one `log.md` at the root. Keep following that
repo's own rule until it is migrated on purpose — don't migrate it as a side effect of another
task. A migration, when asked for, is its own change: create `logs/` with a first entry,
freeze `log.md` with a note at the top (its entries are never touched), and update every
instruction in the repo that still points at `log.md` in the same PR.

### If the repo generates a cross-repo rollup file (e.g. `NOW.md`)

Some setups generate a single "what's live, what's next" view across multiple repos, derived
from each repo's `progress.txt` and session log. If one exists in this repo, it's generated —
**never hand-edit it.** Update the source files (`progress.txt`, `logs/`) and let the
generation step (whatever the repo uses — a script, a hook) pick up the change.

---

## Decision Tree: What to Update

```
START
│
├─ Changed a route, page, or user flow?
│  └─ YES → Update app-flow.md
│
├─ Changed DB schema, API contracts, or auth logic?
│  └─ YES → Update tech-stack.md if new dependencies; document the change in
│           implementation-plan.md if it's part of an in-flight build
│
├─ Changed design tokens or component rules?
│  └─ YES → Update design-system.md
│
├─ Feature status changed (draft → shipped)?
│  └─ YES → Update prd.md status, and progress.txt
│
├─ Product vision, team structure, or personas changed?
│  └─ YES → Update the relevant context/ file
│
└─ Always: update progress.txt if state changed, and add a logs/ entry
   at session end regardless of what else changed.
```

---

## Update Workflow

### Step 1: Session start
1. Read `CLAUDE.md` to load project context.
2. Read `progress.txt` to understand current state.
3. The newest few files in `logs/` (or, in a repo not yet migrated, the end of `log.md`) give
   session-by-session context `progress.txt` alone doesn't carry.

### Step 2: Determine scope
Use the Decision Tree above.

### Step 3: Execute updates
For each file:
1. **Check redundancy** — does this info already live in its owner doc? If yes, link to it,
   don't duplicate.
2. **Update surgically** — find the exact section, make the minimal change, preserve
   structure.
3. **Fix cross-references** if a file moved or was renamed — `grep -r "old-name" docs/` and
   fix every hit.
4. **Update `progress.txt`** if state changed.

### Step 4: Validate
```bash
grep -r "\[.*\](.*\.md)" docs/ context/     # find internal links
# check each target exists
# check for the same content duplicated in two files
```

### Step 5: Session end
- Add the session's `logs/` entry and commit it with the work, before pushing — mandatory, even
  if `progress.txt` didn't need changes.

---

## Golden Rules

### Single source of truth
| Topic | Owner document |
|---|---|
| Problem, success metrics, solution | `docs/product/prd.md` |
| Navigation and user flows | `docs/product/app-flow.md` |
| Stack decisions | `docs/system/tech-stack.md` |
| Build sequence | `docs/system/implementation-plan.md` |
| Design tokens, component rules | `docs/design-system/design-system.md` |
| Product vision and strategy | `context/product-context.md` |
| Team structure and constraints | `context/team-context.md` |
| Who this is built for | `context/user-personas.md` |
| Current state | `progress.txt` |
| Session-by-session history | `logs/` (a frozen `log.md`, if any, is older history) |

**Rule:** if the info exists in its owner doc, link to it. Never copy it into a second file.

### File placement
- Don't put loose `.md` files at the repo root or in `docs/` root — organize under
  `product/`, `system/`, `design-system/`, or `context/`.
- Exceptions: `CLAUDE.md` and `progress.txt` belong at the repo root, and so does `logs/`.

### CLAUDE.md priority
`CLAUDE.md` is the AI's operating manual — update it when conventions change, keep it under
~2000 words since it loads every session.

---

## Common Scenarios

### "Feature X is complete"
1. `progress.txt` → update Current State / Active Task / Next Up.
2. `docs/product/prd.md` → status to `shipped`.
3. `docs/product/app-flow.md` → if new routes were added.
4. `logs/` → new session entry, `status: done`.

### "Changed DB schema or API"
1. `docs/system/tech-stack.md` → if new dependencies.
2. `docs/system/implementation-plan.md` → if this is part of an in-flight build.
3. `progress.txt` → record the change.
4. `logs/` → new session entry.

### "Changed a design token"
1. `docs/design-system/design-system.md` → update the token and, if the rationale changed,
   the surrounding prose.
2. Don't touch individual component files that reference the token — they inherit it.

### "Cleanup documentation"
1. `find . -name "*.md" -not -path "./node_modules/*"` and check each file against the
   canonical structure above.
2. Move misplaced files into the right folder.
3. Remove genuinely stale files (`temp_*.md`, `old_*.md`, `backup_*.md`).
4. Run the link audit (Step 4 above) and fix anything broken.
5. Report a summary of what moved/changed.

---

## Session-End Checklist

- [ ] `progress.txt` reflects the actual current state, not last week's
- [ ] `logs/` has a new entry file for this session, even if brief, committed with the work
- [ ] Feature status in `prd.md` matches reality
- [ ] New routes/flows are in `app-flow.md`
- [ ] Design changes are in `design-system.md`
- [ ] No broken internal links (`grep` check)
- [ ] No duplicate content across two files
- [ ] `CLAUDE.md` updated if conventions changed
- [ ] No hand-edits to a generated rollup file, if the repo has one

---

## Error Prevention

1. **Duplicating instead of linking** — copying a decision or a schema description into a
   second file instead of linking to its owner doc. Costs nothing to link, costs a real drift
   bug later to duplicate.
2. **Forgetting the log entry** — updating specs but skipping the session log means the
   next session re-derives context that already existed.
3. **Confusing progress.txt with logs/** — progress.txt gets overwritten with the current
   state; logs/ gets a new file. Don't append to progress.txt, don't edit an existing entry.
4. **Adding to a shared log file** — appending the entry to a single `log.md` in a repo that
   already uses `logs/`, or putting two entries in one file, brings the merge conflicts back.
5. **Breaking links when moving files** — `grep -r "old-name"` before moving, not after.
6. **Over-documenting trivial changes** — a 2-line fix doesn't need a docs pass; use the
   "Never trigger" list above.
7. **Hand-editing a generated file** — if the repo has a generated cross-repo view, edit the
   source files instead and let generation happen normally.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in documentation →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.