map-framework
CLAUDE.md155 starsChanged 59 days agoMITView on GitHub
All shipped templates are generated from src/mapify_cli/templates_src/**/*.jinja via make render-templates. Never edit the generated trees directly — edit the .jinja source and re-render. Generated trees (do NOT edit directly): - src/mapify_cli/templates/** - .claude/** - .codex/** - .agents/skills/** To propagate any change to shipped templates: - make render-templates Verification: - Run make check-render (renders and asserts no diff — enforces generated trees match source). - Run pytest tests/test_template_render.py -v (byte-identity golden render tests). When changing shipped skills, keep .claude/skills/skill-rules.json and src/mapify_cli/templates/skills/skill-rules.json…
- Reads credentials
In this repository48 other files it gives its agents.
- .codex/AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- map-architectureSkill
- map-autoSkill
- map-checkSkill
- map-debugSkill
- map-efficientSkill
- map-explainSkill
- map-fastSkill
- map-learnSkill
- map-memory-nowSkill
- map-planSkill
- map-prd-reviewSkill
- map-releaseSkill
- map-resumeSkill
- map-reviewSkill
- map-skill-evalSkill
- map-so-searchSkill
- map-stateSkill
- map-taskSkill
- map-tddSkill
- map-tokenreportSkill
- map-understandSkill
- map-upgradeSkill
- map-wayfindSkill
- map-architectureSkill
- map-autoSkill
- map-checkSkill
- map-debugSkill
- map-efficientSkill
- map-explainSkill
- map-fastSkill
- map-learnSkill
- map-memory-nowSkill
- map-planSkill
- map-prd-reviewSkill
- map-releaseSkill
- map-resumeSkill
- map-reviewSkill
- map-skill-evalSkill
- map-so-searchSkill
- map-stateSkill
- map-taskSkill
- map-tddSkill
- map-tokenreportSkill
- map-understandSkill
- map-upgradeSkill
- map-wayfindSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
17 rules. About 0 are common, 6 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
11
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
- Very specific: line 12
All shipped templates are generated from src/mapify_cli/templates_src//*.jinja via make render-templates.
- Very specific: line 24
Run make check-render (renders and asserts no diff — enforces generated trees match source).
- Very specific: line 25
Run pytest tests/test_template_render.py -v (byte-identity golden render tests).
- Very specific: line 29
When changing shipped skills, keep .claude/skills/skill-rules.json and src/mapify_cli/templates/skills/skill-rules.json explicit about …
- Very specific: line 36
Run uv run mapify init <new-temp-path> --no-git --mcp none and inspect generated .claude/skills/skill-rules.json for shipped metadata …
- Very specific: line 40
Prefer deterministic tooling over “manual review”: run make check (or make lint / make test) after changes.
- Very specific: line 41
When changing scripts, hooks, CLIs, or generated provider surfaces, test both negative/no-op paths and positive paths with realistic inputs.
- Distinctive: line 42
When changing user-facing behavior, also update relevant docs:
- Very specific: line 50
Don't add or expose secrets.
- Very specific: line 54
If Monitor returns valid=false, treat it as a hard stop: fix the issues before proceeding.
- Distinctive: line 55
Do NOT dismiss Monitor feedback as "out of scope" / "separate task".
- Distinctive: line 56
If you're unsure whether fixing it is in scope: ask the user explicitly and wait for a decision.
- Distinctive: line 60
Every error surfaced by ANY tool during a workflow must be fixed before the workflow can complete.
- Distinctive: line 67
Only legitimate skip: the user explicitly approves deferral in the current conversation.
- Distinctive: line 72
CRITICAL: Avoid output buffering issues that cause commands to hang.
- Very specific: line 98
When you pipe through head/tail/less/more, the source command keeps running but output buffers indefinitely.
- Very specific: line 112
When the working directory is already this repository, run git commands without the -C flag:
≈ “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
MAP Framework (mapify-cli) — Agent Instructions
What this repo is
- Purpose:
mapifyis a Python 3.11+ CLI that installs the MAP Framework into a target project (it writes.claude/skill-backed slash surfaces/config and.map/workflow artifacts). - Runtime code:
src/mapify_cli/ - Bundled templates (what users get from
mapify init):src/mapify_cli/templates/ - Dev templates/config used in this repo:
.claude/(keep it in sync withsrc/mapify_cli/templates/)
Critical invariant: template single-source render
All shipped templates are generated from src/mapify_cli/templates_src/**/*.jinja via make render-templates. Never edit the generated trees directly — edit the .jinja source and re-render.
Generated trees (do NOT edit directly):
src/mapify_cli/templates/**.claude/**.codex/**.agents/skills/**
To propagate any change to shipped templates:
make render-templates
Verification:
- Run
make check-render(renders and asserts no diff — enforces generated trees match source). - Run
pytest tests/test_template_render.py -v(byte-identity golden render tests).
Skill catalog invariant
When changing shipped skills, keep .claude/skills/skill-rules.json and src/mapify_cli/templates/skills/skill-rules.json explicit about skillClass:
taskfor manual slash workflows that may call agents, run checks, or write artifacts.referencefor guidance-only skills with no manual invocation, hooks, or runtime effects.hybridonly when reference guidance ships hooks/scripts or artifact side effects; listruntimeEffects.
Validation:
- Run
pytest tests/test_skills.py tests/test_template_render.py -v. - Run
uv run mapify init <new-temp-path> --no-git --mcp noneand inspect generated.claude/skills/skill-rules.jsonfor shipped metadata changes.
How to work in this repo
- Prefer deterministic tooling over “manual review”: run
make check(ormake lint/make test) after changes. - When changing scripts, hooks, CLIs, or generated provider surfaces, test both negative/no-op paths and positive paths with realistic inputs. A hook returning
{}proves only the silent path; also build minimal state/artifacts that should trigger its intended output or side effect. - When changing user-facing behavior, also update relevant docs:
README.md(quick-start)docs/USAGE.md(workflows and CLI usage)docs/ARCHITECTURE.md(system design / agents)
- For releases, follow
RELEASING.mdand updateCHANGELOG.md.
Safety expectations
- Don't add or expose secrets. Avoid reading/writing
.env*and credential/key files.
MAP Workflow Rules
- If Monitor returns
valid=false, treat it as a hard stop: fix the issues before proceeding.- Do NOT dismiss Monitor feedback as "out of scope" / "separate task".
- If you're unsure whether fixing it is in scope: ask the user explicitly and wait for a decision.
Fix every surfaced error — no exceptions
- Every error surfaced by ANY tool during a workflow must be fixed before the workflow can complete. This includes:
make lint,make check,make test,pytest,ruff,mypy- IDE / type-checker diagnostics surfaced in the conversation (Pyright, Pylance, language-server diagnostics)
- Hook output and tool-result diagnostics
- "Pre-existing" is NOT a valid reason to skip. If the diagnostic surfaces in the current run, it is current.
- "Not in the CI gate" is NOT a valid reason to skip. The error is real if any tool reported it.
- "Static-analysis noise" is NOT a category. Either the type system is correct and the code is wrong, or the annotation needs fixing — pick one and fix it.
- Only legitimate skip: the user explicitly approves deferral in the current conversation. Document the deferral in writing.
- Any error encountered while operating the MAP Framework itself must be fixed immediately, in the same change. This covers the framework's own runtime — a hook that crashes or false-positives, a
.map/scripts/runner or gate that errors or mis-reports, amapifyCLI traceback, a render/validator/blueprint failure, a brokenTask/agent dispatch. When you hit one mid-task: STOP, find the root cause, and fix it before continuing the original work. Do NOT work around it, do NOT defer it as "unrelated", do NOT note-and-move-on past a broken tool. If the fix is genuinely out of scope or risky, stop and ask the user — never silently continue past a malfunctioning framework component. (Errors raised by an external plugin/hook NOT shipped by this repo are out of scope here; say so and route them to the user.)
Bash Command Guidelines
CRITICAL: Avoid output buffering issues that cause commands to hang.
❌ DO NOT use these patterns:
command | head -n X # Causes buffering, output hangs
command | tail -n X # Causes buffering, output hangs
command | less # Interactive, causes issues
command | more # Interactive, causes issues✅ DO use these patterns instead:
# Use command-specific flags
git log -n 10 # Not: git log | head -10
git log --max-count=10
# Let commands complete fully
pytest # Don't truncate
make test # Don't truncate
# Read files directly
head -n 10 logfile.txt # Direct file read is OK
cat file.txt # Then process in memoryWhy this matters:
When you pipe through head/tail/less/more, the source command keeps running but output buffers indefinitely. This makes commands appear "hung" when they're actually waiting for the pipe to complete.
Exception: Filtering pipes are OK (grep, awk, sed) because they process all input.
Never pipe a captured variable through echo
zsh's builtin echo interprets backslash escapes, so piping echo "$JSON" into jq
turns the \n inside JSON string values into raw control bytes and jq aborts — inside
$(...) the failure is swallowed and the variable lands empty. Use
printf '%s' "$VAR" | jq (or printf '%s\n' when a while read loop consumes it).
Enforced by tests/test_shell_json_pipes.py.
Git commands: do NOT use -C when already in the repo
When the working directory is already this repository, run git commands without the -C flag:
# ✅ Correct (working directory is already the repo):
git status
git diff
git log -n 5
# ❌ Wrong (redundant -C triggers permission prompts):
git -C /path/to/map-framework status
git -C /path/to/map-framework diffFull guidelines: .claude/references/bash-guidelines.md
Progressive disclosure pointers
- Architecture deep dive:
docs/ARCHITECTURE.md - Usage/workflows:
docs/USAGE.md - Release process:
RELEASING.md
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.

