harness-lab / dashboard
AGENTS.md0 starsChanged 8 months agoMITView on GitHub
Next.js App Router application that renders the live workshop — participant briefs, presenter room screen, facilitator control surfaces. Before editing code under dashboard/: Any new /admin route, facilitator server action, or auth helper that gates access on a Neon Auth session MUST go through one of the existing guards: requireFacilitatorRequest (API routes), requireFacilitatorPageAccess (Server Components), requireFacilitatorActionAccess (server actions), or getFacilitatorSession / resolveFacilitatorGrant (programmatic). All four enforce role = "admin" on the underlying Neon Auth user as a defense-in-depth check —…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- harness-cli/AGENTS.mdAGENTS.md
- workshop-content/AGENTS.mdAGENTS.md
- workshop-skill/AGENTS.mdAGENTS.md
- workshopSkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Before editing code under dashboard/:
- Distinctive: line 21
Test additions → match the existing Playwright/unit split.
- Very specific: line 46
All four enforce role = "admin" on the underlying Neon Auth user as a defense-in-depth check — even when an instance_grants row exists.
- Distinctive: line 49
If you change any of the guards, the suite must stay green.
- Very specific: line 53
Never gate on getAuthenticatedFacilitator alone — that only checks that a Neon session exists, not that the user has admin role.
≈ “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.
Files
dashboard/
Mission
Next.js App Router application that renders the live workshop — participant briefs, presenter room screen, facilitator control surfaces.
Read First
Before editing code under dashboard/:
../docs/dashboard-design-system.md— shared visual and interaction baseline.../docs/dashboard-surface-model.md— routing, state, and surface boundaries.../docs/dashboard-testing-strategy.md— Playwright, unit, and smoke test contracts.../docs/agent-ui-testing.md— how an agent should validate UI changes before claiming done.- The current plan in
../docs/plans/if the task is already in flight.
Task Routing
- New recurring visual pattern → update or extend
docs/dashboard-design-system.mdin the same slice as the code change. - Routing, state, or surface boundary change → read
docs/dashboard-surface-model.mdfirst and update it if the boundary moves. - Test additions → match the existing Playwright/unit split; smoke-test critical flows before done.
- Agent-driven UI work → follow the layered workflow in
docs/agent-ui-testing.md(exploratory → Playwright → human review).
Verification Boundary
- Critical flows require a Playwright regression before the change is considered done. Exploratory browser inspection is a diagnostic tool, not a verification.
- UI changes are not done when the diff compiles. They are done when a human (or a reliable automated check) has seen the new state match the design doc.
cd dashboard && npm run test && npm run test:e2e && npm run lint && npm run buildmust pass before shipping.- For framework-sensitive edits, prefer the version-matched docs in
dashboard/node_modules/next/dist/docs/over memory.
Done Criteria
- Tests, lint, and build run clean for the touched surface.
- Design system docs still describe reality if a recurring pattern landed.
- The change was verified against the design doc baseline, not just "it compiles."
- The next safe move is stated if the work is partial.
Privilege Boundary
Any new /admin route, facilitator server action, or auth helper that
gates access on a Neon Auth session MUST go through one of the existing
guards: requireFacilitatorRequest (API routes), requireFacilitatorPageAccess
(Server Components), requireFacilitatorActionAccess (server actions),
or getFacilitatorSession / resolveFacilitatorGrant (programmatic).
All four enforce role = "admin" on the underlying Neon Auth user as a
defense-in-depth check — even when an instance_grants row exists.
The regression suite for this lives in lib/privilege-boundary.test.ts.
If you change any of the guards, the suite must stay green; if you add
a new guard, extend the suite with a participant-role-with-stale-grant
case proving the boundary holds.
Never gate on getAuthenticatedFacilitator alone — that only checks
that a Neon session exists, not that the user has admin role.
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
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.

