Skip to content

S009: Documentation System

FieldValue
SpecS009
FeatureDocumentation System
Date2026-04-24
StatusDraft
Authorspec-writer-agent

Overview

The Parity documentation system spans the core CLI tool (parity/) and the VitePress website (parity-website/). The website owns the rendered guide source in parity-website/guide/; the CLI repo owns package-local docs in parity/docs/ and public behavior specs in parity/specs/. This specification defines the canonical structure of all guides, writing conventions, VitePress configuration, the authoring workflow, requirements for code examples, the versioning strategy, and the synchronization requirements between documentation and implementation.

User Scenarios

S009-US-001 [P1] As a developer, I want to find a guide that explains what Parity does and how to get started so that I can evaluate the tool without reading source code.

S009-US-002 [P1] As a developer who just installed Parity, I want a step-by-step quick start so that I can verify my installation works before reading full documentation.

S009-US-003 [P1] As an advanced user, I want reference documentation for all configuration options, rules, and plugin APIs so that I can integrate Parity into complex project setups.

S009-US-004 [P1] As a CI engineer, I want documented examples for every major CI platform so that I can copy-paste a working Parity integration.

S009-US-005 [P2] As a documentation maintainer, I want clear authoring workflow and style conventions so that I can keep docs consistent across multiple contributors.

S009-US-006 [P2] As a project maintainer, I want docs to be automatically validated for correctness so that documentation drift from implementation does not silently accumulate.

Requirements Summary

IDTypePriorityTitleStatus
S009-FR-001FunctionalP1Guide inventory and coverageDraft
S009-FR-002FunctionalP1VitePress configurationDraft
S009-FR-003FunctionalP1Navigation structureDraft
S009-FR-004FunctionalP1Writing style and toneDraft
S009-FR-005FunctionalP1Code example requirementsDraft
S009-FR-006FunctionalP1Frontmatter schemaDraft
S009-FR-007FunctionalP1Authoring workflowDraft
S009-FR-008FunctionalP1Versioning strategyDraft
S009-FR-009FunctionalP1Docs-implementation syncDraft
S009-FR-010FunctionalP2Single-version constraintDraft
S009-FR-011FunctionalP2Search integrationDraft
S009-FR-012FunctionalP2Dark mode supportDraft
S009-AS-001AcceptanceP1Guide renders correctly in VitePressDraft
S009-AS-002AcceptanceP1Code examples execute successfullyDraft
S009-AS-003AcceptanceP1Navigation links are validDraft
S009-AS-004AcceptanceP1Config reference stays in syncDraft
S009-EC-001Edge CaseP1Stale docs on new featureDraft
S009-EC-002Edge CaseP1Broken internal linksDraft
S009-EC-003Edge CaseP1Code example outdated after refactorDraft
S009-EC-004Edge CaseP2Guide for experimental feature not yet mergedDraft
S009-SC-001SuccessP1All navigation links resolveDraft
S009-SC-002SuccessP1Code blocks have syntax highlightingDraft
S009-SC-003SuccessP1Mobile navigation is usableDraft

Cross-Spec Dependencies

  • Depends on: S001 (CLI Commands -- docs must reference correct command signatures and flags), S002 (Rules System -- rule documentation must match rule names and parameters), S005 (Plugin System -- plugin authoring guide must match PluginInterface contract), S006 (Configuration -- config reference must match the full parity.yaml schema)
  • Required by: None (terminal spec)

Existing Guide Inventory

The following 10 guides exist at parity-website/guide/:

GuideTitleCategoryCovers
getting-started.mdGetting StartedIntroductionWhat Parity does, quick start, example output
installation.mdInstallationIntroductionRequirements, install methods, verification, updating
configuration.mdConfigurationCore ConceptsFull parity.yaml reference, settings, structure blocks
rules.mdBuilt-in RulesCore ConceptsAll five rules: test-exists, enforce-coverage-link, minimum-coverage, matched-coverage, coverage-attribution
coverage.mdCoverage FormatsCore ConceptsClover XML vs PHPUnit XML, generating coverage, rule compatibility
pest-support.mdPest PHP SupportIntegrationsPest covers syntax (chained, file-level, multiple), detection, config
phpunit-support.mdPHPUnit SupportIntegrationsCoversClass attribute, string literals, multiple attributes, migration from docblocks
ci-integration.mdCI/CD IntegrationIntegrationsExit codes, JSON output, GitHub Actions, GitLab CI, Bitbucket Pipelines
plugins.mdPlugin SystemAdvancedCustom rule authoring via RuleInterface, plugin locations, parameters, Composer distribution

Decisions

  • S009-DR-001: Single-version documentation (no multi-version). Rationale: Parity ships frequently enough that version skew would be confusing; users are expected to run the latest version. docs/testparity.com always reflects main.
  • S009-DR-002: Markdown source lives in parity-website/guide/, built to parity-website/.vitepress/dist/ by VitePress. The guide/ directory is source; .vitepress/dist/ is derived build output.
  • S009-DR-003: Code examples must be executable against the current main branch. Examples that cannot be verified automatically must include a comment noting the verification method.