AkiTao
Published: Updated:
AkiDevRule — agent baseline for Claude Code, Codex, Gemini, Cursor, Kiro, Grok, OpenCode

AkiDevRule

Open Source v3.8.0

One install command turns a fresh Claude Code, Codex, Gemini/Antigravity, Cursor, Kiro, Grok and OpenCode environment into Aki’s full working baseline.

github.com/lacvietanh/akidevrule  ·  master branch · 7 harnesses: Claude Code, Codex, Gemini, Cursor, Kiro, Grok, OpenCode

Formerly named AkiClaudeDoc — renamed 27/07/2026.

AkiDevRule (formerly AkiClaudeDoc) is an open-source agent baseline package (MIT License, public since 22/05/2026), shared by Claude Code, Codex, Gemini/Antigravity, Cursor, Kiro, Grok and OpenCode. A single install command turns a fresh agent environment into Aki’s full working baseline: a shared rule corpus that loads itself at the right moment, plus eleven sharp, single-purpose skills. The corpus follows a strict naming convention (RULE-* for constraints, METHOD-* for frameworks) and is routed by the akirule router according to what the task means. The GitHub repository is the single source of truth. It is not an auto-updater, daemon, package manager or control plane.

How do I install and update AkiDevRule? One npx command

npx @akinet/akidevrule@latest

The script is intentionally simple — inspect it before running.

  • One command: npx @akinet/akidevrule@latest (Node 18+), or node install.mjs from a local checkout
  • Shared by Claude Code, Codex, Gemini/Antigravity, Cursor, Kiro, Grok and OpenCode — generated from one agent-neutral rule source
  • Rule corpus: 13 RULE-* (incl. release.B9 for package publishing and RULE-test for testing) + 7 METHOD-*; only 2 resident files via @-import (RULE-agent-behavior and the akirule router), the rest load by route
  • akirule routes by task meaning, in any language, with a mandatory [RULES] receipt; the aki-route-guard hook blocks the first edit of each file type until the matching rule has been read
  • 11 skills: akirule, akiflow, akithink, akihtmlreport, akihelp, akigitcommit, aki-article-writer, akidevsync-notes, akilint, akiship, akiopen
  • 5 agent definitions (Claude Code): hands, judge, conduct, challenger, maker
  • Windows/macOS/Linux ✅ via install.mjs (Node 18+, no Python needed); notify-only updates, no daemon
  • MIT since 22/05/2026; renamed 27/07; 1.0.0–2.8.0 (10/08–07/09); 3.0.0 (13/09) moved the installer to pure Node.js, distributed via npx @akinet/akidevrule@latest, added rule release.B9; 3.1.0 (15/09) makes /akiship activation an explicit release order, adds a triggered self-run mode for deep-think, mandates build & test before ship, and adds rule release.B10 watching post-push CI; 3.1.1 (15/09) patches coding.B3 to ban stash/checkout/restore/reset/clean to find out whether a failing check pre-exists; 3.2.0 (15/09) the installer auto-discovers and syncs every ~/.claude* profile in one pass, preflight validates JSON before mutation; 3.3.0 (19/09) /akiship and release.B7 turn fail-closed — every checklist step needs a quoted-evidence receipt line, adds a five-point migration doctrine and post-deploy functional verification (release.B11); 3.3.1 (22/09) docs.B2 defaults to in-place edits instead of freezing, agent.A3 gains a fourth kill-test, Self-sufficiency; 3.4.0 (26/09) the akirule router becomes a resident @-import and routes by meaning instead of keywords, adds METHOD-audit-frozen-reference; 3.5.0 (27/09) adds the akiopen skill, evidence-bound fact docs (docs.A6) and a URL-form rule (seo.A6); 3.6.0 (30/09) adds the aki-route-guard hook, slims CLAUDE.md to 2 imports, resident context drops from about 82 KB to 38 KB; 3.7.0 (08/10) makes the rules outrank the harness defaults (agent.B7), counts a rule as read only after the last context compaction, adds RULE-test for testing, and gives Codex CLI the behavior floor and router at session start; 3.8.0 (20/10, latest) makes agents act only when ordered (agent.A3), codes open items in reports as Q/T/N (agent.A4), counts a rule as read only when the whole file was read, and lets the installer ask whether to write an accuracy-first rtk config
AkiDevRule 3.8 in six tiles: ask gets answers not edits, whole scope, Q/T/N open items, less clutter, rules read whole, tidier installer.

What is an AI rule file for Claude Code?

An AI rule (airule) file is Markdown that tells an AI coding agent how to work, loaded into its context so it follows the rules instead of guessing: CLAUDE.md for Claude Code, AGENTS.md for Codex, Cursor and many other tools. AkiDevRule is such a rule set, open source under the MIT license, built by Lạc Việt Anh and tied to AkiDEV: a rule corpus that routes itself by the meaning of the task, with skills and hooks, installed with one command for 7 harnesses (Claude Code, Codex, Gemini/Antigravity, Cursor, Kiro, Grok, OpenCode).

What is new in AkiDevRule 3.8.0?

  • A question gets an answer (agent.A3)

    A question, a hedged thought or a correction of something nobody ordered gets an answer and zero changed files. Once ordered, the agent runs to the end without asking again, and before its first write it must point to the words of yours that ordered it.

  • The request is the whole scope (agent.B1)

    A PR, push, deploy or tag you did not ask for is not taken just because it is the customary next step.

  • Open items coded Q/T/N (agent.A4)

    Q: silence blocks, you must decide. T: silence proceeds, the agent made a call within the order. N: silence changes nothing, a note. Once Q is empty you are done reading.

  • Less clutter

    Throwaway files live only in the session scratchpad or are not made (agent.C5); a check runs once per change state (coding.B3).

  • Rules count only if read whole

    A partial read of a rule file no longer counts; the aki-route-guard gate widens it to the whole file and now reads Cursor transcripts correctly.

  • Tidier installer

    No *.akidevrule-backup-* files left after each install; the rtk config is opt-in (default no, flag --rtk); one route-map.json replaces three hand-copied tables.

Why an agent must not act on a question, with the evidence from the 3.8.0 CHANGELOG: read the deep-dive.

What does AkiDevRule include?

One-command install, full baseline

A single npx @akinet/akidevrule@latest command turns a fresh Claude Code, Codex, Gemini/Antigravity, Cursor, Kiro, Grok and OpenCode environment into Aki’s full working baseline. You can also run node install.mjs from a local checkout (Node 18+). The script is intentionally simple so you can inspect it before running.

One source, two agents

The rule corpus is generated from a single agent-neutral source, shared by Claude Code, Codex, Gemini/Antigravity, Cursor, Kiro, Grok and OpenCode — not two separate rule sets that can drift apart. The rename from AkiClaudeDoc to akidevrule (27/07/2026) marks exactly this scope widening.

A rule corpus that routes itself by naming

A strict naming convention: RULE-*.md are constraints (what the agent must or must not do — behavior, coding, docs, content, stack, UI, SEO, release, DB design, business, test); METHOD-*.md are analytical frameworks, heavy, loaded only when the task genuinely needs them; since 3.6.0 there is no index.md manifest, the akirule router is the single place that lists the routes.

Meaning-based routing, with a gate

Only two files are resident, loaded every session via @-import in CLAUDE.md: RULE-agent-behavior.md and the akirule router. Every other rule is routed by the meaning of the task (the domains it touches and the act: create, decide, audit, ship) in any language, so a paraphrase routes as well as the listed word. On Claude Code the aki-route-guard PreToolUse hook guarantees the Read: the first Edit/Write of each artifact type (code, .md, CHANGELOG.md, .vue/.css, .rs, .sql, locales/, test files) is denied until the matching rule has been read in full since the last context compaction (since 3.8.0, a partial read of a rule file is widened to the whole file). It fails open on any error and AKI_ROUTE_GUARD=0 disables it. A turn that only reads, counts or explains loads nothing extra.

akiflow — a lead-coordinated agent council

The lead pins the owner’s verbatim words as the run’s immutable anchor, splits the request into work items that must each quote a fragment of it, then convenes seats from the five installed agent definitions — every seat traced to a requirement, never picked from a menu. Three modes are discriminated by a single question, what changes outside the room: discuss, audit (read-only), execute (only aki-maker may write). A gate script refuses to close the run on a missing anchor, a requirement quoting nothing the owner wrote, or a declared seat that never posted.

Eleven skills, each sharp at one job

akirule (automatic rule router), akiflow (the agent council), akithink (a 5-phase deep-thinking session ending in a docs/ decision record), akihtmlreport (distills a dense analysis into one self-contained REPORT.html), akihelp (a live intro to the installed system, rendered at runtime so it never goes stale), akigitcommit (turns a messy tree into a few clean Conventional Commits, stages by path, never git add -A or auto-pushes), aki-article-writer (an article pipeline with its own image-scout subagent), akidevsync-notes (reads and edits the Aki Dev Sync task list), akilint (mechanical sweep for hard-wrapped lines and rambling comments), akiship (runs the full release ritual in one command, autonomous under the B8 contract, stopping only for public-history ambiguity or a design contradiction), akiopen (a session-opening brief that reports only what is still pending, at most seven items, read-only).

One brain, three thinking modes

METHOD-deep-think.md is a single analytical brain (goal excavation, first principles, mandatory critique, conditional techbiz lens) consumed three ways: Passive — akirule auto-loads it inline when a normal task hits a signal ("should we…", "is it worth…"), applied briefly, at most one clarifying question; Triggered self-run (new in 3.1.0) — fires non-interactively on any of agent.A3's six mandatory conditions (about to ask/escalate, a one-way-door action, conflicting rules, …), depth scaled to difficulty, ending in decide-and-report or escalation; Active — run /akithink to drive the same METHOD through a full 5-phase protocol at maximum depth.

Update notifications — notify-only

A SessionStart hook compares the installed CHANGELOG.md against the public repo copy (at most once per 24h, fail-silent, non-blocking). When the remote is newer it only prints what’s new and the manual update command (npx @akinet/akidevrule@latest or git pull && node install.mjs). It never downloads or installs anything on its own.

How does akirule load rules?

Resident

Loaded every session via @-import in CLAUDE.md: RULE-agent-behavior.md and the akirule router. No model decision involved.

Routed

Read when the task meaning matches: coding, pattern-core, docs, content-write, stack-akiNuxtCf, stack-tauri, ui-pattern, seo, release, db-design, biz, test. The aki-route-guard hook blocks the first file edit until it is read.

Methods

Analytical frameworks, loaded on route match: audit-flow, audit-zero-trust, audit-subtraction, audit-frozen-reference, deep-think, ux-psych, proportionality.

Which eleven skills, and what does each do?

akirule

automatic

A smart rule router, running on every conversation; hidden from the / menu.

akiflow

/akiflow

A lead-coordinated agent council; three modes: discuss, audit (read-only), execute.

akithink

/akithink

A 5-phase deep-thinking session ending in a docs/ decision record.

akihtmlreport

/akihtmlreport

Distills a dense in-conversation analysis into one self-contained REPORT.html.

akihelp

/akihelp

A live intro to the installed Aki system, rendered at runtime so it never goes stale.

akigitcommit

/akigitcommit

Turns a messy tree into a few clean Conventional Commits; stages by path, never git add -A, never auto-pushes.

aki-article-writer

/aki-article-writer

An article pipeline: fact-checking, SEO metadata, JSON-LD, with its own image-scout subagent.

akidevsync-notes

automatic

Reads and edits the .akidevsync/notes.json task list the Aki Dev Sync app writes.

akilint

/akilint

A mechanical sweep for hard-wrapped lines and rambling comments; judgment stays with the session.

akiship

/akiship

Runs the full release ritual in one command: front-loaded checks, then an unattended B7 checklist pass, committing via akigitcommit; stops only for public-history ambiguity or a design contradiction.

akiopen

/akiopen

A session-opening brief: reads the working tree, Aki Dev Sync notes, active plans and [Unreleased] in one pass, then reports only what is still pending, at most seven items ranked by severity. Read-only.

Latest release: 3.8.0

Release 3.8.0 (10-20) is listed under "What is new in AkiDevRule 3.8.0?" above. Before that, 3.7.0 (10-08): AkiDevRule rules outrank the harness defaults when the two conflict (agent.B7, with a [SKIP] penalty card); the aki-route-guard gate counts a rule as read only if it was read after the last context compaction, and the aki-compact-reread hook reminds once after each compaction; adds RULE-test (write as few tests as possible, a test never touches what it does not own) with the test_lint.py script; Codex CLI gets the behavior floor and router at session start through a managed block in ~/.codex/AGENTS.md; agent.A4 gives every open item a stable short code and asks for short, plain reports; agent.B1 adds "what you create, you remove" (worktrees, build output, temp files). Prior 3.6.0 (09-30): the aki-route-guard PreToolUse hook blocks the first edit of each artifact type until its routed rule has been read, so the Read no longer depends on the model remembering; the CLAUDE.md template keeps only two imports (RULE-agent-behavior and the akirule router), resident context drops from about 82 KB to 38 KB, and RULE-coding and RULE-pattern-core now load only on code turns. Prior 3.5.0 (09-27): adds the akiopen skill (a read-only session-opening brief), evidence-bound fact docs (docs.A6), a relative URL-form rule (seo.A6) and a fact-check step in the content audit. 3.4.0 (09-26): the akirule router becomes a resident @-import and routes by meaning instead of a keyword list, adds METHOD-audit-frozen-reference.

Author

Lạc Việt Anh  —  founder of the Aki ecosystem. AkiDevRule distills how he works with AI agents (Claude Code, Codex, Gemini, Cursor, Kiro, Grok, OpenCode) across the ecosystem into a shared baseline, released as open source under the MIT License so the community can reference and reuse it.

AkiDevRule belongs to the ecosystem’s dev-tooling layer, tied to AkiDEV (dev.akitao.com) — which hosts the docs page and the install wrapper. See related projects: AkiDEV and Aki Dev Sync.

Frequently asked questions about AkiDevRule

What is AkiDevRule?
AkiDevRule (formerly named AkiClaudeDoc) is an open-source agent baseline shared by Claude Code, Codex, Gemini/Antigravity, Cursor, Kiro, Grok and OpenCode. With one install command it turns a fresh agent environment into Aki’s full working baseline: a shared rule corpus that loads itself at the right moment, plus eleven sharp, single-purpose skills.
How do I install AkiDevRule?
Run: npx @akinet/akidevrule@latest (requires Node 18+, no Python needed). Works the same on Windows/macOS/Linux; or clone the repo and run node install.mjs (or bash install.sh / .\install.ps1). The script is intentionally simple — inspect it before running.
Why was it renamed from AkiClaudeDoc?
On 27/07/2026 the repo renamed AkiClaudeDoc → akidevrule to match its widened scope: no longer Claude Code-only, it is now generated from one agent-neutral rule source shared by Claude Code and Antigravity/Gemini. The old GitHub URL auto-redirects to the new name.
What does AkiDevRule install, and where?
payload/* is synced into ~/.aki/akidevrule/ (excluding ref-ECC/): thirteen RULE-* files and seven METHOD-* files. Skills are copied into ~/.claude/skills/. The installer also replaces ~/.claude/CLAUDE.md with the packaged guidance (backup first), creates ~/.claude/CLAUDE.local.md only if missing (never overwritten afterward — the place for per-machine rules), updates ~/.claude/settings.json, and installs the aki-update-check.mjs (SessionStart), aki-route-guard.mjs (PreToolUse) and aki-compact-reread.mjs (one notice after each context compaction) hooks. For Codex CLI, the behavior floor and the router are written as a managed block in ~/.codex/AGENTS.md. If rtk (a shell-output compressor) is on the machine, the installer asks once in a terminal whether to write an accuracy-first rtk config; the default is no, and the --rtk flag answers yes without the prompt. An older install at ~/.aki/claudedoc is migrated to the new path automatically.
How does akirule decide which rules load, and when?
akirule classifies each turn by the domains it touches and the act (create, decide, audit, ship), in any language, then reads only the files whose route matches. Only two files are resident, loaded every session via @-import: RULE-agent-behavior.md and the akirule router, so the behavior floor and the routing are always present. The other rules (coding, pattern-core, test, docs, content-write, stack, ui-pattern, seo, release, db-design, biz) and the seven analytical METHODs load only on a route match, with deliberately high sensitivity. On Claude Code the aki-route-guard hook denies the first Edit/Write of each artifact type until the matching rule has been read in full since the last context compaction. A turn that only reads or explains loads nothing extra.
Does it auto-update my machine?
No. It is notify-only, never auto-installing. A SessionStart hook compares the installed CHANGELOG against the public copy (at most once per 24h, fail-silent, non-blocking); when there’s a newer version it only prints the changes and the manual update command (npx @akinet/akidevrule@latest or git pull && node install.mjs). The Git repo is the source of truth — not an auto-updater, daemon, or package manager.
How do I uninstall AkiDevRule?
Delete: rm -rf ~/.aki/akidevrule; rm -rf ~/.claude/skills/{akirule,akiflow,akithink,akihtmlreport,akihelp,akigitcommit,akilint,akiopen,akiship,aki-article-writer,akidevsync-notes}; rm -f ~/.claude/hooks/aki-update-check.mjs ~/.claude/hooks/aki_version_check.mjs ~/.claude/hooks/aki-route-guard.mjs ~/.claude/hooks/aki-compact-reread.mjs. For Codex, delete the akidevrule managed block in ~/.codex/AGENTS.md. Then remove the AkiDevRule block from ~/.claude/CLAUDE.md and its entries (permission, skillOverrides, SessionStart and PreToolUse hooks) from ~/.claude/settings.json if desired. If you answered yes for rtk, remove the [hooks] table carrying the akidevrule comment line from the config.toml of rtk (rtk config prints its path).

One command. The same baseline. The Git repo is the source of truth.

View on GitHub