Repository navigation
Add AGENTS.md and a skills directory for AI coding agents - #2043
jaladh-singhal wants to merge 5 commits into
Conversation
|
This is great, thanks for proposing it. One thing that may be helpful to explain in AGENTS.md, if you agree, is a note about the firefly_test_data dependency for the tests. Maybe something like, "Some Java and jest tests read data from a separate |
kpuriIpac
left a comment
There was a problem hiding this comment.
Looks good to me. I tested with some questions (after checking out this repo) to claude and made sure it used agents.md (I even asked it explicitly about where it got the info from in agents.md). I am excited to have this be merged and try out building PRs from the new PR skill!
robyww
left a comment
There was a problem hiding this comment.
Looks fine.
It is not clear to me how much detail should be added.
I left details about how Controller refactor direction.
| - `src/firefly/js/` — client code | ||
| - `visualize/` images, HiPS and coordinates; `tables/` table model and UI; `charts/` Plotly-based charts | ||
| - `ui/` components, dialogs and search panels; `core/` Redux store, reducers and sagas; `api/` public JS API; `util/` helpers | ||
| - `*Cntlr.js` files (e.g. `charts/ChartsCntlr.js`) define a state slice's action types, `dispatch*` functions and reducer |
There was a problem hiding this comment.
Look at the ImagePlotCntlr.js and DrawLayerCntrl.js refactor to help eliminate circular dependencies.
- ImagePlotDispatch.js - dispatch functions
- DrawLayerDispatch.js - dispatch functions
- VisConst.js - holds all the action constants for both
- VisStoreRoots.js - holds the roots functions
- This is our refactor redirection
If we refactor MultViewCntlr.js we will make a MultiViewDispatch.js and add the constants to VisConst.js and root function to VisStoreRoots.js
There was a problem hiding this comment.
@robyww This is a good point that we should capture! I added a sub-bullet under the *Cntlr.js line that walks one action (image zoom) through the split: ZOOM_IMAGE in VisConst.js, dispatchZoom() in ImagePlotDispatch.js, reducer in ImagePlotCntlr.js, visRoot() in VisStoreRoots.js. It also says to use this pattern for new controllers and when refactoring old ones, so agents won't keep adding to the all-in-one shape.
Re how much detail should be added, this is where AI helps. I showed Claude your PR comment and it came up with the wording, since it knows the format and the goal of keeping AGENTS.md short. It did take a few iterations over its first draft though.
Added shared instructions for AI coding agents (Claude Code, Codex, Cursor, etc.) working in this repo:
AGENTS.md(repo root): project instructions that agents load at the start of every session. It covers the repo map, the dev and test loop, code conventions, and how to approach a change in this codebase.docs/rather than repeating them.CLAUDE.md: Claude Code readsAGENTS.mdnatively from v2.1.277, as long as noCLAUDE.mdexists (claude --versionto check)..agents/skills/: task-specific instructions that load only when a request matches a skill's description, or when it's run as a command (e.g./skill-name), so they cost nothing until they're used.pr-descriptionas an example. It drafts a PR description in the team's usual format (Jira link, what/why, Testing with the dev build URL)..agents/skills/is the cross-tool location recommended by the Agent Skills spec. Claude Code only reads.claude/skills/, so that is a symlink to.agents/skills/and one copy works for all tools.Testing
AGENTS.md(e.g. "how do I run a single JS test?"). It should answer without searching the repo./pr-descriptionor just ask "write a PR description for this branch". Either should load the skill and produce a draft with the Jira link and the dev build URL.AGENTS.mdand flag anything that doesn't match how you work, especially the Code conventions and "How to approach a change" sections.