AGENT SKILL

verify-gate

Implement a story behind a DETERMINISTIC gate — run `tsc --noEmit` + `vitest run`, and do NOT say DONE until both are green, pasting the command output as evidence. Triggers on '/verify-gate <story-id>' (e.g. '/verify-gate story-28'), or 'детермінований гейт', 'доказ перед DONE', 'не кажи готово поки тести червоні'. Reads tasks/<story-id>.md for AC, iterates on the implementation using the failing test output as feedback, refuses completion while red.

License 许可
MIT
最近更新
2026-11-12
Stars
★ 15
Forks
13

01 前言 Front Matter

name
verify-gate
description
Implement a story behind a DETERMINISTIC gate — run `tsc --noEmit` + `vitest run`, and do NOT say DONE until both are green, pasting the command output as evidence. Triggers on '/verify-gate <story-id>' (e.g. '/verify-gate story-28'), or 'детермінований гейт', 'доказ перед DONE', 'не кажи готово поки тести червоні'. Reads tasks/<story-id>.md for AC, iterates on the implementation using the failing test output as feedback, refuses completion while red.
allowed-tools
Read, Glob, Edit, Write, Bash(npm test:*), Bash(npx tsc:*), Bash(npm run typecheck:*), Bash(git status:*), Bash(git diff:*), Bash(git add:*), Bash(git commit:*)
argument-hint
<story-id> (e.g. story-28)
disable-model-invocation
false

03 SKILL.md 正文

verify-gate — реалізувати story за детермінованим гейтом

Канал зворотного зв'язку #1 лекції 7.6: детермінований гейт. Машина дає однозначний pass/fail, і «готово» вирішує не модель, а зелений набір перевірок. Skill бере story з AC, реалізує її, ганяючи гейт на кожній ітерації, і не завершує, поки гейт червоний — а наприкінці вставляє вивід команди як доказ (evidence-before-assertion).

Канонічна story — story-28 (sortQueue review-order): тест queue-sort.test.ts ЧЕРВОНИЙ на старті (test-first), бо функція — стаб. Гейт не дасть «закрити» задачу, поки тест не зелений.

Гейт (що саме перевіряємо)

npx tsc --noEmit && npm test

&& — продовжуй, тільки якщо попереднє пройшло. Перша ж червона перевірка зупиняє ланцюжок. Це той самий набір, що його ганяє pre-commit hook (scripts/pre-commit) і Stop-hook (.claude/hooks/verify.sh) — гейт один, точок входу кілька.

Кроки

  1. Read tasks/<story-id>.md — витягни AC (Given/When/Then) і Doneness.
  2. Прогнати гейт як baseline: npx tsc --noEmit && npm test. Зафіксуй, що саме червоне (який assert, очікував/отримав) — це твій сигнал.
  3. Реалізувати мінімальну зміну, що закриває червоний assert (для story-28 — sortQueue у src/lib/queue.ts). Пам'ятай пастку: queue.sort() мутує вхід → тест чистоти впаде; треба [...queue].sort().
  4. Прогнати гейт знову. Якщо червоний — читай конкретний assert, виправляй, повторюй. Не переходь далі, поки не зелено.
  5. Доказ перед DONE: коли гейт зелений — вистав git status/git diff, встав вивід npm test (рядок «N passed») прямо у відповідь, тоді git add -A && git commit.

Завершальне правило (вписується явно, не на добру волю моделі)

Перш ніж сказати DONE: виконай npx tsc --noEmit && npm test, переконайся, що ОБИДВА зелені, і встав вивід тесту у відповідь. Якщо хоч щось червоне — це НЕ done; читай падіння й виправляй. Якщо не можеш перевірити — не відправляй.

Acceptance criteria цього skill-а

  • Гейт (tsc --noEmit + vitest run) зелений перед будь-яким «готово».
  • Вивід команди вставлено у відповідь як доказ (не словесна гарантія).
  • Кожна ітерація спирається на конкретний червоний assert, не на здогад.

Anti-patterns

  • Не кажи DONE без вставленого виводу — це найдешевший сигнал нечесності.
  • Не «підганяй тест під код» — якщо впав assert порядку/чистоти, виправляй sortQueue, а не тест (тест описує намір зі story, не поточну поведінку стабу).
  • Не вимикай і не .skip червоний тест, щоб «пройшов» гейт — це і є обхід дисципліни.
  • Не коміть червоне «щоб не загубити» — гейт існує саме щоб цього не сталося.

04 同仓库更多 Skills

genkovich
genkovich/agentic-engineering-course-public

release

Run the whole local release pipeline in order, stopping at each human gate. Triggers on "run the release", "prepare a release", "/release", "зроби реліз", "підготуй реліз". Drives the four stages back to back — bump-version → curate-changelog → release-notes → check-docs-drift — pausing after each so the human reviews the diff before the next stage. Prepares everything in the working tree; never tags, commits, or pushes. The tag push (which fires CI) stays the human's action.

★ 15
genkovich
genkovich/agentic-engineering-course-public

release-notes

Draft partner-facing release notes from the same commits as the changelog. Triggers on "draft release notes", "release notes for the next version", "/release-notes", "нотатки релізу", "release notes партнеру". Same input as curate-changelog, different audience and tone: a short, benefit-first narrative for a user or partner — "what's new for you" — not a categorized engineer's list. Keeps only changes a user actually notices; drops internal refactors and tooling. Prints the notes to the chat to seed a GitHub Release description or a partner announcement. Writes no file.

★ 15
genkovich
genkovich/agentic-engineering-course-public

curate-changelog

Curate the [Unreleased] section of docs/CHANGELOG.md from git history. Triggers on "curate the changelog", "update the changelog", "/curate-changelog", "онови changelog", "курування журналу". Reads git log since the last tag, FILTERS out what a reader never feels (test/ci/chore/merge), GROUPS commits about one feature into one bullet, and REWRITES technical subjects into plain language under the six Keep a Changelog categories (Added/Changed/Deprecated/ Removed/Fixed/Security). The result must have FEWER lines than the raw log — that is the proof of curation, not a dump. Leaves the edit in the working tree; never commits or pushes.

★ 15
genkovich
genkovich/agentic-engineering-course-public

codify-rule

Turn a repeated mistake into a durable, path-scoped rule in .claude/rules/. Triggers on "codify this rule", "make a rule so this doesn't happen again", "/codify-rule", "закодифікуй правило", "петля помилка-правило". Use only when the same mistake showed up TWICE (twice = a pattern, once = noise). Names the wrong shape and the right shape with one short example of each, scopes the rule to the paths that matter, and leaves the edit in the working tree so the next agent on this repo inherits the fix. Edits only .claude/rules/; never commits or pushes.

★ 15
genkovich
genkovich/agentic-engineering-course-public

check-docs-drift

Find and fix where docs/api.md fell behind the code. Triggers on "check for doc drift", "is the API doc up to date", "/check-docs-drift", "перевір дрейф документації", "docs drift". Runs the deterministic scripts/check-docs-drift.py (parses the public NoteBook methods with ast, compares to what docs/api.md documents — NO LLM finds the gap), reports the drift, and PROPOSES the doc edit that closes it. The gap is found by parsing; the agent writes the missing documentation in the doc's existing style. Edits only docs/; never commits or pushes.

★ 15
genkovich
genkovich/agentic-engineering-course-public

bump-version

Decide and apply the next semver for a release. Triggers on "bump the version", "what version is next", "/bump-version", "простав версію", "яка наступна версія". Reads the next number from the deterministic scripts/next-version.sh (NEVER guesses it), explains in plain language WHICH part moved and why (e.g. "MINOR, because a feat landed: filter notes by tag"), edits the version line in pyproject.toml, and proposes the matching `git tag vX.Y.Z`. The number is decided by a rule; the agent explains and applies — the human confirms the tag. Never pushes a tag itself.

★ 15