eklavya
CLAUDE.md29 starsChanged 22 days agoMITView on GitHub
Eklavya teaches the concepts behind agent-written code and keeps local project memory. This is the contributor contract for agents working in this repository. Read the nearest nested CLAUDE.md before editing mcp/, hooks/, cli/, skills/ or web/. A code change is complete only when the manual and a README change in the same PR. There is no exemption. Change the landing page (web/public/) only when explicitly asked to. .github/scripts/check-docs-sync.sh fails the PR otherwise, and its header lists what counts as product…
In this repository21 other files it gives its agents.
- cli/CLAUDE.mdCLAUDE.md
- eval/CLAUDE.mdCLAUDE.md
- hooks/CLAUDE.mdCLAUDE.md
- mcp/CLAUDE.mdCLAUDE.md
- skills/CLAUDE.mdCLAUDE.md
- web/CLAUDE.mdCLAUDE.md
- eklavya-dashboardSkill
- eklavya-designSkill
- verify-docsSkill
- gateSkill
- learnSkill
- levelSkill
- memorySkill
- modeSkill
- packSkill
- progressSkill
- quizSkill
- setupSkill
- skipSkill
- toolpruneSkill
- tutorSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
13 rules. About 0 are common, 5 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 5
Read the nearest nested CLAUDE.md before editing mcp/, hooks/, cli/, skills/ or web/.
- Very specific: line 38
Read the source before documenting names, defaults, limits, paths or output.
- Distinctive: line 59
Keep the README a short introduction and install link.
- Very specific: line 70
Run the checks appropriate to the change in CONTRIBUTING.md.
- Distinctive: line 80
Verify commands, config examples and output against their implementation.
- Distinctive: line 81
Search for renamed terms across the full repository, excluding dated results.
- Very specific: line 107
Never commit learner databases or anything from ~/.eklavya/.
- Very specific: line 110
Before editing the site, read .claude/skills/eklavya-design/SKILL.md.
- Very specific: line 112
Use semantic color roles from web/public/tokens.css, keyboard-operable controls and shareable dashboard filters.
- Very specific: line 115
Keep the compact #legend section with "The name", "The archer who taught himself" and the bow, arrow and target artwork.
- Very specific: line 118
Keep the GitHub star box visible and its count accurate.
- Distinctive: line 151
When presenting options, recommend one and give its reason and cost.
- Distinctive: line 159
Verify before concluding: inspect the specific population, use a measurement window long enough for the behavior, read callers before …
≈ “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
Working on Eklavya
Eklavya teaches the concepts behind agent-written code and keeps local project
memory. This is the contributor contract for agents working in this repository.
Read the nearest nested CLAUDE.md before editing mcp/, hooks/, cli/,
skills/ or web/.
Repository map
| Path | Responsibility |
mcp/src/ | MCP tools, config, SQLite, scheduling, memory, dashboard and the eklavya CLI (cli.ts) |
mcp/src/hooks/ | Hook implementations and shared helpers; registration lives in hooks/hooks.json |
mcp/src/migrations/, mcp/test/ | Forward-only migrations and runtime tests |
hooks/run.mjs | Cross-platform launcher and background repair of an older runtime |
hooks/panel/ | The quiz side panel: a Claude Code mod (not a command hook), its state contract and its tests; enabled by default, controlled through quiz.panel |
skills/ | Slash commands and the tutor entry point with on-demand references |
user-skill/ | Chat and artifact skills installed to ~/.claude/skills/; never move them into skills/ or they register twice |
agents/ | Tutor and background explainer |
cli/, scripts/ | POSIX git gate, its installer, release version bump |
web/ | Landing page and user manual; Astro build deployed to Firebase |
docs/ | Contributor references and generated runtime architecture |
eval/ | Question, extraction, history, retrieval and performance evaluation; dated results are historical evidence |
CONTRIBUTING.md | Setup, verification, acceptance checks and releases |
.claude/skills/ | Repository design, dashboard and documentation-verification contracts |
Documentation is part of every feature
A code change is complete only when the manual and a README change in the
same PR. There is no exemption. Change the landing page (web/public/) only
when explicitly asked to. .github/scripts/check-docs-sync.sh
fails the PR otherwise, and its header lists what counts as product code. When
the change alters no existing claim on a surface, make a small source-backed
copy or link update where its reader looks for the feature. Keep the home page
lean and put reference material in the manual. Run /verify-docs (.claude/skills/verify-docs/) before
opening the PR; it runs weekly on main as well.
Read the source before documenting names, defaults, limits, paths or output.
mcp/src/config.ts owns configuration; each other claim belongs to the module
that implements it. Existing prose and recalled memory are not evidence.
| Change | Documentation to review |
| Install, repair, updates, removal or host support | Manual installing, installation-options, updates, troubleshooting; root and package README |
| Dials, defaults, scopes or config keys | Manual dials, configuration, installing, faq, memory, migrating; affected command skills; landing introduction and docs links; demo status; the dashboard Settings registry in mcp/src/dashboard.ts |
| Slash commands, CLI or MCP tools | Manual commands, cli, memory; mcp/README.md; relevant skills |
| Hook timing, question planning or grading | Manual first-session, how-it-works, grading-engine, levels-and-tiers; hook and tutor guidance |
| Commit gating | Manual commit-gate; cli/CLAUDE.md; setup skill and contributor acceptance checks |
| Memory, providers, privacy or storage | Manual memory, your-data, migrating, configuration, faq |
| Usage ping fields, counters or website analytics | Manual usage-analytics, your-data, faq; user-skill/eklavya/SKILL.md |
| Packs, seeds or concept graph | Manual packs; command reference and relevant skills; recount any published totals |
| Dashboard or explainer pages | Manual dashboard, commands, configuration; artifact skill and explainer agent |
| Delegation or host hook contracts | docs/parallel-tutoring.md, docs/subagent-policy.md, docs/verified-schemas.md |
web/CLAUDE.md maps every manual page to its exact sources. Add its row and a
sidebar entry whenever adding a page. Update affected diagrams in the same PR;
their labels and branches are claims about the code too.
Keep the README a short introduction and install link. Put ordered tasks in
guides, complete fields and flags in references, and implementation detail in
contributor docs. Use descriptive headings, concrete examples and short sections.
A diagram should clarify sequence or responsibility, have a text explanation,
work on a narrow screen and remain readable in both themes. Document shipped,
verified capabilities. Do not advertise unshipped work: a feature stays out of
web/ until the code exists and ships. Do not imply that a standalone MCP client has Claude
Code's hook-driven learning loop.
Required checks
- Run the checks appropriate to the change in
CONTRIBUTING.md. Isolate tests from real learner state with temporary paths or explicit config: in-process tests that callloadConfig()read the real~/.eklavya/config.json, so they pass locally and fail in CI. Pin the config or pointEKLAVYA_HOMEat a temp directory before calling a test green. CI also enforces 100% coverage across the whole suite; shards passing is not enough. See.claude/rules/coverage.mdfor how to measure it before pushing. - Build
web/when docs or site content changes. Its SEO audit checks built links, anchors and assets; inspect changed layouts at 1280, 900 and 560px in both themes. - Verify commands, config examples and output against their implementation. Search for renamed terms across the full repository, excluding dated results.
- Fill
.github/PULL_REQUEST_TEMPLATE.md. Behavior changes require the live acceptance transcript; tutor changes also require before/after eval evidence. - Report any check not run or claim not verified. Never describe a planned check as completed.
Tests and CI shards
CI runs mcp/test/ in five shards, and .github/scripts/test-shards.json says
which shard runs each file. Adding, renaming or deleting a *.test.ts file
also means updating that manifest in the same PR; an unlisted file fails CI.
mcp/test/CLAUDE.md and .claude/rules/test-shards.md give the steps.
Runtime and design invariants
- Hooks fail open and exit 0 on every failure path. They must also have bounded stdin reads and avoid waiting for inference.
- Configuration has two interfaces, the CLI (
eklavya config) and the dashboard's Settings workflow, at user and project scope. Both write through one shared function; a config key, scope rule or validation change lands in both in the same PR. A new key goes in the Settings registry or its explicit CLI-only list, ordashboard.test.tsfails. - Memory and quizzes have independent switches. Memory evidence cannot change mastery; only an assessed answer can.
- Migrations are forward-only; update the schema expectations in
mcp/test/migrate.test.tswith each migration. - Never commit learner databases or anything from
~/.eklavya/. - Conventional commits drive releases:
feat:andfix:release;docs:andchore:do not. Keep package/plugin versions aligned through release tooling. - Before editing the site, read
.claude/skills/eklavya-design/SKILL.md; before editing the dashboard, also read.claude/skills/eklavya-dashboard/SKILL.md. Use semantic color roles fromweb/public/tokens.css, keyboard-operable controls and shareable dashboard filters. Keep the home page lean, with the Archer Cloak mascot on a dark hero and the launch film (a native video, no autoplay) at/#demo. Keep the compact#legendsection with "The name", "The archer who taught himself" and the bow, arrow and target artwork. Its decorative animation runs once when the scene enters view and stays static under reduced motion. Keep the GitHub star box visible and its count accurate./demo/is a legacy redirect to the home demo.
Generated runtime diagram
Edit docs/eklavya-runtime.architecture.json, never the generated HTML. Set
meta.repository.revision to the commit whose code supplied the evidence, then
run the installed archify skill (adjust the skill path if installed elsewhere):
cd ~/.claude/skills/archify
node bin/archify.mjs deliver architecture <repo>/docs/eklavya-runtime.architecture.json \
<repo>/docs/eklavya-runtime.html --quality showcase --repo-root <repo> --json
node bin/archify.mjs visual-check <repo>/docs/eklavya-runtime.html --jsonRequire all delivery checks with no errors/warnings and every visual viewport
passing. Remove generated PNG/JSON inspection sidecars; they are evidence, not
deliverables. The website copies this artifact during its build. Generated
ignored files such as that copy get talea-regenerable in the root
.gitattributes, so worktree cleanup can remove them. Small manual
flows use DocFlow.astro; they do not require regenerating the architecture.
Communicating with the maintainer
These preferences apply to chat, not to documents or code comments.
- Lead with the answer in plain English. Group topics under headings, use short bullets, keep each topic within ten lines, and omit investigation narration.
- Close with
What I need from you:followed by actions orNothing. Name unfinished work and skipped checks explicitly. - Explain what something does before its implementation. Use a concrete example for abstract ideas; keep gotchas visible. Corrections are one line, first.
- When presenting options, recommend one and give its reason and cost. If a short-term patch differs from the proper fix, explain both, recommend today's action, and say whether the remaining work needs an issue.
- Make each decision understandable in place. Do not use issue numbers or references to earlier options as substitutes for explaining the fact.
- For bug explanations before implementation: issue, solution, user impact, concrete example, changes needed, recommendation. Once agreed, implement.
Verify before concluding: inspect the specific population, use a measurement window long enough for the behavior, read callers before claiming a guard is missing, and inspect the whole diff. A sample cannot prove absence. Check whether a defect is your own uncommitted change. Falsify your explanation where possible; if evidence is incomplete, say what would settle it.
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.

