agentleFS
ondrej-svecondrej-svec/harness-lab/dashboard/AGENTS.md

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 checking a change actually works.

    Of the AGENTS.md files we read, the 11,736 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.

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
  1. Very specific:

    Before editing code under dashboard/:

    line 9
  2. Distinctive:

    Test additions → match the existing Playwright/unit split.

    line 21
  3. Very specific:

    All four enforce role = "admin" on the underlying Neon Auth user as a defense-in-depth check — even when an instance_grants row exists.

    line 46
  4. Distinctive:

    If you change any of the guards, the suite must stay green.

    line 49
  5. Very specific:

    Never gate on getAuthenticatedFacilitator alone — that only checks that a Neon session exists, not that the user has admin role.

    line 53

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 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

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/:

  1. ../docs/dashboard-design-system.md — shared visual and interaction baseline.
  2. ../docs/dashboard-surface-model.md — routing, state, and surface boundaries.
  3. ../docs/dashboard-testing-strategy.md — Playwright, unit, and smoke test contracts.
  4. ../docs/agent-ui-testing.md — how an agent should validate UI changes before claiming done.
  5. 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.md in the same slice as the code change.
  • Routing, state, or surface boundary change → read docs/dashboard-surface-model.md first 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 build must pass before shipping.
  • For framework-sensitive edits, prefer the version-matched docs in dashboard/node_modules/next/dist/docs/ over memory.

Done Criteria

  1. Tests, lint, and build run clean for the touched surface.
  2. Design system docs still describe reality if a recurring pattern landed.
  3. The change was verified against the design doc baseline, not just "it compiles."
  4. 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.

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.