docs(agents): add writing-docs guide and new-term procedure
docs/agents/writing-docs.md holds the doc/comment rules and done-check, reached via a pointer in CLAUDE.md (AGENTS.md and QWEN.md import it). docs/agents/domain.md gains the procedure for new or conflicting terms. Refs #55 (agent guide #62) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
05effe5c88
commit
e27f5c03b6
3 files changed
+35
No files matched your search
@@ -8,6 +8,10 @@ Issues live as Gitea issues on `git.arthurerlich.de` (repo `haylan/LLM-Server`);
|
||||
|
||||
Single-context: `CONTEXT.md` + `docs/adr/` at the repo root. See `docs/agents/domain.md`.
|
||||
|
||||
### Writing docs
|
||||
|
||||
Before editing `README.md`, `docs/`, or a comment in `docker-compose.yml` / `.env.example` / `scripts/`, read `docs/agents/writing-docs.md`.
|
||||
|
||||
### Deploying changes
|
||||
|
||||
The running stack lives on a separate box (the R9700 server), not wherever this repo is being edited. After **any** change to `docker-compose.yml`, `.env.example`, or a script under `scripts/`, commit/push it, then run `./scripts/update.sh` on the server to apply it — don't just describe the change as done. If this session doesn't have shell access to the server, say so explicitly and tell the user to run it themselves rather than leaving it unsaid.
|
||||
@@ -28,6 +28,14 @@ When your output names a domain concept (in an issue title, a refactor proposal,
|
||||
|
||||
If the concept you need isn't in the glossary yet, that's a signal — either you're inventing language the project doesn't use (reconsider) or there's a real gap (note it for `/domain-modeling`).
|
||||
|
||||
## New or conflicting terms
|
||||
|
||||
When you meet a term that isn't in `CONTEXT.md`:
|
||||
|
||||
- **A synonym of an existing term** (e.g. "proxy" for *gateway*): use the canonical term. There's nothing to edit or ask.
|
||||
- **A genuinely new concept:** add it to `CONTEXT.md` in the same change, as the term, a one- or two-sentence definition and an _Avoid_ list, with no values or config. Name the new term in your final message so the user can veto it.
|
||||
- **A conflict with an existing definition** (the code or the user uses a term differently than `CONTEXT.md` defines it): stop and ask the user. Redefining a term is their decision.
|
||||
|
||||
## Flag ADR conflicts
|
||||
|
||||
If your output contradicts an existing ADR, surface it explicitly rather than silently overriding:
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# Writing docs
|
||||
|
||||
How to write and update this repo's docs and code comments. The source is the truth: docs explain *why* and point at the source for *what*.
|
||||
|
||||
## Rules
|
||||
|
||||
1. **Source-of-truth line.** Every doc outside `docs/research/` and `docs/agents/` opens with a `> **Source of truth:** …` line. It names the files, services or keys the doc explains and says the source wins on disagreement. In the body, name keys and flags (`LLAMA_PARALLEL`, `--cache-reuse`) and leave their values in the source. When a doc and its source disagree, fix the doc in the same change.
|
||||
2. **The README index is the doc map.** Every new doc gets a row in `README.md`'s Docs table.
|
||||
3. **Code comments are pointers.** In `docker-compose.yml`, `.env.example` and `scripts/`, a comment is a one-line `# see docs/<file>.md#<section>` pointer, and the explanation goes in that doc section. Two things stay inline as one line, next to the pointer:
|
||||
- a **warning** about data loss, security, or an edit that breaks the stack or a script
|
||||
- on `.env.example` keys that `update.sh` fills in, the marker "auto-filled by update.sh — leave blank"
|
||||
|
||||
A `ponytail:` note becomes a pointer too, with its reasoning moved into the doc.
|
||||
4. **A source change carries its doc.** When you change code that has a pointer, update the doc section it names in the same change.
|
||||
5. **`docs/research/` is frozen history.** New research goes in a new file plus a row in [`docs/research/README.md`](../research/README.md). When a research doc goes stale, change its status in that index and leave the file itself untouched.
|
||||
|
||||
Terminology follows [`CONTEXT.md`](../../CONTEXT.md). For a term that isn't there, see [domain docs → New or conflicting terms](domain.md#new-or-conflicting-terms).
|
||||
|
||||
## Done when
|
||||
|
||||
- every pointer in the code you touched resolves to an existing heading
|
||||
- every doc you touched opens with its source-of-truth line
|
||||
- no doc you touched restates a value from its source
|
||||
Reference in new issue
Block a user