Skip to content

docs(concepts): add the loadouts concept guide - #940

Merged
norrietaylor merged 5 commits into
mainfrom
pr/docs-concept-loadouts
Jul 27, 2026
Merged

docs(concepts): add the loadouts concept guide#940
norrietaylor merged 5 commits into
mainfrom
pr/docs-concept-loadouts

Conversation

@norrietaylor

@norrietaylor norrietaylor commented Jul 23, 2026

Copy link
Copy Markdown
Member

New concept guide at docs/concepts/loadouts.md covering what a loadout is versus the project's minimal.toml, where loadouts live, the four things they carry (packages, vars, patches, lifecycle hooks, all applied in-session), applying via min activate --loadout, auto-applying via [loadouts].default_loadouts, and listing via min loadout ls. The ../reference/loadouts.md cross-link resolves once #868 merges; ./sessions.md resolves once the sessions concept guide merges. Verification done: no em-dashes, no harness/profile terms, repo-relative .md links, min commands checked against crates/minimal/src/lib.rs.

Note

Add loadouts concept guide to documentation

Adds loadouts.md, a new conceptual guide explaining loadouts as per-developer, session-level configuration bundles. Covers what loadouts can carry (packages, variables with inherit/default, file patches, lifecycle hooks), how to apply them via CLI flags (--loadout, --no-loadouts) and default_loadouts in client config, and how to list them with min loadout ls.

Changes since #940 opened

  • Added notice clarifying that lifecycle hooks declared in loadouts are accepted but excluded from composition and not executed in the current release, while removing the previous caveat about hooks being composed and recorded but not executed [a3c8ce1]

Macroscope summarized 8adca38.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive documentation for loadouts, including supported contribution types, storage and naming rules, and session-only behavior.
    • Documented loadout activation, default loadouts, disabling options, listing commands, precedence rules, and error handling.
    • Clarified editing behavior after session creation and lifecycle hook support.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds conceptual documentation for per-developer session loadouts, covering their composition model, supported contributions, activation and default-selection behavior, storage conventions, listing commands, and related references.

Changes

Loadout documentation

Layer / File(s) Summary
Loadout model and contributions
docs/concepts/loadouts.md
Defines loadout scope, storage, composition rules, contribution types, lifecycle hooks, and a complete TOML example.
Activation and default selection
docs/concepts/loadouts.md
Documents client-side composition, activation flags, session capture behavior, and default_loadouts precedence.
Loadout listing and references
docs/concepts/loadouts.md
Documents loadout listing, default markers, malformed-file reporting, alternate directories, and related documentation links.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: twitchyliquid64

Poem

I’m a bunny with a bundle tucked tight,
TOML carrots arranged just right.
Sessions bloom with shells anew,
Defaults hop in when told to do.
Loadouts listed, clear and bright—
Documentation feels just right!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and accurately describes the new loadouts concept guide.
Description check ✅ Passed The summary covers the main change and relevant links, and the missing testing/checklist details are non-critical.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@norrietaylor
norrietaylor marked this pull request as ready for review July 23, 2026 21:22
@norrietaylor

Copy link
Copy Markdown
Member Author

@macroscope review

@macroscopeapp

macroscopeapp Bot commented Jul 23, 2026

Copy link
Copy Markdown

Manual reviews triggered for commit dfa4998:

All prior checks · these links stay valid even if you push more commits.

@macroscopeapp

macroscopeapp Bot commented Jul 23, 2026

Copy link
Copy Markdown

Just FYI for future @mentions, I'm Macroscope-App, not Macroscope.

Review in progress. Results will be posted as check runs when complete.

@macroscopeapp

macroscopeapp Bot commented Jul 23, 2026

Copy link
Copy Markdown

Approvability

Verdict: Would Approve

Documentation-only change adding a new concept guide for loadouts. No runtime behavior impact; the author owns the added file.

Macroscope would have approved this PR. Enable approvability here.

norrietaylor and others added 2 commits July 23, 2026 15:40
Loadouts are a session-plane feature, and tasks run through both
`min run` and `mip run`, so naming only `mip` as the task runner
over-attributed task execution to the advanced build CLI. Drop the
`mip` naming and keep the accurate loadouts-apply-to-sessions-not-
task-sandboxes contrast.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Note that hook execution is not yet wired up, state that conflicting values
fail activation, show the default-loadout legend line in the ls sample, and
use bare home-relative patch dests to match the reference schema.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread docs/concepts/loadouts.md
Per review: flag the feature up front instead of the stale trailing
note. After #975 loadout-declared hooks are excluded from composition
entirely, so the old 'composed and recorded' wording was wrong too.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/concepts/loadouts.md`:
- Around line 48-50: Update the fenced code blocks in the loadouts
documentation, including the referenced ranges, with appropriate language
identifiers to resolve MD040. For command examples, remove shell prompt
characters or include representative command output to resolve MD014 while
preserving the documented commands and examples.
- Around line 117-134: Clarify the lifecycle-hook documentation so composition
and the complete hook example are explicitly described as planned behavior only.
Update the “Hooks from every applied loadout concatenate” statement and the
related example near the lifecycle-hooks section to remain consistent with the
existing “Coming soon” notice, without implying hooks currently execute.
- Around line 32-35: Update the loadout composition description in the relevant
concepts section to match the activation flow: state that the CLI reads and
composes the project contribution with applied loadouts before submitting the
resulting configuration to the daemon. Remove claims that the daemon performs
the merge, and preserve the documented no-override, peer-composition behavior
for conflicts.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e32cd0f6-cf1e-46ee-bc31-0a668a34d5c3

📥 Commits

Reviewing files that changed from the base of the PR and between 9375eff and a3c8ce1.

📒 Files selected for processing (1)
  • docs/concepts/loadouts.md

Comment thread docs/concepts/loadouts.md
Comment on lines +32 to +35
Both feed the same session, and the daemon merges them into one final
configuration when the session comes up. The project contribution and every
applied loadout compose together as peers: there is no override precedence,
so a loadout adds to the project rather than silently replacing parts of it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Keep composition ownership consistent with the activation flow.

This paragraph says the daemon merges project and loadout configuration, but the activation section says the CLI reads and composes loadouts before contacting the daemon. Document one authoritative model—preferably client-side composition followed by daemon submission—to avoid misleading users about conflict handling and runtime behavior.

Also applies to: 171-174

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/concepts/loadouts.md` around lines 32 - 35, Update the loadout
composition description in the relevant concepts section to match the activation
flow: state that the CLI reads and composes the project contribution with
applied loadouts before submitting the resulting configuration to the daemon.
Remove claims that the daemon performs the merge, and preserve the documented
no-override, peer-composition behavior for conflicts.

Comment thread docs/concepts/loadouts.md
Comment on lines +48 to +50
```
~/.config/minimal/loadouts/<name>.toml
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Resolve the supplied markdownlint warnings.

Add language identifiers to the unlabeled fenced blocks, and either remove $ prompts or show representative output for command examples. The supplied static-analysis results report MD040 and MD014 violations in these ranges.

Also applies to: 166-169, 185-187, 216-230

🧰 Tools
🪛 markdownlint-cli2 (0.23.0)

[warning] 48-48: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/concepts/loadouts.md` around lines 48 - 50, Update the fenced code
blocks in the loadouts documentation, including the referenced ranges, with
appropriate language identifiers to resolve MD040. For command examples, remove
shell prompt characters or include representative command output to resolve
MD014 while preserving the documented commands and examples.

Source: Linters/SAST tools

Comment thread docs/concepts/loadouts.md
Comment on lines +117 to +134
### Lifecycle hooks

> **Coming soon.** Lifecycle hooks are not yet live: a hook declared in a
> loadout is accepted, but the current release excludes it from composition
> and nothing executes it. The declaration format below is what will ship.

Hooks are scripts declared to run at session transition points: `on_activate`
when the session comes up, `on_destroy` when it is torn down, and `on_failure`
when activation fails. Declare them to warm a cache, fetch grammars, or clean
up after a failed start:

```toml
[[lifecycle_hooks]]
description = "warm the grammar cache"
on_activate = { type = "inline", value = "hx --grammar fetch >/dev/null 2>&1 || true" }
```

Hooks from every applied loadout concatenate in declaration order.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Qualify lifecycle-hook composition as future behavior.

Lines 119–121 correctly state that hooks are currently ignored, but lines 134 and 155–159 present hook concatenation and the complete example as active behavior. Move the concatenation rule into a “planned behavior” note or explicitly state that it applies only after hooks are implemented.

Also applies to: 155-159

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/concepts/loadouts.md` around lines 117 - 134, Clarify the lifecycle-hook
documentation so composition and the complete hook example are explicitly
described as planned behavior only. Update the “Hooks from every applied loadout
concatenate” statement and the related example near the lifecycle-hooks section
to remain consistent with the existing “Coming soon” notice, without implying
hooks currently execute.

@norrietaylor
norrietaylor enabled auto-merge (squash) July 27, 2026 18:48
@norrietaylor
norrietaylor merged commit fe34262 into main Jul 27, 2026
29 checks passed
@norrietaylor
norrietaylor deleted the pr/docs-concept-loadouts branch July 27, 2026 19:00
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