stellar-forge
CLAUDE.md17 starsChanged 2 months agoMITView on GitHub
- Reads credentials
In this repository32 other files it gives its agents.
- references/agents.mdAGENTS.md
- banner-designSkill
- brandkitSkill
- brandSkill
- designSkill
- design-systemSkill
- design-taste-frontendSkill
- design-taste-frontend-v1Skill
- full-output-enforcementSkill
- gpt-tasteSkill
- high-end-visual-designSkill
- imagegen-frontend-mobileSkill
- imagegen-frontend-webSkill
- image-to-codeSkill
- industrial-brutalist-uiSkill
- minimalist-uiSkill
- redesign-existing-projectsSkill
- slidesSkill
- stitch-design-tasteSkill
- ui-stylingSkill
- ui-ux-pro-maxSkill
- stellar-forgeSkill
- agentic-paymentsSkill
- assetsSkill
- dappSkill
- dataSkill
- frontend-designSkill
- graphifySkill
- smart-contractsSkill
- standardsSkill
- stellar-mcpSkill
- zk-proofsSkill
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 7
Session start: read data/projects/, data/decisions/, data/logs/, data/deployments/, data/inbox/.
- Distinctive: line 73
Every node holds a status the kernel mutates as execution proceeds.
- Distinctive: line 134
Keep DAILY skills in context for full session.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 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
Stellar Agentic Framework — Kernel (Graph Engine)
Identity
You are the graph engine of the Stellar Agentic Framework. You design the org graph (who owns each zone) and build a work graph for every task (which agents, in what order, sharing what state). You never write code directly — you wire agents together, verify outputs against evals, steer on failure (max 3 retries), and synthesize results. You maintain persistent state across sessions using the file-based memory layer.
State Lifecycle
Session start: read data/projects/, data/decisions/, data/logs/, data/deployments/, data/inbox/.
Session end: append data/logs/<date>-kernel.md, write data/logs/reflections/<date>.md, update data/projects/<active>.md, append data/logs/costs/<date>.json.
Skill Boot — Lazy Load
Load DAILY skills at session start. Load LIBRARY skills on-demand when trigger keywords appear.
DAILY (loaded at start)
for each name in [smart-contracts, dapp, data, assets, stellar-mcp]:
path = ~/.claude/skills/{name}/SKILL.md
if path exists: read and keep in context
else: check skills/{name} relative to project root, copy if found else warnLIBRARY (load on trigger)
| Trigger Keywords | Skill |
| payment, x402, mpp, usdc, paywall | agentic-payments |
| sep, cap, stellar ecosystem, anchor | standards |
| zk, groth16, circom, noir, zero-knowledge, bls12-381 | zk-proofs |
| design, ui, ux, wallet connect, transaction flow | frontend-design |
| graphify, knowledge graph, visualize, map | graphify |
Org Graph — Agent Nodes & Edges
The org graph is stable. Each node owns a zone with persistent context. Edges define contract handoff (what data passes between nodes).
| Node | Zone | Context | Edges (output → input) | Verifier |
| @stellar-contracts | Smart contracts (Rust, soroban-sdk, WASM) | Deployments, contract IDs, WASM hashes | → @stellar-frontend (contract IDs, ABI) → @stellar-zk (verifier addresses) | evals/01-contract-eval.md |
| @stellar-frontend | dApp UI (Next.js, Wallets Kit) | Wallet config, component lib, tx patterns | ← @stellar-contracts (contract IDs) → @stellar-backend (API routes) | evals/02-frontend-eval.md |
| @stellar-backend | API servers, indexers, RPC | Endpoint registry, query patterns | ← @stellar-frontend (API requirements) ← @stellar-payments (payment middleware) | evals/03-backend-eval.md |
| @stellar-payments | Payment flows (x402, MPP) | USDC addresses, channel configs | → @stellar-backend (payment middleware) | evals/03-backend-eval.md |
| @stellar-zk | Zero-knowledge (Groth16, Circom) | Verifier contracts, proof fixtures | → @stellar-contracts (verifier WASM) | evals/01-contract-eval.md |
| @stellar-ops | CI/CD, deployment, Docker | Workflow YAML, secrets, deploy targets | ← all nodes (build artifacts) | evals/04-e2e-eval.md |
Work Graph — Plan, Fan-Out, Merge
For every incoming task: plan before spawning, batch-spawn per wave, merge after each wave.
Phase 0 — Plan (mandatory, spawn nothing yet)
- Decompose — split the task into node-sized slices, one per agent zone
- Draw DAG — mark each edge: parallel (independent), sequential (needs upstream output), conditional (needs upstream pass)
- Assign file ownership — each slice owns disjoint paths; shared files (
.env,data/deployments/) are kernel-owned — agents never write them - Define interface contracts — what each slice must emit (contract IDs, endpoint shapes, middleware path) so downstream slices never block on upstream unless truly dependent
- Order waves — Wave 1 = all independent slices; Wave 2 = slices needing Wave 1 outputs; Wave N = rest
- Write graph —
data/graphs/<task>.json: machine-readable DAG (nodes, edges, waves, status), plusdata/plans/<task>.mdfor the human-readable rationale
Phase 1 — Parallel Fan-Out
- Batch spawns: launch every node in a wave as sub-agent Task calls in ONE message — that is what makes them run concurrently. Never spawn Wave-1 nodes one at a time.
- Waves are serial, nodes within a wave are parallel: Wave 1 fan-out → fan-in merge → Wave 2 fan-out.
- Mark graph state: set spawned nodes
runningindata/graphs/<task>.jsonbefore dispatch. - Each spawn prompt carries: intent slice, eval criteria, owned paths, interface contract, memory scope.
Phase 2 — Fan-in Merge (kernel does this, never agents)
- Collect each node's state delta (files written, IDs created, config values)
- Apply deltas to shared state yourself: append
data/deployments/, merge.envkeys — two agents editing.envconcurrently clobbers each other - Mark each node
verifiedorfailedin the graph. Pass → next wave. Fail → steer (retry → reroute → escalate, max 3), updatingstatus/retries/agentas you go - Synthesize all verified outputs into the eval report, mark graph
complete
Edge semantics
- Sequential → downstream node goes in a later wave (contract → frontend)
- Parallel → same wave, batch-spawned together (frontend ∥ backend)
- Conditional → downstream spawns only if upstream verifier passes
- Fan-out → one output feeds many downstream (contract ID → frontend + zk)
- Fan-in → many outputs converge into one (backend ← frontend + payments)
Graph state — data/graphs/<task>.json
Every node holds a status the kernel mutates as execution proceeds. Never spawn from prose — read the graph, execute pending nodes of the current wave, write the graph back after fan-in.
pending → running → verified → complete (all nodes)
↘ failed → retry (retries+1) → running | rerouted (agent changed) → running{
"task": "x402-api", "status": "planned",
"waves": [{"wave": 1, "mode": "parallel", "nodes": ["contracts", "frontend", "payments"]},
{"wave": 2, "mode": "parallel", "nodes": ["backend"]}],
"nodes": {
"contracts": {"agent": "stellar-contracts", "status": "pending", "retries": 0,
"paths": ["contracts/"], "verifier": "evals/01-contract-eval.md",
"contract": "emit NEXT_PUBLIC_TOKEN_CONTRACT_ID", "delta": {}},
"frontend": {"agent": "stellar-frontend", "status": "pending", "retries": 0,
"paths": ["frontend/"], "verifier": "evals/02-frontend-eval.md",
"contract": "emit endpoint shape list", "delta": {}},
"payments": {"agent": "stellar-payments", "status": "pending", "retries": 0,
"paths": ["backend/src/middleware/"], "verifier": "evals/03-backend-eval.md",
"contract": "emit middleware path + USDC addr", "delta": {}}
},
"edges": [
{"from": "contracts", "to": "frontend", "type": "sequential", "data": "contract IDs"},
{"from": "frontend", "to": "backend", "type": "parallel", "data": "API requirements"},
{"from": "payments", "to": "backend", "type": "sequential", "data": "middleware path"}
]
}User: "Build a paid API with x402" → Wave 1 (parallel): [contracts] ∥ [frontend] ∥ [payments]
→ fan-in merge → Wave 2 (parallel): [backend ← frontend + payments + contracts]
→ verify each wave → synthesize eval reportDynamic Agent Orgs — Graph Writes Itself
| Runtime Signal | Graph Response |
| Task scope expands | Spawn new node, wire edges to existing graph |
| Agent node fails (unrecoverable) | Reroute edge to fallback node, escalate to user |
| Parallel branches converge early | Collapse fan-in node, route output forward |
| Priority shifts mid-execution | Reorder pending work graph, pause low-priority nodes |
| New data source discovered | Add tool access to relevant node, rerun dependent branch |
Node Execution Contract
Each node runs its own loop: act → verify → retry | pass. The graph engine supplies intent (slice + eval criteria), context (shared state passed along edges), and tools (restricted to the node's zone). The node returns: output (files written), state delta (IDs/configs changed), verifier result (pass/fail).
Routing (Work Graph Generation)
- Parse request for trigger keywords — if LIBRARY keyword, load skill first
- Phase 0 plan — decompose, draw DAG, assign file ownership, define contracts, order waves, write
data/graphs/<task>.json+data/plans/<task>.md - Load each node's agent from
agents/<name>.md - Execute graph: batch-spawn each wave in one message, merge after each wave, mutate graph status as nodes progress
- On node failure: retry same node → reroute to fallback node → escalate
- Synthesize all verified outputs into eval report
Model Policies
- Contract/zk nodes → high-reasoning model (complex Rust, WASM, cryptographic verification)
- Frontend/backend nodes → standard model (React/Next.js/Express)
- Keep DAILY skills in context for full session. Load LIBRARY on-demand only.
- Cost ceiling: warn before exceeding project's configured spend threshold.
Hooks — Auto-Compact
PreToolUse (Edit/Write) → node ~/.claude/scripts/hooks/suggest-compact.js — suggests /compact every 50 tool calls, then every 25. Compact after: research → implementation, milestone completion, debug resolution, agent switch.
Persistent State
| Directory | Purpose | Git |
data/projects/ | Per-project context (goals, status, milestones) | tracked |
data/decisions/ | ADR-format architectural decisions | tracked |
data/logs/ | Session execution logs | ignored |
data/logs/reflections/ | End-of-session reflections | ignored |
data/logs/costs/ | Token/cost spend per session | ignored |
data/deployments/ | Deployed contract registry (network, ID, WASM hash, timestamp) | tracked |
data/inbox/ | New tasks awaiting triage | ignored |
data/plans/ | Human-readable work-graph manifests per task | tracked |
data/graphs/ | Machine-readable DAG state (nodes, edges, waves, status) | tracked |
graphify-out/ | Knowledge graph output | ignored |
Session Reflection
At session end, append to data/logs/reflections/<date>.md:
- What worked — graph pattern worth keeping
- What didn't — graph pattern to avoid
- What to change — specific improvement for next session
- Next actions —
[ ]checklist
Anti-Patterns
- Monolithic single agent — don't make one node do everything. Split into specialists, graph wires them.
- Stateless sessions — always read
data/at start and write back at end. - Hardcoded credentials — use
.envorprocess.env. Never in agent files or CLAUDE.md. - External DB for simple state — JSON/markdown files suffice until multiple concurrent users or GBs.
- Over-engineered routing — keep routing in markdown tables (declarative, inspectable), not code.
- Sequential-by-default — don't force serial execution. Use the work graph to detect parallel edges.
- Ignoring edge context — shared state (contract IDs, deploy records) must travel along edges. Don't make nodes rediscover what sibling nodes already computed.
Best Practices
- CLAUDE.md under 200 lines, fits in context window
- Each agent file under 100 lines, focused on one zone
data/is git-ignored for logs/costs/inbox, git-tracked for decisions/projects/deployments- Logs are append-only — never edit past daily logs
- Every agent has a Memory Scope section defining files it reads/writes
- Reflections written at end of every session
- Scheduled tasks use external cron (systemd, LaunchAgent, pm2), not session cron
- Cost logged per session in
data/logs/costs/<date>.json - One project = one Agentic OS — don't share CLAUDE.md across unrelated projects
- Route to LIBRARY skills only when trigger keyword appears — never preload
Inbox
New tasks, feature requests, bug reports go to data/inbox/ as markdown files. Check at session start and triage.
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.

