docs(contributor): rewrite, consolidate, and trim the contributor guide#1143
Conversation
Restructure docs/contributor/ around use cases instead of single-topic reference pages. Net: -4,887 lines across the contributor folder; from 10 docs to 9 (one new + three consolidations). - index.md: rewrite as the landing page. Lead with "is my change in scope?" and a decision matrix mapping intent to the right doc. Update package list (was missing 17 packages). Add a "your first contribution" path. - data.md → recipe.md: rename. Doc now reads as "recipes, overlays, and mixins" — preserve #mixin-composition and #criteria-wildcard-overlays anchors. Add 3-way registry/overlay/ mixin decision matrix, BOM regen rule, deep-copy []any aliasing rule, MarshalYAMLDeterministic, correct 6-field Specificity(). - component.md: trim. Document all 5 deployers (was 2), nodeScheduling.system vs accelerated, valueOverrideKeys, ComponentConfig Deprecated marker. - collector.md (new): how to add a snapshot collector. Factory pattern, errgroup parallelism, context timeouts, read-only boundary, common pitfalls. - validator.md: merge validations.md in. Document all four validation surfaces (constraint, container-per-validator, bundle-time component validation, chainsaw health check) with a disambiguation table at the top. Add --no-cluster, PodLifecycle helper, phase ordering, fail-closed gates. - cli.md: trim from 2,873 → 371 lines. Drop user-facing duplication (CI examples, ops, troubleshooting). Add pkg/client/v1 facade boundary, cmd.Root().Writer pattern, flag-factory pattern, errors.ExitCodeFromError, list all 13 subcommands. - api-server.md: rewrite. Correct 8-layer middleware chain (was 6, wrong order). Add WriteErrorFromErr 4xx-vs-5xx rule, timeoutMiddleware, bodyLimitMiddleware, versionMiddleware, openapi_sync_test contract, and "adding an endpoint" walkthrough. - api-server-extending.md: delete. Was entirely aspirational (CORS, gRPC, GraphQL, LaunchDarkly, etc.). Concrete extension guidance lives in api-server.md. - validations.md: delete. Content merged into validator.md as one of the four validation surfaces. - kwok-testing.md → tests.md: rename and broaden. KWOK becomes one section among unit tests, chainsaw, integration, e2e, and make qualify. - maintaining.md: rewrite. Add actual release runbook (links to RELEASING.md), GITLAB_TOKEN gotcha, common breakages. Mark evidence-backed review as future state per ADR-007. Update inbound links across docs/, recipes/, CLAUDE.md, AGENTS.md, DEVELOPMENT.md, demos/, and copilot-instructions.md. Update docs/index.yml sidebar and docs/README.md doc index to match new file set and titles.
|
@pdmack PTAL that this doesn't break anything in Fern CI |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR reorganizes contributor documentation to clarify AICR's architecture and development guidance. It adds three new guides (recipe data models, comprehensive testing strategy, and collector patterns), rewrites five major contributor references (index, API server, components, validators, and maintaining), and updates all documentation links across the codebase to point to the reorganized structure. Old documentation files for data architecture, API server extensions, KWOK testing, and validations are removed, with their content consolidated or relocated to the new guides. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/contributor/index.md`:
- Around line 146-164: The fenced code block containing the ASCII architecture
diagram should include a language tag to satisfy the MD040 lint rule; update the
fence that wraps the diagram (the triple-backtick block with the package
diagram) to use a language such as text (or convert to mermaid and use mermaid)
so the block starts with ```text (or ```mermaid) instead of just ```.
- Around line 285-286: Update the sentence that claims collectors
"self-register" to accurately describe the registration pattern: state that
collectors are wired explicitly via the Factory and snapshotter (not via an
init() self-registration), and revise the surrounding text to reference the
Factory and snapshotter registration flow and any required registration calls so
contributors are directed to the correct extension pattern.
In `@docs/contributor/maintaining.md`:
- Around line 47-49: The documentation uses the acronyms GHCR and OCI without
defining them; update the first occurrences of the tokens "GHCR" and "OCI" (the
lines containing those acronyms) to include their full forms on first use —
e.g., "GitHub Container Registry (GHCR)" and "Open Container Initiative (OCI)" —
and leave subsequent mentions as the acronym only to satisfy the docs/**/*.md
guideline.
In `@docs/contributor/recipe.md`:
- Around line 24-45: The markdown contains unlabeled fenced code blocks (notably
the ASCII diagram that includes "RecipeResult" and the surrounding box art)
which triggers MD040; update those fences to include an explicit language tag
(e.g., use ```text for diagrams and ```bash or ```text for shell/inline examples
as appropriate) so the diagram block and the other unlabeled fence mentioned in
the comment are labeled and pass markdownlint.
In `@docs/contributor/tests.md`:
- Around line 203-205: The fenced code block containing the path
"recipes/checks/<component>/health-check.yaml" in docs/contributor/tests.md is
missing a language tag (triggering MD040); update that fence to include a
language identifier (e.g., add "text" after the opening ```) so the block
becomes a labeled code fence and the markdown linter passes.
In `@docs/contributor/validator.md`:
- Around line 304-312: The fenced directory-tree code block in
docs/contributor/validator.md is missing a language tag (triggers MD040); update
the opening fence for the block that shows the validators/ tree (the block
listing context.go, runner.go, helper/pod.go, deployment/, performance/,
conformance/) to use a language label (use "text") so the fence becomes ```text
and markdownlint no longer reports MD040.
In `@recipes/README.md`:
- Line 11: Update the quick-reference table entry that currently reads "Create
new bundlers" to accurately reflect the linked guide by renaming that label to
"Create/modify components" (or similar) so it matches the target
../docs/contributor/component.md; locate the table row containing the string
"Create new bundlers" and replace only the label text while keeping the link
intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 87ea5958-1f21-456f-b51f-da3f5fc55932
📒 Files selected for processing (32)
.claude/CLAUDE.md.github/copilot-instructions.mdAGENTS.mdDEVELOPMENT.mddemos/data.mddocs/README.mddocs/contributor/api-server-extending.mddocs/contributor/api-server.mddocs/contributor/cli.mddocs/contributor/collector.mddocs/contributor/component.mddocs/contributor/data.mddocs/contributor/index.mddocs/contributor/kwok-testing.mddocs/contributor/maintaining.mddocs/contributor/recipe.mddocs/contributor/tests.mddocs/contributor/validations.mddocs/contributor/validator.mddocs/index.ymldocs/integrator/data-extension.mddocs/integrator/data-flow.mddocs/integrator/recipe-development.mddocs/integrator/validator-extension.mddocs/user/cli-reference.mddocs/user/component-catalog.mdrecipes/README.mdrecipes/overlays/b200-any.yamlrecipes/overlays/gb200-any.yamlrecipes/overlays/h100-any.yamlrecipes/overlays/h200-any.yamlrecipes/overlays/rtx-pro-6000-any.yaml
💤 Files with no reviewable changes (4)
- docs/contributor/validations.md
- docs/contributor/api-server-extending.md
- docs/contributor/kwok-testing.md
- docs/contributor/data.md
Coverage Report ✅
Coverage BadgeNo Go source files changed in this PR. |
- Label 6 ASCII-diagram and path-only fenced code blocks with `text` language tag to satisfy MD040 (index.md, recipe.md, tests.md, validator.md). - Fix incorrect "self-register" claim about collectors in index.md. Collectors are constructed by pkg/collector.Factory and wired into the run by pkg/snapshotter — there is no init()-time registration. - Define GHCR and OCI on first mention in maintaining.md. - Rename recipes/README.md quick-reference label from "Create new bundlers" to "Add or modify components" so the link text matches the Components contributor guide it points to.
|
Addressed all 7 CodeRabbit review comments in 3ee2b6f:
|
pdmack
left a comment
There was a problem hiding this comment.
Review — docs restructure
Overall this is a clean consolidation. Cross-references, sidebar nav, and CLAUDE.md/AGENTS.md sync all check out. One broken link and a few suggestions below.
Broken link
docs/contributor/maintaining.md:62—recipe.md#bom-regeneration-ruleshould berecipe.md#bom-regeneration(the heading is## BOM Regeneration, no-rulesuffix)
Suggestions
-
Readiness phase ambiguity (
docs/contributor/validator.md) — The doc says "Three phases" (deployment, performance, conformance), which is correct for container-per-validator checks. Butreadinessis a first-class field onValidationConfiginpkg/recipe/validation.goand appears in recipe overlay examples. A one-liner noting that readiness uses inline constraint evaluation (not container checks) would prevent contributors from wondering where it went. -
Missing package (
docs/contributor/index.md) —pkg/recipe/oskindis absent from the package table. It's used by criteria and collectors. Worth adding if the table aims to be exhaustive. -
Merge precedence arrow (
docs/contributor/recipe.md~line 297) —registry defaults → mixin → base chain → overlay leaf → CLI --setis correct (rightmost = highest priority), but on first read the arrow can look like temporal order. The narrative below clarifies it; a parenthetical like "(lowest → highest priority)" on the arrow line would help.
Nit
docs/contributor/api-server.md:52—middleware.go#L45-L61is a line-range GitHub link that will silently go stale when that file is edited. Not urgent, just fragile.
CI note (not caused by this PR)
fern check errors with ENOENT/500 on fern/versions/v0.14.0-content/README.md because frozen version content directories are only populated at publish time via git archive. This predates this PR — tracked separately.
Summary
Restructure
docs/contributor/around contributor use cases instead of single-topic reference pages. Net: -4,887 lines across the contributor folder; 10 → 9 docs (one new + three consolidations + two deletions).validations.mdintovalidator.mdso all four validation surfaces (constraint, container-per-validator, bundle-time component validation, chainsaw health check) live in one disambiguated doc. Mergedapi-server-extending.md(entirely aspirational) intoapi-server.md. Renameddata.md→recipe.mdandkwok-testing.md→tests.mdto reflect content scope.collector.mdcovers the previously undocumented snapshot-collector contributor surface.cli.md2,873 → 371 lines;api-server.md1,145 → 292 lines;data.md1,830 → 478 lines. Removed user-facing duplication (cURL examples, CI snippets, Grafana queries, K8s manifests), aspirational content (gRPC, GraphQL, LaunchDarkly), and stale code paths (6-layer middleware, 2-deployer list).index.mdnow leads with "is my change in scope?" and a use-case decision matrix; package list refreshed (was missing 17 packages).Motivation/Context
The contributor guide had grown to 9,299 lines across 10 docs, much of it duplicating user docs, restating CLAUDE.md, or describing aspirational extensions that were never built. Contributors had no clear landing page, no map of which doc to read for "I want to add X", and the two validation docs (validator.md + validations.md) regularly produced wrong-doc PRs.
Per the audit findings:
index.md's package tableapi-server.mdhad wrong order and was missing 3 layersSpecificity()indata.mdwas missing the Platform clause (6 fields, not 5)diff,mirror,trust, allevidencesubcommands,skill,bundle verify)recipes/evidence/runbook inmaintaining.mdreferences a directory that doesn't exist yet (future ADR-007 state)Type of Change
Documentation only.
Components Affected
area/docs(contributor docs, doc sidebar, doc index)CLAUDE.md/AGENTS.md/DEVELOPMENT.md/recipes/README.md/recipes/overlays/*-any.yamlsource-code comments /docs/integrator/*/docs/user/cli-reference.md/docs/user/component-catalog.md/.github/copilot-instructions.md/demos/data.mdImplementation Notes
Preserved anchors (referenced from other docs):
recipe.md#mixin-composition(linked fromintegrator/recipe-development.md)recipe.md#criteria-wildcard-overlays(linked fromintegrator/recipe-development.mdand the 5*-any.yamloverlay comments)maintaining.md#exit-1-review-processand#evidenceexempt-bypass-policy(linked fromintegrator/recipe-development.md)Renames were done with
git mvso blame and history follow.fern/versions/*-content/contributor/*.mdcopies were intentionally left alone — those are frozen at past release versions.Boundary clarity is the single most enforced rewrite goal. Every doc now states what belongs in
pkg/cli/pkg/server(user interaction, no business logic) vspkg/client/v1(facade) vs functional packages.Testing
make lint— green (golangci-lint, yamllint, license headers, AGENTS.md sync, doc filenames, MDX safety, chart-version pins, BOM)make test— green; 76.3% total coverageRisk Assessment
Low. Documentation-only change; no Go source modified. Inbound link rewrites are mechanical (
sedwith full path patterns); verified by grep + lint.Checklist
make lintpasses locallymake testpasses locallydocs/index.yml) updateddocs/README.md) updated