pforge CLAUDE.md

Project instructions for pforge, a Rust framework that builds MCP servers from YAML configuration instead of handwritten setup code.

In plain words
What is it for?
They guide development commands, continuous tests, formatting, linting, coverage checks, complexity analysis, and technical-debt checks before committing.
Why use it?
They provide a consistent test-driven development process, meaning developers write tests as part of each short development cycle, along with required quality checks.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/paiml/pforge/claude-md
Clone the repo
git clone --depth 1 https://github.com/paiml/pforge
Per session 2,679 This file is loaded in full into every session.
When invoked 2,679 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.02679 $0.02679
Opus 5 $0.01340 $0.01340
Sonnet 5 $0.00536 $0.00536
Haiku 4.5 $0.00268 $0.00268

Measured 2d ago against content hash 74fb646800fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pforge CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 353 lines

How it starts

The opening of the file, as written. The whole thing — 353 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

pforge is a zero-boilerplate framework for building Model Context Protocol (MCP) servers through declarative YAML configuration. It's built on pmcp (Pragmatic AI Labs MCP SDK) with strict PMAT quality enforcement.

Design Philosophy: Cargo Lambda simplicity × Flask ergonomics × Rust guarantees

Development Commands

TDD Workflow (Extreme TDD - 5-minute cycles)

# Continuous testing during development
cargo watch -x 'test --lib --quiet' -x 'clippy --quiet'

# Run all tests
cargo test --all
cargo test --all --release

# Fast development cycle
make dev  # Runs continuous test + clippy watch

Quality Gates (Required before commit)

# Full quality gate check (run before committing)
make quality-gate

# Individual quality checks
cargo fmt --check              # Code formatting
cargo clippy -- -D warnings    # Linting
cargo test --all              # All tests
cargo tarpaulin --out Json    # Code coverage (min 80%)
pmat analyze complexity --max 20   # Cyclomatic complexity
pmat analyze satd --max 0          # Technical debt comments
pmat analyze tdg --min 0.75        # Technical Debt Grade

Testing

# Unit tests (< 1ms each)
cargo test --test unit

# Integration tests (< 100ms each)
cargo test --test integration

# Property-based tests
cargo test --test property --release -- --test-threads=1

# Mutation tests (target: 90%+ mutation kill rate)
cargo mutants --check

Benchmarking

# Run all benchmarks
cargo bench

# Specific benchmark suites
cargo bench --bench dispatch_benchmark
cargo bench --bench throughput_benchmark

# Performance regression check
make bench-check

Building and Running

# Development build
pforge build --debug

# Release build
pforge build --release

# Run server
pforge serve

# Development mode with hot reload
pforge dev --watch

Profiling and Debugging

# Verbose logging
RUST_LOG=pforge=trace pforge serve

# Flamegraph profiling
cargo flamegraph --bin pforge -- serve

# Memory profiling (valgrind)
valgrind --leak-check=full --show-leak-kinds=all target/release/pforge serve

# Heap profiling
cargo run --release --features dhat-heap

Read the full file on GitHub · 353 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 353 lines · 2,679 tokens per session scan A 74fb646800fc

Subscribe to this mod's changes

pforge CLAUDE.md is an instructions file published in the GitHub repository paiml/pforge (3 stars, last pushed 2d ago), licensed MIT. It adds 2,679 tokens to every session, about $0.0134 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.