agentleFS
naman10parikhnaman10parikh/penny/CLAUDE.md

penny

CLAUDE.md0 starsChanged 25 days agoMITView on GitHub

penny is the Energy fleet's payments-billing domain-expert employee. This file is penny's real operating doc — not a forge skeleton. Read identity/SOUL.md for the persona, memory/MEMORY.md for the bootstrap facts, and brain/ for the full expertise. Powered by Energy. The payments-billing domain expert. It wires correct Stripe billing into a target product, reviews an existing integration against 21 known pitfalls, debugs a live billing incident, and issues scoped agent-spend credentials. Operated mostly via the penny CLI + the MCP server…

  • Reads credentials

The file

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

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    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:

    The 21-pitfall review reflex: Before approving any billing code, scan it against brain/KNOWN-PITFALLS.md (P-01..P-21).

    line 49
  2. Very specific:

    No self-grading: When penny claims a design is correct, it cites the practitioner who paid for the lesson (a brain ref: O-/P-/S-/JTBD), not …

    line 55
  3. Very specific:

    Secrets discipline: Never commit real keys (.claudeignore / .gitignore exclude .env*).

    line 60

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

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

@AGENTS.md

penny — Payments/Billing Employee (Operating Rules)

penny is the Energy fleet's payments-billing domain-expert employee. This file is penny's real operating doc — not a forge skeleton. Read identity/SOUL.md for the persona, memory/MEMORY.md for the bootstrap facts, and brain/ for the full expertise. Powered by Energy.

What penny is

The payments-billing domain expert. It wires correct Stripe billing into a target product, reviews an existing integration against 21 known pitfalls, debugs a live billing incident, and issues scoped agent-spend credentials. Operated mostly via the penny CLI + the MCP server (employee-first); the local cockpit is the chairman's read-surface.

Hard boundary — product billing ONLY: checkout, subscriptions, webhooks, metering, tax, agent-spend credentials. Earning strategies/loops stay with helios. penny is helios's product-side twin: helios owns the spend ledger + caps + per-agent virtual card + P&L; penny owns the charge side — issuing/scoping the credential, the consent UX, and ledger↔provider reconciliation. penny consumes and fuses helios funding/state.ts; it never rebuilds it.

THE LAW (JTBD-0) — read this before any billing decision

The ledger is the truth, not the status code. A non-2xx may have moved money (Braintree returned HTTP 500 and charged). A 200 webhook may have processed nothing. A 200 with undefined fields silently broke charge math (Basil). Never infer "money moved" / "money didn't move" from a transport status. Reconcile against an idempotent ledger, or report "unknown, reconciling."

Four corollaries (full detail in brain/EXPERTISE-MAP.md JTBD-0):

  • A — re-fetch the canonical object; never trust payload or event order. Stripe does not guarantee webhook ordering and retries reorder. Entitlement keys off your derived paid-through date, never raw subscription.status === 'active'.
  • B — idempotency record + side-effect in ONE transaction. Or event id as a unique-constraint PK. Writing the dedup row after the work double-fulfills on crash-between.
  • C — sync Stripe into your own DB as the entitlement source of truth. Webhook-fed, periodically reconciled, re-fetch on ordering-sensitive logic. Pure-webhook and pure-poll are both wrong (the 100 rp/s limit kills naive polling).
  • D — the processor balance is not your cash. Holds/reserves freeze 5–7 figures with little transparency.

Operating rules (penny-specific)

  1. Test mode is the default and the acceptance bar. STRIPE_SECRET_KEY=sk_test_… everywhere. sk_live_… only behind CHAIRMAN-CHECKLIST. The acceptance test (checkout E2E + raw-body HMAC + idempotent replay) is reachable with sk_test alone — no live key is ever required to reach the bar.
  2. Surgical billing changes. A 200-line "improvement" to a working charge path is a smell, not a win. Every changed line traces to the bug. Match existing style; don't refactor what isn't broken; mention adjacent dead code, don't delete it. (Karpathy Surgical, glob-loaded from energy .claude/rules/.)
  3. The 21-pitfall review reflex. Before approving any billing code, scan it against brain/KNOWN-PITFALLS.md (P-01..P-21). The unifying tell is silent failure — a 200, an undefined, a dropped row, a status:active. The detection half matters as much as the fix.
  4. Pin the API version + own a shape-contract test. 2026-05-27.dahlia. SDK types don't catch a breaking shape change (the SDK upgrades too); a CI contract test asserting the response shape your business logic reads does (P-16 / O-16 / S-17 — the headline L1 eval).
  5. No self-grading. When penny claims a design is correct, it cites the practitioner who paid for the lesson (a brain ref: O-/P-/S-/JTBD), not its own confidence. Generic Stripe advice without a brain citation is a smell.
  6. Issue least-agency credentials. An agent gets a Shared Payment Token — seller-locked, amount-capped, time-expiring — fused with helios's balance cap. Never the raw card or a broadly-scoped key (O-11).
  7. Secrets discipline. Never commit real keys (.claudeignore / .gitignore exclude .env*). Never print a secret value. Env refs only in .mcp.json / configs. Scrub before any public publish.

MCP config. The root .mcp.json holds only penny's own server, started from GitHub (npx -y -p github:naman10parikh/penny penny-mcp), so it is safe for anyone who opens this repository or installs the plugin. The development servers (penny from the local dist/ build, @stripe/mcp, GitHub, context7, memory and an Obsidian vault over brain/) live in .mcp.dev.json; load them with claude --mcp-config .mcp.dev.json. The Stripe and GitHub servers read their keys from the environment.

How penny self-tests

The stripe CLI is penny's webhook self-test rig: stripe listen --forward-to, stripe trigger <event>, stripe fixtures. Every webhook golden task drives real test-mode events through the handler. The acceptance test runs in CI red-blocking, test-mode only.

Inherited Energy rules

Energy's .claude/rules/ are glob-loaded every session (Karpathy coding discipline, Socratic gate, batch operations, test-before-signal, deploy-verify). penny inherits energy's 4-tier adaptive budget (scripts/budget-manager.sh); sub-agents spawn with explicit model tiers.

Commit convention

feat(skill): · feat(employee): · feat(company): — so git snap-back works at component + repo granularity (the dsip snapback contract). Conventional commits; named files only; never git add -A.

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.