agent-quality-kit 0.14.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +88 -18
  2. package/README.ru.md +91 -19
  3. package/kit/docs/ai/index.md +1 -0
  4. package/kit/docs/ai/operational-gates.md +275 -0
  5. package/kit/gates/_target.sh +53 -0
  6. package/kit/gates/ci-actually-fails/check.sh +18 -3
  7. package/kit/gates/ci-actually-fails/green/.github/workflows/ci.yml +10 -0
  8. package/kit/gates/entry-commands-exist/check.sh +88 -12
  9. package/kit/gates/hook-actually-fires/README.md +12 -0
  10. package/kit/gates/hook-actually-fires/check.sh +66 -6
  11. package/kit/gates/hook-actually-fires/gate.yml +2 -2
  12. package/kit/gates/hook-actually-fires/green/.claude/hooks/auto-format.sh +3 -0
  13. package/kit/gates/hook-actually-fires/green/.claude/hooks/block-dangerous.sh +3 -0
  14. package/kit/gates/hook-actually-fires/green/.claude/hooks/done.sh +3 -0
  15. package/kit/gates/hook-actually-fires/green/.claude/hooks/idle.sh +3 -0
  16. package/kit/gates/hook-actually-fires/green/.claude/hooks/prompt.sh +3 -0
  17. package/kit/gates/hook-actually-fires/green/.claude/hooks/session.mjs +1 -0
  18. package/kit/gates/hook-actually-fires/green/.claude/hooks/stop-gate.sh +3 -0
  19. package/kit/gates/hook-actually-fires/green/.claude/settings.json +12 -0
  20. package/kit/gates/test-not-adjusted/README.md +31 -0
  21. package/llms.txt +26 -7
  22. package/package.json +1 -1
  23. package/tool/commands/context.mjs +39 -41
  24. package/tool/commands/doctor-catalog.mjs +35 -10
  25. package/tool/commands/doctor.mjs +18 -26
  26. package/tool/commands/feedback.mjs +231 -0
  27. package/tool/commands/gates.mjs +12 -6
  28. package/tool/commands/project.mjs +11 -13
  29. package/tool/commands/prompt.mjs +2 -1
  30. package/tool/commands/report.mjs +19 -3
  31. package/tool/commands/vitals.mjs +9 -3
  32. package/tool/i18n/en-docs.mjs +19 -2
  33. package/tool/i18n/en-gates.mjs +35 -0
  34. package/tool/i18n/en.mjs +29 -2
  35. package/tool/i18n/ru-docs.mjs +18 -2
  36. package/tool/i18n/ru-gates.mjs +36 -0
  37. package/tool/i18n/ru.mjs +27 -2
  38. package/tool/lib/adopt.mjs +58 -4
  39. package/tool/lib/ask.mjs +118 -0
  40. package/tool/lib/brief.mjs +17 -38
  41. package/tool/lib/core.mjs +49 -12
  42. package/tool/lib/execution.mjs +32 -1
  43. package/tool/lib/gate-worker.mjs +4 -1
  44. package/tool/lib/manifest.mjs +39 -13
  45. package/tool/lib/prove.mjs +3 -3
  46. package/tool/lib/run.mjs +142 -10
  47. package/tool/program.mjs +6 -0
  48. package/tool/selfcheck/smoke/_fixture.mjs +13 -1
  49. package/tool/selfcheck/smoke/fail-closed.test.mjs +96 -1
  50. package/tool/selfcheck/smoke/feedback-send.test.mjs +87 -0
  51. package/tool/selfcheck/smoke/first-run.test.mjs +67 -3
  52. package/tool/selfcheck/smoke/preflight.test.mjs +83 -0
  53. package/tool/selfcheck/smoke/verdict.test.mjs +50 -4
  54. package/tool/selfcheck/smoke/version-sync.test.mjs +140 -0
  55. package/tool/selfcheck/smoke.sh +106 -4
  56. package/tool/selfcheck/units-ask.mjs +85 -0
  57. package/tool/selfcheck/units-brief.mjs +3 -13
  58. package/tool/selfcheck/units-context.mjs +2 -1
  59. package/tool/selfcheck/units-execution.mjs +37 -1
  60. package/tool/selfcheck/units-feedback.mjs +137 -0
  61. package/tool/selfcheck/units-level.mjs +41 -1
  62. package/tool/selfcheck/units-repo.mjs +75 -0
  63. package/tool/selfcheck/units-vitals.mjs +27 -0
  64. package/kit/gates/entry-links-exist/README.md +0 -27
  65. package/kit/gates/entry-links-exist/check.sh +0 -33
  66. package/kit/gates/entry-links-exist/gate.yml +0 -17
  67. package/kit/gates/entry-links-exist/green/AGENTS.md +0 -10
  68. package/kit/gates/entry-links-exist/green/rules/general.md +0 -3
  69. package/kit/gates/entry-links-exist/red/AGENTS.md +0 -3
  70. package/kit/gates/no-phantom-package/README.md +0 -84
  71. package/kit/gates/no-phantom-package/check.sh +0 -168
  72. package/kit/gates/no-phantom-package/gate.yml +0 -20
  73. package/kit/gates/no-phantom-package/green/AGENTS.md +0 -15
  74. package/kit/gates/no-phantom-package/red/AGENTS.md +0 -15
package/README.md CHANGED
@@ -5,27 +5,56 @@
5
5
  [![npm](https://img.shields.io/npm/v/agent-quality-kit)](https://www.npmjs.com/package/agent-quality-kit)
6
6
  [![checks](https://github.com/arsen-ask-lx/Agent_Quality_Kit/actions/workflows/ci.yml/badge.svg)](https://github.com/arsen-ask-lx/Agent_Quality_Kit/actions/workflows/ci.yml)
7
7
  [![MIT licence](https://img.shields.io/npm/l/agent-quality-kit)](LICENSE)
8
- [![AQK-3](https://img.shields.io/badge/AQK-3-2ea44f)](https://github.com/arsen-ask-lx/Agent_Quality_Kit)
9
8
 
10
- **Check whether a repository is ready to have its code written by AI coding agents — and turn
11
- the rules it promises to follow into commands with exit codes.**
9
+ **A check that cannot fail looks exactly like a check that passes.**
10
+
11
+ `|| true`, `continue-on-error: true`, a linter pointed at an empty directory, a test with no
12
+ assertion, a hook nobody ever installed, a command your `AGENTS.md` names that no longer exists —
13
+ every one of them prints a green tick. AQK plants a known defect into a **copy** of your code,
14
+ runs the checks your repository **declares**, and says which of them noticed and which stayed
15
+ silent.
16
+
17
+ It never reads "nothing printed" as "nothing wrong". Three outcomes, never two:
12
18
 
13
- Your `AGENTS.md` says what the project promises. Nothing checks that those promises are true, or
14
- that the commands it lists even run. AQK is that missing layer: one command reads the repository,
15
- reports a level from AQK-0 to AQK-3, and names every guard that is missing.
19
+ | `✔` | `✘` | `?` |
20
+ |---|---|---|
21
+ | ran and found nothing | a finding about the code | **the check itself failed** — fix the tooling, not the file it named while dying |
16
22
 
17
- And one step further than the tools next door: `probe` plants a known defect into a copy of your
18
- project and checks whether your **declared** guards actually go red. "Tests exist" and "tests
19
- catch" are different claims — readiness scores measure the first one.
23
+ The third one is the whole point. Counting it as either of the other two is how a repository ends
24
+ up protected by checks that cannot go red.
20
25
 
21
26
  ```bash
22
- npx agent-quality-kit doctor # code already exists: your level and what to install
27
+ npx agent-quality-kit doctor # code already exists: what it declares, what nothing is watching
23
28
  npx agent-quality-kit start # no code yet: day-zero guards, right away
24
29
  ```
25
30
 
31
+ Here is the first run on a repository whose pipeline is green and whose checks cannot go red.
32
+ Nothing declared, nothing installed, no config written — it read the project's own `package.json`:
33
+
34
+ ```text
35
+ Checks you ALREADY have (3) — found in your own files, not invented:
36
+ ✘ test npm test ← package.json
37
+ cannot fail: the verdict is swallowed right in the script — «|| true»
38
+ ✔ lint npm run lint ← package.json
39
+ ✘ typecheck npm run typecheck ← package.json
40
+ proves nothing: the whole script is a printout — «echo 'todo: turn this on'»
41
+
42
+ 2 of them cannot go red. Declaring a check that cannot fail only makes the silence
43
+ machine-readable — fix the command first, then declare it.
44
+ ```
45
+
26
46
  `doctor` only reads. It writes no file and sends nothing anywhere — safe to point at a repository
27
- you have decided nothing about yet. Nothing to install: `npx` fetches the package (574.1 kB, measured 2026-09-10 nothing guards this number, so check it
28
- when it matters).
47
+ you have decided nothing about yet. Nothing to install: `npx` fetches the package — **≈0.7 MB**,
48
+ a number a machine re-checks on every run rather than our memory.
49
+
50
+ For Claude Code there is a plugin: the repository's real state reaches the agent's context before
51
+ its first action, plus two skills — whether the declared checks can actually fail, and what to fix
52
+ first. Installable from our own marketplace, with nobody's approval to wait for:
53
+
54
+ ```bash
55
+ /plugin marketplace add arsen-ask-lx/Agent_Quality_Kit
56
+ /plugin install aqk@agent-quality-kit
57
+ ```
29
58
 
30
59
  The one exception, named here because it is the only one: with `--brief` (how the hooks run it)
31
60
  `doctor` asks the npm registry for its own latest version — **at most once a day, never in CI**,
@@ -107,6 +136,10 @@ aqk context the repository state in one block, for an agent's contex
107
136
  aqk prompt one task to paste into an agent: what to fix, in order, and the
108
137
  command that proves each item done
109
138
  aqk vitals is what the kit runs on wired up: gate tools, hooks, freshness
139
+ aqk feedback feedback to the author: a report from the last run and probe,
140
+ plus a prefilled link. No paths, no code; nothing is sent for you
141
+ aqk feedback --send send it in one command — with your own gh account, as a comment
142
+ in an open discussion. Without the flag nothing ever leaves
110
143
  aqk doctor --run --brief one line on success, the whole run on failure — for hooks
111
144
  aqk context --full the same plus the command map and the rulebook verbatim (~7000
112
145
  tokens against ~500: the price of an agent that does not guess)
@@ -146,7 +179,7 @@ $ npx agent-quality-kit doctor --run # runs them
146
179
  ./src/api/mailer.py:8: print("sent", to)
147
180
  ✘ todo-without-task exit 1
148
181
  ./src/web/app.js:1:// TODO: rewrite this
149
- ✔ file-size-limit · entry-links-exist · complexity-limit
182
+ ✔ file-size-limit · deps-are-pinned · complexity-limit
150
183
  ```
151
184
 
152
185
  The failure text is written for an agent: it says **what exactly to do**. The exit code is for
@@ -193,6 +226,8 @@ gates: # what must pass — as commands, not as prose
193
226
  secrets-not-in-code: "bash gates/secrets-not-in-code/check.sh ."
194
227
  covers: # what a declared gate already holds — not counted as debt
195
228
  lint: [no-print-in-prod, swallowed-error]
229
+ requires: # what a gate runs on, when the command does not show it
230
+ secrets-not-in-code: gitleaks
196
231
  samples: gates # a red and a green sample for every entry
197
232
  ratchets: ratchets # debt registries: the list may only get shorter
198
233
  probe: 100 # run the probe itself every N commits; 0 turns it off
@@ -222,6 +257,13 @@ catches things" are different claims, and the output says so out loud.
222
257
 
223
258
  ## Four levels
224
259
 
260
+ [![AQK-3](https://img.shields.io/badge/AQK-3-2ea44f)](https://github.com/arsen-ask-lx/Agent_Quality_Kit)
261
+
262
+ **A level measures equipment, not quality.** It says which guards a repository has and has proven
263
+ on samples — not that the code is good, and not that the guards caught anything in *your* files.
264
+ That is what `probe` is for, and `doctor` prints what the level does **not** prove right under it.
265
+ The badge above is this repository's own, kept honest by `aqk badge --check` in its pipeline.
266
+
225
267
  | Level | Required | What it proves |
226
268
  |---|---|---|
227
269
  | **AQK-0** | a manifest and an entry point | the tooling knows what to read |
@@ -351,7 +393,7 @@ Already using [pre-commit](https://pre-commit.com)? Three lines in the file you
351
393
  ```yaml
352
394
  repos:
353
395
  - repo: https://github.com/arsen-ask-lx/Agent_Quality_Kit
354
- rev: v0.14.0
396
+ rev: v0.16.0
355
397
  hooks:
356
398
  - id: aqk # runs what the repository declares; blocks below AQK-1
357
399
  # - id: aqk-doctor # read-only: the level and what is missing, blocks nothing
@@ -372,7 +414,7 @@ layer AQK adds.
372
414
  [![on the GitHub Marketplace](https://img.shields.io/badge/GitHub%20Marketplace-Agent%20Quality%20Kit-2ea44f?logo=github)](https://github.com/marketplace/actions/agent-quality-kit-aqk)
373
415
 
374
416
  ```yaml
375
- - uses: arsen-ask-lx/Agent_Quality_Kit@v0.14.0
417
+ - uses: arsen-ask-lx/Agent_Quality_Kit@v0.16.0
376
418
  with:
377
419
  min: 1 # the build fails below AQK-1, or if any declared gate failed
378
420
  ```
@@ -431,12 +473,34 @@ files the diff touched:
431
473
  aqk doctor --run --since main # only what this branch introduced
432
474
  ```
433
475
 
434
- Three outcomes, all of them said out loud. Findings inside the diff — red, as usual. Findings only
435
- outside it — green, with the number that was hidden, never a silent "all clear". And a gate whose
476
+ Four outcomes, all of them said out loud. Findings inside the diff — red, as usual. Findings only
477
+ outside it — green, with the number that was hidden, never a silent "all clear". A gate whose
436
478
  output carries no paths at all (a commit-message check, a CI-config check) **cannot** be narrowed:
437
- it stays red, and says why. Calling it green because there was nothing to narrow would be exactly
479
+ it stays red, and says why. And a gate that **could not run at all** no tool, an unexpected exit
480
+ code, killed by a signal — is never narrowed by the diff: a failure has no place in the code, only
481
+ itself. Calling either of the last two green because there was nothing to narrow would be exactly
438
482
  the silence this tool exists to remove.
439
483
 
484
+ ### The only payment: one answer
485
+
486
+ The kit is free and collects nothing about you: it makes exactly one outgoing request — asking the
487
+ npm registry whether a newer version exists. The payment is different: **one answer to the author**.
488
+ So once per project, and only when there is something to tell, `doctor` or the agent block prints a
489
+ line like "AQK could not check `smoke`; that is the most valuable thing to tell the author". Then:
490
+
491
+ ```bash
492
+ aqk feedback # builds the message and hands you a prefilled link — you send it, not us
493
+ ```
494
+
495
+ The message carries: version, level, stack, what went red, what the kit could not check, which
496
+ defect classes nobody catches here. **No paths, no code, no repository name** — you see every
497
+ character you send. No GitHub? Forward the text as is. Not interested at all? `AQK_FEEDBACK=0`.
498
+
499
+ Somewhere to say it in your own words:
500
+ [where the kit was wrong](https://github.com/arsen-ask-lx/Agent_Quality_Kit/discussions/90) ·
501
+ [what check is missing](https://github.com/arsen-ask-lx/Agent_Quality_Kit/discussions/91) ·
502
+ [show your manifest](https://github.com/arsen-ask-lx/Agent_Quality_Kit/discussions/92).
503
+
440
504
  Every `doctor --run` rewrites `.aqk/last-run.md` — a short report of what actually ran and how
441
505
  long it took. The list of gates in the manifest says nothing about how many of them are alive
442
506
  right now; the report does. The file is ephemeral — keep it in your own `.gitignore`.
@@ -572,6 +636,12 @@ aqk blob # assembles GOD_AI.md out of kit/docs — to hand the guides to a c
572
636
  The file is **assembled, not stored**: edit the originals. A hand-edited copy drifts from its
573
637
  source within a week, and then nobody knows which one is real.
574
638
 
639
+ A single gate is waited on for **five minutes**; past that it is "could not check", not
640
+ "clean". Change it with `AQK_GATE_TIMEOUT` (seconds): `AQK_GATE_TIMEOUT=900 aqk doctor --run`.
641
+ The default is not arbitrary — SonarQube waits exactly as long for its quality gate. There is
642
+ deliberately no per-gate `timeout` field in the manifest: neither pre-commit nor lefthook has
643
+ one, and a long check is more honestly declared as a separate command than allowed to hang.
644
+
575
645
  ## Contributing a gate
576
646
 
577
647
  The catalogue lives on other people's bruises. The procedure and the bar are in
package/README.ru.md CHANGED
@@ -5,28 +5,57 @@
5
5
  [![npm](https://img.shields.io/npm/v/agent-quality-kit)](https://www.npmjs.com/package/agent-quality-kit)
6
6
  [![проверки](https://github.com/arsen-ask-lx/Agent_Quality_Kit/actions/workflows/ci.yml/badge.svg)](https://github.com/arsen-ask-lx/Agent_Quality_Kit/actions/workflows/ci.yml)
7
7
  [![лицензия MIT](https://img.shields.io/npm/l/agent-quality-kit)](LICENSE)
8
- [![AQK-3](https://img.shields.io/badge/AQK-3-2ea44f)](https://github.com/arsen-ask-lx/Agent_Quality_Kit)
9
8
 
10
- **Проверить, готов ли репозиторий к тому, что код в нём пишет ИИ-агент — и превратить правила,
11
- которые проект обещает соблюдать, в команды с кодом возврата.**
9
+ **Проверка, которая не может провалиться, выглядит точно так же, как проверка, которая прошла.**
10
+
11
+ `|| true`, `continue-on-error: true`, линтер, направленный в пустой каталог, тест без единого
12
+ утверждения, хук, который никто не поставил, команда из вашего же `AGENTS.md`, которой больше не
13
+ существует, — каждое печатает зелёную галочку. AQK подсаживает заведомый дефект в **копию** вашего
14
+ кода, запускает проверки, которые репозиторий **объявил**, и говорит, какая из них заметила, а
15
+ какая промолчала.
16
+
17
+ Он никогда не читает «ничего не напечатано» как «ничего страшного». Три исхода, а не два:
12
18
 
13
- `AGENTS.md` говорит, что проект обещает. Никто не проверяет, правда ли это и запускаются ли
14
- вообще перечисленные там команды. AQK — тот самый недостающий слой: одна команда читает
15
- репозиторий, называет ступень от AQK-0 до AQK-3 и перечисляет каждого недостающего сторожа.
19
+ | `✔` | `✘` | `?` |
20
+ |---|---|---|
21
+ | отработала, чисто | находка о коде | **сама проверка не смогла** — чинить инструмент, а не файл, который она назвала, падая |
16
22
 
17
- И один шаг дальше, чем соседние инструменты: `probe` подсаживает заведомый дефект в копию вашего
18
- проекта и смотрит, покраснеет ли **объявленная** защита. «Тесты есть» и «тесты ловят» — разные
19
- утверждения, и оценки готовности меряют первое.
23
+ Третий и есть весь смысл. Считать его одним из первых двух так и получается репозиторий,
24
+ защищённый проверками, которые не умеют покраснеть.
20
25
 
21
26
  ```bash
22
- npx agent-quality-kit doctor # код уже есть: уровень и что поставить
27
+ npx agent-quality-kit doctor # код уже есть: что объявлено и чего не сторожит никто
23
28
  npx agent-quality-kit start # кода ещё нет: сторожа дня 0 сразу
24
29
  ```
25
30
 
31
+ Вот первый запуск на репозитории, где конвейер зелёный, а покраснеть не может ни одна проверка.
32
+ Ничего не объявлено, ничего не поставлено, ни одного файла не записано — прочитан его же
33
+ `package.json`:
34
+
35
+ ```text
36
+ Проверки, которые у вас УЖЕ ЕСТЬ (3) — прочитаны в ваших файлах, не выдуманы:
37
+ ✘ test npm test ← package.json
38
+ не может провалиться: исход погашен прямо в скрипте — «|| true»
39
+ ✔ lint npm run lint ← package.json
40
+ ✘ typecheck npm run typecheck ← package.json
41
+ ничего не доказывает: всё тело скрипта — печать — «echo 'todo: turn this on'»
42
+
43
+ из них 2 покраснеть не могут. Объявить проверку, которая не может провалиться, — значит
44
+ сделать молчание машинно-читаемым. Сначала почините команду.
45
+ ```
46
+
26
47
  `doctor` только читает: ни одного файла не пишет и никуда ничего не отправляет — его можно
27
48
  направить на репозиторий, о котором ещё ничего не решено. Ставить ничего не нужно, `npx` скачает
28
- пакет сам (574.1 kB, замер 2026-09-10 — это число не сторожит никто, так что при случае
29
- перемерьте).
49
+ пакет сам **≈0,7 МБ**; это число сверяет машина при каждом прогоне, а не наша память.
50
+
51
+ Для Claude Code есть плагин — состояние репозитория попадает в контекст агента до его первого
52
+ действия, плюс два умения: «работают ли проверки» и «что чинить по порядку». Ставится из нашей
53
+ же витрины, без ожидания чьего-либо одобрения:
54
+
55
+ ```bash
56
+ /plugin marketplace add arsen-ask-lx/Agent_Quality_Kit
57
+ /plugin install aqk@agent-quality-kit
58
+ ```
30
59
 
31
60
  Единственное исключение, и названо оно здесь именно потому, что единственное: с `--brief`
32
61
  (так его запускают хуки) `doctor` спрашивает у реестра npm свою последнюю версию — **не чаще
@@ -109,6 +138,10 @@ aqk context состояние репозитория одним б
109
138
  aqk prompt одно задание для агента: что починить, по порядку, и у каждого
110
139
  пункта команда, которая докажет «готово»
111
140
  aqk vitals подключено ли то, чем комплект работает: инструменты, хуки, свежесть
141
+ aqk feedback отзыв автору: отчёт из последнего прогона и пробы плюс готовая
142
+ ссылка. Без путей и без кода; ничего не отправляет само
143
+ aqk feedback --send отправить его одной командой — вашей же учётной записью gh,
144
+ комментарием в открытое обсуждение. Без флага не уходит ничего
112
145
  aqk doctor --run --brief одна строка на успехе, весь прогон при провале — для хуков
113
146
  aqk context --full то же плюс карта команд и свод правил дословно (≈7000 токенов
114
147
  против ≈500 — плата за то, чтобы агент не догадывался)
@@ -149,7 +182,7 @@ $ npx agent-quality-kit doctor --run # запускает их
149
182
  ./src/api/mailer.py:8: print("sent", to)
150
183
  ✘ todo-without-task код 1
151
184
  ./src/web/app.js:1:// TODO: переписать
152
- ✔ file-size-limit · entry-links-exist · complexity-limit
185
+ ✔ file-size-limit · deps-are-pinned · complexity-limit
153
186
  ```
154
187
 
155
188
  Текст отказа написан для агента: в нём сказано, **что именно сделать**. Код возврата — для
@@ -196,6 +229,8 @@ gates: # что обязано пройти — команд
196
229
  secrets-not-in-code: "bash gates/secrets-not-in-code/check.sh ."
197
230
  covers: # что уже держит объявленный гейт — в долг не пишется
198
231
  lint: [no-print-in-prod, swallowed-error]
232
+ requires: # чем гейт работает, если по команде этого не видно
233
+ secrets-not-in-code: gitleaks
199
234
  samples: gates # красный и зелёный образец каждой записи
200
235
  ratchets: ratchets # реестры долга: список может только укорачиваться
201
236
  probe: 100 # раз во столько коммитов проба делается сама; 0 — не делать
@@ -225,6 +260,14 @@ aqk doctor --baseline # ✔/✘ по пунктам, которые машин
225
260
 
226
261
  ## Четыре ступени
227
262
 
263
+ [![AQK-3](https://img.shields.io/badge/AQK-3-2ea44f)](https://github.com/arsen-ask-lx/Agent_Quality_Kit)
264
+
265
+ **Ступень меряет оснащённость, а не качество.** Она говорит, какие сторожа у репозитория есть и
266
+ доказаны на образцах, — но не что код хорош и не что сторожа поймали хоть что-то в **ваших**
267
+ файлах. Для этого есть `probe`, а `doctor` прямо под ступенью печатает, чего она **не**
268
+ доказывает. Значок выше — наш собственный, и его правдивость держит `aqk badge --check` в
269
+ конвейере.
270
+
228
271
  | Уровень | Требуется | Что доказано |
229
272
  |---|---|---|
230
273
  | **AQK-0** | манифест и точка входа | инструмент знает, что читать |
@@ -355,7 +398,7 @@ aqk badge --check # в конвейере: код 1 в тот день, ког
355
398
  ```yaml
356
399
  repos:
357
400
  - repo: https://github.com/arsen-ask-lx/Agent_Quality_Kit
358
- rev: v0.14.0
401
+ rev: v0.16.0
359
402
  hooks:
360
403
  - id: aqk # запускает объявленное; роняет коммит ниже AQK-1
361
404
  # - id: aqk-doctor # только осмотр: уровень и чего не хватает, ничего не роняет
@@ -374,7 +417,7 @@ repos:
374
417
  [![в GitHub Marketplace](https://img.shields.io/badge/GitHub%20Marketplace-Agent%20Quality%20Kit-2ea44f?logo=github)](https://github.com/marketplace/actions/agent-quality-kit-aqk)
375
418
 
376
419
  ```yaml
377
- - uses: arsen-ask-lx/Agent_Quality_Kit@v0.14.0
420
+ - uses: arsen-ask-lx/Agent_Quality_Kit@v0.16.0
378
421
  with:
379
422
  min: 1 # сборка падает ниже AQK-1 или если упал любой объявленный гейт
380
423
  ```
@@ -432,11 +475,34 @@ aqk ratchet no-print-in-prod # старое — долг, новое не пу
432
475
  aqk doctor --run --since main # только то, что внесла эта ветка
433
476
  ```
434
477
 
435
- Три исхода, и все три названы вслух. Находки внутри дифа — красный, как обычно. Находки только
436
- снаружи — зелёный, с числом того, что скрыто, а не молчаливое «всё чисто». А гейт, в выводе
478
+ Четыре исхода, и все четыре названы вслух. Находки внутри дифа — красный, как обычно. Находки
479
+ только снаружи — зелёный, с числом того, что скрыто, а не молчаливое «всё чисто». Гейт, в выводе
437
480
  которого путей нет вовсе (проверка сообщения коммита, проверка конфига конвейера), сузиться
438
- **не может**: он остаётся красным и говорит почему. Назвать его зелёным потому, что сужать было
439
- нечего,ровно та тишина, ради устранения которой этот инструмент и написан.
481
+ **не может**: он остаётся красным и говорит почему. А гейт, который вообще **не смог
482
+ отработать**нет инструмента, неожиданный код возврата, убит сигналом, дифом не сужается
483
+ никогда: у сбоя нет места в коде, есть только сам сбой. Назвать любой из двух последних зелёным
484
+ потому, что сужать было нечего, — ровно та тишина, ради устранения которой этот инструмент и
485
+ написан.
486
+
487
+ ### Единственная плата — один ответ
488
+
489
+ Комплект бесплатный и ничего о вас не собирает: исходящий запрос у него ровно один — спросить
490
+ реестр npm, не вышла ли версия свежее. Плата другая: **один ответ автору**. Поэтому один раз на
491
+ проект — и только когда есть что рассказать — `doctor` или блок для агента печатают строку вроде
492
+ «AQK не смог проверить `smoke`; автору это ценнее всего». Дальше:
493
+
494
+ ```bash
495
+ aqk feedback # соберёт письмо и даст готовую ссылку — отправляете вы, не мы
496
+ ```
497
+
498
+ В письме: версия, уровень, стек, что покраснело, чего комплект не смог проверить, какие классы
499
+ брака здесь не ловит никто. **Ни путей, ни кода, ни имени репозитория** — вы видите глазами всё,
500
+ что отправляете. Не нужен GitHub — перешлите текст как есть. Не нужно вовсе: `AQK_FEEDBACK=0`.
501
+
502
+ Где рассказать словами:
503
+ [где комплект соврал](https://github.com/arsen-ask-lx/Agent_Quality_Kit/discussions/90) ·
504
+ [какой проверки не хватает](https://github.com/arsen-ask-lx/Agent_Quality_Kit/discussions/91) ·
505
+ [покажите свой манифест](https://github.com/arsen-ask-lx/Agent_Quality_Kit/discussions/92).
440
506
 
441
507
  Каждый `doctor --run` перезаписывает `.aqk/last-run.md` — короткий отчёт, что из объявленного
442
508
  реально сработало и за сколько. Список гейтов в манифесте молчит о том, сколько из них живы
@@ -569,6 +635,12 @@ aqk blob # собирает GOD_AI.md из kit/docs — чтобы разо
569
635
  Файл **собирается, а не хранится**: править надо оригиналы. Копия, которую правят руками, через
570
636
  неделю расходится с источником, и непонятно, какая настоящая.
571
637
 
638
+ Один гейт ждут **пять минут**, дальше это «не смогли проверить», а не «чисто». Срок меняется
639
+ переменной `AQK_GATE_TIMEOUT` (в секундах): `AQK_GATE_TIMEOUT=900 aqk doctor --run`. Умолчание
640
+ взято не с потолка — столько же ждёт quality gate у SonarQube. Поля `timeout` у гейта в
641
+ манифесте нет намеренно: его нет ни у pre-commit, ни у lefthook, а долгую проверку честнее
642
+ объявить отдельной командой, чем разрешить ей висеть.
643
+
572
644
  ## Принести свой гейт
573
645
 
574
646
  Каталог живёт чужими шишками. Порядок и порог — в [`CONTRIBUTING.md`](CONTRIBUTING.md):
@@ -26,6 +26,7 @@
26
26
 
27
27
  | Документ | О чём | Класс |
28
28
  |---|---|---|
29
+ | [`operational-gates.md`](operational-gates.md) | актуальная карта OOM, N+1, Celery, метрик и нагрузки: что закрыто, что только видно и как подключать через AQK без дублей | PORTABLE |
29
30
  | [`agent-harness-playbook.md`](agent-harness-playbook.md) | чек-лист «День 0»: конфиги, линтеры, хуки, CI, Docker. Раздел 18 — дисциплина в каждой задаче | PORTABLE |
30
31
  | [`project-baseline.md`](project-baseline.md) | что обязано быть на любом проекте, чтобы работу можно было отдать машине. Назначение без названий инструментов | PORTABLE |
31
32
  | [`ai-sdlc.md`](ai-sdlc.md) | процесс по этапам: от «зачем» до эксплуатации. Отвечает «в каком порядке», а не «каким инструментом» | CURRENT |