Skip to content

feat(setup): one status line, and a safety walkthrough that matches the skills - #1211

Merged
potiuk merged 7 commits into
apache:mainfrom
potiuk:feat/status-line-and-guard-step
Sep 13, 2026
Merged

potiuk merged 7 commits into
apache:mainfrom
potiuk:feat/status-line-and-guard-step

Conversation

@potiuk

@potiuk potiuk commented Sep 13, 2026

Copy link
Copy Markdown
Member

Seven commits. One replaces a duplicated script; the rest give the quick
start's safety layers their own explanations, and add a skill for the one
that did not have one.

One status line, not two

The framework shipped a minimal sandbox-status-line.sh and a -rich
variant beside it, documenting the minimal one as the default. The rich one
is now the only one, installed under the canonical name — every segment it
adds is already silent when its input is missing, so the minimal script was
the same file with less to say and a second copy of the sandbox-precedence
logic to keep correct.

The line leads with the sandbox tag — green [sandbox], yellow
[sandbox-auto] where autoAllowBashIfSandboxed widens the blast radius,
bold-red [NO SANDBOX] — then says which session this is: project, branch
with dirty and ahead/behind, the branch's PR number and title, and the
model.

Existing wiring pointing at ~/.claude/scripts/sandbox-status-line.sh keeps
resolving; re-running the setup skill picks up the new script at that path.

Three layers, two steps

"Lock the agent down" was one step covering two layers and explaining
neither. The walkthrough now names them for what each constrains:

Layer Step Constrains The thing the others cannot catch
isolate 3 the process a command reading ~/.ssh or ~/.aws
guard 3 each command a legal gh pr comment pinging four people who did not ask
privacy 4 the data private-list mail reaching a model nobody approved

Isolation and the guard share a step because they share a skill:
/magpie-setup:isolated-setup-install installs both in one run and there is
no second command to type. Numbering them separately promised a step that
was not there. Privacy is separate because it is genuinely separate — its
own skill, its own decision.

Each now explains the failure it prevents rather than listing what got
installed:

  • isolate — a home directory full of SSH keys, cloud credentials and
    other projects' .env files, none of which triaging a PR needs; and the
    case that is not a mistake at all, since an agent reading issues and
    mailing lists is reading text written by strangers that can address the
    agent. Distinguishes the sandbox (what a command can reach, enforced by
    the OS) from the clean environment (what is already exported into the
    shell it starts from, which the sandbox has nothing to say about) from the
    visible state (protection nobody can see is protection nobody notices
    switching off).
  • guard — why deterministic matters: a rule in a SKILL.md is a
    sentence the model is asked to keep in mind through forty tool calls and a
    compaction, and "most of the time" is useless for a rule whose violation
    posts under your name. Also names Codex and Cursor as having no action
    guard today rather than implying uniform coverage.
  • privacy — the layer readers are most likely to mis-file, so it opens
    on the distinction: not a command that should not run, but one that
    should, that does exactly what it was asked and exports somebody else's
    confidential text doing it.

Privacy-LLM becomes a skill

It was a document you followed by hand: pick a variant, copy its block into
privacy-llm.md, and hope. Nothing detected the stack, nothing checked the
result, and the two verification commands at the bottom of the page were the
kind nobody runs.

magpie-setup-privacy-llm (75 skills total) resolves the existing config
through the local-then-committed chain and refuses to rewrite a working
file; detects the stack rather than interviewing the user; writes the
matching variant to gitignored .apache-magpie-local/, consistent with
every other first-run config; then proves it with the approved-LLM gate
and a PII redactor round-trip.

Two rules it holds under pressure, both with eval cases:

  • the stack is never widened to make the gate pass. A gate that says no
    names the unapproved model and stops. "Just make it work" is not an
    instruction to change what the project permits.
  • a redactor that passes PII through is a finding even when the gate says
    yes.
    The two mechanisms protect different people — the gate protects the
    project, redaction protects the third parties a reporter names — and both
    have to hold.

Also

  • Two generated animations (step-guard.svg, step-privacy.svg), each
    ending on a refusal rather than a list of things installed: a control
    nobody has watched say no reads as configuration.
  • Two eval suites for the new skill (6 cases); counts, manifests, token
    measurements, capability table and the four harness relay symlinks
    regenerated.
  • Dev version bumped to 0.2.0.dev202609131724.

Testing

prek passes in full, including check-doc-sync, symlink-lint,
check-quickstart-recording and the workspace pytest suite.

Not verified locally: the eval suites could not be executed — claude -p
cannot authenticate from inside the sandbox this work was done in. They are
written and load correctly; they have not been graded.

Known stale: assets/session-sandboxed.png and
assets/session-no-sandbox.png still show the old status line. The captions
around them describe the new one; the captures are being redone separately.

Note

This bumps the dev version to 0.2.0.dev202609131724, which supersedes
#1210 (...1707) off the same base. Whichever merges second will conflict
on the version lines — closing #1210 in favour of this one is the simplest
resolution.

🤖 Generated with Claude Code

https://claude.ai/code/session_017suKVbpWX8XT46uRbDxk8y

…uard

**One status line, not two.** The framework shipped a minimal
`sandbox-status-line.sh` and a `-rich` variant beside it, documenting the
minimal one as the default. The rich one is now the only one, installed
under the canonical name: every segment it adds is already silent when
its input is missing, so the minimal script was the same file with less
to say and a second copy of the sandbox-precedence logic to keep right.

The line now leads with the sandbox tag — green `[sandbox]`, yellow
`[sandbox-auto]` where `autoAllowBashIfSandboxed` widens the blast
radius, bold-red `[NO SANDBOX]` — then says *which* session this is:
project, branch with dirty and ahead/behind, the branch's PR number and
title, and the model. Existing wiring pointing at
`~/.claude/scripts/sandbox-status-line.sh` keeps resolving; re-running
the setup skill picks up the new script at that path.

**The action guard gets its own walkthrough step.** It was installed by
the same run as agent isolation and never explained, which left the two
layers looking like one. They are not: the sandbox confines the
*process*, and the guard inspects each *command*. A sandbox has nothing
to say about a `gh pr comment` that pings four maintainers who did not
ask to be pinged — that command is entirely within its rights.

New Step 4 says what the guard is, why it is code rather than a line in
a SKILL.md the model has to remember, lists the five shipped rules, and
names the harnesses that have no action guard today (Codex, Cursor)
rather than implying uniform coverage. Steps 4 and 5 become 5 and 6.

Both safety steps are now marked strongly recommended, and the
walkthrough intro says why: these skills read pre-disclosure security
content, so neither layer is a nice-to-have.

Adds `step-guard.svg`, generated like the others — it ends on a real
denial rather than a list of things installed, because a guard nobody
has watched say no reads as one more checkbox.

Generated-by: Claude Opus 5
Claude-Session: https://claude.ai/code/session_017suKVbpWX8XT46uRbDxk8y
…gh step

Privacy-LLM configuration was a document you followed by hand: pick a
variant from `docs/setup/privacy-llm.md`, copy its block into
`privacy-llm.md`, and hope. Nothing detected the stack, nothing checked
the result, and the two verification commands at the bottom of the page
were the kind nobody runs.

`magpie-setup-privacy-llm` makes it a skill. It resolves the existing
config through the local-then-committed chain and refuses to rewrite a
working file; detects the stack rather than interviewing the user about
it; proposes the matching variant and writes it to the gitignored
`.apache-magpie-local/`, consistent with every other first-run config;
then **proves it** — the approved-LLM gate and a PII redactor round-trip
— rather than declaring it correct.

Two rules the skill holds under pressure, both with eval cases:

- **the stack is never widened to make the gate pass.** A gate that
  says no names the unapproved model and stops. "Just make it work" is
  not an instruction to change what the project permits;
- **a redactor that passes PII through is a finding even when the gate
  says yes.** The two mechanisms are separate and both have to hold.

Adoption stays a separate, deliberate act: what the project commits
binds every contributor's session, and it is the one part of this skill
not undone by deleting a directory.

New quick-start Step 5 explains why this is a third layer rather than
more of Step 3 or 4, with a table saying what each of the three catches
that the others cannot: the sandbox constrains the process, the guard
constrains each command, and this constrains the data. Steps 5 and 6
become 6 and 7. The animation ends on the gate refusing an unregistered
local model, for the same reason the guard animation ends on a denial.

Adds `step-privacy.svg`, two eval suites (6 cases) and the skill's
family-README row; counts, manifests, token measurements and the four
harness relay symlinks regenerated.

Generated-by: Claude Opus 5
Claude-Session: https://claude.ai/code/session_017suKVbpWX8XT46uRbDxk8y
Move the dev stamp so adopters' `claude plugin update` picks up the work
merged since 0.2.0.dev202609110041 — the marketplace is served from `main`
and the update check compares version strings, so a frozen suffix is a
silent no-op.

Generated with the documented one-liner: bump `project.version` in
`pyproject.toml`, then `tools/dev/check-family-plugins.py --fix` and
`uv lock` to propagate to every manifest.

Generated-by: Claude Opus 5
Claude-Session: https://claude.ai/code/session_017suKVbpWX8XT46uRbDxk8y
The validator requires every skill with `capability:` frontmatter to
carry a row in docs/labels-and-capabilities.md; the new skill had none,
which the workspace test suite caught. Also picks up ruff's reformat of
the render-wizard step registration.

Generated-by: Claude Opus 5
Claude-Session: https://claude.ai/code/session_017suKVbpWX8XT46uRbDxk8y
…does

The three steps named their layers and listed what got installed, which
tells a reader what to run and not why any of it matters. Each now
explains the failure it exists to prevent.

**Step 3 — isolation.** Leads with what is actually at risk: a home
directory full of SSH keys, cloud credentials and other projects' `.env`
files, none of which triaging a PR needs. Names the case that is not a
mistake at all — an agent reading issues and mailing lists is reading
text written by strangers, and that text can address the agent. Then
distinguishes the three pieces, which were previously one bullet list of
equals: the sandbox governs what a command can reach and is enforced by
the OS; the clean environment governs what is already exported into the
shell it starts from, which the sandbox has nothing to say about; and
the visible state exists because protection nobody can see is protection
nobody notices switching off.

**Step 4 — the guard.** Spells out why deterministic matters rather than
asserting it: a rule in a SKILL.md is a sentence the model is asked to
keep in mind through forty tool calls and a compaction, and "most of the
time" is useless for a rule whose violation posts under your name. These
are Python in a pre-execution hook with a veto. Adds the property that
follows from that and is worth stating: the guard cannot tell a
prompt-injected command from an honest mistake, and does not need to.

**Step 5 — privacy-LLM.** The layer readers are most likely to
mis-file, so it now opens on the distinction: this is not about a
command that should not run, but one that should — that does exactly
what it was asked and exports somebody else's confidential text while
doing it. Then says who each mechanism protects, which is the thing that
makes them separate: the gate protects the project (and blocks rather
than filters, because there is no partial send), while redaction
protects the third parties a reporter names, who never chose to be in
that thread.

Generated-by: Claude Opus 5
Claude-Session: https://claude.ai/code/session_017suKVbpWX8XT46uRbDxk8y
"Lock the agent down" was one step's title back when it was one step. It
covered two layers even then, and now covers three — so the name said
less the more it did, and it said it in a register ("lock down") that
suggests a single switch rather than three separable decisions.

The steps are now named for what each one constrains:

- Step 3 — isolate the agent    (the process)
- Step 4 — guard every command  (each command)
- Step 5 — set up privacy       (the data)

Anchors move with the headings, so the three external references — the
marketplace reference, the install prerequisite and the families page —
are repointed, along with the generated animation titles, the plain-
language phrasing offered by install.md, and the reference-page index,
which still described the walkthrough as ending at "lock the agent
down".

Generated-by: Claude Opus 5
Claude-Session: https://claude.ai/code/session_017suKVbpWX8XT46uRbDxk8y
…are one skill

Splitting them into Steps 3 and 4 described two things a reader has to
do. There is only one: `/magpie-setup:isolated-setup-install` installs
the sandbox, the clean environment, the status line *and* the
deterministic guard in the same run, and no second command exists to
run. A walkthrough that numbers them separately is promising a step that
is not there.

So Step 3 is now **isolate & guard**, with the guard as its second half
under its own subheading. Both explanations survive intact — what is
gone is the false implication that they are separate errands. The lead-in
says what the arrangement actually is: three layers across two steps,
two of which arrive together. It also says what "same run" does not
mean, since that is the thing worth not losing — one layer confines what
a command can reach, the other decides whether it runs at all, and the
guard half opens on exactly the case the sandbox cannot see.

Privacy stays its own step, because it is its own skill and its own
decision: Steps 5, 6 and 7 become 4, 5 and 6.

The two animations stay two animations — the setup proposal and a real
denial show different things — retitled to say which half of Step 3 each
belongs to. Anchors move with the heading, so the marketplace reference,
the install prerequisite and the families page are repointed again.

Generated-by: Claude Opus 5
Claude-Session: https://claude.ai/code/session_017suKVbpWX8XT46uRbDxk8y
@potiuk
potiuk merged commit 8afac05 into apache:main Sep 13, 2026
46 checks passed
potiuk added a commit that referenced this pull request Sep 13, 2026
…quick again (#1212)

* docs(quick-start): wire three real screenshots into the walkthrough

The quick start showed one captured session and described the rest. Three
new captures, all from Claude Code v2.1.270 on Opus 5:

**Step 1 — what actually landed.** `/plugin` → Installed, filtered to
`magpie`: eleven plugins from the apache-magpie marketplace, each with
its skill count and how many times its skills have been used. That last
column is the honest way to decide whether a family is earning its
always-on context, which no prose here was making visible.

**Step 3 — the mode picker.** `/sandbox` has three modes and the docs
named only two states. Auto-allow runs commands in the sandbox without
asking each time and falls back to the permission prompt outside it —
which is why the status line flags `[sandbox-auto]` separately rather
than folding it into `[sandbox]`: sandboxed and sandboxed-and-not-asking
are different postures.

**Step 3 — the other footer state.** A fresher `[NO SANDBOX]` capture
alongside the green one, so the contrast is shown rather than asserted.
Replaces the previous no-sandbox shot, which was two Claude Code
versions and one model behind.

Note on the previous claim that `session-sandboxed.png` was stale: it was
not. It already showed the full line including the PR segment — the
status-line change in #1211 made the docs match a screenshot that was
already correct, not the other way round.

Generated-by: Claude Opus 5
Claude-Session: https://claude.ai/code/session_017suKVbpWX8XT46uRbDxk8y

* docs: replace the sandboxed-session capture, and show the footer in the skill

**A fresher sandboxed-session shot, in place.** `session-sandboxed.png`
was two Claude Code versions and one model behind the other captures,
and from a different repo. The replacement is from the same session as
the other three — but it shows **auto-allow**, so the tag is yellow
`[sandbox-auto]` rather than green. Every caption is updated to say so:
the quick start, the secure-setup guide, and RFC-AI-0002, which embeds
it by raw URL. Replacing the file in place rather than adding a new one
keeps that RFC reference resolving.

One thing is lost and worth recording: the old capture was the only
picture showing the **PR segment** (`#16` plus the title), because it
was taken on a branch with a PR open. All four current captures sit on
`main`, which has none. The quick start now says that explicitly rather
than promising a segment no picture shows.

**The footer states are now in the install skill too.** The skill wired
the status line up and never said what the operator should expect to see
afterwards — which matters, because this is the one piece of the install
they look at on every render, and a wrong reading of it persists. Adds
both captures, a table mapping each tag to what it means, and the two
counter-intuitive facts: the tag reads settings files rather than the
running process, so a mid-session CLI bypass is invisible to it; and
yellow is a posture, not a fault.

Generated-by: Claude Opus 5
Claude-Session: https://claude.ai/code/session_017suKVbpWX8XT46uRbDxk8y

* docs(quick-start): make the quick start quick again

Steps 3 and 4 had grown into essays — 193 and 76 lines — explaining
threat models, listing every shipped guard, and arguing why a hook beats
a rule in a SKILL.md. All true, none of it what someone wants from a
page called "quick start". The whole file drops 553 → 386 lines, and
Step 3 drops 193 → 62.

What each step keeps: why it is strongly recommended, the command in
both forms, the animation, the footer states as a three-row table, the
verify command, and a line of links out. What a reader needs to *act*.

Most of the removed text was not moved, because it already existed in
the docs it was duplicating — the threat model and the four-layer
defence are `secure-agent-internals.md`, and the table of shipped guards
is `tools/agent-guard/README.md`. Duplicating them in the walkthrough
gave a reader two copies to find contradicting each other later.

Two passages were genuinely new and did move rather than go:

- **why the guard is a hook and not prose**, now a section in the
  agent-guard README above the guard list, where someone asking "why is
  this not just a SKILL.md rule?" is already standing. It also picks up
  the sandbox/guard distinction, which belongs with the guard rather
  than in a walkthrough step.
- **who each privacy mechanism protects** — the gate protects the
  project, redaction protects the third parties a reporter names — into
  `privacy-llm.md`'s two-mechanism recap, which stated the mechanisms
  without stating whose interest each one serves.

The `/sandbox` mode panel screenshot moves with its explanation into
`secure-agent-setup.md`, beside the status-line install: it is there to
explain why `[sandbox-auto]` gets its own colour, which is a status-line
question, not a first-run one.

Generated-by: Claude Opus 5
Claude-Session: https://claude.ai/code/session_017suKVbpWX8XT46uRbDxk8y

* docs(setup): keep skills text-only; bump dev version to 0.2.0.dev202609131802

The two footer captures added to `isolated-setup-install` made it the
only SKILL.md in the repo embedding images — a new convention nobody had
asked for. The skill keeps the part that is actually its job: the table
telling the operator what each tag means, so it says the right thing.
The pictures live where pictures already lived, in *What a session looks
like*, and the skill links there rather than describing the colours a
second time.

Also moves the dev stamp, so adopters' `claude plugin update` picks up
the docs merged since 0.2.0.dev202609131724. Generated with the
documented one-liner: bump `project.version`, then
`tools/dev/check-family-plugins.py --fix` and `uv lock`.

Generated-by: Claude Opus 5
Claude-Session: https://claude.ai/code/session_017suKVbpWX8XT46uRbDxk8y
@potiuk potiuk added substrate:framework-dev Tool substrate: build / validate / eval the framework itself substrate:sandbox Tool substrate: agent isolation, egress control, settings audit labels Sep 25, 2026
@potiuk potiuk added capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) family:ci .github workflows, prek, validators family:contributor-growth contributor-growth skills family:docs Docs, MISSION.md, READMEs family:issue issue-* skills family:mentoring mentoring skills family:pairing pairing skills family:pr-management pr-management-* skills family:release-management release-* skills family:repo-health repo-health skills family:security security-* skills family:setup setup-* skills family:tools tools/* family:utilities utilities skills labels Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) family:ci .github workflows, prek, validators family:contributor-growth contributor-growth skills family:docs Docs, MISSION.md, READMEs family:issue issue-* skills family:mentoring mentoring skills family:pairing pairing skills family:pr-management pr-management-* skills family:release-management release-* skills family:repo-health repo-health skills family:security security-* skills family:setup setup-* skills family:tools tools/* family:utilities utilities skills substrate:framework-dev Tool substrate: build / validate / eval the framework itself substrate:sandbox Tool substrate: agent isolation, egress control, settings audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant