AGENT SKILL

legacy-spike

Use when starting Step 1 of legacy refactoring protocol — runs a 2-4 hour feasibility spike for one Bounded Context. Triggers on '/legacy-spike <module>' or when user asks for a feasibility check, BC scope decision, or 'чи злітає переписування цього модуля'.

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

01 前言 Front Matter

name
legacy-spike
description
Use when starting Step 1 of legacy refactoring protocol — runs a 2-4 hour feasibility spike for one Bounded Context. Triggers on '/legacy-spike <module>' or when user asks for a feasibility check, BC scope decision, or 'чи злітає переписування цього модуля'.
allowed-tools
Read, Grep, Glob, Bash
argument-hint
<module-name> (e.g. account, orders, billing)
disable-model-invocation
false

03 SKILL.md 正文

legacy-spike — Step 1 feasibility spike

Запускає 2-4-годинну розвідку перед основною роботою. Перевіряє чотири критерії: churn, debt, isolation, feasibility.

Аргументи

  • <module-name> (обовʼязково) — імʼя нового модуля у internal/. Має бути нейтральним (наприклад account, не users-v2).

Inputs

  • git log за останні 3 місяці у legacy-папках
  • Кількість LOC у модулі (через find + wc -l)
  • Імпорти з модуля назовні (через grep -r "from internal.<old>")
  • Список public functions модуля (через grep -E "^def [a-z]")

Output: SPIKE.md (формат)

# SPIKE — <module-name>

## 1. Churn (3 місяці)
| File | commits | last touched |
| ---  | ---     | ---          |
| ...  | ...     | ...          |

## 2. Debt indicators
- LOC у legacy: <число>
- # public functions: <число>
- Тестове покриття: <%, через grep на pytest файли>
- TODO/FIXME у модулі: <число>

## 3. Isolation
- Імпортується ззовні: <список модулів які тягнуть legacy>
- Глобальні змінні / singletons: <список>
- Прихована логіка (магічні числа, хардкоди): <короткий список>

## 4. Feasibility verdict
- **Climbs in 1-2 weeks?** YES / NO / RISKY
- Якщо NO/RISKY — який зв'язок заважає, як його розплутати окремим циклом
- Якщо YES — rough Bounded Context boundaries (public interface)

## Rough plan
1. Step 2 — extract <N> файлів через subagents
2. Step 3 — <X> use cases для test plan
3. Step 4 — <Y> chunks (1 use case = 1 коміт за замовчуванням)

## Гіпотези для Step 2 critic
- ...

Acceptance criteria

  • SPIKE.md ≤ 2k токенів
  • Усі 4 секції присутні
  • Verdict (YES/NO/RISKY) присутній
  • Якщо verdict = NO — rough plan відсутній (це сигнал що Bounded Context невірний, повертайся у пошук іншого модуля)
  • Якщо verdict = YES — public interface намічений у форматі name(args) → result

Examples

/legacy-spike account

→ створює SPIKE.md у корені проекту з висновком чи можна переписати users-модуль на account за 1-2 тижні.

Anti-patterns

  • Не описуй промпт-шляхом «там точно є глобальний кеш» — main agent не передає здогадки у subagents. Subagents мають знаходити самі.
  • Не запускай spike на 30+ хвилин у одній сесії — це індикатор що модуль занадто великий. Спайк має бути 2-4 години людського часу для аналізу + 2-3 промпти Claude.
  • Не пиши users-v2 у rough plan — нейтральне доменне імʼя у <module-name>, інакше тягнеш лабораторні артефакти у прод-код.

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