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."
In this repository13 other files it gives its agents.
- brainstormSkill
- code-review-excellenceSkill
- directiveSkill
- frontend-designSkill
- gruai-agentsSkill
- gruai-configSkill
- healthcheckSkill
- reportSkill
- scoutSkill
- seo-auditSkill
- smoke-testSkill
- walkthroughSkill
- webapp-testingSkill
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
- Distinctive: line 63
No indexer or computed state files -- read source files directly
- Very specific: line 91
NEVER spawn builder/engineer agents directly.
- Very specific: line 94
When the CEO asks about UI changes or improvements (e.g.
- Distinctive: line 101
NEVER perform git operations without explicit user approval.
≈ “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.
Files
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.mdHow to Read the Context Tree
- "What should we do now?" -> Read
directives/*/directive.jsonfor active directives, checkdirectives/*/projects/*/project.jsonfor 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), relevantdesign/+lessons/files - After completing work: -> Update project.json tasks, create report.md in project dir, update
design/if new patterns established, updatelessons/if new patterns discovered
Key Conventions
- Directory names = entity IDs.
directives/pipeline-v2/meansdirective.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."
| Role | Read These |
| All agents | design/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 |
| Reviewers | design/verification.md |
Lessons Routing
| Role | Read These |
| All agents | lessons/agent-behavior.md |
| All agents (pipeline quality) | lessons/failure-patterns.md |
| COO (planning/orchestration) | lessons/orchestration.md |
| CTO (review/audit) | lessons/review-quality.md |
| Engineers | lessons/skill-design.md |
| Dashboard/state work | lessons/state-management.md |
| Scenario walkthroughs | lessons/scenarios.md |
Pipeline Enforcement
- ALL work goes through the
/directivepipeline. 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
/directivewhich 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:
- Spawn Quinn with the CEO's request + relevant current code as context
- Quinn produces a design (layout, components, visual spec, interactions)
- Show the design to the CEO for feedback
- 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.
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.

