Skip to content

docs: add architecture context for contributors and agents - #1099

Draft
mickaelbegon wants to merge 25 commits into
pyomeca:masterfrom
mickaelbegon:codex/architecture-context
Draft

mickaelbegon wants to merge 25 commits into
pyomeca:masterfrom
mickaelbegon:codex/architecture-context

Conversation

@mickaelbegon

@mickaelbegon mickaelbegon commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1098.

Summary

  • add concise repository instructions in AGENTS.md;
  • add a CLAUDE.md discovery entry point requested in the issue;
  • document the observed OCP architecture and scientific invariants;
  • provide a task-to-source/test context map for contributors and coding agents;
  • reference the material from the contribution guide and PR checklist.

Scope

Documentation only: no runtime dependency, API, numerical behavior, CI rule, or architectural refactor is introduced.

Validation

  • git diff --check
  • referenced local files and Markdown links checked

This change is Reviewable

@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1099   +/-   ##
=======================================
  Coverage   77.89%   77.89%           
=======================================
  Files         198      198           
  Lines       21695    21695           
=======================================
  Hits        16899    16899           
  Misses       4796     4796           
Flag Coverage Δ
unittests 77.89% <ø> (ø)

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

☔ 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.

mickaelbegon and others added 18 commits September 29, 2026 09:30
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e time

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…es, holonomic constraints and NMPC

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ntact, markers and excitations

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ation

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…al forces, SX vs MX, cyclic NMPC, architecture, decision vector and penalty library

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…s, Solution accessors, muscle-driven reach, hopper with impact and soft contact

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…pacing, plain text transitions, EN/FR, end card)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ied example/code links

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…slations, README of the series)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ph, two-step text fades), logo corner, real durations in the READMEs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…(EN/FR)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…enalty, custom dynamics, visualization, stochastic arm with feedback gain, dynamics overview) and update the series README

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@mickaelbegon

Copy link
Copy Markdown
Contributor Author

Summary of the work on this branch

This PR started as the architecture context for contributors and agents (#1098). It now contains more than that, so here is what is in it, what I checked, and what I did not.

1. Documentation (the original scope)

  • CLAUDE.md (92 lines): a navigation map of the code (package map, "where is X", discretization, tests, conventions). It points to AGENTS.md, which stays authoritative. Every path and class name was checked against the tree, which is now at 3.5.0 (Fatrop and Pinocchio included).
  • README.md (refs Outdated README #1097): signatures of OptimalControlProgram, Objective/Constraint, the ObjectiveFcn/ConstraintFcn lists, installation, OdeSolver/Solver enums, example links and the empty TODO sections were checked against the source and corrected. I did not run the tutorial code snippets.
  • Not done: the PhaseDynamics paragraph still says a different external force at each node needs ONE_PER_NODE, but in this version numerical_data_timeseries also works with SHARED_DURING_THE_PHASE (see the animation notes below).

2. A series of 55 short teaching videos (docs/animations/)

Manim scenes (English and French, 1080p30, 14 to 106 s each, about 31 minutes per language) on optimal control with Bioptim: what an OCP is, multiple shooting vs collocation, objectives/constraints/bounds, phases and time, solvers and numerics, muscle/contact/holonomic/variational/stochastic models, NMPC/MHE, and a first-OCP walkthrough.

  • Every curve and number comes from a real Bioptim/IPOPT solve stored in data/*.npz and regenerated by generate_*.py; the code shown is the code that ran. Inputs that are synthetic (simulated measurements) or re-drawn UIs (online plots, viewers) are labelled as such on screen.
  • A shared render layer (series_style.py, render_series.py) adds the logo, slower pacing, plain text fades, the French translation and an end card with links to the examples and the code. catalog.json holds the titles, descriptions and 250+ links (paths and line ranges checked).
  • STANDARD.md (and .fr.md) documents the standard and templates/scene_template.py is a skeleton for new scenes; README.md/README.fr.md in that folder index all videos.
  • The videos themselves (mp4) are not committed (no binaries); the README explains how to render them.

What is not verified

  • The videos were reviewed from sampled frames (about five per video, by agents, then partly by me), not watched in full. French wording has not been reviewed by a native speaker other than me.
  • Several problems are local minima of non-convex problems; the notes say which solves were warm-started and which statuses IPOPT returned. Costs across different setups are not benchmarks.
  • Simplifications are documented in notes/*.md (for example the hopper is 1-D with an inelastic, frictionless impact; the MHE and marker-tracking data are synthetic).
  • No Bioptim library code was changed.

Scope and suggestion

Following @Ipuch's remark on keeping agent-oriented docs short and human-checked: the diff is now large (225 files, +26k lines, almost all under docs/animations/). I suggest splitting it:

  1. this PR reduced to CLAUDE.md / AGENTS.md / docs/architecture/* and the README corrections;
  2. a separate PR (or a separate repository, e.g. next to bioptim-tutorial) for docs/animations/.

Happy to do the split, or to drop the animations from the repository entirely if the maintainers prefer.

🤖 Generated with Claude Code

Always populate shifted state guesses on the first interpolation conversion,
with deterministic coverage for the first and subsequent windows.
Use unscaled IPOPT convergence for the collocation feasibility regression without relaxing its tolerance.
@pariterre

Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

@pariterre
pariterre marked this pull request as draft October 14, 2026 20:56
@Ipuch Ipuch mentioned this pull request Oct 15, 2026
@Ipuch

Ipuch commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

I think the videos are fun, We could have a separate repo about it. bioptim-videos, where you can drop the code and the .mp4 files and add a link to this repo into the bioptim readme.
Concerning the llm context we added it with @pariterre based on your work in #1115

So I propose to close the present PR.

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.

docs: add lightweight architecture context for contributors and coding agents

3 participants