Skip to content
Back to skills

Update Docs

ASecurity

Update all project documentation to reflect recent changes

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 7, 2026
documentationgonodegitdocumentation

Works with

  • cli

Security analysis

A100/100

Scanned November 25, 2026

npx -y skills add nirecom/agents --skill update-docs --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Update Docs?

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

Security grade badge for Update Docs
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nirecom-update-docs/badge)](https://www.skillsdirectory.com/skills/nirecom-update-docs)

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: update-docs
description: Update all project documentation to reflect recent changes
model: sonnet
user-invocable: false
---

Update all project documentation to reflect recent changes.

Docs directory: `docs/` within the current project root.
Target files: all `.md` files in `docs/` that already exist, plus `README.md` in the project root.

## Procedure

UD-0. **Read `rules/docs.md`.** It is on-demand-only and never auto-injected, so this Read is mandatory.
   Read `rules/coding.md` here too — same on-demand-only status; its Public GitHub Rules govern every doc written in UD-4 and after.
UD-1. **Gather recent changes**:
   - Run `git diff` and `git diff --cached` to capture uncommitted and staged changes (current session's work, not yet in git log)
   - Run `git log --oneline -20` for committed history
UD-2. **Read current docs**: Read all target docs files.
   - `README.md` (repo root) is required for all repos. **Create it first if missing — highest priority.**
     - Goal: make the reader think "I want to use this" — crisp features, "what it does for you"
     - Initial install/setup instructions go here, not in `ops.md`
   - `CHANGELOG.md` (repo root) for public repos. Create if missing (no manual seed needed — first run starts from here).
   - When `docs/glossary/` exists, Read `rules/docs/glossary.md` (on-demand-only) so its entry criteria drive the UD-3 glossary check.
UD-3. **Identify gaps**: Compare git log against each document's content. Look for:
   - Unrecorded commits or phases
   - Architecture/design changes not yet documented
   - New incidents or bug fixes
   - Infrastructure or operational changes
   - Progress updates
   - `README.md`: Update when a user-visible feature is added or changed, install/usage steps shift, or an existing bullet no longer accurately reflects real behavior.
   - Glossary promotion: list the user / internal rows of `<INTENT_MD>` `## Glossary` (`<INTENT_MD>` = the output of `node "$AGENTS_MAIN_ROOT/bin/plan-artifact-path" --step clarify_intent`) as promotion candidates in the UD-4 proposal; do not write yet.
   - Glossary entries: never add one outside glossary promotion.
UD-4. **Propose updates**: For each file that needs updating, present:
   - Before drafting History/Changelog bullets: apply the language configured by `DOCS_LANG_PUBLIC` / `DOCS_LANG_PRIVATE`, routed by repo visibility — one policy covers both history and changelog
   - Which sections need changes and why
   - Specific additions or modifications
UD-4a. **Glossary self-review**: apply the reviewer directives of `skills/_shared/combined-glossary.md` to the UD-4 proposal text, and raise each drift as a tagged concern per `skills/_shared/glossary-drift-check.md`.
UD-5. **CONFIRM_DOCS gate**:
   Gate check: apply skills/_shared/confirm-plan.md CPA-3 — run next-step --gate and follow GATE_ACTION.
   - Both branches: include the approval list of `skills/_shared/glossary-drift-check.md` in the shown proposal (the `ask` AskUserQuestion body, `metadata.source=update-docs.proposal-approve`; the `proceed` display).
   - `GATE_ACTION=ask`: present the UD-4 proposal via `AskUserQuestion` (`metadata.source=update-docs.proposal-approve`) and wait for approval before applying edits.
   - `GATE_ACTION=proceed`: apply the edits and continue to UD-6 without waiting.
   - When applying, run `node "$AGENTS_MAIN_ROOT/bin/glossary-promote" "<INTENT_MD>" "<project-root>" --related "<term>=<link>"` first, one `--related` per add row, `<link>` a Markdown link to the doc that owns the term.
UD-6. **Propagate to parent docs**: If the project has a parent-level summary doc (e.g. an engineering hub), update it too. Skip for repo-local `docs/`.
   - Skip `infrastructure.md` — delegate to `/update-infrastructure` instead.
UD-7. **Commit separately**: If docs are in a separate repo, commit each repo independently

## Rules

- Follow the structure and content rules defined in `rules/docs.md`
- Follow `skills/_shared/combined-glossary.md` (writer directives).
- Follow `DOCS_LANG_PUBLIC` / `DOCS_LANG_PRIVATE` settings in `.env` for History/Changelog entry language
- Follow the gather → propose → confirm → apply cycle; the confirmation step is gated by `CONFIRM_DOCS` via the UD-5 gate check — on `GATE_ACTION=proceed`, the proposal is shown but no AskUserQuestion is raised <!-- askuser-none -->
- Compare git log against current docs to identify gaps

## Completion

Once the docs step records itself (staged `docs/` or WORKTREE_NOTES bullets), next-step advances to `review_docs` — run `/review-docs` to verify doc line limits and README section order before commit.

After completing this skill, choose Path A or Path B based on `ENFORCE_WORKTREE`.

### Path A — ENFORCE_WORKTREE=on (mandatory)

UD-8. Complete delivery (Path A — `ENFORCE_WORKTREE=on` mandatory).

UD-8a. Append history bullets to `<worktree>/WORKTREE_NOTES.md` `## History Notes`. Replace `- (none)` on first append.
   - **MANDATORY when `closes_issues` is non-empty**: write one bullet per closed issue (matching the `closes_issues` count). `/worktree-end` WE-17 is the canonical writer of `docs/history.md` (Approach C, #690) and consumes these bullets via `compose-doc-append-entry --closes-issues-count N`. The CLI fail-fasts (non-zero exit) when `closes_issues > 0` AND `## History Notes` is absent / contains only `- (none)`.
   - When bullet count is below `closes_issues` count, the CLI emits a soft warning to stderr but proceeds.
UD-8b. For public repos: append user-facing bullets to `## Changelog Notes`. Replace `- (none)` on first append.
UD-8c. Do NOT write `docs/history.md` or `CHANGELOG.md` directly — deferred to `/worktree-end` WE-17 (single canonical writer for both files).
UD-8d. Stage: `git add docs/ README.md` (intentionally omits `CHANGELOG.md` and `docs/history.md`).
   - A no-op `git add docs/` is expected on this path — history and changelog content sits in `WORKTREE_NOTES.md`, not under `docs/`; the `## History Notes` / `## Changelog Notes` bullets in `WORKTREE_NOTES.md` alone satisfy the gate.
UD-8e. Commit gate is satisfied by `docs/` staged entries (architecture.md, ops.md, README.md, etc.).
UD-8f. The docs step records itself from staged `docs/` or WORKTREE_NOTES History/Changelog Notes bullets; emit no MARK_STEP. Do NOT emit `WORKFLOW_USER_VERIFIED` here; `user_verification` is owned by `/get-release-approval`.

### Path B — ENFORCE_WORKTREE=off

UD-9. Complete delivery (Path B — `ENFORCE_WORKTREE=off`).

UD-9a. History entry — dispatch the `doc-append` worker per `skills/_shared/worker-dispatch.md`. Payload: `mode: "history"`, `cwd`, `category`, `subject`, `commits`, `background`, `changes`, `test_gap` (required when `category` is BUGFIX), `artifact_dir`.
UD-9b. For public repos — changelog entry: same dispatch with `mode: "changelog"` and no `commits` (payload sequence suffix `-2`).
   On `failed` status: surface `summary` + `artifact_path` to the user and stop.
UD-9c. `git add docs/ README.md CHANGELOG.md`
UD-9d. The docs step records itself from staged `docs/` or WORKTREE_NOTES History/Changelog Notes bullets; emit no MARK_STEP. Do NOT emit `WORKFLOW_USER_VERIFIED` here; `user_verification` is owned by `/get-release-approval`.

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.