Skip to content

docs: add guidance for coding agents - #1868

Merged
janfb merged 5 commits into
mainfrom
add-ai-tool-files
Jul 21, 2026
Merged

janfb merged 5 commits into
mainfrom
add-ai-tool-files

Conversation

@janfb

@janfb janfb commented May 26, 2026 •

Copy link
Copy Markdown
Contributor

Adds concise, shared guidance for coding agents working in sbi and makes the
documentation easier for tools to navigate.

  • a tool-agnostic AGENTS.md with setup, validation, conventions, and a small
    code map
  • a CLAUDE.md shim that imports the shared instructions
  • llms.txt index at the documentation root
  • check links in the agent-facing files with a monthly scheduled workflow

The code map intentionally points to the current exports and implementation
directories instead of duplicating class hierarchies in a manually maintained
architecture inventory.

@codecov

codecov Bot commented May 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.80%. Comparing base (3adf008) to head (86af009).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1868   +/-   ##
=======================================
  Coverage   87.80%   87.80%           
=======================================
  Files         143      143           
  Lines       13435    13435           
=======================================
  Hits        11796    11796           
  Misses       1639     1639           
Flag Coverage Δ
fast 81.33% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Comment thread AGENTS.md Resolved
Comment thread docs/llms.txt Resolved
Comment thread AGENTS.md Resolved
Comment thread ARCHITECTURE.md Resolved
Comment thread ARCHITECTURE.md Resolved
Comment thread AGENTS.md Resolved
Comment thread AGENTS.md Resolved
Comment thread AGENTS.md Resolved
Comment thread ARCHITECTURE.md Resolved
Comment thread ARCHITECTURE.md Resolved
janfb added 5 commits July 20, 2026 22:28
AGENTS.md is the tool-agnostic entry point for AI coding agents with environment setup,
testing, code style, repo structure, and an explicit no-prescribed-workflow for agent
tooling.

ARCHITECTURE.md is sbi's domain glossary (trainer hierarchy, posterior types, design
patterns, key APIs) — useful as both human documentation and an agent-discoverable
vocabulary reference.
- Update 19_flowmatching_and_scorematching link to vector_field_methods
- Add how-to entries for 24_abstraction_levels and 25_choosing_vector_field_options
- Serve docs/llms.txt at the docs URL root via Sphinx html_extra_path
- Cross-reference llms.txt from AGENTS.md
- ARCHITECTURE.md: add NPE_PFN as a direct NeuralInference child; fix
  MarginalTrainer annotation (unconditional density, not mixed
  discrete-continuous); clarify the ConditionalEstimatorBuilder generic;
  caption the pipeline as an NPE example; point Dependencies to pyproject.toml
  (nflows, not pyknos); drop the Key APIs section
- AGENTS.md: e.g. consistency, 'AI-generated' wording, 'contributors';
  drop mkdocs/ line (Sphinx/docs is canonical)
- add root CLAUDE.md that imports AGENTS.md via @AGENTS.md so Claude Code picks
  up the shared instructions (portable across Windows checkouts)
- add monthly Docs Link Check workflow (lychee, GITHUB_TOKEN-authenticated)
@janfb

janfb commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

thanks for the review @dgedon , very good points!

I looked into this again and also came to the conclusion that additional md files for agent guidance are not really useful, especially when what they are explaining can be discovered by looking at the code, which the agent is really good at.

So I suggest we remove ARCHITECTURE.md completely.

And a review by GPT 5.6 Sol itself, suggested to additionally trim down AGENTS.md as well.

please have another look

@janfb
janfb force-pushed the add-ai-tool-files branch from 095b49c to 86af009 Compare July 20, 2026 20:40
@janfb janfb changed the title docs: add files for ai tools docs: add guidance for coding agents Jul 20, 2026
@janfb
janfb merged commit 7927d8c into main Jul 21, 2026
21 checks passed
@janfb
janfb deleted the add-ai-tool-files branch July 21, 2026 17:33
dgedon added a commit to dgedon/sbi that referenced this pull request Nov 13, 2026
It repeated the README, and agents learn more from the code (sbi-dev#1868).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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