Skip to content

feat: "start here" mode — guided six-step tour, then your own project - #39

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/start-here-mode
Sep 10, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/start-here-mode

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Adds the start here mode (modes/start_here.md) that catches the published start-here prompt and runs a guided first session:

  • Turn 0: what PyAutoFit is, the bundled dataset/gaussian_x1/ and its truth values, the Gaussian equation, a plot of the data, one depth question, then the step-1 prompt and stop.
  • Part 1: the six sections of the RTD Natural Language Inference page, one step per turn — explain → the page's prompt to type (verbatim) → run through the existing skill and show the real output → try a variation → check-in.
  • Part 2: the same six steps on the user's own science — paper (af_ingest_paper) or plain description → af_compose_model → af_wrap_likelihood / af_custom_analysis with the data-inspection gate → af_configure_search → go-ahead → fit and results → start-new-project offered → extensions. af_adapt_to_domain is the engine; the mode only sequences it.
  • Teacher mode and questions everywhere: a fixed footer on every step of both parts; a question never advances the step; "teacher mode" mid-tour switches modes/teacher.md on without leaving the tour.

AGENTS.md registers the mode and the selection rule (the start-here prompt outranks inference from the opening request; .maintainer still outranks everything). README.md is restructured around the tour: Getting Started → Setting up → The tour, step by step → Your own project → Teacher mode and HowToFit → License. No prompt blockquote text changed; the model.info block is brought into lockstep with the RTD page (PyAutoLabs/PyAutoFit#1603). docs/setup/claude_code.md and codex_cli.md say the tour takes questions at every step.

Scripts Changed

New scripts/start_here/ — the dry run of Part 1, one workspace-style script per step, plus gaussian.py (peak-normalised, matching the page's equation and the dataset README; af.ex.Gaussian is area-normalised and would put the normalization near 620, outside the page's 0–100 prior) and analysis.py (independent Gaussian errors, visualiser for the live fit images):
step_1_compose_model.py, step_2_define_likelihood.py, step_3_choose_search.py, step_4_fit_and_results.py, step_5_save_and_load.py, step_6_three_gaussians.py, step_6_three_gaussians_nautilus.py.

Dry run (all numbers quoted in the mode come from these runs)

Step Result
1 model.info ids 0–2 with the page's priors; two-Gaussian variation prints a 6-parameter Collection
2 random-draw log-likelihood + model-vs-data figure; truth value alongside
3 installed search roster read from the library; DynestyStatic(nlive=100) configured
4 centre 50.00 ± 0.28, normalization 24.89 +0.67/−0.58, sigma 9.82 +0.28/−0.26, log Z −48.95, 16 s (truth 50 / 25 / 10)
5 reload through the aggregator without re-running: same evidence and medians
6 three Gaussians + ascending-centre assertion: Dynesty at 0.27 % efficiency, unconverged after 30 min (recorded in the mode as a warning + teaching point); Nautilus 147 s, log Z −60.23 vs −49.41 for one Gaussian (Occam prefers the single Gaussian)
Part 2 dataset/sne_cosmology/ as a plain-description P0: Ωm 0.343 +0.022/−0.021, H0 73.13 +0.30/−0.29 (README 0.344 / 73.14), 14 s; nothing committed from it

Every script passes python autoassistant/audit_skill_apis.py --file; --check-version exits 0; all eleven RTD prompts quoted in the mode grep byte-identical in PyAutoFit/docs/overview/natural_language.md.

Test Plan

  • Fresh session in this repo: paste the start-here prompt; the reply states the mode, gives the intro, hands over the step-1 prompt and waits
  • Type the step-1 prompt: model.info with the page's priors; "make it two Gaussians": a 6-parameter Collection
  • source activate.sh && for s in scripts/start_here/step_*.py; do python $s; done (step 6 Dynesty is the slow one; Nautilus variant ~2.5 min)

Merge order

Library-first gate: PyAutoLabs/PyAutoFit#1603 (docs only, links the prompt to this mode) merges first; both are documentation-only, so the gate is a formality.

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BrGfrSxV9xoqCa4v1p9hix

The published start-here prompt (PyAutoFit README, RTD Quick Start, this
README) now has a mode that catches it. modes/start_here.md scripts a guided
first session: turn 0 introduces PyAutoFit, the bundled gaussian_x1 dataset
and its equation; Part 1 walks the six sections of the RTD Natural Language
Inference page one step per turn, handing the user each section's prompt
verbatim, running it through the existing skills, showing the real output
and inviting a variation; Part 2 replays the same six steps on the user's
own science (paper or plain description -> model -> likelihood -> search ->
fit -> organise) through af_adapt_to_domain and its channels. Every step of
both parts carries the same footer: ask anything, or say "teacher mode".

AGENTS.md registers the mode and its selection rule; README.md is
restructured around the tour (Getting Started -> Setup -> The tour step by
step -> Your own project -> Teacher mode and HowToFit), with every prompt
blockquote unchanged and the model.info block brought into lockstep with
the RTD page; the two setup pages say the tour takes questions at every
step.

scripts/start_here/ holds the dry-run of the tour, one workspace-style
script per step plus the shared peak-normalised Gaussian and Analysis
(af.ex.Gaussian is area-normalised and would push the normalization outside
the page's 0-100 prior). Step 4 recovers centre 50.00, normalization 24.89,
sigma 9.82 in 16 s; the three-Gaussian extension runs at 0.27% Dynesty
efficiency (unconverged after 30 min) and 2.5 min under Nautilus, which the
mode offers as the fallback (log evidence -60.23 vs -49.41 for one Gaussian).

Closes #38

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BrGfrSxV9xoqCa4v1p9hix
@Jammy2211 Jammy2211 added the pending-release Awaiting coordinated PyAuto release label Sep 10, 2026
@Jammy2211
Jammy2211 merged commit 057a13b into main Sep 10, 2026
1 check passed
@Jammy2211
Jammy2211 deleted the feature/start-here-mode branch September 10, 2026 20:40
@Jammy2211 Jammy2211 removed the pending-release Awaiting coordinated PyAuto release label Oct 7, 2026
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.

1 participant