Update Docs
Ensures documentation stays in sync with code changes. Run before or during every PR that touches library code.
Before anything else
- Read CLAUDE.md — understand boundaries (core vs server), dropped features, and session model
- Read .docs-style-guide.md — binding terminology reference
Step 1: Detect what changed
git diff main...HEAD --name-only
Map changes to affected docs:
| Source file |
Affected doc pages |
src/edictum/pipeline.py, rules.py |
concepts/how-it-works.md, architecture.md |
src/edictum/yaml_engine/ |
rules/yaml-reference.md, rules/operators.md |
src/edictum/adapters/*.py |
corresponding adapters/*.md page |
src/edictum/session.py, limits.py |
concepts/rules.md, architecture.md |
src/edictum/audit.py, telemetry.py |
audit/sinks.md, audit/telemetry.md |
src/edictum/cli/ |
cli.md |
src/edictum/envelope.py |
concepts/principals.md, architecture.md |
pyproject.toml (version) |
install commands across docs |
src/edictum/__init__.py (API) |
quickstart.md, all adapter pages |
If no library code changed (docs-only PR), skip to Step 4.
Step 2: Read the changed code
For each changed file:
- Read the file and the diff (
git diff main...HEAD -- <file>)
- Identify: new public APIs, changed signatures, new classes, removed exports, changed behavior
Step 3: Update affected docs
For each affected page:
- Read the current doc
- Skip if already correct
- Update code examples, descriptions, YAML examples
- Verify "When to use this" section exists (see .docs-style-guide.md page structure pattern step 3):
- Every page MUST have a
## When to use this section after the opening/example and before the main content
- If missing, add one with: 2-4 concrete scenarios (real situations, not abstract descriptions), user personas who benefit, and how this feature relates to other Edictum features
- If new code adds a feature, update the scenarios to cover the new capability
- Read the ACTUAL SOURCE CODE for the feature before writing scenarios — reference real method names, real classes, real behavior
- Verify terminology against .docs-style-guide.md:
- "rules" not "policies", "contracts", or "guards"
- Use
blocked (see .docs-style-guide.md for banned alternatives)
- Use
enforces (not "governs")
- Use
pipeline (not "engine")
- Use
tool call (not "function call")
- Use
adapter (not "integration" or "plugin")
- Use
observe mode (see .docs-style-guide.md for banned alternatives)
- Use
violation / violations (not "finding" or "alert")
- Verify core vs server boundaries against CLAUDE.md:
- All rule evaluation (check, check_output, session, sandbox) is core
- StdoutAuditSink, FileAuditSink, OTel are core
- Production approval workflows (ServerApprovalBackend) require the server
- Centralized audit dashboards require the server
- Multi-process session tracking requires the server
- MemoryBackend is the only local StorageBackend (no Redis/DB)
- No references to dropped features or ee/ tier
Step 3.5: Update repo-level markdown files
These files live outside docs/ but track code changes:
- CHANGELOG.md — if the PR introduces user-visible changes (fixes, features, breaking changes), add an entry under the current version heading. Use the existing entry format. Keep descriptions neutral (no exploit details for security fixes).
- CLAUDE.md "What's Shipped" section — if this is a new version, add a one-line entry to the version history list matching the existing format.
Step 4: Update README if needed
If public API, install extras, framework support, or version changed:
- Read README.md
- Update affected sections
- Ensure README matches docs/index.md positioning
Step 5: Verify
pytest tests/test_docs_sync.py -v
Step 6: Report
Summarize:
- Which code files changed
- Which doc pages were updated (and what changed)
- Which doc pages were checked but needed no changes
- Build verification result
Rules
- Don't rewrite for the sake of rewriting. Only update what the code change actually affects.
- Don't add features that don't exist. If code was added but not released, note it as unreleased.
- Don't reference dropped features. No Redis/DB StorageBackend, no reset_session().
- Preserve the voice. Match existing style — problem first, short paragraphs, code examples.
- Check cross-links. Verify links in updated pages still work.
- README and homepage must stay aligned. If you update one, check the other.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: update-docs3description: Sync documentation with code changes. Use on every PR that touches library code to keep docs accurate and consistent. Use when this capability is needed.4---56# Update Docs78Ensures documentation stays in sync with code changes. Run before or during every PR that touches library code.910## Before anything else11121. **Read CLAUDE.md** — understand boundaries (core vs server), dropped features, and session model132. **Read .docs-style-guide.md** — binding terminology reference1415## Step 1: Detect what changed1617```bash18git diff main...HEAD --name-only19```2021Map changes to affected docs:2223| Source file | Affected doc pages |24|---|---|25| `src/edictum/pipeline.py`, `rules.py` | concepts/how-it-works.md, architecture.md |26| `src/edictum/yaml_engine/` | rules/yaml-reference.md, rules/operators.md |27| `src/edictum/adapters/*.py` | corresponding adapters/*.md page |28| `src/edictum/session.py`, `limits.py` | concepts/rules.md, architecture.md |29| `src/edictum/audit.py`, `telemetry.py` | audit/sinks.md, audit/telemetry.md |30| `src/edictum/cli/` | cli.md |31| `src/edictum/envelope.py` | concepts/principals.md, architecture.md |32| `pyproject.toml` (version) | install commands across docs |33| `src/edictum/__init__.py` (API) | quickstart.md, all adapter pages |3435If no library code changed (docs-only PR), skip to Step 4.3637## Step 2: Read the changed code3839For each changed file:401. Read the file and the diff (`git diff main...HEAD -- <file>`)412. Identify: new public APIs, changed signatures, new classes, removed exports, changed behavior4243## Step 3: Update affected docs4445For each affected page:461. Read the current doc472. Skip if already correct483. Update code examples, descriptions, YAML examples494. **Verify "When to use this" section** exists (see .docs-style-guide.md page structure pattern step 3):50 - Every page MUST have a `## When to use this` section after the opening/example and before the main content51 - If missing, add one with: 2-4 concrete scenarios (real situations, not abstract descriptions), user personas who benefit, and how this feature relates to other Edictum features52 - If new code adds a feature, update the scenarios to cover the new capability53 - Read the ACTUAL SOURCE CODE for the feature before writing scenarios — reference real method names, real classes, real behavior545. **Verify terminology** against .docs-style-guide.md:55 - "rules" not "policies", "contracts", or "guards"56 - Use `blocked` (see .docs-style-guide.md for banned alternatives)57 - Use `enforces` (not "governs")58 - Use `pipeline` (not "engine")59 - Use `tool call` (not "function call")60 - Use `adapter` (not "integration" or "plugin")61 - Use `observe mode` (see .docs-style-guide.md for banned alternatives)62 - Use `violation` / `violations` (not "finding" or "alert")636. **Verify core vs server boundaries** against CLAUDE.md:64 - All rule evaluation (check, check_output, session, sandbox) is core65 - StdoutAuditSink, FileAuditSink, OTel are core66 - Production approval workflows (ServerApprovalBackend) require the server67 - Centralized audit dashboards require the server68 - Multi-process session tracking requires the server69 - MemoryBackend is the only local StorageBackend (no Redis/DB)70 - No references to dropped features or ee/ tier7172## Step 3.5: Update repo-level markdown files7374These files live outside `docs/` but track code changes:75761. **CHANGELOG.md** — if the PR introduces user-visible changes (fixes, features, breaking changes), add an entry under the current version heading. Use the existing entry format. Keep descriptions neutral (no exploit details for security fixes).772. **CLAUDE.md "What's Shipped" section** — if this is a new version, add a one-line entry to the version history list matching the existing format.7879## Step 4: Update README if needed8081If public API, install extras, framework support, or version changed:821. Read README.md832. Update affected sections843. Ensure README matches docs/index.md positioning8586## Step 5: Verify8788```bash89pytest tests/test_docs_sync.py -v90```9192## Step 6: Report9394Summarize:95- Which code files changed96- Which doc pages were updated (and what changed)97- Which doc pages were checked but needed no changes98- Build verification result99100## Rules101102- **Don't rewrite for the sake of rewriting.** Only update what the code change actually affects.103- **Don't add features that don't exist.** If code was added but not released, note it as unreleased.104- **Don't reference dropped features.** No Redis/DB StorageBackend, no reset_session().105- **Preserve the voice.** Match existing style — problem first, short paragraphs, code examples.106- **Check cross-links.** Verify links in updated pages still work.107- **README and homepage must stay aligned.** If you update one, check the other.108109---110> Converted and distributed by [TomeVault](https://tomevault.io/claim/acartag7) — claim your Tome and manage your conversions.111<!-- tomevault:4.0:skill_md:2026-04-13 -->