@open-agent-toolkit/cli 0.1.20 → 0.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/assets/agents/oat-reviewer.md +48 -10
  2. package/assets/docs/cli-utilities/config-and-local-state.md +12 -0
  3. package/assets/docs/cli-utilities/configuration.md +19 -1
  4. package/assets/docs/contributing/documentation.md +6 -2
  5. package/assets/docs/docs-tooling/add-docs-to-a-repo.md +24 -14
  6. package/assets/docs/docs-tooling/commands.md +16 -14
  7. package/assets/docs/docs-tooling/workflows.md +22 -9
  8. package/assets/docs/reference/cli-reference.md +6 -2
  9. package/assets/docs/reference/docs-index-contract.md +28 -6
  10. package/assets/docs/reference/index.md +1 -1
  11. package/assets/docs/workflows/projects/implementation-execution.md +1 -1
  12. package/assets/docs/workflows/projects/reviews.md +41 -0
  13. package/assets/docs/workflows/skills/index.md +3 -1
  14. package/assets/public-package-versions.json +4 -4
  15. package/assets/skills/authoring-docs/SKILL.md +135 -0
  16. package/assets/skills/authoring-docs/references/categories.md +251 -0
  17. package/assets/skills/authoring-docs/references/information-architecture.md +156 -0
  18. package/assets/skills/authoring-docs/references/page-types.md +119 -0
  19. package/assets/skills/authoring-docs/references/principles.md +98 -0
  20. package/assets/skills/authoring-docs/references/review-rubric.md +169 -0
  21. package/assets/skills/authoring-docs/references/templates.md +549 -0
  22. package/assets/skills/authoring-docs/references/workflow.md +133 -0
  23. package/assets/skills/authoring-docs/references/writing-style.md +128 -0
  24. package/assets/skills/oat-agent-instructions-analyze/SKILL.md +43 -13
  25. package/assets/skills/oat-docs-analyze/SKILL.md +183 -28
  26. package/assets/skills/oat-docs-analyze/references/analysis-artifact-template.md +101 -1
  27. package/assets/skills/oat-docs-analyze/references/directory-assessment-criteria.md +16 -0
  28. package/assets/skills/oat-docs-analyze/references/quality-checklist.md +83 -3
  29. package/assets/skills/oat-docs-authoring/SKILL.md +193 -0
  30. package/assets/skills/oat-docs-authoring/references/docs-root-resolution.md +64 -0
  31. package/assets/skills/oat-docs-authoring/references/lifecycle-boundaries.md +51 -0
  32. package/assets/skills/oat-docs-authoring/references/oat-fumadocs-contract.md +77 -0
  33. package/assets/skills/oat-docs-authoring/references/targeted-authoring-workflow.md +61 -0
  34. package/assets/skills/oat-docs-authoring/references/validation.md +61 -0
  35. package/assets/skills/oat-docs-bootstrap/SKILL.md +15 -11
  36. package/assets/skills/oat-docs-bootstrap/assets/AGENTS.md.template +5 -5
  37. package/assets/skills/oat-project-discover/SKILL.md +22 -4
  38. package/assets/skills/oat-project-import-plan/SKILL.md +38 -9
  39. package/assets/skills/oat-project-plan/SKILL.md +30 -7
  40. package/assets/skills/oat-project-plan-writing/SKILL.md +45 -2
  41. package/assets/skills/oat-project-progress/SKILL.md +9 -3
  42. package/assets/skills/oat-project-quick-start/SKILL.md +40 -8
  43. package/assets/skills/oat-project-review-provide/SKILL.md +24 -11
  44. package/assets/skills/oat-project-review-receive/SKILL.md +37 -17
  45. package/dist/commands/config/index.d.ts.map +1 -1
  46. package/dist/commands/config/index.js +36 -0
  47. package/dist/commands/index.d.ts.map +1 -1
  48. package/dist/commands/index.js +2 -0
  49. package/dist/commands/init/tools/shared/skill-manifest.d.ts +1 -1
  50. package/dist/commands/init/tools/shared/skill-manifest.d.ts.map +1 -1
  51. package/dist/commands/init/tools/shared/skill-manifest.js +2 -0
  52. package/dist/commands/review/index.d.ts +3 -0
  53. package/dist/commands/review/index.d.ts.map +1 -0
  54. package/dist/commands/review/index.js +7 -0
  55. package/dist/commands/review/latest.d.ts +23 -0
  56. package/dist/commands/review/latest.d.ts.map +1 -0
  57. package/dist/commands/review/latest.js +182 -0
  58. package/dist/config/oat-config.d.ts +5 -0
  59. package/dist/config/oat-config.d.ts.map +1 -1
  60. package/dist/config/oat-config.js +12 -0
  61. package/dist/config/resolve.d.ts.map +1 -1
  62. package/dist/config/resolve.js +4 -0
  63. package/package.json +2 -2
@@ -19,6 +19,19 @@ Review loop:
19
19
  - `reviews/archived/` is the local-only historical surface. Active `reviews/` content is not gitignored by default.
20
20
  - Ad-hoc review artifacts still default to local-only orphan storage under `.oat/projects/local/orphan-reviews/`.
21
21
 
22
+ ## Latest review resolver
23
+
24
+ Use `oat review latest` when a skill or operator needs to resolve "the most recent review" without hand-selecting a file.
25
+
26
+ ```bash
27
+ oat review latest --json
28
+ oat review latest --project .oat/projects/shared/example --json
29
+ ```
30
+
31
+ The resolver orders candidates by `oat_generated_at` frontmatter, not filesystem mtime. With an active or explicit project, it scans the project's `reviews/` directory first, then `reviews/archived/`, then ad-hoc review locations (`.oat/repo/reviews/` and `.oat/projects/local/orphan-reviews/`). When candidates share the same generated time, active project reviews outrank archived and ad-hoc reviews, then lifecycle recency breaks remaining ties (`final` > higher phase/task scope > lower phase/task scope). The JSON response contains `path`, `scope`, `generatedAt`, and `kind` (`project` or `adhoc`). If no review exists, those fields are `null`.
32
+
33
+ `oat-project-review-receive` uses this resolver when it is invoked from natural language and needs to offer the latest project review, or route an ad-hoc result to `oat-review-receive`.
34
+
22
35
  ## Bookkeeping commits (required)
23
36
 
24
37
  Both `oat-project-review-receive` and `oat-project-review-receive-remote` conclude with a required atomic commit of `plan.md`, `implementation.md`, `state.md`, and the archived review artifact (when tracked). This is the safety net that prevents cross-agent bookkeeping drift: when a subagent runs a receive skill in isolation, the commit ensures the original agent sees a clean checkout on return.
@@ -43,6 +56,17 @@ The commit is scoped and explicit — it stages only the project's tracking file
43
56
 
44
57
  The `*-provide-remote` and `*-receive-remote` skills are the two halves of the cross-machine loop: one agent posts a review to a PR; an agent on the PR's own machine receives it and turns it into fix tasks.
45
58
 
59
+ ## Model-invokable review skills
60
+
61
+ The project review skills are model-invokable only for explicit user asks and confirmation flows. They are not auto-invoked just because a phase completed, a review artifact exists, or a checkout looks ready for review.
62
+
63
+ - `oat-project-review-provide` handles explicit asks such as "review project" after resolving an active project and summarizing the inferred scope for confirmation.
64
+ - `oat-project-review-receive` handles explicit asks such as "receive review" or "process review" after resolving the latest review target. If the latest target is ad-hoc, it offers to route to `oat-review-receive`.
65
+ - `oat-project-progress` is also model-invokable for read-only status asks such as "check progress" or "what's next"; it reports before offering any next-step routing.
66
+ - `oat-project-discover` is model-invokable only when an active spec-driven project exists. Otherwise it declines and points to `oat-project-new`, `oat-project-quick-start`, or `oat-project-open`.
67
+
68
+ The common rule is offer-and-confirm: the model may recognize the request and propose the matching workflow skill, but must ask before mutating project artifacts or starting a review.
69
+
46
70
  ## Remote provide
47
71
 
48
72
  `oat-review-provide-remote` (ad-hoc) and `oat-project-review-provide-remote` (project-scoped) let an agent on one machine review a GitHub PR opened from another machine and post the review back to GitHub. They mirror the existing `*-receive-remote` skills, closing the local-vs-remote × provide-vs-receive matrix.
@@ -83,6 +107,23 @@ Auto-triggered reviews use `oat_review_invocation: auto` in the review artifact
83
107
 
84
108
  This feature is opt-in and disabled by default. When disabled, the manual `oat-project-review-provide` workflow applies.
85
109
 
110
+ ## Auto artifact-review loops
111
+
112
+ Generated planning and analysis artifacts have a separate review loop from code/phase reviews.
113
+
114
+ For plans, `oat-project-plan`, `oat-project-quick-start`, and `oat-project-import-plan` run a bounded `plan.md` artifact review before marking the plan ready for implementation. The loop dispatches `oat-reviewer` in structured-output artifact mode with `scope: plan`, applies unambiguous Critical and Important artifact-local fixes, offers Medium and Minor fixes, and re-runs until clean or the retry bound is exhausted. A clean result records the `plan` row in the plan's `## Reviews` table as `passed`.
115
+
116
+ For analysis artifacts, `oat-docs-analyze` and `oat-agent-instructions-analyze` run a bounded accuracy review after writing their severity-rated artifacts. The reviewer checks cited evidence, severity, and recommendations before the matching apply workflow consumes the artifact. The analysis loop updates tracking metadata to mark the artifact verified.
117
+
118
+ Both loops are default-on and controlled through:
119
+
120
+ ```bash
121
+ oat config set workflow.autoArtifactReview.plan false
122
+ oat config set workflow.autoArtifactReview.analysis false
123
+ ```
124
+
125
+ Only an explicit `false` skips a loop. The retry bound comes from `oat_orchestration_retry_limit` and defaults to `2`.
126
+
86
127
  ## Re-review scope narrowing
87
128
 
88
129
  When re-reviewing after fix tasks have been applied, `oat-project-review-provide` detects completed `(review)` fix tasks and offers to narrow the re-review scope to just the fix-task commits. This avoids re-examining already-approved code.
@@ -23,7 +23,7 @@ Use this section when you want to choose the right OAT skill for a task. If you
23
23
  - Run or receive reviews: `oat-project-review-provide`, `oat-project-review-receive`, or the non-project review variants
24
24
  - Capture a scoped, shippable backlog item: `oat-pjm-add-backlog-item` directly when the work is already scoped, or `oat-brainstorm` when the thought hasn't converged yet — the brainstorm dispatcher's "scoped backlog item" destination pre-fills the title / description / acceptance criteria / scope estimate / priority from the conversation and then runs `oat-pjm-add-backlog-item` with confirmed inputs
25
25
  - Manage the repo backlog and reference docs: `oat-pjm-update-repo-reference`, `oat-pjm-review-backlog`
26
- - Work on docs surfaces: `oat-docs-bootstrap` (guided bootstrap of a new docs app), `oat-docs-analyze`, `oat-docs-apply`, and `oat-project-document`
26
+ - Work on docs surfaces: `authoring-docs` (general documentation baseline), `oat-docs-authoring` (targeted OAT/Fumadocs authoring), `oat-docs-bootstrap` (guided bootstrap of a new docs app), `oat-docs-analyze`, `oat-docs-apply`, and `oat-project-document`
27
27
  - Generate a shipping digest or scheduled recap: `oat-wrap-up`
28
28
  - Research a topic in depth: `deep-research`
29
29
  - Analyze an artifact, codebase, or document: `analyze`
@@ -83,6 +83,8 @@ Use this section when you want to choose the right OAT skill for a task. If you
83
83
 
84
84
  === "Docs and instructions"
85
85
 
86
+ - `authoring-docs`
87
+ - `oat-docs-authoring`
86
88
  - `oat-docs-bootstrap`
87
89
  - `oat-docs-analyze`
88
90
  - `oat-docs-apply`
@@ -1,6 +1,6 @@
1
1
  {
2
- "cli": "0.1.20",
3
- "docs-config": "0.1.20",
4
- "docs-theme": "0.1.20",
5
- "docs-transforms": "0.1.20"
2
+ "cli": "0.1.22",
3
+ "docs-config": "0.1.22",
4
+ "docs-theme": "0.1.22",
5
+ "docs-transforms": "0.1.22"
6
6
  }
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: authoring-docs
3
+ version: 1.0.0
4
+ description: Use when creating, restructuring, migrating, auditing, or reviewing technical documentation for software projects. Provides evidence-first, provider-portable Markdown authoring standards.
5
+ argument-hint: '[docs task or target path]'
6
+ disable-model-invocation: false
7
+ allowed-tools: Read, Write, Bash, Glob, Grep, AskUserQuestion
8
+ user-invocable: true
9
+ ---
10
+
11
+ # Authoring Docs
12
+
13
+ Use this skill to produce technical documentation that is grounded in the
14
+ repository, useful to humans, and explicit enough for future agents.
15
+
16
+ The prime directive is simple: do not write plausible docs. Extract truth from
17
+ code, configuration, schemas, tests, CI, deployment files, and existing docs;
18
+ then organize that truth around reader tasks.
19
+
20
+ ## When to Use
21
+
22
+ Use when:
23
+
24
+ - Creating or improving docs for a software repository.
25
+ - Migrating existing docs into a clearer Markdown structure.
26
+ - Auditing docs for missing, stale, duplicated, or risky content.
27
+ - Writing API, CLI, app, service, library, framework, architecture, operations,
28
+ or internal/public docs.
29
+ - Reviewing a documentation change for accuracy, usefulness, or safety.
30
+
31
+ ## When NOT to Use
32
+
33
+ Do not use by itself when:
34
+
35
+ - The user only asks for copy editing that does not require repository evidence.
36
+ - A repository-specific docs framework contract is the main problem; load the
37
+ local skill or instruction set alongside this baseline.
38
+ - Generated reference output must be regenerated from a tool; run the generator
39
+ first and use this skill for review and surrounding prose.
40
+ - Legal, policy, marketing, or brand copy needs domain-specific approval outside
41
+ the repository.
42
+
43
+ ## Workflow
44
+
45
+ ### Step 1: Resolve Scope and Evidence
46
+
47
+ Identify the docs target, intended reader, and source of truth before editing.
48
+ Inspect local instructions, existing docs, source files, config, schemas, tests,
49
+ CI, deployment files, and scripts that support the claims you plan to make.
50
+
51
+ Never invent commands, environment variables, endpoints, fields, deployment
52
+ steps, ownership, escalation paths, compatibility promises, or security
53
+ behavior. Mark useful but unverified facts as needing confirmation.
54
+
55
+ ### Step 2: Classify the Project and Reader Task
56
+
57
+ Classify the project type and docs category: API, CLI, frontend app, backend
58
+ service, worker, library, framework, monorepo, architecture, operations, or
59
+ mixed. Identify the reader's job: first success, task completion, exact lookup,
60
+ system understanding, safe operation, or review. Load
61
+ `references/categories.md` when category-specific coverage matters.
62
+
63
+ ### Step 3: Choose the Right Page Type
64
+
65
+ Use one primary page type per page:
66
+
67
+ - Tutorial: first successful path.
68
+ - How-to guide: complete one task.
69
+ - Reference: exact facts and contracts.
70
+ - Explanation: mental model, design, and tradeoffs.
71
+ - Runbook: operational recovery with checks, mitigation, and verification.
72
+
73
+ Small supporting sections are fine, but keep the page's primary job clear.
74
+
75
+ ### Step 4: Structure the Docs
76
+
77
+ Prefer predictable information architecture: landing page, getting started,
78
+ how-to guides, reference, concepts, and operations. Preserve useful existing
79
+ intent, remove duplication, and avoid creating parallel docs when an existing
80
+ page can be improved.
81
+
82
+ ### Step 5: Write Direct, Verifiable Markdown
83
+
84
+ Use plain language, active voice, specific nouns, exact file paths, exact
85
+ commands, code block language identifiers, expected output, and useful links.
86
+ Document prerequisites, verification, rollback for risky operations, and
87
+ uncertainty.
88
+
89
+ ### Step 6: Verify and Handoff
90
+
91
+ Run relevant validation commands when available: docs build, link check, tests
92
+ for generated examples, formatters, or local preview. In the final handoff,
93
+ summarize files changed, sources inspected, verification run, unresolved facts,
94
+ and recommended follow-ups.
95
+
96
+ ## Reference Map
97
+
98
+ Load only the references needed for the current task:
99
+
100
+ - `references/principles.md`: core documentation principles.
101
+ - `references/workflow.md`: evidence gathering and writing workflow.
102
+ - `references/information-architecture.md`: docs structure, naming, and links.
103
+ - `references/page-types.md`: tutorial, how-to, reference, explanation, and
104
+ runbook guidance.
105
+ - `references/categories.md`: API, CLI, app, service, library, framework,
106
+ monorepo, architecture, operations, and audience-specific guidance.
107
+ - `references/writing-style.md`: plain technical writing and Markdown rules.
108
+ - `references/templates.md`: reusable page and handoff templates.
109
+ - `references/review-rubric.md`: readiness checklist and review rubric.
110
+
111
+ ## Examples
112
+
113
+ Basic usage:
114
+
115
+ ```txt
116
+ /authoring-docs docs/
117
+ ```
118
+
119
+ Conversational triggers:
120
+
121
+ ```txt
122
+ Audit this repo's docs and identify missing pages.
123
+ Create a getting-started guide grounded in the package scripts.
124
+ Improve the CLI reference without inventing flags or exit codes.
125
+ Review this runbook for operational safety.
126
+ ```
127
+
128
+ ## Success Criteria
129
+
130
+ - Claims are grounded in repository evidence or marked as uncertain.
131
+ - The reader can complete the intended task without tribal knowledge.
132
+ - Page type, location, and navigation are clear.
133
+ - Commands, examples, paths, options, and references are accurate.
134
+ - Risky operations include verification and rollback.
135
+ - Internal-only or sensitive information is handled appropriately.
@@ -0,0 +1,251 @@
1
+ ---
2
+ title: Documentation Categories
3
+ description: Category-specific guidance for APIs, CLIs, apps, services, libraries, frameworks, monorepos, architecture, operations, and audience boundaries.
4
+ ---
5
+
6
+ # Documentation Categories
7
+
8
+ Use category guidance after classifying the project. A repository can belong to
9
+ multiple categories; document the dominant reader path first, then add focused
10
+ reference, operational, or conceptual pages where the evidence supports them.
11
+
12
+ ## APIs
13
+
14
+ API docs must help consumers integrate correctly without reading implementation
15
+ code.
16
+
17
+ Document:
18
+
19
+ - overview and use cases
20
+ - base URL, service location, or schema source
21
+ - environments
22
+ - authentication and authorization
23
+ - request and response formats
24
+ - status codes and error shape
25
+ - pagination, filtering, sorting, and limits
26
+ - idempotency, retries, and timeouts
27
+ - versioning, deprecation, and compatibility behavior
28
+ - webhooks, events, SDKs, or generated clients when applicable
29
+ - examples grounded in real routes, schemas, or tests
30
+ - support, ownership, or escalation when known
31
+
32
+ For REST or HTTP APIs, document method, path, side effects, auth requirement,
33
+ path and query parameters, request headers, request body, response body, status
34
+ codes, error codes, example request, example response, retry behavior,
35
+ idempotency, pagination, and deprecation notes.
36
+
37
+ For GraphQL, include endpoint, auth, schema source, common queries and
38
+ mutations, variables, fragments, pagination, errors, nullability, query cost or
39
+ depth limits, and deprecation policy.
40
+
41
+ For event-driven APIs, document event name, producer, known consumers,
42
+ transport, topic or stream, schema, example payload, ordering guarantees,
43
+ delivery guarantees, retry behavior, dead-letter behavior, idempotency
44
+ requirements, versioning, and backward compatibility.
45
+
46
+ For webhooks, document event types, endpoint expectations, signing and
47
+ verification, retry schedule, timeout, payload schema, idempotency, ordering,
48
+ testing tools, replay behavior, and security considerations.
49
+
50
+ Prefer machine-readable schemas where the repo has them: OpenAPI, GraphQL,
51
+ AsyncAPI, JSON Schema, Protocol Buffers, or generated types. Pair generated
52
+ reference with hand-written onboarding and workflow guides.
53
+
54
+ ## CLIs
55
+
56
+ CLI docs must help readers run the right command safely. A CLI is both a human
57
+ interface and an automation interface.
58
+
59
+ Document:
60
+
61
+ - installation
62
+ - authentication
63
+ - configuration and precedence
64
+ - quick start
65
+ - common workflows
66
+ - command reference
67
+ - arguments, flags, inherited flags, aliases, and defaults
68
+ - environment variables and config files
69
+ - output formats and machine-readable output
70
+ - exit codes
71
+ - prompts and non-interactive behavior
72
+ - CI and scripting behavior
73
+ - logging, verbosity, retries, and timeouts
74
+ - dry-run behavior when supported
75
+ - production safety notes
76
+ - troubleshooting
77
+
78
+ For each command, include purpose, usage syntax, examples, side effects, output
79
+ shape, JSON shape if supported, exit codes, related commands, and any
80
+ environment or config keys it reads.
81
+
82
+ Do not invent exit codes. If exit codes are not explicit in source or docs, say
83
+ they are not documented.
84
+
85
+ ## Apps and Services
86
+
87
+ Application and service docs should help people understand, run, change,
88
+ deploy, operate, and recover the system.
89
+
90
+ All apps and services should document:
91
+
92
+ - purpose, audience, and users
93
+ - local development
94
+ - testing
95
+ - configuration
96
+ - dependencies
97
+ - deployment
98
+ - observability
99
+ - ownership
100
+ - troubleshooting
101
+ - architecture summary
102
+ - operational risks
103
+
104
+ Frontend app docs should include routes, rendering model, data fetching, state
105
+ management, design system usage, feature flags, analytics, accessibility,
106
+ performance constraints, error boundaries, testing, local development, and
107
+ deployment.
108
+
109
+ Backend service docs should include service purpose, runtime, APIs, jobs,
110
+ queues, databases, caches, external services, configuration, auth, local
111
+ development, testing, deployment, observability, failure modes, and runbooks.
112
+
113
+ Worker and job docs should include trigger, input payload, output or side
114
+ effect, queue or scheduler, retry policy, timeout, concurrency, idempotency,
115
+ dead-letter behavior, observability, replay process, and failure modes.
116
+
117
+ Deployment docs should include where the system runs, deployment trigger,
118
+ environments, required permissions, pre-deploy checks, deployment steps,
119
+ post-deploy verification, rollback, and known risks.
120
+
121
+ Troubleshooting pages should be symptom-first and map symptoms to likely cause,
122
+ check, fix, and escalation.
123
+
124
+ ## Libraries, Packages, SDKs, and Frameworks
125
+
126
+ Library and framework docs should help users decide whether to use the tool,
127
+ install it, learn the mental model, apply it correctly, and avoid misuse.
128
+
129
+ Document:
130
+
131
+ - purpose
132
+ - when to use it
133
+ - when not to use it
134
+ - installation
135
+ - version compatibility and peer dependencies
136
+ - quick start
137
+ - core concepts
138
+ - supported public API
139
+ - examples and recipes
140
+ - configuration
141
+ - extension points
142
+ - errors and side effects
143
+ - testing guidance
144
+ - migration guides
145
+ - release policy
146
+ - ownership and support model
147
+
148
+ Document only supported public API unless the repository explicitly treats an
149
+ internal surface as supported. For functions, classes, components, hooks, or
150
+ types, include purpose, signature, parameters, return value, errors, examples,
151
+ side effects, stability, and deprecation notes.
152
+
153
+ Frameworks need stronger conceptual docs than small libraries: design goals,
154
+ mental model, conventions, lifecycle, plugin model, file structure,
155
+ configuration model, defaults, escape hatches, anti-patterns, migrations, and
156
+ examples.
157
+
158
+ Component libraries should document import path, props, examples, states,
159
+ accessibility, design tokens, composition patterns, and when not to use a
160
+ component.
161
+
162
+ SDK docs should cover install, auth, client creation, common workflows, errors,
163
+ retries, pagination, async behavior, type generation, version compatibility,
164
+ and parity with the underlying service.
165
+
166
+ ## Monorepos
167
+
168
+ Monorepo docs should help readers find the right package, app, service, or
169
+ workflow without already knowing the source tree.
170
+
171
+ Document:
172
+
173
+ - repo purpose and major workspaces
174
+ - package manager and workspace commands
175
+ - build, test, lint, and type-check strategy
176
+ - dependency graph or ownership map when available
177
+ - shared config and conventions
178
+ - release or deployment boundaries
179
+ - how to run one package or app
180
+ - how to add a new package or app
181
+ - generated artifacts and source-of-truth boundaries
182
+ - cross-package compatibility requirements
183
+
184
+ Avoid organizing docs only by implementation directory. Prefer audience,
185
+ product area, or workflow groupings, then link to package-level reference.
186
+
187
+ ## Architecture and Operations
188
+
189
+ Architecture docs explain how the system works and why it is designed that way.
190
+ Operations docs explain how to run, observe, debug, recover, and safely change
191
+ the system.
192
+
193
+ Architecture docs should answer:
194
+
195
+ - What problem does this system solve?
196
+ - What are the main components?
197
+ - How does data flow through the system?
198
+ - What are the boundaries?
199
+ - What depends on this system, and what does it depend on?
200
+ - What tradeoffs and decisions shaped the design?
201
+ - What failure modes exist?
202
+ - What should future maintainers avoid breaking?
203
+
204
+ Use diagrams to clarify relationships, not to decorate. Every diagram should
205
+ have a title, purpose, scope, explanation, caveats, and last verified date when
206
+ it is highly operational.
207
+
208
+ Use architecture decision records for significant decisions such as database
209
+ choice, queueing model, API versioning, cache invalidation, auth model,
210
+ deployment topology, framework choice, migration strategy, or deprecation
211
+ strategy.
212
+
213
+ Operations docs should answer:
214
+
215
+ - Where does this run?
216
+ - How is it deployed and rolled back?
217
+ - How do I know it is healthy?
218
+ - Where are logs, metrics, traces, dashboards, and alerts?
219
+ - What are common failure modes?
220
+ - How do I recover from them?
221
+ - Who owns escalation?
222
+
223
+ Runbooks should include symptoms, impact, checks, mitigation, verification,
224
+ rollback, escalation, and known false positives. Alert docs should make every
225
+ alert actionable. Rollback docs must include exact steps or explicitly say the
226
+ rollback process is not documented.
227
+
228
+ ## Internal and Public Docs
229
+
230
+ Internal and public docs share the same quality bar. The differences are
231
+ audience, assumptions, security, and support model.
232
+
233
+ Internal docs can include internal service names, environments, dashboards,
234
+ alerts, runbooks, deployment workflows, known consumers, support channels, and
235
+ escalation paths. They must not include secrets, credentials, tokens, private
236
+ keys, sensitive customer data, personal data, or private incident details that
237
+ do not belong in durable docs.
238
+
239
+ Public docs should include purpose, onboarding, installation, authentication
240
+ setup, permissions, examples, API or CLI reference, version compatibility,
241
+ migration guides, deprecation policy, support path, security guidance, and
242
+ accessibility or privacy notes when relevant.
243
+
244
+ Public docs should avoid internal URLs, private dashboards, Slack links,
245
+ deployment internals, customer-specific data, unapproved roadmap statements,
246
+ and implementation details that are not part of the public contract.
247
+
248
+ When converting internal docs to public docs, identify internal-only content,
249
+ remove or rewrite sensitive details, replace examples with public-safe values,
250
+ ensure links are public, remove private operational links, preserve user-facing
251
+ behavior, and add a public support path.
@@ -0,0 +1,156 @@
1
+ ---
2
+ title: Information Architecture
3
+ description: Standard documentation structure, naming, navigation, and cross-linking.
4
+ ---
5
+
6
+ # Information Architecture
7
+
8
+ Documentation structure should feel predictable across repositories even when
9
+ the systems differ. Consistency makes docs easier to browse, review, migrate,
10
+ and use as agent context.
11
+
12
+ ## Standard Top-Level Model
13
+
14
+ Use this conceptual model:
15
+
16
+ ```txt
17
+ Start here
18
+ How-to guides
19
+ Reference
20
+ Concepts
21
+ Operations
22
+ ```
23
+
24
+ These labels map to reader needs:
25
+
26
+ | Product Label | Documentation Type | Reader Question |
27
+ | ------------- | ------------------------ | -------------------------------------------- |
28
+ | Start here | Tutorial and orientation | What is this and how do I begin? |
29
+ | How-to guides | How-to | How do I complete this task? |
30
+ | Reference | Reference | What are the exact facts? |
31
+ | Concepts | Explanation | How does this work and why? |
32
+ | Operations | How-to plus reference | How do I run, observe, fix, or recover this? |
33
+
34
+ ## Default Repo Structure
35
+
36
+ ```txt
37
+ docs/
38
+ ├── index.md
39
+ ├── getting-started.md
40
+ ├── how-to/
41
+ │ ├── local-development.md
42
+ │ ├── testing.md
43
+ │ ├── deployment.md
44
+ │ └── troubleshooting.md
45
+ ├── reference/
46
+ │ ├── configuration.md
47
+ │ ├── environment-variables.md
48
+ │ ├── commands.md
49
+ │ ├── api.md
50
+ │ └── errors.md
51
+ ├── concepts/
52
+ │ ├── architecture.md
53
+ │ ├── data-flow.md
54
+ │ ├── auth.md
55
+ │ └── caching.md
56
+ └── operations/
57
+ ├── runbook.md
58
+ ├── observability.md
59
+ ├── alerts.md
60
+ └── rollback.md
61
+ ```
62
+
63
+ Do not create empty pages for symmetry. Use the structure as a guide, not
64
+ theater.
65
+
66
+ ## Scale the Structure to the Repo
67
+
68
+ Tiny repos can use a single `README.md` if it covers purpose, install or setup,
69
+ usage, configuration, testing, and ownership.
70
+
71
+ Small repos should separate overview, usage, and reference.
72
+
73
+ Medium repos should use the standard structure.
74
+
75
+ Large repos or platforms can group by product area or audience, but should keep
76
+ the same doc types recognizable. Avoid organizing only by implementation
77
+ directory; readers usually do not arrive knowing the source tree.
78
+
79
+ ## Landing Page Contract
80
+
81
+ Every docs entry point should answer:
82
+
83
+ 1. What is this?
84
+ 2. Why does it exist?
85
+ 3. Who is it for?
86
+ 4. What are the main capabilities?
87
+ 5. What are the boundaries and non-goals?
88
+ 6. How do I get started?
89
+ 7. What are the common tasks?
90
+ 8. Where is the reference material?
91
+ 9. How is it operated?
92
+ 10. Who owns it?
93
+
94
+ ## Navigation Principles
95
+
96
+ Use predictable labels:
97
+
98
+ - Getting started
99
+ - Local development
100
+ - Testing
101
+ - Deployment
102
+ - Configuration
103
+ - Environment variables
104
+ - API reference
105
+ - CLI reference
106
+ - Architecture
107
+ - Data flow
108
+ - Authentication
109
+ - Observability
110
+ - Troubleshooting
111
+ - Runbook
112
+ - Rollback
113
+
114
+ Avoid clever labels such as `Misc`, `Magic`, `Deep cuts`, or `Everything else`.
115
+
116
+ ## Page Naming
117
+
118
+ Use task names for how-to guides:
119
+
120
+ ```txt
121
+ how-to/add-a-new-route.md
122
+ how-to/deploy-to-production.md
123
+ how-to/rotate-api-credentials.md
124
+ ```
125
+
126
+ Use topic names for concepts:
127
+
128
+ ```txt
129
+ concepts/authentication.md
130
+ concepts/event-delivery.md
131
+ concepts/caching.md
132
+ ```
133
+
134
+ Use noun names for reference:
135
+
136
+ ```txt
137
+ reference/environment-variables.md
138
+ reference/cli.md
139
+ reference/api.md
140
+ reference/errors.md
141
+ ```
142
+
143
+ ## Cross-Linking Rules
144
+
145
+ Link between doc types intentionally.
146
+
147
+ A tutorial should link to related how-to guides, relevant reference pages, and
148
+ conceptual background for later learning.
149
+
150
+ A how-to guide should link to reference pages for options, concepts for why the
151
+ task works, and operations pages for production safety.
152
+
153
+ A reference page should link to tutorials or how-to guides that show common use.
154
+
155
+ An explanation page should link to runbooks, deployment guides, API or CLI
156
+ reference, and ADRs when available.