agentleFS
ragnarwestadragnarwestad/aide/dashboard/AGENTS.md

aide / dashboard

AGENTS.md2 starsChanged 25 days agoMITView on GitHub

What a session working under dashboard/ has to know before changing the queue, the worktrees or a run: the things that are easy to get backwards. Each rule names the page in docs/ that says why. Much of this also governs core/scripts/aide-run-spec, the dashboard's execution backend — a session editing that script directly should read this file too. Every AI tool reads it (CLAUDE.md beside it imports it); the repo-wide rules are in the root AGENTS.md. The rules that matter…

The file

We split this AGENTS.md into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every move of a shared checkout — the pull (switch, fetch, fast-forward) and the worktree add — runs under the per-root lock …

    line 101
  2. Distinctive:

    Every session change reaches main through Merge, and the user presses Deploy, with one exception: a change from this session that has …

    line 183

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Development in aide/dashboard

What a session working under dashboard/ has to know before changing the queue, the worktrees or a run: the things that are easy to get backwards. Each rule names the page in docs/ that says why. Much of this also governs core/scripts/aide-run-spec, the dashboard's execution backend — a session editing that script directly should read this file too. Every AI tool reads it (CLAUDE.md beside it imports it); the repo-wide rules are in the root AGENTS.md.

The rules that matter only in one part of the code live in .claude/rules/ beside this file. Claude Code loads each one when a file it names is read; every tool implementing or reviewing a change reads the rule for that code before starting:

  • landing.md — the merge, the archive step and Close: the code that merges a branch, and the rows and pages that read what a merge left.
  • process-groups.md — signalling a process group, under src/serve/.
  • dashboard-design.md — required existing-design reference and visual verification for implementation and review, tokens, the class vocabulary and layout, under src/render/ and src/specs-client/.

How a run touches the repositories

docs/the-runner.md, "How a run touches the repositories".

  • aide-run-spec branches EVERY repo it touches, and pushes a repo only when its branch has content beyond its own default branch AND origin does not already hold that tip — never on changedFiles, which a step that commits its own work leaves at 0, and never on "moved during THIS run" alone: a commit a prior run's failed push left stranded is retried on every later run, not only the run that made it. A run's own bookkeeping (Workflow steps completed) is written and pushed as its own confirmed step, so it never merges while that push cannot be confirmed against origin.
  • It works in git worktree checkouts under $HOME/.aide/dashboard/worktrees/<project>/<spec>/. The result's repos[].root is the MAIN checkout; repos[].worktree is the throwaway one.
  • Gitignored paths reach a worktree only through worktreeLinks: in the manifest. A project that does not track a manifest keeps its settings in the dashboard's checkouts/<name>/settings.yaml; the clone, a step's worktree and the merge's tree carry an untracked copy of it as .aide/project.yaml, kept out of every commit and out of aide_tree_hash. A tracked manifest always wins.
  • A run reaches the project and its specs root, and nothing else — and under the specs root only its own folder (and its archive/ twin): a step that writes another spec's folder ends scope-violation, with those changes discarded before the commit. create is the one step that makes a folder.
  • A Claude step runs in Claude Code's sandbox with a fixed deny list (run-spec/setup/sandbox.sh), written twice: as the sandbox's denyRead/denyWrite, which confine shell commands, and as Read(...) and Edit(...) permission rules, which confine the file tools. Every path starts ~/: a rule that starts with a single / is read relative to the settings file and denies nothing, silently. A deny cannot be opened again for a folder under it, so nothing a step writes in, nor a folder above it, goes on the list. A second list is denied for writing only: what runs outside the sandbox later (shell startup files, PATH, git and AI-tool settings, queue-config.json, every checkout's .git/hooks, .git/config and settings.yaml). A schedule entry with "sandbox": false runs without it. A Codex or OpenCode turn runs inside srt instead (run-spec/setup/srt.sh), with the same lists but its own login readable, Codex's own sandbox off, and the network cut to a fixed list of hosts (docs/the-runner.md, "What a step can reach").
  • The script runs from a private copy of itself — an implement step reinstalls it under bash's feet — and the copy's marker is unset before claude starts, since an inherited flag would make the next nested invocation delete the installed script. /bin/bash here is 3.2: no mapfile, build arrays with array+=(...).
  • An implement whose own turn ends completed is reviewed before its tests decide anything (run-spec/turn/review.sh): a second, fresh session reads the description and the branch's diff and looks for defects against the description alone, on the queue config's model.review or else its model.default (resolveSidePick, queue/providers/side-tools.ts), Codex included (run-spec/turn/side-turn.sh, which puts the step's own outcome, tokens and limits back afterwards). A third session, on model.verify or else model.default, keeps or drops each defect first. Defects go back to the ORIGINAL session as one follow-up turn, which may turn one down on a not a defect: line, logged; the review itself is best-effort, so a verdict it cannot parse counts as "found nothing". The step's cost and tokens sum every turn, the review and the verification included, and its sessionId stays the implement session's. The result carries the review and the verification each on its own (review, verify: outcome, tool, duration, tokens, cost and the byte range they wrote in the transcript), which the Review and Verify lines on the specs list draw.
  • An implement ends only on a green test run the runner made itself (run-spec/turn/step-tests.sh), never on the session's own record. Red gets at most AIDE_TEST_FIX_ROUNDS (2) more turns. At AIDE_TEST_FIX_FRESH_PERCENT (85 unless set) of the implement session's context window, a fresh session of the same tool and model takes over; without a context figure, the implement session keeps them. Still red is tests-red on the STEP (Implement offered again), unlike the merge's tests-red, which STOPS the job. An archive runs no suite of its own: its merge runs it once, on what main is about to become, and skips it when the runner already saw that same tree green (testedGreen, aide_tree_hash).

    docs/the-runner.md and docs/landing.md have the rest.

  • Every move of a shared checkout — the pull (switch, fetch, fast-forward) and the worktree add — runs under the per-root lock $root/.git/aide-run-spec-worktree.lock (acquire_worktree_lock, run-spec/setup/gates.sh). Runs of one project share its checkout, and a git command that moves it outside the lock loses a ref lock or the checkout under its feet when another run is in its own section. A refusal from such a command quotes git's own first line. The dashboard's own moves take the same lock (git/checkout-lock/), and it retries no lost git lock in a shared checkout; docs/the-runner.md says what counts as a move.

The dashboard's own checkouts

docs/projects.md, "Adding a project".

  • A clone happens on a press and nowhere else. ensureDashboardCheckout clones only when its caller passes mayClone — Add, and any successful Settings save of the project, whichever field it changed. Every tick, boot and page render asks without it and is told what is missing; CheckoutEnsurer.make() is the one entry that may clone, and get/fresh never do.
  • Nothing here deletes a checkout, and nothing re-clones one to repair it. A directory that is there and that git cannot answer for is reported by project at the top of every page (render/ui/checkout-faults.ts), in the dashboard's own sentence — git's own words appear only for a clone that failed — and left alone. A checkout that IS the project's own entry gets its own sentence, because the advice "remove it by hand" would be advice to delete the project.
  • A check git did not finish is no answer. A call the runner's timer stopped, a killed one and one that could not start carry unfinished on the runner's result (git/process/); the usability check (git/checkout-usable/) reads either attempt carrying it as "not known", and nothing is cloned or written because of it. Its warning is marked, and the drift poll checks it again.
  • A path handed to git has both sides resolved first. git answers with every symlink resolved; a path off the scan of the projects root does not — that root is a directory of LINKS on a serving host, and on macOS $TMPDIR is a link too. Subtracting one from the other (relative(root, dir)) then climbs out of the repository and back down an absolute path, and git show <ref>:<that> finds nothing while failing quietly: the read comes back empty and whatever it fed reads as "gone", so an acceptance tick on a row the page has just drawn is refused as no longer there. real() in git/branch-file.ts and sameRoot in land-branch/merge.ts are the guard; aide-run-spec resolves the specs root it is handed for the same reason.
  • A project is added by its git address, so no directory already on the host is ever registered. Where the clone ends up depends on the projects root. On the directory of links a serving host uses, the entry is a link to the dashboard's own checkout, so personDir and that checkout are one directory. On an ordinary projects root, Add clones into <projects root>/<name> and then makes the dashboard's own checkout as a second clone of the same origin, so they are two.

The hand-paired bash/TypeScript pairs

core/scripts/aide-run-spec and the dashboard make several of the same decisions with no shared source. Each pair is pinned by a test that reads both sides, but the two copies are still edited by hand together. docs/bash-typescript-decisions.md has the table, and the decisions that look like pairs but share one source.

  • The merge runs Aide's scripts from beside --runner-bin, never from PATH alone (scriptFor in land-branch/run-script.ts). A test board serving a branch runs that branch's TypeScript, and the bash written together with it lives in the same checkout; the copy under ~/.local/bin is main's, so a flag the branch added is "unknown" to it. Prod's runner IS the installed one, so prod is unchanged. test/serve/land-branch/scripts-beside-the-runner.test.ts pins the lookup and the wiring.

Starting a script

  • A script is started through its own interpreter, never exec'd directly (scriptArgv, src/integrations/script-argv.ts). macOS checks a freshly written executable for 10-13 seconds the first time it is exec'd, once per new file; every install and every test stub is one. A test that puts a stub on PATH for a bash script to call hands it down as an exported function (BASH_FUNC_<name>%%) instead of a file, and a stub that must be a file is written once per test file, not per test.

When a session's own change has taken the board down

Every session change reaches main through Merge, and the user presses Deploy, with one exception: a change from this session that has stopped the serving board itself, so that neither a Merge nor the Deploy button can run. Then the fix goes straight to main and is pushed, and the session starts the Deploy itself with POST /api/queue/projects/aide/deploy (port 8788, the Bearer token in ~/.aide/dashboard/queue-token), and checks that the pages load. A Deploy joins the back of the queue; with jobs waiting ahead of it, it is moved first through the queue editor (POST /api/queue/waiting/open, then save). Red tests, a refused Merge or a long queue are not this case.

Code health

The repository's rules for file length, folder size, splitting a module and where its tests live are in the root AGENTS.md, "Code health", and hold here as everywhere. The dashboard checks them in test/design/code-health-limits.test.ts, its stylesheets included. What is particular to the dashboard:

  • messages.ts and the five language files en.ts, nb.ts, es.ts, de.ts and fr.ts are exempt from the line limit by filename — the message catalogues grow with every new string. Files already over the limit are held at their recorded length in the test's OVER_LINE_LIMIT.
  • Function length, nesting depth and repeated blocks in the TypeScript are checked in test/design/complexity/, with what is held at its level in held.json there. The bash scripts under dashboard/ are checked with the rest of the repository's bash, from core/tests/.
  • A test moved into a subfolder gains one ../ in its own imports.
  • No <name>-e twin sits beside a file under src/ or test/. macOS sed -i -e ... reads -e as the backup suffix and leaves the original under that name; the copy still parses, so nothing fails and nothing says so.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.