| Document | Update Required? |
|---|---|
CLAUDE.md |
Yes — update package map section (compact) |
docs/architecture/ |
Yes — run structural checks below |
README.md |
Only if it affects CLI usage or quick start |
| Document | Update Required? |
|---|---|
ARCHITECTURE.md |
Yes — if architectural decisions changed |
README.md |
Yes — if user-visible behavior changed |
docs/architecture/ |
Yes — run structural checks below |
docs/reference/cli/ |
Automatic — make docs regenerates CLI reference |
| Document | Update Required? |
|---|---|
ARCHITECTURE.md |
Yes — add row to ADR summary table |
| New file | Create docs/adrs/<research-slug>/NNN-title.md |
| Document | Update Required? |
|---|---|
CLAUDE.md |
Yes — update package map section |
docs/architecture/ |
Yes — run structural checks below |
docs/reference/provider-guide.md |
Only if the pattern changes |
| Document | Update Required? |
|---|---|
CONTRIBUTING.md |
Yes — issue tracking section |
CLAUDE.md |
Only if core rules change |
| Document | Update Required? |
|---|---|
README.md |
Yes — update CLI flags or usage section |
docs/reference/cli/ |
Automatic — make docs regenerates |
docs/design/ |
If UX conventions changed |
- Every PR should include doc updates for any user-visible or architecture-level change.
- Root-level docs are the entry layer — ARCHITECTURE.md for architecture/ADRs, DESIGN.md for UX/taste, CONSTITUTION.md for invariants. Link from these to
docs/for details; don't put implementation detail in root files. - CLAUDE.md (= AGENTS.md) is the agent entry point — keep it as a short TOC with a package map; put details in
docs/. - Don't duplicate — cross-link between docs instead of copying content.
- docs/ is the system of record — organize by content type, not audience.
- Run
make docsafter any CLI changes — regenerates reference docs. - Don't hardcode volatile values — avoid exact counts ("18 patterns", "10 ADRs"), specific dates ("Generated: 2026-03-02", "Last updated: ..."), confidence percentages, or domain counts in docs. These go stale immediately, create merge conflicts, and add no value over
git log. Use descriptive labels instead ("recurring patterns", "high confidence"). The only exception is dates in ADR status fields, which are inherently historical.
When a PR changes internal/ or cmd/ structure, run these checks against
docs/architecture/ to detect staleness. Only flag structural changes
that shift architecture — not line-level edits, test changes, or formatting.
Check: ls internal/
Every top-level directory in internal/ should appear in:
docs/architecture/architecture.md(layered architecture description)docs/architecture/project-structure.md(directory layout section)CLAUDE.md(compact package map)
Severity: Missing coverage (medium) for new architectural layers. Low for utility packages nested under existing layers.
Check: ls cmd/gcx/*/
Every command group directory in cmd/gcx/ should appear in:
docs/architecture/cli-layer.md(command tree section)CLAUDE.md(package map)
Severity: Missing coverage (high) for user-facing command groups.
Check: Count patterns documented in docs/architecture/patterns.md.
Cross-reference against code for new patterns:
- Provider interface pattern (if new provider packages exist)
- Translation adapter pattern (if
adapter.gofiles exist in provider packages) - Any new interface with 3+ implementations
Severity: Missing coverage (medium) for patterns used across multiple packages.
Check: Read internal/config/types.go
The GrafanaConfig and Context struct shapes should match the data model
described in docs/architecture/config-system.md. Flag:
- New struct fields representing new concepts
- New nested structs
- New environment variable constants
Severity: Stale reference (high) if data model diagram is materially wrong.
Check: Count distinct data flow pipelines:
- Push pipeline (local -> Grafana via k8s API)
- Pull pipeline (Grafana -> local via k8s API)
- Delete pipeline (local -> Grafana deletion)
- Serve pipeline (local -> browser preview)
- Provider-specific pipelines (push/pull via REST API)
Each should be documented in docs/architecture/data-flows.md.
Severity: Missing coverage (high) for entirely new pipeline types.
Check: ls docs/architecture/*.md
Every .md file in docs/architecture/ (except README.md) must be listed
in docs/architecture/README.md's navigation table.
Severity: Structural issue (medium) for unlisted docs.
When updating docs to fix violations:
- Preserve existing style — match formatting, heading levels, writing style
- Add, don't rewrite — insert new sections or rows; don't reorganize unaffected content
- Stay high-level — architecture-level descriptions, not implementation details
- Cross-link — add corresponding entries in README.md and CLAUDE.md if appropriate
- No metadata headers — don't add "Generated:", "Last updated:", or
"Confidence: N%" lines to doc files. Use
git logfor provenance.
| Severity | Definition | Action |
|---|---|---|
| Stale reference | Documented path/type/package no longer exists or materially changed | Must fix |
| Missing coverage | New package/command/pattern/pipeline undocumented | Should fix |
| Structural issue | README index incomplete, metadata outdated | Nice to fix |