agentleFS
initializinitializ/forge/CLAUDE.md

forge

CLAUDE.md223 starsChanged 5 months agoApache-2.0View on GitHub

Multi-module Go workspace with three modules: - forge-core/ — Core library (registry, tools, security, channels, LLM) - forge-cli/ — CLI commands, TUI wizard, runtime - forge-plugins/ — Channel plugins (telegram, slack), markdown converter Always run before committing: Fix any lint errors and formatting issues before creating commits. Run tests for affected modules before committing:

The file

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

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

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

    Run tests for affected modules before committing:

    line 35

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

Forge - CLAUDE.md

Project Structure

Multi-module Go workspace with three modules:

  • forge-core/ — Core library (registry, tools, security, channels, LLM)
  • forge-cli/ — CLI commands, TUI wizard, runtime
  • forge-plugins/ — Channel plugins (telegram, slack), markdown converter

Platform-integration contracts (used by initializ AIP)

  • Tenancy headers: every forge→platform HTTP callout (admission, remote session store, MCP platform token resolver) MUST send Org-Id + Workspace-Id from FORGE_ORG_ID/FORGE_WORKSPACE_ID env alongside Authorization: Bearer ${FORGE_PLATFORM_TOKEN} — the platform verifies a PER-ORG HS256 token and needs Org-Id to pick the signing secret BEFORE it can validate the bearer (omitting it → 401 "missing org-id header"). Pattern lives in admission_loader.go / remote_session_store.go / mcp/platform_token.go.
  • MCP auth types (auth.type): oauth/bearer/static + managed platform (agent-principal token from ForgeConfig.Platform.token_endpoint) and user (delegated, lazy — cannot be required:true). The platform owns the op→identity split; forge only reads per-server config.
  • DEFER approval is FULLY BUILT & enforced (forge-core/security/deferpolicy/, Slack Block-Kit delivery in forge-plugins/channels/slack/approvals.go): security.defer.tools.<toolName>{to: channel:slack:#x, approvers, timeout} — keyed by the RUNTIME tool name, which for MCP is <server>__<op>. Guardrails approvalGates are parsed but NOT enforced — use security.defer.*.
  • MCP OAuth discovery/DCR (forge-core/mcp/oauth_discovery.go, #316/#320): RFC 9728→8414→7591. wellKnown() must INSERT the well-known segment for path-qualified issuers (Atlassian auth.atlassian.com/<id>) — replacing the path resolves the wrong AS.

Pre-Commit Requirements

Always run before committing:

# Format all modules
gofmt -w forge-core/ forge-cli/ forge-plugins/

# Lint all modules
golangci-lint run ./forge-core/...
golangci-lint run ./forge-cli/...
golangci-lint run ./forge-plugins/...

Fix any lint errors and formatting issues before creating commits.

Testing

Run tests for affected modules before committing:

cd forge-core && go test ./...
cd forge-cli && go test ./...
cd forge-plugins && go test ./...

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.