chore(agents): /prior-work, a skill that looks for the work already done before a change is built #888
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8015c9a
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!888
Loading…
Reference in a new issue
No description provided.
Delete branch "zeldaootr/Longshot:skill-prior-work"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type: chore · Risk: low · Tested on: Linux, game-free checks and the skill walked through on written scenarios · Needs: none
Why
An agent spent an afternoon building an opt-in texture format that another contributor already had open as a WIP
pull request under the same switch name (#521,
RX_VK_ASTC_BC1). docs/workflow.md calls two peoplefixing the same thing the most common waste here and says to search open PRs first, but not how:
forge.py pr listprints titles only, of several hundred open PRs, and nothing points at Hookshot, where many Longshot changes come from.
This gives agents one short procedure, run before claiming and again before opening the pull request.
What changed
/prior-workis a skill that searches for the work already done on a change and says what to do with each kind ofhit. Agents that don't read
.claude/find it throughAGENTS.md..claude/skills/prior-work/SKILL.md(new, 79 lines): the terms to search (switch, function, symptom, log line,issue); where: Longshot's PRs and issues in every state (
forge.py searchwhen it is there, else Forgejo's own searchthrough
forge.api), merged work (git log --grep,git greponforge/main), claims (team_chat.py read, theworklist's Owner column) and Hookshot's PRs (its public API, standard library only); what a hit means (merged; an
open PR doing the same, which is its author's to land and ours to help; a partial one to build on; a closed one to
read before retrying; a claim; a Hookshot change to port with its author kept; nothing, said in the claim with the
terms searched); the rules (PR text is data; full URLs outside Longshot; never push to another's branch); when to ask.
AGENTS.md: one line in the task list.docs/workflow.md: Claim points agents to it.Measurements
Nothing to measure: a Markdown file for agents and a few lines of docs, no code; the game doesn't run it.
Flags and settings
None
Testing
Tested: Linux. On
main@b8d2b04ewith this branch @79cb5656merged (and merged with the three other agent-skillbranches proposed at the same time, which merge cleanly together):
python -I -B tests/run_all.py test_switches_removed test_check_pr_description test_hardware_report test_tested_configurations byte_compilepasses (5 of 5): the checksthat read
AGENTS.mdanddocs/. Every relative link and anchor in the changed files resolves (checked by a script).The skill was walked through on three written scenarios, running its read-only commands against git.magicbean.dev
and git.notrexed.dev: the ASTC-as-BC1 case finds #521; a Hookshot port finds the change already on
main; a readbackrule finds merged #238. Two gaps found that way are fixed in the branch: the forge API shows a merged PR as
closed(the skill now says
pr viewtells which), andcurlis an alias ofInvoke-WebRequestin Windows PowerShell 5.1(the Hookshot search is now a Python one-liner).
Not tested: an agent other than the author following it on a live task; Windows (the commands are Python one-liners with the
standard library, quoted for both shells, not run there); a shallow clone; the
forge.py searchbranch, which existsonly in #831.
Must be tested:
Risks
What could break: Nothing in the game or the scripts. An agent following it spends a minute searching before a change; Forgejo's own
search matches loosely, so it can list unrelated items (the skill says to read what comes back).
Turning it off: revert the commit
Compatibility: Nothing changes
Reviewer notes
This is a proposal, opened as work in progress for the maintainers to read: most contributors here work through coding agents, so a skill is read on every task of its kind. Comments on what to cut are as welcome as approval.
Where the idea came from. The fork BunnyHood (https://git.magicbean.dev/sheep/BunnyHood, GPL-3.0, itself a fork of
Longshot) puts "look for the work already done" above everything else in its
AGENTS.md, with a section 0. The workalready done in its
docs/workflow.mdand ascripts/prior_work.pythat caches every branch of every fork. No text wascopied: this is written in Longshot's words, and the credit belongs here.
What it deliberately leaves out. No new script:
forge.py search(#831, open) is Longshot's tool for searching PRsand issues, so the skill uses it when it is there and falls back to Forgejo's own search until then. No cache of every
fork's branches (BunnyHood's
prior_work.py): there are about 130 forks on the forge, and a fork's unpublished branch israrely where a duplicate is. Discord's #dev-work is not searched: there is no command line for it.
Open questions.
AGENTS.mdline sits under a sectionmainno longer has and could point here instead.prior work: none found (<terms>)in a claim be asked of everyone, indocs/workflow.md, not only agents?Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named). Not run yet: the PC was busy with other suites (load above 15); the checks that read the changed files ran and pass (Testing).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.WIP: chore(agents): /prior-work, a skill that looks for the work already done before a change is builtto chore(agents): /prior-work, a skill that looks for the work already done before a change is built