---
name: chatondearu-cda-docs
description: "Maintains English technical documentation under /doc so it mirrors the codebase and runtime config (runtime/env config, API schemas and contracts, Docker/deployment). Use when updating or reviewing docs, syncing documentation after code changes, refactoring APIs, adding endpoints, changing environment variables, Docker, deployment, or when the user asks to fix outdated markdown documentation."
metadata:
  decimalai-skill-id: "a8fdef65-e10a-4f4d-b53c-4ecb4ed7da3a"
  decimalai-version-id: "6b3cb450-46af-4a78-9fe8-0c82d0f79e16"
  decimalai-version: "1"
  decimalai-body-sha256: "33940b2624aa957ff605f0ea85ae6768f26cdbfb8687279067c9cb0df426ae61"
  decimalai-name: "chatondearu/cda-docs"
  decimalai-format: "1"
  decimalai-invocation: "model"
  decimalai-category: "documentation"
  decimalai-source: "https://app.decimal.ai/s/chatondearu-cda-docs@1/SKILL.md"
---
# Technical documentation sync

## Principles

- **Source of truth**: application code, schemas, and runtime configuration actually used (including Docker Compose and Dockerfiles). Documentation only reflects them; never invent behavior.
- **Location**: user-facing technical docs live in **`doc/`** at the repository root (create it if missing). **Language: English only** for all `doc/**/*.md` files.
- **README**: keep the root README as a short overview plus **one clear link** to the doc index, e.g. `Full documentation: [doc/README.md](doc/README.md)`.

## Analysis order (efficient)

1. **Entry points**: app bootstrap, routers, CLI (e.g. `nuxt.config.ts`, `server/`, `src/main.ts`, `app.js`, `main.py`—whatever the project uses).
2. **Public contracts**: request/response models, status codes, response content types, file formats (e.g. Nest DTOs, Nitro `server/api` handlers, tRPC/GraphQL types, Pydantic models).
3. **Deployment**: `Dockerfile`, `docker-compose.yml`, health checks, ports—values must match files, not assumptions.
4. **Environment variables**: document only what code reads (e.g. `process.env`, Nuxt `runtimeConfig`, `import.meta.env`, `os.getenv`/settings modules). If compose declares vars the app does not read yet, note that gap accurately (e.g. "set in Compose for future use" vs "consumed by …").
5. **Optional verification**: if the app exposes a machine-readable contract (e.g. OpenAPI/Swagger JSON, GraphQL schema), use it to align paths and schemas.

## Check mode (diff-driven, report-only)

Invoked as an **oracle** (e.g. by a reviewer) to answer "does this change leave
`doc/` stale?" — it **reports, it does not rewrite**. Give it a diff or changed-file
list (`git diff <base>...HEAD`, a PR diff, or an explicit list).

Map each changed area to the doc page that owns it, then judge whether that page is
now out of date:

| Change in the diff | Doc page to check |
| ------------------ | ----------------- |
| Public contract / endpoint / payload / status code | `doc/api.md` |
| Env var read by the app, feature flag, settings module | `doc/configuration.md` |
| Dockerfile / compose / ports / health check / deploy | `doc/deployment.md` |
| New/removed module, changed data flow, component boundary | `doc/architecture.md` |
| Feature added or removed (user-visible) | `doc/README.md` index + the owning page |

Report per candidate page: **stale** (what changed vs what the page still says, and
what needs updating) or **ok**. A change that updates behavior but whose page is
untouched in the same diff is the finding. End with a one-line verdict: pages needing
an update (if any), else "docs in sync". Switch to sync mode to apply the updates.

## Doc structure (adapt to project)

Prefer:

- `doc/README.md` — index and links to other pages.
- `doc/architecture.md` — components and data flow (add Mermaid only when the system is non-trivial).
- `doc/api.md` — HTTP API (methods, payloads, examples with real paths).
- `doc/deployment.md` — Docker, compose, production notes.
- `doc/configuration.md` — env vars, runtime config, asset paths, feature flags.

Use **`doc/reference.md`** only for long tables or verbose material (progressive disclosure).

## Quality rules

- **`curl` examples** must use real paths, ports, and JSON fields from code.
- **Remove or update** stale sections; do not leave contradictory instructions between README and `doc/`.
- **Diff-first** (when the user provides a diff or file list): prioritize touched areas before broad rewrites.

## Relationship to AGENTS.md / internal specs

- Do not duplicate full user documentation inside agent-only specs. Prefer linking **`doc/`** from `AGENTS.md` when operators need the same facts.

## Additional material

For section templates and a longer checklist, see [reference.md](reference.md).
