|
Download docs/docs-as-code.md from abr00kx/taper: direct link, hf CLI and curl.
- Browser
- Download file 2.4 kB
-
https://huggingface.co/abr00kx/taper/resolve/main/docs/docs-as-code.md
- Command line
-
hf download hf://abr00kx/taper/docs/docs-as-code.md
-
curl -L -o docs-as-code.md https://huggingface.co/abr00kx/taper/resolve/main/docs/docs-as-code.md
2.4 kB
| # Documentation as code | |
| Taper's documentation is treated like its code: it lives in this | |
| repository, changes through commits, and is checked automatically before | |
| anything is pushed. | |
| ## The rules | |
| 1. **Docs live next to what they describe.** Each component has a README | |
| (`server/`, `client/`, `desktop/`, `deploy/`). Guides and design notes are | |
| in `docs/`, and the protocol specification is in `content/`. | |
| 2. **A change and its documentation land together.** A commit that adds a | |
| setting, a command or a behavior updates the docs in the same commit (or | |
| the same branch). A reviewer should reject a change whose docs are | |
| missing. | |
| 3. **Plain text, standard formats.** Markdown for documents, CycloneDX JSON | |
| for SBOMs, OpenAPI and JSON Schema for the specification's APIs. No | |
| documents that only open in one program. | |
| 4. **Docs are versioned with the release.** A release's documentation is | |
| whatever was in the repository at that tag. The source tarball contains | |
| all of it. | |
| 5. **Write for the reader.** Short sentences, the active voice, and say | |
| what something does before how. Present limits and risks as plainly as | |
| features. | |
| ## What is checked | |
| The local CI gate (`scripts/ci/gate.sh`, run by the git hooks) runs: | |
| | Check | What it catches | | |
| |-------|-----------------| | |
| | `scripts/ci/check-docs.py` | Broken relative links and `#anchors`; a `TAPER_*` setting the code reads but no document mentions; a document in `docs/` missing from [the index](README.md) | | |
| | Spell check (`typos`) | Misspellings, with the project's word list in `_typos.toml` | | |
| | Spec checks and Hugo build | Invalid examples in the specification's schemas; a site that doesn't build | | |
| | SBOM check | SBOMs that no longer match the lockfiles | | |
| | Commit messages | [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/), enforced by `.githooks/commit-msg` | | |
| Behavior the documents promise is tested where it can be. For example, | |
| every claim under "Proof that it works" in | |
| [dead-mans-switch.md](dead-mans-switch.md) is an assertion in | |
| `server/test-dms.js`. | |
| ## Commit messages | |
| Commits follow Conventional Commits: `type(scope): description`, with types | |
| `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, | |
| `chore`, `revert` and `security`. Use `docs:` for documentation-only | |
| changes. Install the hooks once per clone: | |
| ```sh | |
| scripts/ci/install-hooks.sh | |
| ``` | |