@jeiemgi/cckit 0.1.6
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.
- package/.claude-plugin/plugin.json +22 -0
- package/AGENTS.md +101 -0
- package/LICENSE-APACHE +202 -0
- package/LICENSE-MIT +21 -0
- package/README.md +143 -0
- package/SECURITY.md +22 -0
- package/bin/cckit +215 -0
- package/cckit.config.json +34 -0
- package/commands/kit-add.md +42 -0
- package/commands/kit-docs.md +45 -0
- package/commands/kit-doctor.md +52 -0
- package/commands/kit-export-project.md +58 -0
- package/commands/kit-export-training.md +49 -0
- package/commands/kit-init.md +126 -0
- package/commands/kit-routines.md +59 -0
- package/commands/kit-update.md +132 -0
- package/docs/kit-annotate/01-explainer.html +225 -0
- package/docs/kit-annotate/02-implementation-plan.html +196 -0
- package/docs/media/.onboarding-capture.cast +5 -0
- package/docs/media/README.md +43 -0
- package/docs/media/build-demo.sh +63 -0
- package/docs/media/build-kit-init.sh +51 -0
- package/docs/media/build-onboarding.sh +51 -0
- package/docs/media/kit-dry-run.cast +107 -0
- package/docs/media/kit-dry-run.gif +0 -0
- package/docs/media/kit-init.cast +56 -0
- package/docs/media/kit-init.gif +0 -0
- package/docs/media/kit-onboarding.cast +148 -0
- package/docs/media/kit-onboarding.gif +0 -0
- package/githooks/pre-commit +18 -0
- package/kit.config.schema.json +105 -0
- package/package.json +54 -0
- package/privacy-denylist.example +8 -0
- package/profiles/automation.json +36 -0
- package/profiles/content.json +41 -0
- package/profiles/minimal.json +31 -0
- package/profiles/research.json +37 -0
- package/profiles/software.json +32 -0
- package/scripts/annotate-setup.sh +149 -0
- package/scripts/autopilot.sh +50 -0
- package/scripts/capture-project-ids.sh +53 -0
- package/scripts/check.sh +66 -0
- package/scripts/contribute.sh +48 -0
- package/scripts/debug.sh +54 -0
- package/scripts/init-upgrade-test.sh +99 -0
- package/scripts/init.sh +827 -0
- package/scripts/install.sh +24 -0
- package/scripts/kit-add-test.sh +62 -0
- package/scripts/kit-add.sh +115 -0
- package/scripts/kit-adopt-test.sh +61 -0
- package/scripts/kit-adopt.sh +122 -0
- package/scripts/kit-bump-version.sh +79 -0
- package/scripts/kit-digest.sh +126 -0
- package/scripts/kit-doctor.sh +663 -0
- package/scripts/kit-export-project-test.sh +82 -0
- package/scripts/kit-export-project.sh +245 -0
- package/scripts/kit-export-training-test.sh +51 -0
- package/scripts/kit-export-training.sh +175 -0
- package/scripts/kit-migrate-test.sh +80 -0
- package/scripts/kit-migrate.sh +190 -0
- package/scripts/kit-onboard-test.sh +63 -0
- package/scripts/kit-onboard.sh +69 -0
- package/scripts/kit-promote-test.sh +54 -0
- package/scripts/kit-promote.sh +102 -0
- package/scripts/kit-remove-test.sh +61 -0
- package/scripts/kit-remove.sh +84 -0
- package/scripts/kit-routines.sh +322 -0
- package/scripts/kit-version-check.sh +91 -0
- package/scripts/kit-wire-test.sh +54 -0
- package/scripts/kit-wire.sh +132 -0
- package/scripts/knowledge-lint.sh +96 -0
- package/scripts/lib/cckit-output.sh +36 -0
- package/scripts/lib/effort-metrics.sh +452 -0
- package/scripts/lib/effort-ops-test.sh +83 -0
- package/scripts/lib/effort-ops.sh +132 -0
- package/scripts/lib/effort-plan.sh +104 -0
- package/scripts/lib/effort.sh +191 -0
- package/scripts/lib/engine-adapter.sh +92 -0
- package/scripts/lib/gh-log.sh +58 -0
- package/scripts/lib/gh-project.sh +212 -0
- package/scripts/lib/handoff.sh +35 -0
- package/scripts/lib/kit-cli-test.sh +42 -0
- package/scripts/lib/kit-cli.sh +32 -0
- package/scripts/lib/kit-config-resolve.sh +145 -0
- package/scripts/lib/kit-config.sh +88 -0
- package/scripts/lib/kit-engine-test.sh +107 -0
- package/scripts/lib/kit-events.sh +62 -0
- package/scripts/lib/kit-gc.sh +117 -0
- package/scripts/lib/kit-interview-test.sh +77 -0
- package/scripts/lib/kit-interview.sh +203 -0
- package/scripts/lib/kit-local.sh +79 -0
- package/scripts/lib/kit-manifest.sh +127 -0
- package/scripts/lib/kit-mode-test.sh +49 -0
- package/scripts/lib/kit-mode.sh +67 -0
- package/scripts/lib/kit-operate.sh +105 -0
- package/scripts/lib/kit-profile-test.sh +62 -0
- package/scripts/lib/kit-profile.sh +115 -0
- package/scripts/lib/kit-task-ops-test.sh +63 -0
- package/scripts/lib/kit-task-ops.sh +341 -0
- package/scripts/lib/pr-evidence.sh +173 -0
- package/scripts/lib/project-scan.sh +16 -0
- package/scripts/lib/react-detect.sh +78 -0
- package/scripts/lib/role-identity.sh +47 -0
- package/scripts/lib/secret-guard.sh +96 -0
- package/scripts/lib/toon.sh +35 -0
- package/scripts/lib/ui.sh +42 -0
- package/scripts/lib/version-bump.sh +59 -0
- package/scripts/lib/worktree-issue-test.sh +45 -0
- package/scripts/lib/worktree-issue.sh +73 -0
- package/scripts/lib/worktree-start.sh +280 -0
- package/scripts/orchestrate.sh +160 -0
- package/scripts/portable-test.sh +53 -0
- package/scripts/publish.sh +94 -0
- package/scripts/setup-labels.sh +25 -0
- package/scripts/setup-milestones.sh +17 -0
- package/scripts/showcase.sh +64 -0
- package/scripts/status.sh +44 -0
- package/scripts/task-sync.sh +59 -0
- package/scripts/test.sh +48 -0
- package/scripts/web-install.sh +22 -0
- package/skills/kit-annotate/SKILL.md +107 -0
- package/skills/kit-autopilot/SKILL.md +108 -0
- package/skills/kit-contribute/SKILL.md +134 -0
- package/skills/kit-customize/SKILL.md +134 -0
- package/skills/kit-dev/SKILL.md +67 -0
- package/skills/kit-digest/SKILL.md +41 -0
- package/skills/kit-effort-close/SKILL.md +156 -0
- package/skills/kit-effort-new/SKILL.md +173 -0
- package/skills/kit-effort-pr/SKILL.md +139 -0
- package/skills/kit-effort-start/SKILL.md +85 -0
- package/skills/kit-gc/SKILL.md +80 -0
- package/skills/kit-onboard/SKILL.md +50 -0
- package/skills/kit-security-sweep/SKILL.md +57 -0
- package/skills/kit-ship/SKILL.md +43 -0
- package/skills/kit-task-close/SKILL.md +66 -0
- package/skills/kit-task-new/SKILL.md +51 -0
- package/skills/kit-task-pr/SKILL.md +43 -0
- package/skills/kit-task-pr-auto/SKILL.md +27 -0
- package/skills/kit-task-pr-merge/SKILL.md +53 -0
- package/skills/kit-task-start/SKILL.md +76 -0
- package/skills/kit-task-sync/SKILL.md +37 -0
- package/templates/CLAUDE.md.tmpl +106 -0
- package/templates/agents/analyst.md +55 -0
- package/templates/agents/auto-dev.md +93 -0
- package/templates/agents/backend.md +59 -0
- package/templates/agents/designer.md +73 -0
- package/templates/agents/devops.md +57 -0
- package/templates/agents/editor.md +48 -0
- package/templates/agents/frontend.md +81 -0
- package/templates/agents/generalist.md +46 -0
- package/templates/agents/local-delegate.md +70 -0
- package/templates/agents/n8n.md +65 -0
- package/templates/agents/pm.md +69 -0
- package/templates/agents/qa.md +66 -0
- package/templates/agents/researcher.md +57 -0
- package/templates/agents/security.md +65 -0
- package/templates/agents/tech-lead.md +75 -0
- package/templates/hooks/guard-base-branch-commit.sh.tmpl +45 -0
- package/templates/hooks/kit-local-status.sh.tmpl +34 -0
- package/templates/hooks/kit_version_check.sh.tmpl +6 -0
- package/templates/hooks/mempal_followup.sh.tmpl +97 -0
- package/templates/hooks/mempal_precompact.sh.tmpl +4 -0
- package/templates/hooks/mempal_save.sh.tmpl +4 -0
- package/templates/hooks/mempal_session_start.sh.tmpl +8 -0
- package/templates/hooks/prepush_gate.sh.tmpl +36 -0
- package/templates/hooks/repo-hygiene.sh.tmpl +72 -0
- package/templates/kit.config.json.tmpl +32 -0
- package/templates/knowledge-INDEX.md.tmpl +12 -0
- package/templates/lib/kit-sigil.sh.tmpl +124 -0
- package/templates/rules/branch-naming.md +104 -0
- package/templates/rules/communication-style.md +22 -0
- package/templates/rules/delegation-brief.md +40 -0
- package/templates/rules/design-routing.md +35 -0
- package/templates/rules/effort-model.md +122 -0
- package/templates/rules/knowledge-base.md +41 -0
- package/templates/rules/mempalace.md +110 -0
- package/templates/rules/plan-output-format.md +58 -0
- package/templates/rules/react-annotate.md +69 -0
- package/templates/rules/risk-tiered-review.md +62 -0
- package/templates/rules/skill-gaps.md +48 -0
- package/templates/rules/task-management.md +42 -0
- package/templates/settings/settings.local.json.tmpl +27 -0
- package/templates/skills/NAMESPACED +13 -0
- package/templates/skills/copywriting/SKILL.md +252 -0
- package/templates/skills/copywriting/references/copy-frameworks.md +344 -0
- package/templates/skills/copywriting/references/natural-transitions.md +272 -0
- package/templates/skills/feature-build-refine/SKILL.md +367 -0
- package/templates/skills/karpathy-guidelines/SKILL.md +69 -0
- package/templates/skills/morning-briefing/SKILL.md +46 -0
- package/templates/skills/speckit/SKILL.md +239 -0
- package/templates/skills/supabase-patterns/SKILL.md +88 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kit-annotate
|
|
3
|
+
description: Set up and run in-app visual UI annotation for a React project, wired to Claude via Agentation. Use AUTOMATICALLY when the user asks to set up / install visual annotation or an annotation toolbar, "annotate the UI / a component", click-to-annotate, give the agent visual UI feedback, review or triage UI annotations, or run "watch mode" for UI feedback. Targets a React app (Next.js, Vite, or React Router); installs the third-party `agentation` dev dependency + its MCP. Other agents are out of scope — this wires Claude Code only.
|
|
4
|
+
argument-hint: "[setup | watch | review | status] [--dry-run]"
|
|
5
|
+
allowed-tools: Bash, Read, Edit, Glob, Grep, AskUserQuestion, mcp__agentation__agentation_get_all_pending, mcp__agentation__agentation_watch_annotations, mcp__agentation__agentation_acknowledge, mcp__agentation__agentation_resolve, mcp__agentation__agentation_dismiss, mcp__agentation__agentation_reply, mcp__agentation__agentation_list_sessions, mcp__agentation__agentation_get_session, mcp__agentation__agentation_get_pending
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# kit-annotate — visual UI annotation for React, wired to Claude
|
|
9
|
+
|
|
10
|
+
This sets up and drives **click-to-annotate** UI feedback for a React app. You point at a component in
|
|
11
|
+
your running dev app and leave a note; Claude reads a structured record and fixes the code. It **adopts
|
|
12
|
+
Agentation** — a maintained, source-available (PolyForm Shield 1.0.0) npm package — as the capture
|
|
13
|
+
engine, and wires it into Claude: install, MCP registration, a project rule, and the fix loop. The kit
|
|
14
|
+
vendors none of Agentation's code; it installs it as the project's own dev dependency.
|
|
15
|
+
|
|
16
|
+
**Scope is Claude Code only.** Agentation is agent-agnostic on its own (Cursor/Codex via its MCP/export),
|
|
17
|
+
but the kit wires and maintains the Claude path only — say so if asked about other agents.
|
|
18
|
+
|
|
19
|
+
The kit lives at `${CLAUDE_PLUGIN_ROOT}`; the setup engine is
|
|
20
|
+
`${CLAUDE_PLUGIN_ROOT}/scripts/annotate-setup.sh` (which sources `scripts/lib/react-detect.sh`).
|
|
21
|
+
|
|
22
|
+
## 0. Orient
|
|
23
|
+
|
|
24
|
+
- Read `./.claude/kit.config.json` if present. If `.annotate.enabled == true`, this project is already
|
|
25
|
+
set up → default to **watch/review**. Otherwise default to **setup**. Honor an explicit
|
|
26
|
+
`$ARGUMENTS` mode (`setup` · `watch` · `review` · `status`) over the inference.
|
|
27
|
+
- No `.claude/` at all? Setup still works, but mention that running `/kit-init` first gives the full
|
|
28
|
+
integration (the rule lands in `.claude/rules/`, and memory enables the on-close summary).
|
|
29
|
+
|
|
30
|
+
## 1. Setup mode
|
|
31
|
+
|
|
32
|
+
1. **Detect + preview.** Run the engine in dry-run from the project root and show the plan:
|
|
33
|
+
```bash
|
|
34
|
+
"${CLAUDE_PLUGIN_ROOT}/scripts/annotate-setup.sh" --dry-run
|
|
35
|
+
```
|
|
36
|
+
If it reports **No React app detected**, stop — this targets React apps. If the framework is
|
|
37
|
+
`react` (unrecognized: CRA/Gatsby/etc.), tell the user you'll install + register but they must wire
|
|
38
|
+
the `<Agentation />` line manually.
|
|
39
|
+
2. **Explain what becomes doable, then ask consent.** In plain terms: *click a component in your dev
|
|
40
|
+
app → leave a note → Claude reads the component + selector + source path + your comment and fixes
|
|
41
|
+
it; optionally hands-free, where Claude watches for new notes and resolves them as you go.* State the
|
|
42
|
+
**honest limits** up front — dev-only (stripped from production); identity is selector + source-path
|
|
43
|
+
+ component name, **not** live prop/state values, so Claude greps to the file; React Server
|
|
44
|
+
Components degrade to a selector. Note the **license**: Agentation is PolyForm Shield, free for this
|
|
45
|
+
use, installed as the user's own dev dependency. Then `AskUserQuestion`:
|
|
46
|
+
**Install** · **Preview only (dry-run)** · **Skip**.
|
|
47
|
+
3. **Install.** On consent, run the engine for real (no `--dry-run`). It installs the dep, registers the
|
|
48
|
+
`agentation` MCP for Claude, writes `.claude/rules/react-annotate.md`, and records `.annotate` in
|
|
49
|
+
`kit.config.json`.
|
|
50
|
+
4. **Wire the dev-only toolbar into the app entry — via `Edit`, showing the change first.** The engine
|
|
51
|
+
prints the exact snippet + the detected entry file. **The `endpoint` prop is mandatory** — without it
|
|
52
|
+
the toolbar boots `disconnected`, writes only to `localStorage`, and annotations never reach the MCP
|
|
53
|
+
receiver (Claude sees 0 sessions). Use the port from `kit.config.json → annotate.mcp.httpPort`
|
|
54
|
+
(default `4747`). Apply it per framework:
|
|
55
|
+
|
|
56
|
+
| Framework | Entry file | How to wire |
|
|
57
|
+
| --------- | ---------- | ----------- |
|
|
58
|
+
| **Next.js (App Router)** | `app/layout.tsx` | Add `import { Agentation } from "agentation"` and, inside `<body>` after `{children}`, `{process.env.NODE_ENV === "development" && <Agentation endpoint="http://localhost:4747" />}`. The component is a client component; if `layout.tsx` is a Server Component, render it from a tiny `'use client'` wrapper, or place it in a client root. |
|
|
59
|
+
| **Next.js (Pages Router)** | `pages/_app.tsx` | Same import; render `{process.env.NODE_ENV === "development" && <Agentation endpoint="http://localhost:4747" />}` after `<Component {...pageProps} />`. |
|
|
60
|
+
| **Vite** | `src/main.tsx` | Import it; render `{import.meta.env.DEV && <Agentation endpoint="http://localhost:4747" />}` next to `<App />` inside the root render. |
|
|
61
|
+
| **React Router v7 (framework mode)** | `app/root.tsx` | Import it; render the `import.meta.env.DEV`-gated `<Agentation endpoint="http://localhost:4747" />` inside the `<body>` of the root layout. |
|
|
62
|
+
|
|
63
|
+
Confirm the exact insertion point with the user, show the diff, then save. Never blind-edit.
|
|
64
|
+
5. **Finish.** Tell the user to: **restart Claude Code** (so it loads the `agentation` MCP), start the
|
|
65
|
+
**dev server**, and verify with `npx agentation-mcp doctor`. Then they can annotate.
|
|
66
|
+
|
|
67
|
+
## 2. Watch / review mode (a live session)
|
|
68
|
+
|
|
69
|
+
1. **Preflight.** Confirm the `agentation_*` MCP tools are available (if not → restart Claude Code;
|
|
70
|
+
`npx agentation-mcp doctor`). Confirm the dev server is up and the toolbar shows bottom-right.
|
|
71
|
+
Then call `agentation_list_sessions`: **connected but 0 sessions ⇒ the `endpoint` prop is missing
|
|
72
|
+
from the wired `<Agentation />` or the browser tab is stale** — fix the wiring / reload before
|
|
73
|
+
handing off, rather than waiting on a watch that will never see anything.
|
|
74
|
+
2. **Default to the batch contract.** Open with: *"Annotate everything you want changed, then come back
|
|
75
|
+
and say 'done' — I'll pull the whole batch and apply the fixes."* When they say done, call
|
|
76
|
+
`agentation_get_all_pending`. This lets the user mark up the whole screen and hand off a reviewed
|
|
77
|
+
batch, instead of being interrupted mid-thought.
|
|
78
|
+
- **Hands-free is opt-in.** Only call `agentation_watch_annotations` (which blocks silently for
|
|
79
|
+
minutes and picks notes up one at a time) if the user explicitly asks to "watch" / go hands-free.
|
|
80
|
+
3. **Set expectations explicitly** (so the browser side isn't a silent black box): notes flip
|
|
81
|
+
**acknowledged → resolved** in the toolbar as you work; fixes land via **HMR** — *refresh to see
|
|
82
|
+
them*; each resolved note carries a **one-line summary** of the change.
|
|
83
|
+
4. **Run the loop** (also encoded in `.claude/rules/react-annotate.md`): for each annotation →
|
|
84
|
+
`agentation_acknowledge` → locate the code (source path if present, else grep selector / component /
|
|
85
|
+
nearby text) → make the fix per project conventions → `agentation_resolve` with a one-line summary
|
|
86
|
+
(or `agentation_dismiss` with a reason / `agentation_reply` to ask). In hands-free, loop on
|
|
87
|
+
`agentation_watch_annotations` until the user stops.
|
|
88
|
+
5. **On close.** If the project has memory enabled, write a short MemPalace summary to the project wing
|
|
89
|
+
(resolved annotations, files touched, deferred items) before the closing summary.
|
|
90
|
+
|
|
91
|
+
## 3. Status mode
|
|
92
|
+
|
|
93
|
+
- Print `.annotate` from `kit.config.json`; run `npx agentation-mcp doctor`; if the MCP is live, call
|
|
94
|
+
`agentation_list_sessions` to show active annotation sessions.
|
|
95
|
+
|
|
96
|
+
## Rules
|
|
97
|
+
|
|
98
|
+
- **Consent-gated + reversible.** Ask before installing, before editing the app entry (show the diff),
|
|
99
|
+
and before registering the MCP. Setup is idempotent — re-running is safe.
|
|
100
|
+
- **Don't vendor Agentation.** Only ever `install` it into the user's project; never copy its source
|
|
101
|
+
into the kit (PolyForm Shield noncompete).
|
|
102
|
+
- **Be honest about limits** every time: dev-only, no prop/state values (grep to the file), RSC degrades
|
|
103
|
+
to a selector. Don't claim file:line is guaranteed.
|
|
104
|
+
- **Claude-only scope.** If asked about Cursor/Codex, point to Agentation's own MCP/`npx add-mcp`; the
|
|
105
|
+
kit doesn't wire them.
|
|
106
|
+
- Don't reimplement Agentation's Next-only `/agentation` skill — this skill's job is the broader
|
|
107
|
+
framework coverage (Vite + React Router) plus the Claude-kit loop, rule, and MCP wiring.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kit-autopilot
|
|
3
|
+
description: Autonomous execution under hard caps — run ONE long objective hands-off, OR drive the planned effort/flow set in parallel. On an APPROVED plan the captain DECIDES, MERGES each wave, and CONTINUES; it pings the human ONLY on a genuine blocker. THIN wrapper over the built-in /loop + the kit's orchestrate scripts; never a new engine.
|
|
4
|
+
when_to_use: When delegating work to run unattended — a single capped objective (overnight) or several planned flows at once without tab-juggling. A verifiable stop condition is required. Maps to Kun Chen's "Good Night Have Fun" (the loop) and "First Mate" (the multi-flow captain). Not for one-off tasks (just do them) or open-ended work with no measurable stop.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# kit-autopilot — capped, hands-off execution
|
|
8
|
+
|
|
9
|
+
One skill, two modes — both delegate work that runs **autonomously to a verifiable stop, under hard
|
|
10
|
+
caps**. It is a **thin wrapper**: it composes the built-in `/loop` and the kit's `orchestrate`
|
|
11
|
+
scripts; it never reimplements looping or orchestration.
|
|
12
|
+
|
|
13
|
+
| Mode | What runs | Wraps |
|
|
14
|
+
| ------------- | ----------------------------------------------------------- | ------------------------------------------------------------- |
|
|
15
|
+
| **objective** | one long objective on the current branch | the built-in `/loop` + caps + a stop-check |
|
|
16
|
+
| **plan** | the planned, file-disjoint set of efforts/flows in parallel | `kit effort plan` + `orchestrate.sh` + `orchestrate-watch.sh` |
|
|
17
|
+
|
|
18
|
+
## Established-plan autonomy (the default)
|
|
19
|
+
|
|
20
|
+
**When the plan is already approved, the captain DECIDES + MERGES + CONTINUES — it does not bounce
|
|
21
|
+
back to the human to confirm a planned step.** "Do these efforts with the new flow", an approved
|
|
22
|
+
`kit effort plan`, or a green wave are an **established plan**: execute it end to end —
|
|
23
|
+
build a wave → merge its PRs → close subs+parent → gc → launch the next wave — **without asking
|
|
24
|
+
"merge or review?"**. A planned merge is _execution_, not a new decision. (José, "Error 1", 2026-06-28.)
|
|
25
|
+
|
|
26
|
+
- The human steers the **plan**, not each merge. Asking to confirm a routine planned merge is the error.
|
|
27
|
+
- A `risk:med` change the plan already approved (a product feature in the agreed scope) is **not** a
|
|
28
|
+
reason to stop — the plan blessed it. The risk-tiered review tiers
|
|
29
|
+
(`risk-tiered-review.md`) govern **ad-hoc** PRs, **not** execution of an approved plan.
|
|
30
|
+
|
|
31
|
+
### Ping the human ONLY on a genuine blocker
|
|
32
|
+
|
|
33
|
+
Interrupt only when the plan genuinely can't proceed without a human:
|
|
34
|
+
|
|
35
|
+
- an **unresolvable merge conflict** the captain can't safely resolve;
|
|
36
|
+
- a **surprise always-human change not implied by the plan** — a NEW dependency/lockfile,
|
|
37
|
+
security/auth/secret, or `.github/workflows/**` edit the plan didn't call for;
|
|
38
|
+
- a **real ambiguity the plan doesn't cover** (a fork the approved scope is silent on);
|
|
39
|
+
- a **destructive/irreversible step outside the plan**.
|
|
40
|
+
|
|
41
|
+
Everything else: decide, land it, report on completion. Quiet by default, loud only on a true blocker.
|
|
42
|
+
|
|
43
|
+
## The contract (hard — both modes)
|
|
44
|
+
|
|
45
|
+
- **Caps are mandatory and hard.** A run declares a token budget, an iteration cap, and a
|
|
46
|
+
**verifiable** `--until` stop-check. Autopilot refuses to start without them and never raises its
|
|
47
|
+
own budget mid-run.
|
|
48
|
+
- **Plan mode merges its waves.** Driving an approved plan, the captain merges each wave's PRs
|
|
49
|
+
(squash), closes subs+parent, and gc's — then advances any effort that was `blocked_by` it.
|
|
50
|
+
- **Objective mode never auto-merges its own run.** A single capped objective lands commits on its
|
|
51
|
+
branch; the merge is the captain's/human's call under the plan, not the loop's.
|
|
52
|
+
- **Never free-spawn (plan mode).** The parallel set comes from `kit effort plan`, never improvised;
|
|
53
|
+
co-launch only **file-disjoint** efforts (sequence the rest).
|
|
54
|
+
|
|
55
|
+
## Mode: objective (single capped run)
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
kit autopilot "<objective>" --max-tokens N --max-iters K --until "<check>"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
| Flag | Meaning | Default |
|
|
62
|
+
| ------------------- | --------------------------------------------------------------------------- | -------- |
|
|
63
|
+
| `<objective>` | the goal in one line (e.g. "make the build pass and open a PR") | required |
|
|
64
|
+
| `--max-tokens N` | hard token budget for the whole run | required |
|
|
65
|
+
| `--max-iters K` | hard cap on loop rounds | required |
|
|
66
|
+
| `--until "<check>"` | a command that exits 0 when done (`typecheck`, a build, a test, a PR state) | required |
|
|
67
|
+
|
|
68
|
+
**Execution:** validate caps -> drive `/loop` with the objective -> after each round evaluate the
|
|
69
|
+
stop conditions -> commit each round's progress (commit-early; an unattended run must be durable if
|
|
70
|
+
the session dies). Work stays on the branch it started on (one branch per worktree).
|
|
71
|
+
|
|
72
|
+
## Mode: plan (drive the parallel set)
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
kit autopilot --plan # read the plan and launch the planned set
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
1. **Read the plan** — `kit effort plan` groups open efforts by `flow:`, orders each flow by its
|
|
79
|
+
`blocked_by` edges, sizes each by `ctx:*`, and declares fan-out per effort via `par:*`. That
|
|
80
|
+
output IS the launch plan — the set, the order, and the budget are read from it, not chosen.
|
|
81
|
+
2. **Launch** — `orchestrate.sh <issueA> <issueB> ...` (one worktree per effort, file-disjoint;
|
|
82
|
+
respect `par:*`/`blocked_by` so blocked efforts wait). Use `--notify`.
|
|
83
|
+
3. **Babysit** — `orchestrate-watch.sh` (launched by `--notify`) signals PR open / conflict / failing
|
|
84
|
+
checks / merged, and GCs each worktree + branch on merge.
|
|
85
|
+
4. **Decide + advance** — as each wave's gates go green, **merge it** (established-plan autonomy
|
|
86
|
+
above) and advance any effort that was `blocked_by` it. Surface to the human only a genuine blocker.
|
|
87
|
+
|
|
88
|
+
## On wake / on a pause (the report — always)
|
|
89
|
+
|
|
90
|
+
- **Branch(es)** + final short HEAD, or per-flow PRs (plan mode).
|
|
91
|
+
- **Commits made** this run (count + one-line subjects).
|
|
92
|
+
- **Why it stopped** — cap hit / check passed / stalled / waves landed / a genuine blocker (what + the decision needed).
|
|
93
|
+
- **State** — objective verifiably done, or parked (and the next step a human needs).
|
|
94
|
+
|
|
95
|
+
## Stop conditions (any one ends a run)
|
|
96
|
+
|
|
97
|
+
1. **Cap hit** — `--max-tokens` or `--max-iters` reached.
|
|
98
|
+
2. **Check passes** — `--until` exits 0, or all planned waves are merged.
|
|
99
|
+
3. **No new progress** — no new commit / no measurable advance for K rounds (stall guard).
|
|
100
|
+
4. **Genuine blocker** — pause + report (see above).
|
|
101
|
+
|
|
102
|
+
## Rules
|
|
103
|
+
|
|
104
|
+
- **Never start without a verifiable check** — an uncapped, uncheckable run is banned.
|
|
105
|
+
- **Thin wrapper only** — never grow a second loop or orchestration engine here; if `/loop` or the
|
|
106
|
+
orchestrate scripts lack something, fix them at the source.
|
|
107
|
+
- **Adopt-first** — evaluate Kun Chen's open-source **GNHF** (the loop) and **First Mate** (the
|
|
108
|
+
captain) before extending this native skill; this is the thin native version.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kit-contribute
|
|
3
|
+
description: Contribute your additions and requests back upstream to claude-kit as a GitHub PR (or issue). Use AUTOMATICALLY whenever the user asks to contribute to claude-kit, submit a PR, open a PR upstream, propose a change to the kit, give back to the kit, share my agent / skill / profile with the kit, send or file a feature request, or request a feature. Opens a pull request (or, for a pure idea, an issue) against the kit's upstream repo. Works from a project scaffolded by /kit-init and customized with /kit-customize, but also stands alone.
|
|
4
|
+
argument-hint: "[agent <name> | skill <name> | profile <name> | request]"
|
|
5
|
+
allowed-tools: Bash, Read, Edit, Write, Glob, Grep, AskUserQuestion, Skill
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# kit-contribute — give your additions back to claude-kit
|
|
9
|
+
|
|
10
|
+
You help a **downstream user submit a contribution upstream** to the claude-kit repo as a GitHub
|
|
11
|
+
**PR** — a new agent, skill, or profile — or, for a pure idea, a GitHub **issue**. The kit (templates
|
|
12
|
+
+ profiles) lives at `${CLAUDE_PLUGIN_ROOT}`; the user's project lives in `./.claude/`. You never push
|
|
13
|
+
to the installed plugin dir — you work in a fresh temp clone of the upstream repo.
|
|
14
|
+
|
|
15
|
+
This is the **inverse of `/kit-customize`**: where customize *parameterizes a template into a project*,
|
|
16
|
+
you *de-parameterize a project artifact back into a reusable kit template*.
|
|
17
|
+
|
|
18
|
+
## 1. Resolve upstream
|
|
19
|
+
|
|
20
|
+
- The kit ships **inside `jeiemgi/cckit`** at `` — there is no
|
|
21
|
+
standalone `claude-kit` repo. Read `${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json` → `repository`
|
|
22
|
+
for `OWNER/REPO` (default `jeiemgi/cckit`); contributing = a PR to that repo touching
|
|
23
|
+
`**`. **Confirm `OWNER/REPO` with the user.**
|
|
24
|
+
- Require GitHub auth: run `gh auth status`. If not logged in, **stop** and tell the user to run
|
|
25
|
+
`gh auth login` first — every step below needs it.
|
|
26
|
+
|
|
27
|
+
## 2. Pick a contribution type
|
|
28
|
+
|
|
29
|
+
If `$ARGUMENTS` names one (`agent`, `skill`, `profile`, `request`), use it. Otherwise ask via
|
|
30
|
+
`AskUserQuestion`:
|
|
31
|
+
|
|
32
|
+
| Type | What it adds | Target path |
|
|
33
|
+
| ----------------------- | --------------------------------------------- | ---------------------------------------- |
|
|
34
|
+
| **Agent** | a reusable agent template | `templates/agents/<name>.md` |
|
|
35
|
+
| **Skill** | a `SKILL.md` (scaffolded or plugin) | `templates/skills/<name>/` or `skills/<name>/` |
|
|
36
|
+
| **Profile** | a preset role profile JSON | `profiles/<name>.json` |
|
|
37
|
+
| **Feature request / idea** | a proposal — GitHub **issue** by default | (issue) or `requests/<slug>.md` |
|
|
38
|
+
|
|
39
|
+
## 3. Assemble the artifact
|
|
40
|
+
|
|
41
|
+
### Agent — de-parameterize back into a template
|
|
42
|
+
|
|
43
|
+
Take a project agent `./.claude/agents/<name>/AGENT.md` and **invert kit-customize's substitution**:
|
|
44
|
+
|
|
45
|
+
| Concrete value in the project agent | Replace with |
|
|
46
|
+
| ----------------------------------------- | ------------------- |
|
|
47
|
+
| the project's name | `{{PROJECT_NAME}}` |
|
|
48
|
+
| the working language | `{{COMMS_LANG}}` |
|
|
49
|
+
| the project's MemPalace wing | `{{WING}}` |
|
|
50
|
+
| the project's slug | `{{PROJECT_SLUG}}` |
|
|
51
|
+
|
|
52
|
+
- **Re-wrap the `## Memory (MemPalace)` section** in `<!-- IF:MEMORY -->…<!-- /IF:MEMORY -->`. If the
|
|
53
|
+
project had memory **off** (no Memory section), **add** the block with the standard MemPalace table
|
|
54
|
+
(wing=`agent-<name>` for diary, `{{WING}}` for shared rooms — match `templates/agents/n8n.md`).
|
|
55
|
+
- **Strip anything project-specific or secret** — concrete repo names, hostnames, IDs, tokens,
|
|
56
|
+
credential names. Read `kit.config.json` to know exactly which literals to swap out.
|
|
57
|
+
- Keep the frontmatter contract intact (`name` = file basename, `description`, `when_to_use`,
|
|
58
|
+
`tools`, `skills`). Target: `templates/agents/<name>.md`.
|
|
59
|
+
|
|
60
|
+
### Skill — a SKILL.md
|
|
61
|
+
|
|
62
|
+
Ask whether it's a **scaffolded skill** (lands in a project's `.claude/skills/` via init) →
|
|
63
|
+
`templates/skills/<name>/SKILL.md`, or a **plugin skill** (ships with the plugin itself) →
|
|
64
|
+
`skills/<name>/SKILL.md`. Strip project-specific paths/values.
|
|
65
|
+
|
|
66
|
+
### Profile — a preset JSON
|
|
67
|
+
|
|
68
|
+
Often the user already saved one via kit-customize at `~/.claude/kit-profiles/<name>.json`. Match the
|
|
69
|
+
preset shape exactly (`name`, `label`, `description`, `agents`, `skills`, `rules`, `roles`,
|
|
70
|
+
`milestones`, `defaults`) — see `profiles/automation.json`. **Verify every agent it lists exists** as
|
|
71
|
+
`templates/agents/<agent>.md` in the upstream clone (step 4) — bundle any missing agent template in
|
|
72
|
+
the **same PR**, or drop it from the list. Target: `profiles/<name>.json`.
|
|
73
|
+
|
|
74
|
+
### Feature request / idea — a proposal
|
|
75
|
+
|
|
76
|
+
Author a concise proposal with these sections: **Problem · Proposal · Scope · Why**. By default this
|
|
77
|
+
goes as a GitHub **issue** (lowest friction — no clone needed). Offer the alternative of a PR that adds
|
|
78
|
+
`requests/<slug>.md` with the same content if the user prefers a tracked file.
|
|
79
|
+
|
|
80
|
+
### Lint before submitting (agent / skill / profile only)
|
|
81
|
+
|
|
82
|
+
Validate before you ever push. Reuse existing tooling via the `Skill` tool:
|
|
83
|
+
|
|
84
|
+
- **Agents** → run `claude-kit:kit-customize`'s lint (frontmatter, required keys, name↔file, tools
|
|
85
|
+
shape, skills resolve, **no leftover `{{VAR}}`** except the intended template tokens).
|
|
86
|
+
- **Skills** → defer to `agent-skills:skill-crafting`.
|
|
87
|
+
- **Profiles** → validate JSON parses + agent references resolve (above).
|
|
88
|
+
|
|
89
|
+
**Block on hard failures.** Fix or stop; don't submit a broken artifact.
|
|
90
|
+
|
|
91
|
+
## 4. Determine access & prepare a clone
|
|
92
|
+
|
|
93
|
+
Check permission: `gh repo view OWNER/REPO --json viewerPermission -q .viewerPermission`.
|
|
94
|
+
|
|
95
|
+
| Permission | Path |
|
|
96
|
+
| --------------------------- | -------------------------------------------------------------------------- |
|
|
97
|
+
| WRITE / MAINTAIN / ADMIN | clone upstream: `gh repo clone OWNER/REPO <tmp>`; branch `contrib/<type>-<name>` |
|
|
98
|
+
| READ / none | **fork**: `gh repo fork OWNER/REPO --clone --fork-name claude-kit` into a `<tmp>`; branch off `main` |
|
|
99
|
+
|
|
100
|
+
- Use a fresh temp dir (e.g. `mktemp -d`). **Never** push from `${CLAUDE_PLUGIN_ROOT}` or the
|
|
101
|
+
marketplace cache — they're managed/detached.
|
|
102
|
+
- Never assume push rights to upstream — fork whenever you lack write access.
|
|
103
|
+
- Place the assembled artifact (step 3) at its correct path **inside the temp clone**.
|
|
104
|
+
|
|
105
|
+
## 5. Commit & push
|
|
106
|
+
|
|
107
|
+
- `git add` the file(s) at the correct kit path.
|
|
108
|
+
- Commit with a clear, scoped message: `feat(agent): add <name>`, `feat(skill): add <name>`,
|
|
109
|
+
`feat(profile): add <name>`.
|
|
110
|
+
- Push the branch to the fork/origin (`git push -u origin <branch>`).
|
|
111
|
+
|
|
112
|
+
## 6. Open the PR — confirm first (outward-facing)
|
|
113
|
+
|
|
114
|
+
**This is public + outward-facing — confirm with the user before opening it.**
|
|
115
|
+
|
|
116
|
+
- Artifact PR: `gh pr create --repo OWNER/REPO --base main` — from a fork the head is
|
|
117
|
+
`<your-login>:<branch>`. Title summarizes the contribution; body states **what it adds, why, and how
|
|
118
|
+
it was tested/linted**.
|
|
119
|
+
- Pure request, no artifact: `gh issue create --repo OWNER/REPO` with the **Problem · Proposal · Scope
|
|
120
|
+
· Why** body instead.
|
|
121
|
+
- Print the resulting URL.
|
|
122
|
+
|
|
123
|
+
## 7. Report
|
|
124
|
+
|
|
125
|
+
Print the PR/issue URL. Remind the user that a **maintainer reviews before it merges**, and that once
|
|
126
|
+
merged they'll receive it via `claude plugin update`.
|
|
127
|
+
|
|
128
|
+
## Rules
|
|
129
|
+
|
|
130
|
+
- Always go through a PR or issue — **never push to upstream `main`**.
|
|
131
|
+
- Fork when you lack write access; work in a temp clone, **never** the installed plugin dir.
|
|
132
|
+
- Lint contributed agents/skills and de-parameterize agents (strip every project-specific + secret
|
|
133
|
+
value) before submitting.
|
|
134
|
+
- **Confirm with the user before opening** the PR/issue — it's public and outward-facing.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kit-customize
|
|
3
|
+
description: Customize a kit-scaffolded project's .claude/ setup. Use AUTOMATICALLY whenever the user asks to create, add, edit, modify, rename, delete, or remove an agent in a project — and also to add a skill to an agent, attach skills, wire tools, find or search for a skill, suggest agents/skills for my project, lint my agents, validate an agent, build a custom profile, or pick a preset profile. Works on a project already scaffolded by /kit-init (a `.claude/` dir with `.claude/kit.config.json`).
|
|
4
|
+
argument-hint: "[add-agent <name> | add-skill <agent> | lint | profile]"
|
|
5
|
+
allowed-tools: Bash, Read, Edit, Write, Glob, Grep, AskUserQuestion, Skill
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# kit-customize — tailor a kit-scaffolded project
|
|
9
|
+
|
|
10
|
+
You customize an **already-scaffolded** claude-kit project: add agents, wire skills + tools onto
|
|
11
|
+
them, search/suggest skills, lint everything, and apply a preset or custom profile. The kit (presets
|
|
12
|
+
+ templates) lives at `${CLAUDE_PLUGIN_ROOT}`; the project's setup lives in `./.claude/`.
|
|
13
|
+
|
|
14
|
+
## 1. Load context
|
|
15
|
+
|
|
16
|
+
- Read `./.claude/kit.config.json` → current `profile`, `roles`, `project.{name,slug,language}`,
|
|
17
|
+
`memory.enabled`. **If it's missing, stop**: tell the user to run `/kit-init` first — this skill
|
|
18
|
+
only customizes a project the kit already scaffolded.
|
|
19
|
+
- List existing agents: `.claude/agents/*/AGENT.md` (Glob). Note their `name`s.
|
|
20
|
+
- Available raw material:
|
|
21
|
+
- Preset profiles → `${CLAUDE_PLUGIN_ROOT}/profiles/*.json`
|
|
22
|
+
- Agent templates → `${CLAUDE_PLUGIN_ROOT}/templates/agents/<name>.md`
|
|
23
|
+
- Skill templates → `${CLAUDE_PLUGIN_ROOT}/templates/skills/<name>/SKILL.md`
|
|
24
|
+
|
|
25
|
+
## 2. Pick a mode
|
|
26
|
+
|
|
27
|
+
If `$ARGUMENTS` names one (`add-agent`, `edit-agent`, `delete-agent`, `add-skill`, `lint`, `profile`),
|
|
28
|
+
use it. If the user's request clearly says create/add, edit/modify/rename, or delete/remove an agent,
|
|
29
|
+
go straight to that path in step 3 — don't ask the mode. Otherwise ask via `AskUserQuestion`:
|
|
30
|
+
**Add an agent** · **Edit an agent** · **Delete an agent** · **Add skills/tools** ·
|
|
31
|
+
**Search/suggest skills** · **Lint** · **Profile (preset or custom)**.
|
|
32
|
+
|
|
33
|
+
## 3. Add, edit, or delete an agent
|
|
34
|
+
|
|
35
|
+
**Add** — two paths, ask which:
|
|
36
|
+
|
|
37
|
+
- **From a kit template** — copy `${CLAUDE_PLUGIN_ROOT}/templates/agents/<name>.md`, then:
|
|
38
|
+
- substitute `{{PROJECT_NAME}}`, `{{COMMS_LANG}}`, `{{WING}}`, `{{PROJECT_SLUG}}` etc. from
|
|
39
|
+
`kit.config.json`;
|
|
40
|
+
- resolve the `<!-- IF:MEMORY -->…<!-- /IF:MEMORY -->` block — **keep** its inner content when
|
|
41
|
+
`memory.enabled` is true, **delete** the whole block (markers + body) when false.
|
|
42
|
+
- **Fresh custom agent** — author one that follows the frontmatter contract (see below).
|
|
43
|
+
|
|
44
|
+
Frontmatter contract (match the templates exactly):
|
|
45
|
+
```yaml
|
|
46
|
+
---
|
|
47
|
+
name: <slug> # must equal the agent's directory name
|
|
48
|
+
description: <one line — what it owns + when it's invoked>
|
|
49
|
+
when_to_use: <trigger conditions>
|
|
50
|
+
tools: [Bash, Read, Edit, Write, Grep, Glob, mcp__server__tool, ...]
|
|
51
|
+
skills:
|
|
52
|
+
- bare-global-skill
|
|
53
|
+
- plugin:skill
|
|
54
|
+
---
|
|
55
|
+
```
|
|
56
|
+
Body: terse `## Authority` (✅ owns / ❌ defers + ❌ never), a numbered workflow, `## Voice + style`,
|
|
57
|
+
and (only if memory enabled) the `## Memory (MemPalace)` table.
|
|
58
|
+
|
|
59
|
+
Write to `.claude/agents/<name>/AGENT.md`. Then **lint it (step 6)**. Offer to:
|
|
60
|
+
- add the agent's role to `kit.config.json` `roles`, and
|
|
61
|
+
- add a row to the agent table in the project's `CLAUDE.md`.
|
|
62
|
+
|
|
63
|
+
**Edit** — open `.claude/agents/<name>/AGENT.md` and change frontmatter (`description`, `when_to_use`,
|
|
64
|
+
`tools`, `skills`) or body; for skills/tools specifically use step 4. To **rename**, move the dir to
|
|
65
|
+
`.claude/agents/<new>/AGENT.md`, set `name: <new>`, and update its role in `kit.config.json` + the
|
|
66
|
+
`CLAUDE.md` table. Keep edits additive; **re-lint (step 6)** after.
|
|
67
|
+
|
|
68
|
+
**Delete** — **confirm explicitly first** and show what will be removed. Then delete the whole
|
|
69
|
+
`.claude/agents/<name>/` directory and clean up references: drop the role from `kit.config.json`
|
|
70
|
+
`roles`, remove its row from the `CLAUDE.md` agent table, and grep `.claude/` for other mentions —
|
|
71
|
+
warn if any agent or rule still references it. Never delete without confirmation.
|
|
72
|
+
|
|
73
|
+
## 4. Add skills/tools to an agent
|
|
74
|
+
|
|
75
|
+
Open `.claude/agents/<name>/AGENT.md` and edit additively:
|
|
76
|
+
|
|
77
|
+
- **`skills:`** — append bare global names, `plugin:skill` refs, or scaffolded project skills.
|
|
78
|
+
- **`tools:`** — append builtins (`Bash`, `Read`, `Edit`, `Write`, `Grep`, `Glob`, `AskUserQuestion`)
|
|
79
|
+
and domain `mcp__<server>__<tool>` names.
|
|
80
|
+
|
|
81
|
+
**Verify every name resolves before adding** (see step 5) — never invent a skill or tool name.
|
|
82
|
+
Re-lint (step 6) after editing.
|
|
83
|
+
|
|
84
|
+
## 5. Search / suggest skills (and tools)
|
|
85
|
+
|
|
86
|
+
- **Discover** — invoke the `find-skills` skill via the `Skill` tool, and enumerate what's already
|
|
87
|
+
available: the session's skill list, `~/.claude/skills/*`, and installed plugin skills. For tools,
|
|
88
|
+
scan the available `mcp__*` names in this session.
|
|
89
|
+
- **Suggest by profile/roles** — map the project to relevant skills + tools. Read what's actually
|
|
90
|
+
available rather than hardcoding; the table below is illustrative:
|
|
91
|
+
|
|
92
|
+
| Profile / role | Skills (examples) | Tools (examples) |
|
|
93
|
+
| ------------------ | ----------------------------------------------------------------------- | ----------------------- |
|
|
94
|
+
| software | `agent-skills:context7`, `claude-api`, `playwright-best-practices` | `mcp__chrome-devtools__*` |
|
|
95
|
+
| design / content | `tailwind-design-system`, `gsap-*`, `gws-slides` | `mcp__paper__*` |
|
|
96
|
+
| automation | `n8n-*` (mcp-tools-expert, workflow-patterns, …) | `mcp__n8n__*` |
|
|
97
|
+
| research | `deep-research` | `WebSearch`, `WebFetch` |
|
|
98
|
+
|
|
99
|
+
- Present the candidates and let the user pick which to wire into which agent → hand off to step 4.
|
|
100
|
+
|
|
101
|
+
## 6. Lint (must pass)
|
|
102
|
+
|
|
103
|
+
Validate one agent (`add-agent`/`add-skill` follow-up) or all (`lint` mode). Per file check:
|
|
104
|
+
|
|
105
|
+
| Check | Pass condition |
|
|
106
|
+
| -------------------- | --------------------------------------------------------------------- |
|
|
107
|
+
| Frontmatter | opens & closes with `---`; parses as valid YAML |
|
|
108
|
+
| Required keys | `name`, `description`, `when_to_use`, `tools`, `skills` all present |
|
|
109
|
+
| Name = dir | `name` equals the parent directory name |
|
|
110
|
+
| Tools shape | a list; each is a known builtin or matches `mcp__<server>__<tool>` |
|
|
111
|
+
| Skills resolve | a list; each resolves as global / `plugin:skill` / project skill — **warn** if not |
|
|
112
|
+
| No template tokens | no leftover `{{VAR}}` in a scaffolded agent |
|
|
113
|
+
|
|
114
|
+
Report a table: **file · check · pass/warn/fail**, then offer to fix the fixable ones (missing keys,
|
|
115
|
+
name↔dir mismatch, unsubstituted tokens). For deeper skill authoring/validation, defer to
|
|
116
|
+
`agent-skills:skill-crafting` via the `Skill` tool.
|
|
117
|
+
|
|
118
|
+
## 7. Profile — preset or custom
|
|
119
|
+
|
|
120
|
+
- **Preset** — read `${CLAUDE_PLUGIN_ROOT}/profiles/*.json`, show each `label` + `description` +
|
|
121
|
+
`agents`; on pick, scaffold/adapt its agents (step 3) and offer its `skills` to relevant agents.
|
|
122
|
+
- **Custom** — choose any subset/superset of agents (templates or fresh) + skills + `roles` +
|
|
123
|
+
`milestones`. Offer to **save it for reuse** to `~/.claude/kit-profiles/<name>.json` using the
|
|
124
|
+
preset JSON shape (`name`, `label`, `description`, `agents`, `skills`, `rules`, `roles`,
|
|
125
|
+
`milestones`, `defaults`) — note it can feed a future `/kit-init` or kit-customize run.
|
|
126
|
+
|
|
127
|
+
Either way, update `.claude/kit.config.json` `profile` + `roles` to reflect the active selection.
|
|
128
|
+
|
|
129
|
+
## Rules
|
|
130
|
+
|
|
131
|
+
- Never overwrite an existing agent file without confirming.
|
|
132
|
+
- Always lint after writing or editing an agent (step 6).
|
|
133
|
+
- Don't invent skill or tool names — verify they resolve first (step 5).
|
|
134
|
+
- Keep every edit additive and reversible.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kit-dev
|
|
3
|
+
description: >
|
|
4
|
+
Fast local dev loop for claude-kit itself (the plugin source). start: worktree +
|
|
5
|
+
launch instructions for `claude --plugin-dir` (plugin loads live from disk, no cache, no
|
|
6
|
+
version bump). Iterate with /reload-plugins. ship: auto-bump semver + kit-task-pr-auto +
|
|
7
|
+
one-command update of the installed plugin.
|
|
8
|
+
when_to_use: >
|
|
9
|
+
When modifying the kit itself — skills, agents, hooks, scripts, profiles in the
|
|
10
|
+
claude-kit-plugin source — and you want to test changes live without the
|
|
11
|
+
merge→bump→marketplace-update cycle. Not for consuming the kit (that's /kit-update).
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# kit-dev — develop claude-kit without the publish cycle
|
|
15
|
+
|
|
16
|
+
The kit's source of truth is the `claude-kit-plugin` package; the installed plugin comes from
|
|
17
|
+
the marketplace (dedupes by version). This skill replaces the slow loop (merge → manual bump →
|
|
18
|
+
marketplace update → plugin update) with a live local loop.
|
|
19
|
+
|
|
20
|
+
## Subcommands
|
|
21
|
+
|
|
22
|
+
`/kit-dev start <issue>` · `/kit-dev ship` · bare `/kit-dev` = print the loop + current state.
|
|
23
|
+
|
|
24
|
+
## start — open the loop
|
|
25
|
+
|
|
26
|
+
1. Worktree first, like all repo work: run the `/kit-task-start <N> --worktree` flow
|
|
27
|
+
(branch `task/<N>-<slug>` from the base branch). All kit edits happen in the worktree.
|
|
28
|
+
2. Launch the dev session **from the worktree** with the plugin loaded live:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
cd .claude/worktrees/<kind>+<N>-<slug>
|
|
32
|
+
claude --plugin-dir "$PWD/packages/claude-kit-plugin"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- `--plugin-dir` loads the plugin directly from disk — no cache, no install, no version.
|
|
36
|
+
- The dev-session plugin shadows the marketplace install for that session; the rest of
|
|
37
|
+
the sessions keep the stable installed kit.
|
|
38
|
+
|
|
39
|
+
## iterate — the inner loop
|
|
40
|
+
|
|
41
|
+
- Edit skills / agents / hooks / scripts in the plugin source.
|
|
42
|
+
- In the dev session run `/reload-plugins` — picks up the edits in-session (skills, agents,
|
|
43
|
+
hooks, MCP). No restart needed; restart only if `/reload-plugins` misbehaves.
|
|
44
|
+
- Project-level kit files (`.claude/skills/`, `scripts/`, rules) are ordinary repo files —
|
|
45
|
+
same worktree, no reload mechanics, new session reads them fresh.
|
|
46
|
+
|
|
47
|
+
## ship — land it and update the installed kit
|
|
48
|
+
|
|
49
|
+
1. `"${CLAUDE_PLUGIN_ROOT}/scripts/kit-bump-version.sh" beta` — bumps `version.json`,
|
|
50
|
+
`plugin.json`, `package.json`, and the marketplace manifest(s) in sync.
|
|
51
|
+
(`patch`/`minor`/explicit semver for releases — a clean release advances the `stable`
|
|
52
|
+
channel, a `-beta.N` build advances `beta`.) NEVER ship a kit change without the bump:
|
|
53
|
+
`/plugin update` dedupes by version and silently skips.
|
|
54
|
+
2. Run the `/kit-task-pr-auto` flow — commit, push, PR (`Closes #N`), squash-merge to the base.
|
|
55
|
+
3. Update the installed plugin (one command, in any session):
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
/plugin marketplace update claude-kit-marketplace
|
|
59
|
+
/plugin update claude-kit@claude-kit-marketplace
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Rules
|
|
63
|
+
|
|
64
|
+
- Worktree always — never edit the kit in the main checkout.
|
|
65
|
+
- The semver in `plugin.json`/`version.json` is load-bearing: the session banner and `/kit-update`'s
|
|
66
|
+
changelog delta read it. Auto-bump on ship, never remove it.
|
|
67
|
+
- The lockfile rule still applies if a kit change touches deps.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kit-digest
|
|
3
|
+
description: Pre-digest long inputs (video transcripts, CI logs, big files, web pages) with the LOCAL model (mlx_lm.server) so the Claude session reads a short digest + pointer instead of the full content — token saving on every long read.
|
|
4
|
+
when_to_use: Before reading any long input into the session — a YouTube/video transcript, a CI failure log, a file or page over ~2k words. Especially "procesa este video/transcript/log". If the local server is down, the script says so — fall back to reading the original directly.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# kit-digest
|
|
8
|
+
|
|
9
|
+
Plugin-direct skill — the script + local-model helper resolve from `${CLAUDE_PLUGIN_ROOT}`.
|
|
10
|
+
|
|
11
|
+
## What it does
|
|
12
|
+
|
|
13
|
+
Delegates to `${CLAUDE_PLUGIN_ROOT}/scripts/kit-digest.sh` — acquires the text (file, URL, or
|
|
14
|
+
YouTube video via yt-dlp subtitles), chunks it (~2500 words), digests each chunk on the **local
|
|
15
|
+
model** (`${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-local.sh` → mlx_lm.server, $0 API), merges, and
|
|
16
|
+
prints a digest of at most ~1500 tokens plus a pointer to the original for selective deep-dives.
|
|
17
|
+
|
|
18
|
+
## Execution
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
"${CLAUDE_PLUGIN_ROOT}/scripts/kit-digest.sh" <path|url> [--focus "<topic>"] [--lang es|en]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
| Flag | Description |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| `--focus "<topic>"` | Prioritize content related to a topic (e.g. `--focus "claude-kit"`) |
|
|
27
|
+
| `--lang es\|en` | Digest language (default `es`) |
|
|
28
|
+
|
|
29
|
+
## Exit codes — the fallback contract
|
|
30
|
+
|
|
31
|
+
| Code | Meaning | What Claude does |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| 0 | Digest printed | Use the digest; read the original only for targeted deep-dives |
|
|
34
|
+
| 2 | Local server down | Tell the user (start command is in stderr) and read the original directly — current behavior, no digest |
|
|
35
|
+
| 1 | Input error (not found, no subs, empty) | Surface the error verbatim |
|
|
36
|
+
|
|
37
|
+
## Rules
|
|
38
|
+
|
|
39
|
+
- Never paste the full original into the session when the digest succeeded — the digest + pointer IS the deliverable of this skill.
|
|
40
|
+
- The digest must keep concrete numbers, names and issue/PR refs; if it visibly lost a critical detail, deep-dive the original section instead of re-digesting blind.
|
|
41
|
+
- Requires: `mlx_lm.server` running (see the `kit-local.sh` header), `yt-dlp` only for YouTube URLs.
|