Skip to content

docs: single-source normative rules with marked canonical copies (refs #64) - #66

Merged
Coldwings merged 2 commits into
mainfrom
docs/canonical-sourcing
Aug 31, 2026
Merged

Coldwings merged 2 commits into
mainfrom
docs/canonical-sourcing

Conversation

@Coldwings

Copy link
Copy Markdown
Collaborator

Refs #64

What

PR 2 of 4 under #64: gives every normative rule exactly one canonical home and makes the remaining duplicates explicit, machine-checkable copies. Audience separation is preserved — AGENTS.md for agents, CONTRIBUTING.md for community, docs/README.md for readers; only the normative text is single-sourced.

Changes

  1. Marker convention (established here, enforced by scripts/check-docs.sh in PR 4):
    • <!-- CANONICAL id="..." --> at a rule's single home;
    • <!-- CANONICAL-COPY source="..." id="..." --> around safety-critical verbatim copies — identical modulo leading indentation, edit both or neither.
  2. Canonical homes assigned:
    • the verify trio → AGENTS.md (marked copies in CONTRIBUTING.md and docs/README.md, so each audience still sees the commands in place);
    • the Hash64/score wire-protocol rule → docs/hashring.md §6; the ChunkKey rule → docs/chunk.md §6 (marked copies in AGENTS.md — safety-critical redundancy an agent must not miss, now explicitly labeled).
  3. "Authority and canonical sources" section in AGENTS.md: precedence design-assumptions.md > package docs > AGENTS.md > CONTRIBUTING.md, with the newest-accepted-ADR tiebreak from PR docs: establish the Architecture Decision Record system (+3 backfills) (refs #64) #65; CONTRIBUTING.md points at it.

Deliberately out of scope: marking every shared paragraph (the golden-value rule etc.) — the precedence clause covers unmarked duplication; over-marking would ossify prose.

Verification

Docs-only. go vet ./... clean; go test ./... -race -count=1 13/13 PASS.

Umbrella issue #64, PR 2 of 4. The verification trio and the wire-protocol
prohibitions were restated across AGENTS.md, CONTRIBUTING.md, and
docs/README.md with no canonical home — duplicated normative text drifts,
and readers of different files would follow different rules.

- Marker convention: <!-- CANONICAL id=... --> at each rule's single home;
  <!-- CANONICAL-COPY source=... id=... --> around safety-critical verbatim
  copies (identical modulo leading indentation; edit both or neither).
  scripts/check-docs.sh (PR 4) will enforce the copies mechanically.
- Canonical homes: the verify trio lives in AGENTS.md (copies in
  CONTRIBUTING.md and docs/README.md); the Hash64/score wire-protocol rule
  lives in docs/hashring.md §6 and the ChunkKey rule in docs/chunk.md §6
  (copies in AGENTS.md, kept because an agent must not miss them).
- New 'Authority and canonical sources' section in AGENTS.md: precedence
  order (design-assumptions > package docs > AGENTS.md > CONTRIBUTING.md)
  plus the newest-accepted-ADR tiebreak; CONTRIBUTING.md points at it.

Refs #64
@Coldwings

Copy link
Copy Markdown
Collaborator Author

@copilot please review. Focus on: marker-format consistency (ids/sources pairing), whether the copy blocks truly match their canonical sources (modulo indentation), and the precedence clause's clarity. Do NOT push commits; post review comments only.

Copilot AI commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

@copilot please review. Focus on: marker-format consistency (ids/sources pairing), whether the copy blocks truly match their canonical sources (modulo indentation), and the precedence clause's clarity...

Review finding: the marker IDs/sources pair correctly, and all three copy blocks match their canonical bodies after indentation normalization. The precedence clause is ambiguous for docs/README.md: it says conflicts among “repository documents” follow an ordered list, but README is neither docs/design-assumptions.md, a docs/<pkg>.md package document, AGENTS.md, nor CONTRIBUTING.md. A conflicting normative rule there has no stated rank. Please either include it in the ordering or scope the clause to the enumerated documents.

Copilot review on PR #66: the clause enumerated every normative document
except docs/README.md itself, leaving its rank undefined. It slots between
design-assumptions.md and the package documents, as the documentation
policy whose template governs them.
@Coldwings

Copy link
Copy Markdown
Collaborator Author

@copilot fixed: docs/README.md now explicitly ranks between design-assumptions.md and the package documents (the policy whose template governs them). Please re-review.

Copilot AI commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

@copilot fixed: docs/README.md now explicitly ranks between design-assumptions.md and the package documents (the policy whose template governs them). Please re-review.

Re-review complete: the precedence clause now explicitly ranks docs/README.md and resolves the reported ambiguity. No further findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants