@erclx/aitk 0.8.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 (359) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +99 -0
  3. package/claude/.claude-plugin/plugin.json +19 -0
  4. package/claude/skills/bash-script/SKILL.md +96 -0
  5. package/claude/skills/bash-script/references/patterns.md +349 -0
  6. package/claude/skills/ci-workflow/SKILL.md +52 -0
  7. package/claude/skills/ci-workflow/references/workflows.md +74 -0
  8. package/claude/skills/claude-address-review/SKILL.md +107 -0
  9. package/claude/skills/claude-autoship/SKILL.md +137 -0
  10. package/claude/skills/claude-design-extract/SKILL.md +69 -0
  11. package/claude/skills/claude-design-propose/SKILL.md +75 -0
  12. package/claude/skills/claude-diagram/SKILL.md +126 -0
  13. package/claude/skills/claude-docs/SKILL.md +204 -0
  14. package/claude/skills/claude-feature/REQUIREMENT.md +35 -0
  15. package/claude/skills/claude-feature/SKILL.md +148 -0
  16. package/claude/skills/claude-groundwork/SKILL.md +148 -0
  17. package/claude/skills/claude-groundwork/references/folder-format.md +107 -0
  18. package/claude/skills/claude-memory-capture/SKILL.md +80 -0
  19. package/claude/skills/claude-memory-review/REQUIREMENT.md +37 -0
  20. package/claude/skills/claude-memory-review/SKILL.md +206 -0
  21. package/claude/skills/claude-orchestrate/SKILL.md +125 -0
  22. package/claude/skills/claude-pr-review/SKILL.md +150 -0
  23. package/claude/skills/claude-review/SKILL.md +136 -0
  24. package/claude/skills/claude-roadmap/SKILL.md +61 -0
  25. package/claude/skills/claude-roadmap/references/roadmap.md +52 -0
  26. package/claude/skills/claude-screencast/SKILL.md +160 -0
  27. package/claude/skills/claude-seed-sync/SKILL.md +141 -0
  28. package/claude/skills/claude-slides-draft/SKILL.md +62 -0
  29. package/claude/skills/claude-standards-audit/REQUIREMENT.md +33 -0
  30. package/claude/skills/claude-standards-audit/SKILL.md +79 -0
  31. package/claude/skills/claude-standards-audit/references/branch.md +49 -0
  32. package/claude/skills/claude-standards-audit/references/pr.md +124 -0
  33. package/claude/skills/claude-tasks/SKILL.md +123 -0
  34. package/claude/skills/claude-ui-test/SKILL.md +75 -0
  35. package/claude/skills/claude-ux-audit/SKILL.md +78 -0
  36. package/claude/skills/claude-worktree/SKILL.md +79 -0
  37. package/claude/skills/cli-script/SKILL.md +47 -0
  38. package/claude/skills/cli-script/references/template.md +43 -0
  39. package/claude/skills/create-rule/SKILL.md +68 -0
  40. package/claude/skills/create-skill/REQUIREMENT.md +30 -0
  41. package/claude/skills/create-skill/SKILL.md +24 -0
  42. package/claude/skills/create-snippet/SKILL.md +28 -0
  43. package/claude/skills/create-snippet/references/snippets.md +57 -0
  44. package/claude/skills/create-standard/SKILL.md +31 -0
  45. package/claude/skills/create-standard/references/standard.md +52 -0
  46. package/claude/skills/docs-sync/SKILL.md +87 -0
  47. package/claude/skills/git-branch/REQUIREMENT.md +38 -0
  48. package/claude/skills/git-branch/SKILL.md +60 -0
  49. package/claude/skills/git-branch/references/branch.md +49 -0
  50. package/claude/skills/git-commit/REQUIREMENT.md +33 -0
  51. package/claude/skills/git-commit/SKILL.md +51 -0
  52. package/claude/skills/git-commit/references/commit.md +63 -0
  53. package/claude/skills/git-followup/REQUIREMENT.md +38 -0
  54. package/claude/skills/git-followup/SKILL.md +35 -0
  55. package/claude/skills/git-issue/REQUIREMENT.md +38 -0
  56. package/claude/skills/git-issue/SKILL.md +69 -0
  57. package/claude/skills/git-issue/references/issue.md +84 -0
  58. package/claude/skills/git-pr/REQUIREMENT.md +37 -0
  59. package/claude/skills/git-pr/SKILL.md +119 -0
  60. package/claude/skills/git-pr/references/branch.md +49 -0
  61. package/claude/skills/git-pr/references/pr.md +124 -0
  62. package/claude/skills/git-ship/REQUIREMENT.md +34 -0
  63. package/claude/skills/git-ship/SKILL.md +39 -0
  64. package/claude/skills/git-split/REQUIREMENT.md +38 -0
  65. package/claude/skills/git-split/SKILL.md +160 -0
  66. package/claude/skills/git-split/references/branch.md +49 -0
  67. package/claude/skills/git-split/references/pr.md +124 -0
  68. package/claude/skills/git-stage/REQUIREMENT.md +36 -0
  69. package/claude/skills/git-stage/SKILL.md +74 -0
  70. package/claude/skills/git-stage/references/commit.md +63 -0
  71. package/claude/skills/git-worktree/REQUIREMENT.md +37 -0
  72. package/claude/skills/git-worktree/SKILL.md +120 -0
  73. package/claude/skills/migration-claude-md/SKILL.md +74 -0
  74. package/claude/skills/migration-context/SKILL.md +93 -0
  75. package/claude/skills/migration-standards/SKILL.md +75 -0
  76. package/claude/skills/project-commands/SKILL.md +73 -0
  77. package/claude/skills/session-resume/SKILL.md +36 -0
  78. package/claude/skills/setup-gov/SKILL.md +71 -0
  79. package/claude/skills/setup-indexes/SKILL.md +148 -0
  80. package/claude/skills/setup-init/SKILL.md +114 -0
  81. package/claude/skills/setup-plugins/SKILL.md +81 -0
  82. package/claude/skills/setup-plugins/references/plugin-catalog.md +53 -0
  83. package/claude/skills/setup-verify/SKILL.md +51 -0
  84. package/claude/skills/systematic-debugging/SKILL.md +70 -0
  85. package/claude/skills/toolkit-cli/SKILL.md +38 -0
  86. package/claude/skills/toolkit-feedback/SKILL.md +80 -0
  87. package/claude/skills/toolkit-operator/SKILL.md +45 -0
  88. package/claude/skills/toolkit-triage/SKILL.md +63 -0
  89. package/claude/skills/youtube-transcripts/SKILL.md +34 -0
  90. package/docs/agents.md +371 -0
  91. package/docs/ai-workflow.md +157 -0
  92. package/docs/index.md +20 -0
  93. package/docs/operating-model.md +106 -0
  94. package/docs/target-projects.md +183 -0
  95. package/docs/visual-design-workflow.md +136 -0
  96. package/docs/zshrc-aliases.md +65 -0
  97. package/governance/rules/claude/500-prose.md +12 -0
  98. package/governance/rules/claude/510-context.md +16 -0
  99. package/governance/rules/claude/520-wireframes.md +12 -0
  100. package/governance/rules/claude/530-requirements.md +11 -0
  101. package/governance/rules/claude/540-architecture.md +11 -0
  102. package/governance/rules/claude/550-design.md +11 -0
  103. package/governance/rules/claude/555-tasks.md +12 -0
  104. package/governance/rules/claude/560-diagrams.md +11 -0
  105. package/governance/rules/claude/570-skill.md +18 -0
  106. package/governance/rules/claude/580-readme.md +11 -0
  107. package/governance/rules/claude/590-rule-authoring.md +12 -0
  108. package/governance/rules/core/000-constitution.md +30 -0
  109. package/governance/rules/core/010-testing.md +35 -0
  110. package/governance/rules/core/020-concurrency.md +22 -0
  111. package/governance/rules/core/030-error-handling.md +31 -0
  112. package/governance/rules/core/040-performance.md +20 -0
  113. package/governance/rules/core/050-logging.md +20 -0
  114. package/governance/rules/core/060-naming.md +19 -0
  115. package/governance/rules/core/070-planning.md +13 -0
  116. package/governance/rules/core/080-config-comments.md +22 -0
  117. package/governance/rules/framework/200-react.md +51 -0
  118. package/governance/rules/framework/210-astro.md +41 -0
  119. package/governance/rules/framework/220-fastapi.md +43 -0
  120. package/governance/rules/framework/230-nextjs.md +48 -0
  121. package/governance/rules/framework/250-tailwind.md +32 -0
  122. package/governance/rules/framework/260-shadcn.md +34 -0
  123. package/governance/rules/lang/100-typescript.md +40 -0
  124. package/governance/rules/lang/110-python.md +42 -0
  125. package/governance/rules/lib/300-testing-ts.md +38 -0
  126. package/governance/rules/lib/310-zod.md +25 -0
  127. package/governance/rules/lib/320-tanstack-query.md +32 -0
  128. package/governance/rules/lib/330-testing-py.md +44 -0
  129. package/governance/rules/lib/340-pydantic.md +38 -0
  130. package/governance/rules/lib/350-security-web.md +31 -0
  131. package/governance/rules/ui/400-ui.md +34 -0
  132. package/governance/rules/ui/410-a11y.md +44 -0
  133. package/governance/rules/ui/420-forms.md +34 -0
  134. package/governance/rules/ui/430-ux-completeness.md +62 -0
  135. package/governance/stacks/astro.toml +2 -0
  136. package/governance/stacks/base.toml +2 -0
  137. package/governance/stacks/node.toml +2 -0
  138. package/governance/stacks/python-fastapi.toml +2 -0
  139. package/governance/stacks/python.toml +2 -0
  140. package/governance/stacks/react.toml +2 -0
  141. package/package.json +67 -0
  142. package/scripts/config.sh +11 -0
  143. package/scripts/core/bootstrap.sh +81 -0
  144. package/scripts/core/check-plugin-boundary.sh +45 -0
  145. package/scripts/core/check-skill-paths.sh +25 -0
  146. package/scripts/core/clean.sh +36 -0
  147. package/scripts/core/install-check.sh +93 -0
  148. package/scripts/core/regen-claude-copies.sh +26 -0
  149. package/scripts/core/regen-indexes.sh +10 -0
  150. package/scripts/core/regen-skill-references.sh +27 -0
  151. package/scripts/core/snapshot.sh +132 -0
  152. package/scripts/core/update.sh +35 -0
  153. package/scripts/core/verify.sh +201 -0
  154. package/scripts/docs/list.sh +129 -0
  155. package/scripts/gov/list.sh +234 -0
  156. package/scripts/lib/frontmatter.sh +30 -0
  157. package/scripts/lib/gov.sh +14 -0
  158. package/scripts/lib/sandbox-fixtures.sh +109 -0
  159. package/scripts/lib/sandbox-git.sh +73 -0
  160. package/scripts/lib/tooling.sh +24 -0
  161. package/scripts/lib/ui.sh +173 -0
  162. package/scripts/lib/worktree.sh +20 -0
  163. package/scripts/manage-sandbox.sh +453 -0
  164. package/scripts/snippets/create.sh +156 -0
  165. package/scripts/standards/list.sh +91 -0
  166. package/scripts/tooling/create.sh +109 -0
  167. package/scripts/tooling/ref.sh +141 -0
  168. package/scripts/tooling/verify.sh +179 -0
  169. package/snippets/claude/decision-memo.md +39 -0
  170. package/snippets/claude/feature-recap.md +19 -0
  171. package/snippets/claude/figma-steps.md +18 -0
  172. package/snippets/claude/orchestrator-resume.md +23 -0
  173. package/snippets/claude/orchestrator-sweep.md +10 -0
  174. package/snippets/compact-summary.md +5 -0
  175. package/snippets/create-snippet.md +7 -0
  176. package/snippets/decision-help.md +6 -0
  177. package/snippets/meta-prompt.md +14 -0
  178. package/snippets/research-prompt.md +7 -0
  179. package/snippets/session-notes.md +11 -0
  180. package/snippets/snippets.toml +6 -0
  181. package/snippets/step-by-step.md +10 -0
  182. package/snippets/web-research.md +21 -0
  183. package/src/claude/gitignore.ts +51 -0
  184. package/src/claude/seeds-list.ts +47 -0
  185. package/src/claude/seeds.ts +124 -0
  186. package/src/claude/settings.ts +151 -0
  187. package/src/cli-run.ts +43 -0
  188. package/src/cli.ts +111 -0
  189. package/src/commands/claude.ts +349 -0
  190. package/src/commands/design.ts +39 -0
  191. package/src/commands/docs.ts +59 -0
  192. package/src/commands/feedback-format.ts +23 -0
  193. package/src/commands/feedback.ts +103 -0
  194. package/src/commands/gov.ts +268 -0
  195. package/src/commands/indexes.ts +182 -0
  196. package/src/commands/init.ts +117 -0
  197. package/src/commands/pass-through.ts +39 -0
  198. package/src/commands/sandbox.ts +315 -0
  199. package/src/commands/slides.ts +106 -0
  200. package/src/commands/snippets.ts +236 -0
  201. package/src/commands/standards.ts +89 -0
  202. package/src/commands/sync.ts +211 -0
  203. package/src/commands/tasks.ts +185 -0
  204. package/src/commands/tooling.ts +432 -0
  205. package/src/commands/transcripts.ts +48 -0
  206. package/src/commands/wiki.ts +101 -0
  207. package/src/copy.ts +30 -0
  208. package/src/design/parse.ts +79 -0
  209. package/src/design/render.ts +170 -0
  210. package/src/docs/read.ts +59 -0
  211. package/src/exec.ts +17 -0
  212. package/src/frontmatter.ts +13 -0
  213. package/src/github-format.ts +13 -0
  214. package/src/github.ts +20 -0
  215. package/src/gov/adapter.ts +73 -0
  216. package/src/gov/install.ts +103 -0
  217. package/src/gov/payload.ts +39 -0
  218. package/src/gov/stacks.ts +124 -0
  219. package/src/indexes/frontmatter.ts +46 -0
  220. package/src/indexes/regen.ts +84 -0
  221. package/src/indexes/render.ts +181 -0
  222. package/src/indexes/walk.ts +111 -0
  223. package/src/init/flags.ts +66 -0
  224. package/src/init/plan.ts +128 -0
  225. package/src/init/run.ts +46 -0
  226. package/src/init/steps.ts +91 -0
  227. package/src/sandbox/coverage.ts +115 -0
  228. package/src/sandbox/expect.ts +412 -0
  229. package/src/slides/layouts.ts +391 -0
  230. package/src/slides/open.ts +18 -0
  231. package/src/slides/parse.ts +84 -0
  232. package/src/slides/render.ts +88 -0
  233. package/src/slides/styles.ts +44 -0
  234. package/src/snippets/adapter.ts +34 -0
  235. package/src/snippets/categories.ts +59 -0
  236. package/src/snippets/install.ts +125 -0
  237. package/src/snippets/list.ts +32 -0
  238. package/src/snippets/presets.ts +50 -0
  239. package/src/standards/adapter.ts +51 -0
  240. package/src/standards/index-refresh.ts +44 -0
  241. package/src/standards/install.ts +52 -0
  242. package/src/sync/check.ts +269 -0
  243. package/src/sync/engine.ts +416 -0
  244. package/src/sync/git.ts +204 -0
  245. package/src/sync/stamp.ts +202 -0
  246. package/src/sync/target.ts +79 -0
  247. package/src/sync/workflow.ts +201 -0
  248. package/src/target.ts +43 -0
  249. package/src/tasks/archive.ts +304 -0
  250. package/src/tooling/gitignore.ts +122 -0
  251. package/src/tooling/inject.ts +214 -0
  252. package/src/tooling/list.ts +39 -0
  253. package/src/tooling/manifest.ts +178 -0
  254. package/src/tooling/package.ts +166 -0
  255. package/src/tooling/scan.ts +186 -0
  256. package/src/transcripts/fetch.ts +156 -0
  257. package/src/transcripts/metadata.ts +54 -0
  258. package/src/transcripts/vtt.ts +114 -0
  259. package/src/ui.ts +187 -0
  260. package/src/wiki/init.ts +85 -0
  261. package/standards/architecture.md +41 -0
  262. package/standards/bundled/branch.md +49 -0
  263. package/standards/bundled/commit.md +63 -0
  264. package/standards/bundled/issue.md +84 -0
  265. package/standards/bundled/pr.md +124 -0
  266. package/standards/bundled/roadmap.md +52 -0
  267. package/standards/bundled/snippets.md +57 -0
  268. package/standards/bundled/standard.md +52 -0
  269. package/standards/context.md +132 -0
  270. package/standards/design.md +31 -0
  271. package/standards/diagrams.md +55 -0
  272. package/standards/index.md +21 -0
  273. package/standards/prose.md +122 -0
  274. package/standards/readme.md +163 -0
  275. package/standards/requirements.md +61 -0
  276. package/standards/rule.md +79 -0
  277. package/standards/skill.md +257 -0
  278. package/standards/tasks.md +140 -0
  279. package/standards/versioning.md +47 -0
  280. package/standards/wireframes.md +67 -0
  281. package/tooling/astro/configs/astro.config.mjs +17 -0
  282. package/tooling/astro/configs/eslint.config.js +79 -0
  283. package/tooling/astro/configs/playwright.config.ts +25 -0
  284. package/tooling/astro/configs/tsconfig.json +12 -0
  285. package/tooling/astro/configs/vitest.config.ts +22 -0
  286. package/tooling/astro/manifest.toml +32 -0
  287. package/tooling/astro/reference.md +60 -0
  288. package/tooling/base/configs/.editorconfig +5 -0
  289. package/tooling/base/configs/.github/pull_request_template.md +18 -0
  290. package/tooling/base/configs/.github/workflows/verify.yml +35 -0
  291. package/tooling/base/configs/.husky/commit-msg +1 -0
  292. package/tooling/base/configs/.husky/post-merge +61 -0
  293. package/tooling/base/configs/.husky/post-rewrite +21 -0
  294. package/tooling/base/configs/.husky/pre-commit +1 -0
  295. package/tooling/base/configs/.husky/pre-push +1 -0
  296. package/tooling/base/configs/.prettierrc +12 -0
  297. package/tooling/base/configs/.shellcheckrc +1 -0
  298. package/tooling/base/configs/.vscode/extensions.json +9 -0
  299. package/tooling/base/configs/.vscode/settings.json +3 -0
  300. package/tooling/base/configs/commitlint.config.js +11 -0
  301. package/tooling/base/configs/scripts/clean.sh +45 -0
  302. package/tooling/base/configs/scripts/update.sh +49 -0
  303. package/tooling/base/configs/scripts/verify.sh +64 -0
  304. package/tooling/base/manifest.toml +32 -0
  305. package/tooling/base/reference.md +114 -0
  306. package/tooling/base/seeds/.claude/context/ci.md +27 -0
  307. package/tooling/base/seeds/.claude/context/development.md +32 -0
  308. package/tooling/base/seeds/.cspell/project-terms.txt +0 -0
  309. package/tooling/base/seeds/.cspell/tech-stack.txt +19 -0
  310. package/tooling/base/seeds/.lintstagedrc +8 -0
  311. package/tooling/base/seeds/.prettierignore +0 -0
  312. package/tooling/base/seeds/cspell.json +20 -0
  313. package/tooling/claude/manifest.toml +11 -0
  314. package/tooling/claude/reference.md +62 -0
  315. package/tooling/claude/seeds/.claude/ARCHITECTURE.md +13 -0
  316. package/tooling/claude/seeds/.claude/DESIGN.md +62 -0
  317. package/tooling/claude/seeds/.claude/REQUIREMENTS.md +18 -0
  318. package/tooling/claude/seeds/.claude/context/index.md +8 -0
  319. package/tooling/claude/seeds/.claude/hooks/index-reminder.sh +43 -0
  320. package/tooling/claude/seeds/.claude/hooks/scratch-guard.sh +45 -0
  321. package/tooling/claude/seeds/.claude/hooks/standards-audit.sh +61 -0
  322. package/tooling/claude/seeds/.claude/hooks/tasks-index.sh +60 -0
  323. package/tooling/claude/seeds/.claude/settings.json +39 -0
  324. package/tooling/claude/seeds/.claude/tasks/index.md +8 -0
  325. package/tooling/claude/seeds/.claude/wireframes/index.md +8 -0
  326. package/tooling/claude/seeds/CLAUDE.md +87 -0
  327. package/tooling/claude/user/settings.template.json +10 -0
  328. package/tooling/claude/user/statusline-command.sh +53 -0
  329. package/tooling/python/configs/.coveragerc +14 -0
  330. package/tooling/python/configs/.python-version +1 -0
  331. package/tooling/python/configs/mypy.ini +6 -0
  332. package/tooling/python/configs/pytest.ini +4 -0
  333. package/tooling/python/configs/ruff.toml +15 -0
  334. package/tooling/python/configs/scripts/verify.sh +77 -0
  335. package/tooling/python/manifest.toml +16 -0
  336. package/tooling/python/reference.md +66 -0
  337. package/tooling/python/seeds/.cspell/tech-stack.txt +19 -0
  338. package/tooling/python/seeds/tests/test_smoke.py +2 -0
  339. package/tooling/vite-react/configs/playwright.config.ts +25 -0
  340. package/tooling/vite-react/configs/tsconfig.json +35 -0
  341. package/tooling/vite-react/configs/vite.config.ts +14 -0
  342. package/tooling/vite-react/configs/vitest.config.ts +26 -0
  343. package/tooling/vite-react/manifest.toml +21 -0
  344. package/tooling/vite-react/reference.md +55 -0
  345. package/tooling/vite-react/seeds/.cspell/project-terms.txt +1 -0
  346. package/tooling/vite-react/seeds/.cspell/tech-stack.txt +1 -0
  347. package/tooling/web/configs/.github/workflows/verify.yml +134 -0
  348. package/tooling/web/configs/.vscode/extensions.json +13 -0
  349. package/tooling/web/configs/.vscode/settings.json +10 -0
  350. package/tooling/web/configs/e2e/home.spec.ts +6 -0
  351. package/tooling/web/configs/e2e/screenshot.ts +41 -0
  352. package/tooling/web/configs/eslint.config.js +82 -0
  353. package/tooling/web/configs/scripts/screenshot.sh +28 -0
  354. package/tooling/web/configs/scripts/verify.sh +80 -0
  355. package/tooling/web/configs/src/test/setup.ts +8 -0
  356. package/tooling/web/manifest.toml +57 -0
  357. package/tooling/web/reference.md +95 -0
  358. package/tooling/web/seeds/.cspell/tech-stack.txt +18 -0
  359. package/tsconfig.json +14 -0
@@ -0,0 +1,148 @@
1
+ ---
2
+ name: setup-indexes
3
+ description: Bootstraps the toolkit's `index.md` system in a target project. Scans for markdown-heavy folders, drafts `title` and `description` frontmatter, scaffolds `index.md` per chosen folder, and runs `aitk indexes regen` to validate. Use when asked to "set up indexes", "bootstrap indexes", "add index.md to this project", or "install indexes". Assumes the `aitk` CLI is on PATH.
4
+ ---
5
+
6
+ # Indexes install
7
+
8
+ Adds the index.md system to a project that does not have it. Operates in the active Claude session: Claude reads files, drafts frontmatter, confirms with the user, and writes. The CLI handles validation and regeneration only.
9
+
10
+ Read `.claude/context/indexes.md` from the toolkit if context on the system is needed before scanning.
11
+
12
+ ## Scope
13
+
14
+ - Bootstrap un-indexed folders only. Skip folders that already contain an `index.md`.
15
+ - All-or-nothing per chosen folder. Every `*.md` sibling in a chosen folder gets `title` and `description` injected, or none does. Partial migration creates folders that hard-error on regen.
16
+
17
+ ## Scan
18
+
19
+ Walk the project root for folders containing three or more sibling `*.md` files. Prune `.git`, `node_modules`, `.claude`, `snippets`, anything matched by `.gitignore`, and any folder that already contains an `index.md`.
20
+
21
+ Skip `.claude/snippets/`. Snippets are invoked by reference (`@snippet-name`) rather than browsed, so they need neither `index.md` nor per-file frontmatter. Adding them creates noise that targets keep reporting.
22
+
23
+ For each candidate, capture:
24
+
25
+ - Folder path relative to project root
26
+ - Sibling count
27
+ - Existing frontmatter coverage (how many siblings already carry `title` and `description`)
28
+
29
+ ## Present candidates
30
+
31
+ Output one line per candidate:
32
+
33
+ ```plaintext
34
+ - docs/ (8 files, 0/8 with frontmatter)
35
+ - guides/ (5 files, 2/5 with frontmatter)
36
+ - references/ (3 files, 0/3 with frontmatter)
37
+ ```
38
+
39
+ Ask the user which to bootstrap. Accept folder paths, `all`, or `none`. The user can also force a folder with fewer than three siblings by naming it explicitly.
40
+
41
+ ## Draft frontmatter
42
+
43
+ For each chosen folder, read every `*.md` sibling and draft frontmatter:
44
+
45
+ - `title`: derived from the first H1. If absent, derive from the filename in sentence case.
46
+ - `description`: one line summarizing the file's purpose, drawn from the first paragraph after the H1. Follow `.claude/standards/prose.md` § Frontmatter descriptions for length and style, or `${CLAUDE_SKILL_DIR}/../../standards/prose.md` when the project does not have it.
47
+
48
+ Surface every drafted entry to the user grouped by file:
49
+
50
+ ```plaintext
51
+ docs/architecture.md
52
+ title: Architecture
53
+ description: System boundaries, data flow, and module responsibilities
54
+ ```
55
+
56
+ The user accepts, edits, or rejects per file. Offer "accept all remaining" once the user confirms two in a row to keep the loop short.
57
+
58
+ Never write drafts before the user confirms. Drafted text is a proposal, not a commit.
59
+
60
+ ## Scaffold the folder index
61
+
62
+ Compose `index.md` for each chosen folder with:
63
+
64
+ ```markdown
65
+ ---
66
+ title: <folder name in sentence case, user-editable>
67
+ subtitle: <one-line folder purpose, user-editable>
68
+ ---
69
+ ```
70
+
71
+ Surface the proposed `title` and `subtitle` and let the user edit before writing.
72
+
73
+ ## Inject
74
+
75
+ After all confirmations, write frontmatter into each sibling and `index.md` into each folder. Use a single batched write per file. Preserve existing content below the frontmatter block. If a sibling already has frontmatter without `title` or `description`, merge in the missing fields. Do not touch files the user rejected.
76
+
77
+ ## Validate
78
+
79
+ Run from the project root:
80
+
81
+ ```bash
82
+ aitk indexes regen --dry-run --json
83
+ ```
84
+
85
+ Parse the JSON. On any `error` action, surface the file and reason and stop. On `would-write` for the bootstrapped folders, the dry-run is healthy. Run for real:
86
+
87
+ ```bash
88
+ aitk indexes regen
89
+ ```
90
+
91
+ Report the `written` count.
92
+
93
+ ## Offer the convention seed
94
+
95
+ First check whether `CLAUDE.md` exists in the project root. If absent, do not scaffold one. Skip the seed install with this exact message:
96
+
97
+ ```plaintext
98
+ No CLAUDE.md in the project. Skipping convention seed.
99
+ To add the convention later, run `aitk tooling sync` or `aitk init`,
100
+ then re-invoke this skill.
101
+ ```
102
+
103
+ If `CLAUDE.md` exists, check it for an existing `## Indexes` section:
104
+
105
+ ```bash
106
+ grep -l '^## Indexes' CLAUDE.md 2>/dev/null
107
+ ```
108
+
109
+ If the section is present, skip the seed silently.
110
+
111
+ If `CLAUDE.md` exists but has no `## Indexes` section, offer to install the canonical convention block. The text below is the source of truth and is mirrored in `tooling/claude/seeds/CLAUDE.md`. Paste it verbatim. Do not rewrite, paraphrase, condense, or add punctuation.
112
+
113
+ ```markdown
114
+ - When a folder has an `index.md`, check it before reading individual files in that folder.
115
+ - For folders where an agent browses to pick a document, `index.md` is regenerated from each file's frontmatter. Do not hand-edit `index.md`. Code folders and scratch folders do not need one.
116
+ - Every `index.md` carries its own frontmatter (`title`, `subtitle`) that the walker preserves. To keep a folder's `index.md` hand-edited, add `auto: false` to its frontmatter.
117
+ ```
118
+
119
+ Append a new `## Indexes` section at the end of the file containing the three lines. Do not touch any other section.
120
+
121
+ ## Closeout
122
+
123
+ Always emit this block as the final message of the skill run. Do not skip it regardless of how the seed step concluded (installed, already present, declined, or skipped because no `CLAUDE.md` exists). Output exactly one closeout, even if the seed step paused for user input. Resume the flow after the user responds and emit the closeout next.
124
+
125
+ Format:
126
+
127
+ ```plaintext
128
+ Bootstrap complete.
129
+
130
+ Folders bootstrapped:
131
+ - <path> (<n> files)
132
+
133
+ Drafts: <n> accepted, <n> edited, <n> rejected
134
+ Convention seed: <installed | already present | declined | skipped (no CLAUDE.md)>
135
+
136
+ Optional maintenance (opt in, the skill does not configure these):
137
+ - lint-staged entry in .lintstagedrc.json:
138
+ "**/*.md": "aitk indexes regen"
139
+ - Claude Code PostToolUse hook on Edit and Write matching **/*.md running:
140
+ aitk indexes regen
141
+ ```
142
+
143
+ Replace bracketed values with the values from this run. Drop the "Folders bootstrapped" line if zero folders were chosen.
144
+
145
+ ## Reference
146
+
147
+ - `.claude/context/indexes.md`: system rationale, frontmatter contract, when to adopt
148
+ - `docs/agents.md`: `aitk indexes regen` flags, exit codes, JSON shape
@@ -0,0 +1,114 @@
1
+ ---
2
+ name: setup-init
3
+ description: Detects a new project's type and runs `aitk init` with a resolved stack and snippets in one shot. Use when bootstrapping a new project with the toolkit, or when asked to "init this project", "bootstrap the toolkit", "set up toolkit", or "one-shot install". Assumes the `aitk` CLI is on PATH. Do NOT use when only installing governance rules. Use `setup-gov` instead.
4
+ ---
5
+
6
+ # Init project
7
+
8
+ Orchestrates the onboarding chain. Detects project type, resolves per-domain arguments, previews the chain, then runs `aitk init` with flags. The CLI holds the install logic. This skill only resolves and previews.
9
+
10
+ ## Scope
11
+
12
+ - This skill and `aitk init` run once on a fresh scaffold, never on an existing project. They do not guard against clobbering existing configs. When tempted to add guards, mode switches, or an existing-project branch, stop. Extend the per-domain `aitk <domain> install` or `aitk sync` paths instead.
13
+
14
+ ## Read catalogs
15
+
16
+ Run in parallel. Never hardcode stack, rule, snippet, or standards names. Run from the target project's current directory. Do not cd into the toolkit source tree. The `aitk` CLI is global.
17
+
18
+ ```bash
19
+ aitk gov list --json 2>/dev/null
20
+ aitk snippets list --json 2>/dev/null
21
+ aitk standards list --json 2>/dev/null
22
+ aitk tooling list --json 2>/dev/null
23
+ ```
24
+
25
+ ## Detect
26
+
27
+ Read these from the project root in parallel, skipping any that do not exist:
28
+
29
+ - `package.json`: `dependencies` and `devDependencies`
30
+ - Root configs: `astro.config.*`, `next.config.*`, `vite.config.*`, `tailwind.config.*`, `tsconfig.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`
31
+ - `.claude/REQUIREMENTS.md` and `.claude/ARCHITECTURE.md` if present
32
+ - Directory structure via `ls -1` of the project root and `src/` if present
33
+
34
+ ## Resolve arguments
35
+
36
+ - **Stack:** pick the closest governance stack by matching detected runtime or framework against stack names in the catalog. If nothing matches, fall back to `base`.
37
+ - **Tooling stack:** pick the closest tooling stack from `aitk tooling list --json` (e.g. `vite-react`, `astro`). Distinct from the governance stack. Fall back to `base` if no framework match.
38
+ - **Extras:** identify technologies not already covered by the picked stack. For each, find a rule whose `description` or `paths` points at that technology and pass it via `--add`. Do not add a rule the stack already pulls in.
39
+ - **Snippets:** default to `all`. Narrow only if the user asked for a specific category.
40
+ - **Skip (`--skip`):** `standards` and `wiki` are core and install by default. Add `--skip standards` or `--skip wiki` only when the user explicitly wants them left out.
41
+
42
+ ## Gap handling
43
+
44
+ If a detected technology has no matching rule or stack, do not guess. Surface the gap and either:
45
+
46
+ 1. Defer to `setup-gov`. Author a rule in the toolkit, then re-run this skill.
47
+ 2. Proceed with the matched layer, listing the gap in the final report.
48
+
49
+ Rules, snippets, and stacks are authored in the toolkit repo, never in the target project on the fly.
50
+
51
+ ## Preview
52
+
53
+ Before executing, output:
54
+
55
+ - **Detected:** each technology with its evidence file
56
+ - **Stack:** picked governance stack + resolved rule count
57
+ - **Tooling stack:** picked tooling stack
58
+ - **Extras:** each `--add` rule with a one-line reason
59
+ - **Snippets:** resolved category
60
+ - **Skip:** any `--skip` entries with reason
61
+ - **Target:** resolved target path
62
+ - **Commands:** the full chain that will run
63
+
64
+ ## Execute
65
+
66
+ Run the chain in order. Each step's permission dialog is the confirmation gate. Run from the target project's current directory.
67
+
68
+ Step 1: `aitk init` installs base tooling, claude seeds, governance rules, standards, snippets, and wiki.
69
+
70
+ ```bash
71
+ AITK_NON_INTERACTIVE=1 aitk init \
72
+ --stack <stack> \
73
+ --add <rules> \
74
+ --snippets <category> \
75
+ <target>
76
+ ```
77
+
78
+ Omit any flag whose resolved value is empty.
79
+
80
+ Step 2: `aitk tooling sync <tooling-stack>` installs stack deps, scripts, gitignore entries, seeds, golden configs, and drops the reference doc. The extends chain is walked, so syncing `vite-react` also pulls `web` and `base` configs. Skip if the tooling stack is `base` (already synced by `aitk init`).
81
+
82
+ ```bash
83
+ AITK_NON_INTERACTIVE=1 aitk tooling sync <tooling-stack> <target>
84
+ ```
85
+
86
+ Monorepo with multiple language roots: run `aitk init` once at the repo root so `base` (husky, prettier, cspell, commitlint, CI) lands single, then sync each subtree with `--skip base` so the shared layer is not re-dropped.
87
+
88
+ ```bash
89
+ AITK_NON_INTERACTIVE=1 aitk tooling sync vite-react ./frontend --skip base
90
+ AITK_NON_INTERACTIVE=1 aitk tooling sync python ./backend --skip base
91
+ ```
92
+
93
+ Without `--skip base`, each subtree re-drops husky, and git honors only one `core.hooksPath`, so the extra hook dirs silently break. Each subtree keeps its own framework configs and its own `.claude/tooling/<stack>.md` audit docs.
94
+
95
+ Step 3: post-sync fixups. Golden configs arrive from sync, so no config generation is required. But a few items may need a one-time touch:
96
+
97
+ - **ESLint version pin.** If `bun create vite` installed `eslint@^10` and the manifest pins `eslint@^9`, sync does not override a present dep. Run `bun add -d eslint@^9` if `bun run lint:fix` fails with `Class extends value undefined`.
98
+ - **File naming.** `bun create vite`'s `App.tsx` violates the `KEBAB_CASE` rule. Rename to `app.tsx` and update the import in `main.tsx`.
99
+ - **Docs.** Open `<target>/.claude/tooling/<tooling-stack>.md` and `<target>/.claude/tooling/web.md` for any stack-specific follow-ups (Chrome extension overrides, setup script details).
100
+
101
+ Do not generate ESLint, Vitest, or Playwright configs. They ship as golden files. Generating from prose duplicates what sync already installed.
102
+
103
+ Step 4: invoke `setup-verify`. Runs the `package.json` scripts and reports pass/fail.
104
+
105
+ ## Report
106
+
107
+ After the chain, report:
108
+
109
+ - Domains installed with a check per domain
110
+ - Tooling stack synced (or skipped). Name the layers pulled via the extends chain.
111
+ - Any post-sync fixups applied (ESLint pin, filename renames)
112
+ - `setup-verify` outcome
113
+ - Any domains or scripts that failed
114
+ - Any detection gaps surfaced during resolve
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: setup-plugins
3
+ description: Installs curated community and official Claude Code plugins user-scoped on the current machine via the `claude plugin` CLI. Use when asked to "install plugins", "set up plugins", "install the frontend/design/security/debugging plugins", "provision plugins on this machine", or when setting up Claude Code on a new computer. Do NOT use to install toolkit workflow skills, which load live via `--plugin-dir`. Assumes the `claude` CLI is on PATH.
4
+ ---
5
+
6
+ # Setup plugins
7
+
8
+ Automates plugin installs by reading the curated catalog, detecting what is already
9
+ installed, and shelling out to the `claude plugin` CLI with `--scope user` so the
10
+ plugins are available in every project on this machine.
11
+
12
+ Domain-knowledge plugins install once per machine. They are not copied into any
13
+ project. Toolkit workflow skills are a separate concern and load live through
14
+ `--plugin-dir`, so never install those here.
15
+
16
+ ## Guards
17
+
18
+ - If the `claude` CLI is not on PATH, stop: `❌ claude CLI not found. Install Claude Code first.`
19
+
20
+ ## Read the catalog
21
+
22
+ Read the curated list from the skill folder. Use `${CLAUDE_SKILL_DIR}`, which
23
+ expands to this skill's own directory, so the path resolves from any project. Never
24
+ invent plugin names or install strings that are not in it.
25
+
26
+ - `${CLAUDE_SKILL_DIR}/references/plugin-catalog.md`: verified plugins, marketplace sources, and the recommended default set
27
+
28
+ ## Detect what is installed
29
+
30
+ Run this to skip plugins already present. Do not reinstall an installed plugin.
31
+
32
+ ```bash
33
+ claude plugin list 2>/dev/null || echo "NONE"
34
+ ```
35
+
36
+ ## Select
37
+
38
+ When plugin names are passed as arguments, install exactly those and skip the prompt.
39
+
40
+ When invoked bare, present the catalog grouped by category with the recommended
41
+ default marked, then ask which to install. Accept a bulk answer:
42
+
43
+ - `recommended`: the default set from the catalog
44
+ - `all`: every catalog row not already installed
45
+ - a specific list of plugin names
46
+
47
+ ## Preview
48
+
49
+ Before executing, output:
50
+
51
+ - **Installed:** plugins already present, skipped
52
+ - **To install:** each chosen plugin with its category and marketplace source
53
+ - **Scope:** `user` (every project on this machine)
54
+ - **Commands:** the exact shell commands to run
55
+
56
+ ## Execute
57
+
58
+ For each chosen plugin, add its marketplace source if it is not already added, then
59
+ install the plugin user-scoped. Run each install independently so one failure does
60
+ not abort the batch.
61
+
62
+ ```bash
63
+ claude plugin marketplace add <source> 2>/dev/null || true
64
+ claude plugin install <name> --scope user
65
+ ```
66
+
67
+ For a catalog entry listed under "Installs outside the claude plugin CLI", skip the
68
+ marketplace step and run its installer command verbatim instead.
69
+
70
+ Claude Code's tool permission dialog is the confirmation gate. Do not pause for a
71
+ separate confirmation.
72
+
73
+ ## Response
74
+
75
+ After execution, report:
76
+
77
+ - Plugins installed, each with its marketplace
78
+ - Plugins skipped as already installed
79
+ - Any install that failed, with the CLI error
80
+ - A reload note: installed plugins apply on the next session or after `/reload-plugins`
81
+ - A tuning note: if a plugin over-triggers, set `skillOverrides` in settings to `name-only`, `user-invocable-only`, or `off` rather than uninstalling
@@ -0,0 +1,53 @@
1
+ ---
2
+ title: Plugin catalog
3
+ description: Curated community and official Claude Code plugins that setup-plugins installs
4
+ ---
5
+
6
+ # Plugin catalog
7
+
8
+ Curated domain-knowledge plugins the `setup-plugins` skill installs user-scoped.
9
+ Each row is verified to install through the `claude plugin` CLI. This file holds
10
+ only the actionable install data.
11
+
12
+ ## Install data
13
+
14
+ Add the marketplace source once, then install the plugin by name. The CLI resolves
15
+ the plugin across added marketplaces, so `<name>@<marketplace>` is only needed to
16
+ disambiguate a name that exists in more than one marketplace.
17
+
18
+ | Plugin | Category | Marketplace source | Why |
19
+ | ------------------- | --------- | ------------------------ | -------------------------------------------------------------------- |
20
+ | `frontend-design` | design | `anthropics/claude-code` | Steers UI generation toward intentional typography, hierarchy, color |
21
+ | `security-guidance` | security | `anthropics/claude-code` | Security-aware authoring guidance during code generation |
22
+ | `code-review` | review | `anthropics/claude-code` | Multi-agent PR review across compliance, bugs, history, and comments |
23
+ | `superpowers` | debugging | `obra/superpowers` | Methodology skills: systematic-debugging, root-cause-tracing |
24
+
25
+ ## Recommended default
26
+
27
+ The `design` and `security` categories cover the common gaps for a new machine.
28
+ When the user asks for a recommended set, propose `frontend-design` and
29
+ `security-guidance`. Offer `code-review` and `superpowers` as additions.
30
+
31
+ `code-review` overlaps the toolkit's own `claude-review` skill. They run in
32
+ different places, the plugin on a PR and the toolkit skill on a local diff. Install
33
+ `code-review` only when the user wants the GitHub-side flow too.
34
+
35
+ ## Installs outside the claude plugin CLI
36
+
37
+ Some strong plugins do not distribute through a marketplace, so the `claude plugin`
38
+ path does not reach them. List them here with their real installer. Surface them to
39
+ the user during selection, but do not run their install through the marketplace
40
+ step above. Run the installer command verbatim only when the user picks it.
41
+
42
+ | Plugin | Category | Installer | Why |
43
+ | ------------ | -------- | ------------------------------- | ----------------------------------------------------------------- |
44
+ | `impeccable` | design | `npx impeccable skills install` | Curated anti-slop reference files, sharper than `frontend-design` |
45
+
46
+ `npx impeccable skills install` detects the Claude Code harness and installs into
47
+ `.claude/`. It may prompt, so it is not fully non-interactive. After install, run
48
+ `/impeccable init` and reload.
49
+
50
+ Install per project, not per machine. The skill invokes its scripts through paths
51
+ relative to the current project (`.claude/skills/impeccable/scripts/*.mjs`), so a
52
+ copy under `~/.claude/` cannot locate them once the working directory is a
53
+ different project. Re-run the installer in each project that wants impeccable.
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: setup-verify
3
+ description: Verifies a freshly scaffolded project by running its `package.json` scripts in order and reporting pass/fail per script. Use after the agent has followed a tooling stack reference and generated configs, or when asked to "verify the scaffold", "check the setup", "run verify", or "make sure everything works". Do NOT use on a project without `package.json`, or to run E2E or dev servers.
4
+ ---
5
+
6
+ # Verify scaffold
7
+
8
+ Runs the local verification chain against a freshly scaffolded project. Catches config typos, missing deps, and wiring mistakes before the user ever sees them.
9
+
10
+ ## Guards
11
+
12
+ - If `package.json` does not exist at the project root, stop: `❌ No package.json found. Cannot verify.`
13
+ - If `node_modules/` does not exist, run `bun install` first, then proceed.
14
+
15
+ ## Step 1: read scripts
16
+
17
+ Read `package.json` from the project root and extract the `scripts` block. Do not hardcode script names. Different stacks expose different scripts.
18
+
19
+ ## Step 2: run the chain
20
+
21
+ Run the scripts below in order. Stop on the first failure and surface the error. Each script is a leaf command so failures point at the exact break.
22
+
23
+ | Order | Script | Skip if |
24
+ | ----- | ----------- | --------------------------- |
25
+ | 1 | `lint:fix` | absent |
26
+ | 2 | `typecheck` | absent |
27
+ | 3 | `check` | absent |
28
+ | 4 | `test:run` | absent, fall back to `test` |
29
+ | 5 | `build` | absent |
30
+
31
+ Skip any script not present in `package.json`. Do not invent a fallback command. Do not run composite scripts like `check:full`. Do not run `dev`, `preview`, `test:e2e`, `test:ui`, `screenshot`.
32
+
33
+ Run each as `bun run <script>` from the project root.
34
+
35
+ ## Step 3: report
36
+
37
+ For each script run, report one of:
38
+
39
+ - `✅ <script>`
40
+ - `❌ <script>` followed by the failing output (last 40 lines)
41
+
42
+ End with a summary line:
43
+
44
+ - On pass: `✅ Scaffold verified (<n> scripts passed).`
45
+ - On fail: `❌ Scaffold failed at <script>. Fix the error and re-run setup-verify.`
46
+
47
+ ## Out of scope
48
+
49
+ - Dev server and preview server smoke tests. Too flaky for a scaffold check, where a slow start reads as a failure. Use `project-commands` to start one on request.
50
+ - Playwright E2E tests. Require browser install and a running server.
51
+ - CI workflow validation. Runs in GitHub Actions on PR, not locally.
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: systematic-debugging
3
+ description: Forces root-cause investigation before any fix when a test fails, a bug surfaces, or unexpected behavior appears. Auto-triggers on "test is failing", "it's broken", "why does X happen", "this isn't working". Do NOT use for trivial typo fixes or when the cause is already agreed on.
4
+ ---
5
+
6
+ # Systematic debugging
7
+
8
+ Random fixes waste time and create new bugs. Before proposing any fix, complete the four phases below in order.
9
+
10
+ ## The rule
11
+
12
+ No fixes without root-cause investigation first. If phase 1 is incomplete, no fix may be proposed.
13
+
14
+ ## Phase 1: investigate
15
+
16
+ 1. Read every line of the error, stack trace, and log output. Note file paths, line numbers, error codes.
17
+ 2. Reproduce the failure. If it is not consistently reproducible, gather more data before guessing.
18
+ 3. Check what changed. Run `git diff` and `git log --oneline -10` from the project root to see recent changes.
19
+ 4. For multi-component systems, add instrumentation at each component boundary and run once to see which layer fails before investigating further.
20
+ 5. Trace bad values backward to their source. Fix at the origin, not the symptom.
21
+
22
+ ## Phase 2: find the pattern
23
+
24
+ 1. Locate similar working code in the same codebase. Compare it to the broken code line by line.
25
+ 2. If following a reference implementation, read it completely before adapting. No skimming.
26
+ 3. List every difference between working and broken, no matter how small.
27
+
28
+ ## Phase 3: hypothesize and test
29
+
30
+ 1. State one hypothesis: "I think X is the root cause because Y". Be specific.
31
+ 2. Make the smallest possible change to test it. One variable at a time.
32
+ 3. If the change does not resolve the issue, form a new hypothesis. Do not stack another fix.
33
+ 4. If you do not understand something, say so. Do not pretend.
34
+
35
+ ## Phase 4: fix
36
+
37
+ 1. Write a failing test case that reproduces the issue before fixing.
38
+ 2. Make one change that addresses the root cause. No bundled refactors, no "while I'm here" improvements.
39
+ 3. Verify the test passes and no other tests break.
40
+
41
+ ## Three-fix circuit breaker
42
+
43
+ After three failed fix attempts, stop. This pattern indicates an architectural problem, not a bug:
44
+
45
+ - Each fix reveals a new problem somewhere else.
46
+ - Each fix requires refactoring elsewhere to apply.
47
+ - Symptoms keep moving.
48
+
49
+ When this happens, stop fixing and ask the user whether the underlying pattern should be reconsidered.
50
+
51
+ ## Red flags that mean "return to phase 1"
52
+
53
+ - "Quick fix for now, investigate later"
54
+ - "Just try X and see if it works"
55
+ - "It's probably Y, let me change that"
56
+ - Proposing a fix before tracing data flow
57
+ - Adding multiple changes and running tests to see what sticks
58
+ - Skipping the failing test "because I'll verify manually"
59
+
60
+ Any of these means phase 1 is not complete. Return to it.
61
+
62
+ ## When investigation reveals no root cause
63
+
64
+ Rarely, an issue is genuinely environmental, timing-dependent, or external. In that case:
65
+
66
+ 1. Document what was investigated and ruled out.
67
+ 2. Implement appropriate handling: retry, timeout, explicit error.
68
+ 3. Add logging so the next occurrence can be investigated.
69
+
70
+ Most "no root cause" conclusions are incomplete investigations. Exhaust phase 1 before accepting them.
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: toolkit-cli
3
+ description: Reference for what aitk sync and install commands overwrite, merge, or leave untouched in a target project. Use before running `aitk tooling`, `aitk standards`, `aitk claude sync`, or `aitk init`, or when asked "will this overwrite my changes". Do NOT use to run the commands, only to know their effect.
4
+ ---
5
+
6
+ # Toolkit CLI contract
7
+
8
+ What each `aitk` sync or install command does to existing files in a target project. Consult before running one, then warn the user about anything destructive. This skill is reference only. It does not run commands.
9
+
10
+ ## Overwrite contract
11
+
12
+ | Surface | Command | Effect on existing files |
13
+ | -------------------------------------------------------- | ------------------------ | ---------------------------------------------------------------- |
14
+ | Golden configs (eslint, prettier, vite, tsconfig, ruff) | `aitk tooling sync` | Always overwritten. Local edits are lost. Drift is intentional. |
15
+ | Dictionary seeds (`.cspell/*.txt`) | `aitk tooling sync` | Merged and sorted. Existing terms preserved. |
16
+ | Other seeds (`cspell.json`, `.lintstagedrc`, state docs) | `aitk tooling sync` | Copy-once. Dropped on first install, untouched after. |
17
+ | Standards | `aitk standards install` | All overwritten. |
18
+ | Standards | `aitk standards sync` | Only files already present are updated. None are added. |
19
+ | Seed docs and `CLAUDE.md` | `aitk claude init` | Skipped when present. Never overwritten. |
20
+ | Seed docs | `aitk claude sync` | Never touched. Only `.gitignore` is written. |
21
+ | References (`.claude/tooling/<stack>.md`) | `aitk tooling ref` | Overwritten. |
22
+ | `.gitignore`, deps, scripts | any sync | Additive. Existing entries preserved. Deps re-pin on major skew. |
23
+ | Generated `index.md` | any sync or regen | Rewritten from target state. Hand edits are lost. |
24
+
25
+ ## Rules
26
+
27
+ - Before `aitk tooling sync`, know golden configs always overwrite. When the project carries local edits to a golden config, warn the user before running it.
28
+ - Seeds are user-owned. Dictionary `.txt` files merge and sort. Other seeds are copy-once, so re-seeding a structured file means deleting it and syncing again.
29
+ - Prefer `aitk standards sync` over `install` on an existing project. `install` overwrites every standard.
30
+ - For section-level customizations of a standard or seed doc, use the `claude-seed-sync` skill, not `aitk ... sync`. It diffs per section and preserves edits.
31
+
32
+ ## CLAUDE.md
33
+
34
+ - `CLAUDE.md` is a copy-once seed. No `aitk` sync command ever updates it. Reconcile it with the `claude-seed-sync` skill, which diffs the preamble and each section and preserves customizations by default.
35
+
36
+ ## Source of truth
37
+
38
+ - Full semantics live in the toolkit's `.claude/context/tooling.md`, `standards.md`, and `claude-plugin.md`. This skill is the target-session summary. When they disagree, the context docs win.
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: toolkit-feedback
3
+ description: Format a paste-back report about something broken, missing, or off in aitk and write it directly to the toolkit's `.claude/review/` folder via `aitk feedback`. Use when asked to "send this to the toolkit", "report this to aitk", "file toolkit feedback", or "give the toolkit feedback about X". Do NOT use for general complaints about other tooling, IDE issues, or in-project bugs that do not implicate aitk surfaces.
4
+ ---
5
+
6
+ # Toolkit feedback
7
+
8
+ Format a `## Toolkit feedback` block from the current session, then ship it to the toolkit repo without manual copy-paste.
9
+
10
+ ## Guards
11
+
12
+ - If nothing in session context points to a toolkit issue, stop: `❌ No toolkit issue in session context. Describe what broke, then re-invoke.`
13
+ - If the surface type is ambiguous (snippet vs. plugin skill vs. CLI vs. seed), ask one line before formatting.
14
+ - Do not probe the project, list files, grep, or read toolkit surfaces. Use only what the session already contains.
15
+
16
+ ## Step 1: build the block
17
+
18
+ From the conversation so far, identify:
19
+
20
+ - Target project name or path
21
+ - Toolkit surface and its type (plugin skill, snippet, tooling config, governance rule, seed, or CLI)
22
+ - Specific toolkit file or name when the session cites one
23
+ - Observed behavior
24
+ - Expected behavior, or `unclear`
25
+ - Repro details already in context (commands run, files touched), or `none`
26
+ - Proposed fix when the user stated one, or `open`
27
+
28
+ Format as a single fenced markdown block:
29
+
30
+ ```markdown
31
+ ## Toolkit feedback
32
+
33
+ **From project:** <name or path>
34
+ **Surface:** <type>, <file path or name>
35
+ **Observed:** <one or two lines>
36
+ **Expected:** <one or two lines, or "unclear">
37
+ **Repro:** <commands or steps, or "none">
38
+ **Proposed fix:** <one line, or "open">
39
+ ```
40
+
41
+ Keep each field to one or two lines. Write the literal fallback shown above when a field has nothing.
42
+
43
+ ## Step 2: ship to the toolkit
44
+
45
+ Detect whether `aitk` is on PATH:
46
+
47
+ ```bash
48
+ command -v aitk >/dev/null 2>&1
49
+ ```
50
+
51
+ If present, pipe the block to `aitk feedback`. The CLI writes to its own repo's `.claude/review/feedback-<slug>-<ts>.md` and prints the absolute path on stdout:
52
+
53
+ ```bash
54
+ cat <<'EOF' | aitk feedback
55
+ ## Toolkit feedback
56
+
57
+ ...
58
+ EOF
59
+ ```
60
+
61
+ Report the printed path back to the user on its own line so the terminal makes it clickable.
62
+
63
+ For a durable, cross-machine report instead of local scratch, add `--github`. The CLI opens a GitHub issue on the toolkit repo and prints the issue URL. It needs `gh` authenticated, and falls back to local scratch with a warning when `gh` is absent.
64
+
65
+ ```bash
66
+ cat <<'EOF' | aitk feedback --github
67
+ ## Toolkit feedback
68
+
69
+ ...
70
+ EOF
71
+ ```
72
+
73
+ Default to local scratch for a quick note. Use `--github` for a report worth tracking across sessions and machines.
74
+
75
+ If `aitk` is not on PATH, fall back: print the block in chat and tell the user `📋 Copy the block above into a toolkit-repo session.`
76
+
77
+ ## Notes
78
+
79
+ - `aitk feedback` resolves the toolkit root from the running `aitk` binary's source location. If multiple toolkit clones exist on the machine, the first `aitk` on PATH wins.
80
+ - The destination `.claude/review/` is gitignored in the toolkit repo. Feedback lives as session scratch for the next toolkit-side triage, not as a durable archive.