agentleFS
codeaiforgecodeaiforge/ai-ready-nx-workspace/AGENTS.md

ai-ready-nx-workspace

AGENTS.md2 starsChanged 3 months agoMITView on GitHub

All agents and contributors must follow this strict authority order: Agents must consume, not redefine, architecture. All architectural logic and decisions must be derived from the Nx project graph and /docs. Agent folders must not duplicate or override architecture logic. This ensures a single source of truth and prevents fragmentation. Pull requests are tiered T0–T3 by git-native-sdlc-controls@v0.2.0 and every change emits an evidence/0 record. The emitted tier is the single authority on risk and selects the .ai/workflows/ pipeline — no…

The file

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

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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. Distinctive:

    All agents and contributors must follow this strict authority order:

    line 8
  2. Distinctive:

    All architectural logic and decisions must be derived from the Nx project graph and /docs.

    line 17
  3. Very specific:

    When running tasks (for example build, lint, test, e2e, etc.), always prefer running the task through nx (i.e.

    line 22
  4. Very specific:

    NEVER guess CLI flags - always check nx_docs or --help first when unsure

    line 26
  5. Distinctive:

    USE for: advanced config options, unfamiliar flags, migration guides, plugin configuration, edge cases

    line 34
  6. Very specific:

    DON'T USE for: basic generator syntax (nx g @nx/react:app), standard commands, things you already know

    line 35

≈ “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
<!-- nx configuration start--><!-- Leave the start & end comments to automatically receive updates. -->

Repository Authority & Nx Guidelines

Authority Order (Source of Truth)

All agents and contributors must follow this strict authority order:

  1. Nx project graph — The canonical source of system architecture and boundaries.
  2. /docs — Repository-internal documentation (architecture, requirements, diagrams, ADRs).
  3. /.ai — Shared AI governance, context, roles, tasks, and standards.
  4. Agent folders (e.g., .claude/, .codex/, .gemini/) — Implementation adapters only.

Agents must consume, not redefine, architecture.

All architectural logic and decisions must be derived from the Nx project graph and /docs. Agent folders must not duplicate or override architecture logic. This ensures a single source of truth and prevents fragmentation.

General Guidelines for working with Nx

  • For navigating/exploring the workspace, invoke the nx-workspace skill first - it has patterns for querying projects, targets, and dependencies
  • When running tasks (for example build, lint, test, e2e, etc.), always prefer running the task through nx (i.e. nx run, nx run-many, nx affected) instead of using the underlying tooling directly
  • Prefix nx commands with the workspace's package manager (e.g., pnpm nx build, npm exec nx test) - avoids using globally installed CLI
  • You have access to the Nx MCP server and its tools, use them to help the user
  • For Nx plugin best practices, check node_modules/@nx/<plugin>/PLUGIN.md. Not all plugins have this file - proceed without it if unavailable.
  • NEVER guess CLI flags - always check nx_docs or --help first when unsure

Scaffolding & Generators

  • For scaffolding tasks (creating apps, libs, project structure, setup), ALWAYS invoke the nx-generate skill FIRST before exploring or calling MCP tools

When to use nx_docs

  • USE for: advanced config options, unfamiliar flags, migration guides, plugin configuration, edge cases
  • DON'T USE for: basic generator syntax (nx g @nx/react:app), standard commands, things you already know
  • The nx-generate skill handles generator discovery internally - don't call nx_docs just to look up generator syntax
<!-- nx configuration end--><!-- The block above is regenerated by Nx. Keep repository rules below it. -->

Change governance

Pull requests are tiered T0–T3 by git-native-sdlc-controls@v0.2.0 and every change emits an evidence/0 record. The emitted tier is the single authority on risk and selects the .ai/workflows/ pipeline — no agent or contributor declares a tier, and story points size effort only.

  • How the gate works, and the T0–T3 → pipeline mapping: docs/sdlc-controls-integration.md
  • Why, and what it does not claim: docs/adr/0001-adopt-git-native-sdlc-controls.md

The component map the gate tiers against is generated from the Nx project graph, which is the authority order above applied literally: the graph decides topology, and /.ai and the agent folders consume that decision rather than restating it.

Commit provenance

Agent-authored commits declare CAF-SDLC-010 trailers (AI-Assisted, AI-Tool, and optionally AI-Session, Prompt-Ref). AI-Tool is required whenever AI was involved — the gate fails a change without it.

The convention lives in .ai/standards/ai-provenance.md. Agent folders point at it; per the authority order they must not restate it.

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.