Repository navigation
Action the review of the agent instruction files #7347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
trexfeathers
merged 10 commits into
SciTools:brownfield
from
trexfeathers:brownfield-review-actions
Oct 27, 2026
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
50c157e
Revise the library rules on imports, graphs, prose and exits
trexfeathers f2ce30f
Require a doctest run before finishing, not only after editing one
trexfeathers 850d907
Add a maintainer-notes directive that publishes nothing
trexfeathers add3af6
Route maintainer prose to a maintainer-notes block
trexfeathers a1bc83a
Mark the module docstrings whose prose should move
trexfeathers 95d5d85
Tighten Module Docstrings Carry the Explanation by eight lines
trexfeathers dd69216
Merge branch 'brownfield' into brownfield-review-actions
trexfeathers 504b785
Move maintainer prose into maintainer-notes blocks
trexfeathers d8ce36b
Return three docstring passages to the reader who needs them
trexfeathers 2226b28
Trim the doctest guidance, and stop it over-claiming
trexfeathers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Copyright Iris contributors | ||
| # | ||
| # This file is part of Iris and is released under the BSD license. | ||
| # See LICENSE in the root of the repository for full licensing details. | ||
| """The ``maintainer-notes`` directive: docstring prose that is never published. | ||
|
|
||
| A module docstring is the only prose read on every visit to a module, checked | ||
| in the diff, and impossible to lose track of. That makes it the right home for | ||
| subsystem explanation - but Sphinx publishes it, so prose written for whoever | ||
| maintains the module arrives in front of whoever uses it. This directive is | ||
| the way out: docutils collects its content and this returns nothing, so the | ||
| prose stays in the file and reaches no page. | ||
|
|
||
| The content is deliberately never parsed. :meth:`MaintainerNotes.run` returns | ||
| no nodes and never calls ``nested_parse``, so anything inside is free text. | ||
| Broken markup, unbalanced ``>>>`` and stray asterisks are all safe, and the | ||
| doctest builder does not see them either. That is the point of the design, not | ||
| an oversight: an agent writing notes cannot break a docs build with them. | ||
|
|
||
| Getting the name wrong fails loudly. ``make html`` runs with ``-W``, so an | ||
| unknown directive stops the build, and the content does not render on the way | ||
| out. A plain reST comment fails the other way: dedent one line and the prose | ||
| is silently published. | ||
| """ | ||
|
|
||
| from docutils.parsers.rst import Directive # type: ignore[import-untyped] | ||
| from sphinx.application import Sphinx | ||
|
|
||
|
|
||
| class MaintainerNotes(Directive): | ||
| """Swallow the directive's content, contributing nothing to the page.""" | ||
|
|
||
| has_content = True | ||
| optional_arguments = 1 | ||
| final_argument_whitespace = True | ||
|
|
||
| def run(self): | ||
| """Return no nodes, leaving the content unparsed and unpublished.""" | ||
| return [] | ||
|
|
||
|
|
||
| def setup(app: Sphinx): | ||
| """Set up the Sphinx extension. | ||
|
|
||
| This function is expected by Sphinx to register the extension. | ||
| """ | ||
| app.add_directive("maintainer-notes", MaintainerNotes) | ||
|
|
||
| return {"version": "0.1"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.