agentleFS
indranilbanerjeeindranilbanerjee/DMClaw/CLAUDE.md

DMClaw

CLAUDE.md2 starsChanged 9 months agoMITView on GitHub

Read AGENTS.md for the full project context, architecture, and coding standards. This file adds Claude Code-specific operating rules on top of those universal instructions. You're working inside the WAT framework (Workflows, Agents, Tools). This architecture separates concerns so that probabilistic AI handles reasoning while deterministic code handles execution. Layer 1: Workflows (The Instructions) - Markdown SOPs stored in workflows/ - Each workflow defines the objective, required inputs, which tools to use, expected outputs, and how to handle edge cases -…

  • Reads credentials

The file

Show its rules and text

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

23 rules. About 0 are common, 12 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the relevant workflow, run tools in the correct sequence, handle failures gracefully, and ask clarifying questions when needed

    line 18
  2. Distinctive:

    Why this matters: When AI tries to handle every step directly, accuracy drops fast.

    line 28
  3. Very specific:

    Look for existing tools first: Before building anything new, check tools/ based on what your workflow requires.

    line 32
  4. Distinctive:

    Learn and adapt when things fail: Read the full error message and trace.

    line 34
  5. Distinctive:

    Full context: Read AGENTS.md for complete architecture, tech stack, coding standards, and guardrails.

    line 53
  6. Very specific:

    Deep knowledge: Read .ai-context/ for architecture details, business requirements, and reference repos.

    line 55
  7. Very specific:

    Rules & workflows: Read .agent/rules/ for coding standards and .agent/workflows/ for reusable task templates.

    line 57
  8. Distinctive:

    When working on a specific brand's code, always load the relevant Brand Soul context first.

    line 64
  9. Distinctive:

    When making changes that affect multiple packages in the monorepo, trace the dependency chain before editing.

    line 65
  10. Distinctive:

    Use the Task tool with specialized agents for parallel research — don't block the main conversation on deep exploration.

    line 66
  11. Very specific:

    Always generate TypeScript with strict mode.

    line 69
  12. Distinctive:

    Prefer Zod for runtime validation.

    line 70
  13. Very specific:

    When creating new files, follow the monorepo package structure: packages/{package-name}/src/.

    line 71
  14. Very specific:

    Every new module exports from an index.ts barrel file.

    line 73
  15. Distinctive:

    When you write or modify code, consider what tests are needed but don't write them unless asked.

    line 76
  16. Very specific:

    If asked to write tests, use the .agent/workflows/generate-tests.md template.

    line 77
  17. Very specific:

    Use MockModelProvider for any test that would otherwise call an LLM.

    line 78
  18. Very specific:

    After completing significant tasks, append a summary to .ai-context/prompt_history.md (see .agent/rules/auto-log.md).

    line 81
  19. Distinctive:

    Don't add AI-generated comments ("Generated by Claude", "AI-assisted", etc.)

    line 84
  20. Distinctive:

    Don't write default commit messages that hint at AI generation

    line 85
  21. Very specific:

    Don't add AI-specific config files outside .agent/

    line 86
  22. Distinctive:

    Don't modify AGENTS.md without asking — it's the cross-platform source of truth

    line 87
  23. Very specific:

    Don't touch the original reference docs (DMClaw-Product-Architecture.md, AI First - Folder Breakdown.md, reference_knowledge.md)

    line 88

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

DMClaw — Claude Code Instructions

Read AGENTS.md for the full project context, architecture, and coding standards. This file adds Claude Code-specific operating rules on top of those universal instructions.


WAT Framework (How You Operate)

You're working inside the WAT framework (Workflows, Agents, Tools). This architecture separates concerns so that probabilistic AI handles reasoning while deterministic code handles execution.

Layer 1: Workflows (The Instructions)

  • Markdown SOPs stored in workflows/
  • Each workflow defines the objective, required inputs, which tools to use, expected outputs, and how to handle edge cases
  • Written in plain language, the same way you'd brief someone on your team

Layer 2: Agents (The Decision-Maker)

  • This is your role. You're responsible for intelligent coordination.
  • Read the relevant workflow, run tools in the correct sequence, handle failures gracefully, and ask clarifying questions when needed
  • You connect intent to execution without trying to do everything yourself
  • Example: If you need to pull data from a website, don't attempt it directly. Read workflows/scrape_website.md, figure out the required inputs, then execute tools/scrape_single_site.py

Layer 3: Tools (The Execution)

  • Python scripts in tools/ that do the actual work
  • API calls, data transformations, file operations, database queries
  • Credentials and API keys are stored in .env
  • These scripts are consistent, testable, and fast

Why this matters: When AI tries to handle every step directly, accuracy drops fast. If each step is 90% accurate, you're down to 59% success after just five steps. By offloading execution to deterministic scripts, you stay focused on orchestration and decision-making where you excel.

Operating Rules

  1. Look for existing tools first. Before building anything new, check tools/ based on what your workflow requires. Only create new scripts when nothing exists for that task.
  2. Learn and adapt when things fail. Read the full error message and trace. Fix the script and retest (if it uses paid API calls or credits, check with me before running again). Document what you learned in the workflow.
  3. Keep workflows current. Workflows should evolve as you learn. Don't create or overwrite workflows without asking unless explicitly told to.
  4. Self-improvement loop: Identify what broke -> Fix the tool -> Verify the fix -> Update the workflow -> Move on with a more robust system.

File Destinations

  • Deliverables: Final outputs go to cloud services (Google Sheets, Slides, etc.) where I can access them directly
  • Intermediates: Temporary files in .tmp/ — regenerable and disposable
  • Local files are for processing only. Anything the user needs to see lives in cloud services.

Project: DMClaw

What: Vertical AI operating system for digital marketing agencies. Forked from OpenClaw.

Current Phase: Phase 0 Complete (v0.0.1-fork) — Phase 1 next (Identity Cascade + Operational Config + RBAC)

Full context: Read AGENTS.md for complete architecture, tech stack, coding standards, and guardrails.

Deep knowledge: Read .ai-context/ for architecture details, business requirements, and reference repos.

Rules & workflows: Read .agent/rules/ for coding standards and .agent/workflows/ for reusable task templates.


Claude Code-Specific Rules

Context Management

  • When working on a specific brand's code, always load the relevant Brand Soul context first.
  • When making changes that affect multiple packages in the monorepo, trace the dependency chain before editing.
  • Use the Task tool with specialized agents for parallel research — don't block the main conversation on deep exploration.

Code Generation

  • Always generate TypeScript with strict mode. No any types.
  • Prefer Zod for runtime validation. Use Zod schemas as the source of truth, derive TypeScript types from them.
  • When creating new files, follow the monorepo package structure: packages/{package-name}/src/.
  • Interface files go in packages/{package-name}/src/types/.
  • Every new module exports from an index.ts barrel file.

Testing

  • When you write or modify code, consider what tests are needed but don't write them unless asked.
  • If asked to write tests, use the .agent/workflows/generate-tests.md template.
  • Use MockModelProvider for any test that would otherwise call an LLM.

Session Logging

  • After completing significant tasks, append a summary to .ai-context/prompt_history.md (see .agent/rules/auto-log.md).

What NOT to Do

  • Don't add AI-generated comments ("Generated by Claude", "AI-assisted", etc.)
  • Don't write default commit messages that hint at AI generation
  • Don't add AI-specific config files outside .agent/
  • Don't modify AGENTS.md without asking — it's the cross-platform source of truth
  • Don't touch the original reference docs (DMClaw-Product-Architecture.md, AI First - Folder Breakdown.md, reference_knowledge.md)

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.