From 71863040ed6bfcbecbde705e6266b94815787353 Mon Sep 17 00:00:00 2001 From: vitya Date: Wed, 12 Aug 2026 20:14:14 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20command-index=20v0.1.0=20=E2=80=94=20ju?= =?UTF-8?q?st/Makefile=20convention=20skill=20(idea=203,=20claude-to-agent?= =?UTF-8?q?s)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/command-index.skill | Bin 0 -> 2333 bytes skills/command-index/SKILL.md | 58 ++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 dist/command-index.skill create mode 100644 skills/command-index/SKILL.md diff --git a/dist/command-index.skill b/dist/command-index.skill new file mode 100644 index 0000000000000000000000000000000000000000..3bb04c6c9454a9aa85e493ce43c51a6e4f0c4ce6 GIT binary patch literal 2333 zcmV+&3F7upO9KQH000080K%aRT}l~-NskBs01^`b02TlM0Ap`$ZDDR?Eop9KWq2=B zOG!*jE^TD3SIv&x#u2{HQxvR&XGTMgW&04!A~qCR2?8XNVaf27Tu#ppwH!9XCbe3h zc2dKP$;m0H0>qELK-necxBrp69jF zaH0kj>B%HahhCfx)uUEe7Gs?cNSC>3Jyf}gbvmGr{2Ts9t)Vhe9%qFtebyqnrPGHh zXC}dBHT;jEVt;6g((RF^UrvP&>=jNaeX2 z_TVzgwJ~0ngav#}Is}KopTlisZNoy`=PJ{bYh6$hn<7rPWYrWnMwkz&2=gsf7#wy7IpYD&9%L7RsC^pt7oFnuwH9HDN)A0GhSntqK zD>i^tb5!>E0sXx957_QfxP`PJ%y4K(r;0dwI5q`VNRMc%REAyCrYd%nO5s)_^D}dU z`jlo9vZ*$B%66MQeEQlb+8L{q;9lkIAY25{=ItbCTS>T7$f4rMQZ{vlI#YSbMKhfq zg=Sj~>GG%QqB^WDsNSz1*ZWkR;psL0PG$WR%hUSca)xM@rqgO(9o2i)A>Kaa+AY7T z_p5VRB|Ps{b3C6eS1)HhuB#lxMB!+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KwxNp;qt#b^d z{Yay$bru4(%zE#kQsZD5SAKn7dCTyb@2%x z6vPNME#VKCFF`Y8d7GH`4MrqPJ?;8OX0g5Vkek~qn1F>N&b-JfrvL@-taKl*%zBLw z95*Bb?4&$%hA8sb`Y%vR0Rj{N6aWAK2mr#N3|&eYhDnbI000sb000&M0000000000 z0000000000V{dJ3VQyqCX>Md?crQ~+NlZ*GZDdeO1qJ{B000310RTh*006@X00000 DEqz`t literal 0 HcmV?d00001 diff --git a/skills/command-index/SKILL.md b/skills/command-index/SKILL.md new file mode 100644 index 0000000..d318ebb --- /dev/null +++ b/skills/command-index/SKILL.md @@ -0,0 +1,58 @@ +--- +name: command-index +author: ours +version: 0.1.0 +description: > + Convention skill for the project's executable contract: a `justfile` (preferred, + cross-platform) or `Makefile` at the repo root listing the standard targets + `setup test lint build run clean help`. The command index is the single answer to + "how does this project run" — any agent reads one file instead of guessing between + build.ps1 / npm scripts / pyproject. Use when entering a project (read the index + before running project operations), asked «как тут запускается» / «как собрать, + запустить, протестить», or when scaffolding a repo's command surface. Prefer + `just` over make (native Windows binary, no sh dependency); make is the fallback. + Windows one-time install: `winget install neil.fraser.just`. Rooted in idea 3 / + 18 (claude-to-agents): Makefile/just as единый интерфейс управления проектом. +--- + +# command-index + +> The project's command surface as a single executable file. `just --list` / `make help` is auto-documentation; the agent reads the index once and never guesses again. + +## When to use + +- **Entering a project** — read the command index before running any project operation: `justfile` → `Makefile` → `package.json` `scripts` → `pyproject` task runners. First hit wins. +- **«Как тут запускается?»** / «как собрать, запустить, протестить?» — answer from the index, don't reverse-engineer scripts by reading them. +- **Scaffolding** — when a repo has no index and 2+ recurring operations (build + test + lint), propose creating one. + +## Convention + +- One file at repo root: **`justfile`** (preferred) or **`Makefile`** (fallback). +- Standard target names: `setup test lint build run clean help`. +- **`help` / `--list` = auto-doc**: every target carries a one-line comment (`just`: `# comment` above the recipe; `make`: `## comment` above the target), so `just --list` / `make help` reads as the project's manual. +- `CLAUDE.md` / `AGENTS.md` references it: «все операции — через just». The index is the **executable contract** (AGENTS.md = readable contract; command-index = executable contract). + +## Steps + +1. **Discover.** Check in order: `justfile`, `Makefile`, `package.json#scripts`, `pyproject.toml` task runners. First hit wins; stop there. +2. **Read targets.** Extract the target list (`just --list` / `make help` / `npm run`). Prefer indexed targets over raw script chains. +3. **Answer.** «Как тут запускается» — из индекса: setup → test → lint → build → run. +4. **No index?** Propose one with the standard target set, or document the de-facto index (`package.json` scripts) explicitly — a written pointer beats silent guessing. + +## Windows notes + +- **`just` preferred**: native Windows binary, cross-platform recipes, no `sh` dependency. `make` recipes run through `sh` on Windows — friction (paths, quoting). +- One-time install: `winget install neil.fraser.just` (или `choco install just` / `scoop install just`). +- If the repo already uses `make` — follow it, don't force-migrate unasked. + +## What NOT to do + +- **Не угадывать команды**, когда индекс существует — читать его. +- **Не выдумывать таргеты** вне индекса; таргет, который есть в репо, но не заиндексирован = документационный долг → предложить добавить. +- **Не гонять raw-цепочки** npm/pip, когда индексированный таргет покрывает ту же операцию. +- **Не форсить make на Windows** (just лучше); не мигрировать рабочий make-репо без просьбы. +- **Не игнорировать индекс** в пользу памяти «я знаю этот проект» — стек меняется, индекс актуален. + +## Why this exists + +Идея 3 / 18 (running record `claude-to-agents`): make/just как единый интерфейс управления проектом — агент открывает один файл и видит весь репертуар операций (setup/test/lint/build/run/clean/help), убивая класс вопросов «как тут запускается»; любой агент (pi/claude/hermes/codex) читает одно и то же. `just` выбран над `make` из идеи 18 (Buzz-референс): нативный Windows-бинарь, кросс-платформенный, без sh-зависимости. Интеграция в `project-bootstrap` (эмитит justfile при бутстрапе) — follow-up, не в этом скоупе.