agentleFS
andrew-yangyandrew-yangy/gru-ai/CLAUDE.md

gru-ai

CLAUDE.md155 starsChanged 9 months agoMITView on GitHub

Design docs capture why the system works the way it does — principles, rationale, evidence, constraints. Unlike lessons (reactive — "what went wrong"), design docs are proactive — "how the system should behave and why."

The file

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

4 rules. About 0 are common, 2 are distinctive, and 2 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.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No indexer or computed state files -- read source files directly

    line 63
  2. Very specific:

    NEVER spawn builder/engineer agents directly.

    line 91
  3. Very specific:

    When the CEO asks about UI changes or improvements (e.g.

    line 94
  4. Distinctive:

    NEVER perform git operations without explicit user approval.

    line 101

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.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
CLAUDE.md

gruai — Claude Code Rules

What This Is

An autonomous AI company framework. See .context/vision.md for the full vision.

Context Tree Structure

.context/
|-- vision.md                           # System vision (read first)
|
|-- directives/                         # ALL work lives here: Directive > Project > Task
|   |-- {id}/
|   |   |-- directive.json              # Pipeline state, weight, references
|   |   |-- directive.md                # CEO brief
|   |   |-- brainstorm.md              # OPTIONAL: pre-planning (strategic/heavyweight)
|   |   |-- audit.md                   # OPTIONAL: technical audit
|   |   +-- projects/
|   |       |-- {project-id}/
|   |       |   +-- project.json       # Tasks[], DOD, agents -- THE source of truth
|   |       +-- ...
|   +-- ...
|
|-- intel/                              # Scout outputs
|   |-- latest/                         # Overwritten each /scout run
|   +-- archive/{YYYY-MM-DD}/           # Previous runs
|
|-- reports/                            # CEO dashboard reports
|   |-- daily-{date}.md
|   |-- weekly-{date}.md
|   +-- walkthrough-{date}.md
|
|-- design/                             # System design rationale (WHY the system works this way)
|   |-- context-flow.md                 # How context reaches agents, progressive disclosure
|   |-- pipeline-architecture.md        # Why these steps, this order, weight adaptation
|   |-- agent-model.md                  # Sub-agent scoping, isolation, constraints
|   |-- verification.md                 # Reviews, DOD, trust boundaries
|   +-- state-and-recovery.md           # Persistence, checkpoints, crash recovery
|
|-- lessons/                            # Flat, topic-based knowledge (reactive — what went wrong)
|   |-- orchestration.md
|   |-- agent-behavior.md
|   |-- review-quality.md
|   |-- skill-design.md
|   +-- state-management.md

How to Read the Context Tree

  • "What should we do now?" -> Read directives/*/directive.json for active directives, check directives/*/projects/*/project.json for active projects
  • Planning a feature: -> Read vision.md + relevant directive context + design/ + lessons/ + relevant project context.md files
  • Building a feature: -> Read project.json for tasks (at directives/{id}/projects/{project}/project.json), relevant design/ + lessons/ files
  • After completing work: -> Update project.json tasks, create report.md in project dir, update design/ if new patterns established, update lessons/ if new patterns discovered

Key Conventions

  • Directory names = entity IDs. directives/pipeline-v2/ means directive.id = "pipeline-v2"
  • project.json is THE source of truth for a project including all its tasks
  • Tasks are embedded in project.json -- no separate task files
  • Directives are directories in directives/{id}/ -- each contains directive.json, directive.md, and optional projects/
  • Directives discovered via glob: directives/*/directive.json
  • Projects discovered via glob: directives/*/projects/*/project.json
  • No indexer or computed state files -- read source files directly

Design Docs Routing

Design docs capture why the system works the way it does — principles, rationale, evidence, constraints. Unlike lessons (reactive — "what went wrong"), design docs are proactive — "how the system should behave and why."

RoleRead These
All agentsdesign/context-flow.md, design/agent-model.md
COO (planning/orchestration)design/pipeline-architecture.md, design/state-and-recovery.md
CTO (audit/review)design/verification.md, design/pipeline-architecture.md
Engineers (building)design/context-flow.md, design/agent-model.md
Reviewersdesign/verification.md

Lessons Routing

RoleRead These
All agentslessons/agent-behavior.md
All agents (pipeline quality)lessons/failure-patterns.md
COO (planning/orchestration)lessons/orchestration.md
CTO (review/audit)lessons/review-quality.md
Engineerslessons/skill-design.md
Dashboard/state worklessons/state-management.md
Scenario walkthroughslessons/scenarios.md

Pipeline Enforcement

  • ALL work goes through the /directive pipeline. The pipeline is weight-adaptive: lightweight tasks skip Morgan/C-suite/approval and run fast; heavyweight gets the full process. No need to bypass it.
  • NEVER spawn builder/engineer agents directly. Use /directive which handles reviews, scope, and completion verification. Bypassing the pipeline = bypassing all guardrails.

Design-First for UI Work

When the CEO asks about UI changes or improvements (e.g. "can we improve the UI of X", "this panel looks bad", "redesign the log panel"), spawn Quinn (UI/UX designer) first to produce a design before routing to /directive. Flow:

  1. Spawn Quinn with the CEO's request + relevant current code as context
  2. Quinn produces a design (layout, components, visual spec, interactions)
  3. Show the design to the CEO for feedback
  4. Once the CEO is happy, create a directive with Quinn's design attached and run /directive

Git Operations

NEVER perform git operations without explicit user approval.

Database Safety

Production database with real customer data. NEVER run Prisma migrations. Safe commands: npx prisma generate, npx prisma studio.

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.