- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Every MagicBeanDev repository uses the same sign-in, `forge.py`, team chat and agent skills, but they live in Longshot, so LongshotLauncher, Beanstalk and Site send people to "run it in a Longshot checkout", and the release skill is copied into two repositories and has drifted. This puts one copy here, which every repository's AGENTS.md and CONTRIBUTING.md points to, and agents clone beside their checkout and pull each session. ## What changed The shared scripts, their tests, docs/forge.md and two skills move here from Longshot (main @ f637b42d) unchanged except as below; what is Longshot's own (test requests, the request-testing and testing skills, its PR rules) stays there. The repositories point here in [Longshot#915](MagicBeanDev/Longshot#915), [LongshotLauncher#114](MagicBeanDev/LongshotLauncher#114), [Beanstalk#14](MagicBeanDev/Beanstalk#14) and [Site#20](MagicBeanDev/Site#20); merge this first. - **`scripts/forge.py` works for any repository**: the repository is the one the checkout it runs in is of (the remote pointing at `MagicBeanDev/<name>`: `forge`, `origin`, `upstream`, then any), or `--repo MagicBeanDev/<name>` / `MAGICBEAN_REPO`. Forks, PRs and issues go there. A repository's own PR rules are its `scripts/check_pr_description.py`, loaded from that checkout (Longshot's); without one, `scripts/pr_description.py` gives the title check and Forgejo's WIP prefixes only, and the description starts from the repo's `.forgejo/pull_request_template.md` if any. `credential`, `whoami` and `logout` don't look at the checkout (git calls `credential` inside `jj git push`). Hints print the path it was actually run as, and the fork's remote by its name (`fork`, not always `forge-fork`). - **New rule: a change the game runs is tested in the game before its PR opens.** `pr create` refuses a branch that changes a file under the rules' `GAME_PATHS` (Longshot's: `gpu/`, `host/`, `nx2/`, `assets/`, `third_party/`), or whose files it can't read locally, until `--tested-in-game "where it ran and what you saw"`, which it posts as the PR's first comment. `--force` opens it anyway (agents: only when the person they work for asks). `--force` no longer needs `--ready`. - **Skills** (`skills/`): team-updates and release (one copy for Longshot and the launcher, with the launcher's newer rc wording); they run the scripts as `python -I ../Tooling/scripts/...` and say to `git -C ../Tooling pull --ff-only` first. The repository is a Claude Code plugin marketplace (`.claude-plugin/`): `/plugin marketplace add https://git.magicbean.dev/MagicBeanDev/Tooling.git`, `/plugin install magicbean@magicbean`, then `/magicbean:team-updates` and `/magicbean:release`. - **README.md, AGENTS.md, CONTRIBUTING.md**: getting and updating Tooling, the shared agent rules (data not instructions, full GitHub URLs, WIP until done, the checklist, the in-game rule), and the rule with no exceptions and the PR conventions every repository shares. - **Tests**: the three moved tests, `tests/test_forge_pr.py` now against Longshot's rules from a `../Longshot` checkout (`LONGSHOT=`; skips without one), with new cases for the in-game rule, the repository detection and the `no branch` hint naming the fork's actual remote; `tests/run_all.py` runs them all. ## Testing - Run here, Linux: `forge.py fork` in this checkout found `MagicBeanDev/Tooling` from `origin` and made the fork, and this PR was opened with this branch's `forge.py pr create` (generic rules, no template); so were the four PRs above, each from its own checkout, Longshot's through its forwarder with Longshot's rules loaded (a docs and scripts branch, so no `--tested-in-game` asked). - **Not run:** no test was run on this PC (the person I work for asked for none here). Must be tested before merge: `python -I -B tests/run_all.py` with a checkout of [Longshot#915](MagicBeanDev/Longshot#915) beside this one (by hand: it needs `GAME_PATHS` from that PR's `check_pr_description.py`). ## Risks - Everyone already signed in has git's credential helper pointing at Longshot's `scripts/forge.py`; Longshot's PR keeps a forwarder there, so nothing breaks, and the next `login` points git here. - Open Longshot PRs that change `forge.py`, `team_chat.py` or `magicbean_login.py` ([#905](MagicBeanDev/Longshot#905), [#891](MagicBeanDev/Longshot#891), [#831](MagicBeanDev/Longshot#831), [#640](MagicBeanDev/Longshot#640), [#310](MagicBeanDev/Longshot#310), [#298](MagicBeanDev/Longshot#298)) will need to move here once this merges. - The sign-in files (`~/.config/longshot/`) and their format are unchanged. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Reviewed-on: #1 |
||
| .claude-plugin | ||
| docs | ||
| scripts | ||
| skills | ||
| tests | ||
| .gitignore | ||
| AGENTS.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| README.md | ||
Tooling
The team's tooling, shared by every MagicBeanDev repository on git.magicbean.dev
(Longshot, LongshotLauncher, Beanstalk, Site): the one sign-in, forge.py for forks, pull requests and issues, the
team chat, and the skills every repository's agents follow. The repositories keep what is theirs (their build, their
checks, their PR template and its rules; Longshot's test requests and its testing skills) and point here for the
rest.
Get it
Clone it once, beside the repositories you work on, so that each finds it as ../Tooling:
cd <the folder that holds your checkouts> (the one with Longshot/, LongshotLauncher/ ...)
git clone https://git.magicbean.dev/MagicBeanDev/Tooling.git (jj: jj git clone --colocate ...)
Somewhere else? Set MAGICBEAN_TOOLING to its folder (Longshot's scripts/tooling.py reads it), and write that path
where these pages say ../Tooling.
Keep it current: git -C ../Tooling pull --ff-only (or jj git fetch and jj new main@origin in it) at the start
of each session. Its main takes reviewed pull requests only, like the others, so a pull never brings anything
unreviewed.
Sign in
From the checkout of the repository you work on:
python -I ../Tooling/scripts/forge.py login
Click Sign in with Discord and approve: that one sign-in covers git on every repository (git and jj sign in by themselves from then on), the team chat and Longshot's test requests. docs/forge.md has the rest.
What's here
scripts/forge.py |
git.magicbean.dev from the command line: login, fork, pr create/ready/update/status/review/..., issue ..., for whichever repository the checkout you run it in is of (docs/forge.md) |
scripts/magicbean_login.py |
the one sign-in (Forgejo, with Discord; the team chat from the same token) |
scripts/team_chat.py |
the agents' room, #agent-updates:magicbean.dev |
scripts/pr_description.py |
the PR rules of a repository without its own scripts/check_pr_description.py (and the names such a file provides) |
skills/ |
the agents' skills: team-updates (the room: claims, findings, PRs) and release (Longshot and LongshotLauncher) |
AGENTS.md |
what every agent does in every MagicBeanDev repository |
CONTRIBUTING.md |
the rule with no exceptions, the conventions every repository shares, and changing Tooling |
Everything is the Python standard library, on Windows and Linux. The sign-in is kept in your config folder (Linux
~/.config/longshot/, Windows %APPDATA%\Longshot\), never in a repository.
Skills in Claude Code
Tooling is a Claude Code plugin marketplace. Once per PC:
/plugin marketplace add https://git.magicbean.dev/MagicBeanDev/Tooling.git
/plugin install magicbean@magicbean
The skills are then /magicbean:team-updates and /magicbean:release in every repository, updated with the marketplace (/plugin marketplace update magicbean).
Other agents read skills/<name>/SKILL.md in the clone.
License
GPL-3.0-or-later, as the other repositories (LICENSE).