| source | https://github.com/juliusz-cwiakalski/agentic-delivery-os/blob/main/doc/documentation-handbook.md | |
|---|---|---|
| ados_distribution | redistributable | |
| id | DOC-HANDBOOK | |
| status | Accepted | |
| created | 2025-09-22 | |
| last_updated | 2026-06-26 | |
| owners |
|
|
| summary | Repository documentation structure, conventions, and workflow. |
Audience: Engineers, product/design, operators, and AI coding/analysis agents.
Goal: A single, predictable docs layout that scales across all repositories (UI apps, microservices, libraries), is easy for humans to navigate, and is highly effective for AI agents to find the right context and write/update specs.
- Path in every repo:
doc/documentation-handbook.md - Linked from:
/README.md→ add a short “Docs at a glance” section linking here and todoc/00-index.md.doc/00-index.md→ add a prominent link “Documentation Handbook (how docs work)”.
Keep this file identical across repos. Treat it as shared (see §10) with your chosen sync mechanism ( submodule/subtree/automation).
- Separation of Concerns:
- Humans primarily read and write under
/doc. - OpenCode tooling (agents/commands) lives under
/.opencode. - Repo-specific agent instructions live under
/.ai/agent. - Local agent context lives under
/.ai/localand is git-ignored.
- Humans primarily read and write under
- Single Source of Truth: Contracts (OpenAPI/AsyncAPI/schemas) are canonical under
/doc/contractsin the owning repo; consumers pull them as versioned artifacts. - Evolution is Trackable: New behavior starts as a Change (
/doc/changes/YYYY-MM/YYYY-MM-DD--<workItemRef>--<slug>/), settles with a Decision Record, and updates the Spec (/doc/spec). - Predictable Conventions: Numbering, front-matter, and naming are consistent and enforced by lightweight checks.
Before creating new documentation areas, humans and agents must determine the active repository profile.
engineering-repocentral-product-docs-repobusiness-strategy-repomixed-product-engineering-repo
If present, this file is the deterministic write-safety contract for docs creation:
idstatusprofilebusiness_docs_enabledbusiness_docs_rootcanonical_strategy_repoallowed_write_rootsforbidden_write_rootsownerslast_updated
If doc/documentation-profile.md is missing, assume:
profile: engineering-repobusiness_docs_enabled: false- No new business documentation content should be created unless a user explicitly requests it. Because the profile is missing, there is no configured
business_docs_root; if business docs are intentionally enabled later, assume the default root isdoc/business(contents underdoc/business/**) unlessdoc/documentation-profile.mdspecifies a differentbusiness_docs_root.
If a user asks for business artifacts while disabled, explain the constraint and suggest either:
- Using the canonical strategy repository configured by the team, or
- Intentionally adding/updating
doc/documentation-profile.mdfirst.
When business docs are enabled, the configured business_docs_root may be used as a capability map (default: doc/business, i.e., the tree under doc/business/**; create only what is needed). The areas below are relative to that configured root:
context/market/customers/product-strategy/discovery/growth/marketing/sales/customer-success/finance/metrics/operations/research/meetings/
This is an optional map for navigation and ownership boundaries, not a requirement to create a full empty folder tree or placeholder documents.
- Current-truth docs represent accepted strategy and should be maintained.
- Raw notes (interviews, feedback, research, meeting notes) are supporting evidence and should not override current truth until synthesized.
- Raw evidence should include:
source_type(for example: interview, sales-call, support-feedback, market-research)synthesis_status(raw,in-review,synthesized)
The first iteration commits at most the following examples; none are required and none have been committed yet. Treat this list as a ceiling, not an inventory.
- Engineering profile example
- Central product docs profile example
- BDR example
- Experiment register example
- Minimal business index example
Meeting agendas, minutes/summaries, and transcripts use a single combined meeting-notes-template.md that starts as an agenda before the meeting and is extended into a summary afterward. The document has distinct sections for agenda/prep (copy/paste-friendly), discussion, decisions, action items, ideas, open questions, parked items, and notes worth keeping.
Document lifecycle:
- Before the meeting: fill in the "Agenda & Preparation" block (goal, time-boxed topics, prep, attendees, roles).
- During the meeting: capture discussion, decisions, action items, ideas, open questions, parked items.
- After the meeting: finalize the summary, update
statustoAccepted,document_classificationtocurrent-truth,synthesis_statustosynthesized. Send action items within 60 minutes; distribute the full summary within 24 hours.
Two ways to share the agenda:
- Copy/paste: select the "Agenda & Preparation" block from the meeting notes file and paste it into the calendar invite.
- Git-native: commit the meeting notes file (or open a PR) before the meeting and share the file/PR URL as the calendar invite link. Collaborators can comment on the agenda, ask questions, and propose additions before the meeting starts.
Storage rules:
- Repo-scoped meetings (e.g., a microservice planning session, a service team retro) live in
doc/meetings/of the implementation repository. This is engineering-safe and allowed by default in all profiles. - Cross-repo, product, or business meetings (e.g., product strategy review, all-hands, leadership sync) live in
doc/business/meetings/of the canonical strategy repository. This requiresbusiness_docs_enabled: trueor explicit user direction. - When in doubt, an agent asks the user whether the meeting is repo-scoped or cross-repo before selecting the write location.
Filename and transcript convention:
doc/meetings/YYYY-MM-DD-<topic-slug>.md— single file with agenda + summary + decisions + action items.doc/meetings/transcripts/YYYY-MM-DD-<topic-slug>.txt— full transcripts stored in atranscripts/subfolder (one click away, not inlined).- For business meetings:
doc/business/meetings/YYYY-MM-DD-<topic-slug>.mdanddoc/business/meetings/transcripts/. - Link transcripts and recordings via
transcript_urlandrecording_urlin front matter.
Classification:
- Raw agendas, live notes, and transcripts are
document_classification: raw-evidencewithsource_type: meeting. - When the summary, decisions, and action items are accepted, update the document to
document_classification: current-truthandsynthesis_status: synthesized. - Significant decisions recorded in a meeting should also be filed as ADR/PDR/BDR records in
doc/decisions/and cross-linked viarelated_decisions.
/README.md # Short repo intro + quick links to doc/
/CONTRIBUTING.md # PR/MR rules, coding & docs conventions
/CHANGELOG.md # Keep a Changelog style (optional)
/.opencode/ # OpenCode agents + commands (repo-local tooling)
/agent/ # One file per agent prompt
/command/ # Repeatable commands/macros
/.ai/ # Repo-specific agent config + local context
/agent/ # Repo-specific agent instructions (committed, incl. code-review checklist)
/local/ # Local agent context (git-ignored)
/rules/ # Optional org-wide rules
/doc/
00-index.md # Manual TOC + “For humans”/“For AI agents” entry points
/guides/ # Developer how-to guides (local setup, tooling, debugging)
/overview/
01-north-star.md # Repo-appropriate extract if not the product root
02-roadmap.md # High-level phases + links to changes/ADRs
architecture-overview.md # C4/mermaid overview diagrams
glossary.md # See §9 for scope
ubiquitous-language.md # See §9 for scope
/spec/ # Current truth (coherent, post-change)
features/ # Feature-level specs (UI or service)
api/ # Endpoint/operation descriptions (human layer)
nonfunctional.md # Perf, security, scalability envelopes
/changes/ # Proposed & accepted changes (evolution log)
YYYY-MM/
YYYY-MM-DD--<workItemRef>--<slug>/
chg-<workItemRef>-spec.md # Canonical change spec (with front-matter)
chg-<workItemRef>-test-plan.md # Per-change test plan (traceable to AC)
chg-<workItemRef>-plan.md # Implementation plan (phases/tasks)
chg-<workItemRef>-pm-notes.yaml # PM progress + decisions + open questions
chg-<workItemRef>-notes.md # Optional free-form notes
/decisions/ # Decision Records (ADR/PDR/TDR/BDR/ODR)
ADR-0001-short-title.md # Type-prefixed, zero-padded 4-digit number
/contracts/
rest/
openapi.yaml # Can be generated; is canonical in owning repo
examples/ # HTTP request/response samples
events/
asyncapi.yaml # Event catalog; channels, messages, bindings
schemas/ # JSON Schema / Avro for event payloads
data/
schemas/ # DB/Dynamo/ES schemas (if applicable)
/domain/
ubiquitous-language.md # (Mirrors /overview file or links to global)
aggregates-and-entities.md # Domain model at rest
events-catalog.md # Business events (domain perspective)
/quality/
test-specs/ # Tessa’s output; manual/automated test specs
performance/ # Perf test plans & SLAs
security/ # Threat model (STRIDE/LINDDUN), controls
/ops/
runbooks/ # On-call playbooks
observability/ # Metrics, logs, traces, dashboards
troubleshooting/ # Known issues, fixes, log signatures
incident-reviews/ # Post-incident docs (blameless)
/analytics/
tracking-taxonomy.md # App/UX events mapping (UI repos esp.)
/i18n/ # Translation notes, error terms (UI repos)
/tools/ # User guides for CLI tools in tools/ (one per tool)
/diagrams/ # Mermaid/PlantUML sources; exported PNG/SVG
/examples/ # Payloads, fixtures, UI mocks (shared samples)
/meetings/ # Repo-scoped meeting notes (agenda + summary + decisions + action items)
/transcripts/ # Full meeting transcripts (linked via transcript_url, not inlined)
/templates/ # Authoring templates (change spec, decision record, feature, test, plan)
/prompts/ # Human-facing generation prompts (copy/UX)
/scripts/
doc/
doc-checks.sh # Lints front-matter, numbering, links (optional; see §14 for current availability)
build-docs.sh # Optional mkdocs/docusaurus export
/agent/: Repo-specific instructions that agents must follow (committed). Includespm-instructions.md(issue tracker config) andpr-instructions.md(PR/MR platform config)./local/: Local-only agent context (git-ignored). Never commit content from here./rules/: Optional rules such as the spec workflow, naming conventions, review criteria.
/agent/: Agent prompts./command/: CLI commands that compose agents.
Why: Agents become deterministic and fast by loading only the relevant context (see
AGENTS.mdand.opencode/agent/for agent definitions).
-
00-index.md: Landing page for docs. Include:- “Start here” (overview, architecture, current spec)
- “Changing behavior?” (how to write a change)
- “For AI agents” (link to
AGENTS.mdand.opencode/agent/)
-
/overview/:01-north-star.mdand02-roadmap.md: Keep concise, repo-relevant extracts (if the full product vision lives elsewhere, link to it).architecture-overview.md: High-level C4/mermaid; link to/doc/diagramsfor sources.glossary.mdvsubiquitous-language.md: See §9 for the difference and usage.- For the full set of overview files with Recommended / Conditional / Optional classification (including product-discovery and UX artifacts), see the Inception Artifact Catalog section below and the Project Inception guide.
-
/spec/: The coherent, up-to-date description of the system after applying accepted changes. Split intofeatures/,api/, and a singlenonfunctional.md(SLOs, auth, rate limits, perf goals). -
/guides/: Practical, step-by-step developer guides for common tasks. This is the home for "how-to" documentation, such as local environment setup, debugging procedures, and using repository-specific tooling (e.g., AI-powered MR helpers). While/ops/runbooksare for on-call procedures,/guidesare for day-to-day development workflows. -
/changes/YYYY-MM/YYYY-MM-DD--<workItemRef>--<slug>/:chg-<workItemRef>-spec.md(required): The proposal accepted change (CHANGE SPEC).chg-<workItemRef>-test-plan.md(recommended): Per-change test plan aligned to the CHANGE SPEC.chg-<workItemRef>-plan.md(recommended): Work breakdown, risks, rollout/rollback (IMPLEMENTATION PLAN).chg-<workItemRef>-pm-notes.yaml(recommended): PM progress + decisions + open questions.examples.json(optional): Requests/responses, UI screenshots links.
-
/decisions/<TYPE>-<zeroPad4>-<slug>.md: Decision records (ADR/PDR/TDR/BDR/ODR). A change may produce 0..n decision records. Link them both ways:- From the change front-matter:
links.decisions: ["ADR-0021"] - From the decision record: reference the
workItemRefin the body or via front-matterlinks.related_changes.
- From the change front-matter:
-
/contracts/:rest/openapi.yaml: HTTP contracts (server = owner). Generated clients should come from this file’s versioned release.events/asyncapi.yaml+events/schemas/: Event channels and payload types. Producer owns the event. Consumers align via versioned schemas.data/schemas/: Schema docs for databases/collections/tables (for operators & migration planning).
-
/domain/:ubiquitous-language.md: The authoritative terms for this bounded context.aggregates-and-entities.md: Classifies aggregates, entities, value objects.events-catalog.md: Business/domain events (their meaning, not transport details).
-
/quality/:test-specs/(Tessa output + human additions, organized by feature astest-spec-<feature-slug>.md(e.g.,test-spec-tenants.md))performance/(perf test plans, load profiles, thresholds)security/(threat model, mitigations, test procedures)
-
/ops/:runbooks/(operational procedures)observability/(dashboards, metrics, log fields, trace spans)troubleshooting/(known issues, queries, checklists)incident-reviews/(postmortems)
-
/tools/: User guides for standalone CLI tools published undertools/at the repo root. Each tool gets a dedicated file:doc/tools/<tool-name>.mdwith version, provider/backend setup, usage examples, configuration, troubleshooting, CLI reference, and changelog. Seedoc/guides/tools-convention.mdfor the full standard. -
/analytics/: Tracking taxonomy & mapping to GA/PostHog (mostly UI repos). -
/i18n/: Internationalization specifics (UI repos). -
/diagrams/: Source first (mermaid/PUML), plus exported artifacts. -
/examples/: Cross-cutting example payloads & mocks. -
/meetings/: Repo-scoped meeting notes following themeeting-notes-template.md. Filename:YYYY-MM-DD-<topic-slug>.md. Each meeting file starts as an agenda and is extended into a summary. Transcripts live in/meetings/transcripts/. See §2b for lifecycle, cross-repo/business meeting storage rules, and agenda-sharing workflows. -
/templates/: All authoring templates (change spec, decision record, feature spec, test spec, test plan, implementation plan). -
/prompts/: Human-facing content prompts (marketing copy, release notes). Agent system prompts remain in.opencode/agent/.
doc-checks.sh(optional; see §14 for current availability): Lints front-matter and file naming, checks cross-links.build-docs.sh: Optional static site build (mkdocs + mermaid plugin recommended).
Use front-matter on every doc under /doc so humans & agents can parse metadata.
---
id: GH-456 # or ADR-0021, SPEC-UNITS-DISPLAY, etc.
status: Proposed # Proposed | Accepted | Rejected | Superseded | Deprecated
created: 2025-09-05
last_updated: 2025-09-05
owners: ["juliusz"]
service: "recipes-service" # or "ui-app"
links:
adr: ["ADR-0021"]
supersedes: []
related_changes: ["GH-455"]
contracts:
- "contracts/rest/openapi.yaml#/paths/~1recipes~1search"
summary: "Unify units display across UI using unit IDs + i18n."
---Change conventions:
- Folder:
doc/changes/YYYY-MM/YYYY-MM-DD--<workItemRef>--<slug>/. - Filenames are stable and slug-free:
chg-<workItemRef>-spec.mdchg-<workItemRef>-test-plan.mdchg-<workItemRef>-plan.mdchg-<workItemRef>-pm-notes.yaml
workItemRefis tracker-linked (e.g.,PDEV-123,GH-456).- Decision records:
<TYPE>-<zeroPad4>-<slug>.md(e.g.,ADR-0001-event-bus-selection.md,PDR-0001-free-tier-scope.md). - Kebab-case filenames, short and descriptive.
- Propose a change in
/doc/changes/YYYY-MM/YYYY-MM-DD--<workItemRef>--<slug>/chg-<workItemRef>-spec.md(or via/write-spec <workItemRef>). - Discuss & revise until Accepted/Rejected.
- If the change settles a decision, write a decision record under
/doc/decisions/(or use/plan-decision+/write-decision) and link it from the change. - Create or update the per-change TEST PLAN alongside the spec as
chg-<workItemRef>-test-plan.md(or via/write-test-plan <workItemRef>). - Create or update the IMPLEMENTATION PLAN alongside the spec as
chg-<workItemRef>-plan.md(or via/write-plan <workItemRef>). - Update
/doc/spec/to reflect the final, coherent behavior (ideally via/sync-docs <workItemRef>). - Update
/doc/contracts/(OpenAPI/AsyncAPI/schemas) if any external surface changes. - Align test specs under
/doc/quality/test-specs/with the per-change TEST PLAN. - Implementation: code + tests, referencing the change ID in commit/PR titles.
- Release notes: Use
/doc/prompts/to generate drafts, then publish.
For significant business/product strategy changes, reuse the same lifecycle and naming (chg-*) and capture validation
with methods such as interviews, experiments, landing-page checks, sales calls, metric checks, launch criteria, stop
criteria, and pivot criteria.
Agents: see
AGENTS.mdfor the delivery workflow and.opencode/command/*.mdfor per-step context loading.
- New feature/behavior: start with a Change spec (template in
/doc/templates/). - Decision needed: author an ADR/TDR/PDR/BDR/ODR under
doc/decisions/; link it to the Change. Pricing defaults to BDR unless product scope (PDR) or operational scope (ODR) is a better fit. - Keep Spec fresh: any merged change must update
/doc/spec/in the same PR. - Contracts:
- If you own the API/event: edit
/doc/contracts/**, bump version, regenerate clients. - If you consume it: update the dependency version; never hand-edit owned contracts.
- If you own the API/event: edit
- Ops knowledge: add runbooks/troubleshooting as you learn.
- Review checklist: PRs must include updated docs or an explicit N/A with rationale.
-
Plan & Implement: load the current Change spec, referenced decision records, impacted Spec sections, Contracts, and testing strategy per
AGENTS.mdand.opencode/command/*.md. -
Write artifacts to the right place:
- Implementation plan ->
/doc/changes/**/chg-<workItemRef>-plan.md(or via/write-plan <workItemRef>) - Per-change TEST PLAN ->
/doc/changes/**/chg-<workItemRef>-test-plan.md(or via/write-test-plan <workItemRef>) - PM progress notes ->
/doc/changes/**/chg-<workItemRef>-pm-notes.yaml - Broader test specs ->
/doc/quality/test-specs/ - Updated OpenAPI/AsyncAPI ->
/doc/contracts/** - Final edits to
/doc/spec/**per the change outcome (ideally via/sync-docs <workItemRef>)
- Implementation plan ->
-
Cross-linking: update front-matter
links.*so the web of docs stays navigable. -
Decision compatibility: business/product/operational metadata fields in the decision template are optional; ADR/TDR records remain valid without them.
Ubiquitous Language (DDD):
- A precise, bounded-context vocabulary used by domain experts and developers.
- Names the core domain concepts (Aggregates, Entities, Value Objects, Domain Events) and their relationships.
- Normative: terms here are binding within this context.
- Location:
/doc/overview/ubiquitous-language.md(and mirrored under/doc/domain/if you prefer domain-centric grouping).
Glossary:
- A broader, reader-friendly list of terms and acronyms used in this repository.
- Includes general tech acronyms (e.g., P90, SLO, JWT), business abbreviations, and any terms that are not part of the domain model but appear in docs/specs.
- Descriptive: helps new readers; not necessarily binding as model terms.
- Location:
/doc/overview/glossary.md.
Global vs Local:
- Keep a global UL (product-level, authoritative across all repos) in a central product docs repo; each repo keeps a local UL that either mirrors the global terms relevant to this bounded context or refines them for this context ( without contradictions).
- Keep a global Glossary for organization-wide acronyms/terms; each repo may keep a local Glossary for repo-specific terms.
Rule of thumb: If a term names a domain model element or behavior, it belongs in UL. If it explains an acronym, tool, or a non-model concept, it belongs in the Glossary.
The table below indicates what is shared across repos (kept identical or centrally managed), what is **domain-scoped ** (shared across a subset), and what is repo-specific.
| Area | Location | Scope | Ownership | Sync Mechanism |
|---|---|---|---|---|
| Documentation Handbook (this file) | doc/documentation-handbook.md |
Shared (global) | Platform/Product | Git submodule/subtree; automated sync |
| Templates (ADR/Change/Test/MR) | doc/templates/ |
Shared (global) | Platform/Product | Submodule/subtree; versioned |
| AI Rules & Agents | /.ai/rules/, .opencode/agent/ |
Shared (global) | Platform/Product | Submodule/subtree; versioned |
| Ubiquitous Language (Global) | Central product docs repo | Shared (global) | Domain leadership | Single source; repos link/mirror needed parts |
| Ubiquitous Language (Local) | /doc/overview/ubiquitous-language.md |
Repo (bounded context) | Repo owners | Local file; must not contradict global |
| Glossary (Global) | Central product docs repo | Shared (global) | Docs team | Single source; repos may link |
| Glossary (Local) | /doc/overview/glossary.md |
Repo | Repo owners | Local file |
| Decision Records (Cross‑cutting) | /doc/decisions/ |
Domain-scoped (affected repos) | Decision owner(s) | Copy or link to affected repos; reference canonical source |
| Decision Records (Local) | /doc/decisions/ |
Repo | Repo owners | Local |
| Contracts (OpenAPI/AsyncAPI) | /doc/contracts/** |
Owner = producer repo | Service owner | Consumers import versioned artifact; do not fork |
| Data Schemas | /doc/contracts/data/ |
Repo | Service owner | Local (unless explicitly shared DB) |
| Domain Model Docs | /doc/domain/** |
Repo | Repo owners | Local with links to global UL |
| Quality/Test Specs | /doc/quality/** |
Repo | Repo owners | Local |
| Ops Runbooks | /doc/ops/** |
Repo | SRE/Team | Local |
| Analytics Taxonomy | /doc/analytics/** |
Domain-scoped (UI apps) | Product Analytics | Shared baseline + app overlays |
- Decision Records: If a decision record affects multiple repos, keep a canonical record in the decision’s home repo (or a central “architecture” repo) and replicate a copy (or link) to affected repos. Each copy should include a header referencing the canonical source and version.
- Events & Schemas: The producer is the single source of truth. Publish schemas as versioned artifacts ( npm/maven/container images/docs package). Consumers import instead of copying.
- Global Docs: For UL, Glossary, templates, and AI rules/agents, prefer a single central repo and sync to all service repos via submodule/subtree or automation.
- Business strategy ownership: In multi-repo setups, canonical business/product strategy belongs in a central
product/business repository. Implementation repositories keep implementation truth (
doc/spec/**, contracts, operations, local technical decisions) and link back to canonical strategy instead of duplicating it.
- Change specs: authored by implementers or product; approved by tech lead/product.
- ADRs: authored by decision owner(s); approved by architecture reviewers.
- Spec: maintained by the feature owners; must be updated in the same PR as the change.
- Contracts: owned by the producer repo; versioned (SemVer); published artifacts.
- UL/Glossary: global maintained by domain leadership/docs; local by repo owners.
- Create
doc/changes/YYYY-MM/YYYY-MM-DD--<workItemRef>--<slug>/chg-<workItemRef>-spec.mdfrom template or via/write-spec <workItemRef>. - Add front-matter; link related ADRs/contracts.
- Create/Update per-change TEST PLAN as
chg-<workItemRef>-test-plan.md(or via/write-test-plan <workItemRef>), then align broader test specs under/doc/quality/test-specs/to it. - Create/Update IMPLEMENTATION PLAN as
chg-<workItemRef>-plan.md(or via/write-plan <workItemRef>). - Update
/doc/contracts/**if surfaces change; bump version. - Update
/doc/spec/**to reflect final behavior (ideally via/sync-docs <workItemRef>). - If a docs validation entry point exists, run it. If absent, run
git diff --check+ manual docs review and record follow-up.
- Draft ADR in home repo (or central arch repo).
- Cross-link impacting changes.
- Replicate/link ADR to affected repos with canonical reference.
- Update
events/asyncapi.yaml+events/schemas/in producer repo. - Version bump & publish artifact.
- Notify consumers; update dependency versions.
/doc/changes/2026-01/2026-01-22--GH-456--units-unified-display/
chg-GH-456-spec.md
chg-GH-456-test-plan.md
chg-GH-456-plan.md
chg-GH-456-pm-notes.yaml
chg-GH-456-notes.md
examples.json
chg-GH-456-spec.md (excerpt):
---
id: GH-456
status: Accepted
created: 2025-09-05
owners: ["juliusz"]
links:
adr: ["ADR-0021"]
contracts: ["contracts/rest/openapi.yaml#/paths/~1items~1display"]
summary: "Unify units display across UI using unit IDs + i18n with pluralization."
---
## Problem
Currently unit display is inconsistent across screens…
## Solution
- Introduce a `UnitDisplay` component reading i18n keys `units.<unitId>`…
- Add fallback rules for unknown units…
## Acceptance
- Given an item with unitId `bottle` and amount `1`…/doc/decisions/ADR-0021-unified-units-display.md
Decision Record (excerpt):
---
id: ADR-0021
status: Accepted
created: 2025-09-05
links:
related_changes: ["GH-456"]
---
# Decision
We standardize UI unit rendering via `UnitDisplay` component and i18n keys…OpenAPI (excerpt):
openapi: 3.0.3
paths:
/recipes/search:
get:
operationId: searchRecipes
parameters:
- name: q
in: query
schema: { type: string }
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/SearchResult"AsyncAPI (excerpt):
asyncapi: 2.6.0
channels:
recipe.created:
publish:
message:
$ref: "#/components/messages/RecipeCreated"## When implementing an HTTP change
Agents load context per `.opencode/command/*.md`:
- /doc/changes/**/chg-<workItemRef>-spec.md
- /doc/decisions/**
- /doc/spec/api/**
- /doc/contracts/rest/openapi.yaml
- /doc/quality/test-specs/**Current repository note: no scripts/doc-checks.sh or scripts/doc/doc-checks.sh entry point is present at this time.
- Run
git diff --check. - Perform manual checks for front matter, naming, and link/path correctness.
- For changed
.yamltemplates, run YAML parsing checks.
- Validate required
doc/documentation-profile.mdfields when profile file is present. - Validate
business_docs_enabledis boolean. - Warn when engineering-profile repos introduce
doc/business/**content. - Validate decision record prefix naming (
ADR/TDR/PDR/BDR/ODR). - Parse
.yamlregister templates and fail on syntax errors.
Docs site (optional): Use mkdocs + mkdocs-mermaid2-plugin for a searchable site in CI.
Q: When does a term go to UL vs Glossary?
A: If it names domain model elements/behaviors → UL. If it’s an acronym, tool, or general term → Glossary. When
in doubt, add to Glossary and propose an UL entry if it becomes model-relevant.
Q: Should ADRs be everywhere?
A: Only in repos impacted by the decision. Keep one canonical ADR and replicate/link where needed.
Q: Where do I put “how to fix X error”?
A: /doc/ops/troubleshooting/.
Q: Where do I put UX copy prompts?
A: /doc/prompts/. Agent system prompts belong in .opencode/agent/.
Q: Who owns OpenAPI/AsyncAPI?
A: The producer (the service that exposes the API or publishes the event). Consumers import versioned artifacts.
- Write in present tense for Spec (it describes current truth).
- One concern per doc; keep files short; link out liberally.
- Prefer mermaid/PUML sources for diagrams; commit generated images.
- Always cross-link Change ↔ ADR ↔ Spec ↔ Contracts via front-matter
links.*. - Docs update is part of the PR; code without docs is not done.
If profile-aware behavior proves unsafe before release:
- Revert profile-specific handbook additions and template index additions in one docs-only revert.
- Remove newly added business templates/register templates from index references.
- Keep the existing engineering defaults and unified decision-record model intact.
If only validation wording is incorrect, update/revert the validation subsection without removing the profile model.
doc/templates/change-spec-template.mddoc/templates/decision-record-template.mddoc/templates/feature-spec-template.mddoc/templates/test-spec-template.mddoc/templates/test-plan-template.mddoc/templates/implementation-plan-template.mddoc/templates/north-star-template.mddoc/templates/pr-instructions-template.md
doc/templates/documentation-profile-template.md
doc/templates/business-north-star-template.mddoc/templates/business-model-template.mddoc/templates/strategic-assumptions-template.mddoc/templates/ideal-customer-profile-template.mddoc/templates/persona-template.mddoc/templates/jobs-to-be-done-template.mddoc/templates/customer-problem-template.mddoc/templates/product-roadmap-template.mddoc/templates/business-experiment-template.mddoc/templates/business-validation-plan-template.mddoc/templates/north-star-metric-template.mddoc/templates/content-strategy-template.mddoc/templates/sales-strategy-template.mddoc/templates/customer-success-strategy-template.md
doc/templates/product-roadmap-register-template.yamldoc/templates/experiment-register-template.yamldoc/templates/metric-catalog-template.yamldoc/templates/content-calendar-template.yaml
(Keep these shared and versioned; use only templates allowed by repository profile.)
Project inception produces the knowledge base that AI delivery agents operate against. This section is the discoverability surface for the inception artifact catalog and the conditional matrix. For the complete, human-executable process, see the Project Inception guide.
This is a condensed quick-reference. The Project Inception guide holds the complete artifact catalog, including testing strategy, CI baseline, dev-environment guide, NFRs, repo analysis, and tribal knowledge.
| Artifact | Template |
|---|---|
| Inception state | inception-state-template.yaml |
| Material inventory | material-inventory-template.md |
| North star | north-star-template.md |
| Roadmap | roadmap-engineering-template.md |
| Tech stack | tech-stack-template.md |
| Architecture overview | architecture-overview-template.md |
| Glossary | glossary-template.md |
| Documentation profile | documentation-profile-template.md |
| Inception summary | inception-summary-template.md |
(ADOS framework files — AGENTS.md, .ai/agent/*-instructions.md, the
documentation handbook, and the templates set — are generated/installed by
@bootstrapper, not hand-authored at inception.)
Phase 0 detects project characteristics and activates the appropriate subset of conditional artifacts. Use the five project-type columns to decide which apply.
| Artifact | CLI/API only | Library | Web app new | Web app legacy | Business repo |
|---|---|---|---|---|---|
| OST | ❌ | ❌ | If discovery done | If discovery done | ✅ |
| Personas / JTBD | ❌ | ❌ | ✅ | ✅ | ✅ |
| User journeys | ❌ | ❌ | ✅ | ✅ | ❌ |
| Screen inventory | ❌ | ❌ | ✅ | ✅ | ❌ |
| UX guidance | ❌ | ❌ | ✅ | ✅ | ❌ |
| Repo analysis | ❌ | ❌ | ❌ | ✅ | ❌ |
| Tribal knowledge | ❌ | ❌ | ❌ | ✅ | ❌ |
| Project PRD | ❌ | ❌ | Optional | Optional | Optional |
| Assumption register | ✅ | ✅ | ✅ | ✅ | ✅ |
| Risk register | Optional | Optional | ✅ | ✅ | Optional |
Conditional templates: opportunity-solution-tree-template.md,
persona-jtbd-template.md, user-journey-template.md,
screen-inventory-template.md, ux-guidance-template.md,
ubiquitous-language-template.md, repo-analysis-template.md,
project-prd-template.md, assumption-register-template.md,
risk-register-template.md.
Inception work is staged under doc/inception/:
doc/inception/
├── README.md # workspace purpose + structure + lifecycle
├── inputs/ # user-provided materials (NOT agent-produced)
├── meetings/ # inception meeting notes
└── analysis/ # agent intermediate analysis (inventory, assumptions, risks, repo analysis, tribal knowledge)
Lifecycle: staged at Phase 0, populated through Phase 7, retained as the
project's inception record. Templates live under doc/templates/; instances
(inception-state.yaml, inception-summary.md, and the analysis files) are
written into this workspace only when a project runs inception.
Run inception end to end with the Project Inception guide.