Skip to content

chore: let agents start their own dev environment with mwenv - #104

Merged
alistair3149 merged 1 commit into
mainfrom
chore/agents-dev-environment
Nov 12, 2026
Merged

alistair3149 merged 1 commit into
mainfrom
chore/agents-dev-environment

Conversation

@alistair3149

Copy link
Copy Markdown
Member

Summary

AGENTS.md assumed the checkout sits inside a MediaWiki-Docker install, and told agents to ask the user otherwise. Such an install only serves the checkout inside it, never a worktree elsewhere, so an agent working in a worktree could end up testing the wrong code.

  • The Dev environment section now lists environments in order of preference: one the user has named; a disposable mwenv wiki for the current worktree, which needs no MediaWiki installation; then a MediaWiki installation that contains this checkout. Agents ask only if none can run, and never destroy an environment they didn't create.
  • What the environment needs points at CI's extra-extensions / extra-composer-packages instead of listing them, so it stays in sync with CI.
  • Commands that hardcoded docker compose exec … are now environment-neutral. mwenv usage is left to its own docs.
  • Phan section corrected: .phan/config.php also resolves Semantic MediaWiki. Without SMW, Phan reports 143 undeclared-class errors in includes/DataSource/Smw/ and preflight stops before PHPUnit.
  • New PHPUnit note: the SMW and Bucket data-source tests skip unless those extensions are loaded, as in CI.
  • Scribunto needs the LuaSandbox PHP extension on arm64 hosts, because its bundled standalone Lua binary is x86-64 only.

The same Dev environment block goes to every StarCitizenTools repo that uses mediawiki-ci-workflows. It was piloted in AGGrid first.

Test plan

  • No docker compose or "from within a MediaWiki installation" references remain
  • Piloted: a fresh agent with only this AGENTS.md set up an mwenv environment, ran composer preflight to a pass (480 tests, 141 expected skips) and rendered a grid via mw.ext.aggrid.render. Its friction report produced the Phan, PHPUnit and arm64 notes.

🤖 Generated with Claude Code

AGENTS.md assumed the checkout sits inside a MediaWiki-Docker install
and told agents to ask the user otherwise. Such an install only serves
the checkout inside it, never a worktree elsewhere, so an agent working
in a worktree could test the wrong code.

List the environments in order of preference: one the user has named, a
disposable mwenv wiki for the current worktree (no MediaWiki
installation needed), then a MediaWiki installation that contains this
checkout. Point at CI's extra-extensions and extra-composer-packages for
what the environment needs instead of listing them, and make the
commands that hardcoded `docker compose exec` environment-neutral.

Correct the Phan section: .phan/config.php also resolves Semantic
MediaWiki, and without it Phan fails on includes/DataSource/Smw/ and
stops preflight before PHPUnit. Note which PHPUnit tests skip without
SMW and Bucket, and that Scribunto needs LuaSandbox on arm64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alistair3149
alistair3149 merged commit be50261 into main Nov 12, 2026
5 checks passed
@alistair3149
alistair3149 deleted the chore/agents-dev-environment branch November 12, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant