Skip to content

docs: Standardize via CONTRIBUTING.md + WRITING.md - #99

Merged
tony merged 2 commits into
masterfrom
house-style
Aug 22, 2026
Merged

docs: Standardize via CONTRIBUTING.md + WRITING.md#99
tony merged 2 commits into
masterfrom
house-style

Conversation

@tony

@tony tony commented Aug 22, 2026

Copy link
Copy Markdown
Member

AGENTS.md is read on every task, so a policy that matters to one class of change costs context on all the others. This splits how the project works from how it writes, so each loads when it applies, and makes both discoverable to humans rather than only to agents.

The root file becomes a router. It carries what should always be visible — what the repository is, where things live, and the change discipline every diff is held to — then points at one document per class of change.

Layout

AGENTS.md            router
CLAUDE.md -> AGENTS.md
.github/
├── CONTRIBUTING.md  how we work: setup, the gates, tests, docs, releases, pull requests
└── WRITING.md       how we write: README, CHANGES, release notes, docstrings, comments, commits

What moved

Nothing was deleted without a destination. Environment, commands, gates, testing strategy and fixtures moved to .github/CONTRIBUTING.md. Docstring conventions, doctest rules, changelog conventions, code-block rules, the comment gates and slop prevention moved to .github/WRITING.md, along with the whole of docs/AGENTS.md ("Documentation voice"), which is prose policy and now has one home.

Verification

Every gate was run, and the doctest collection count was recorded before and after. Documented examples are executed by pytest, so a preserved example that stopped being collected would be an invisible test deletion — the count is the proof it did not happen.

This repository

AGENTS.md goes from 751 lines to 65, across 9 changed files. No source, test, or CI file is touched.

why: AGENTS.md is read on every task, so a policy that matters to one
class of change costs context on all the others. Splitting how we work
from how we write lets each be loaded when it applies, and keeps both
discoverable to humans rather than only to agents.

what:
- Replace AGENTS.md body with a router: the project map, universal
  change discipline, then one pointer per class of change
- Add .github/WRITING.md, the fullest "Documented examples that run"
  section in the fleet: both collection paths (.py delegates to
  pytest's own DoctestModule; .rst/.md go through
  DocutilsDocTestFinder), every directive form (doctest_block,
  .. doctest::/{doctest}, testsetup/testcleanup), and what each
  registered flag (ALLOW_UNICODE, ALLOW_BYTES, NUMBER, HIDE) actually
  does versus the stdlib set
- Document, verified against source and tests, that testsetup/
  testcleanup do not share globals across blocks the way Sphinx's own
  testsetup does, and that docs/justfile's doctest recipe is not run
  by CI
- Add .github/CONTRIBUTING.md with this repo's real gates, matrix, and
  release process, read from pyproject.toml, the justfile, and the
  workflows
- Fix README: unverified PyPy support claim, docutils/myst-parser
  minimum-requirements section against actual pyproject.toml pins, a
  typo naming the package, and a "We"-voiced sentence; preserve every
  link and all three `>>> ` prompts
- Replace docs/project/contributing.md and code-style.md with pointer
  pages to the canonical files; an {include} was tried and produces
  dead cross-file anchors on this repo's Sphinx, confirmed by
  inspecting the built HTML
- Delete docs/AGENTS.md and docs/CLAUDE.md (absorbed into WRITING.md)
  and the lowercase .github/contributing.md (replaced)
@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.63%. Comparing base (5dac742) to head (57da9fb).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #99      +/-   ##
==========================================
- Coverage   76.68%   76.63%   -0.05%     
==========================================
  Files          15       15              
  Lines        1025     1023       -2     
==========================================
- Hits          786      784       -2     
  Misses        239      239              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tony tony changed the title Docs(refactor[agents]): Route instead of restate docs: Standardize via CONTRIBUTING.md + WRITING.md Aug 22, 2026
why: iter_documentation_markdown_files walks README.md and docs/**,
and this branch removes docs/AGENTS.md and docs/CLAUDE.md, so the
name guard can no longer match anything. Code nothing can reach is
the kind this project's own writing guide says to delete.

what:
- Remove the AGENTS.md/CLAUDE.md skip from the documentation walk
@tony
tony merged commit a11a180 into master Aug 22, 2026
26 checks passed
@tony
tony deleted the house-style branch August 22, 2026 17:32
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.

1 participant