@akinet/akidevrule 3.3.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +39 -1
  2. package/README.md +21 -20
  3. package/claude/CLAUDE.md +5 -6
  4. package/claude/agents/aki-challenger.md +1 -1
  5. package/claude/agents/aki-conduct.md +2 -2
  6. package/claude/agents/aki-hands.md +4 -4
  7. package/claude/agents/aki-judge.md +2 -2
  8. package/claude/agents/aki-maker.md +2 -2
  9. package/install.mjs +115 -292
  10. package/lib/permissions.mjs +244 -0
  11. package/package.json +5 -2
  12. package/payload/GEMINI.md +2 -0
  13. package/payload/METHOD-audit-frozen-reference.md +33 -0
  14. package/payload/METHOD-audit-zero-trust.md +1 -1
  15. package/payload/METHOD-deep-think.md +1 -1
  16. package/payload/RULE-agent-behavior.md +4 -3
  17. package/payload/RULE-coding.md +2 -1
  18. package/payload/RULE-docs.md +14 -3
  19. package/payload/RULE-pattern-core.md +1 -1
  20. package/payload/RULE-release.md +2 -2
  21. package/payload/RULE-ui-pattern.md +1 -1
  22. package/payload/index.md +11 -7
  23. package/skills/aki-article-writer/SKILL.md +1 -1
  24. package/skills/akidevsync-notes/SKILL.md +1 -1
  25. package/skills/akiflow/references/harness-facts.md +8 -6
  26. package/skills/akihelp/SKILL.md +7 -7
  27. package/skills/akihtmlreport/SKILL.md +1 -1
  28. package/skills/akilint/SKILL.md +1 -1
  29. package/skills/akirule/SKILL.md +45 -131
  30. package/skills/akiship/SKILL.md +3 -3
  31. package/skills/akithink/SKILL.md +8 -7
  32. package/skills/akiflow/scripts/council-cost.sh +0 -4
  33. package/skills/akiflow/scripts/council-open.sh +0 -4
  34. package/skills/akiflow/scripts/council-read.sh +0 -4
  35. package/skills/akiflow/scripts/council-verify.sh +0 -4
  36. package/skills/akiflow/scripts/scythe.sh +0 -4
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: akidevsync-notes
3
- description: Read and edit a project's `.akidevsync/notes.json` task/note file — the per-project task list written by the Aki-Dev-Sync app (github.com/lacvietanh/aki-dev-sync). Use when the user asks to list, add, pin/unpin, mark done, edit, or delete a task in that file, or mentions "task note", "note ghim", "pin task", "mark done", "notes.json", "akidevsync task". Also use when asked to cross-check pinned/open notes against what a release actually shipped (CHANGELOG, code) before marking them done.
3
+ description: Read and edit a project's `.akidevsync/notes.json` task/note file — the per-project task list written by the Aki-Dev-Sync app (github.com/lacvietanh/aki-dev-sync). Use whenever the task reads or changes that project task list — listing, adding, pinning, completing, editing or deleting a task or note, in any wording. Also use when asked to cross-check pinned/open notes against what a release actually shipped (CHANGELOG, code) before marking them done.
4
4
  ---
5
5
 
6
6
  # akidevsync-notes — edit a project's Aki-Dev-Sync task file safely
@@ -8,6 +8,8 @@ The skill's rules are consequences of these facts. If a fact changes, the rule i
8
8
 
9
9
  Every entry carries the date it was checked, because all of it is version-bound and expected to rot.
10
10
 
11
+ **CRITICAL — this file is facts, not policy: update it the moment a provider ships or retires a model, changes a flag, or a probe contradicts an entry.** Every model id below is a live default that other files quote by reference (`agent.A5`, `claude/agents/aki-hands.md`, `docs/arch/akiflow.md`); a stale id here is silently wrong everywhere. Never ask the owner whether to record an observed fact — record it, date it, and re-point the default when a newer tier of the same family is present (`agy models`, `claude --help`, `kiro-cli`).
12
+
11
13
  ## Worker invocation quick-facts
12
14
 
13
15
  The lookup table: literal command, read-only mechanism, and the one silent failure each lane hides. Every section below this one is the *why* — a caller assigning a lane needs none of it.
@@ -16,7 +18,7 @@ The lookup table: literal command, read-only mechanism, and the one silent failu
16
18
 
17
19
  | Lane | Literal command | Read-only by | Silent failure to check |
18
20
  |---|---|---|---|
19
- | **agy flash** — discovery default | `agy --model gemini-3.7-flash-high --mode plan --output-format json -p "<prompt>"` | `--mode plan` (mechanism, not wording) | a denied call still returns `status: "SUCCESS"` with empty `response`; `-p` takes the next token as its value, so any flag written after it is sent as prompt text |
21
+ | **agy flash** — discovery default | `agy --model gemini-3.8-flash-high --mode plan --output-format json -p "<prompt>"` | `--mode plan` (mechanism, not wording) | a denied call still returns `status: "SUCCESS"` with empty `response`; `-p` takes the next token as its value, so any flag written after it is sent as prompt text |
20
22
  | **kiro-cli** | `kiro-cli chat --no-interactive --trust-tools=fs_read --model claude-sonnet-4.5 --effort high "<prompt>"` | `--trust-tools=fs_read` | none recorded; `--effort` is operative on every Kiro model, unlike `claude` + haiku |
21
23
  | **claude via proxy gateway** | `CLAUDE_CONFIG_DIR=~/.claude-9rt claude -p --tools "Read,Grep" --model <alias> --effort low "<prompt>"` | `--tools` allowlist | `cl-9rt` is a shell alias and does not exist in a non-interactive shell — run the expanded literal; the gateway may route an alias to a non-Anthropic core |
22
24
  | **claude in-harness subagent** | Agent tool, `model` passed explicitly | the agent file's `tools:` frontmatter | an omitted `model` inherits the caller's top tier; the Agent tool has no `effort` parameter at all, so a declared effort is decorative |
@@ -61,10 +63,10 @@ Probe exactly two things, once, at the moment of assigning a lane: liveness/quot
61
63
 
62
64
  ## Cross-CLI worker (Claude Code lead → agy headless)
63
65
 
64
- Verified by real runs, 2026-08-01; model re-probed 2026-08-15. Invocation, flag order load-bearing:
66
+ Verified by real runs, 2026-08-01; model re-probed 2026-09-26. Invocation, flag order load-bearing:
65
67
 
66
68
  ```
67
- agy --model gemini-3.7-flash-high --mode plan --output-format json -p "<prompt>"
69
+ agy --model gemini-3.8-flash-high --mode plan --output-format json -p "<prompt>"
68
70
  ```
69
71
 
70
72
  | Fact | Design consequence |
@@ -77,7 +79,7 @@ agy --model gemini-3.7-flash-high --mode plan --output-format json -p "<prompt>"
77
79
  | **[obs]** Measured on a real read-only repo sweep: 8.2s wall / 3.4s model time, correct answer; ~20–26k tokens of fixed input overhead per call (agy's system prompt plus `~/.gemini/GEMINI.md`). *A prior version of this row cited one observed `cache_read_tokens: 32621` as evidence that repeat calls hit a warm cache. That reading was too generous — see § Stateful workers, where a controlled three-turn test shows the cache is unreliable and the latency curve is the real constraint.* | The fixed overhead means this mechanism pays for itself on a non-trivial sweep, not on a one-line lookup — the same shape as the "self-contained question" cutoff already in the Step 2 mechanism table. |
78
80
  | **[obs]** The `json`/`stream-json` output carries `usage`: `input_tokens`, `output_tokens`, `thinking_tokens`, `cache_read_tokens`, plus `conversation_id`. | Cost is measurable per call — but it is invisible to `council_cost.py`, which only parses the Claude Code session transcript. The lead must add it to the close-out tally by hand (`SKILL.md` Step 6). |
79
81
  | **[obs]** agy 1.1.9 expands skills in print mode, so `agy -p "/akiflow …"` resolves the skill; `akiflow` is already deployed to agy at `~/.gemini/config/skills/akiflow`. | A cross-CLI call can invoke the skill itself, not just an ad hoc prompt — relevant if a future revision routes part of a run through agy directly. |
80
- | **[owner]** + **[obs]** Model choice inside agy is not free-form. **`gemini-3.7-flash-high` is the default discovery tier** (owner directive, 2026-08-15, superseding the prior `gemini-3.6-flash-medium` default once `gemini-3.7-flash-*` shipped — see § agy headless below for the full re-probed model list): ~1M context, generous quota. Its weakness is carelessness, not capacity — it skims. The counter is prompt precision, not a bigger model: name the exact paths, the exact question, and the exact output shape, leaving it nothing to improvise. **`claude-sonnet-4-6` / `claude-opus-4-6-thinking` inside agy are quota-scarce even on a Pro plan** (owner-reported) and additionally sit on the no-cache resume curve above. | Route discovery to `gemini-3.7-flash-high` by default and hand it a fully-specified task. Reach for agy's Claude tiers only for a single-shot, self-contained, high-value call where context and cache are demonstrably under control — never for a conversation, never as a habit. When strong-model judgment is needed *and* stateful, that is a Claude session id, not agy. |
82
+ | **[owner]** + **[obs]** Model choice inside agy is not free-form. **`gemini-3.8-flash-high` is the default discovery tier** (owner rule, 2026-08-15: the newest Flash `-high` tier is the default; re-pointed 2026-09-26 when `gemini-3.8-flash-*` shipped — see § agy headless below for the full re-probed model list): ~1M context, generous quota. Its weakness is carelessness, not capacity — it skims. The counter is prompt precision, not a bigger model: name the exact paths, the exact question, and the exact output shape, leaving it nothing to improvise. **`claude-sonnet-4-6` / `claude-opus-4-6-thinking` inside agy are quota-scarce even on a Pro plan** (owner-reported) and additionally sit on the no-cache resume curve above. | Route discovery to `gemini-3.8-flash-high` by default and hand it a fully-specified task. Reach for agy's Claude tiers only for a single-shot, self-contained, high-value call where context and cache are demonstrably under control — never for a conversation, never as a habit. When strong-model judgment is needed *and* stateful, that is a Claude session id, not agy. |
81
83
  | **[obs]** A flash-tier worker (`gemini-*-flash-*`, any generation) is for **retrieval, never for judgment**. | akiflow's thinking floor turns on the FACT/CONSTRAINT/ASSUMPTION distinction, which the skill already names as the one unrecoverable error to mislabel — exactly what a cheap model does worst. Hard rule wherever this mechanism is used, in the same voice as the existing "never downgrade implementation to save cost": retrieval only. |
82
84
 
83
85
  ## Cost model
@@ -110,7 +112,7 @@ Skills are deployed unmodified to five hosts, and **[doc]** Cursor additionally
110
112
  |---|---|---|---|---|---|
111
113
  | Claude Code | `haiku` (no `--effort`) | `sonnet` | `opus`, or `inherit` from the lead | agent frontmatter `model:`; Agent tool `model`; `claude -p --model <alias> --effort <e>` | **[obs]** verified across this file |
112
114
  | Cursor (IDE + `agent` CLI) | Composer family — the current id from Cursor's model picker (`composer-2`-style), never an API-pool Claude/GPT model | `inherit` (the session's model) | `inherit`, or the session's top API-pool model | `.cursor/agents/*.md` or `~/.claude/agents/*.md` frontmatter `model: inherit \| <id>[effort=…]`; `agent -p --model <id>` | **[doc]** field and syntax; **UNCONFIRMED** how Cursor treats a Claude alias (`haiku`) it cannot resolve — reopen trigger: one measured Cursor run of an `aki-hands` spawn |
113
- | Antigravity `agy` | `gemini-3.7-flash-high` (§ Cross-CLI worker) | `gemini-3.1-pro-low` | `gemini-3.1-pro-high` (`claude-opus-4-6-thinking` is quota-scarce, § agy headless) | `agy --model <slug>` — effort is inside the slug; agy 1.1.6+ agent markdown carries `model` | **[obs]** 2026-08-15 |
115
+ | Antigravity `agy` | `gemini-3.8-flash-high` (§ Cross-CLI worker) | `gemini-3.1-pro-low` | `gemini-3.1-pro-high` (`claude-opus-4-6-thinking` is quota-scarce, § agy headless) | `agy --model <slug>` — effort is inside the slug; agy 1.1.6+ agent markdown carries `model` | **[obs]** 2026-09-26 |
114
116
  | Codex CLI | UNCONFIRMED low-cost alias | `[agents] default_subagent_model` in `config.toml`; `codex exec -c model=<id> -c model_reasoning_effort=medium` | same model, `model_reasoning_effort=xhigh` | `config.toml [agents]`, per-agent `model`; `codex exec -c …` | **[doc, secondary]** 2026-09-08, model ids drift monthly — read them from `codex` itself |
115
117
  | Kiro CLI | `qwen3-coder-next` (0.05×) or `claude-haiku-4.5` (0.4×) | `auto` (1×) or `claude-sonnet-4.5` (1.3×) | Opus-class, ~22× — rarely worth it on this host | `kiro-cli chat --no-interactive --model <id> --effort <e>`; custom agent JSON `model` | **[obs]** 2026-08-02 list; multipliers re-read with `--list-models` |
116
118
  | Grok CLI | UNCONFIRMED | `grok-build-0.1` default | UNCONFIRMED | `grok -p` (`--model` flag unconfirmed) | **[doc, secondary]** 2026-09-08 |
@@ -150,7 +152,7 @@ Full narrative and the measurements behind these rows: `docs/research/headless-c
150
152
 
151
153
  ### agy headless — see § Cross-CLI worker above
152
154
 
153
- **[obs]** Re-probed 2026-08-15 (prior check 2026-08-02 predates the `gemini-3.7-flash-*` release — do not cite the old list), `agy models`: `gemini-3.7-flash-{low,medium,high}`, `gemini-3.6-flash-{low,medium,high}`, `gemini-3.5-flash-{low,medium,high}`, `gemini-3.1-pro-{low,high}`, **`claude-sonnet-4-6`**, **`claude-opus-4-6-thinking`**, `gpt-oss-120b-medium`. Also present: `--json-schema`, `--effort`, `--agent`, `--add-dir`, `--print-timeout`, `--disable-slash-commands`, and an `agents` subcommand (empty on this machine — no custom agy agents defined).
155
+ **[obs]** Re-probed 2026-09-26 (agy 1.2.11; the 2026-08-15 list predates the `gemini-3.8-flash-*` release — do not cite it), `agy models`: `gemini-3.8-flash-{low,medium,high}`, `gemini-3.7-flash-{low,medium,high}`, `gemini-3.6-flash-{low,medium,high}`, `gemini-3.1-pro-{low,high}`, **`claude-sonnet-4-6`**, **`claude-opus-4-6-thinking`**, `gpt-oss-120b-medium`. Also present: `--json-schema`, `--effort`, `--agent`, `--add-dir`, `--print-timeout`, `--disable-slash-commands`, and an `agents` subcommand (empty on this machine — no custom agy agents defined).
154
156
 
155
157
  *Consequence:* a Claude-family model can be reached **on the Antigravity quota**. The vendor paying and the model reasoning are independent choices, which is a second axis the Step 2 mechanism table did not previously have.
156
158
 
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: akihelp
3
- description: Introduce the whole Aki Claude Code system — installed skills, the akirule passive rule router (3 tiers), the deep-think passive/active split, and a painpoint-to-prompt table for the situations people actually hit — by reading live installed state, never a hardcoded inventory. Use when the user asks what Aki tools/rules/skills are available, how the system works, or what to say for a recurring problem they keep running into.
3
+ description: Introduce the whole Aki Claude Code system — installed skills, the akirule rule router (imported, routes by meaning), the deep-think passive/active split, and a painpoint-to-prompt table for the situations people actually hit — by reading live installed state, never a hardcoded inventory. Use when the user asks what Aki tools/rules/skills are available, how the system works, or what to say for a recurring problem they keep running into.
4
4
  ---
5
5
 
6
6
  # akihelp — live introduction to the Aki system
7
7
 
8
- Invoke with `/akihelp`, or when the user asks what's available in this setup ("what can this do", "hệ thống Aki có gì", "how do I use this", "what skills do I have"). Goal: give the user a clear, accurate picture of the whole Aki Claude Code system so they can fully exploit it.
8
+ Invoke with `/akihelp`, or whenever the user asks, in any wording, what this setup offers or how to use it. Goal: give the user a clear, accurate picture of the whole Aki Claude Code system so they can fully exploit it.
9
9
 
10
10
  **This skill must never go stale.** Do not hardcode a skill/rule inventory in this file — read live state every time it runs, so the output is always correct even after `install.sh` adds, renames, or removes something.
11
11
 
@@ -18,8 +18,8 @@ Invoke with `/akihelp`, or when the user asks what's available in this setup ("w
18
18
 
19
19
  - **Skills (active, user-invoked)** — one row per aki-skill: its `/name`, its one-line description (from frontmatter), and when to reach for it.
20
20
  - **Agent definitions (who the work gets handed to)** — one row per installed `aki-` agent from step 3: what it is for, and the property that is mechanical rather than promised (its `tools:` list, which is what makes a read-only agent actually read-only, and its `model:`, so a tier is never improvised). Say the thing people get wrong: this is a catalog, not a roster — an agent is spawned because a specific requirement needs it, never because it exists.
21
- - **Passive system (akirule)** — explain the 3 tiers: Core rules always loaded every turn; Contextual/Analytical rules auto-loaded on signal match; full load via an explicit phrase ("nạp full", "load all rules"). Note that `akirule` itself is hidden from the `/` menu by design (`user-invocable: false`) — it runs passively, not as a command.
22
- - **One brain, three modes** — `METHOD-deep-think.md` is read passively by akirule inside normal tasks (brief, inline, at most one clarifying question), as a triggered self-run when an `agent.A3` deep-think trigger holds (non-interactive, depth scaled to difficulty, ends in decide-and-report or escalation), and actively by `/akithink` (full 5-phase interactive session for big/hard-to-reverse/goal-ambiguous decisions). Short version of the comparison, not the full METHOD text.
21
+ - **Passive system (akirule)** — explain the load mechanisms: core rules and the router always loaded (`@`-imported by `CLAUDE.md`); contextual/analytical rules read when the task's domain matches a route — by meaning, never keywords; full load when the owner asks for the whole corpus. `akirule` is hidden from the `/` menu by design (`user-invocable: false`) — it is imported, not a command.
22
+ - **One brain, three modes** — `METHOD-deep-think.md` is read passively by the router inside normal tasks (brief, inline, at most one clarifying question), as a triggered self-run when an `agent.A3` trigger holds or `/akithink` self-runs on a genuine decision (non-interactive, depth scaled to difficulty, ends in decide-and-report or escalation), and interactively by `/akithink` when the owner asks for a session. Short version of the comparison, not the full METHOD text.
23
23
  - **Editing rules** — this whole system is generated from a source repo (akidevrule); the installed copies under `~/.aki/akidevrule` and `~/.claude` are deployed output, never edited directly. Changes go through the source repo + `install.sh`. Note for context: the same skill corpus (not the rule corpus) is also synced by `install.sh` to Antigravity/Gemini and to Codex, Kiro, and Grok CLIs on this machine if present — this skill itself only introduces the Claude Code side.
24
24
 
25
25
  5. Render a **painpoint → what to say** table. This is the section most people actually need: a capability list tells them what exists, this tells them which words to type when a specific problem is in front of them. Build every row from what steps 1–3 actually returned, and **drop any row whose skill or rule file did not appear there** — a row pointing at something uninstalled is worse than a missing row.
@@ -29,7 +29,7 @@ Invoke with `/akihelp`, or when the user asks what's available in this setup ("w
29
29
  | Styles are sprawling — duplicated classes, hardcoded colors, CSS piling up in component `<style>` blocks | *"Audit CSS this repo per `ui.C`. Read-only, produce a plan."* then a separate *"Clean per the plan, one pattern per pass."* | `RULE-ui-pattern.md` §C — the inversion check runs first and decides whether the rest is even worth doing |
30
30
  | Docs describe something the code no longer does | *"Drift audit the docs against the code."* | `RULE-docs.md` §C — severity split across wrong / stale / incomplete / cosmetic |
31
31
  | Long half-finished working tree, unclear what is safe to commit | `/akigitcommit` | Triages finished vs mid-edit vs abandoned vs accidental **before** grouping; stages by explicit path, never `git add -A` |
32
- | Work is finished but not pushed, and they want to know if it is genuinely shippable | *"Is this ready to ship?"* / *"xong chưa"* | `RULE-release.md` B7 pre-ship gate — a pass/fail check, not a document |
32
+ | Work is finished but not pushed, and they want to know if it is genuinely shippable | *"Is this ready to ship?"* | `RULE-release.md` B7 pre-ship gate — a pass/fail check, not a document |
33
33
  | A decision is big, hard to reverse, or the real goal is still fuzzy | `/akithink` | Full 5-phase session: restate → goal excavation → first principles → mandatory critique → decision record. Small reversible calls should just be decided instead |
34
34
  | Replies are padded, or lines are hard-wrapped mid-sentence | Name the penalty card: *"`[FLUFF]`"* / *"`[WRAP]`"* / *"`[YAP]`"*, or run `/akilint` | `RULE-agent-behavior.md` §0. `/akilint` runs the deterministic detector for the two mechanical cards; `[FLUFF]` stays human judgment and no script claims it |
35
35
  | One task genuinely needs several kinds of judgment at once (architecture *and* UX *and* market) | `/akiflow` | Lead-coordinated council with `aki-challenger`'s subtraction pass ("what can be cut?") and a mechanical closure gate. Overkill for ordinary work — say so plainly rather than routing everything here |
@@ -40,8 +40,8 @@ Invoke with `/akihelp`, or when the user asks what's available in this setup ("w
40
40
  | The interface works but feels confusing or people do not complete the flow | *"Review the UX of this screen."* | `METHOD-ux-psych.md` — a behavioral lens, distinct from `RULE-ui-pattern.md` which owns visual structure |
41
41
  | A pricing, positioning, or audience call | *"Who is this for and what should it cost?"* | `RULE-biz.md` — plus `docs/biz/` as the project's source of truth |
42
42
  | An analysis in chat is too dense to read as text | `/akihtmlreport` | Renders the analysis already in the conversation as one self-contained HTML file — it visualizes, it does not re-analyze |
43
- | Unsure whether a rule loaded at all | *"nạp full"*, or just read the `[RULES]` line | Every response carries a `[RULES]` receipt naming the whole rule context and a `missing:` field, so "the rule never arrived" is visibly different from "the rule arrived and was ignored" — the two have opposite fixes. `nạp full` is the Tier 2 escape hatch that reads everything |
43
+ | Unsure whether a rule loaded at all | Read the `[RULES]` line, or ask to load the whole corpus | Every response carries a `[RULES]` receipt naming every rule file in context, so "the rule never arrived" (absent from the line) is visibly different from "the rule arrived and was ignored" — the two have opposite fixes. A full-load request reads everything |
44
44
 
45
- 6. Close with the one caveat that changes how people use all of the above: **`akirule` is a skill, so it is best-effort** — it applies only when the model chooses to invoke it and a signal matches. Only `index.md`, `RULE-agent-behavior.md`, `RULE-coding.md` and `RULE-pattern-core.md` are guaranteed, because the harness `@`-imports them through `CLAUDE.md`. When something must be deterministic, name the file in the prompt (*"Read `~/.aki/akidevrule/RULE-ui-pattern.md`, then …"*) instead of trusting the signal to fire.
45
+ 6. Close with the one caveat that changes how people use all of the above: **the router is guaranteed, a routed file is not** — `index.md`, the three core rule files and the router are `@`-imported through `CLAUDE.md`, but a contextual file enters context only when the model `Read`s it on a route match. When something must be deterministic, name the file in the prompt (*"Read `~/.aki/akidevrule/RULE-ui-pattern.md`, then …"*) instead of trusting the signal to fire.
46
46
 
47
47
  7. Keep the output scannable: compact tables or short bulleted sections, not an essay. Respond in the user's language, and translate the example prompts into that language rather than pasting them verbatim in English.
@@ -5,7 +5,7 @@ description: Visualize a complex report that already exists in the conversation
5
5
 
6
6
  # akihtmlreport — single-file visual report extraction
7
7
 
8
- Invoke with `/akihtmlreport`, or when the user asks in their own words to extract the discussion into a visual file ("trích xuất ra html", "xuất báo cáo trực quan", "làm file report", "export this to html"). Its purpose is single and narrow: turn a complex analysis or report that already exists in this conversation into one self-contained HTML file for dense, at-a-glance reading — **nothing else, no new analysis**. Not a replacement for chat responses, and not something to reach for by default.
8
+ Invoke with `/akihtmlreport`, or when the user asks, in any wording, to turn the discussion into a visual file. Its purpose is single and narrow: turn a complex analysis or report that already exists in this conversation into one self-contained HTML file for dense, at-a-glance reading — **nothing else, no new analysis**. Not a replacement for chat responses, and not something to reach for by default.
9
9
 
10
10
  ## When this skill actually applies
11
11
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: akilint
3
- description: Mechanical format lint for the penalty-card classes of RULE-agent-behavior.md §0 — hard-wrapped code comments and markdown prose ([WRAP]) and oversize comments ([YAP]) — via the shared scythe.py detector. Deterministic file:line output; judgment stays with the session. Use when the user asks to lint/quét formatting, mentions wrapline, "bẻ dòng", "comment lảm nhảm", or calls a penalty card ([WRAP]/[YAP]/[FLUFF]) on recent output.
3
+ description: Mechanical format lint for the penalty-card classes of RULE-agent-behavior.md §0 — hard-wrapped code comments and markdown prose ([WRAP]) and oversize comments ([YAP]) — via the shared scythe.py detector. Deterministic file:line output; judgment stays with the session. Use whenever formatting is in question — the user wants lines or comments checked, complains that text is hard-wrapped or comments are bloated, or calls a penalty card ([WRAP]/[YAP]/[FLUFF]) on recent output.
4
4
  user-invocable: true
5
5
  ---
6
6
 
@@ -1,157 +1,71 @@
1
1
  ---
2
2
  name: akirule
3
- description: Aki's contextual rule router — invoke BEFORE acting whenever the task touches any of - .md/.vue/.css/.tsx/.rs/.sql files; docs, plan, README, CHANGELOG; UI, component, CSS, tailwind; SEO, schema, sitemap; release, version, commit, push, deploy; DB schema, migration; Tauri; i18n, UI copy; pricing, biz; UX review; refactor, flow tracing; audit or minimize sweeps; big decisions (should we / có nên). Full corpus load on "nạp full". Core rules are not routed here — the harness embeds them via CLAUDE.md.
3
+ description: Aki's contextual rule router — route EVERY task turn before acting, by what the task means (the domain it touches and the kind of act — write, decide, audit, ship), with listed signals as evidence, never as the test. Domains: docs and any .md, UI copy and i18n, frontend components and CSS, SEO, commit/push/deploy/release/CI, database schema and migrations, Nuxt/Cloudflare, Tauri/Rust, pricing and positioning, UX, guards and risk sizing, flow bugs, audits and minimization, conformance to a reference, and any decision or critique. Loads each contextual RULE/METHOD file whose domain the task touches; full corpus on an explicit load-everything request. Core rules are not routed here — the harness embeds them via CLAUDE.md.
4
4
  user-invocable: false
5
5
  ---
6
6
 
7
- ## What this skill does and does not guarantee
7
+ # akirule — contextual rule router
8
8
 
9
- **Nothing in this file is guaranteed to run.** A skill loads only when the model chooses to invoke it, so every rule routed below is best-effort.
9
+ ## Delivery
10
10
 
11
- The rules that must apply unconditionally are not here. `index.md`, `RULE-agent-behavior.md`, `RULE-coding.md` and `RULE-pattern-core.md` are embedded by the harness through `@` imports in `~/.claude/CLAUDE.md`, which is read mechanically at session start. Do not move them back into this file: an `@` path inside a skill body is not expanded by the harness the way it is inside `CLAUDE.md`, so declaring them here would look like an import while loading nothing.
11
+ - **Claude Code:** this file is `@`-imported by `~/.claude/CLAUDE.md`, so it is in context every session without a model decision. Do not invoke the skill as well — the routing below is already loaded.
12
+ - **Antigravity (IDE and `agy`):** routing is native — every rule is installed as `akirule-<topic>.md` (`agent` `always_on`, the rest by descriptions the installer generates from the routes below), so do not invoke this skill there.
13
+ - **Other harnesses (Codex, Kiro, Grok):** it is a skill; invoke it before acting on any task turn.
14
+ - **Not routed here:** `index.md`, `RULE-agent-behavior.md`, `RULE-coding.md`, `RULE-pattern-core.md` — core, harness-embedded, never `Read` again and never listed as `(router)`.
15
+ - What stays best-effort is the second hop: reading a routed file is still the model's `Read`. Nothing below is optional because of that — it is the reason the receipt exists.
12
16
 
13
- The last two used to be routed here as "default ON" Tier 1 entries. That phrasing promised a guarantee the mechanism could not deliver — a file routed by a skill loads only if the model first decides to invoke the skill — and the observed failure was not the rules being read and ignored but never being read at all. Do not re-add them below: they are already in context on every turn, so a signal block for them would only produce a redundant `Read`.
17
+ ## How to route — meaning first, signals as evidence
14
18
 
15
- ## Addressing scheme (recall only — does not affect routing)
19
+ 1. **Every task turn, before acting**, name the task in two terms: the **domains** it touches (the artifact and its subject) and the **act** (create/change, evaluate/decide, audit/verify, ship). Route on that classification in whatever language or phrasing it arrived. A signal is evidence of a domain, never the test: a request that names no listed signal still routes, a synonym or paraphrase of one counts as the signal itself, and a word used in passing does not.
20
+ 2. **Load every file whose domain the task touches** — several at once is normal. **When in doubt, load:** a false positive costs a few tokens, a false negative ships wrong work.
21
+ 3. **The artifact type alone is sufficient evidence** — the route applies whether or not the project has the matching folder or maturity.
22
+ 4. **Skip a file already loaded this conversation.**
23
+ 5. **A project binding is a standing signal:** when the project's own `CLAUDE.md`/docs bind a stack, a reference implementation, or a domain, its route is ON for every task in that project without waiting for the message to mention it.
16
24
 
17
- Every rule file is internally organized into groups `A`/`B`/`C` and numbered items `1`/`2`/`3…` (e.g. `coding.B2`, `stack.C1`). `topic` = the manifest's Topic column in `index.md` — usually the filename minus its `RULE-`/`METHOD-` prefix; the audit methods keep their short topics (`flow`, `zero-trust`, `subtract`). This is a naming convention for referring to a specific rule precisely — it has no effect on which files load or when; that is still governed entirely by the tiers below. Full map: `~/.aki/akidevrule/index.md`.
25
+ ## Routes
18
26
 
19
- ---
27
+ All files live in `~/.aki/akidevrule/`.
20
28
 
21
- ## Tier 1 — Contextual loading
22
-
23
- **Sensitivity bias: when in doubt, load. A false positive (loading an unused file) costs a few tokens. A false negative (missing a rule) causes wrong behavior.**
24
-
25
- Before responding, scan the user message and any file paths mentioned. For each rule below: if ANY single signal matches → Read that file immediately, before generating a response.
26
-
27
- Skip the Read if that file was already loaded earlier in this conversation — a signal match on an already-loaded rule costs a redundant Read and changes nothing.
28
-
29
- **A file extension alone is a sufficient signal.** Touching a `.md` loads `RULE-docs.md`; a `.vue`/`.css` loads `RULE-ui-pattern.md`; `.rs`/`Cargo.toml` loads `RULE-stack-tauri.md`; `.sql`/`migrations/` loads `RULE-db-design.md`. The project does **not** need a matching folder structure, a `docs/` tree, or an existing design system first — match on what is being touched, not on how mature the project is. The keyword and action lists below are additional entry points, never a required second condition.
30
-
31
- ### RULE-coding.md · RULE-pattern-core.md — not routed, already loaded
32
- Both are core `@` imports (see the section above) and are in context on every turn without this skill running. Nothing to match, nothing to `Read`, and they never appear in a load-confirmation line.
33
-
34
- ### RULE-docs.md
35
- Load if message or file path contains any of:
36
- - **Keywords:** `docs`, `CLAUDE.md`, `README`, `PLAN`, `plan/`, `diagram`, `mermaid`, `architecture`, `arch/`, `doc sync`, `documentation`, `docs/feat/`, `plan lifecycle`, `tài liệu`, `sơ đồ`, `kiến trúc`
37
- - **Keywords (drift audit):** `drift`, `audit docs`, `stale docs`, `outdated docs`, `out of date`, `docs khớp code`, `còn khớp`, `lệch`, `lỗi thời`, `rà soát tài liệu`, `docs cũ`, `kiểm tra tài liệu`
38
- - **Paths:** **any `.md` file, anywhere** — writing or editing Markdown *is* a docs task; do not wait for a `docs/` folder to exist. Also `docs/**`, `PLAN.md`, `CLAUDE.md`, `README.md`, `CHANGELOG.md`, `*.mdx`, `SKILL.md`
39
- - **Actions:** creating, editing, moving, or completing any plan or doc file; checking whether docs still match the code after the fact (`docs.C`)
40
-
41
- ### RULE-content-write.md
42
- Load if message or file path contains any of:
43
- - **Keywords:** `button`, `label`, `heading`, `error message`, `tooltip`, `empty state`, `i18n`, `locale`, `translation`, `t(`, `$t(`, `meta title`, `meta description`, `og:`, `JSON-LD`, `FAQ`, `landing page`, `UI text`, `nội dung UI`, `nội dung giao diện`, `nhãn`, `thông báo lỗi`, `semantic stability`
44
- - **Paths:** `locales/**`, `i18n/**`, `*.i18n.*`, `public/content/**`; any file where a string a user will read is being added or renamed
45
- - **Actions:** renaming a concept or term used across the product
46
-
47
- ### RULE-stack-akiNuxtCf.md
48
- **Default ON when the project CLAUDE.md references the Aki web stack (Nuxt/Cloudflare — AkiNuxtCf).** Skip only when the task is provably stack-independent (plain markdown, isolated script, config unrelated to the Aki frontend stack). Load if message or file path contains any of:
49
- - **Keywords:** `nuxt`, `vue`, `cloudflare`, `cloudflare workers`, `cf workers`, `wrangler`, `tailwind`, `composable`, `middleware`, `nuxt layout`, `nuxt plugin`, `component`, `useRoute`, `useFetch`, `definePageMeta`, `nitro`, `vite`, `breadcrumb`, `scroll-to-top`, `back-to-home`, `layout chrome`, `useBreadcrumb`
50
- - **Paths:** `components/**`, `pages/**`, `composables/**`, `layouts/**`, `plugins/**`, `middleware/**`, `wrangler.toml`, `nuxt.config.*`, `tailwind.config.*`, `app.vue`
51
-
52
- ### RULE-ui-pattern.md
53
- Load if message or file path contains any of:
54
- - **Keywords (enforcement):** `component`, `vue`, `nuxt`, `tailwind`, `css`, `class`, `style`, `design token`, `token`, `variant`, `design system`, `atomic design`, `pattern class`, `@apply`, `@layer`, `BaseButton`, `c-btn`, `c-card`
55
- - **Keywords (audit):** `dọn dẹp`, `class trùng`, `duplicate class`, `duplicate CSS`, `trùng lặp`, `audit CSS`, `refactor CSS`, `refactor UI`, `arbitrary value`, `quét class`, `w-[`, `text-[`
56
- - **Keywords (minimization):** `tối giản`, `giảm CSS`, `bớt CSS`, `minimize CSS`, `reduce CSS`, `gọn lại`, `CSS rác`, `style block`, `inline style`, `scoped style`, `@theme`, `theme block`, `token drift`, `nhiều CSS quá`, `code CSS nhiều`
57
- - **Paths:** any `.vue`, `.css`, `.scss`, or `.tsx`; `components/**`, `assets/css/**`, `tailwind.config.*`
58
- - **Actions:** writing/refactoring any component or style; auditing a frontend codebase for DRY/SOLID violations
59
-
60
- ### RULE-seo.md
61
- Load if message or file path contains any of:
62
- - **Keywords:** `seo`, `schema`, `sitemap`, `robots`, `canonical`, `usePageSeo`, `useSchemaOrg`, `JSON-LD`, `structured data`, `og:`, `ogImage`, `hreflang`, `alternateName`, `sameAs`, `knowsAbout`, `LLM visibility`, `AI visibility`, `AI Overview`, `entity`, `schema.org`, `DefinedTerm`, `validate-seo`, `meta title`, `meta description`, `OG image`, `trailing slash`
63
- - **Paths:** `docs/seo/**`, `docs/ref/seo*`, `scripts/validate-seo*`, `composables/usePageSeo*`, `composables/useSeoSchemas*`
64
- - **Actions:** creating a new page, adding schema, configuring sitemap or robots
65
-
66
- ### RULE-release.md
67
- Load if message or file path contains any of:
68
- - **Keywords:** `release`, `release note`, `release notes`, `changelog`, `CHANGELOG`, `version`, `versioning`, `semver`, `bump`, `bump version`, `major.minor.patch`, `releases.json`, `phát hành`, `phiên bản`, `cập nhật phiên bản`, `nâng version`
69
- - **Paths:** `CHANGELOG.md`, `app/data/releases.json`, `pages/releases/**`
70
- - **Keywords (pre-ship gate):** `chưa push`, `trước khi push`, `trước khi deploy`, `sắp release`, `chuẩn bị ship`, `pre-release`, `ready to ship`, `xong chưa`, `đã xong hết chưa`
71
- - **Keywords (release-ritual context — these load this rule file, they never start a run; activation is owned entirely by akiship's own gate, an imperative release order):** `akiship`, `full release`, `release trọn gói`, `chạy full release`, `ship đợt này`, `ship trọn gói`
72
- - **Keywords (commit/push/deploy — load even without an explicit "release" word):** `commit`, `git commit`, `push`, `git push`, `deploy`, `deployment`, `git tag`, `ship it`, `commit và push`, `push lên`, `đẩy lên`, `triển khai`
73
- - **Keywords (registry publish — `release.B9`):** `npm publish`, `publish`, `npm`, `npx`, `registry`, `crates.io`, `cargo publish`, `PyPI`, `twine`, `2FA`, `OTP`, `lên npm`
74
- - **Keywords (migration & post-deploy — `release.B5`, `release.B11`):** `migration`, `migrate`, `schema change`, `ALTER TABLE`, `add column`, `db migration`, `health endpoint`, `/health`, `post-deploy`, `smoke test`, `chạy migration`, `đổi schema`
75
- - **Keywords (post-push CI — `release.B10`):** `CI`, `GitHub Actions`, `workflow run`, `gh run`, `CI fail`, `CI đỏ`, `build fail`, `test fail`
76
- - **Actions:** committing or pushing code, deploying, shipping a change that should be recorded for users or maintainers; bumping a version; checking whether finished-but-unpushed work is actually shippable (`release.B7`); running the full release ritual unattended (`release.B8`, `/akiship`); verifying CI after a push (`release.B10`)
77
-
78
- ### RULE-stack-tauri.md
79
- **Default ON for any Tauri project context.** Skip only when the task is provably unrelated to the Tauri/Rust backend (pure frontend copy change with no `src-tauri` involvement, isolated doc edit). Load if message or file path contains any of:
80
- - **Keywords:** `tauri`, `#[tauri::command]`, `invoke(`, `spawn_blocking`, `async_runtime`, `Cargo.toml`, `tauri.conf.json`, `capabilities`, `IPC`, `blocking UI`, `freeze`, `treo app`, `đứng app`, `block UI`
81
- - **Paths:** any `.rs`; `src-tauri/**`, `tauri.conf.json`, `Cargo.toml`, `capabilities/*.json`
82
- - **Actions:** adding/editing any `#[tauri::command]`, touching window/IPC code, bumping app version, diagnosing an app freeze/hang
83
-
84
- ### RULE-db-design.md
85
- Load if message or file path contains any of:
86
- - **Keywords:** `schema`, `migration`, `D1`, `SQL`, `database design`, `ERD`, `refactor DB`, `event sourcing`, `bounded context`, `normalization`, `1NF`, `table design`, `thiết kế db`, `thiết kế database`, `migration DB`
87
- - **Paths:** any `.sql`; `migrations/**`, `schema.sql`, `**/d1/**`
88
- - **Actions:** designing a new table/schema, writing a DB migration, refactoring how data is stored
89
-
90
- ### METHOD-audit-flow.md
91
- Load if message contains any of:
92
- - **Keywords:** `refactor`, `restructure`, `simplify`, `fragile`, `complicated`, `state machine`, `async chain`, `tại sao phức tạp`, `luồng`, `luồng xử lý`, `tracing`, `cause and effect`, `over-guarded`, `nested conditional`, `điều kiện lồng nhau`, `timing issue`, `race condition`, `tái cấu trúc`, `đơn giản hóa`
93
- - **Context:** fixing a bug spanning multiple files, tracing cause and effect across a chain
94
-
95
- ### RULE-biz.md
96
- Load if message or file path contains any of:
97
- - **Keywords:** `pricing`, `price`, `monetization`, `monetize`, `positioning`, `USP`, `target audience`, `customer`, `market`, `marketing`, `conversion`, `landing page`, `business model`, `revenue`, `tier`, `plan`, `subscription`, `giá`, `định giá`, `kiếm tiền`, `khách hàng`, `thị trường`, `đối tượng`, `chuyển đổi`, `mô hình kinh doanh`, `doanh thu`, `gói`, `định vị`
98
- - **Paths:** `docs/biz/**`
99
- - **Context:** any market-facing decision — evaluating an idea's commercial shape, writing/reviewing landing or sales copy, creating or editing `docs/biz/`, deciding what to charge or who the product is for
100
-
101
- ### METHOD-ux-psych.md
102
- Load if message contains any of:
103
- - **Keywords:** `UX`, `user experience`, `usability`, `user behavior`, `user psychology`, `onboarding`, `user flow`, `friction`, `cognitive load`, `empty state`, `first run`, `dead end`, `dark pattern`, `trải nghiệm người dùng`, `tâm lý người dùng`, `hành vi người dùng`, `khó dùng`, `rối`, `luồng người dùng`, `đánh giá giao diện`, `review UI`, `review UX`
104
- - **Context:** evaluating an interface or flow through user behavior (not just visual styling — that is `RULE-ui-pattern.md`), designing an onboarding/conversion flow, diagnosing "why don't users do X"
105
-
106
- ### METHOD-audit-zero-trust.md
107
- Load if message contains any of:
108
- - **Keywords:** `audit khắt khe`, `ép rule`, `force audit`, `quét tuyệt đối`, `zero-trust audit`, `rà soát toàn bộ`, `quét toàn dự án`, `chứng minh sạch`, `audit tuyệt đối`
109
- - **Context:** when the user asks for an uncompromising sweep — of the whole project or of a change plus everything that reads it — that must be driven by detectors rather than by impression. Read-only: it produces a short findings report, not fixes.
110
-
111
- ### METHOD-deep-think.md
112
- Load if message contains any of:
113
- - **Keywords:** `new feature`, `tính năng mới`, `should we`, `có nên`, `simplest way`, `đơn giản nhất`, `is this worth`, `có đáng`, `tradeoff`, `scope creep`, `mở rộng scope`, `premature`, `complexity`, `abstraction`, `tooling`, `first principles`, `tư duy nguyên bản`, `phản biện`, `mục tiêu tối thượng`, `one-way door`, `quyết định lớn`, `decision record`, `pre-mortem`, `evaluate`, `assess`, `review the approach`, `worth refactoring`, `good idea`, `side effect`, `edge case`, `đánh giá`, `bàn luận`, `nên refactor`, `đánh giá ý tưởng`, `đánh giá chiến lược`, `tác dụng phụ`, `trường hợp biên`, `leo thang`, `hỏi owner`, `mâu thuẫn`, `bế tắc`, `thử lại vẫn lỗi`, `tự chốt`
114
- - **Context:** architectural or tooling decision, scope or effort/value discussion, a big or hard-to-reverse decision, a request for first-principles/critique-style thinking, *discussing/evaluating* (rather than just executing) a refactor, a code review, a strategy/plan, or an idea — the four cases that trigger Module 5 (MVP focus, side-effects/edge-cases weighed by severity) — plus, at extra sensitivity: about to ask or escalate to the owner, a fix that failed twice, conflicting rules/instructions, owner wording with multiple readings. `agent.A3` is the mechanical floor for escalation; this line is additional routing sensitivity on top of it, not a replacement.
115
-
116
- ### METHOD-proportionality.md
117
- Load if message contains any of:
118
- - **Keywords:** `rate limit`, `quota`, `throttle`, `abuse`, `spam`, `bot`, `exploit`, `bypass`, `tamper`, `client-side check`, `guard`, `defensive`, `hardening`, `threat model`, `attack surface`, `over-engineering`, `overthinking`, `paranoid`, `is it worth defending`, `lạm dụng`, `giới hạn`, `chặn`, `hạn mức`, `phòng thủ`, `bảo mật quá mức`, `nghĩ quá nhiều`, `vẽ vời`, `có cần chặn không`, `bao nhiêu user`, `mấy ai làm được`, `rủi ro`, `mức độ nghiêm trọng`
119
- - **Context:** any proposal to add, keep, size, or remove a guard / limit / validation / permission check; deciding whether a client-side restriction is enough; accepting a risk deliberately; weighing MVP speed against security or abuse resistance. Also load when a discussion is stacking protection with no evidence of who could actually reach the state being protected.
120
-
121
- ### METHOD-audit-subtraction.md
122
- Load if message contains any of:
123
- - **Keywords:** `subtraction audit`, `dead code`, `unused`, `unreferenced`, `bloat`, `strip down`, `minimize the repo`, `tối giản tuyệt đối`, `tối giản tối đa`, `tinh gọn toàn bộ`, `cắt giảm tối đa`, `dọn sạch repo`, `xoá code thừa`, `code chết`, `refactor hạng nặng`, `không còn gì để bớt`, `gọn nhất có thể`
124
- - **Context:** a request to minimize or strip an existing repository rather than to check its correctness. Pairs with `METHOD-audit-zero-trust.md`, whose scope-lock, detector-first order and evidence classes it inherits. Read-only: it reports and plans removals, it never deletes.
29
+ | File | Load when the task … | Signals — each stands for a concept; any synonym, in any language, counts the same (EN · VI) |
30
+ |---|---|---|
31
+ | `RULE-docs.md` | creates, edits, moves or completes any Markdown, doc, plan, instruction file (`CLAUDE.md`, `SKILL.md`, `README`, `CHANGELOG`), or checks docs against the code | any `.md`, `docs/**`, `SKILL.md`; docs, plan, README, diagram, mermaid, architecture, drift, stale/outdated docs · tài liệu, sơ đồ, kiến trúc, lệch, lỗi thời, rà soát tài liệu |
32
+ | `RULE-content-write.md` | writes, renames or audits text an end user reads — UI copy, messages, labels, i18n strings, page metadata copy | button/label/heading, error message, tooltip, empty state, tone, i18n, locale, translation, `locales/**`, renaming a user-facing term · nội dung giao diện, nhãn, thông báo lỗi, bản dịch |
33
+ | `RULE-stack-akiNuxtCf.md` | works in a Nuxt / Vue / Cloudflare Pages-Workers project — ON for the whole project when its binding names that stack | `.vue`, `nuxt.config`, `wrangler.toml`, Nuxt, Vue, Cloudflare Workers/Pages, D1, KV, Nitro, composable, middleware, `useFetch`, breadcrumb, layout width |
34
+ | `RULE-stack-tauri.md` | works in a Tauri / Rust desktop project — ON for the whole project | `.rs`, `src-tauri/`, `tauri.conf.json`, `Cargo.toml`, `#[tauri::command]`, IPC, `spawn_blocking`, freeze, hang, blocking UI, settings breaking after an upgrade · treo app, đứng app, đơ, khựng |
35
+ | `RULE-ui-pattern.md` | builds, styles, minimizes or audits frontend components, classes, tokens or style blocks | `.vue`/`.css`/`.scss`/`.tsx`, Tailwind, class, style block, inline style, design token, variant, `@apply`, `@theme`, arbitrary value, duplicate/bloated CSS, looks inconsistent · dọn CSS, class trùng, tối giản CSS, nhiều CSS quá |
36
+ | `RULE-seo.md` | shapes how pages are found or represented — metadata, structured data, sitemap/robots, canonical/hreflang, search or AI visibility, entity identity | SEO, meta title/description, OG image, JSON-LD, schema.org, sitemap, robots, canonical, hreflang, trailing slash, AI visibility, not indexed · không lên Google |
37
+ | `RULE-release.md` | records, versions, commits, pushes, tags, publishes, deploys or migrates; watches CI or verifies a deploy; or asks whether finished work is shippable | commit, push, deploy, tag, release, release notes, `CHANGELOG`, version, semver, bump, publish, npm/registry, 2FA/OTP, CI, GitHub Actions, migration, post-deploy, health check, "is it done / ready to ship?" · phát hành, phiên bản, nâng version, đẩy lên, triển khai, xong chưa, CI đỏ |
38
+ | `RULE-db-design.md` | designs or changes the shape of stored data — schema, migration, query structure, data refactor | `.sql`, `migrations/`, schema, table, column, index, D1, SQL, ERD, event sourcing, normalization, keeping history of a value, choosing a database · thiết kế DB, đổi schema, thêm cột |
39
+ | `RULE-biz.md` | makes a market-facing decision — audience, positioning, pricing, offer, sales/landing copy, `docs/biz/` | pricing, plan/tier, subscription, monetization, revenue, positioning, USP, target audience, customer, market, conversion, landing page, `docs/biz/` · định giá, gói, khách hàng, thị trường, định vị, doanh thu |
40
+ | `METHOD-audit-flow.md` | refactors or debugs across a chain of steps or files, or meets guards/fallbacks accumulating around one path, async/state/timing trouble | refactor, restructure, simplify, fragile, flaky, race condition, timing, state machine, async chain, nested conditionals, repeated guards, patchwork, a guard or fallback for a state the docs rule out, a fix that keeps not holding · luồng xử lý, điều kiện lồng nhau, tái cấu trúc, chắp vá, hiển nhiên, native flow, lúc được lúc không |
41
+ | `METHOD-deep-think.md` | evaluates, decides, critiques or discusses rather than only executes — approach choice, tradeoff, scope, value, strategy, a review of an idea/plan/rule | should we, is it worth it, which option, tradeoff, scope, first principles, critique, pre-mortem, edge case, side effect, one-way door, stuck after repeated failures, the owner hands over the decision, conflicting instructions, ambiguous wording · có nên, có đáng, đánh giá, phản biện, bế tắc, thử lại vẫn lỗi, tự chốt, mâu thuẫn |
42
+ | `METHOD-ux-psych.md` | judges an interface or flow by how users will behave | UX, usability, onboarding, user flow, friction, cognitive load, drop-off, conversion, no feedback after an action, dead end, dark pattern · khó dùng, rối, trải nghiệm người dùng, bỏ ngang |
43
+ | `METHOD-proportionality.md` | adds, keeps, sizes or removes a guard, limit, validation or permission, or accepts a risk deliberately | rate limit, quota, throttle, abuse, spam, bot, bypass, tamper, client-side check, hardening, threat model, over-engineering, overkill · chặn, giới hạn, lạm dụng, phòng thủ, vẽ vời, rủi ro, mấy ai làm được |
44
+ | `METHOD-audit-zero-trust.md` | demands an uncompromising, proof-driven sweep of a project or of a change plus everything that reads it | zero-trust audit, strict audit, sweep the whole project, miss nothing, prove it with tool output · audit khắt khe, rà soát toàn bộ, quét tuyệt đối, chứng minh sạch |
45
+ | `METHOD-audit-subtraction.md` | asks to minimize, strip or clean out what no longer needs to exist | dead code, unused, unreferenced, bloat, redundant guard or fallback, comment restating a known fact, strip down, lean as possible, heavy cleanup · code chết, code thừa, hiển nhiên, tối giản tối đa, dọn sạch repo, tinh gọn |
46
+ | `METHOD-audit-frozen-reference.md` | judges conformance to a concrete reference implementation (another repo, a pinned version, a specific file) at any strictness | frozen/pinned reference, canonical implementation, reference project, template repo, byte-identical, structurally identical, drifted from the original · đối chiếu, giống hệt, y hệt, lệch chuẩn, khớp chuẩn, so với dự án gốc |
125
47
 
126
- ---
48
+ **Sequential full audit** — the task asks to check a codebase thoroughly across every standard, one after another: load `zero-trust`, `flow`, `subtract`, `docs`, `content`, plus `ui` for a frontend, and run the passes in this order, each read-only: detectors (`zero-trust.B`) → structure (`pattern` laws, `flow`) → subtraction (`subtract`) → docs drift both directions (`docs.C`) → content (`content.C2`). One report, severity-ranked; fixes are a separate run (`agent.B5`).
127
49
 
128
- ## Tier 2 — Full load
50
+ **Deep-think depth** — when the `deep-think` route fires and the decision is a one-way door, the goal is unclear, it changes documented design or shared rules, or an `agent.A3` trigger holds: run `/akithink` in self-run mode without asking. The interactive session runs only when the owner asks for one.
129
51
 
130
- **Trigger** — match any of the following (case-insensitive): `nạp full`, `load full`, `full load`, `nạp tất cả rule`, `load all rules`, `full akirule`, `nạp hết rule`
52
+ ## Full load
131
53
 
132
- **Protocol — execute in order:**
133
- 1. Run `ls ~/.aki/akidevrule/RULE-*.md ~/.aki/akidevrule/METHOD-*.md` to discover the actual file list
134
- 2. Read each file returned (skip anything under `ref-ECC/`)
135
- 3. Emit the `[RULES]` receipt per § Load confirmation, with the loaded set marked `(router:full)`
136
-
137
- ---
54
+ The owner asks, in any wording, to load the whole corpus: `ls ~/.aki/akidevrule/RULE-*.md ~/.aki/akidevrule/METHOD-*.md`, read every file (never `ref-ECC/`), and mark the set `(router:full)` in the receipt.
138
55
 
139
56
  ## Load confirmation — the `[RULES]` receipt
140
57
 
141
- One line at the start of the response, reporting the **whole rule context**, not this skill's delta:
58
+ One line at the start of the response, reporting the **whole rule context**:
142
59
 
143
60
  ```
144
- [RULES] agent,coding,pattern (core) + docs,ui (router) | missing: none
61
+ [RULES] agent,coding,pattern (core) + docs,ui (router)
145
62
  ```
146
63
 
147
64
  | Element | Rule |
148
65
  |---|---|
149
- | Names | topic addresses per the manifest Topic column (`~/.aki/akidevrule/index.md` § addressing scheme). No new vocabulary. |
150
- | `(core)` | the four `@`-imported files. Always listed, even though this skill did not load them: their presence is otherwise unobservable, and they are the most-violated group. Listing them reports context state; it does not claim credit for the load. |
151
- | `(router)` | files this skill loaded this turn. Tier 2 writes `(router:full)`. |
152
- | `(brief)` | for a worker/subagent — the files its spawning prompt named and it actually read. A worker inherits no router, so it uses this instead of `(router)` and emits the line as the first line of its single round (`agent.A5`). |
153
- | `missing:` | every file that was required and could not be read, else `none`. `[RULES] none \| missing: agent` is the loudest case and the reason this field exists. |
154
-
155
- **The line is mandatory.** The session agent emits it on its first response of the session, and again on any turn where the set changes; a worker emits it always. Silence is never "nothing loaded" — a missing line is indistinguishable from a router that never ran, and those are different bugs with opposite fixes. With the line mandatory, a later turn without one carries exactly one meaning: the set is unchanged since the last line printed.
66
+ | Names | topic addresses from the `index.md` manifest Topic column — no new vocabulary |
67
+ | `(core)` | the three core rule files, always listed: their presence is otherwise unobservable |
68
+ | `(router)` | files this router loaded; full load writes `(router:full)` |
69
+ | `(brief)` | a worker/subagent's files named by its spawning prompt and actually read — it inherits no router, and emits the line first in its single round (`agent.A5`) |
156
70
 
157
- The receipt is **self-reported: a diagnostic signal, never evidence** (`agent.B2`). Do not gate closure on it. The cross-check that does carry weight is the agent definition's declared rule manifest against the line it emitted — a mismatch is a finding.
71
+ **Mandatory:** the session agent emits it on its first response and on every turn where the set changes; a worker always. A later turn without one means exactly: set unchanged. The line is self-reported — a diagnostic signal, never evidence of conduct (`agent.B2`).
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: akiship
3
- description: Full release ritual end-to-end — front-loaded checks, then an unattended pass. ACTIVATION = an imperative turn ordering the release for this repo — the literal token `/akiship`, or an explicit ship/release order ("release trọn vẹn đi", "chạy full release"). A question about it, or a completion word with no release object ("làm cho trọn vẹn"), activates nothing — consult the checklist and answer in chat, read-only. Sequences RULE-release.md B7's checklist under the B8 autonomy contract; the escalation floor, completion-intensity semantics, and push/deploy authorization are owned by B8 and referenced, never restated, here.
3
+ description: Full release ritual end-to-end — front-loaded checks, then an unattended pass. ACTIVATION = the literal token `/akiship`, or an imperative turn, in any language, ordering the release ritual for this repo. A question about it, or a completion word with no release object, activates nothing — consult the checklist and answer in chat, read-only. Sequences RULE-release.md B7's checklist under the B8 autonomy contract; the escalation floor, completion-intensity semantics, and push/deploy authorization are owned by B8 and referenced, never restated, here.
4
4
  ---
5
5
 
6
6
  # akiship — one-command full release
@@ -12,7 +12,7 @@ Invoke with `/akiship` or an explicit release order, only as described in § Act
12
12
  **This skill sequences; it owns no content.** The checklist is `RULE-release.md` (B5 migration doctrine, B7 fail-closed gate, B8 autonomy contract, B10 CI, B11 post-deploy verification) and doc sync is `RULE-docs.md`. Both are installed at `~/.aki/akidevrule/`.
13
13
 
14
14
  1. `Read` `~/.aki/akidevrule/RULE-release.md` IN FULL and `~/.aki/akidevrule/RULE-docs.md` as the FIRST tool calls after this skill loads. Keyword routing, memory of an earlier session, this file's summary, and a rule that happens to be in context do NOT count as loading — only a `Read` performed in THIS run does.
15
- 2. Emit as the first line of the run: `[RULES] agent,coding,pattern (core) + release,docs (akiship) | missing: none`. Any file that could not be read goes under `missing:` and the run STOPS there.
15
+ 2. Emit as the first line of the run: `[RULES] agent,coding,pattern (core) + release,docs (akiship)`. If either file could not be read, say so and the run STOPS there.
16
16
  3. A run that starts Phase 1 without those two `Read` calls is INVALID: every finding, commit, tag and deploy it produces is unauthorized and MUST be reported as such. Compliance is checked against the tool-call log, never against the receipt line (`agent.B2`).
17
17
 
18
18
  If a step in this file disagrees with the rule file, the rule file wins — except the activation gate below, which this skill owns outright (`pattern.A1`) and which no rule file, keyword list, or routing table may widen.
@@ -20,7 +20,7 @@ If a step in this file disagrees with the rule file, the rule file wins — exce
20
20
 
21
21
  ## Activation gate — two conditions, both required, checked before anything else
22
22
 
23
- **1. Release order.** The current user turn carries either the exact token `/akiship`, or a turn explicitly ordering the release ritual for this repo — "release trọn vẹn đi", "ship đợt này luôn", "chạy full release". A completion-intensity phrase with no release object ("làm cho trọn vẹn") activates nothing: it names no ritual, so it is ordinary vocabulary about finishing something, not an order to run this skill. Seeing this file, or `release.B8`, in context is not an invocation either: being loaded is not being called.
23
+ **1. Release order.** The current user turn carries either the exact token `/akiship`, or a turn explicitly ordering the release ritual for this repo, in any wording (worked examples in the table below). A completion-intensity phrase with no release object activates nothing: it names no ritual, so it is ordinary vocabulary about finishing something, not an order to run this skill. Seeing this file, or `release.B8`, in context is not an invocation either: being loaded is not being called.
24
24
 
25
25
  **2. Imperative, not interrogative** (`agent.A3`). The order alone authorizes nothing — the turn must ask for the run to be *performed*. Where both readings are available, consult.
26
26
 
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  name: akithink
3
- description: Structured deep-thinking session between agent and human for important decisions — restate the problem, excavate the goal chain to the ultimate goal, first-principles decomposition (facts/constraints/assumptions), mandatory critique (steelman, inversion, pre-mortem), then converge into a decision record. For big / hard-to-reverse / goal-ambiguous problems — small inline questions are already covered passively by akirule + METHOD-deep-think. Also runnable self-run (non-interactive) when owner-authorized or fired by an `agent.A3` trigger. Recommends running on a top-tier model (Opus/Fable).
3
+ description: Structured deep thinking for decisions — restate the problem, excavate the goal chain to the ultimate goal, first-principles decomposition (facts/constraints/assumptions), mandatory critique (steelman, inversion, pre-mortem), then converge into a decision record. Thinking only: it never edits, runs or ships anything — what happens after the record is decided by the originating turn's class (`agent.A3`), outside this skill. Self-run mode (non-interactive, decide and report) fires on an `agent.A3` deep-think trigger or on owner authorization; trivial two-way-door calls stay inline. Interactive session only when the owner asks for one. Best on a top-tier model (Opus/Fable).
4
4
  ---
5
5
 
6
6
  # akithink — structured deep-thinking session
7
7
 
8
- Invoke with `/akithink`, or when the user explicitly asks for a deep-thinking session on a decision ("let's think this through properly", "hãy tư duy sâu về việc này", "cần một session suy nghĩ kỹ"). This is the **active** consumption mode of `payload/METHOD-deep-think.md` — the same analytical brain that akirule loads passively for ordinary tasks, run here at maximum depth through an interactive protocol.
8
+ The **active** consumption mode of `payload/METHOD-deep-think.md` — the same analytical brain the router loads passively for ordinary tasks, run at maximum depth: interactively when the owner asks for a session, in self-run mode when an `agent.A3` deep-think trigger holds (Invocation scope). It thinks; it never acts (`pattern.A3`).
9
9
 
10
10
  ## When NOT to use this skill
11
11
 
12
- Small, reversible, low-cost-of-error decisions should just be decided. Casual "should we…?" questions are already handled inline by akirule auto-loading `METHOD-deep-think.md` passively — that is enough for two-way-door decisions. Reach for `/akithink` only when the decision is big, hard to reverse (one-way-door), or the goal itself is still unclear. Do not open a session for something that a one-paragraph answer would resolve.
12
+ Trivial, reversible execution with nothing to decide gets no session — act. An interactive session is reserved for a decision the owner wants to reason through together; a decision that meets an `agent.A3` trigger runs in self-run mode (see Invocation scope), scaled in depth to how hard the decision is to reverse; a two-way-door call is decided inline.
13
13
 
14
14
  ## Toolbox
15
15
 
@@ -50,18 +50,19 @@ Then:
50
50
  ## Interaction rules
51
51
 
52
52
  - **Pacing:** ask 1–2 highest-value questions per turn. `AskUserQuestion` is fine for discrete choices. Never dump a full questionnaire in one turn.
53
- - **Escape hatch:** the user can say "chốt" (or an equivalent "let's converge/decide now") at any point to jump straight to Phase 5 with whatever has been established so far.
53
+ - **Escape hatch:** the user can ask to converge or decide now, in any wording, at any point to jump straight to Phase 5 with whatever has been established so far.
54
54
  - **Anti-sycophancy:** same rule as METHOD Module 3 — do not agree without critique, in any phase.
55
55
  - **Anti-overuse guard:** if the problem turns out to be small and reversible once restated in Phase 1, say so and offer to just decide it directly instead of running the full protocol.
56
56
 
57
57
  ## Self-run mode
58
58
 
59
- Runs all phases without waiting, when the owner authorizes the agent to run it itself (e.g. "tự nạp /akithink", "tự chốt", "cho bạn tự quyết") or when fired by an `agent.A3` deep-think trigger:
59
+ Runs all phases without waiting, when the owner authorizes the agent to decide on its own, in any wording, or when fired by an `agent.A3` deep-think trigger:
60
60
  - Phase 1 restatement is written, not confirmed.
61
61
  - The Interaction rules pacing (1–2 questions per turn) does not apply — no questions are asked mid-session.
62
62
  - Questions reach the owner only via `agent.A3`'s escalation outcomes, never through this skill's own turn-by-turn interaction.
63
- - Phase 5 converges, acts, and reports the decision block (`agent.A3`'s converged outcome). A decision-record doc per `RULE-docs.md` still applies when the decision is durable.
63
+ - Phase 5 converges and reports the decision block (`agent.A3`'s converged outcome), and the session ends there. This skill thinks and never acts (`pattern.A3`): whether anything is then executed is decided by the class of the originating turn — a task turn proceeds under `agent.A3`, a question turn gets the block and nothing else. A decision-record doc per `RULE-docs.md` still applies when the decision is durable.
64
64
 
65
65
  ## Invocation scope
66
66
 
67
- Interactive mode is explicit-invoke only — akirule does not auto-trigger the interactive protocol; it is reached only when the user asks for it by name or in equivalent words. Self-run mode above is the exception: it fires from an `agent.A3` trigger or owner authorization, without an explicit `/akithink` invocation. The signals that matter for passive-mode auto-loading live on `METHOD-deep-think.md`.
67
+ - **Self-run — model-invoked, no confirmation.** Fires on an `agent.A3` deep-think trigger (that list is the only trigger list — not restated here), on the router's deep-think-depth line (`akirule`), or on owner authorization. Two-way-door work stays below it: decide inline with `METHOD-deep-think.md` passively.
68
+ - **Interactive — owner-invoked only**, by name or in equivalent words; never auto-started, because it spends the owner's turns.
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Transitional Unix wrapper — the Python file is the SSOT (cross-platform, incl. Windows).
3
- # Kept so existing prompts/docs that name "council-cost.sh" keep working on Unix during the transition.
4
- exec python3 "$(dirname "$0")/council_cost.py" "$@"
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Transitional Unix wrapper — the Python file is the SSOT (cross-platform, incl. Windows).
3
- # Kept so existing prompts/docs that name "council-open.sh" keep working on Unix during the transition.
4
- exec python3 "$(dirname "$0")/council_open.py" "$@"
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Transitional Unix wrapper — the Python file is the SSOT (cross-platform, incl. Windows).
3
- # Kept so existing prompts/docs that name "council-read.sh" keep working on Unix during the transition.
4
- exec python3 "$(dirname "$0")/council_read.py" "$@"
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Transitional Unix wrapper — the Python file is the SSOT (cross-platform, incl. Windows).
3
- # Kept so existing prompts/docs that name "council-verify.sh" keep working on Unix during the transition.
4
- exec python3 "$(dirname "$0")/council_verify.py" "$@"
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Transitional Unix wrapper — the Python file is the SSOT (cross-platform, incl. Windows).
3
- # Kept so existing prompts/docs that name "scythe.sh" keep working on Unix during the transition.
4
- exec python3 "$(dirname "$0")/scythe.py" "$@"