docs(agents): upgrade Agent Foundry to 0593562 #85

Merged
claudiomaradonna merged 1 commit from chore/foundry-upgrade-0593562 into master 2026-11-16 10:47:22 +01:00
Member

Why

The coding agents that contributors run on this site, Claude Code, Codex, and OpenCode, follow a policy taken from Agent Foundry, a shared set of agent instructions: AGENTS.md, the skills in .agents/skills/, and the subagent briefs and adapters. Since the repository adopted it at b04e778 on 11 November, the source has gained 20 commits.

One of them fixes a hazard every change here meets. Agents fold each branch in a linked worktree under .worktrees/, and the fold's git rebase --exec hands its checks a GIT_DIR that points at this repository. A check whose tool runs git in a repository of its own then acts on this one instead; the source met one that rewrote a repository's origin that way. The other commits cut what an implementer subagent re-reads and re-runs after a failed attempt, and close smaller delivery and routing gaps.

This takes the source head, 0593562. Stopping at 017383c was set aside because it leaves out the fold fix, and taking only the fixes up to 725055a because it leaves out the implementer and template changes.

What changed

Folding a branch: before, the fold's checks ran with git's repository variables set to the folded repository. Now fold-branch unsets GIT_DIR, GIT_WORK_TREE, GIT_INDEX_FILE, and GIT_COMMON_DIR first, so a check's own git commands act on their own repository.

Implementers: before, each failed attempt went to a newly briefed implementer at the task's planned effort. Now an attempt that fails at low or medium effort moves one effort up, and in Claude Code and Codex the main session continues the implementer that last reported, rather than briefing a new one, when the next step runs at its effort outside a parallel run. Its report has a fixed order.

Handoffs and checks: before, the main session pasted each handoff as the subagent's prompt, and every attempt reran every check. Now it saves the handoff in the work folder and sends its path, and a passing result can stand for a later attempt when the work file records its inputs unchanged. verify-execution runs the every-commit checks before the reviewers, and still runs Verify on the final tree.

Delivery and templates: deliver prepares a pull request's text before pushing, and land.md tells the user how to set a branch's upstream when the sandbox blocks it. The pull request template has shorter guidance, and .forgejo/pull_request_template.md, its copy, follows it. The Codex adapters of implementers and reviewers turn off apps, plugins, and memories. AGENTS.md gains one routing sentence: a workflow whose change also trims a policy file first runs implement-feature step 1.

Every merged file is the source's text at 0593562, with AGENTS.md keeping this repository's project sections, and the Record in .agents/skills/foundry-upgrade/SKILL.md names the new commit. The site, .claude/settings.json, and the hooks are unchanged.

How to verify

You need Bash, Git (2.53.0 was used), and read access over SSH to git.unitoo.it/unitoo/website.

The upgrade carries the source's change and keeps this repository's own. Clone both repositories and compare the policy files the source changed:

cd "$(mktemp -d)" || exit 1
git clone -q https://git.unitoo.it/claudiomaradonna/agent-foundry agent-foundry
git clone -q ssh://git@git.unitoo.it/unitoo/website.git website
cd website || exit 1
# On master: the policy files the source changed, against the source at b04e778
git -C ../agent-foundry diff --name-only --no-renames b04e778 0593562 -- .agents .codex AGENTS.md |
  while read -r p; do
    git -C ../agent-foundry show "b04e778:$p" | cmp -s - "$p" || echo "differs: $p"
  done
echo ---
# On the branch: the same files against the source at 0593562
git switch -q chore/foundry-upgrade-0593562
git -C ../agent-foundry diff --name-only --no-renames b04e778 0593562 -- .agents .codex AGENTS.md |
  while read -r p; do
    git -C ../agent-foundry show "0593562:$p" | cmp -s - "$p" || echo "differs: $p"
  done
# The branch's AGENTS.md change against the source's, line for line
diff <(git diff master chore/foundry-upgrade-0593562 -- AGENTS.md | grep '^[-+][^-+]') \
  <(git -C ../agent-foundry diff b04e778 0593562 -- AGENTS.md | grep '^[-+][^-+]') &&
  echo "same lines"

Result: differs: AGENTS.md, ---, differs: AGENTS.md, same lines. On master the files are the source's at b04e778, on the branch the source's at 0593562, and in both only AGENTS.md differs, by its project sections, while its change is the source's.

The fold's checks act on their own repository. In a scratch repository with a linked worktree, as .worktrees/ holds, run master's fold command and then the branch's:

cd "$(mktemp -d)" || exit 1
git init -q -b main other && git -C other commit -q --allow-empty -m "other repo"
git init -q -b main folded && cd folded && git commit -q --allow-empty -m base
git worktree add -q ../wt -b topic && cd ../wt && git commit -q --allow-empty -m "topic commit"
# master's fold command: the check's git reads the folded repository
git rebase -q --keep-base --exec 'git -C ../other log -1 --format=%s' main
# the branch's fold command: the check's git reads its own repository
git rebase -q --keep-base --exec 'unset GIT_DIR GIT_WORK_TREE GIT_INDEX_FILE GIT_COMMON_DIR; git -C ../other log -1 --format=%s' main

Result: topic commit from master's command, where the check reads the folded repository, then other repo from the branch's.

Checks run on the tip's tree: the source's scripts/verify-agent-config.sh . gives "agent configuration statically valid"; Verify, make build && .agents/hooks/shellcheck.sh repo, gives "Build complete" and "shell check: 4 files clean"; git diff --check master and Prettier on the changed Markdown are clean. The site has no test suite, so no regression test applies.

Not tried: an agent trial of the implementer changes (effort climb, continuation, handoff by path) and of the Codex adapter flags, since it needs billed Claude Code and Codex sessions on a trial repository.

Considerations

Reusing a check's result trusts the work file's record of its inputs; the final Verify on the final tree still runs every time. Continuing an implementer saves a re-read but carries its earlier context into the next attempt, which the source allows only after a check that found no departure. A low documentation finding, that the new evidence-reuse paragraph in .agents/templates/work.md is dense, was set aside: the text is the source's, and its fix belongs there.

## Why The coding agents that contributors run on this site, Claude Code, Codex, and OpenCode, follow a policy taken from Agent Foundry, a shared set of agent instructions: `AGENTS.md`, the skills in `.agents/skills/`, and the subagent briefs and adapters. Since the repository adopted it at `b04e778` on 11 November, the source has gained 20 commits. One of them fixes a hazard every change here meets. Agents fold each branch in a linked worktree under `.worktrees/`, and the fold's `git rebase --exec` hands its checks a `GIT_DIR` that points at this repository. A check whose tool runs git in a repository of its own then acts on this one instead; the source met one that rewrote a repository's origin that way. The other commits cut what an implementer subagent re-reads and re-runs after a failed attempt, and close smaller delivery and routing gaps. This takes the source head, `0593562`. Stopping at `017383c` was set aside because it leaves out the fold fix, and taking only the fixes up to `725055a` because it leaves out the implementer and template changes. ## What changed Folding a branch: before, the fold's checks ran with git's repository variables set to the folded repository. Now `fold-branch` unsets `GIT_DIR`, `GIT_WORK_TREE`, `GIT_INDEX_FILE`, and `GIT_COMMON_DIR` first, so a check's own git commands act on their own repository. Implementers: before, each failed attempt went to a newly briefed implementer at the task's planned effort. Now an attempt that fails at low or medium effort moves one effort up, and in Claude Code and Codex the main session continues the implementer that last reported, rather than briefing a new one, when the next step runs at its effort outside a parallel run. Its report has a fixed order. Handoffs and checks: before, the main session pasted each handoff as the subagent's prompt, and every attempt reran every check. Now it saves the handoff in the work folder and sends its path, and a passing result can stand for a later attempt when the work file records its inputs unchanged. `verify-execution` runs the every-commit checks before the reviewers, and still runs Verify on the final tree. Delivery and templates: `deliver` prepares a pull request's text before pushing, and `land.md` tells the user how to set a branch's upstream when the sandbox blocks it. The pull request template has shorter guidance, and `.forgejo/pull_request_template.md`, its copy, follows it. The Codex adapters of implementers and reviewers turn off apps, plugins, and memories. `AGENTS.md` gains one routing sentence: a workflow whose change also trims a policy file first runs `implement-feature` step 1. Every merged file is the source's text at `0593562`, with `AGENTS.md` keeping this repository's project sections, and the Record in `.agents/skills/foundry-upgrade/SKILL.md` names the new commit. The site, `.claude/settings.json`, and the hooks are unchanged. ## How to verify You need Bash, Git (2.53.0 was used), and read access over SSH to `git.unitoo.it/unitoo/website`. **The upgrade carries the source's change and keeps this repository's own.** Clone both repositories and compare the policy files the source changed: ```sh cd "$(mktemp -d)" || exit 1 git clone -q https://git.unitoo.it/claudiomaradonna/agent-foundry agent-foundry git clone -q ssh://git@git.unitoo.it/unitoo/website.git website cd website || exit 1 # On master: the policy files the source changed, against the source at b04e778 git -C ../agent-foundry diff --name-only --no-renames b04e778 0593562 -- .agents .codex AGENTS.md | while read -r p; do git -C ../agent-foundry show "b04e778:$p" | cmp -s - "$p" || echo "differs: $p" done echo --- # On the branch: the same files against the source at 0593562 git switch -q chore/foundry-upgrade-0593562 git -C ../agent-foundry diff --name-only --no-renames b04e778 0593562 -- .agents .codex AGENTS.md | while read -r p; do git -C ../agent-foundry show "0593562:$p" | cmp -s - "$p" || echo "differs: $p" done # The branch's AGENTS.md change against the source's, line for line diff <(git diff master chore/foundry-upgrade-0593562 -- AGENTS.md | grep '^[-+][^-+]') \ <(git -C ../agent-foundry diff b04e778 0593562 -- AGENTS.md | grep '^[-+][^-+]') && echo "same lines" ``` Result: `differs: AGENTS.md`, `---`, `differs: AGENTS.md`, `same lines`. On master the files are the source's at `b04e778`, on the branch the source's at `0593562`, and in both only `AGENTS.md` differs, by its project sections, while its change is the source's. **The fold's checks act on their own repository.** In a scratch repository with a linked worktree, as `.worktrees/` holds, run master's fold command and then the branch's: ```sh cd "$(mktemp -d)" || exit 1 git init -q -b main other && git -C other commit -q --allow-empty -m "other repo" git init -q -b main folded && cd folded && git commit -q --allow-empty -m base git worktree add -q ../wt -b topic && cd ../wt && git commit -q --allow-empty -m "topic commit" # master's fold command: the check's git reads the folded repository git rebase -q --keep-base --exec 'git -C ../other log -1 --format=%s' main # the branch's fold command: the check's git reads its own repository git rebase -q --keep-base --exec 'unset GIT_DIR GIT_WORK_TREE GIT_INDEX_FILE GIT_COMMON_DIR; git -C ../other log -1 --format=%s' main ``` Result: `topic commit` from master's command, where the check reads the folded repository, then `other repo` from the branch's. Checks run on the tip's tree: the source's `scripts/verify-agent-config.sh .` gives "agent configuration statically valid"; Verify, `make build && .agents/hooks/shellcheck.sh repo`, gives "Build complete" and "shell check: 4 files clean"; `git diff --check master` and Prettier on the changed Markdown are clean. The site has no test suite, so no regression test applies. Not tried: an agent trial of the implementer changes (effort climb, continuation, handoff by path) and of the Codex adapter flags, since it needs billed Claude Code and Codex sessions on a trial repository. ## Considerations Reusing a check's result trusts the work file's record of its inputs; the final Verify on the final tree still runs every time. Continuing an implementer saves a re-read but carries its earlier context into the next attempt, which the source allows only after a check that found no departure. A low documentation finding, that the new evidence-reuse paragraph in `.agents/templates/work.md` is dense, was set aside: the text is the source's, and its fix belongs there.
docs(agents): upgrade Agent Foundry to 0593562
All checks were successful
Build image / build (push) Successful in 5m5s
ae96abfc28
Merge Agent Foundry three ways from b04e778 to 0593562. Implementers
now climb a failed task's effort and are continued rather than
re-briefed, handoffs go by their saved path, check evidence can be
reused under recorded conditions, and fold-branch clears GIT_DIR so a
check in a linked worktree acts on its own repository.

The merged files other than AGENTS.md carried no local changes, and
the source's AGENTS.md hunk missed its project sections. The Forgejo
pull request form matched the template and takes the merged one. No
migration applies to this repository's layout.
claudiomaradonna deleted branch chore/foundry-upgrade-0593562 2026-11-16 10:47:30 +01:00
Sign in to join this conversation.
No reviewers
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
unitoo/website!85
No description provided.