agentleFS
CarbeneAICarbeneAI/Forge/CLAUDE.md

Forge

CLAUDE.md9 starsChanged 7 months agoMITView on GitHub

Forge by CarbeneAI is an open-source AI operations platform built on Claude Code. It provides skills-based architecture, specialized agent personalities, event-driven automation, and automatic work capture. Full philosophy: .claude/skills/CORE/CONSTITUTION.md Skills are self-contained AI capability packages that activate automatically based on trigger words. Specialized AI personalities in .claude/agents/ with biblical names:

  • Reads credentials

The file

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

9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    All API keys go in ~/.claude/.env (gitignored).

    line 149
  2. Very specific:

    Main skill file: Always SKILL.md (uppercase)

    line 154
  3. Very specific:

    Never commit .env files

    line 180
  4. Distinctive:

    Use minimum required permissions for each API key

    line 183
  5. Distinctive:

    All code changes pass through Nehemiah (security auditor) in DevTeam workflow

    line 184
  6. Distinctive:

    If hooks fail with "No such file or directory":

    line 199
  7. Very specific:

    Check PAI_DIR in .claude/settings.json

    line 200
  8. Distinctive:

    Ensure it's an absolute path

    line 201
  9. Very specific:

    If bun or claude commands aren't found after setup:

    line 206

≈ “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

CLAUDE.md

This file provides guidance to Claude Code when working in this repository.

Repository Overview

Forge by CarbeneAI is an open-source AI operations platform built on Claude Code. It provides skills-based architecture, specialized agent personalities, event-driven automation, and automatic work capture.

Technology Stack

ComponentTechnologyNotes
RuntimeBunNOT Node.js
LanguageTypeScriptPrimary language for hooks and tools
Package ManagerBunNOT npm/yarn/pnpm
PlatformClaude CodeAll features built around Claude Code's hooks and skills system

Directory Structure

~/Forge/
├── .claude/
│   ├── settings.json          # Configuration (PAI_DIR, DA name, env vars)
│   ├── .env                   # API keys (never committed)
│   ├── hooks/                 # Event-driven automation (TypeScript)
│   │   ├── initialize-session.ts
│   │   ├── capture-all-events.ts
│   │   ├── capture-tool-output.ts
│   │   ├── stop-hook.ts
│   │   └── lib/pai-paths.ts   # Centralized path resolution
│   ├── skills/                # 120 domain-specific capabilities
│   │   ├── CORE/              # Identity, architecture, principles
│   │   ├── Fabric/            # 248 native AI patterns
│   │   ├── Research/          # Multi-source research workflows
│   │   ├── Private/           # Local Ollama privacy routing
│   │   ├── Observability/     # Real-time agent monitoring dashboard
│   │   └── [90+ more]/
│   ├── agents/                # Specialized agent configs
│   ├── history/               # Automatic work capture (gitignored)
│   └── tools/                 # System utilities
├── scripts/
│   ├── setup-new-machine.sh   # Initial setup
│   └── pai-aliases.sh         # Shell aliases
├── docs/                      # Guides and references
├── CLAUDE.md                  # This file
└── README.md

Common Commands

# Initial setup on new machine
bash ~/Forge/scripts/setup-new-machine.sh

# Verify configuration
forge-check

# Run health check
forge-test

# List all skills / agents
forge-skills
forge-agents

Architecture Principles

  1. Scaffolding > Model — System architecture matters more than the AI model
  2. Code Before Prompts — Write code, use prompts to orchestrate
  3. UNIX Philosophy — Do one thing well, compose through interfaces
  4. CLI as Interface — Every operation accessible via command line

Full philosophy: .claude/skills/CORE/CONSTITUTION.md

Skills System

Skills are self-contained AI capability packages that activate automatically based on trigger words.

Skill Structure (MANDATORY)

skills/SkillName/
├── SKILL.md              # Definition with YAML frontmatter and USE WHEN triggers
├── workflows/            # Step-by-step procedures (TitleCase.md)
├── reference/            # Deep-dive documentation (TitleCase.md)
└── tools/                # CLI utilities (TitleCase.ts)

Key Skills

CategorySkills
CoreCORE, Fabric (248 patterns), Research, Observability
SecurityOSINT, RedTeam, pentest-workflow, Ffuf, WazuhDashboard, CSO, CybersecurityPlaybooks (24 ATT&CK playbooks)
DevelopmentDevTeam, CodingAgent, CreateCLI, test-driven-development
Businessceo-advisor, cto-advisor, cfo-advisor, pricing, mvp, validate-idea
PrivacyPrivate (local Ollama routing), OllamaResearcher
Documentspdf-processing-pro, xlsx, MarkItDown, Obsidian

Agent System

Specialized AI personalities in .claude/agents/ with biblical names:

AgentRoleModel
BezalelSoftware architecture, PRDssonnet
HiramSoftware engineering, implementationsonnet
MiriamUI/UX designsonnet
NehemiahSecurity auditing, OWASPopus
DanielCompliance (SOX, GDPR, HIPAA)opus
EhudPenetration testingsonnet
GideonIncident responseopus
SolomonCode reviews, mentoringsonnet
DeborahCritical thinkingsonnet

Hooks System

Event-driven TypeScript automation executed via Bun:

HookEventPurpose
initialize-session.tsSessionStartLoad context and environment
capture-all-events.tsPreToolUseLog tool invocations
capture-tool-output.tsPostToolUseCapture tool results
capture-session-summary.tsSessionEndPreserve session learnings
stop-hook.tsStopCapture context on stop
context-compression-hook.tsPreCompactManage context compression

Environment Configuration

settings.json

{
  "env": {
    "PAI_DIR": "/home/you/.claude",
    "DA": "Forge",
    "CLAUDE_CODE_MAX_OUTPUT_TOKENS": "64000"
  }
}
  • PAI_DIR — Absolute path to .claude directory (machine-specific, auto-configured by setup script)
  • DA — Digital Assistant name
  • CLAUDE_CODE_MAX_OUTPUT_TOKENS — Max response length

API Keys (.env)

All API keys go in ~/.claude/.env (gitignored). See .env.example for the full list.

File Naming Conventions

  • Skills/Workflows/Tools: TitleCase (e.g., CreateSkill.md, UpdateInfo.md)
  • Main skill file: Always SKILL.md (uppercase)
  • Configuration: lowercase (e.g., settings.json, .env)

Mandatory Response Format

Task-based responses use this structured format:

SUMMARY: [One sentence]
ANALYSIS: [Key findings]
ACTIONS: [Steps taken]
RESULTS: [Outcomes]
STATUS: [Current state]
CAPTURE: [Context to preserve]
NEXT: [Recommended next steps]
STORY EXPLANATION:
1-8. [Key points]
COMPLETED: [12 words max]

Fabric Patterns

248+ patterns run natively within Claude Code (no CLI spawning). Only use fabric CLI for YouTube transcripts (-y) or pattern updates (-U).

Security Protocols

  1. Never commit .env files
  2. .env is gitignored by default
  3. Rotate API keys regularly
  4. Use minimum required permissions for each API key
  5. All code changes pass through Nehemiah (security auditor) in DevTeam workflow

Creating a New Skill

forge-new-skill MySkill
# Or: "Create a new skill for [purpose]"

See .claude/skills/CORE/SkillSystem.md for the canonical guide.

Troubleshooting

Hook Failures

If hooks fail with "No such file or directory":

  1. Check PAI_DIR in .claude/settings.json
  2. Ensure it's an absolute path
  3. Run: bash ~/Forge/scripts/setup-new-machine.sh

PATH Issues on WSL

If bun or claude commands aren't found after setup:

source ~/.bashrc

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.