Skill v1.0.2
currentAutomated scan100/100~3 modified
name: maintaining-core-documentation description: | Creates, maintains, and synchronises core project documentation (README, TODO, PRD, SPEC, ARCHITECTURE, DESIGN, TESTING, GUIDE, Deployment, and conditional Conductor context) using progressive disclosure, strict single-source-of-truth boundaries, and OKF v0.2 frontmatter. Use when writing, updating, auditing, or reviewing project documentation after codebase, architecture, testing, roadmap, or deployment changes. metadata: version: "1.0.2" author: Darren "Dazbo" Lester repository: https://github.com/derailed-dash/dazbo-agent-skills
Maintaining Core Documentation
A structured framework for creating and synchronising technical documentation across software repositories without duplicating content or wasting context tokens.
Table of Contents
- Triggers
- Progressive Disclosure & Selective Loading
- Core Principles & Anti-Redundancy
- OKF-Lite Frontmatter Standard (OKF v0.2)
- Document Routing Matrix
- Per-Document Boundaries & Notes
- Formatting & Diagram Rules
- Documentation Review Process
Triggers
Activate this skill whenever:
- The user requests documentation creation, restructuring, or an audit/review.
- Code changes introduce or alter features, public APIs, CLI commands, schemas, or architecture.
- Test suites, static quality gates, or CI workflows change.
- Infrastructure, Terraform variables, secrets, or deployment workflows change.
- Project milestones are completed or re-prioritised.
Progressive Disclosure & Selective Loading
Never read every documentation file, template, or sample upfront. Follow this three-tier loading protocol so routine updates remain fast and token-efficient:
- Tier 1 — Triage Before Reading:
- Inspect
git status --shortandgit diff(or the user request) and match impacted concerns against the Document Routing Matrix before opening documentation files. - Read only the existing repository documents inside the change's blast radius (plus
README.mdordocs/SPEC.mdonly if baseline project context is not yet loaded). - For
docs/*.mdfiles carrying OKF frontmatter, scan the first ~10 lines (type,description,status) to confirm relevance before loading the full body.
- Tier 2 — Templates On-Demand Only:
- Read a
./references/<DOC>.md.templatefile only when creating a missing document from scratch, restructuring a stub/malformed file, or performing a full-repository documentation audit. - Skip reading templates during incremental edits to well-structured documents.
- Tier 3 — Samples Strictly as Greenfield Exemplars:
- Read files under
./references/samples/only when authoring a substantial greenfield document that requires an exemplar for depth, tone, or YAML token schema (e.g. Stitch tokens inDESIGN.mdor ADR tables inARCHITECTURE.md). - Never read sample files during routine documentation synchronisation.
Core Principles & Anti-Redundancy
- Expert Architect Tone: Explain the why behind architectural choices alongside concise, accurate instructions. Ask the user whenever design rationale, scope, or trade-offs are unclear rather than inventing justification.
- Single Source of Truth (Minimal Overlap): Every fact has one canonical owner; cross-link rather than copying version tables, command recipes, or deployment steps across files. Root
README.mdis the sole intentional front-door exception summarising headline stack/commands and linking intodocs/anddeployment/. - Verify Against Ground Truth: Never assume existing docs are current. Verify paths, flags, dependencies, environment variables, and models directly against code,
pyproject.toml,package.json,Makefile,*.tfvars, and.env.template. - Brownfield Path First & Cross-Sync: Default greenfield layout uses
docs/*.md, rootREADME.md/TODO.md, anddeployment/README.md, but always respect existing repository locations first (e.g. rootSPEC.md,SPEC-<module>.md, or rootARCHITECTURE.md) rather than creating duplicates. Propagate shared command, path, and environment variable updates to.env.templateandAGENTS.md/GEMINI.md/CLAUDE.mdwhere present. - Clarity & Scannability: Lead with the reader's goal using active voice, present tense, descriptive headings, bulleted lists or tables for 3+ items, and runnable examples where helpful.
OKF-Lite Frontmatter Standard (OKF v0.2)
All documents under docs/*.md adopt lightweight Open Knowledge Format (OKF v0.2) YAML frontmatter so agents and humans can triage purpose and lifecycle state from the file header alone:
---type: "Technical Specification" # REQUIRED: Human-readable doc kindtitle: "Project — Technical Specification"description: "One-sentence summary used for triage and indexing."status: "stable" # draft | stable | deprecated# Optional provenance & sign-off:# verified: { by: "human:<id>", at: "YYYY-MM-DDTHH:MM:SSZ" }# sources:# - id: prd# resource: PRD.md# title: Product Requirements---
- `docs/DESIGN.md` Compatibility: OKF v0.2 preserves producer extension keys, so merge
type,title,description, andstatuscleanly alongside Google Stitch design token keys (version,name,colors,typography,rounded,spacing,components). - Frontmatter-Free Landing Pages: Keep
README.md,TODO.md, anddeployment/README.mdwithout YAML frontmatter so GitHub renders them cleanly as repository and folder landing pages. - No Unnecessary Bundle Files: Omit
docs/index.mdanddocs/log.mdin standard repositories (rootREADME.mdalready indexes docs and Git tracks history). Defer full Knowledge Catalog OKF bundles (_links.yaml,Attested Computation) tocurate-context.
Document Routing Matrix
Identify impacted documents from your change set before reading or editing:
| Target Path (Default) | Policy | Primary Trigger Signals | Canonical Ownership (What Lives Here) | Template & Sample | |
|---|---|---|---|---|---|
README.md | Core (offer if missing) | New top-level dir, make target, setup step, headline stack shift | Front-door overview, doc index table, folder tree, quick start, headline commands & deploy summary | README.md.template / Sample | |
TODO.md | Optional (if present, or offer) | Milestone completed, new backlog item discussed | High-level roadmap & feature backlog checkboxes ([x], [~], [ ]) | TODO.md.template / Sample | |
docs/PRD.md | Conditional (product/app repos) | Vision, persona, metric, MVP vs future scope, or non-goal change | Product why & who: problem, personas, success metrics, user stories, explicit non-goals (zero tech stack) | PRD.md.template / Sample | |
docs/SPEC.md | Core (SDD) | New feature/contract, SDK/model lock change, boundary or B1–Bn change | Engineering contract: objective, optional capability map, FR/NFRs, pinned locks, Always/Ask/Never, binary rubric | SPEC.md.template / Sample | |
docs/ARCHITECTURE.md | Core (multi-module repos) | New ADR, schema/model change, layer/API boundary, security or cloud topology | Blueprint: ADR table, component/runtime PNG diagrams, data schemas, security/CORS/rate-limit, concise lifecycles | ARCHITECTURE.md.template / Sample | |
docs/DESIGN.md | Conditional (UI or rich CLI) | UI framework, CSS/theme tokens, component library, or CLI rich UX change | Stitch YAML tokens, colours, typography, layout, elevation, UI components, Do's/Don'ts, CLI UX | DESIGN.md.template / Sample (Swiss) | |
docs/TESTING.md | Core (tested repos) | New/changed tests, static gates, CI=true/mock rules, QA recipes | Static gates, local vs CI behaviour, test inventory table, targeted test commands, manual curl/QA checks | TESTING.md.template / Sample | |
docs/GUIDE.md | Optional (complex apps/CLIs) | Complex feature flow, CLI flags/YAML schema, contributor onboarding tour | Hands-on user/feature walkthroughs, CLI pipeline recipes, YAML schemas, contributor codebase tour | GUIDE.md.template / Sample | |
deployment/README.md | Core (deployable repos) | Terraform, APIs, IAM, .tfvars/.env propagation, git-crypt, CI/CD change | Infra directory tree, .tfvars -> runtime flow, secrets handling, Terraform/deploy commands, CI/CD & IAM | DEPLOYMENT-README.md.template / Sample | |
conductor/ (3 files) | Conditional (only if present) | Out-of-Conductor tech stack, branding, or product shift | Sync product.md, product-guidelines.md, tech-stack.md only | (Conductor-managed) |
Per-Document Boundaries & Notes
- `docs/ARCHITECTURE.md` vs `docs/GUIDE.md` (No Monolith): Keep
ARCHITECTURE.mdstrictly structural (ADRs, diagrams, data schemas, security controls, brief component lifecycles). Put step-by-step feature tutorials, CLI flags, sample import YAML schemas, and codebase tours indocs/GUIDE.md. Note that persistentdocs/GUIDE.mdis distinct from Antigravity's ephemeral per-taskwalkthrough.mdsession artefacts. - ADR Alignment: Record high-signal decisions in
ARCHITECTURE.md's ADR table. If the repository already maintains standalone numbered ADR files (docs/adr/ordocs/decisions/), keep the table concise and link each row to its ADR file rather than duplicating full prose. - Conductor Coexistence: If
conductor/is active, do not create duplicate root/docsPRD.mdorSPEC.mdfiles whereconductor/product.mdandconductor/tracks/<track_id>/spec.mdalready own them. Never modifyconductor/workflow.md,conductor/tracks.md,conductor/setup_state.json,conductor/code_styleguides/, orconductor/archive/. - Task Tracking Boundary: Keep high-level feature milestones in
TODO.md; leave fine-grained implementation slices intasks/plan.md,tasks/todo.md, or Conductor track plans. Offer to mark matchingTODO.mdmilestones complete ([x]) when finished. - Rubric Tagging (`[det]` / `[arch]` / `[ui]`): Tag every
B1–Bnrow inSPEC.md([det],[arch], or[ui]/[mech]/[docs]) using clean single-wrapper IDs (e.g. `B1 [det]) so automated loop runners (tiered-rubric-loop`) route checks accurately without ambiguity while preserving human readability.
Formatting & Diagram Rules
- Headings: Every Markdown heading (
#,##,###,####) MUST be followed immediately by a blank line. - Links: Always use clickable relative Markdown paths (e.g.
[docs/SPEC.md](docs/SPEC.md)); never use absolutefilescheme URIs. - Tables & Code Fences: Present structured inventories, configs, commands, and ADRs as Markdown tables; wrap all commands/snippets in language-tagged fenced code blocks.
- Diagrams (`NEVER` Use Mermaid or ASCII Box Diagrams):
- NEVER insert
mermaidcode blocks (`mermaid) or ASCII/Unicode box-and-arrow diagrams in any documentation file. - Standard
`textdirectory trees using├──,│, and└──insideProject Structuresections are permitted and expected. - For architecture, component, sequence, or deployment topology diagrams, generate PNG assets saved inside the repo (e.g.
docs/images/ormedia/) and embed them via relative links ().
Documentation Review Process
Track progress cleanly when updating documentation:
Documentation Update Progress:- [ ] Step 1: Triage impacted docs via the Document Routing Matrix (read only affected files).- [ ] Step 2: Confirm excluded Conductor/ephemeral paths are left untouched.- [ ] Step 3: Load `.md.template` (and `.md` sample only if greenfield) on demand; verify facts against code/config.- [ ] Step 4: Update impacted docs preserving single-source-of-truth boundaries, OKF-Lite frontmatter on `docs/*.md`, and cross-links.- [ ] Step 5: Validate formatting (blank line after headings, relative links only, zero `mermaid` or ASCII flow diagrams).- [ ] Step 6: Run applicable project checks (e.g. `codespell -s`, plus `uv run --offline ~/.gemini/config/skills/tiered-rubric-loop/scripts/eval_rubric.py --dry-run --json` whenever `SPEC.md` or `docs/SPEC.md` is authored/updated) and present the Summary Table.
Summary Table Format
| Document | Status | Change Summary / Rationale | |
|---|---|---|---|
README.md | Updated / No Change | [Brief summary of update OR why no change was needed] | |
docs/SPEC.md | Updated / No Change / N/A | [e.g. Added FR-4 and B7 for new --simulate flag] | |
docs/ARCHITECTURE.md | Updated / No Change | [e.g. Recorded ADR for rate-limiting strategy] |