forked from linkong/planet
5.1 KiB
5.1 KiB
Documentation Coverage Rules
This file contains Planet-specific documentation coverage rules. Documentation skills and agents should read this file before deciding which docs to update. Keep tool-specific workflow in skills; keep product and repository rules here.
Audience Routing (mandatory)
Before deciding scope, classify the change by who performs the action:
- Browser/UI end user (login, account settings, configuring collectors or AI via UI, using Earth/Console pages): update
docs/technical/{zh,en}/manual.mdandquickstart.mdonly. Never put shell commands, log file paths,planet.sh, Docker operations, ornetsh portproxyrules into these files. - Operations / deployment / on-call (
planet.sh, log paths, SMTP fallbacks likecreateuser, LAN/portproxy, env-var tuning, troubleshooting order, Bun build conventions): updatedocs/technical/{zh,en}/ops-runbook.md(or an existingops-*.md). Never put UI button labels or screenshots into these files. - Second-party developers (component context, render order, internal pipelines): update the existing
*-context.md/backend-*.md/earth-*.mdfiles.
If the same action has both a UI and a CLI path (e.g. user creation), describe the UI path in manual.md and the CLI path in ops-runbook.md, and cross-link them with a single sentence each.
Scope Rules
- Focus documentation changes on the primary document that owns the affected behavior. Do not trigger speculative updates across secondary or architectural docs unless the underlying contract or operator-facing workflow actually changed.
- User-visible workflow changes must update
docs/technical/zh/manual.mdand usuallydocs/technical/zh/quickstart.md. - If an English counterpart exists for user-facing docs such as
manual.mdorquickstart.md, updatedocs/technical/en/...enough that it does not contradict the Chinese source. - Control console page responsibility changes must update
docs/technical/zh/frontend-admin-frontend-context.md. - Earth frontend behavior changes must update
docs/technical/zh/earth-frontend-context.md. - Earth layer additions,
renderOrder, altitude/radius offsets, depth strategy, pointer picking, legend modes, or layer panel/startup ordering must updatedocs/technical/zh/earth-render-layer-order.md. - Earth layer visual style or legend symbol/color semantics should also update
docs/technical/zh/earth-layer-style-reference.mdwhen that reference is affected. - Collector, datasource, credential, settings, connectivity, scheduler, or API changes must update the relevant backend docs, especially
docs/technical/zh/backend-collectors.mdand any datasource/settings-specific doc. - When a change turns an old plan assumption into current behavior, update the relevant
docs/plans/*.mdwith a status note instead of leaving contradictory instructions. - Search docs for stale terms introduced by the change, for example old tab names, old route responsibilities, obsolete auth assumptions, or renamed UI labels.
- Internal bug fixes or optimizations that preserve existing APIs and workflows do not require updating user manuals or creating new documentation.
Public Docs Rules
- If adding a new technical document, add it to
docs/technical/zh/README.mdwhen it should be discoverable from the technical docs index. - If a technical document should be visible in the public Docs page or linked from a technical README, register it in
frontend/src/pages/Docs/docs-content.tsunderDOCS_METADATA. Files underdocs/technical/{zh,en}/are not automatically routable. - For every public technical doc, keep the bilingual file pair in sync by filename:
docs/technical/zh/<name>.mdanddocs/technical/en/<name>.md. If content is intentionally Chinese-only or English-only, state that intentionally in the final note. - Public docs should use readable link text, not raw filenames such as
manual.md.
Credential Collector Rules
- Any built-in collector marked
requires_credentials: trueandcredential_status: supportedmust have:- a
credential_providerinbackend/app/core/datasource_defaults.py; - a default credential guide in
backend/app/services/credential_guides.py; - a supported connectivity provider in
backend/app/services/datasource_connectivity.py; - settings UI guidance or a credential form in
frontend/src/admin/pages/PlainResourcePages.tsx; - a regression test that fails if the guide/provider is missing.
- a
Recommended Checks
Always run the centralized harness documentation gate:
scripts/harness/docs-consistency-check.sh
This single command automatically covers:
- Public docs whitelist and
DOCS_METADATAsynchronization (frontend/src/pages/Docs/docs-content.tsvs backend Gatekeeper) - Technical doc bilingual file pairs and identical duplicate-content detection
- Public doc link validity and human-readable link titles (no raw
.mdfilenames) - Language-scoped internal links (
docs/technical/zh/links pointing todocs/technical/zh/) - Supported credential collector contracts and UI guide registration
- Manual console route coverage against actual admin manifests
- Documented
?section=deep-link validity and UI route drift in active docs