fix(agents): agents run the project's own fast test command, and Braid's AGENTS.md block stays current (#65) #66

Merged
cmoriarty merged 2 commits from fix/agents-test-command-65 into main 2026-09-26 22:11:54 -04:00
Owner

Fixes #65.

On run run_01M3FS9FFXEHTY5WTHX36V4Z5Y, the test subagent ran uv run pytest tests/ -q: one process, every slow test and the integration suite, still at 52% after 15 minutes. This repository's fast lane (#39) takes about a minute, but it's documented only in CLAUDE.md, which opencode doesn't read when an AGENTS.md exists. Braid's test prompts also offered uv run pytest -q tests/unit as their example.

What changes

  • Braid's AGENTS.md block tells every agent to find and use the project's own test command (AGENTS.md, CLAUDE.md, README, CONTRIBUTING, a test script, a Makefile or package.json target), to give that command to a test subagent, to run in parallel where it can, and to leave slow, integration and end-to-end suites to their own steps.
  • script.agents-md keeps its block current. It used to append once and never touch it again, so repositories that merged an earlier run's AGENTS.md kept those rules forever. It now replaces the text between its markers when it differs, leaves everything outside them byte for byte, and leaves no scratch file.
  • Test-lane prompts (OpenSpec and quick-fix) send the agent to the project's own command for .osf/test/<lane>.command and drop the misleading example. The test subagent guidance says the same.
  • This repository's AGENTS.md gains "Running the tests": the fast unit, UI and browser commands, and why tools/test.sh isn't for agents (its browser fixture is on a fixed port shared across runs). I brought the block up to date by running the step itself.

Verification

  • The unit command in AGENTS.md ran 1,772 backend and 410 UI tests in 36 s.
  • ./tools/test.sh: fast lane passed, including 4 new tests: the block is replaced and the house rules are kept, the rule is present, both test prompts carry the rules, and the subagent guidance.
  • openspec validate --specs --strict: all 27 specs pass. The change is archived in this PR, adding requirements to test-lanes and pipeline-steps.

A run already in flight keeps the AGENTS.md it was scaffolded with; runs started after the deploy get the new one.

🤖 Generated with Claude Code

Fixes #65. On run `run_01M3FS9FFXEHTY5WTHX36V4Z5Y`, the `test` subagent ran `uv run pytest tests/ -q`: one process, every slow test and the integration suite, still at 52% after 15 minutes. This repository's fast lane (#39) takes about a minute, but it's documented only in `CLAUDE.md`, which opencode doesn't read when an `AGENTS.md` exists. Braid's test prompts also offered `uv run pytest -q tests/unit` as their example. ## What changes - **Braid's `AGENTS.md` block** tells every agent to find and use the project's own test command (`AGENTS.md`, `CLAUDE.md`, README, CONTRIBUTING, a test script, a Makefile or `package.json` target), to give that command to a `test` subagent, to run in parallel where it can, and to leave slow, integration and end-to-end suites to their own steps. - **`script.agents-md` keeps its block current.** It used to append once and never touch it again, so repositories that merged an earlier run's `AGENTS.md` kept those rules forever. It now replaces the text between its markers when it differs, leaves everything outside them byte for byte, and leaves no scratch file. - **Test-lane prompts** (OpenSpec and quick-fix) send the agent to the project's own command for `.osf/test/<lane>.command` and drop the misleading example. The `test` subagent guidance says the same. - **This repository's `AGENTS.md`** gains "Running the tests": the fast unit, UI and browser commands, and why `tools/test.sh` isn't for agents (its browser fixture is on a fixed port shared across runs). I brought the block up to date by running the step itself. ## Verification - The unit command in `AGENTS.md` ran 1,772 backend and 410 UI tests in **36 s**. - `./tools/test.sh`: fast lane passed, including 4 new tests: the block is replaced and the house rules are kept, the rule is present, both test prompts carry the rules, and the subagent guidance. - `openspec validate --specs --strict`: all 27 specs pass. The change is archived in this PR, adding requirements to `test-lanes` and `pipeline-steps`. A run already in flight keeps the `AGENTS.md` it was scaffolded with; runs started after the deploy get the new one. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
On run_01M3FS9FFXEHTY5WTHX36V4Z5Y the test subagent ran `uv run pytest tests/ -q`: one
process, every slow test and the integration suite, still at 52% after 15 minutes. This
repository's fast lane takes about a minute, but it is documented only in CLAUDE.md, which
opencode does not read when an AGENTS.md exists. Braid's test prompts offered
`uv run pytest -q tests/unit` as the example, and the same guess lands in
.osf/test/unit.command, which the orchestrator runs again.

Braid's AGENTS.md block now tells every agent to find and use the project's own test command
(AGENTS.md, CLAUDE.md, README, CONTRIBUTING, a test script, a Makefile or package.json
target), to hand it to a `test` subagent, to run in parallel where it can, and to leave slow,
integration and end-to-end suites to their own steps. The test-lane prompts say the same and
drop the example.

script.agents-md used to append its block once and never touch it again, so a repository that
merged an earlier run's AGENTS.md kept that run's rules forever. It now replaces the text
between its markers when it differs, leaves everything outside them byte for byte, and leaves
no scratch file.

This repository's AGENTS.md gains "Running the tests" with its fast commands. The unit line
runs 1,772 backend and 410 UI tests in 36 s. The section also says why tools/test.sh is not
for agents: its browser fixture is on a fixed port shared across runs. The block in AGENTS.md
was brought up to date by running the step itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Archive agents-use-project-test-command
All checks were successful
deploy / deploy (push) Successful in 42s
f871afd528
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
cmoriarty/braid!66
No description provided.