Files
AgentHub/skills/update-project-docs/SKILL.md
T
nntrivi2001 b7c573f8d9 feat(plugin): ship the repo's skills as ccam plugin skills
The repo root already IS the `ccam` plugin root (`"source": "./"`), so the
conventional `skills/` dir at the root is the plugin's skills dir — while
`.claude/skills/` only loaded for a session whose cwd was inside this
checkout. That is useless for a lane working in another repo, which is why
`ccam skills install` existed at all.

Move all seven skills to `skills/`: they now reach every plugin user as
`/ccam:<name>` (bare `/<name>` as an alias). `ccam skills install` stays as
the fallback for a plain checkout without the plugin, sourcing from the new
path.

Agents deliberately do NOT move. A plugin agent is addressed as
`ccam:qc-local`, which would break the `subagent_type: qc-local` references
in ship-feature-lane; `ccam lanes agents install` keeps writing them into the
lane's own `.claude/agents/`, the highest-priority agent source. MCP was
already plugin-shipped via `plugins/ccam/.mcp.json`.

Mechanical fallout: ~115 source files carry a doc-comment pointer to
`.claude/skills/file-headers/`, repointed to `skills/file-headers/`. The
generic Claude Code config-surface examples in openapi/cc-config (`.claude/
skills/code-reviewer`) describe any user's layout and are left alone.

Also fixes the two file-headers scripts, whose `ROOT=` climbed four levels
from `.claude/skills/file-headers/scripts/` and would have escaped the repo
from the new depth — it scanned sibling projects until corrected to three.

npm run test:server (1160 pass), test:client (422 pass), mcp:typecheck,
mcp:build + mcp:check-build all green.
2026-08-21 17:17:33 +07:00

5.8 KiB

name, description
name description
update-project-docs MANDATORY for every coding agent (Claude Code, Codex, or any other) — keep this repository's documentation in sync after any change to behavior, configuration, interfaces, events, schema, or features. Use automatically (without being asked) at the end of ANY change-set that adds or alters an env var, event type, hook behavior, session/agent state transition, API route or response shape, DB schema, WebSocket message, MCP tool, CLI command, or user-facing feature — and whenever the user asks to "update the docs / README / architecture". Knows the full doc surface (README, ARCHITECTURE, server/client READMEs, docs/*) and which docs each kind of change touches.

Update Project Docs

This repository keeps a large doc set and docs drift silently, because one change often belongs in several files at once. This skill encodes which docs exist, which change-types touch which docs, and how to propagate consistently. This build ships English only — the translated READMEs, the wiki and the root landing page were removed; do not recreate them.

Authoritative inventory with exact section anchors lives in references/doc-map.md — read it when deciding where a specific change lands. The repo rule .claude/rules/docs-markdown.md ("update all affected docs together") is binding.

When to update (including without being asked)

Update docs in the same change-set (PR/commit) as the code, before claiming done — do not wait for the user to ask — whenever the change is observable from outside the module:

  • New/changed env var → every env-var table + .env.example.
  • New event type (e.g. an events.event_type value) → every event-type list/table.
  • New/changed hook behavior or session/agent state transition → hook docs + every state-machine diagram.
  • New/changed API route or response shape → API docs + route tables + OpenAPI.
  • DB schema change (table/column/index) → database docs + ERD.
  • New WebSocket message type → client/server WS docs.
  • New MCP tool → MCP docs.
  • New CLI command / script / renamed file referenced in docs → command lists + onboarding guides.
  • New user-facing feature / page / background service → feature tables + architecture.

Do NOT auto-update for: pure internal refactors with no observable/interface/config change, test-only changes, comment/typo fixes, or work the user explicitly scoped as "no docs". When unsure whether a change is observable, check the mapping below; if it touches any row, update.

Change → docs mapping

Change type Docs to update
Env var README.md (env table), ARCHITECTURE.md (inline), server/README.md, .env.example
Event type README.md+VN+CN (hook-event table), ARCHITECTURE.md (Event types line), docs/PLUGINS.md, + i18n, docs/DATABASE.md (if it enumerates types)
Hook behavior / state transition docs/HOOKS.md, state-machine mermaid diagrams in README.md+VN+CN + server/README.md + docs/DATABASE.md + , ARCHITECTURE.md (hooks.js row)
API route / response docs/API.md, server/README.md (routes), ARCHITECTURE.md (routes row), server/openapi*.js (code)
DB schema docs/DATABASE.md, ARCHITECTURE.md (ERD/schema)
WebSocket message client/README.md (Event Types), server/README.md,
MCP tool mcp/README.md, docs/MCP.md
Feature / page / background service README.md (feature table + data-flow list), ARCHITECTURE.md (module table), server/README.md or client/README.md
CLI command / script README.md commands, CLAUDE.md / AGENTS.md, INSTALL.md / SETUP.md
New language docs/I18N.md, client/src/i18n/locales/<xx>/*, client/src/i18n/index.ts (add to supportedLngs AND the resources map)

Procedure

  1. Classify the change against the table above. A change can hit multiple rows (a new feature with a new env var hits both).
  2. Write the canonical English version first — usually README.md and/or ARCHITECTURE.md. Get the wording right there; it anchors everything else.
  3. Area READMEs / docs/: update server/README.md, client/README.md, and the relevant docs/*.md per the mapping.
  4. Diagrams: when a state transition changes, edit every mermaid stateDiagram-v2 block that models it (they are duplicated across README, server/README and docs/DATABASE). Keep transition labels consistent.

Verify (do not skip)

  • Coverage: run scripts/doc-coverage.sh <new-term> [...] (e.g. the new env var / event type / identifier) and confirm every doc the mapping flags shows a HIT. The matrix is advisory — not every term belongs in every file — but a flagged doc reading 0 is a miss to fix.
  • Tables: markdown tables stay pipe-balanced (header column count == every row).
  • Mermaid: each edited block still parses (valid source --> target: label).
  • i18n: every new English string has a vi entry in client/src/i18n/locales/vi/.
  • Format/tests: run npm run format (or prettier --check on touched files); for any code touched, run the verification from CLAUDE.md (npm run test:server / test:client / mcp:typecheck).
  • State exactly which docs were updated and which were intentionally skipped (with reason), mirroring the repo's verification policy.

Tips

  • The fastest way to find where something already lives: grep -n "<existing-neighbor-term>" <doc> (e.g. grep an adjacent env var to find the env table). references/doc-map.md lists the stable anchors per file.
  • Parallelize translations + HTML across subagents when the change is large, but write the canonical English edit yourself first so the translations have a faithful source.
  • One language/area per subagent keeps edits reviewable and tables un-corrupted.