@akinet/akidevrule 3.3.1 → 3.5.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.
- package/CHANGELOG.md +56 -0
- package/README.md +34 -29
- package/claude/CLAUDE.md +5 -6
- package/claude/agents/aki-challenger.md +1 -1
- package/claude/agents/aki-conduct.md +2 -2
- package/claude/agents/aki-hands.md +4 -4
- package/claude/agents/aki-judge.md +2 -2
- package/claude/agents/aki-maker.md +2 -2
- package/install.mjs +115 -292
- package/lib/permissions.mjs +244 -0
- package/package.json +5 -2
- package/payload/GEMINI.md +2 -0
- package/payload/METHOD-audit-frozen-reference.md +33 -0
- package/payload/METHOD-audit-zero-trust.md +1 -1
- package/payload/METHOD-deep-think.md +1 -1
- package/payload/RULE-agent-behavior.md +4 -2
- package/payload/RULE-coding.md +2 -1
- package/payload/RULE-content-write.md +3 -3
- package/payload/RULE-docs.md +27 -6
- package/payload/RULE-pattern-core.md +1 -1
- package/payload/RULE-release.md +37 -17
- package/payload/RULE-seo.md +15 -13
- package/payload/RULE-stack-akiNuxtCf.md +1 -0
- package/payload/RULE-ui-pattern.md +1 -1
- package/payload/index.md +14 -10
- package/skills/aki-article-writer/SKILL.md +7 -7
- package/skills/aki-article-writer/references/article-workflow.md +11 -15
- package/skills/akidevsync-notes/SKILL.md +1 -1
- package/skills/akiflow/references/harness-facts.md +8 -6
- package/skills/akiflow/scripts/release_lint.py +157 -0
- package/skills/akihelp/SKILL.md +7 -7
- package/skills/akihtmlreport/SKILL.md +1 -1
- package/skills/akilint/SKILL.md +1 -1
- package/skills/akiopen/SKILL.md +38 -0
- package/skills/akirule/SKILL.md +46 -130
- package/skills/akiship/SKILL.md +6 -3
- package/skills/akithink/SKILL.md +8 -7
- package/skills/akiflow/scripts/council-cost.sh +0 -4
- package/skills/akiflow/scripts/council-open.sh +0 -4
- package/skills/akiflow/scripts/council-read.sh +0 -4
- package/skills/akiflow/scripts/council-verify.sh +0 -4
- package/skills/akiflow/scripts/scythe.sh +0 -4
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# release_lint.py — mechanical checks for the release record surfaces RULE-release.md owns: CHANGELOG.md shape (C1) and releases.json parity + highlight (C2–C4).
|
|
3
|
+
# Usage: release_lint.py [--latest] [--all] <project-dir|CHANGELOG.md> [...] --latest checks only the newest version block (the B7 gate scope).
|
|
4
|
+
# Output: [TAG] path:line | short label Exit: 0 clean · 1 findings · 2 usage error. Same grammar as scythe.py.
|
|
5
|
+
# Verdict tags: [ORDER] sections out of canonical order · [SECTION] heading outside the closed vocabulary or duplicated · [LEVEL] version/section heading at the wrong level · [PARITY] version present in one surface and absent from the other · [TYPE] releases.json type outside new|improved|fixed|internal.
|
|
6
|
+
# Review tag (never a verdict): [HILITE] a version with a `new` change and no `highlight: true` line, more than two highlighted lines, a highlight not first, or a highlight on a `fixed`/`internal` line — a candidate for C2 judgment.
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import json
|
|
11
|
+
import re
|
|
12
|
+
import sys
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
SECTIONS = ['Added', 'Changed', 'Deprecated', 'Removed', 'Fixed', 'Security']
|
|
16
|
+
TYPES = {'new', 'improved', 'fixed', 'internal'}
|
|
17
|
+
HIGHLIGHT_MAX = 2
|
|
18
|
+
|
|
19
|
+
_VERSION = re.compile(r'^(#+)\s*\[?(v?\d+\.\d+\.\d+[^\]\s]*|Unreleased)\]?', re.I)
|
|
20
|
+
_SECTION = re.compile(r'^(#+)\s*(\S+)')
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _changelog_blocks(lines: list[str]) -> list[dict]:
|
|
24
|
+
"""Split a CHANGELOG into version blocks: {version, line, level, sections:[(name, line, level)]}."""
|
|
25
|
+
blocks: list[dict] = []
|
|
26
|
+
fence = False
|
|
27
|
+
for n, raw in enumerate(lines, 1):
|
|
28
|
+
if raw.lstrip().startswith(('```', '~~~')):
|
|
29
|
+
fence = not fence
|
|
30
|
+
continue
|
|
31
|
+
if fence or not raw.startswith('#'):
|
|
32
|
+
continue
|
|
33
|
+
vm = _VERSION.match(raw)
|
|
34
|
+
if vm and (not blocks or len(vm.group(1)) <= 2 or blocks[-1]['level'] == len(vm.group(1))):
|
|
35
|
+
blocks.append({'version': vm.group(2), 'line': n, 'level': len(vm.group(1)), 'sections': []})
|
|
36
|
+
continue
|
|
37
|
+
sm = _SECTION.match(raw)
|
|
38
|
+
if sm and len(sm.group(1)) == 2 and sm.group(2) != 'Changelog':
|
|
39
|
+
blocks.append({'version': None, 'line': n, 'level': 2, 'sections': [], 'heading': raw.lstrip('# ').strip()})
|
|
40
|
+
continue
|
|
41
|
+
if sm and blocks and blocks[-1]['version'] and len(sm.group(1)) > blocks[-1]['level']:
|
|
42
|
+
blocks[-1]['sections'].append((sm.group(2).strip('*').rstrip(':'), n, len(sm.group(1))))
|
|
43
|
+
return blocks
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def lint_changelog(path: Path, latest: bool) -> tuple[list[str], list[str]]:
|
|
47
|
+
lines = path.read_text(encoding='utf-8', errors='replace').splitlines()
|
|
48
|
+
blocks = _changelog_blocks(lines)
|
|
49
|
+
if latest:
|
|
50
|
+
blocks = blocks[:1]
|
|
51
|
+
findings: list[str] = []
|
|
52
|
+
for b in blocks:
|
|
53
|
+
if b['version'] is None:
|
|
54
|
+
findings.append(f"[SECTION] {path}:{b['line']} | H2 `{b['heading']}` is not a version heading")
|
|
55
|
+
continue
|
|
56
|
+
if b['level'] != 2:
|
|
57
|
+
findings.append(f"[LEVEL] {path}:{b['line']} | version heading at H{b['level']}, expected `## [{b['version']}] - <date>`")
|
|
58
|
+
names = [s[0] for s in b['sections']]
|
|
59
|
+
seen: set[str] = set()
|
|
60
|
+
for name, n, lvl in b['sections']:
|
|
61
|
+
if name not in SECTIONS:
|
|
62
|
+
findings.append(f"[SECTION] {path}:{n} | `{name}` is not one of {', '.join(SECTIONS)}")
|
|
63
|
+
elif name in seen:
|
|
64
|
+
findings.append(f"[SECTION] {path}:{n} | `{name}` repeated inside {b['version']}")
|
|
65
|
+
elif lvl != b['level'] + 1:
|
|
66
|
+
findings.append(f"[LEVEL] {path}:{n} | section at H{lvl}, expected H{b['level'] + 1}")
|
|
67
|
+
seen.add(name)
|
|
68
|
+
std = [x for x in names if x in SECTIONS]
|
|
69
|
+
if std != sorted(dict.fromkeys(std), key=SECTIONS.index) and len(set(std)) == len(std):
|
|
70
|
+
expected = ', '.join(sorted(std, key=SECTIONS.index))
|
|
71
|
+
findings.append(f"[ORDER] {path}:{b['line']} | {b['version']}: {', '.join(std)} — expected {expected}")
|
|
72
|
+
return findings, [b['version'].lstrip('v') for b in blocks if b['version']]
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def lint_releases(path: Path, changelog_versions: list[str], latest: bool) -> list[str]:
|
|
76
|
+
findings: list[str] = []
|
|
77
|
+
try:
|
|
78
|
+
data = json.loads(path.read_text(encoding='utf-8'))
|
|
79
|
+
except (OSError, json.JSONDecodeError) as e:
|
|
80
|
+
return [f"[PARITY] {path}:1 | unreadable releases.json ({e})"]
|
|
81
|
+
items = data if isinstance(data, list) else data.get('releases', [])
|
|
82
|
+
if latest:
|
|
83
|
+
items = items[:1]
|
|
84
|
+
text = path.read_text(encoding='utf-8').splitlines()
|
|
85
|
+
|
|
86
|
+
def line_of(version: str) -> int:
|
|
87
|
+
for n, raw in enumerate(text, 1):
|
|
88
|
+
if f'"{version}"' in raw:
|
|
89
|
+
return n
|
|
90
|
+
return 1
|
|
91
|
+
|
|
92
|
+
json_versions = [str(r.get('version', '')).lstrip('v') for r in items]
|
|
93
|
+
for v in [x for x in changelog_versions if x.lower() != 'unreleased']:
|
|
94
|
+
if v not in json_versions:
|
|
95
|
+
findings.append(f"[PARITY] {path}:1 | CHANGELOG version {v} has no releases.json entry")
|
|
96
|
+
for r, v in zip(items, json_versions):
|
|
97
|
+
n = line_of(v)
|
|
98
|
+
if v not in changelog_versions:
|
|
99
|
+
findings.append(f"[PARITY] {path}:{n} | releases.json version {v} has no CHANGELOG entry")
|
|
100
|
+
changes = r.get('changes', [])
|
|
101
|
+
for c in changes:
|
|
102
|
+
if c.get('type') not in TYPES:
|
|
103
|
+
findings.append(f"[TYPE] {path}:{n} | {v}: type `{c.get('type')}` not in {', '.join(sorted(TYPES))}")
|
|
104
|
+
hl = [c for c in changes if c.get('highlight')]
|
|
105
|
+
if not hl and any(c.get('type') == 'new' for c in changes):
|
|
106
|
+
findings.append(f"[HILITE] {path}:{n} | {v}: has a `new` change but no `highlight: true` (review)")
|
|
107
|
+
if len(hl) > HIGHLIGHT_MAX:
|
|
108
|
+
findings.append(f"[HILITE] {path}:{n} | {v}: {len(hl)} highlighted lines, more than {HIGHLIGHT_MAX} (review)")
|
|
109
|
+
if hl and changes and not changes[0].get('highlight'):
|
|
110
|
+
findings.append(f"[HILITE] {path}:{n} | {v}: highlighted line is not the first change (review)")
|
|
111
|
+
for c in hl:
|
|
112
|
+
if c.get('type') in ('fixed', 'internal'):
|
|
113
|
+
findings.append(f"[HILITE] {path}:{n} | {v}: highlight on a `{c.get('type')}` change, C2 allows only new/improved (review)")
|
|
114
|
+
return findings
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def lint_target(target: str, latest: bool) -> list[str]:
|
|
118
|
+
p = Path(target)
|
|
119
|
+
changelog = p if p.is_file() else p / 'CHANGELOG.md'
|
|
120
|
+
if not changelog.is_file():
|
|
121
|
+
print(f"release_lint: no CHANGELOG.md at {target}", file=sys.stderr)
|
|
122
|
+
sys.exit(2)
|
|
123
|
+
findings, versions = lint_changelog(changelog, latest)
|
|
124
|
+
releases = changelog.parent / 'app' / 'data' / 'releases.json'
|
|
125
|
+
if releases.is_file():
|
|
126
|
+
findings.extend(lint_releases(releases, versions, latest))
|
|
127
|
+
return findings
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def main() -> None:
|
|
131
|
+
latest = '--latest' in sys.argv
|
|
132
|
+
show_all = '--all' in sys.argv
|
|
133
|
+
targets = [a for a in sys.argv[1:] if not a.startswith('--')]
|
|
134
|
+
if not targets:
|
|
135
|
+
print("usage: release_lint.py [--latest] [--all] <project-dir|CHANGELOG.md> [...]", file=sys.stderr)
|
|
136
|
+
sys.exit(2)
|
|
137
|
+
findings: list[str] = []
|
|
138
|
+
for t in targets:
|
|
139
|
+
findings.extend(lint_target(t, latest))
|
|
140
|
+
if not findings:
|
|
141
|
+
sys.exit(0)
|
|
142
|
+
cap = 40
|
|
143
|
+
shown = findings if show_all or len(findings) <= cap else findings[:cap]
|
|
144
|
+
for line in shown:
|
|
145
|
+
print(line)
|
|
146
|
+
if len(shown) < len(findings):
|
|
147
|
+
counts: dict[str, int] = {}
|
|
148
|
+
for line in findings:
|
|
149
|
+
tag = line.split()[0]
|
|
150
|
+
counts[tag] = counts.get(tag, 0) + 1
|
|
151
|
+
print(f"--- {len(findings) - cap} more findings suppressed ---")
|
|
152
|
+
print(' '.join(f"{t} {c}" for t, c in counts.items()) + f" (total {len(findings)})")
|
|
153
|
+
sys.exit(1)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
if __name__ == '__main__':
|
|
157
|
+
main()
|
package/skills/akihelp/SKILL.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: akihelp
|
|
3
|
-
description: Introduce the whole Aki Claude Code system — installed skills, the akirule
|
|
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
|
|
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
|
|
22
|
-
- **One brain, three modes** — `METHOD-deep-think.md` is read passively by
|
|
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?"*
|
|
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 |
|
|
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:
|
|
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
|
|
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
|
|
package/skills/akilint/SKILL.md
CHANGED
|
@@ -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
|
|
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
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: akiopen
|
|
3
|
+
description: Session-opening brief — what is still pending in this project, and nothing else. Use whenever a session opens on a project or the owner asks, in any wording, what is unfinished, what the active plans or notes say, what an inbox file still lists, or what to pick up next. Read-only; reports only what needs doing, in a fixed four-field shape, ranked by severity.
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# akiopen — what is pending here
|
|
8
|
+
|
|
9
|
+
Opening a project means rebuilding the picture of unfinished work from five places nobody should have to remember (`ux.A2`). This skill reads all five in one pass and reports only what still needs doing. It is an audit (`agent.B5`): no file edits, no git mutation, no note or plan marked done.
|
|
10
|
+
|
|
11
|
+
## Scan — one batched pass, only surfaces that exist
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
git status --short && git diff --stat | tail -1
|
|
15
|
+
python3 ~/.claude/skills/akidevsync-notes/scripts/notes_cli.py .akidevsync/notes.json list --pending --detail
|
|
16
|
+
grep -c '^\s*- \[ \]' docs/plan/*.md docs/*.md /dev/null 2>/dev/null | grep -v ':0$'
|
|
17
|
+
awk '/^## \[Unreleased\]/{f=1;next} /^## \[/{f=0} f' CHANGELOG.md | grep -c '^- '
|
|
18
|
+
grep -rn -i 'needs owner\|needs mac\|manual test\|unverified' docs/plan/*.md 2>/dev/null
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
| Surface | Pending means |
|
|
22
|
+
|---|---|
|
|
23
|
+
| Working tree | modified or untracked files; group them by directory, not one line per file |
|
|
24
|
+
| Notes | `.akidevsync/notes.json` tasks with `done: false`; pinned first |
|
|
25
|
+
| Active plans | `docs/plan/*.md` outside `done/` with open `- [ ]` items, or a plan whose text says done but still sits outside `done/` (`docs.B1`) |
|
|
26
|
+
| Inbox files | any top-level `docs/*.md` with open `- [ ]` items — tasks pushed in from an upstream standard or another repo |
|
|
27
|
+
| Release | `[Unreleased]` has entries, or the tree changed with no entry yet (`release.A`) |
|
|
28
|
+
| Hand-offs | a line in an active plan waiting on the owner or another machine (`coding.B5`) |
|
|
29
|
+
|
|
30
|
+
A surface the project does not have is skipped silently. A project `CLAUDE.md` may name additional inbox or plan paths; read it before scanning.
|
|
31
|
+
|
|
32
|
+
## Report — pending only, never an inventory
|
|
33
|
+
|
|
34
|
+
- One item per pending thing, at most seven, ranked by severity (`ux.C1`); the rest collapse into one count line.
|
|
35
|
+
- Each item carries four fields: **problem** (what is pending, `path:line`) · **why it is still open** (from the plan text, note age, git dates — measured, never guessed; write *unclear* when the sources do not say) · **proposal** (one sentence) · **goal** (what closes it).
|
|
36
|
+
- Nothing pending: one line, nothing else.
|
|
37
|
+
- Half-finished work that cannot be told from an abandoned experiment is reported as unclassified and asked about, never sorted by guess (`agent.B5`).
|
|
38
|
+
- The report is the deliverable. Fixing anything, including moving a finished plan to `done/`, is a separate request.
|
package/skills/akirule/SKILL.md
CHANGED
|
@@ -1,157 +1,73 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: akirule
|
|
3
|
-
description: Aki's contextual rule router —
|
|
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
|
-
|
|
7
|
+
# akirule — contextual rule router
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Delivery
|
|
10
10
|
|
|
11
|
-
|
|
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
|
-
|
|
17
|
+
## How to route — meaning first, signals as evidence
|
|
14
18
|
|
|
15
|
-
|
|
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
|
-
|
|
25
|
+
## Routes
|
|
18
26
|
|
|
19
|
-
|
|
27
|
+
All files live in `~/.aki/akidevrule/`.
|
|
20
28
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
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, translates or audits text an end user reads — UI copy, messages, labels, i18n strings, page metadata copy, articles and posts | button/label/heading, error message, tooltip, empty state, tone, i18n, locale, translation, `locales/**`, renaming a user-facing term, article, blog/news post, announcement, content data file (`posts.ts`, `content/**`) · nội dung giao diện, nhãn, thông báo lỗi, bản dịch, bài viết, tin tức, bài đăng |
|
|
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, absolute vs relative URL, image path, AI visibility, not indexed · không lên Google, link ảnh |
|
|
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
|
+
**Publishable writing** — a task that writes, rewrites or translates an article, news or blog post, announcement or knowledge entry, in any wording, including "turn this release/finding into a post": invoke the `aki-article-writer` skill (the procedure) and load `content` and `seo` (the rules).
|
|
127
49
|
|
|
128
|
-
|
|
50
|
+
**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`).
|
|
129
51
|
|
|
130
|
-
**
|
|
52
|
+
**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.
|
|
131
53
|
|
|
132
|
-
|
|
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)`
|
|
54
|
+
## Full load
|
|
136
55
|
|
|
137
|
-
|
|
56
|
+
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
57
|
|
|
139
58
|
## Load confirmation — the `[RULES]` receipt
|
|
140
59
|
|
|
141
|
-
One line at the start of the response, reporting the **whole rule context
|
|
60
|
+
One line at the start of the response, reporting the **whole rule context**:
|
|
142
61
|
|
|
143
62
|
```
|
|
144
|
-
[RULES] agent,coding,pattern (core) + docs,ui (router)
|
|
63
|
+
[RULES] agent,coding,pattern (core) + docs,ui (router)
|
|
145
64
|
```
|
|
146
65
|
|
|
147
66
|
| Element | Rule |
|
|
148
67
|
|---|---|
|
|
149
|
-
| Names | topic addresses
|
|
150
|
-
| `(core)` | the
|
|
151
|
-
| `(router)` | files this
|
|
152
|
-
| `(brief)` |
|
|
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.
|
|
68
|
+
| Names | topic addresses from the `index.md` manifest Topic column — no new vocabulary |
|
|
69
|
+
| `(core)` | the three core rule files, always listed: their presence is otherwise unobservable |
|
|
70
|
+
| `(router)` | files this router loaded; full load writes `(router:full)` |
|
|
71
|
+
| `(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
72
|
|
|
157
|
-
|
|
73
|
+
**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`).
|
package/skills/akiship/SKILL.md
CHANGED
|
@@ -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 =
|
|
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)
|
|
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
|
|
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
|
|
|
@@ -45,6 +45,7 @@ Consult is the default whenever both readings are available. A withheld executio
|
|
|
45
45
|
Run B7 steps 2–7 in order, fixing findings as they surface (this is a gate, not an audit — no findings doc):
|
|
46
46
|
|
|
47
47
|
- **Hygiene, diff scope only**: `python3 ~/.claude/skills/akiflow/scripts/scythe.py <files changed since boundary>` for `[WRAP]`/`[YAP]`; dead code / redundant guards / duplication the accumulation introduced (`pattern.A8`); doc refs in touched comments still resolve (`docs.B3`). Never widen to the whole repo.
|
|
48
|
+
- **Record shape (B7 step 4)**: `python3 ~/.claude/skills/akiflow/scripts/release_lint.py --latest .` — verdict tags fixed in place; each `[HILITE]` line gets a written answer in the receipt (`release.C2`).
|
|
48
49
|
- **Migration & external-action completeness — FIRST gate step, every release.** Run the `release.B5` detector over the accumulation diff and paste its output. A hit (startup-embedded migration code included) obliges written answers to B5 points 2–5, including a rehearsal from the PREVIOUS state; a pending migration qualifying under `stack.C8`'s execution-ownership clause is run here, not deferred. Then record truthfulness (CHANGELOG + `releases.json` parity where it exists) and doc sync over every record surface B7 step 5 enumerates (plans → `done/`, `arch`/`feat` stamps per `docs.A4`, `README.md`, the task-note file via `akidevsync-notes`, any standards doc the project `CLAUDE.md` binds).
|
|
49
50
|
- **Build & test — mirror CI (B7 step 6)**: derive commands from `.github/workflows/*` first, else the manifest's own scripts; run them all locally; a failure blocks and is fixed in place, same as the hygiene step above; a CI-only leg (other-OS matrix, secrets) is named and left to `release.B10`.
|
|
50
51
|
- Verification honesty — anything else runtime-only, or a migration that does not qualify above, is carried to the final report as **unverified**, never silently assumed (`coding.B3`).
|
|
@@ -62,6 +63,8 @@ Run B7 steps 2–7 in order, fixing findings as they surface (this is a gate, no
|
|
|
62
63
|
|
|
63
64
|
Then one dense summary (`agent.A4`): state derived → findings fixed (counts per gate step) → commits made → version minted or deferred with the reason → artifacts created → CI results (`release.B10`) → any owner-worded criteria self-decided this run, as an `agent.A3` decision block (`Decided: X · because Y · rejected Z (why) · reopen if W`) → anything left **unverified**, each with the exact command that would settle it.
|
|
64
65
|
|
|
66
|
+
**The LAST block is the release copy, every run, in `release.B6`'s shape** — Headline, Short, Full, and the announce verdict — quoting the `releases.json` entry and GitHub Release body the run already wrote rather than composing a third text; a deferred version prints `deferred — no copy`. It is the owner's paste-ready text for whatever channel they announce on (a post, a notification, a store listing); the block never names a channel the project's own records do not.
|
|
67
|
+
|
|
65
68
|
## Boundaries
|
|
66
69
|
|
|
67
70
|
- Never write `PASS` on a gate step without quoted evidence (`release.B7` fail-closed contract). "Should", "presumably", "looks fine" score `unverified`.
|