Repository navigation
docs: add tutorial writing style resource #539
Description
Overview
Make /docs the go-to callable resource for editing scientific Python scripts, notebooks, examples and tutorials. Add a canonical tutorial-writing guide derived from the approved COSMOS-Web Ring tone while keeping the existing README/setup-page guide separate, and enforce the distinction at authoring and review time.
This remains a skill-based capability: the task adds no Brain conductor or faculty because it introduces no independent decision surface, state or side effects. The existing Workspace Agent continues to plan example placement and structure.
Plan
- Add one canonical tutorial-writing guide for scientific scripts, notebooks, examples and HowTo material.
- Keep
/docsas the callable entry point and make it select the tutorial guide, the existing people-facing guide, or both according to the document surface. - Standardise notebook follow-up prompts as
**🤖 Ask AI:**and include the established__Contents__plus"""__Section__"""source format by canonical reference. - Preserve the iterative propose → explain significant changes → wait → apply editing boundary.
- Extend the review faculty so tutorial prose is checked against the canonical guide.
- Add a focused contract test and run Brain discovery/surface drift checks.
Tier: judge — merge mode: human /prm.
Detailed implementation plan
Affected Repositories
- PyAutoBrain (primary)
Work Classification
- Library-style development workflow for an organ repository.
Worktree root
~/Code/PyAutoLabs-wt/tutorial-documentation-style/
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| PyAutoBrain | main |
clean |
No active Mind task claims PyAutoBrain. An older unregistered worktree exists at .worktrees/pyautodna-stack-management/PyAutoBrain on feature/pyautodna-stack-management; the human acknowledged it and this task will not touch it.
Suggested branch: feature/tutorial-documentation-style
Implementation Steps
- Add
skills/TUTORIAL_WRITING_STYLE.mdwith the approved voice, section arc, code narrative, audience adaptation, scientific distinctions, provenance safeguards,**🤖 Ask AI:**callouts, iterative editing contract and final checklist. - Include the established notebook-source conventions—opening
__Contents__and top-level"""__Section__"""narrative docstrings—by pointing to the existing canonical format rather than creating a competing template. - Update
skills/docs/docs.mdso/docsloadsWRITING_STYLE.mdfor READMEs/setup/web documentation, the tutorial guide for scientific scripts/notebooks/tutorials, and both for mixed work. - Update
agents/faculties/review/AGENTS.mdso tutorial-documentation diffs are checked against the new guide. - Add a focused test under
tests/that guards the/docsand review-faculty links to the canonical resource. - Run the targeted tests plus
bin/install.sh --check-project-discovery PyAutoBrainandbin/install.sh --check-agents-surface.
Key Files
skills/TUTORIAL_WRITING_STYLE.md— canonical scientific tutorial prose and editing guide.skills/docs/docs.md— callable/docsrouting and application contract.agents/faculties/review/AGENTS.md— review-time enforcement.tests/test_docs_style_contract.py— single-source wiring contract.
Out of scope
- Editing the COSMOS-Web Ring notebook or assistant files themselves.
- Adding a new Brain conductor or faculty.
- Changing scientific claims, numerical values, code behaviour, links or citations in downstream tutorials.
Original Prompt
Click to expand starting prompt
This prompt describes the tone and style we hit when we made a good update to a python script / notebook documentation, in particular the first-AI-COSMOS-Ring example, can you turn this into a go to callable resource? Maybe use a skill but I think it could be part of PyAutoBrain as an agent or as part of its docs agent or something, which I think recently also got a github README.md style update:
Aim for the tone of a knowledgeable person guiding someone through a picture or experiment: direct, patient and precise, without sounding formal, promotional or childish.
Writing principles:
- Use plain language and short, connected paragraphs.
- Start with what the reader can see or do, then explain what it means.
- Introduce each technical term only when it becomes useful. Explain it in everyday language at first use.
- Prefer concrete descriptions: “50 smooth ellipses”, “the light left after subtracting the foreground galaxy”, “small differences consistent with noise”.
- Keep the science accurate. Simplify the explanation, not the underlying meaning.
- Avoid jargon about implementation when it does not help the reader understand the science.
- Avoid vague or distracting words such as “blob”, “speckles”, “payoff” and “headline number”.
- Avoid hype, rhetorical questions, forced analogies and repeated reassurance.
- Use British English.
For each section:
- Orient the reader to the image, question or task.
- Explain the relevant idea and why it matters.
- Say what running the next code cell will do.
- Explain what to look for in the output and how to interpret it.
For code:
- Keep the narrative focused on the scientific purpose.
- Put incidental implementation details in concise Python comments.
- When appropriate, tell readers which settings they can change and which they can leave alone.
- For experiments, explain the starting values, suggest specific changes, describe the expected effect and provide a clear way to reset.
- Distinguish loading or evaluating an existing model from fitting a new one.
Preserve important distinctions:
- Subtracting a foreground galaxy’s light is different from undoing the gravitational bending of the source’s light.
- A reconstruction is inferred from a model; it is not a direct photograph.
- A plausible measurement does not establish that a model fits well.
- A single best model does not by itself describe uncertainty.
- Attribute figures, data and models to their actual sources.
Adapt to the audience:
- For introductory tutorials, introduce fewer concepts and keep numerical methods out of the main narrative.
- For advanced tutorials, retain the necessary technical detail but explain its purpose before its mechanics.
- Do not remove useful detail merely to make the prose shorter.
Editing boundaries:
- Preserve scientific claims, numerical values, code behaviour, links, citations and required formatting unless I explicitly authorise changes.
- Flag scientific inaccuracies or misleading wording rather than silently preserving or replacing them.
- Do not invent provenance, results, performance claims or certainty.
- Respect any protected text blocks byte-for-byte.
Work iteratively:
- Review one coherent block at a time.
- Show proposed wording and briefly explain only the significant changes.
- Wait for my feedback before applying it.
- Carry agreed terminology and tone forward consistently.
- Edit canonical source files rather than generated notebooks or documentation, then run the project’s required regeneration and validation steps.
Ask AI / Gemini:
- At opportune moments in the example or tutorial, put an "Ask AI / Gemini:" thing in bold font with a suggested follow up
question the reader can ask the AI.
Follow-up decisions
- All notebooks are AI material, so use
**🤖 Ask AI:**everywhere and do not use a Gemini-specific label. - Include the established opening
__Contents__and top-level"""__Section__"""Python docstring format in the guidance by canonical reference. - The skill-based
/docsarchitecture and branchfeature/tutorial-documentation-styleare approved.
Activity
Jammy2211 commentedon Oct 24, 2026
Human-authorized Heart RED override (development only) — 2026-10-24
The live human replied “I authorize” after the ship gate surfaced the exact current RED reason:
PyAutoLens: 2 commit(s) behind originBranch evidence:
git diff --checkpassed.Scope: commit, push and open this task’s judge-tier development PR only. This authorization does not permit merge, release, rehearsal, check bypass or any claim that this branch repairs Heart. Heart remains RED for release purposes.
Jammy2211 commentedon Oct 24, 2026
Committed ReviewSurface re-read at
e72ff50: CLEAN — one commit, four intended files, no risk flags, no claims to falsify, and no link-resolution or single-source findings. Proceeding under the recorded development-only Heart RED override; merge and release remain unauthorized.Jammy2211 commentedon Oct 24, 2026
Development PR opened
e72ff50PyAutoLens: 2 commit(s) behind originJudge tier: awaiting a separate human
/prm. No merge or release has been authorised.Jammy2211 commentedon Oct 24, 2026
Shipped
Merged #540 at
168e84ccb8dc29819699c6f8c51f1126f7f1d9dfafter both required Brain Tests legs passed on Python 3.12 and 3.13./docsnow keeps the existing README/setup/Read the Docs guide and adds a separate canonical guide for scientific Python scripts, notebooks, worked examples and HowTo lessons. The review faculty and focused contract tests enforce the split. No public API or workspace script changed.The task was development-shipped under the recorded Heart RED override; this merge was separately authorised by the human
/prm. No release was performed.