8000 docs(guide): lift the building, dev-shell, agents, tasks, and packages guides by norrietaylor · Pull Request #942 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

docs(guide): lift the building, dev-shell, agents, tasks, and packages guides - #942

Merged
norrietaylor merged 6 commits into
mainfrom
pr/docs-guide-workflows
Jul 27, 2026
Merged

norrietaylor merged 6 commits into
mainfrom
pr/docs-guide-workflows

Conversation

@norrietaylor
@norrietaylor norrietaylor commented Jul 23, 2026 •
Copy link
Copy Markdown
Member

Lifts the five Start workflow pages into docs/guide/ (building, dev-shell, agents, tasks, packages), reframed around the two planes so each guide teaches the right tool:

Session plane (min):

  • dev-shell.md and agents.md are rewritten around interactive sessions: min activate --attach ., with tools from the project's [session] block (packages), host files via [session] patches, env via [session.vars], setup via [[session.lifecycle_hooks]], and ad-hoc mid-session installs via the in-sandbox min add <pkg>. Session lifecycle covered with min attach / min ls / min destroy.

Build plane (mip):

  • building.md (mip build/mip test, [stack]) and tasks.md ([tasks.x], mip run) keep the build/task framing (genuinely one-shot sandboxes), each with a one-sentence session-vs-build distinction and a cross-link to dev-shell.
  • packages.md routes build/runtime deps through mip add --build/--runtime -> [stack], interactive dev tools through [session] packages (+ min add), and task-scoped packages via mip add --task.

De-numbered filenames, harness->stack, links repo-relative .md; cross-links to ../reference/* resolve once #863 and sibling docs-lift PRs merge. Session patches are { source, dest } rows (dest home-relative in the session), not the task/harness patches.dir form. Verification: em-dash/min add --session/stale-mip shell scrub c 8000 lean.

Note

Add guide pages for building, dev-shell, agents, tasks, and packages

Adds five new documentation pages to the guide covering core workflows:

  • agents.md: how to run AI coding agents (e.g. Claude Code) inside a sandboxed Minimal session, including credential passing and tool configuration
  • building.md: how to run builds and tests using mip build and mip test with stacks, including extra dependencies and state persistence
  • dev-shell.md: how to launch and manage interactive dev sessions with min, covering isolation, patches, env vars, and lifecycle hooks
  • packages.md: how packages are scoped across build, runtime, session, and task contexts using min add flags and minimal.toml
  • tasks.md: how to define and run sandboxed tasks via mip run or min run, with examples for exec/bash, env vars, and host file mapping

Changes since #942 opened

  • Removed ~/.claude host state access configuration from agent setup instructions [5d39eca]
  • Added guidance explaining that environment variables and patched files passed to agent and task sandboxes are available to all commands and subprocesses, recommending minimal pass-through and preference for scoped or short-lived credentials, with agent activation gating against user policy and surfacing undecidable items for approval [2e668aa]
  • Changed file patch mapping example to use read-only access and added guidance recommending read-only mappings unless writes are necessary [2e668aa]

Macroscope summarized 8a87911.

Summary by CodeRabbit

  • Documentation
    • Added new guides for building/testing, development shells, tasks, packages, and AI coding agents.
    • Documented sandboxed one-shot and interactive workflows, including stack/session/task configuration via minimal.toml.
    • Explained adding dependencies, persisting build artifacts with state_key, and running tasks with mip run.
    • Covered environment variable inheritance and controlled host file/credential passthrough using patches.

@coderabbitai
coderabbitai Bot commented Jul 23, 2026 •
Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds five documentation guides covering package scopes, interactive sessions, AI agents, one-shot tasks, builds, tests, and persisted build state through minimal.toml, min, and mip.

Changes

Minimal usage guides

Layer / File(s) Summary
Package scopes and stack configuration
docs/guide/packages.md
Documents build, runtime, session, and task-specific packages, plus package registry discovery.
Sessions and agent shells
docs/guide/dev-shell.md, docs/guide/agents.md
Explains interactive session setup, customization, lifecycle, host access, and running agents within sessions.
Tasks, builds, and persisted state
docs/guide/tasks.md, docs/guide/building.md
Describes one-shot tasks, build and test commands, stack configuration, dependencies, and shared build state.

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

Possibly related PRs

Suggested reviewers: twitchyliquid64

Poem

I’m a rabbit in a sandbox bright,
With packages tucked away just right.
Sessions hop, and tasks run clean,
Agents burrow where tools are seen.
Builds cache carrots overnight!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning It describes the change well, but it does not follow the required Summary, Testing, and Checklist template sections. Reformat it to the repo template: add ## Summary, ## Testing with commands/output, and ## Checklist with the docs/breaking-change items.
✅ Passed checks (4 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 clearly summarizes the main change: adding five guide pages under docs/guide.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

norrietaylor and others added 2 commits July 23, 2026 13:55
…the package count

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The dev-shell and agent workflows are interactive development, which is
the session plane (`min activate`), not the build plane (`mip run` on a
`[tasks.x]` definition). Rewrite both guides around sessions: tools come
from the project's `[session]` block (`packages`, `[session.vars]`,
`patches`, `[[session.lifecycle_hooks]]`), you enter with
`min activate --attach .`, and you add tools ad-hoc with the in-sandbox
`min add`.

Keep tasks and building on `mip` (they are genuinely build-plane,
one-shot sandboxes) but add a sentence distinguishing them from
interactive sessions and cross-link the dev-shell guide. Correct
packages to route build/runtime deps through `mip add --build/--runtime`
and session tools through `[session]`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@norrietaylor
norrietaylor marked this pull request as ready for review July 23, 2026 21:57
Sessions receive an uploaded project copy (git push min:// brings changes
back), in-session min add also records the package in [session] packages,
min destroy takes a session argument, mip test needs a [tasks.test] entry,
the registry package is protobuf, build/runtime/task dependency adds route
through min add, mip-driven one-shot sandboxes are marked Linux-only with
session alternatives, session contents include loadout and stack packages,
and agents.md notes the interactive-attach constraint.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread docs/guide/agents.md Outdated
[session]
packages = ["claude-code", "base"]
patches = [
{ source = "~/.claude", dest = "~/.claude" },
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this is an antipattern, as this copies like gb's of old working space. Maybe this can just be ~/.claude.json like in the pkg?

@norrietaylor norrietaylor Jul 25, 2026 •
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I say we remove this entirely. This got added in the lift, which I missed, and I'm happy you caught it

Comment thread docs/guide/agents.md

```shell
$ min activate --attach .
$ claude
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We have some issues with TERM not being set atm, do we want to say TERM=xterm claude --dangerously-skip-permissions or something equally verbose for now?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Evan has said he will pull envs over. Unless that becomes risky lets keep it this way

Comment thread docs/guide/building.md
@@ -0,0 +1,72 @@
---
description: Run builds and tests in sandboxed environments using stacks. Covers extra dependencies, test commands, and build state persistence.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Happy to get this one in as-is, but hopefully with SOPs coming in hot we can switch this to entirely be using sessions / min

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yup the goal is to remove mip from these docs

Comment thread docs/guide/agents.md Outdated
[session]
packages = ["claude-code", "base", "git"]
patches = [
{ source = "~/.claude", dest = "~/.claude" },
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Remove

Comment thread docs/guide/agents.md Outdated
[session]
packages = ["claude-code", "base"]
patches = [
{ source = "~/.claude", dest = "~/.claude" },
@norrietaylor norrietaylor Jul 25, 2026 •
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I say we remove this entirely. This got added in the lift, which I missed, and I'm happy you caught it

Comment thread docs/guide/building.md
@@ -0,0 +1,72 @@
---
description: Run builds and tests in sandboxed environments using stacks. Covers extra dependencies, test commands, and build state persistence.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yup the goal is to remove mip from these docs

Patching the whole ~/.claude directory copies gigabytes of stale
workspace state into the session. Removed from both examples per
review.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai coderabbitai Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (3)
docs/guide/packages.md (1)

54-56: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove shell prompts from command-only snippets.

markdownlint reports MD014 because this block shows $ min add --task lint ruff without output. Remove the $ prompt, or include representative output.

🤖 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/guide/packages.md` around lines 54 - 56, Update the command-only shell
snippet in the package guide to remove the leading `$` prompt, preserving the
command itself so it complies with markdownlint MD014.

Source: Linters/SAST tools

docs/guide/agents.md (1)

20-23: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove shell prompts from command-only snippets.

markdownlint reports MD014 because no command output is shown. Remove the $ prefixes or add representative output.

🤖 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/guide/agents.md` around lines 20 - 23, Update the command-only snippet
in the agents guide by removing the `$` shell prompt prefixes from both
commands; keep the commands themselves unchanged and do not add output.

Source: Linters/SAST tools

docs/guide/dev-shell.md (1)

13-15: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove shell prompts from command-only snippets.

markdownlint reports MD014 for these commands because no output is shown. Remove the $ prefixes, or add representative output to each example.

Also applies to: 45-47, 89-93

🤖 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/guide/dev-shell.md` around lines 13 - 15, Remove the "$" shell prompt
prefixes from the command-only snippets in the developer shell guide, including
the examples around "min activate --attach ." and the referenced additional
snippets, since they show no command output. Keep the commands otherwise
unchanged.

Source: Linters/SAST tools

🤖 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/guide/agents.md`:
- Around line 38-56: Update the “Passing through host credentials” guidance and
examples to warn that exposing ~/.ssh, ~/.gitconfig, or inherited
ANTHROPIC_API_KEY grants direct access to host credentials. Recommend dedicated,
scoped session credentials instead, and document the associated trust, rotation,
and revocation implications before showing or endorsing these settings.

In `@docs/guide/building.md`:
- Line 14: Update the command examples in building.md, including the mip build
examples and the additional referenced blocks, to satisfy Markdownlint MD014:
remove the leading $ prompts from commands that show no output, or add
representative output where prompts should remain. Keep the examples clear and
consistent.

In `@docs/guide/tasks.md`:
- Line 52: Change the patches.dir."~/.config/railway" permission from read-write
to read-only by default, and document the security implications and any cases
where write access is explicitly required.
- Line 41: Update the documentation surrounding env_vars.GITHUB_TOKEN to warn
that inheriting the host token exposes credentials to all task commands,
including repository-controlled scripts. Clearly describe this trust boundary
and recommend using a scoped, short-lived token instead of ambient token
inheritance.

---

Nitpick comments:
In `@docs/guide/agents.md`:
- Around line 20-23: Update the command-only snippet in the agents guide by
removing the `$` shell prompt prefixes from both commands; keep the commands
themselves unchanged and do not add output.

In `@docs/guide/dev-shell.md`:
- Around line 13-15: Remove the "$" shell prompt prefixes from the command-only
snippets in the developer shell guide, including the examples around "min
activate --attach ." and the referenced additional snippets, since they show no
command output. Keep the commands otherwise unchanged.

In `@docs/guide/packages.md`:
- Around line 54-56: Update the command-only shell snippet in the package guide
to remove the leading `$` prompt, preserving the command itself so it complies
with markdownlint MD014.
🪄 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: 3401cc5b-f6ad-4fa8-8dc9-5a32be206635

📥 Commits

Reviewing files that changed from the base of the PR and between 7fd582e and 5d39eca.

📒 Files selected for processing (5)
  • docs/guide/agents.md
  • docs/guide/building.md
  • docs/guide/dev-shell.md
  • docs/guide/packages.md
  • docs/guide/tasks.md

Comment thread docs/guide/agents.md Resolved
Comment thread docs/guide/building.md
## Running a build

```shell
$ mip build
Copy link
Copy Markdown
Contributor

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

Fix the Markdownlint MD014 warnings.

These command examples use $ prompts without showing output. Remove the prompts or add representative output so the documentation passes commands-show-output.

Also applies to: 49-50, 58-58

🧰 Tools
🪛 markdownlint-cli2 (0.23.0)

[warning] 14-14: Dollar signs used before commands without showing output

(MD014, commands-show-output)

🤖 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/guide/building.md` at line 14, Update the command examples in
building.md, including the mip build examples and the additional referenced
blocks, to satisfy Markdownlint MD014: remove the leading $ prompts from
commands that show no output, or add representative output where prompts should
remain. Keep the examples clear and consistent.

Source: Linters/SAST tools

Comment thread docs/guide/tasks.md Resolved
Comment thread docs/guide/tasks.md Resolved
…xamples

Per review: note that inherited env values and patched files are
readable by everything in the sandbox, recommend scoped short-lived
credentials, flip the railway patch example to read-only, and point at
the activation policy gate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@norrietaylor
norrietaylor enabled auto-merge (squash) July 27, 2026 19:41
@norrietaylor
norrietaylor merged commit 2642a00 into main Jul 27, 2026
29 checks passed
@norrietaylor
norrietaylor deleted the pr/docs-guide-workflows branch July 27, 2026 19:54
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

0