Skip to content

Add the prose rules to AGENTS.md - #278

Open
pbrubeck wants to merge 2 commits into
mainfrom
pbrubeck/agents-md-prose-rules
Open

Add the prose rules to AGENTS.md#278
pbrubeck wants to merge 2 commits into
mainfrom
pbrubeck/agents-md-prose-rules

Conversation

@pbrubeck

@pbrubeck pbrubeck commented Aug 8, 2026

Copy link
Copy Markdown

Description

AI-assisted (Claude Code)

AGENTS.md only, no code. Companion to firedrakeproject/firedrake#5338, which makes the same two
additions on the Firedrake side.

FIAT's Style and Conventions section already matches Firedrake's on class attributes, the hasattr
prohibition, type hints and numpydoc. It carries neither prose rule, so agent-written prose here is
unconstrained.

Main changes

  • Plain English (ASD-STE100) for docstrings and comments, with a Clause-Stacked Docstrings And
    Comments
    anti-pattern. Unedited AI prose reliably produces garden-path sentences that bury the
    subject in a relative clause.

  • Documenting Code That Is Not There. The case worth naming is not "this used to do X", which
    nobody writes, but an argument against a branch that was just removed:

    # A test for a repeated point here would divide by zero.

    That reads as present tense while describing absent code. The rule carries a test a reader can
    apply — a reader who never saw the diff must not be able to tell that anything was removed — and
    the words that give it away, including would when its subject does not exist.

This adds the first ## Anti-Patterns section to FIAT's AGENTS.md. Both examples use small FIAT-
flavoured functions rather than real code, so they do not go stale.

Why examples rather than prose

The rules with WRONG/RIGHT pairs get followed; the ones stated only as prose get missed. On the
Firedrake side, Document The Present, Not The Past was violated during the work that produced
firedrakeproject/firedrake#5337 while the rule was sitting in the file, and a human caught it rather
than the rule. These two are also mechanically checkable, and I am running a local PostToolUse hook
that greps added lines for the Sphinx field-list style, over-long sentences, the past-tense tells,
and the hasattr guard.

pbrubeck and others added 2 commits August 8, 2026 12:14
FIAT's style section already matches Firedrake's on class attributes,
the hasattr prohibition, type hints and numpydoc. It carries neither
prose rule.

Add the ASD-STE100 rule for docstrings and comments, and the rule
against documenting code that is not there. Give each an anti-pattern
with a WRONG/RIGHT pair, since that is the form these rules get
followed in.

Companion to firedrakeproject/firedrake#5338.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Three sentences, one idea each, in place of one of 27 words.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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