@akinet/akidevrule 3.2.0 → 3.3.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 +8 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/payload/RULE-agent-behavior.md +7 -3
- package/payload/RULE-release.md +27 -4
- package/payload/index.md +2 -2
- package/skills/akirule/SKILL.md +1 -0
- package/skills/akiship/SKILL.md +16 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [Unreleased]
|
|
4
|
+
|
|
5
|
+
## [3.3.0] - 2026-09-19
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- **`/akiship` and `release` are hardened: mandatory rule load, fail-closed checklist receipts, a migration doctrine, and post-deploy functional verification (`release.B5`, `B7`, `B11`; `akiship`).** Evidence: a release passed the full ritual and shipped an index on a new column created inside a constructor before the column existed, so the store failed to open on the upgraded production database; every gate stayed green because the migration was startup code (not a script the gate looked for), every test started from an empty database, the post-deploy check read only the version, and the health endpoint returned a hardcoded `ok`. Separately, the ritual has been run loosely on several recent releases, and an advisory checklist cannot be audited. Root cause: the gate modelled migration as a separate script, checked only by location; nothing forced upgrade-path rehearsal, function-level post-deploy verification, or proof that each step ran. Mechanism: `akiship` now opens with a CRITICAL mandatory `Read` of `RULE-release.md` and `RULE-docs.md` (a run without it is invalid); `B7` becomes fail-closed: one `S<n>` receipt line with quoted evidence per step, a missing line means NOT RUN and forbids commit/mint/tag/push/deploy, hedge words are scored unverified, and four self-interrogation questions are answered in the report; `B5` adds a five-point migration doctrine (detect by effect with a diff detector run every release, separate artifact, expand → migrate → deploy code → contract, rehearse from the previous state never from empty, asserted postconditions and a named rollback); new `B11` requires exercising a data path after every deploy and calls a constant-`ok` health endpoint a false instrument. Rejected: making the health endpoint fail the process on any subsystem error (a non-critical component would then take the whole service down; degrade visibly instead), and a per-project patch (the gap is in the shared gate). Tradeoff: every release now writes more evidence; that is the intended cost. `akirule` routes `migration`, `/health` and `post-deploy` signals to `RULE-release.md`.
|
|
9
|
+
- **`agent.A2`/`agent.A5` now narrow exploration at the source before crossing a worker boundary.** Evidence: three independent over-exploration incidents spent approximately 92k tokens and 30 minutes on the Gegrok/checkjoin investigation, 67,329 tokens with 16 tool uses over 568,376 ms on the first delegation-rule review, and 56,965 tokens with 8 tool uses over 442,002 ms on the ladder stress test. Root cause: A2 and A5 each established an asymmetric default-to-delegate policy, while the inline exception was limited to one already-known file and worker startup, briefing, latency, observability, and invisible cross-process spend arrived only after the license. Mechanism: A2 now owns direct batching and source narrowing and points to A5 as the sole route decision; A5 runs a bounded command, restricted read, pipeline, or batch when it can return the answer or a lossless decision digest, permits one bounded probe when the route is unclear and lets that probe finish the task, delegates only unavoidable context flooding with an exact brief, keeps conversation-dependent or ambiguous judgment in the caller, prefers a fresh worker over a fork, and denies recursive delegation without explicit depth and width. Rejected: fixed token/time/file thresholds (not reliably measurable or portable), automatic delegation on a third discovery operation (detects drift but chooses the wrong route for small work), and a penalty card (this is a pre-action decision defect, not a locally repairable output defect). Full evidence and six-round critique: `docs/plan/done/rebalance-exploration-delegation.md`.
|
|
10
|
+
|
|
3
11
|
## [3.2.0] - 2026-09-15
|
|
4
12
|
|
|
5
13
|
### Added
|
package/README.md
CHANGED
|
@@ -72,7 +72,7 @@ Interpreter convention (documented once): the installer and hooks run on `node`
|
|
|
72
72
|
| `aki-article-writer` | `/aki-article-writer` or natural language | Per-project article writing pipeline: research & fact-verification, SEO metadata, JSON-LD schema, UX-psychology-aware content, and a dedicated Image Scout subagent (Gemini Flash / Haiku) for search → download → visual inspection → ffmpeg processing → slug-named WebP output. One subagent per article; image work is always isolated to a separate lightweight subagent. |
|
|
73
73
|
| `akidevsync-notes` | natural language | Reads/edits a project's `.akidevsync/notes.json` — the per-project task list the Aki-Dev-Sync app itself writes (list/add/pin/mark-done/edit/delete tasks) via a bundled script that preserves the app's own JSON formatting, plus a workflow for cross-checking pinned notes against a shipped release (CHANGELOG + code) before marking them done. |
|
|
74
74
|
| `akilint` | `/akilint` or a penalty card | 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]`, always labeled *review* — a flag for judgment against `coding.B4`, never an auto-delete verdict). Thin wrapper over the shared `scythe.py` detector (deterministic line matching, exit-code aware, cannot fabricate evidence) — the same script akiflow's `aki-conduct` seat uses, so a card name means the same thing everywhere. `[FLUFF]` (density) is content judgment and explicitly out of a script's reach. |
|
|
75
|
-
| `akiship` | `/akiship` | One-command full release: front-loads every check (release state, tree triage), then runs `RULE-release.md` B7's checklist unattended — diff-scoped hygiene (scythe, dead code, comment doc-refs on the accumulation only), external-action completeness, record truthfulness, build & test mirroring CI (B7 step 6), doc sync across every record surface (plans, `arch`/`feat`, README, task notes, bound standards docs), version mint or defer, registry publish for npm/crates/PyPI packages (`RULE-release.md` B9 — an OTP-gated publish is the single hand-off) — committing via `akigitcommit` with confirmation pre-answered. **Activation is an explicit release order**: the literal token `/akiship`, or an equally explicit imperative naming the ritual for this repo ("release trọn vẹn đi") — a completion word with no release object ("làm cho trọn vẹn"), or `/akiship` inside a question, activates nothing and gets a consult (answer in chat, change nothing). Governed by the B8 contract: that order is the authorization, blockers are reported once as a batch or the run completes with zero mid-run questions, and it stops only for public-history ambiguity, unclassifiable work, or a design contradiction — an owner-worded completion criterion is derived from the anchor plus the repo's own records and decided/reported (`Decided: X · because Y · rejected Z (why) · reopen if W`), escalated only when competing readings would produce different irreversible artifacts. Push/deploy stay opt-in — named explicitly, or via completion-intensity phrasing (canonical list in `RULE-release.md` B8, e.g. "trọn vẹn") — and after any push, CI is watched to green (`RULE-release.md` B10) regardless of whether the stack deploys. |
|
|
75
|
+
| `akiship` | `/akiship` | One-command full release: front-loads every check (release state, tree triage), then runs `RULE-release.md` B7's fail-closed checklist unattended (CRITICAL mandatory `Read` of `RULE-release.md` and `RULE-docs.md` first; a `S0`–`S8` receipt line with quoted evidence per step or the step counts as NOT RUN; written self-interrogation) — diff-scoped hygiene (scythe, dead code, comment doc-refs on the accumulation only), migration doctrine (`RULE-release.md` B5: detector over the diff on every release, startup-embedded migration counts, rehearsal from the PREVIOUS state) and external-action completeness, record truthfulness, build & test mirroring CI (B7 step 6), doc sync across every record surface (plans, `arch`/`feat`, README, task notes, bound standards docs), version mint or defer, registry publish for npm/crates/PyPI packages (`RULE-release.md` B9 — an OTP-gated publish is the single hand-off) — committing via `akigitcommit` with confirmation pre-answered. **Activation is an explicit release order**: the literal token `/akiship`, or an equally explicit imperative naming the ritual for this repo ("release trọn vẹn đi") — a completion word with no release object ("làm cho trọn vẹn"), or `/akiship` inside a question, activates nothing and gets a consult (answer in chat, change nothing). Governed by the B8 contract: that order is the authorization, blockers are reported once as a batch or the run completes with zero mid-run questions, and it stops only for public-history ambiguity, unclassifiable work, or a design contradiction — an owner-worded completion criterion is derived from the anchor plus the repo's own records and decided/reported (`Decided: X · because Y · rejected Z (why) · reopen if W`), escalated only when competing readings would produce different irreversible artifacts. Push/deploy stay opt-in — named explicitly, or via completion-intensity phrasing (canonical list in `RULE-release.md` B8, e.g. "trọn vẹn") — and after any push, CI is watched to green (`RULE-release.md` B10) regardless of whether the stack deploys, and after any deploy a data path the release touched is exercised (`RULE-release.md` B11). |
|
|
76
76
|
|
|
77
77
|
### Five agent definitions
|
|
78
78
|
|
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@ Being called with a card means: re-read the root rule, fix **every** instance in
|
|
|
29
29
|
- **Read/Edit the file, never `cat`/`sed`/`head` to print-then-read it.** Bash is for what it is uniquely good at: multi-file scans and transforms, pipes and aggregation, genuinely shell-native tasks (git, npm, processes). Shelling out to read one known file spends a round trip to obtain what one tool call already returns.
|
|
30
30
|
- **Find every edit site before touching any of them, then apply the whole set in one pass.** Editing line by line as sites are discovered turns one change into N full-history round trips. If the sites are not all known yet, that is a signal to search first, not to start editing.
|
|
31
31
|
- **Batch independent calls into a single turn.** Two lookups that do not depend on each other go out together; waiting for the first to issue the second pays twice for nothing.
|
|
32
|
-
- **
|
|
32
|
+
- **Narrow and batch before crossing a process boundary.** Use the direct tools and in-shell aggregation rules above when they can return a bounded answer without flooding this context; `A5` alone decides when the remaining exploration belongs to a worker.
|
|
33
33
|
|
|
34
34
|
### A3. Communication vs task — a question is not a request
|
|
35
35
|
Classify every turn before acting: is it **communication** (a question, discussion, or explanation — "why/how/can we/should we/what if", thinking aloud) or a **task** (an imperative aimed at the code/repo: add, fix, change, remove, commit)?
|
|
@@ -52,9 +52,13 @@ The reader often context-switches across many tasks and reads in a terminal; opt
|
|
|
52
52
|
### A5. Delegating to a worker — more throughput, less spend
|
|
53
53
|
A worker is a subagent, or the same or another CLI called headlessly (`claude -p`, `agy -p`, equivalents).
|
|
54
54
|
|
|
55
|
-
**
|
|
55
|
+
**Narrow at the source before delegating.** If one bounded command, restricted read, pipeline, or batch can return the answer — or a digest that loses nothing the decision needs — run it in this thread. Repository size and raw input size alone do not justify a worker when aggregation prevents that raw volume from entering the context.
|
|
56
56
|
|
|
57
|
-
**
|
|
57
|
+
**Probe once only when the route cannot yet be specified.** If the target, question, or required output shape is unclear, run one bounded orientation probe. The probe may finish the task; never delegate work the probe already answered. If the residue still requires broad reading or comprehension that cannot be narrowed before entering a context, cross the process boundary with exact paths or targets, the exact question, and the exact output shape.
|
|
58
|
+
|
|
59
|
+
**Route by context need, not by the word “exploration.”** Conversation-dependent synthesis, ambiguous classification, and per-item judgment stay with the caller; delegate only the retrieval that feeds them. Prefer a fresh worker for a precise, context-free digest. Use a fork only when a bounded bulk task genuinely needs substantial accumulated context that would be expensive to restate. A worker never delegates again unless the caller explicitly grants a fan-out with bounded depth and width.
|
|
60
|
+
|
|
61
|
+
**When delegation is warranted, use the current default wide-context tier available, one shot** — on Antigravity that is `agy --model gemini-3.7-flash-high --mode plan -p "<prompt>"` (prompt last; `-p` swallows the next token; owner-set default, 2026-08-15). It holds a very large context; its failure mode is skimming, so the counter is prompt precision rather than a bigger model: name the exact paths, the exact question, and the exact output shape, and leave it nothing to improvise. Keep it to a single call — multi-turn on that CLI degrades badly.
|
|
58
62
|
|
|
59
63
|
**Know which kind of cheap you are buying.** A stateless cheap call is cheap *per call* and must re-receive its context every time. A persistent worker (`claude -p --session-id <uuid>`, later `--resume <uuid>`) is cheap *per turn after the first*, because its prefix is cached — roughly an eighth of the opening turn, then flat — and it keeps everything **it** was told, though nothing the caller knows. Use the first for one wide question, the second for a worker you will come back to. The session id is scoped to the directory it was created in.
|
|
60
64
|
- **A worker inherits nothing** — not your context, not your rules, not your router. Name the exact rule files it must read and the exact paths or targets it must look at. "Follow the project rules" loads nothing and reads as compliance.
|
package/payload/RULE-release.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Release & Versioning Rule
|
|
2
2
|
|
|
3
|
-
<!-- Address map: release.A1-5 · release.B1-
|
|
3
|
+
<!-- Address map: release.A1-5 · release.B1-11 · release.C1-4 (⟨Aki⟩) -->
|
|
4
4
|
|
|
5
5
|
## A. Versioning core
|
|
6
6
|
|
|
@@ -116,7 +116,7 @@ After updating CHANGELOG and the version bump, produce the GitHub Release withou
|
|
|
116
116
|
|
|
117
117
|
**`--generate-notes` alone is not a substitute for Title/Body above.** It derives content from merged PRs only; a repo that commits straight to trunk (no PR history) gets a near-empty body — footer line only. Pair it with `--notes-file` for real content, or, when release creation is CI-automated rather than run interactively, have the workflow itself extract the tagged version's CHANGELOG section into the notes file — the content requirement above still applies even though no one is typing the `gh release create` command by hand.
|
|
118
118
|
|
|
119
|
-
### B5. Migration
|
|
119
|
+
### B5. Migration doctrine & completeness gate — a schema or infra change is not "released" until it ran
|
|
120
120
|
|
|
121
121
|
A CHANGELOG or `releases.json` entry that describes a database schema change or any other infra-dependent change (migration, remote config, env var, cron/schedule registration — see [[RULE-coding]] B3) is a claim that the change is live. That claim is only true once two things both hold, not one:
|
|
122
122
|
|
|
@@ -125,6 +125,14 @@ A CHANGELOG or `releases.json` entry that describes a database schema change or
|
|
|
125
125
|
|
|
126
126
|
Do not report a plan, task, or release/deploy as complete when a migration/infra step it depends on has not cleared **both** conditions. A written migration script plus a "Added" changelog line with the actual execution still outstanding is exactly the failure this gate exists to catch — the code shipped, the database did not, and nothing else in the release checklist would have noticed.
|
|
127
127
|
|
|
128
|
+
#### Migration doctrine — MANDATORY. No project is exempt without a written declaration in its own `CLAUDE.md`.
|
|
129
|
+
|
|
130
|
+
1. **DETECT by effect, never by location.** A migration is ANY change to the shape of persisted data: a `migrations/` script, an ORM auto-sync, a `CREATE`/`ALTER`/`DROP` of a table, column, index or constraint, a schema-version bump, a JSON state-file shape change, a re-keyed cache — **wherever it lives, including code that runs at application startup or inside a constructor.** Run the detector over the accumulation diff (boundary commit, B1.5) on EVERY release and paste its output or the word `empty` into the report: `git diff <boundary>..HEAD | grep -nEi 'ALTER +TABLE|CREATE +(UNIQUE +)?(TABLE|INDEX)|DROP +(TABLE|INDEX|COLUMN)|ADD +COLUMN|user_version|migrat|schema'`. A hit IS a migration until a written line proves otherwise. "It only auto-applies at startup" and "it is just an index" are NOT exemptions: the failure this doctrine exists for was an index on a new column created before that column existed, inside a constructor, invisible to a gate that only looked for migration scripts.
|
|
131
|
+
2. **SEPARATE migration from application.** A migration is its own artifact — versioned, ordered, idempotent, recorded — executed as its own named deploy step. Application startup VERIFIES the schema version and reports `degraded` (B11); it NEVER mutates schema. A project that embeds migration in startup code (single-process embedded database) is a declared exception in its project `CLAUDE.md`, and this gate still treats that code as a migration in full: points 1 and 3–5 apply unchanged.
|
|
132
|
+
3. **ORDER: expand → migrate → deploy code → contract.** Additive (expand) migrations run BEFORE the code that needs them restarts, so old code keeps running on the new schema; destructive (contract) steps ship in a LATER release, after nothing reads the old shape. Restarting new code onto an un-migrated schema is a VIOLATION.
|
|
133
|
+
4. **REHEARSE from the PREVIOUS state, never from empty.** A test or dry-run that starts from a fresh database exercises `CREATE`, not the migration, and proves NOTHING about an upgrade. REQUIRED evidence: the migration executed against (a) a schema generated or snapshotted from the previous release, AND (b) for any data-dependent change (unique index, `NOT NULL` backfill, type change, dedupe) a COPY of real target data. State which was run and quote its output. "The tests pass" is not evidence.
|
|
134
|
+
5. **POSTCONDITIONS asserted, ROLLBACK named.** After the real run, assert expected columns, indexes and row counts by query (condition 1 above), and record the backup or fix-forward path BEFORE any destructive step ([[RULE-agent-behavior]] B3). A migration with no stated rollback or fix-forward path does NOT ship.
|
|
135
|
+
|
|
128
136
|
### B6. Content discipline
|
|
129
137
|
- Release note copy: no em/en dash (`—` `–`); short user-facing sentences, benefit first. See [[RULE-content-write]].
|
|
130
138
|
- Keep terminology stable across versions (e.g. always "Release Notes", not mixed synonyms). See [[RULE-content-write]] semantic stability.
|
|
@@ -136,17 +144,23 @@ The last moment a mistake is still cheap: the work is done, the tree is clean, a
|
|
|
136
144
|
|
|
137
145
|
Run in order; each step names the rule that owns it.
|
|
138
146
|
|
|
147
|
+
**FAIL-CLOSED CONTRACT — this gate is NOT advisory, and a skipped step is a failed step.**
|
|
148
|
+
- Every step 0–8 MUST leave a receipt line in the run's report: `S<n> PASS | FIXED | FAIL | N/A — <evidence>`. Evidence is quoted command output, a `file:line` actually read, or an observed fact — never an adjective. `N/A` REQUIRES the cited fact that makes the step inapplicable; an `N/A` with no cited fact is scored FAIL.
|
|
149
|
+
- A step with NO receipt line was NOT RUN. NOT RUN means the gate FAILED. A failed gate FORBIDS commit, mint, tag, push and deploy — no exception for urgency, "hotfix", "tiny diff", or "same as the last release".
|
|
150
|
+
- FORBIDDEN as evidence: "should", "presumably", "probably", "looks fine", "seems", "expected to". Each is an unverified claim and is scored `unverified` under step 7, never PASS.
|
|
151
|
+
- **Self-interrogation is MANDATORY and REPORTED, not silent.** Before closing, answer in writing: (1) which step was cheapest to skip, and what did I actually do for it; (2) if this release broke production within the hour, which unchecked step caused it; (3) does the diff touch anything persisted, and did step 3 run against the PREVIOUS state; (4) what did verification exercise that exists only on production — a data path, not a version string. An unanswered question is a FAIL.
|
|
152
|
+
|
|
139
153
|
0. **Leftover triage** — a tree that is not uniformly finished is classified first: finished / mid-edit / abandoned / accidental (the `/akigitcommit` step-0 taxonomy, under [[RULE-agent-behavior]] B5's read-only floor). Mid-edit vs abandoned is undecidable from the tree alone — that is an escalation (B8), never a guess.
|
|
140
154
|
1. **Release state** — derive it cold from the repo per B1, never from session memory. `Drifted` blocks everything until A5's recovery has run.
|
|
141
155
|
2. **Hygiene sweep — scoped to the accumulation, never the whole repo.** On the files touched since the boundary commit (B1.5): scythe `[WRAP]`/`[YAP]` lint ([[RULE-agent-behavior]] §0), dead code / redundant guards / duplication the accumulation itself introduced (`pattern.A8`; subtract-class detectors at diff scope), and doc references in touched comments still resolving ([[RULE-docs]] B3). A repo-wide subtraction or zero-trust sweep is a separately scheduled audit, never a per-release cost — diff scope is what keeps this gate affordable at many releases per day. Unlike an audit, findings here are fixed in place: this is a gate, not a report.
|
|
142
|
-
3. **
|
|
156
|
+
3. **Migration & external-action completeness — the B5 detector runs FIRST, on EVERY release, without exception.** Paste its output (or `empty`) into the receipt. A hit obliges a written answer to each of B5 points 2–5: is it separate, is the order expand → migrate → deploy → contract, was it rehearsed from the PREVIOUS state (which one, quoted output), are postconditions and rollback stated. Startup-embedded migration code counts. Then every other change whose "done" lives outside the repo (remote config, env vars, cron registrations, cache purges) is confirmed live, and each script sits in its completion location ([[RULE-coding]] B3). A green build proves nothing about the database; a green test on an empty database proves nothing about an upgrade.
|
|
143
157
|
4. **Record truthfulness** — every closed problem has its `CHANGELOG.md` entry, and no entry claims something step 3 has not cleared (B2). Web stacks additionally need `releases.json` parity (C3).
|
|
144
158
|
5. **Doc sync — every record surface the accumulation touched, not only `docs/`.** Enumerate, then check each against the diff: plans whose work shipped moved to `docs/plan/done/`; `arch`/`feat` docs match what is about to ship ([[RULE-docs]] B1, B3); `README.md` wherever the accumulation changed setup, commands, layout, or a documented behavior; the project's task-note file when one exists (`.akidevsync/notes.json`, edited only through the `akidevsync-notes` skill — a note whose fix is in this accumulation is marked done with the matching CHANGELOG line, an unmatched or unverified one stays open and is named in the report); and any external standards doc the project `CLAUDE.md` binds the project to, updated in place when the accumulation changed a convention that doc owns. A surface skipped because it was not in `docs/` is the same drift finding as a stale doc.
|
|
145
159
|
6. **Build & test — mirror CI.** Commands are derived, never invented: the jobs `.github/workflows/*` run on push/tag take priority; a repo with no such workflow falls back to the manifest's own scripts (`npm run typecheck`/`build`/`test`, `cargo build`/`cargo test`, equivalent). Run every one of them locally, self-authorized ([[RULE-coding]] B3 — ship/release is the moment full build+test is mandatory, not optional). A failure blocks the gate and is fixed in place, same as step 2. A CI step that cannot be reproduced locally (an other-OS matrix leg, a job needing secrets) is named explicitly and left to B10 to catch post-push. A repo with no build/test command at all says so plainly — that is a finding, not a silent pass. This step sits after 2–5 because those fix code and docs first, and the build must cover what is actually about to ship.
|
|
146
160
|
7. **Verification honesty** — anything only checkable at runtime is reported as unverified rather than assumed ([[RULE-coding]] B3). "Untested but I expect it works" is a valid gate output; a silent "Done" is not.
|
|
147
161
|
8. **Version decision** — mint or defer per A4/A5's materiality test. Do not mint a version to mark that a session ended.
|
|
148
162
|
|
|
149
|
-
Post-push CI is B10; stack deploy verification (C5, `stack.C8`) follows a green CI.
|
|
163
|
+
Post-push CI is B10; post-deploy functional verification is B11 (mandatory after every deploy or restart); stack deploy verification (C5, `stack.C8`) follows a green CI.
|
|
150
164
|
|
|
151
165
|
### B8. Autonomous full-release run — an explicit release order is the authorization
|
|
152
166
|
|
|
@@ -176,6 +190,15 @@ After any push or tag push, in any flow (not only `/akiship`): `gh run list --co
|
|
|
176
190
|
|
|
177
191
|
**Evidence.** CI failures went unnoticed because the ritual only verified stack deploys (C5): a non-deploying repo (CLI, library, npm package) had no post-push check at all, so a red workflow could sit unnoticed indefinitely.
|
|
178
192
|
|
|
193
|
+
### B11. Post-deploy verification — a version string proves the code, never the function
|
|
194
|
+
|
|
195
|
+
After ANY deploy or restart, in any flow (not only `/akiship`), verify FUNCTION, not identity.
|
|
196
|
+
- The check MUST exercise at least one real data path the release touched — an authenticated read that hits the changed table or route — and assert a success status AND a non-trivial payload. A `/version` or `/health` response, or a 200 from a static page, is an IDENTITY check: necessary, never sufficient.
|
|
197
|
+
- A health endpoint returning a constant `ok` regardless of subsystem state is a FALSE INSTRUMENT. It MUST derive its status from the real state of every required subsystem (`degraded` plus the subsystem names when one failed to open), and until it does, a gate that trusts it scores the verification `unverified`, never PASS. Degraded runtime state MUST be visible — health, a log line carrying the underlying error text, or the UI — and never swallowed by a bare `catch`. A component whose failure must not take the service down degrades VISIBLY; it is never silent and never fatal to unrelated work.
|
|
198
|
+
- Failure → execute the rollback or fix-forward path stated under B5 point 5, THEN report. "The process is up" is not Done.
|
|
199
|
+
|
|
200
|
+
**Evidence.** A release passed every gate and its post-deploy check because the check read only the version endpoint and the health endpoint returned a hardcoded `ok`; the usage store had failed to open on the upgraded database and the dashboard was dead for the whole window until a person opened it.
|
|
201
|
+
|
|
179
202
|
## C. ⟨Aki⟩ Web release artifacts
|
|
180
203
|
|
|
181
204
|
### C1. Two separate channels — do not merge them
|
package/payload/index.md
CHANGED
|
@@ -18,7 +18,7 @@ Provides reusable rules for agent behavior, coding, content, docs, and stack-spe
|
|
|
18
18
|
| `RULE-stack-tauri.md` | `tauri` | Contextual | public | Tauri v2 + Rust: absolute never-block-the-UI rule for any command running a subprocess/network call (`spawn_blocking`), titlebar boundary, version SSOT, IPC capability silent-fail, serde default for persisted JSON, cfg(target_os) scoping, subprocess PATH-resolution cold-start race, salient target context (ship platform) surfaced in the project CLAUDE.md, macOS TCC/Gatekeeper boundary for spawned sidecars (responsible-process attribution, FDA vs Files & Folders vs Developer Tools, sticky denials, ad-hoc signing losing grants on every rebuild, and the read-only scope limit of the whole chain) |
|
|
19
19
|
| `RULE-ui-pattern.md` | `ui` | Contextual | public | Frontend enforcement of pattern-core: subtraction pass before any tier (delete/inherit/hoist — the ladder packages repetition, only this removes it), 4-tier class taxonomy with the second copy as the STOP (the ≥3 threshold is repo-wide and unobservable inside one file), inline `style=` as a runtime-only escape hatch, `<style>`-block budget measured in aggregate against the shared layer, design tokens in whichever mechanism the installed framework version uses with one theme source per project, arbitrary-value policy, atomic structure, variant API, two-way lookup-then-record pattern duty, UI audit/refactor playbook led by the inversion check |
|
|
20
20
|
| `RULE-seo.md` | `seo` | Contextual | **mixed** — group C is ⟨Aki⟩ | Meta limits, schema.org matrix, robots, sitemap, OG, AI visibility, entity linking |
|
|
21
|
-
| `RULE-release.md` | `release` | Contextual | **mixed** — group C is ⟨Aki⟩ | CHANGELOG.md mandatory in every project, release notes vs changelog split, GitHub Release compare-link footer, releases.json (web-only), release vs deploy boundary, cold-start version reconstruction, severity-driven bump, version minted only at the release event (`[Unreleased]` buffer, no local drift ahead of production), audit mode, pre-ship gate expanded into the full-release checklist (B7: leftover triage, diff-scoped hygiene, build & test mirroring CI as a mandatory step before verification honesty and the version decision), autonomous-run contract (B8: an explicit release order is the authorization — activation owned by akiship's own gate, this rule is never itself a trigger; asks front-loaded into one batch, three-case escalation floor and completion-intensity phrase list owned solely by B8, owner-worded criteria decided and reported rather than escalated by default; entry point `/akiship`), registry-published packages (B9: the registry version is the release, publish mechanism derived from existing convention and sibling packages, account/scope/2FA probed, OTP publish as the single hand-off, tarball verified before the irreversible publish), post-push CI watch (B10: a push or tag push is not Done until every triggered workflow is green, red fixed forward with a new commit never a history rewrite) |
|
|
21
|
+
| `RULE-release.md` | `release` | Contextual | **mixed** — group C is ⟨Aki⟩ | CHANGELOG.md mandatory in every project, release notes vs changelog split, GitHub Release compare-link footer, releases.json (web-only), release vs deploy boundary, cold-start version reconstruction, severity-driven bump, version minted only at the release event (`[Unreleased]` buffer, no local drift ahead of production), audit mode, pre-ship gate expanded into the full-release checklist (B7: leftover triage, diff-scoped hygiene, build & test mirroring CI as a mandatory step before verification honesty and the version decision), autonomous-run contract (B8: an explicit release order is the authorization — activation owned by akiship's own gate, this rule is never itself a trigger; asks front-loaded into one batch, three-case escalation floor and completion-intensity phrase list owned solely by B8, owner-worded criteria decided and reported rather than escalated by default; entry point `/akiship`), registry-published packages (B9: the registry version is the release, publish mechanism derived from existing convention and sibling packages, account/scope/2FA probed, OTP publish as the single hand-off, tarball verified before the irreversible publish), post-push CI watch (B10: a push or tag push is not Done until every triggered workflow is green, red fixed forward with a new commit never a history rewrite), migration doctrine (B5: detect by effect including startup-embedded code, separate artifact, expand → migrate → deploy → contract, rehearse from the PREVIOUS state never from empty, postconditions + named rollback), fail-closed gate contract (B7: a receipt line per step or the step was NOT RUN, self-interrogation reported, forbidden evidence words), post-deploy functional verification (B11: a version string proves code not function, a constant-`ok` health endpoint is a false instrument) |
|
|
22
22
|
| `RULE-db-design.md` | `db` | Contextual | public | Immutability & Event Sourcing, 1NF, Bounded Context (DDD), flat-query discipline — load when designing schema/migration/DB refactor |
|
|
23
23
|
| `RULE-biz.md` | `biz` | Contextual | public | Positioning & audience (one primary audience, falsifiable USP, `docs/biz/` as SSoT, niche-first), offer & pricing (value-based, few tiers, validate before building), messaging & customer psychology (benefit-first, anxiety at decision points, no dark patterns) — load on any market-facing decision |
|
|
24
24
|
| `METHOD-audit-flow.md` | `flow` | Analytical | public | Flow integrity audit method |
|
|
@@ -68,7 +68,7 @@ Some subjects legitimately live in several files: one **root rule** stating the
|
|
|
68
68
|
| Subject | Root | Domain applications |
|
|
69
69
|
|---|---|---|
|
|
70
70
|
| **Naming** | `pattern.A7` — name by role, never by concrete value | `agent.C1` file names · `ui.A` design tokens · `stack.C1` ⟨Aki⟩ canonical component names · `release.A3` version/tag format · `content.A3` semantic stability (renaming an existing concept) |
|
|
71
|
-
| **External-action completeness** ("done" needs the outside world to move, not just the file) | `coding.B3` — a change requiring a separate action against an external system isn't done when the file describing it is written | `release.B5` ⟨Aki⟩ CHANGELOG/release entry not truthful until a migration/infra step actually ran · `stack.C8` ⟨Aki⟩ D1 migration must run `--remote` and move to `scripts/done/`, a green build alone proves nothing about the database · `release.B10` a push or tag push is not Done until every triggered CI workflow is confirmed green |
|
|
71
|
+
| **External-action completeness** ("done" needs the outside world to move, not just the file) | `coding.B3` — a change requiring a separate action against an external system isn't done when the file describing it is written | `release.B5` ⟨Aki⟩ CHANGELOG/release entry not truthful until a migration/infra step actually ran · `stack.C8` ⟨Aki⟩ D1 migration must run `--remote` and move to `scripts/done/`, a green build alone proves nothing about the database · `release.B10` a push or tag push is not Done until every triggered CI workflow is confirmed green · `release.B11` a deploy is not Done until a data path the release touched is exercised, not only the version |
|
|
72
72
|
| **Audit reports, never fixes** (and the output depends on whether the baseline is stable) | `agent.B5` — an audit writes only its report; never mutates git state, never auto-classifies ambiguous work | `docs.C` docs-vs-reality, research+plan doc pair on a published baseline · `content.C2` canonical-term drift, density deletion test, i18n coverage sweeps · `release.B7` pre-ship pass/fail gate, no doc · `ui.C` class/token audit playbook · `flow` flow and state drift · `zero-trust` mechanical-first strict sweep, evidence weighted by the mechanism that produced it · `subtract` repo-wide does-this-need-to-exist sweep, terminating on two dry rounds |
|
|
73
73
|
| **Sizing a control against its real threat** (severity is impact **and** who can actually reach it) | `proportion.A` — reach, capability, motive, blast radius, each labeled measured or estimated, before any guard is added, kept, or removed | `coding.C1` no defensive guards for impossible internal states · `coding.C4` the security floor this sizing never argues below · `pattern.A2` risk-weighted extraction at the 2nd occurrence for auth/money/permissions · `think.A1` one-way vs two-way door depth · `think.B5` when an edge-case is promoted above the MVP · `ux.C1` findings ranked by severity, never padded flat |
|
|
74
74
|
| **Density — the deletion test** (a line exists only if deleting it loses information the reader needs) | `agent.A4` — report density: conclusion-first, no padding, no trimming of load-bearing detail | `coding.B4` code comments (naming first; comment only what code cannot say) · `docs.B3` doc prose · `content.B2` product copy · akiflow Step 4 output-hygiene floor (the enforcement tier for subagents, which inherit no router) · mechanical detection: `skills/akiflow/scripts/scythe.py` (`[WRAP]`/`[YAP]` only — `[FLUFF]` stays judgment, `agent` §0) |
|
package/skills/akirule/SKILL.md
CHANGED
|
@@ -71,6 +71,7 @@ Load if message or file path contains any of:
|
|
|
71
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
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
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`
|
|
74
75
|
- **Keywords (post-push CI — `release.B10`):** `CI`, `GitHub Actions`, `workflow run`, `gh run`, `CI fail`, `CI đỏ`, `build fail`, `test fail`
|
|
75
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`)
|
|
76
77
|
|
package/skills/akiship/SKILL.md
CHANGED
|
@@ -7,7 +7,16 @@ description: Full release ritual end-to-end — front-loaded checks, then an una
|
|
|
7
7
|
|
|
8
8
|
Invoke with `/akiship` or an explicit release order, only as described in § Activation gate below. Goal: replace the daily hand-typed ritual ("resolve leftovers, sync every doc, lint, fix drift, changelog, commit, release…") with one invocation that runs to completion or stops once, early, with every blocker in a single batch.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## CRITICAL — MANDATORY LOAD, BEFORE ANY OTHER TOOL CALL OF THE RUN (execute AND consult mode)
|
|
11
|
+
|
|
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
|
+
|
|
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.
|
|
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
|
+
|
|
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.
|
|
19
|
+
|
|
11
20
|
|
|
12
21
|
## Activation gate — two conditions, both required, checked before anything else
|
|
13
22
|
|
|
@@ -36,7 +45,7 @@ Consult is the default whenever both readings are available. A withheld executio
|
|
|
36
45
|
Run B7 steps 2–7 in order, fixing findings as they surface (this is a gate, not an audit — no findings doc):
|
|
37
46
|
|
|
38
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.
|
|
39
|
-
-
|
|
48
|
+
- **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).
|
|
40
49
|
- **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`.
|
|
41
50
|
- 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`).
|
|
42
51
|
|
|
@@ -45,14 +54,17 @@ Run B7 steps 2–7 in order, fixing findings as they surface (this is a gate, no
|
|
|
45
54
|
1. Commit in logical groups per `/akigitcommit` (domain-grouped mode; anti-stage-loss rules apply in full). B8 pre-answers its confirmation step — "commit luôn" semantics.
|
|
46
55
|
2. Version decision per `release.A4`/`A5`: mint exactly once at the highest accumulated severity, or defer on the materiality test. Deferring is a normal outcome, not a failure.
|
|
47
56
|
3. Artifacts per the repo's own convention: bare tag only if the repo already tags (`release.A3` B8 exception); GitHub Release per `release.B4`; `releases.json` sync check per `release.C4`; registry publish per `release.B9` — tarball verified first, and an OTP-gated publish is the report's single hand-off with its `npm view` check.
|
|
48
|
-
4. **Push / deploy only if B8's push/deploy authorization holds for this invocation (named explicitly, or completion-intensity phrasing per `release.B8`).** Otherwise the run stays local-only. After any push, watch CI per `release.B10` — always, regardless of stack. If the stack additionally deploys on push, run live deploy verification per `release.C5` once CI is green.
|
|
57
|
+
4. **Push / deploy only if B8's push/deploy authorization holds for this invocation (named explicitly, or completion-intensity phrasing per `release.B8`).** Otherwise the run stays local-only. After any push, watch CI per `release.B10` — always, regardless of stack. If the stack additionally deploys on push, run live deploy verification per `release.C5` once CI is green. After ANY deploy or restart, `release.B11` is mandatory: verify a data path the release touched, not only the version.
|
|
49
58
|
|
|
50
59
|
## Report
|
|
51
60
|
|
|
52
|
-
|
|
61
|
+
**The FIRST block is the checklist receipt, and it is mandatory:** the `release.B7` lines `S0`–`S8` (`PASS | FIXED | FAIL | N/A — evidence`), the B5 detector output, and the four written self-interrogation answers. A report without them declares the run INCOMPLETE and says which steps were NOT RUN; an unreported step is a failed step (`release.B7` fail-closed contract), never an implicit pass.
|
|
62
|
+
|
|
63
|
+
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.
|
|
53
64
|
|
|
54
65
|
## Boundaries
|
|
55
66
|
|
|
67
|
+
- Never write `PASS` on a gate step without quoted evidence (`release.B7` fail-closed contract). "Should", "presumably", "looks fine" score `unverified`.
|
|
56
68
|
- Never run a phase above on a turn that failed either activation condition — answer in consult mode instead, and never treat your own consult answer as the go-ahead for a later turn.
|
|
57
69
|
- The B8 escalation floor is the only reason to stop mid-run; everything else is self-answered from repo, docs, and rules.
|
|
58
70
|
- Never push, deploy, or push tags without B8's push/deploy authorization (`release.B8`).
|