feat(agents): add remote and member context rules #150

Merged
claudiomaradonna merged 5 commits from feat/member-context-remotes into main 2026-10-20 11:00:24 +02:00
Collaborator

Why

In an umbrella, an agent saw only each member's name, path, and role,
and learned of a missing tool only when a build failed. deliver and
forge also assumed origin, so in a clone holding a fork beside its
upstream, a push could be rejected or a pull request opened on the
wrong repository.

What changed

  • A member may carry an optional nested line summing up what it is and
    the tools it needs (<MEMBER_SUMMARY> in the template); the member
    line form and its checks stay as they were.
  • Before working in a member, agents also read its README, and before
    building or testing there they check its tools are present, getting a
    missing one only as an install is allowed.
  • Before a branch's first push or a pull request, agents list the
    remotes and, with more than one, ask which takes each. land.md
    sets the upstream on the first push and names the remote on later
    folds, whatever remote.pushDefault says.
  • forge opens a pull request on the chosen remote. When a pull
    request it opens goes from a fork into its upstream, it hands over
    the text to paste; cross-repository heads are a non-goal.

How to verify

  • bash tests/agent-config/real-source.sh: the fold push test, now
    run with a second remote as push default, passes; it fails on main.
  • bash tests/agent-config/template-state.sh: passes; on main's
    validator it fails on <MEMBER_SUMMARY>.

Run on the tip, all passing: bash tests/verify-agent-config.sh
(257), bash tests/check-work-folder.sh (46),
.agents/hooks/shellcheck.sh repo, prettier --check '**/*.md',
scripts/verify-agent-config.sh, git diff --check main. Not run: the
behavioral evals.

## Why In an umbrella, an agent saw only each member's name, path, and role, and learned of a missing tool only when a build failed. `deliver` and `forge` also assumed `origin`, so in a clone holding a fork beside its upstream, a push could be rejected or a pull request opened on the wrong repository. ## What changed - A member may carry an optional nested line summing up what it is and the tools it needs (`<MEMBER_SUMMARY>` in the template); the member line form and its checks stay as they were. - Before working in a member, agents also read its README, and before building or testing there they check its tools are present, getting a missing one only as an install is allowed. - Before a branch's first push or a pull request, agents list the remotes and, with more than one, ask which takes each. `land.md` sets the upstream on the first push and names the remote on later folds, whatever `remote.pushDefault` says. - `forge` opens a pull request on the chosen remote. When a pull request it opens goes from a fork into its upstream, it hands over the text to paste; cross-repository heads are a non-goal. ## How to verify - `bash tests/agent-config/real-source.sh`: the fold push test, now run with a second remote as push default, passes; it fails on main. - `bash tests/agent-config/template-state.sh`: passes; on main's validator it fails on `<MEMBER_SUMMARY>`. Run on the tip, all passing: `bash tests/verify-agent-config.sh` (257), `bash tests/check-work-folder.sh` (46), `.agents/hooks/shellcheck.sh repo`, `prettier --check '**/*.md'`, `scripts/verify-agent-config.sh`, `git diff --check main`. Not run: the behavioral evals.
The member list may carry an indented line under a member, which the
validator already leaves out of its member checks. Pin it before the
template gains a summary placeholder.
The fold push test appended origin and topic to land.md's command. It
now puts them in place of the command's <remote> and <branch>, so it
keeps guarding the lease once land.md names the push's target, and
still passes on a command that leaves them to the branch's upstream.
An agent in an umbrella saw only each member's name, path, and role,
so it opened members to tell which one a request concerns. The
template's member placeholder gains a nested <MEMBER_SUMMARY> line on
what the member is and the tools it needs, the validator knows the
token, and the umbrella guide says how to fill or drop it.
Before working in a member, agents read its instruction files and
contribution guide but not what the member is, and found a missing
tool only when a build failed. They now read its README too, and check
before building or testing there that the tools its set-up, tests, and
checks need are present, getting a missing one only as an install is
allowed.
deliver pushed and forge opened pull requests on origin without looking
at other remotes, so in a clone holding a fork beside its upstream a
push could be rejected or a pull request land on the wrong repository.
Before a branch's first push or a pull request, agents now list the
remotes and, with more than one, ask the user which takes each.
land.md sets the branch's upstream on the first push and names its
remote on later folds, whatever remote.pushDefault says, and forge
reads the chosen remote, handing over the text for a pull request from
a fork into its upstream.
motoko force-pushed feat/member-context-remotes from 06e0031aa5 to f8329be671 2026-10-20 10:59:49 +02:00 Compare
claudiomaradonna deleted branch feat/member-context-remotes 2026-10-20 11:00:28 +02: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/agent-foundry!150
No description provided.