@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,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kit-onboard
|
|
3
|
+
description: Run the claude-kit two-tier onboarding interview — the wide-range GLOBAL profile (asked once in a lifetime, writes ~/.claude/kit.profile.<user>.json) and the per-PROJECT interview (one batched round, pre-filled from your profile + what's detected in this directory). Use AUTOMATICALLY when the user asks to onboard, set up the kit for the first time, "interview me", create my kit profile, configure a new project, or when /kit-init runs against a project with no kit profile yet. Pairs with /kit-add to stack modules (e.g. software) later.
|
|
4
|
+
when_to_use: First contact with the kit on a machine (no global profile yet), or starting a new project. Portable (Tier A) — runs in Claude Code, Cowork, and claude.ai Projects via AskUserQuestion.
|
|
5
|
+
allowed-tools: Bash, Read, AskUserQuestion
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# kit-onboard — the two-tier interview (D11)
|
|
9
|
+
|
|
10
|
+
Two tiers. The ASKING is yours (AskUserQuestion). The DERIVING + WRITING is deterministic and
|
|
11
|
+
lives in the engine — never hand-edit config JSON; call the scripts.
|
|
12
|
+
|
|
13
|
+
Engine (under `${CLAUDE_PLUGIN_ROOT}`):
|
|
14
|
+
- `scripts/lib/kit-interview.sh --catalog TIER` — the question set (`global` | `project`).
|
|
15
|
+
- `scripts/lib/kit-interview.sh --render TIER --dir DIR` — same, with each `default` PRE-FILLED
|
|
16
|
+
from the global profile + repo detection. **Render, don't read raw — the defaults are the point.**
|
|
17
|
+
- `scripts/kit-onboard.sh global --answers FILE` — persist tier-1 to the global profile.
|
|
18
|
+
- `scripts/kit-onboard.sh project --answers FILE --dir DIR` — persist tier-2 (manifest-tracked).
|
|
19
|
+
- `scripts/kit-onboard.sh status` — has the global profile been created? (rc 1 = not yet)
|
|
20
|
+
|
|
21
|
+
## Tier 1 — global profile (ONCE in a lifetime)
|
|
22
|
+
|
|
23
|
+
1. Run `scripts/kit-onboard.sh status`. **If it reports a profile already exists, SKIP tier 1**
|
|
24
|
+
entirely — the wide-range interview is once-ever. Go straight to tier 2.
|
|
25
|
+
2. Otherwise render the catalog: `scripts/lib/kit-interview.sh --render global`.
|
|
26
|
+
3. Ask the questions with **AskUserQuestion** — one batched round. For each question use its
|
|
27
|
+
`header`, `question`, and `options` (mark the `recommended` option first, label it
|
|
28
|
+
"(Recommended)"); seed the selection from `default`. Text questions (e.g. name) → free input.
|
|
29
|
+
4. Build an answers JSON `{ "<key>": "<chosen value>", ... }` (keys = each question's `key`), write
|
|
30
|
+
it to a temp file, and persist: `scripts/kit-onboard.sh global --answers /tmp/kit-global.json`.
|
|
31
|
+
|
|
32
|
+
## Tier 2 — this project (batched, pre-filled)
|
|
33
|
+
|
|
34
|
+
1. Render: `scripts/lib/kit-interview.sh --render project --dir <project-dir>`. Defaults are already
|
|
35
|
+
filled from the global profile (language, owner) and the directory (project name ← folder, etc.).
|
|
36
|
+
2. Ask with **AskUserQuestion** — one batched round, defaults pre-selected. Confirm or change.
|
|
37
|
+
3. Persist: `scripts/kit-onboard.sh project --answers /tmp/kit-project.json --dir <project-dir>`.
|
|
38
|
+
4. **The `software` question is a control answer, not a config field.** If the user answers
|
|
39
|
+
`yes`, immediately run the **kit-add** flow for the software module (the software wizard:
|
|
40
|
+
versioning / deploy / CI) — see the `/kit-add` command. If `no`, stop: it stays a free
|
|
41
|
+
workspace, and they can run `/kit-add software` any time.
|
|
42
|
+
|
|
43
|
+
## Rules
|
|
44
|
+
|
|
45
|
+
- **Render before asking** — never invent question text or defaults; the catalog is the source.
|
|
46
|
+
- **One batched AskUserQuestion round per tier** — don't drip-feed.
|
|
47
|
+
- **Skip tier 1 if a profile exists** (`kit-onboard.sh status`). Tier 2 always runs per project.
|
|
48
|
+
- The global profile lives OUTSIDE any project (`~/.claude/`); the project config is manifest-tracked
|
|
49
|
+
(safe to update/uninstall later). Both are user-owned identity — the engine writes, never invents.
|
|
50
|
+
- Mode stays `guided` by default (local-first, D16): warnings, never blocks. Enforced is opt-in.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kit-security-sweep
|
|
3
|
+
description: Full security audit of the project's apps. A security expert scans for AI/prompt injection, auth/session weaknesses, CORS/CSP issues, and dependency CVEs; findings are filed as GitHub issues and roadmapped. Named kit-security-sweep (not security-review) so it doesn't shadow the Claude Code builtin /security-review (diff audit).
|
|
4
|
+
when_to_use: When you want a project security sweep with filed issues + roadmap entries — before a release, after a significant feature, or on demand. For a quick diff/code audit without issue filing, use the builtin /security-review instead.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /kit-security-sweep
|
|
8
|
+
|
|
9
|
+
Plugin-direct skill — reads `.claude/kit.config.json` from the working directory; the project's
|
|
10
|
+
Security agent lives at `.claude/agents/security/AGENT.md`.
|
|
11
|
+
|
|
12
|
+
## What this process does
|
|
13
|
+
|
|
14
|
+
1. **Security expert** scans the active apps for vulnerabilities (see `.claude/agents/security/AGENT.md`)
|
|
15
|
+
2. A GitHub issue is filed for every finding (`role:security`, `kind:security`, severity label) — security findings file directly, no confirm round-trip
|
|
16
|
+
3. **Tech Lead** reviews findings and rolls them into the project's roadmap / a Security Hardening milestone
|
|
17
|
+
|
|
18
|
+
## Inputs
|
|
19
|
+
|
|
20
|
+
None required. Optionally pass `--app <name>` to scope to one app.
|
|
21
|
+
|
|
22
|
+
## Execution
|
|
23
|
+
|
|
24
|
+
### Phase 1 — Security Audit (Security agent)
|
|
25
|
+
|
|
26
|
+
Spawn the Security agent (`.claude/agents/security/AGENT.md`) with the full threat model from that file.
|
|
27
|
+
Ask it to output findings grouped by severity + a flat "Issues to file" list at the end.
|
|
28
|
+
|
|
29
|
+
### Phase 2 — Issue filing (PM)
|
|
30
|
+
|
|
31
|
+
For each finding, create a GitHub issue on the project repo (`KIT_REPO` from kit.config):
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-config.sh" && load_kit_config
|
|
35
|
+
gh issue create --repo "$KIT_REPO" \
|
|
36
|
+
--title "<finding title>" \
|
|
37
|
+
--label "role:security,kind:security,priority:<critical|p1|p2|p3>" \
|
|
38
|
+
--body "<risk / evidence / fix>"
|
|
39
|
+
# add --milestone "<Security milestone>" when the project has one
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Phase 3 — Roadmap (Tech Lead)
|
|
43
|
+
|
|
44
|
+
Roll the filed issues into the project's roadmap surface / Security Hardening milestone.
|
|
45
|
+
CRITICAL findings block the distribution/release milestone.
|
|
46
|
+
|
|
47
|
+
## Output
|
|
48
|
+
|
|
49
|
+
- GitHub issues filed for every finding
|
|
50
|
+
- The project roadmap / Security Hardening milestone updated
|
|
51
|
+
|
|
52
|
+
## Rules
|
|
53
|
+
|
|
54
|
+
- Never mark a security finding as "won't fix" without explicit owner sign-off
|
|
55
|
+
- CRITICAL findings block the distribution/release milestone
|
|
56
|
+
- All security issues use label `role:security`
|
|
57
|
+
- Prompt injection findings also get label `kind:security`
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kit-ship
|
|
3
|
+
description: End-to-end delivery for a user request — fix the issue, then run the full kit cycle (start → PR → CI → merge → close → update kit) using the kit-task commands. One command takes an open issue from code to merged-on-base with the board kept in sync.
|
|
4
|
+
when_to_use: When the user says "fix #N and ship it", "do the full cycle on #N", "fix this and merge it", or hands you a tracked issue to take all the way to the base branch. For just opening a PR use /kit-task-pr; for PR+merge with no implementation use /kit-task-pr-auto.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# kit-ship
|
|
8
|
+
|
|
9
|
+
Takes one issue from **open → implemented → merged on the base branch → closed → kit refreshed**,
|
|
10
|
+
chaining the existing kit-task commands. This is the orchestrator that wraps the manual sequence,
|
|
11
|
+
with the sharp edges baked in (see **Hard rules**). Plugin-direct — the kit-task skills it chains
|
|
12
|
+
resolve from `${CLAUDE_PLUGIN_ROOT}`.
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
|
|
16
|
+
| Field | Required | Notes |
|
|
17
|
+
| ------------ | -------- | --------------------------------------------------------------------- |
|
|
18
|
+
| Issue number | ✓* | `157`. *If the user gives a request with no issue, create one first via `/kit-task-new`, then proceed. |
|
|
19
|
+
| Skip merge | optional | `--pr-only` → stop after the PR (don't merge). Default merges. |
|
|
20
|
+
|
|
21
|
+
## The cycle
|
|
22
|
+
|
|
23
|
+
| # | Step | Command / action |
|
|
24
|
+
| - | ---- | ---------------- |
|
|
25
|
+
| 1 | **Read the issue** | `gh issue view <N>` — understand scope. If ambiguous/large/decision-heavy → stop and ask (don't ship blind). |
|
|
26
|
+
| 2 | **Start** | `/kit-task-start <N> --worktree` — branch `<kind>/<N>-<slug>` from the fresh base branch, mark **In Progress**. |
|
|
27
|
+
| 3 | **Implement** | Do the actual work to the issue's acceptance criteria, following project conventions + the relevant agent's domain. |
|
|
28
|
+
| 4 | **Verify locally** | Run the affected workspace's `build` / `typecheck` / `lint` (e.g. `pnpm -F <pkg> build typecheck`) or `bash -n` for scripts. Don't open a PR on red. |
|
|
29
|
+
| 5 | **PR** | `/kit-task-pr <N>` — commit, push, open PR to the base branch, mirror labels/milestone, add to board, move issue **In Review**. |
|
|
30
|
+
| 6 | **Wait for CI** | If the project has a required check, poll until it's not pending (background `until` loop). **Pending ≠ failing — wait; never force-merge.** |
|
|
31
|
+
| 7 | **Merge** | `/kit-task-pr-merge` once green — squash to the base, switch to base, pull, delete local+remote branch + worktree. |
|
|
32
|
+
| 8 | **Close** | `gh issue close <N>` + set board **Done**. **Required** when `Closes #N` does NOT auto-fire (PRs that merge to a non-default branch don't trigger GitHub auto-close). |
|
|
33
|
+
| 9 | **Update kit (only if the change touched the plugin source)** | bump version (`/kit-dev ship`) + `/plugin update`. |
|
|
34
|
+
|
|
35
|
+
Report at the end: issue state, PR number + merged status, branch cleaned, board reflects Done.
|
|
36
|
+
|
|
37
|
+
## Hard rules
|
|
38
|
+
|
|
39
|
+
- **Don't ship blind.** If step 1 finds the issue ambiguous, large, or decision-heavy, stop and ask — this skill executes scoped work, it doesn't make product calls.
|
|
40
|
+
- **Never force-merge over pending CI.** Wait for the check. Only a *failing* (not pending) check stops the cycle — report it verbatim and stop.
|
|
41
|
+
- **Always close the issue manually** (step 8) when auto-close won't fire on the base branch. The board is the source of truth.
|
|
42
|
+
- **Always end on the base branch, clean.** Merged branch + worktree deleted; never leave the user on the feature branch.
|
|
43
|
+
- One issue → one PR. If scope balloons mid-implementation, stop and split rather than growing a monster PR.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kit-task-close
|
|
3
|
+
description: Close a GitHub issue after its PR merged. Sets the board Status to Done (if enabled). If the issue is a plan parent, flips the plan status to Complete once all deliverables are merged (no archive folder — completed plans stay visible).
|
|
4
|
+
when_to_use: After a PR merges, to finalize the issue ledger. Most issues auto-close from PR `Closes #N` — use this for issues without a PR or to backfill the plan status.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# kit-task-close
|
|
8
|
+
|
|
9
|
+
Plugin-direct skill — thin caller over the ONE canonical home
|
|
10
|
+
`${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-task-ops.sh` (`kto_task_close`) for the issue-close +
|
|
11
|
+
board-Done git-mechanic (kit-engine-boundary #1/#2). The optional plan-badge flip stays here (it
|
|
12
|
+
edits a repo file → needs a worktree/PR), wrapping the op. The op respects the `KIT_PROJECTS_V2`
|
|
13
|
+
board toggle.
|
|
14
|
+
|
|
15
|
+
## Preconditions
|
|
16
|
+
|
|
17
|
+
1. Issue has a merged PR (`Closes #N`) OR an explicit no-PR reason in the closing comment
|
|
18
|
+
2. If a plan file is linked, the file exists
|
|
19
|
+
|
|
20
|
+
If neither holds, **abort** and route to `/kit-task-pr` first.
|
|
21
|
+
|
|
22
|
+
## Inputs
|
|
23
|
+
|
|
24
|
+
| Field | Required | Notes |
|
|
25
|
+
| ------------ | -------- | ---------------------------------------------- |
|
|
26
|
+
| Issue number | ✓ | `123` or full URL |
|
|
27
|
+
| Summary | ✓ | 1–3 sentences — what was done, where it landed |
|
|
28
|
+
|
|
29
|
+
## Execution
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-config.sh" && load_kit_config
|
|
33
|
+
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/role-identity.sh"
|
|
34
|
+
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/gh-project.sh"
|
|
35
|
+
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-task-ops.sh"
|
|
36
|
+
|
|
37
|
+
kto_task_close "$NUM" "$SUMMARY"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
If a plan file is linked and all its deliverable PRs are merged, flip its status badge on a
|
|
41
|
+
worktree branch + PR (a repo change — never the main checkout; no archive folder, completed plans
|
|
42
|
+
stay visible):
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
if [[ "$KIT_PLANS_FORMAT" != "none" ]]; then
|
|
46
|
+
PLAN_FILE=$(gh issue view "$NUM" --repo "$KIT_REPO" --json body --jq .body \
|
|
47
|
+
| grep -oE "$KIT_PLANS_DIR/[a-zA-Z0-9_/-]+\.(md|mdx)" | head -1)
|
|
48
|
+
if [[ -n "$PLAN_FILE" && -f "$PLAN_FILE" ]]; then
|
|
49
|
+
ALL_MERGED=true
|
|
50
|
+
for pr in $(awk '/^##+ .*[Dd]eliverables/{f=1; next} f && /^## /{exit} f' "$PLAN_FILE" | grep -oE '#[0-9]+' | grep -oE '[0-9]+' | sort -u); do
|
|
51
|
+
[[ "$(gh pr view "$pr" --repo "$KIT_REPO" --json state -q .state 2>/dev/null)" != "MERGED" ]] && { ALL_MERGED=false; echo "⚠ PR #$pr not merged — plan stays Active"; break; }
|
|
52
|
+
done
|
|
53
|
+
if $ALL_MERGED; then
|
|
54
|
+
sed -i '' -e 's/^status: .*/status: Complete/' -e 's/status="Active"/status="Complete"/' "$PLAN_FILE" 2>/dev/null \
|
|
55
|
+
|| sed -i -e 's/^status: .*/status: Complete/' -e 's/status="Active"/status="Complete"/' "$PLAN_FILE"
|
|
56
|
+
echo "✓ Plan flipped to Complete: $PLAN_FILE — commit via /kit-task-pr"
|
|
57
|
+
fi
|
|
58
|
+
fi
|
|
59
|
+
fi
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Rules
|
|
63
|
+
|
|
64
|
+
- Never bypass the PR workflow — abort if no PR closed this issue and no explicit reason
|
|
65
|
+
- Never edit plan file content beyond the status flip · don't delete or move the plan file ·
|
|
66
|
+
don't reopen the issue afterward
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kit-task-new
|
|
3
|
+
description: Create a new GitHub issue — applies labels, milestone, and (if enabled) Projects v2 fields in one flow. Prefer this over raw `gh issue create` so the board stays in sync.
|
|
4
|
+
when_to_use: When the owner or a sub-agent identifies a new piece of work to track.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# kit-task-new
|
|
8
|
+
|
|
9
|
+
Plugin-direct skill — thin caller over the ONE canonical home
|
|
10
|
+
`${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-task-ops.sh` (`kto_task_new`). The verb logic lives there,
|
|
11
|
+
never inline here (kit-engine-boundary #1/#2). The op respects `KIT_BASE_BRANCH` (for the Plan blob
|
|
12
|
+
link) and the `KIT_PROJECTS_V2` board toggle.
|
|
13
|
+
|
|
14
|
+
## What it does
|
|
15
|
+
|
|
16
|
+
One flow → creates a GitHub issue **and** (if Projects v2 is enabled) adds it to the board with Role, Status (Todo), and Plan Link set. Reads project config from `.claude/kit.config.json`.
|
|
17
|
+
|
|
18
|
+
## Inputs (ask via AskUserQuestion when missing — do not invent)
|
|
19
|
+
|
|
20
|
+
| Field | Required | Notes |
|
|
21
|
+
| ---------- | -------- | --------------------------------------------- |
|
|
22
|
+
| Title | ✓ | Format: `[<role>] <imperative summary>` |
|
|
23
|
+
| Role | ✓ | One of the project's `roles` (see kit.config) |
|
|
24
|
+
| Kind | ✓ | task / plan / adr / scaffold / spike |
|
|
25
|
+
| Priority | ✓ | p1 / p2 / p3 |
|
|
26
|
+
| Milestone | ✓ | One of the project's `milestones` |
|
|
27
|
+
| Plan link | optional | Path under the project's plans dir |
|
|
28
|
+
| Blocked by | optional | `#N, #M` |
|
|
29
|
+
| Body | ✓ | Context + DoD checklist + acceptance |
|
|
30
|
+
|
|
31
|
+
Validate Kind/Priority/Role against the project's closed sets before dispatching — the op does not invent label families.
|
|
32
|
+
|
|
33
|
+
## Execution
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-config.sh" && load_kit_config
|
|
37
|
+
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/role-identity.sh"
|
|
38
|
+
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/gh-project.sh"
|
|
39
|
+
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-task-ops.sh"
|
|
40
|
+
|
|
41
|
+
kto_task_new "$TITLE" "$ROLE" "$KIND" "$PRIORITY" "$MILESTONE" "$PLAN_LINK" "$BLOCKED_BY" "$USER_BODY"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The function prints `✓ <issue-URL>` and echoes the new issue number.
|
|
45
|
+
|
|
46
|
+
## Rules
|
|
47
|
+
|
|
48
|
+
- Never file without confirming title + role + priority with the owner
|
|
49
|
+
- Never create new label families on the fly — validate against the project's closed sets; fail loudly if a kind/priority/role is unknown
|
|
50
|
+
- If the milestone doesn't exist, ask before creating it
|
|
51
|
+
- Always assign `@me` — the op does this
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kit-task-pr
|
|
3
|
+
description: Commit current changes, push the branch, open a PR with the right template, labels, milestone, and link to the parent issue (+ board if enabled).
|
|
4
|
+
when_to_use: When work on an issue branch is ready for review. Replaces ad-hoc `gh pr create`.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# kit-task-pr
|
|
8
|
+
|
|
9
|
+
Plugin-direct skill — thin caller over the ONE canonical home
|
|
10
|
+
`${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-task-ops.sh` (`kto_task_pr`). The verb logic lives there,
|
|
11
|
+
never inline here (kit-engine-boundary #1/#2). The op respects `KIT_BASE_BRANCH` (default `develop`)
|
|
12
|
+
and the `KIT_PROJECTS_V2` board toggle, so the same code serves any project.
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
|
|
16
|
+
| Field | Required | Notes |
|
|
17
|
+
| -------------- | -------- | ---------------------------------------------------------- |
|
|
18
|
+
| Issue number | ✓ | Derived from branch name `<kind>/<N>-<slug>` if not passed |
|
|
19
|
+
| Summary | ✓ | 1–3 bullets — the PR body's `## Summary` |
|
|
20
|
+
| Commit message | optional | Defaults to `<role>: <issue title>` |
|
|
21
|
+
|
|
22
|
+
Ask via `AskUserQuestion` when the Summary is missing — never invent it.
|
|
23
|
+
|
|
24
|
+
## Execution
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-config.sh" && load_kit_config
|
|
28
|
+
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/role-identity.sh"
|
|
29
|
+
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/gh-project.sh"
|
|
30
|
+
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-task-ops.sh"
|
|
31
|
+
|
|
32
|
+
kto_task_pr "" "$SUMMARY" # issue # parsed from the branch
|
|
33
|
+
# kto_task_pr 173 "$SUMMARY" "tech-lead: admin Clerk sign-in" # explicit
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The function prints `✓ <PR-URL>`.
|
|
37
|
+
|
|
38
|
+
## Rules
|
|
39
|
+
|
|
40
|
+
- Never open a PR for a branch off the `<kind>/<N>-<slug>` convention — the op aborts with instructions
|
|
41
|
+
- Never invent a Summary — ask if missing (the op refuses an empty Summary) · never push to the base branch directly
|
|
42
|
+
- PR mirrors issue labels · if no milestone, the op omits it (no block)
|
|
43
|
+
- If `gh pr create` fails because the branch hasn't diverged, the op surfaces the error verbatim (likely forgot to commit)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kit-task-pr-auto
|
|
3
|
+
description: Same as kit-task-pr (commit, push, open PR) then immediately attempts to merge via kit-task-pr-merge. One command to land a branch end-to-end.
|
|
4
|
+
when_to_use: When work is ready to ship without a separate review step.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# kit-task-pr-auto
|
|
8
|
+
|
|
9
|
+
Runs `/kit-task-pr` then `/kit-task-pr-merge` back-to-back.
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
Same as `kit-task-pr` — see `${CLAUDE_PLUGIN_ROOT}/skills/kit-task-pr/SKILL.md`.
|
|
14
|
+
|
|
15
|
+
## Execution
|
|
16
|
+
|
|
17
|
+
1. Execute the full `kit-task-pr` flow, capturing the PR URL/number.
|
|
18
|
+
2. Immediately execute the full `kit-task-pr-merge` flow using that PR number.
|
|
19
|
+
|
|
20
|
+
If the PR can't be merged immediately (draft, checks pending, conflicts), report the blocker and stop — do not loop or retry silently.
|
|
21
|
+
|
|
22
|
+
## Rules
|
|
23
|
+
|
|
24
|
+
- Inherits all rules from `kit-task-pr` and `kit-task-pr-merge`
|
|
25
|
+
- If `kit-task-pr` fails, stop — do not attempt merge
|
|
26
|
+
- If merge fails due to conflicts, attempt the rebase fix from `kit-task-pr-merge` before giving up
|
|
27
|
+
- Always end on the base branch with a clean pull on success
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kit-task-pr-merge
|
|
3
|
+
description: Squash-merge the open PR for the current branch, switch to the base branch, and pull. Auto-rebases onto the base if conflicts are detected.
|
|
4
|
+
when_to_use: When work on an issue branch is ready to land. Always run after `/kit-task-pr`.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# kit-task-pr-merge
|
|
8
|
+
|
|
9
|
+
Plugin-direct skill — thin caller over the ONE canonical home
|
|
10
|
+
`${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-task-ops.sh` (`kto_task_pr_merge`). The verb logic lives
|
|
11
|
+
there, never inline here (kit-engine-boundary #1/#2). The op respects `KIT_BASE_BRANCH` (default
|
|
12
|
+
`develop`) and closes the PR's linked issues (native auto-close only fires on the default branch).
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
|
|
16
|
+
| Field | Required | Notes |
|
|
17
|
+
| --------- | -------- | ---------------------------------------------- |
|
|
18
|
+
| PR number | optional | Defaults to the open PR for the current branch |
|
|
19
|
+
|
|
20
|
+
## Execution
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-config.sh" && load_kit_config
|
|
24
|
+
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/role-identity.sh"
|
|
25
|
+
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/gh-project.sh"
|
|
26
|
+
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-task-ops.sh"
|
|
27
|
+
|
|
28
|
+
kto_task_pr_merge # open PR for the current branch
|
|
29
|
+
# kto_task_pr_merge 845 # an explicit PR number
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
After it returns on the base branch, run the kit-sync drift check (advisory; never blocks):
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
MAIN_WT=$(git worktree list --porcelain | awk '/^worktree /{print $2; exit}')
|
|
36
|
+
KIT_TOUCHED=$(git -C "$MAIN_WT" show --name-only --pretty=format: HEAD 2>/dev/null \
|
|
37
|
+
| grep -E '^(scripts/(lib/|kit$|kit-)|\.claude/(skills|rules|hooks|lib|agents)/)' | sort -u || true)
|
|
38
|
+
if [[ -n "$KIT_TOUCHED" ]]; then
|
|
39
|
+
echo ""
|
|
40
|
+
echo "⚠ kit-sync: this change touched kit-managed files — review for upstream (/kit-contribute):"
|
|
41
|
+
printf ' %s\n' $KIT_TOUCHED
|
|
42
|
+
echo " kit ⇄ project must stay in sync; an un-upstreamed change can be clobbered by /kit-update."
|
|
43
|
+
fi
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Rules
|
|
47
|
+
|
|
48
|
+
- Never merge a DRAFT PR — undraft first
|
|
49
|
+
- Never force-push to the base branch
|
|
50
|
+
- If rebase conflicts can't auto-resolve, the op aborts cleanly and surfaces the conflicting files
|
|
51
|
+
- If merge fails for a non-conflict reason (failing checks), the op reports verbatim and does not retry
|
|
52
|
+
- The op always ends on the base branch with a clean pull on success, and always cleans up the merged branch + worktree
|
|
53
|
+
- Never delete a branch that still has an open PR or unpushed commits not on the base branch's remote
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kit-task-start
|
|
3
|
+
description: Start work on a GitHub issue — branch from the base branch (optionally an isolated worktree associated with the issue), mark the issue In Progress on the board (if enabled), switch to the branch.
|
|
4
|
+
when_to_use: When beginning work on a tracked issue. Always run before editing files. Replaces ad-hoc `git checkout -b`.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# kit-task-start
|
|
8
|
+
|
|
9
|
+
Plugin-direct skill — runs straight from `${CLAUDE_PLUGIN_ROOT}` (no per-project `scripts/`
|
|
10
|
+
checkout needed). Helpers are sourced from the plugin; repo state (`gh`, `git`, the board) is
|
|
11
|
+
the project you're standing in. Reads `.claude/kit.config.json` from the working directory.
|
|
12
|
+
|
|
13
|
+
## Inputs
|
|
14
|
+
|
|
15
|
+
| Field | Required | Notes |
|
|
16
|
+
| ------------ | -------- | ----------------------------------------------------------- |
|
|
17
|
+
| Issue number | ✓ | `123` |
|
|
18
|
+
| Slug | optional | Short kebab suffix; defaults to a slug of the issue title |
|
|
19
|
+
| `--worktree` | optional | Isolated worktree instead of switching the main tree. **Required for parallel / sub-agent work.** Dir `<kind>+<N>-<slug>` encodes issue **#N**, so `kit-gc` won't wipe it while the issue is open. |
|
|
20
|
+
|
|
21
|
+
Read the issue to derive the **kind** label — the branch prefix matches it.
|
|
22
|
+
|
|
23
|
+
## Execution
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-config.sh" && load_kit_config
|
|
27
|
+
[[ "$KIT_PROJECTS_V2" == "true" ]] && { source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/gh-project.sh"; load_project_ids; }
|
|
28
|
+
BASE="${KIT_BASE_BRANCH:-main}" # branch off the integration branch (override per project)
|
|
29
|
+
|
|
30
|
+
NUM=""; SLUG_OVERRIDE=""; WORKTREE=0
|
|
31
|
+
for a in "$@"; do
|
|
32
|
+
case "$a" in
|
|
33
|
+
--worktree) WORKTREE=1 ;;
|
|
34
|
+
*) [[ -z "$NUM" ]] && NUM="$a" || SLUG_OVERRIDE="$a" ;;
|
|
35
|
+
esac
|
|
36
|
+
done
|
|
37
|
+
META=$(gh issue view "$NUM" --repo "$KIT_REPO" --json title,labels,projectItems)
|
|
38
|
+
TITLE=$(echo "$META" | jq -r .title)
|
|
39
|
+
KIND=$(echo "$META" | jq -r '.labels[].name' | grep '^kind:' | head -1 | cut -d: -f2)
|
|
40
|
+
[[ -z "$KIND" ]] && KIND="task"
|
|
41
|
+
|
|
42
|
+
if [[ -n "$SLUG_OVERRIDE" ]]; then SLUG="$SLUG_OVERRIDE"; else
|
|
43
|
+
SLUG=$(echo "$TITLE" | sed -E 's/^\[[^]]+\][[:space:]]*//' \
|
|
44
|
+
| tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9]+/-/g; s/^-|-$//g' | cut -c1-40)
|
|
45
|
+
fi
|
|
46
|
+
BRANCH="$KIND/$NUM-$SLUG"
|
|
47
|
+
|
|
48
|
+
git fetch origin "$BASE" --quiet
|
|
49
|
+
if [[ "$WORKTREE" -eq 1 ]]; then
|
|
50
|
+
# Worktree dir encodes the issue: <kind>+<N>-<slug> -> kit-gc protects it while #N is open.
|
|
51
|
+
WT_DIR=".claude/worktrees/${KIND}+${NUM}-${SLUG}"
|
|
52
|
+
if git worktree list --porcelain | grep -q "/${KIND}+${NUM}-${SLUG}$"; then
|
|
53
|
+
echo "✓ Worktree already exists: $WT_DIR (branch $BRANCH)"
|
|
54
|
+
else
|
|
55
|
+
git worktree add -B "$BRANCH" "$WT_DIR" "origin/$BASE"
|
|
56
|
+
fi
|
|
57
|
+
echo "→ cd $WT_DIR # work happens here; one branch per worktree"
|
|
58
|
+
else
|
|
59
|
+
[[ -n "$(git status --porcelain)" ]] && { echo "✗ Working tree not clean — or use --worktree."; exit 1; }
|
|
60
|
+
git checkout -B "$BRANCH" "origin/$BASE"
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
if [[ "$KIT_PROJECTS_V2" == "true" ]]; then
|
|
64
|
+
ITEM_ID=$(echo "$META" | jq -r --arg t "$KIT_PROJECT_TITLE" '.projectItems[]? | select(.title==$t) | .id')
|
|
65
|
+
[[ -n "$ITEM_ID" ]] && project_set_single_select "$ITEM_ID" "$STATUS_FIELD_ID" "$STATUS_OPT_IN_PROGRESS"
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
echo "✓ Branch $BRANCH (from $BASE) — issue #$NUM In Progress"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Rules
|
|
72
|
+
|
|
73
|
+
- Never start from a non-base branch (trunk-based) · never start with a dirty tree (in-place mode) — or use `--worktree`
|
|
74
|
+
- **Parallel / sub-agent work MUST use `--worktree`** — one branch per worktree, never share a checkout. The worktree↔issue association keeps `kit-gc` from wiping in-progress work.
|
|
75
|
+
- If the issue has no `role:` label, fail loudly and ask for triage
|
|
76
|
+
- Never skip the board status update when Projects v2 is enabled
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kit-task-sync
|
|
3
|
+
description: Query GitHub issues (+ Projects v2 if enabled) and print a status table grouped by Role. Flags blocked items and items missing a board entry.
|
|
4
|
+
when_to_use: "What's the state of work?", "what's blocked?", "show me the board", or the start of any chapter that needs current ground truth instead of a stale snapshot.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# kit-task-sync
|
|
8
|
+
|
|
9
|
+
Plugin-direct skill — the script resolves from `${CLAUDE_PLUGIN_ROOT}`.
|
|
10
|
+
|
|
11
|
+
## What it does
|
|
12
|
+
|
|
13
|
+
Runs `${CLAUDE_PLUGIN_ROOT}/scripts/task-sync.sh` — pure bash over `gh` CLI + jq. Reads
|
|
14
|
+
`.claude/kit.config.json` (from the working directory) for the repo and board. Read-only —
|
|
15
|
+
never mutates state.
|
|
16
|
+
|
|
17
|
+
## Execution
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
"${CLAUDE_PLUGIN_ROOT}/scripts/task-sync.sh" [--role <Name>] [--milestone <label>]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Output format
|
|
24
|
+
|
|
25
|
+
Markdown table grouped by Role, sorted by Status (In Progress → Blocked → Todo → In Review → Done within 7 days), followed by:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
**Blocked:** none ✓
|
|
29
|
+
**No board entry:** none ✓
|
|
30
|
+
**Stale (>14 days):** none ✓
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Rules
|
|
34
|
+
|
|
35
|
+
- Pure read — never mutate
|
|
36
|
+
- If `scripts/.project-ids.env` is missing and Projects v2 is enabled, prompt to run `${CLAUDE_PLUGIN_ROOT}/scripts/capture-project-ids.sh`
|
|
37
|
+
- bash 3.2+ compatible (macOS system bash)
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
> Scaffolded by [claude-kit](https://github.com/tuempresadigital/claude-kit) — profile `{{PROFILE}}`.
|
|
4
|
+
> Project config lives in `.claude/kit.config.json`. Edit freely; this file is yours now.
|
|
5
|
+
|
|
6
|
+
<!-- IF:MEMORY -->
|
|
7
|
+
## MANDATORY — Session Start Protocol
|
|
8
|
+
|
|
9
|
+
**Do this before answering anything else:**
|
|
10
|
+
|
|
11
|
+
1. Call `mempalace_status` — loads the MemPalace overview and recent decisions
|
|
12
|
+
2. If the user's first message mentions a specific topic, call `mempalace_search "<topic>" wing={{WING}}`
|
|
13
|
+
|
|
14
|
+
Skip only if the message is a pure file lookup with no decision context needed.
|
|
15
|
+
<!-- /IF:MEMORY -->
|
|
16
|
+
|
|
17
|
+
## Agents
|
|
18
|
+
|
|
19
|
+
Spawn the matching agent for any domain task — do not answer domain decisions from the orchestrator level.
|
|
20
|
+
|
|
21
|
+
{{AGENT_TABLE}}
|
|
22
|
+
|
|
23
|
+
Agent definitions: `.claude/agents/<name>/AGENT.md`.
|
|
24
|
+
|
|
25
|
+
## Skills
|
|
26
|
+
|
|
27
|
+
{{SKILL_TABLE}}
|
|
28
|
+
|
|
29
|
+
Invoke a skill when the user types `/<skill-name>` or when its `when_to_use` matches.
|
|
30
|
+
|
|
31
|
+
<!-- IF:STACK_SKILLS -->
|
|
32
|
+
## Stack conventions (auto-applying skills)
|
|
33
|
+
|
|
34
|
+
Build conventions are **stack-gated skills** — each applies **only when its technology is in this
|
|
35
|
+
project's `package.json`**. Before building features, check which apply:
|
|
36
|
+
|
|
37
|
+
- `feature-build-refine` — when **RefineDev** (`@refinedev/*`) is present
|
|
38
|
+
- `supabase-patterns` — when **Supabase** (`@supabase/supabase-js`) is present
|
|
39
|
+
|
|
40
|
+
If the matching technology isn't in the stack, the skill simply doesn't apply. Add more per
|
|
41
|
+
technology the same way. None are mandatory across the board.
|
|
42
|
+
<!-- /IF:STACK_SKILLS -->
|
|
43
|
+
|
|
44
|
+
<!-- IF:SPECKIT -->
|
|
45
|
+
## Spec-driven development (Spec Kit)
|
|
46
|
+
|
|
47
|
+
This project uses **Spec Kit** for feature work. Build through the SDD lifecycle with review gates:
|
|
48
|
+
|
|
49
|
+
`/speckit-specify → /speckit-clarify → /speckit-plan → /speckit-tasks → /speckit-analyze → /speckit-implement`
|
|
50
|
+
|
|
51
|
+
Run `/speckit-constitution` once per project. The `speckit` skill installs/identifies Spec Kit and
|
|
52
|
+
explains the lifecycle.<!-- IF:STACK_SKILLS --> Any stack convention skill that matches the stack
|
|
53
|
+
becomes the Spec Kit `feature-module.md` override.<!-- /IF:STACK_SKILLS --> Pick one branch authority
|
|
54
|
+
— Spec Kit's git extension OR the kit's `task-*` skills — not both.
|
|
55
|
+
<!-- /IF:SPECKIT -->
|
|
56
|
+
|
|
57
|
+
## Task management
|
|
58
|
+
|
|
59
|
+
- **Source of truth:** GitHub issues<!-- IF:PROJECTS_V2 --> + Projects v2 board (`https://github.com/users/{{GH_OWNER}}/projects/{{PROJECT_NUMBER}}`)<!-- /IF:PROJECTS_V2 -->
|
|
60
|
+
- Repo: `{{GH_REPO}}`
|
|
61
|
+
- **Never** maintain task lists in markdown — use `gh issue` + the `task-*` skills
|
|
62
|
+
- Milestones: {{MILESTONES_HUMAN}}
|
|
63
|
+
<!-- IF:PLANS -->
|
|
64
|
+
- Plans live in `{{PLANS_DIR}}` (format: `{{PLANS_FORMAT}}`) — see `.claude/rules/plan-output-format.md`
|
|
65
|
+
<!-- /IF:PLANS -->
|
|
66
|
+
|
|
67
|
+
## PR workflow
|
|
68
|
+
|
|
69
|
+
Every issue lands on `main` through a Pull Request. No direct commits to `main`.
|
|
70
|
+
|
|
71
|
+
| Step | Skill | What it does |
|
|
72
|
+
| ----------------- | ------------------ | ------------------------------------------------------- |
|
|
73
|
+
| 1. Pick an issue | `/kit-task-sync` | See the open board, choose what's unblocked |
|
|
74
|
+
| 2. Start work | `/kit-task-start <N>` | Branch `<kind>/<N>-<slug>` from main + mark In Progress |
|
|
75
|
+
| 3. Do the work | — | Code, write plans, etc. |
|
|
76
|
+
| 4. Open PR | `/kit-task-pr <N>` | Commit + push + open PR with template/labels/milestone |
|
|
77
|
+
| 5. Review + merge | `/kit-task-pr-merge` | Squash-merge PR, switch to main, pull |
|
|
78
|
+
| 6. Close | `/kit-task-close <N>` | Close issue (auto on `Closes #N`) + archive plan |
|
|
79
|
+
|
|
80
|
+
### Branch naming
|
|
81
|
+
|
|
82
|
+
`<kind>/<issue-number>-<slug>` — kinds: `task`, `plan`, `adr`, `scaffold`, `spike`.
|
|
83
|
+
|
|
84
|
+
### PR conventions
|
|
85
|
+
|
|
86
|
+
- Title = exact issue title · Body includes `Closes #N`
|
|
87
|
+
- Labels + milestone inherited from the issue · One PR per issue (coupled migration chains group into one) · Squash merge, linear history
|
|
88
|
+
|
|
89
|
+
## Rules
|
|
90
|
+
|
|
91
|
+
- Keep this file tight — point to files, don't duplicate content.
|
|
92
|
+
- Bullets and tables preferred. No long intros.
|
|
93
|
+
- Communication style → `.claude/rules/communication-style.md`
|
|
94
|
+
<!-- IF:DESIGN -->
|
|
95
|
+
- All design + adjustment questions → Designer agent (`.claude/rules/design-routing.md`)
|
|
96
|
+
<!-- /IF:DESIGN -->
|
|
97
|
+
<!-- IF:PLANS -->
|
|
98
|
+
- Plan output format → `.claude/rules/plan-output-format.md`
|
|
99
|
+
<!-- /IF:PLANS -->
|
|
100
|
+
<!-- IF:MEMORY -->
|
|
101
|
+
- Persistent memory protocol → `.claude/rules/mempalace.md`
|
|
102
|
+
<!-- /IF:MEMORY -->
|
|
103
|
+
|
|
104
|
+
## Language
|
|
105
|
+
|
|
106
|
+
Default working language: {{COMMS_LANG}}. Match the language {{OWNER_NAME}} uses.
|