Meta_Kim
CLAUDE.md274 starsChanged 56 days agoApache-2.0View on GitHub
Claude Code is one runtime projection of Meta_Kim. It is important, but it is not the canonical source layer by itself. If you only keep six rules in mind: Meta_Kim is not Claude-only logic. a cross-runtime intent-amplification system projected into Claude Code, Codex, OpenClaw, and Cursor, with canonical/ as the neutral source layer. In Meta_Kim, meta means the smallest governable unit that supports intent amplification. A valid meta unit: Claude Code is the most hook-rich runtime projection. It contributes: Claude-specific…
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
35 rules. About 0 are common, 22 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈22
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
If you only keep six rules in mind:
- Very specific: line 12
When meta-theory is active, the main Claude thread dispatches.
- Distinctive: line 31
does not silently absorb unrelated work
- Distinctive: line 58
Treat these as generated or runtime-local unless the task explicitly targets Claude wiring:
- Distinctive: line 73
When trees disagree, update the canonical source and run sync.
- Very specific: line 82
If a governed run proves a current-project Agent, Skill, or Command must be created or iterated, write or copy it into the runtime-native …
- Very specific: line 87
Treat canonical source, install projection, runtime-sedimented project copies, and local/user configuration as different ownership classes.
- Very specific: line 91
Do not use arbitrary line counts as architecture gates.
- Very specific: line 95
When meta-theory is activated by /meta-theory, skill auto-detection, or an equivalent trigger, the 8-stage spine is mandatory.
- Distinctive: line 115
If a hook blocks you, follow the dispatch protocol and return to the responsible stage.
- Distinctive: line 139
Do not start by hardcoding an agent name.
- Distinctive: line 141
Use this search order:
- Distinctive: line 172
Before execution, create a business-flow blueprint for executable work.
- Distinctive: line 197
Keep three names separate:
- Distinctive: line 208
Do not expose random personal nicknames as the primary agent name.
- Distinctive: line 209
Prefer short role names over long task sentences.
- Very specific: line 210
Do not put concrete work items into roleDisplayName.
- Very specific: line 211
If one owner runs multiple parallel instances, record shard boundaries, dependencies, parallelGroup, mergeOwner, and collision rules.
- Distinctive: line 223
Use the spine to govern execution.
- Distinctive: line 225
Do not claim public-ready status until all of these are true:
- Very specific: line 253
When the task is not a pure query, use Meta_Kim's first-party planning-continuity runtime to create or resume persistent planning state …
- Distinctive: line 316
document canonical installs through this repo
- Distinctive: line 317
avoid duplicate marketplace copies under different names unless explicitly required
- Distinctive: line 318
use stable names consistently across agents, skills, mirrors, and setup scripts
- Distinctive: line 319
prefer capability discovery over hardcoded skill assumptions
- Distinctive: line 325
Use it as a query-first navigation index, not as compressed context or an infallible truth source:
- Very specific: line 329
if graphify-out/wiki/index.md exists, use it for broad navigation
- Distinctive: line 330
treat graph results as candidate file anchors, then verify route-changing claims against source files
- Distinctive: line 331
treat ambiguous graph nodes as uncertain dependencies requiring manual verification, and fall back to targeted repository search when graph …
- Very specific: line 333
after modifying code files, run npm run meta:graphify:rebuild
- Distinctive: line 344
After changing canonical prompts, skills, hooks, contracts, or runtime-facing docs:
- Distinctive: line 352
Use supporting commands as needed:
- Very specific: line 400
If graphify-out/wiki/index.md exists, use it for broad navigation instead of raw source browsing.
- Very specific: line 401
Read graphify-out/GRAPH_REPORT.md only for broad architecture review or when query/path/explain do not surface enough context.
- Very specific: line 402
After modifying code, run graphify update .
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 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
Meta_Kim for Claude Code
Claude Code is one runtime projection of Meta_Kim. It is important, but it is not the canonical source layer by itself.
Fast Read
If you only keep six rules in mind:
meta-wardenis the public front door; the other meta agents are backstage specialists.canonical/agents/,canonical/skills/meta-theory/,canonical/runtime-assets/,config/contracts/, andconfig/capability-index/are the durable sources of truth..claude/is a runtime projection generated from canonical assets. It is gitignored — runnpm run meta:syncafter clone to generate hooks/agents/skills locally. Sync it instead of hand-forking it.- When
meta-theoryis active, the main Claude thread dispatches; it does not execute complex work directly. - Critical, Fetch, Thinking, and Review must make the run executable before mutation; hooks are final safeguards, not the primary design path.
- Capability-first dispatch is mechanically enforced in Claude Code via the
enforce-agent-dispatch.mjsPreToolUse hook (deny payload). Codex and Cursor v1.7+ use the same projected hook; OpenClaw remains declarative. The current matrix lives inAGENTS.mdunder Mechanical Enforcement. - User-visible run-scoped worker labels may be coarse English role-family names such as
frontend,backend, ortest, but Meta_Kim does not project those execution labels as durable agents. Durable governance files stay with the ninemeta-*owners.
What This Repository Is
Meta_Kim is not Claude-only logic.
It is:
a cross-runtime intent-amplification system projected into Claude Code, Codex, OpenClaw, and Cursor, with canonical/ as the neutral source layer.
In Meta_Kim, meta means the smallest governable unit that supports intent amplification. A valid meta unit:
- owns one responsibility class
- defines its refusal boundary
- can be reviewed independently
- can be replaced or rolled back
- does not silently absorb unrelated work
Claude Code's Role
Claude Code is the most hook-rich runtime projection. It contributes:
- project entry rules through
CLAUDE.md - custom-agent mirrors under
.claude/agents/ - the portable
meta-theoryskill under.claude/skills/meta-theory/ - hook enforcement under
.claude/hooks/ - MCP wiring through
.mcp.json - capability-index mirrors under
.claude/capability-index/
Claude-specific details matter, but they should still be derived from the shared architecture whenever possible.
Canonical Vs Runtime Files
Edit these for long-term behavior:
canonical/agents/*.mdcanonical/skills/meta-theory/SKILL.mdcanonical/skills/meta-theory/references/*.mdcanonical/runtime-assets/claude/*canonical/runtime-assets/shared/*config/contracts/config/capability-index/
Treat these as generated or runtime-local unless the task explicitly targets Claude wiring:
.claude/agents/*.md.claude/skills/meta-theory/.claude/hooks/*.mjs.claude/settings.json.mcp.json.claude/capability-index/
Other runtime mirrors are also projections of the same canonical layer:
.codex/.cursor/openclaw/
When trees disagree, update the canonical source and run sync. Do not maintain parallel prompt forks.
Install Scope And Runtime Sedimentation
Install scope and governed runtime sedimentation are separate contracts:
setup.mjsinstall/update offers an interactiveglobalorprojectchoice and accepts--scope global|projectfor non-interactive use. Inglobal_only, install sync keeps only the dependency-closed Claude/Codex/Cursor project Hook entry package and does not materialize durable project agents, skills, commands, capability indexes, MCP entries, Codex config examples, or OpenClaw project projections.- Distribution scope does not erase existing project topology. A normal
globalinstall/update automatically refreshes only current, explicit, or saved directories with a valid project-bootstrap manifest, using the configured project merge/delta strategy. No valid project state means no project copy and no extra confirmation. Cleanup is a separate explicit operation and never runs as a normal global install/update side effect. - Under
project_bootstrap_merge_delta, bootstrap-manifest-owned generated projections are backed up inside the transaction and replaced with the current package version; shared JSON and managed text blocks merge instead. Unknown user files andruntime_sedimented_project_copycapabilities are outside that replacement boundary and remain preserved. - If a governed run proves a current-project Agent, Skill, or Command must be created or iterated, write or copy it into the runtime-native project directory. Record that asset as
runtime_sedimented_project_copy; later global dependency or install projection updates must preserve it. - A global search hit that already fits and needs no iteration stays global: use
use_global_directlyand do not copy it into the project. Only project-specific iteration usescopy_to_project_for_modification; a real project gap usescreate_project_local_capability.
The install manifest records install-generated files as install_projection, retains records for runtimes not selected during the current update, and stores exact hash plus size. The separate .meta-kim/state/default/project-capabilities.json manifest owns runtime_sedimented_project_copy / preserve_project_copy Agent, Skill, and Command paths. Project bootstrap plan, write, stale cleanup, and explicit cleanup all read that ownership before mutation. Unknown and runtime-sedimented files are preserved; drift in bootstrap-manifest-owned generated projections follows the configured merge/delta replacement-and-backup policy. Manifest recording or flush failure cannot be presented as successful install/update.
Treat canonical source, install projection, runtime-sedimented project copies, and local/user configuration as different ownership classes. For merged configuration, remove only Meta_Kim-owned fragments; never infer whole-file ownership from its location.
Install/update release claims require real packed-product evidence: pack the npm artifact, install that artifact into an isolated location, then run the packed CLI install and update paths. Repository-source execution alone is not packed CLI truth.
Do not use arbitrary line counts as architecture gates. Verify CLI entrypoint responsibility, dependency direction, module boundaries, and behavior. setup.mjs remains a façade; new domain behavior belongs in focused modules with focused tests.
Meta-Theory Dispatch Is Mandatory
When meta-theory is activated by /meta-theory, skill auto-detection, or an equivalent trigger, the 8-stage spine is mandatory.
The main Claude thread is the dispatcher:
- it scopes the request
- it performs capability discovery
- it maps lanes, owners, dependencies, and merge strategy
- it dispatches execution with the
Agenttool - it reviews, verifies, and synthesizes
The main thread is not the all-in-one executor for complex work.
Hard rules:
- Analysis, code changes, design work, review, and verification should be owned by dispatched agents when the task is non-trivial.
- Critical locks the actual user outcome, value, success criteria, scope, permissions, and non-goals before the route expands.
- Fetch gathers evidence and capability facts that change route, risk, owner, scope, acceptance, or verification.
- Thinking chooses owners, lanes, dependencies, work orders, review owner, verification owner, and rollback path before mutation.
- Review checks Critical, Fetch, and Thinking readiness before output polish; it is not a late rescue stage for missing design.
- The PreToolUse hook
enforce-agent-dispatch.mjscan block execution tools when spine state is active and no agent has been dispatched. - If a hook blocks you, follow the dispatch protocol and return to the responsible stage. Do not work around it.
- A "simple task" is not an excuse to bypass governance when the task touches multiple files, multiple capabilities, or cross-runtime behavior.
Dispatch Flow
For governed work, Claude Code should follow:
Critical -> Fetch -> Thinking -> Execution -> Review -> Meta-Review -> Verification -> EvolutionPractical meaning:
Critical: clarify the actual request and blockers.Fetch: discover existing agents, skills, MCP tools, commands, memory, and graph context.Thinking: map business lanes, owners, dependencies, parallel groups, merge owner, review owner, and verification owner.Execution: dispatch bounded work throughAgent.Review: inspect outputs against quality and boundary rules.Meta-Review: check whether the review standard itself was adequate when risk is high.Verification: run fresh checks against the final state.Evolution: write back reusable patterns through Warden-gated evolution, or explicitly choose no writeback.
Capability-First Rule
Do not start by hardcoding an agent name. Start by defining the needed capability.
Use this search order:
Need capability
-> Search config/capability-index/
-> Search runtime capability-index mirrors
-> Search local runtime inventory
-> Search available skills, MCP tools, commands, and graph context
-> Choose best owner by boundary fit
-> Dispatch with explicit scope and verification evidenceNamed dispatch without a discovery step is a design shortcut, not the canonical method.
Mechanical Enforcement
Capability-first is no longer only a prompt-level discipline. In Claude Code it is enforced by the PreToolUse hook enforce-agent-dispatch.mjs (canonical source: canonical/runtime-assets/claude/hooks/enforce-agent-dispatch.mjs).
Behavior:
- Active stages:
execution,review,meta_review,verification,evolution. The hook denies anyAgentdispatch in these stages unlessfetchRecord.capabilitySearchPerformed === trueis present in spine state. - Exempt stages:
critical,fetch,thinking. Discovery happens here, so the gate does not fire. - Override env var:
META_KIM_CAPABILITY_GATE. Values:progressive,block,warn(stderr warning only),off(gate disabled). Default:progressive(warn for the grace window, then block);blockrestores immediate deny. Usewarnoroffonly for debugging — production runs should keepprogressive(orblockfor strict environments). - Other env vars:
META_KIM_HOOK_RUNTIME(one ofclaude/codex/cursor) selects the deny payload schema when the same hook is projected to a different runtime.
The same hook script is now projected to Codex (.codex/hooks/) and Cursor v1.7+ (.cursor/hooks/) via sync-runtimes.mjs. AGENTS.md is the current source for the four-runtime mechanical-deny matrix and OpenClaw's declarative-only gap.
Hook enforcement is a final safety boundary after Critical, Fetch, Thinking, and Review have done their work. Repeated hook blocks mean the upstream design or packet state is incomplete; return to the earliest broken stage instead of retrying the same action.
Business Flow Before Execution
Before execution, create a business-flow blueprint for executable work. For a web product, for example, the blueprint may include:
- product direction
- UX flow
- UI system
- frontend
- backend
- database
- auth / security
- motion / interaction polish
- tests / QA
- release / install path
- feedback and evolution
The blueprint does not need every lane for every task, but omissions should be deliberate. It should state:
- what capability is required
- which existing agent / skill / tool was found
- whether the owner is reused, upgraded, or newly created
- what can run in parallel
- who owns merge and conflict resolution
- what evidence will prove the result is done
Agent Display Names
Keep three names separate:
ownerAgent: real governance or execution owner, for examplemeta-conductororfrontend-developerroleDisplayName: short user-visible English business role family, for examplefrontend,backend, ortestruntimeInstanceAlias: incidental runtime nickname, if Claude or another host assigns one
Rules:
roleDisplayNameis a run-scoped task-packet label, not a durable agent identity and not a projection file.- Cross-runtime handoffs use one
ownerBindingMode: Codex may usenative_custom_agentonly for a validated Codex TOML owner selected through a schema-confirmedagent_type; otherwise it usesrun_scoped_owner_contract. A runtime alias or task label never substitutes forownerAgent. - User-visible status keeps Agent, Skill, Command, MCP, runtime-tool, and Hook provider/source, selected state, actual state, and next action; it does not reduce the handoff to an Agent-only sentence.
- Do not expose random personal nicknames as the primary agent name.
- Prefer short role names over long task sentences.
- Do not put concrete work items into
roleDisplayName; when the same role has parallel shards, keep the same coarse role name and put shard scope inroleInstanceId/shardScope. - If one owner runs multiple parallel instances, record shard boundaries, dependencies,
parallelGroup,mergeOwner, and collision rules.
The Business Workflow Contract
The 8-stage spine is not the same thing as the department workflow contract.
The department workflow is:
direction -> planning -> execution -> review -> meta_review -> revision -> verify -> summary -> feedback -> evolve -> mirrorUse the spine to govern execution. Use the department workflow to package the run, close deliverables, and decide whether a result is display-ready.
Do not claim public-ready status until all of these are true:
- verification passed
- summary is closed
- a single primary deliverable was maintained
- the deliverable chain is closed
- consolidated deliverable evidence exists
Hidden Governance Packets
A governed run should leave audit-ready structure. Important packets include:
taskClassificationcardPlanPacketbusinessFlowBlueprintPacketagentBlueprintPacketdispatchEnvelopePacketworkerTaskPacketreviewPacketrevisionResponsesverificationResultssummaryPacketevolutionWritebackPacket
These packets are not UI decoration. They are how the system avoids pretending unfinished work is complete.
Planning Files
When the task is not a pure query, use Meta_Kim's first-party planning-continuity runtime to create or resume persistent planning state during Thinking:
task_plan.mdfindings.mdprogress.md
These files supplement protocol packets. They do not replace dispatch envelopes, review findings, or verification evidence.
The Nine Meta Agents
meta-warden: coordination, arbitration, final synthesis, Warden gatemeta-conductor: workflow, stage sequencing, business-flow blueprint, rhythm controlmeta-genesis:SOUL.md, identity, persona, prompt architecturemeta-artisan: skill / MCP / tool fit, capability loadoutmeta-sentinel: safety boundaries, permissions, hooks, rollbackmeta-librarian: memory, continuity, context policymeta-prism: quality review, drift detection, anti-slop reviewmeta-scout: external capability discovery and evaluationmeta-chrysalis: evolution signal aggregation and writeback coordination through Warden's gate
Meta agents govern. They do not become generic implementation workers when a better execution specialist exists.
Claude Code Hooks
Claude Code has project hooks generated from canonical runtime assets. The expected hook commands are:
node .claude/hooks/graphify-context.mjsnode .claude/hooks/enforce-agent-dispatch.mjsnode .claude/hooks/activate-meta-theory-spine.mjsnode .claude/hooks/post-format.mjsnode .claude/hooks/post-typecheck.mjsnode .claude/hooks/post-console-log-warn.mjsnode .claude/hooks/subagent-context.mjsnode .claude/hooks/stop-compaction.mjsnode .claude/hooks/stop-console-log-audit.mjsnode .claude/hooks/stop-completion-guard.mjsnode .claude/hooks/stop-spine-cleanup.mjs
They cover:
- meta-theory spine activation
- graph/context preload
- capability-first dispatch enforcement and dangerous command blocking
- formatting and typecheck follow-ups
- console logging warnings
- subagent graph/context hints
- session-end compaction
- session-end console audit
- optional premature-completion guard
- spine-state cleanup
Shared hook dependencies such as project-root.mjs, bash-readonly-whitelist.mjs, spine-state.mjs, hook-i18n.mjs, skip-reminder.mjs, and utils.mjs are copied as support files. They are not direct .claude/settings.json hook commands. activate-meta-theory-spine.mjs and project-root.mjs are one runtime dependency set and must always be projected together.
The activation hook never treats a bare cwd as a project. It prefers a valid CLAUDE_PROJECT_DIR, then walks up from cwd for .git or .meta-kim/state/default/project-bootstrap.json, and only uses an absolute marker-backed runtime payload root when cwd is not already a recognized project. The resolved root is passed explicitly to post-copy; if no legitimate root exists, both spine-state and post-copy projection skip without writing.
Hook behavior differs across runtimes. Do not assume Claude's SubagentStart-style behavior exists in Codex, OpenClaw, or Cursor unless the runtime adapter explicitly verifies it.
Third-Party Meta Skills
Packs such as findskill, gstack, superpowers, and cli-anything remain installable through node setup.mjs and supporting dependency commands. The absorbed planning-with-files dependency is retired from install and execution routes; normal planning continuity is provided only by Meta_Kim's first-party runtime.
Repository policy:
- document canonical installs through this repo
- avoid duplicate marketplace copies under different names unless explicitly required
- use stable names consistently across agents, skills, mirrors, and setup scripts
- prefer capability discovery over hardcoded skill assumptions
Graphify
This repo keeps a knowledge graph under graphify-out/.
Use it as a query-first navigation index, not as compressed context or an infallible truth source:
- for focused questions, start with
graphify query "<question>" --budget 1000,graphify path, orgraphify explain - for broad architecture review, use
graphify-out/GRAPH_REPORT.mdonly as orientation - if
graphify-out/wiki/index.mdexists, use it for broad navigation - treat graph results as candidate file anchors, then verify route-changing claims against source files
- treat ambiguous graph nodes as uncertain dependencies requiring manual verification, and fall back to targeted repository search when graph results are generic or stale
npm run meta:graphify:checkandnpm run meta:validatecompare the graph's built commit with currentgit rev-parse HEADand fail whenGRAPH_REPORT.mdis stale- after modifying code files, run
npm run meta:graphify:rebuild
Graphify installation and runtime wiring are handled by setup and helper scripts:
npm run meta:graphify:checknpm run meta:graphify:installnpm run meta:graphify:updatenpm run meta:graphify:rebuild
Maintenance Loop
After changing canonical prompts, skills, hooks, contracts, or runtime-facing docs:
npm run discover:globalnpm run meta:syncnpm run meta:checknpm run meta:check:globalnpm run meta:verify:allbefore release or after larger changes
Use supporting commands as needed:
npm run meta:validatenpm run meta:check:runtimesnpm run meta:check:sync-coveragenpm run meta:doctor:governancenpm run meta:eval:agentsnpm run meta:eval:agents:livenpm run meta:validate:run -- <artifact.json>npm run meta:index:runs -- <artifact-dir-or-file>npm run meta:query:runs -- --owner <agent>npm run migrate:meta-kim -- <source-dir> --applynpm run meta:deps:installnpm run meta:deps:install:all-runtimesnpm run meta:deps:updatenpm run meta:deps:update:all-runtimesnpm run meta:deps:install:claude-pluginsnpm run meta:sync:globalnpm run prompt:next-iteration
npm run meta:verify:all runs runtime sync checks, project validation, graphify health, global sync checks, smoke-level runtime acceptance, setup tests, and meta-theory tests.
Install And Packaging Notes
- Node must satisfy the
package.jsonengine requirement. - CLI entry is
npx --yes github:KimYx0207/Meta_Kim meta-kimorbin/meta-kim.mjs. package.jsonuses afileswhitelist so install tarballs contain the fullcanonical/tree.node setup.mjsinstalls selected runtime projections and graphify wiring idempotently.- Runtime target selection has two layers: repo defaults in
config/sync.json, machine-active targets in.meta-kim/local.overrides.json. - MCP Memory Service uses port
8000. stop-memory-save.mjsis a canonical/global MCP memory lifecycle asset installed byscripts/install-mcp-memory-hooks.mjs; it is not registered in the project.claude/settings.jsonprojection.
Reading Order
For maintainers:
README.mdorREADME.zh-CN.mdAGENTS.mdfor cross-runtime and Codex-facing rulesCLAUDE.mdfor Claude Code hook and Agent-tool behavior- The Mechanical Enforcement and Maintenance Loop sections in
AGENTS.mdwhen changing trigger, hook, review, verification, stop, or writeback behavior canonical/skills/meta-theory/references/dev-governance.mdfor the long-form governed execution contract
graphify
This project has a knowledge graph at graphify-out/ with god nodes, community structure, and cross-file relationships.
Rules:
- For codebase questions, first run
graphify query "<question>"when graphify-out/graph.json exists. Usegraphify path "<A>" "<B>"for relationships andgraphify explain "<concept>"for focused concepts. These return a scoped subgraph, usually much smaller than GRAPH_REPORT.md or raw grep output. - If graphify-out/wiki/index.md exists, use it for broad navigation instead of raw source browsing.
- Read graphify-out/GRAPH_REPORT.md only for broad architecture review or when query/path/explain do not surface enough context.
- After modifying code, run
graphify update .to keep the graph current (AST-only, no API cost).
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.

