chore(agents): upgrade Agent Foundry to b04e778 #68

Merged
claudiomaradonna merged 4 commits from chore/foundry-upgrade-b04e778 into master 2026-11-11 12:38:30 +01:00
Collaborator

Why

This repository's agent policy, meaning the rules, skills, and Claude
Code settings that coding agents follow here, is adopted from Agent
Foundry and kept up to date by merging its newer commits. The source has
made five commits since the adopted 99fc865. Two of them tighten Claude
Code's settings. As things stand, an agent can edit its own instruction
and configuration files without asking. The one command Claude Code lets
leave its sandbox, the fast-forward merge that lands a branch, also runs
with any options appended after --ff-only, again without a prompt.
The others rework the pull request template for readers who have not
followed the work. Taking all five at the source's tip, b04e778, is the
smallest complete step. The later commits fix and document the earlier
ones, so stopping partway would leave a state the source already
corrected.

What changed

Claude Code used to edit AGENTS.md, the CLAUDE files, and anything
under .agents/, .claude/, .codex/, or .opencode/ without
asking. It now asks first. The landing merge used to run outside the
sandbox in any form that began with git merge --ff-only, and with no
prompt. Only git merge --ff-only --end-of-options <branch> leaves the
sandbox now, so git reads every later argument as a revision, never as
an option, and every git merge --ff-only asks first.

The pull request template, the form agents fill in and that Forgejo
offers when a pull request opens, now has "Why" and "How to verify"
speak to an outside reader. It asks for scenarios a person can repeat on
their own machine, and for Closes/Refs lines. The policy's size
rule now counts a pull request body without its How to verify section.

In the diff: .claude/settings.json, .agents/skills/deliver/land.md,
.agents/templates/pull-request.md with its Forgejo copy
.forgejo/pull_request_template.md, AGENTS.md, and the adopted
commit in the foundry-upgrade skill's Record.

How to verify

What to have first: Git 2.48 or later, on Linux or macOS.

The problem, on main: the merge that the sandbox let through also takes
extra options and does something other than a fast-forward. The
solution, on the branch: with --end-of-options in front, git refuses
the option as an unknown revision and only fast-forwards. Run in a
scratch repository:

cd "$(mktemp -d)" && git init -q -b main demo && cd demo
git -c user.name=Demo -c user.email=demo@example.invalid commit -q --allow-empty --no-gpg-sign -m base
git switch -q -c topic
git -c user.name=Demo -c user.email=demo@example.invalid commit -q --allow-empty --no-gpg-sign -m change
git switch -q main
git -c user.name=Demo -c user.email=demo@example.invalid -c commit.gpgsign=false merge --ff-only --no-ff -m merged topic
git reset -q --hard HEAD~1
git merge --ff-only --end-of-options --no-ff topic
git merge --ff-only --end-of-options topic

Main's form prints Merge made by the 'ort' strategy., which is a merge
commit and not a fast-forward. The branch's form first prints
merge: --no-ff - not something we can merge, and then, given only the
branch, Fast-forward.

Checks run on the tip, d90dbd6: Agent Foundry's validator reports
agent configuration statically valid. make lint && .agents/hooks/shellcheck.sh repo && make test
passes; make test passes when run outside Claude Code's sandbox,
since its socket tests need Unix sockets the sandbox blocks.

Could not be tried: the new prompts in a live Claude Code session.
The Edit prompts are in permissions.ask in .claude/settings.json;
opening the branch in Claude Code and asking it to edit AGENTS.md
should show a permission prompt.

## Why This repository's agent policy, meaning the rules, skills, and Claude Code settings that coding agents follow here, is adopted from Agent Foundry and kept up to date by merging its newer commits. The source has made five commits since the adopted 99fc865. Two of them tighten Claude Code's settings. As things stand, an agent can edit its own instruction and configuration files without asking. The one command Claude Code lets leave its sandbox, the fast-forward merge that lands a branch, also runs with any options appended after `--ff-only`, again without a prompt. The others rework the pull request template for readers who have not followed the work. Taking all five at the source's tip, b04e778, is the smallest complete step. The later commits fix and document the earlier ones, so stopping partway would leave a state the source already corrected. ## What changed Claude Code used to edit `AGENTS.md`, the CLAUDE files, and anything under `.agents/`, `.claude/`, `.codex/`, or `.opencode/` without asking. It now asks first. The landing merge used to run outside the sandbox in any form that began with `git merge --ff-only`, and with no prompt. Only `git merge --ff-only --end-of-options <branch>` leaves the sandbox now, so git reads every later argument as a revision, never as an option, and every `git merge --ff-only` asks first. The pull request template, the form agents fill in and that Forgejo offers when a pull request opens, now has "Why" and "How to verify" speak to an outside reader. It asks for scenarios a person can repeat on their own machine, and for `Closes`/`Refs` lines. The policy's size rule now counts a pull request body without its How to verify section. In the diff: `.claude/settings.json`, `.agents/skills/deliver/land.md`, `.agents/templates/pull-request.md` with its Forgejo copy `.forgejo/pull_request_template.md`, `AGENTS.md`, and the adopted commit in the `foundry-upgrade` skill's Record. ## How to verify What to have first: Git 2.48 or later, on Linux or macOS. The problem, on main: the merge that the sandbox let through also takes extra options and does something other than a fast-forward. The solution, on the branch: with `--end-of-options` in front, git refuses the option as an unknown revision and only fast-forwards. Run in a scratch repository: ```sh cd "$(mktemp -d)" && git init -q -b main demo && cd demo git -c user.name=Demo -c user.email=demo@example.invalid commit -q --allow-empty --no-gpg-sign -m base git switch -q -c topic git -c user.name=Demo -c user.email=demo@example.invalid commit -q --allow-empty --no-gpg-sign -m change git switch -q main git -c user.name=Demo -c user.email=demo@example.invalid -c commit.gpgsign=false merge --ff-only --no-ff -m merged topic git reset -q --hard HEAD~1 git merge --ff-only --end-of-options --no-ff topic git merge --ff-only --end-of-options topic ``` Main's form prints `Merge made by the 'ort' strategy.`, which is a merge commit and not a fast-forward. The branch's form first prints `merge: --no-ff - not something we can merge`, and then, given only the branch, `Fast-forward`. Checks run on the tip, d90dbd6: Agent Foundry's validator reports `agent configuration statically valid`. `make lint && .agents/hooks/shellcheck.sh repo && make test` passes; `make test` passes when run outside Claude Code's sandbox, since its socket tests need Unix sockets the sandbox blocks. Could not be tried: the new prompts in a live Claude Code session. The Edit prompts are in `permissions.ask` in `.claude/settings.json`; opening the branch in Claude Code and asking it to edit `AGENTS.md` should show a permission prompt.
The ask rule on git fetch prompted at the start of each change, since
open-worktree fetches the main branch's remote. The rule is gone, and
of the fetches only the exact command git fetch origin stays excluded
from the sandbox, so a fetch with options runs sandboxed. git pull and
git push keep their exclusion and ask rules.
Takes the source's guard fix for submodules and the deliver and
open-worktree notes on the sandbox, and hides secret files at every
depth, the worktrees included.

The source's narrowed sandbox stays out: the repository drives
rootless Podman, whose socket every sandboxed command would reach, and
keeps the home's credential stores, the policy-file write denials, and
the push and pull prompts. Only its exclusion of git merge --ff-only
comes in, which land.md's landing step needs.

Claude-Session: https://claude.ai/code/session_012CBsgka1ENtNtCBwTWVYvb
Brings .claude/settings.json to the source's 99fc865, taking the
Narrowed sandbox migration (adb02f0, 28cc912) the upgrade left out, so
the repository's agent settings match Agent Foundry again.

This reverses the upgrade's reason for leaving it out: the user chose
to accept that sandboxed commands now reach the Podman socket, the
home's credential stores, and the policy files, with no prompt before
push and pull. Asking before policy-file edits is proposed upstream in
claudiomaradonna/agent-foundry#215.

Claude-Session: https://claude.ai/code/session_012CBsgka1ENtNtCBwTWVYvb
Takes the source's five commits since 99fc865. Claude Code now asks
before editing agent configuration files and before a landing
fast-forward merge; the merge outside the sandbox must carry
--end-of-options. The pull request template, and its Forgejo copy,
aim Why and How to verify at readers outside the project, and the
size rule counts a pull request body without its How to verify.
claudiomaradonna deleted branch chore/foundry-upgrade-b04e778 2026-11-11 12:38:35 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
claudiomaradonna/azkaban!68
No description provided.