agentleFS
imMamdouhaboammarimMamdouhaboammar/dokion/frontend/AGENTS.md

dokion / frontend

AGENTS.md1 starsChanged 3 months agoMITView on GitHub

If any of these are missing from DESIGN.md, update DESIGN.md first or stop for review.

The file

Show its rules and text

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

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

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Before coding, inspect PRODUCT.md, DESIGN.md, package.json, routing files, component structure, and any existing tests.

    line 4
  2. Distinctive:

    When encountering errors or bugs, the agent must enter Root Cause Mode:

    line 7
  3. Distinctive:

    Avoid trial-and-error workarounds or surface-level patches.

    line 10
  4. Very specific:

    Install Agent Harness: Ensure package dependencies and scripts are validated before making changes.

    line 13
  5. Distinctive:

    Bulk Install Guard: Do not bulk-install every skill or harness blindly.

    line 14
  6. Distinctive:

    React Harness Recommendation: Use a react error boundary and runtime boundary safety harness, strict TypeScript types, and standard hooks …

    line 15
  7. Distinctive:

    If any of these are missing from DESIGN.md, update DESIGN.md first or stop for review.

    line 25
  8. Distinctive:

    Do not delete existing features.

    line 28
  9. Distinctive:

    Do not rename public routes or exported APIs without explicit approval.

    line 29
  10. Distinctive:

    Do not replace the design system with unrelated styling.

    line 30
  11. Common:

    Never expose API keys or secrets in client-facing code.

    line 33
  12. Distinctive:

    If handling tokens, ensure they are masked in UI and not logged to the console.

    line 34
  13. Distinctive:

    Check git diff before finalizing.

    line 39
  14. Distinctive:

    Add or update tests when behavior changes.

    line 40
  15. Distinctive:

    Stop and ask for review when a change requires:

    line 53

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

Agent Instructions

Read This First

Before coding, inspect PRODUCT.md, DESIGN.md, package.json, routing files, component structure, and any existing tests. Do not rush to implementation without understanding the existing architecture.

Root Cause Mode

When encountering errors or bugs, the agent must enter Root Cause Mode:

  • Perform root cause analysis before applying fixes.
  • Identify exact file, line, and systemic cause.
  • Avoid trial-and-error workarounds or surface-level patches.

Agent Harness Inventory & Setup

  • Install Agent Harness: Ensure package dependencies and scripts are validated before making changes. Run bun install or package audits when necessary.
  • Bulk Install Guard: Do not bulk-install every skill or harness blindly. Only install specific tools required for the task.
  • React Harness Recommendation: Use a react error boundary and runtime boundary safety harness, strict TypeScript types, and standard hooks to guarantee runtime safety.
  • Code Review Harness Recommendation: Perform a repository graph review and duplication scan across files before finalizing changes to prevent code bloat and regressions.

Design Read and Taste Check

Before implementation, restate:

  • The page kind and audience.
  • The chosen visual language.
  • DESIGN_VARIANCE, MOTION_INTENSITY, and VISUAL_DENSITY.
  • The design-system decision.

If any of these are missing from DESIGN.md, update DESIGN.md first or stop for review.

What Not To Change

  • Do not delete existing features.
  • Do not rename public routes or exported APIs without explicit approval.
  • Do not replace the design system with unrelated styling.

Security & API Key Guidelines

  • Never expose API keys or secrets in client-facing code.
  • If handling tokens, ensure they are masked in UI and not logged to the console.

Regression Guard

  • Preserve existing behavior.
  • Limit changes to the requested scope.
  • Check git diff before finalizing.
  • Add or update tests when behavior changes.

Verification Checklist (MANDATORY)

You MUST complete these steps and provide proof before considering the task done.

  • App builds successfully.
  • Main flows still work.
  • Mobile layout checked with no horizontal overflow and proper dynamic viewport units.
  • Keyboard navigation checked with Tab, Enter, Space, and Escape.
  • Loading, empty, and error states implemented.
  • Run npx unslop-preflight audit in the terminal.
  • Paste the final score and ensure there are 0 Errors before you complete the task. Do NOT skip this step.

When To Stop

Stop and ask for review when a change requires:

  • Deleting core features.
  • Changing data models or schemas.
  • Altering auth/security behavior.
  • Making broad redesign decisions.

Visual & Mobile QA Checklist

  • No horizontal scrolling on mobile.
  • Tap targets are at least 44x44px for touch devices.
  • Color contrast passes mathematical deltas.
  • All forms have explicit validation boundaries and error messages.

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.