Skip to content

Tutorials ​

The tutorials follow one project, quad: a small library of quadrature rules (the trapezoidal and Simpson rules) and a program that uses it. It starts as three source files and no build script, and grows track by track: modes, a library, tests, dependencies, then verified numerical results, a linted and reviewed code, and an AI assistant that works under the same checks.

Each track is a sequence of chapters, from the simplest to the most demanding; a track assumes the previous ones. Every command output shown is the real one: the pages include what the commands printed when docs/scripts/docs_examples.py ran them, and the CI reruns them and fails when an output changes.

Tracks ​

TrackLevelYou learn
1. First stepsbasicbuild without configuration, a fobos with modes, a library, tests and coverage, dependencies
2. Growing a projectintermediatetemplates and variables, build profiles and feature flags, external libraries (MPI, OpenMP), rules, the cache, CI with machine-readable output, fpm and Makefile export
3. Many repositoriesintermediatean ecosystem of projects: dashboard, commands across all of them, checking the projects downstream, the release train
4. Code qualityadvancedthe linter, baselines and fixes, reviewing a change, querying the code, verified modernisation, C and Python bindings
5. Verified numericsadvancedcases and references, shadow builds and the compiler matrix, error and uncertainty assessment, differential runs, benchmarks, the gate, profiling, clusters
6. AI-assisted developmentexperta local model, explained failures, questions answered from the sources, generated tests, merge conflicts, an agent working under the gate

1. First steps ​

ChapterYou learn
1. A first buildfobis build with no configuration: source discovery, dependency order, incremental rebuilds
2. A fobos filemodes, --mode, build directories, fobis run
3. A librarystatic and shared libraries, fobis install, linking an installed library
4. Testsfobis test, doctests, coverage
5. Dependencies[dependencies], fobis fetch, the lock file
flowchart LR
  A[1 first build] --> B[2 fobos] --> C[3 library] --> D[4 tests] --> E[5 dependencies]

2. Growing a project ​

ChapterYou learn
1. Templates and variablestemplate, $variables, fobis introspect
2. Build profiles and featuresbuild_profile, [features], cflags_heritage
3. OpenMP and MPIopenmp = True, mpi = True
4. A project that depends on quaddependon, interface changes followed
5. Rules[rule-NAME], pre_build/post_build, intrinsic rules, --jobs
6. Continuous integrationfobis check, --json, a CI workflow
7. Other build systemsfobis fpm export, --makefile

3. Many repositories ​

ChapterYou learn
1. An ecosystemthe registry, discover, add, graph
2. The dashboardreleases due, CI, drift, stale pins; JSON and HTML
3. Acting on every projectexec, fetch, in release order
4. Before releasingcheck (dependents against a working copy), impact
5. Shared boilerplatescaffold status and sync
6. The release trainrelease: plan, pre-flight, release in order

4. Code quality ​

ChapterYou learn
1. The linterfobis lint, --explain, --select, formats for CI
2. Suppressions, baselines and fixesinline suppressions, --diff/--fix, the baseline
3. Reviewing a changefobis review, findings on the changed lines only
4. Querying the codefobis query: callers, writers, regions, MPI calls
5. Verified modernisationfobis modernize: fixes kept only when tests pass
6. C and Python bindingsfobis bindings, a shared library, ctypes
7. Instructions for agentsfobis agents-md

5. Verified numerics ​

ChapterYou learn
1. Cases and quantities[case:NAME], quantities, fobis case run, provenance
2. Referencesfobis verify, --update, a failure explained by its provenance
3. Defects only some builds see--shadow checks/sanitize/strict, fobis matrix
4. How accurate is the result?fobis assess: refinement, precision and rounding families, budgets
5. Is a refactoring harmless?fobis diff-run REF, --assess, tolerances
6. Is it faster?fobis bench, --compare, --record
7. One command for all of itfobis gate, [gate]
8. Where the time goesfobis profile: gprof, callgrind
9. On a cluster--runner slurm, the login-node guard, nsys on a GPU

6. AI-assisted development ​

ChapterYou learn
1. A local modelfobis llm: runtime, models, doctor
2. Build failures, explainedbuild --explain: diagnoses from facts, cited answers
3. Crashes, locatedrun --explain, trusted locations
4. Questions about the codefobis ask, what a citation guarantees
5. Generated testsfobis testgen: skeletons, accepted tests
6. A second reader for a changereview --deep
7. Commit messagesfobis commit, --show-facts
8. Merge conflictsfobis merge-assist, compiled proposals
9. An agent under the gatefobis mcp, an agent calling the gate

Running the examples yourself ​

The project of each chapter is in docs/examples/tutorial: the files/ of a chapter are what it adds or changes, its session.sh the commands it runs. To rerun them all:

bash
python docs/scripts/docs_examples.py          # regenerates docs/examples/output
python docs/scripts/docs_examples.py --check   # compares with the committed outputs

The outputs were produced with gfortran 13, the compiler of the CI; DOCS_FC=gfortran-14 runs them with another. Timings, profiles and the cluster chapter depend on the machine: they were recorded once (files named *.measured.txt) and the CI checks only that their commands are unchanged.