Charter: Instructions file for Claude Code

CLAUDE.md

Charter CLAUDE.md is an instructions file for Claude Code from longyunfeigu/Charter. It costs 827 tokens per session, scanned A, original, MIT.

Project instructions for Charter, a desktop development environment built with Electron, React, TypeScript, and Monaco.

In plain words
What is it for?
Guiding work across Charter’s milestones, agent runtime, renderer, editor, acceptance tests, architecture decisions, and release requirements.
Why use it?
They define the required architecture, source documents, security boundaries, and completion criteria so implementation stays aligned with the product specification.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md.

This is longyunfeigu/Charter's own configuration. It tells Claude Code how to work on Charter itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Charter configures →

Reuse

Borrowing it

Nothing to install: this file belongs to longyunfeigu/Charter. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/longyunfeigu/Charter/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/longyunfeigu/Charter

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Charter CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/longyunfeigu/charter/claude-md.svg)](https://agentmods.dev/instructions/longyunfeigu/charter/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/longyunfeigu/charter/claude-md"><img src="https://agentmods.dev/badge/instructions/longyunfeigu/charter/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 827 This file is loaded in full into every session.
When invoked 827 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00827 $0.00827
Opus 5 $0.00413 $0.00413
Sonnet 5 $0.00165 $0.00165
Haiku 4.5 $0.00083 $0.00083

Measured 8d ago against content hash d44ce7b47128, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

Charter 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 8d 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 · 66 lines

How it starts

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

CLAUDE.md — Pi-powered Agentic IDE

Mission

Build the complete V1.0 desktop product defined in docs/PRODUCT_ENGINEERING_SPEC.md. This is not a prototype. Do not stop after the Electron shell, editor, or read-only Pi integration. Completion requires all 12 milestones and all release gates.

Source of truth

  1. docs/PRODUCT_ENGINEERING_SPEC.md
  2. docs/UX_PIVOT_SPEC.md — shell/branding layer (ADR-0004): dual-form "Charter" supersedes spec §4 entry/branding; engine spec unchanged
  3. docs/IMPLEMENTATION_BACKLOG.md
  4. Acceptance tests and state-machine invariants
  5. ADRs in docs/adr/ and docs/DECISIONS.md

When requirements conflict, acceptance criteria take precedence. Record interpretations in an ADR; do not silently remove scope.

Non-negotiable architecture

  • Electron + React + TypeScript + Monaco.
  • Pi runs outside the renderer in an agent utility/child process.
  • Only packages/agent-runtime-pi may import Pi packages.
  • UI/domain code depends on the product AgentRuntime and AgentEvent contracts.
  • Do not copy Pi source into this repository. Pin the SDK exactly.
  • Renderer: nodeIntegration=false, contextIsolation=true, sandbox=true.
  • No generic IPC bridge. Every channel has a versioned runtime schema.
  • Pi never gets unrestricted filesystem/shell access. All tools go through Tool Gateway and Permission Engine.
  • File changes use revision/hash checks, snapshots, atomic writes and conflict handling.
  • Agent completion means REVIEW_READY, never automatic ACCEPTED — except the user-opt-in Full mode (ADR-0012): system auto-accept after completion, with verification-failure/merge-conflict fallbacks to review and post-accept rollback.

Working protocol

  1. Read the complete specification and backlog before coding.
  2. Work milestone by milestone and dependency order.
  3. Keep the application runnable after every task.
  4. For each task: implement happy path, failure/cancel path, tests, logs, docs, and migration if needed.
  5. Run npm run check and relevant tests before marking DONE.
  6. Mark VERIFIED only after the milestone exit test passes.
  7. Update docs/IMPLEMENTATION_STATUS.md after each meaningful change.
  8. After adding or changing any user-visible feature: update README.md and README.zh-CN.md in the same change set, then sync the marketing site at ~/git/charter-site — edit public/index.html and public/zh/index.html in lockstep, follow that repo's CLAUDE.md brand rules (no internal names, no overstated status), commit and push main (Cloudflare Pages auto-deploys to https://charter-15n.pages.dev).
  9. Add an ADR for dependency changes, architecture deviations, security tradeoffs or Pi patches.
  10. Never use static fake UI in a completed feature. Mock Runtime is allowed only as a deterministic backend for tests/dev.
  11. Never bypass an acceptance failure by weakening the test unless the specification is formally changed.

Read the full file on GitHub · 66 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. 8d ago First seen · 66 lines · 827 tokens per session scan A d44ce7b47128

Subscribe to this mod's changes

Charter CLAUDE.md is an instructions file published in the GitHub repository longyunfeigu/Charter (10 stars, last pushed 18d ago), licensed MIT. It adds 827 tokens to every session, about $0.0041 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.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens