@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.
Files changed (191) hide show
  1. package/.claude-plugin/plugin.json +22 -0
  2. package/AGENTS.md +101 -0
  3. package/LICENSE-APACHE +202 -0
  4. package/LICENSE-MIT +21 -0
  5. package/README.md +143 -0
  6. package/SECURITY.md +22 -0
  7. package/bin/cckit +215 -0
  8. package/cckit.config.json +34 -0
  9. package/commands/kit-add.md +42 -0
  10. package/commands/kit-docs.md +45 -0
  11. package/commands/kit-doctor.md +52 -0
  12. package/commands/kit-export-project.md +58 -0
  13. package/commands/kit-export-training.md +49 -0
  14. package/commands/kit-init.md +126 -0
  15. package/commands/kit-routines.md +59 -0
  16. package/commands/kit-update.md +132 -0
  17. package/docs/kit-annotate/01-explainer.html +225 -0
  18. package/docs/kit-annotate/02-implementation-plan.html +196 -0
  19. package/docs/media/.onboarding-capture.cast +5 -0
  20. package/docs/media/README.md +43 -0
  21. package/docs/media/build-demo.sh +63 -0
  22. package/docs/media/build-kit-init.sh +51 -0
  23. package/docs/media/build-onboarding.sh +51 -0
  24. package/docs/media/kit-dry-run.cast +107 -0
  25. package/docs/media/kit-dry-run.gif +0 -0
  26. package/docs/media/kit-init.cast +56 -0
  27. package/docs/media/kit-init.gif +0 -0
  28. package/docs/media/kit-onboarding.cast +148 -0
  29. package/docs/media/kit-onboarding.gif +0 -0
  30. package/githooks/pre-commit +18 -0
  31. package/kit.config.schema.json +105 -0
  32. package/package.json +54 -0
  33. package/privacy-denylist.example +8 -0
  34. package/profiles/automation.json +36 -0
  35. package/profiles/content.json +41 -0
  36. package/profiles/minimal.json +31 -0
  37. package/profiles/research.json +37 -0
  38. package/profiles/software.json +32 -0
  39. package/scripts/annotate-setup.sh +149 -0
  40. package/scripts/autopilot.sh +50 -0
  41. package/scripts/capture-project-ids.sh +53 -0
  42. package/scripts/check.sh +66 -0
  43. package/scripts/contribute.sh +48 -0
  44. package/scripts/debug.sh +54 -0
  45. package/scripts/init-upgrade-test.sh +99 -0
  46. package/scripts/init.sh +827 -0
  47. package/scripts/install.sh +24 -0
  48. package/scripts/kit-add-test.sh +62 -0
  49. package/scripts/kit-add.sh +115 -0
  50. package/scripts/kit-adopt-test.sh +61 -0
  51. package/scripts/kit-adopt.sh +122 -0
  52. package/scripts/kit-bump-version.sh +79 -0
  53. package/scripts/kit-digest.sh +126 -0
  54. package/scripts/kit-doctor.sh +663 -0
  55. package/scripts/kit-export-project-test.sh +82 -0
  56. package/scripts/kit-export-project.sh +245 -0
  57. package/scripts/kit-export-training-test.sh +51 -0
  58. package/scripts/kit-export-training.sh +175 -0
  59. package/scripts/kit-migrate-test.sh +80 -0
  60. package/scripts/kit-migrate.sh +190 -0
  61. package/scripts/kit-onboard-test.sh +63 -0
  62. package/scripts/kit-onboard.sh +69 -0
  63. package/scripts/kit-promote-test.sh +54 -0
  64. package/scripts/kit-promote.sh +102 -0
  65. package/scripts/kit-remove-test.sh +61 -0
  66. package/scripts/kit-remove.sh +84 -0
  67. package/scripts/kit-routines.sh +322 -0
  68. package/scripts/kit-version-check.sh +91 -0
  69. package/scripts/kit-wire-test.sh +54 -0
  70. package/scripts/kit-wire.sh +132 -0
  71. package/scripts/knowledge-lint.sh +96 -0
  72. package/scripts/lib/cckit-output.sh +36 -0
  73. package/scripts/lib/effort-metrics.sh +452 -0
  74. package/scripts/lib/effort-ops-test.sh +83 -0
  75. package/scripts/lib/effort-ops.sh +132 -0
  76. package/scripts/lib/effort-plan.sh +104 -0
  77. package/scripts/lib/effort.sh +191 -0
  78. package/scripts/lib/engine-adapter.sh +92 -0
  79. package/scripts/lib/gh-log.sh +58 -0
  80. package/scripts/lib/gh-project.sh +212 -0
  81. package/scripts/lib/handoff.sh +35 -0
  82. package/scripts/lib/kit-cli-test.sh +42 -0
  83. package/scripts/lib/kit-cli.sh +32 -0
  84. package/scripts/lib/kit-config-resolve.sh +145 -0
  85. package/scripts/lib/kit-config.sh +88 -0
  86. package/scripts/lib/kit-engine-test.sh +107 -0
  87. package/scripts/lib/kit-events.sh +62 -0
  88. package/scripts/lib/kit-gc.sh +117 -0
  89. package/scripts/lib/kit-interview-test.sh +77 -0
  90. package/scripts/lib/kit-interview.sh +203 -0
  91. package/scripts/lib/kit-local.sh +79 -0
  92. package/scripts/lib/kit-manifest.sh +127 -0
  93. package/scripts/lib/kit-mode-test.sh +49 -0
  94. package/scripts/lib/kit-mode.sh +67 -0
  95. package/scripts/lib/kit-operate.sh +105 -0
  96. package/scripts/lib/kit-profile-test.sh +62 -0
  97. package/scripts/lib/kit-profile.sh +115 -0
  98. package/scripts/lib/kit-task-ops-test.sh +63 -0
  99. package/scripts/lib/kit-task-ops.sh +341 -0
  100. package/scripts/lib/pr-evidence.sh +173 -0
  101. package/scripts/lib/project-scan.sh +16 -0
  102. package/scripts/lib/react-detect.sh +78 -0
  103. package/scripts/lib/role-identity.sh +47 -0
  104. package/scripts/lib/secret-guard.sh +96 -0
  105. package/scripts/lib/toon.sh +35 -0
  106. package/scripts/lib/ui.sh +42 -0
  107. package/scripts/lib/version-bump.sh +59 -0
  108. package/scripts/lib/worktree-issue-test.sh +45 -0
  109. package/scripts/lib/worktree-issue.sh +73 -0
  110. package/scripts/lib/worktree-start.sh +280 -0
  111. package/scripts/orchestrate.sh +160 -0
  112. package/scripts/portable-test.sh +53 -0
  113. package/scripts/publish.sh +94 -0
  114. package/scripts/setup-labels.sh +25 -0
  115. package/scripts/setup-milestones.sh +17 -0
  116. package/scripts/showcase.sh +64 -0
  117. package/scripts/status.sh +44 -0
  118. package/scripts/task-sync.sh +59 -0
  119. package/scripts/test.sh +48 -0
  120. package/scripts/web-install.sh +22 -0
  121. package/skills/kit-annotate/SKILL.md +107 -0
  122. package/skills/kit-autopilot/SKILL.md +108 -0
  123. package/skills/kit-contribute/SKILL.md +134 -0
  124. package/skills/kit-customize/SKILL.md +134 -0
  125. package/skills/kit-dev/SKILL.md +67 -0
  126. package/skills/kit-digest/SKILL.md +41 -0
  127. package/skills/kit-effort-close/SKILL.md +156 -0
  128. package/skills/kit-effort-new/SKILL.md +173 -0
  129. package/skills/kit-effort-pr/SKILL.md +139 -0
  130. package/skills/kit-effort-start/SKILL.md +85 -0
  131. package/skills/kit-gc/SKILL.md +80 -0
  132. package/skills/kit-onboard/SKILL.md +50 -0
  133. package/skills/kit-security-sweep/SKILL.md +57 -0
  134. package/skills/kit-ship/SKILL.md +43 -0
  135. package/skills/kit-task-close/SKILL.md +66 -0
  136. package/skills/kit-task-new/SKILL.md +51 -0
  137. package/skills/kit-task-pr/SKILL.md +43 -0
  138. package/skills/kit-task-pr-auto/SKILL.md +27 -0
  139. package/skills/kit-task-pr-merge/SKILL.md +53 -0
  140. package/skills/kit-task-start/SKILL.md +76 -0
  141. package/skills/kit-task-sync/SKILL.md +37 -0
  142. package/templates/CLAUDE.md.tmpl +106 -0
  143. package/templates/agents/analyst.md +55 -0
  144. package/templates/agents/auto-dev.md +93 -0
  145. package/templates/agents/backend.md +59 -0
  146. package/templates/agents/designer.md +73 -0
  147. package/templates/agents/devops.md +57 -0
  148. package/templates/agents/editor.md +48 -0
  149. package/templates/agents/frontend.md +81 -0
  150. package/templates/agents/generalist.md +46 -0
  151. package/templates/agents/local-delegate.md +70 -0
  152. package/templates/agents/n8n.md +65 -0
  153. package/templates/agents/pm.md +69 -0
  154. package/templates/agents/qa.md +66 -0
  155. package/templates/agents/researcher.md +57 -0
  156. package/templates/agents/security.md +65 -0
  157. package/templates/agents/tech-lead.md +75 -0
  158. package/templates/hooks/guard-base-branch-commit.sh.tmpl +45 -0
  159. package/templates/hooks/kit-local-status.sh.tmpl +34 -0
  160. package/templates/hooks/kit_version_check.sh.tmpl +6 -0
  161. package/templates/hooks/mempal_followup.sh.tmpl +97 -0
  162. package/templates/hooks/mempal_precompact.sh.tmpl +4 -0
  163. package/templates/hooks/mempal_save.sh.tmpl +4 -0
  164. package/templates/hooks/mempal_session_start.sh.tmpl +8 -0
  165. package/templates/hooks/prepush_gate.sh.tmpl +36 -0
  166. package/templates/hooks/repo-hygiene.sh.tmpl +72 -0
  167. package/templates/kit.config.json.tmpl +32 -0
  168. package/templates/knowledge-INDEX.md.tmpl +12 -0
  169. package/templates/lib/kit-sigil.sh.tmpl +124 -0
  170. package/templates/rules/branch-naming.md +104 -0
  171. package/templates/rules/communication-style.md +22 -0
  172. package/templates/rules/delegation-brief.md +40 -0
  173. package/templates/rules/design-routing.md +35 -0
  174. package/templates/rules/effort-model.md +122 -0
  175. package/templates/rules/knowledge-base.md +41 -0
  176. package/templates/rules/mempalace.md +110 -0
  177. package/templates/rules/plan-output-format.md +58 -0
  178. package/templates/rules/react-annotate.md +69 -0
  179. package/templates/rules/risk-tiered-review.md +62 -0
  180. package/templates/rules/skill-gaps.md +48 -0
  181. package/templates/rules/task-management.md +42 -0
  182. package/templates/settings/settings.local.json.tmpl +27 -0
  183. package/templates/skills/NAMESPACED +13 -0
  184. package/templates/skills/copywriting/SKILL.md +252 -0
  185. package/templates/skills/copywriting/references/copy-frameworks.md +344 -0
  186. package/templates/skills/copywriting/references/natural-transitions.md +272 -0
  187. package/templates/skills/feature-build-refine/SKILL.md +367 -0
  188. package/templates/skills/karpathy-guidelines/SKILL.md +69 -0
  189. package/templates/skills/morning-briefing/SKILL.md +46 -0
  190. package/templates/skills/speckit/SKILL.md +239 -0
  191. package/templates/skills/supabase-patterns/SKILL.md +88 -0
package/bin/cckit ADDED
@@ -0,0 +1,215 @@
1
+ #!/usr/bin/env bash
2
+ # cckit — the CLI dispatcher. A thin bash front-end over the git-mechanics bundle (scripts/lib).
3
+ # Agent-agnostic: every verb runs from a shell; append --llm for machine-readable output.
4
+ # Driven entirely from cckit.config.json — no org/repo is hardcoded. See AGENTS.md.
5
+ #
6
+ # Usage:
7
+ # cckit resume: print the last session's resume-here handoff
8
+ # cckit handoff "<note>" save a resume-here note for the next session
9
+ # cckit install [bin-dir] symlink cckit onto your PATH (global install)
10
+ # cckit init --profile <p> scaffold cckit.config.json + .claude/ (--profile required)
11
+ # cckit start <issue> [slug] isolated worktree + branch for an issue
12
+ # cckit pr <issue> <summary> commit + push + open the PR
13
+ # cckit close <issue> <summary> close issue + mark done
14
+ # cckit contribute "<summary>" open a contribution PR to cckit, gated on scripts/check.sh
15
+ # cckit sync [--llm] board state / what's unblocked
16
+ # cckit effort <new|start|pr|close|plan> the effort lifecycle
17
+ # cckit orchestrate <a> <b> … run N flows in parallel worktrees (--dry-run/--cap/--agent)
18
+ # cckit autopilot [<a> …] unattended multi-flow: drive (or auto-pick) issues under a cap
19
+ # cckit gc [--prune [--yes]] report (default) or prune merged branches + worktrees
20
+ # cckit status thin dashboard: board + worktrees + resume handoff
21
+ # cckit scan [--llm] detect this repo's stack + kit state (JSON)
22
+ # cckit debug [--check] <args> optional browser-debug via chrome-devtools-axi (auto-detected)
23
+ # cckit encode-context stdin JSON -> compact TOON (uniform arrays; JSON fallback)
24
+ # cckit doctor onboarding preflight (deps, gh auth)
25
+ # cckit update check whether this project is behind the installed cckit
26
+ # cckit migrate reshuffle an old kit layout to the current one
27
+ # cckit adopt record kit-shaped files a repo already has into the manifest
28
+ # cckit digest <path|url> summarize a file or URL (local model)
29
+ # cckit release <ver> [--publish] cut a release (dry-run by default)
30
+ # cckit version [--llm] the installed cckit version
31
+ # cckit commands [--llm] list every verb (the command catalog)
32
+ # cckit completions [bash|zsh] print a shell-completion script to source
33
+ # cckit help
34
+ set -eu
35
+
36
+ # Resolve this script through symlinks — Homebrew and scripts/install.sh link bin/cckit onto
37
+ # PATH, so $0 may be a symlink; follow it to find the real repo root (where scripts/lib lives).
38
+ SOURCE="${BASH_SOURCE[0]:-$0}"
39
+ while [ -h "$SOURCE" ]; do
40
+ _dir="$(cd -P "$(dirname "$SOURCE")" && pwd)"
41
+ SOURCE="$(readlink "$SOURCE")"
42
+ case "$SOURCE" in /*) ;; *) SOURCE="$_dir/$SOURCE" ;; esac
43
+ done
44
+ BIN="$(cd -P "$(dirname "$SOURCE")" && pwd)"
45
+ ROOT="$(cd "$BIN/.." && pwd)"
46
+ LIB="$ROOT/scripts/lib"
47
+
48
+ # Resolve the PROJECT config from the directory cckit was invoked in (walk upward for
49
+ # cckit.config.json, or .claude/kit.config.json), so board/lifecycle verbs act on the project you
50
+ # ran cckit in — NOT cckit's own install dir. Running inside the cckit repo resolves to its own
51
+ # cckit.config.json naturally (self-hosting); outside any project we fall back to cckit's config.
52
+ # An explicit KIT_CONFIG in the environment always wins.
53
+ _cckit_find_config() {
54
+ local d="$1"
55
+ while [ -n "$d" ] && [ "$d" != "/" ]; do
56
+ [ -f "$d/cckit.config.json" ] && { printf '%s\n' "$d/cckit.config.json"; return 0; }
57
+ [ -f "$d/.claude/kit.config.json" ] && { printf '%s\n' "$d/.claude/kit.config.json"; return 0; }
58
+ d="$(dirname "$d")"
59
+ done
60
+ return 1
61
+ }
62
+ if [ -z "${KIT_CONFIG:-}" ]; then
63
+ KIT_CONFIG="$(_cckit_find_config "$PWD" || true)"
64
+ [ -n "$KIT_CONFIG" ] || KIT_CONFIG="$ROOT/cckit.config.json"
65
+ fi
66
+ export KIT_CONFIG
67
+ # No `cd "$ROOT"`: cckit's own files are referenced via absolute $ROOT/$LIB/$BIN paths, while
68
+ # project verbs (sync/start/pr/close/gc/scan/status/effort/…) must run in the invoking directory.
69
+ # Verbs that act on cckit itself (release, contribute) cd into $ROOT locally below.
70
+
71
+ # Structured-output helpers (cckit_is_json / cckit_json) — wired into every verb below.
72
+ # shellcheck source=/dev/null
73
+ source "$LIB/cckit-output.sh"
74
+ # Terminal ergonomics (color/tty gating, optional glow/fzf) — detect-or-fallback, never required.
75
+ # shellcheck source=/dev/null
76
+ source "$LIB/ui.sh"
77
+
78
+ usage() { sed -n '/^# Usage:/,/^[^#]/p' "$BIN/cckit" | sed '1d;$d;s/^# \{0,1\}//'; }
79
+
80
+ # --llm flag → structured output (parsed by agents). Strip it from positional args, export a flag.
81
+ CCKIT_OUTPUT="human"
82
+ args=()
83
+ for a in "$@"; do
84
+ case "$a" in
85
+ --llm|--output=json) CCKIT_OUTPUT="json" ;;
86
+ *) args+=("$a") ;;
87
+ esac
88
+ done
89
+ set -- "${args[@]+"${args[@]}"}"
90
+ export CCKIT_OUTPUT
91
+
92
+ # Bare `cckit` (no verb) resumes the last session's handoff (locked behavior).
93
+ cmd="${1:-resume}"; shift || true
94
+
95
+ case "$cmd" in
96
+ version)
97
+ # The installed cckit version is cckit's OWN config, independent of the project we're invoked in.
98
+ v="$(jq -r '.kitVersion // "0.0.0"' "$ROOT/cckit.config.json" 2>/dev/null || echo 0.0.0)"
99
+ if cckit_is_json; then cckit_json version "$v"; else echo "cckit $(ui_paint '1;36' "$v")"; fi
100
+ ;;
101
+ effort)
102
+ # shellcheck source=/dev/null
103
+ source "$LIB/effort.sh"
104
+ # shellcheck source=/dev/null
105
+ source "$LIB/effort-ops.sh" # the new|start|pr|close lifecycle ops (compose effort.sh helpers)
106
+ sub="${1:-}"; shift || true
107
+ case "$sub" in
108
+ new) effort_new "$@" ;;
109
+ start) effort_start "$@" ;;
110
+ pr) effort_pr "$@" ;;
111
+ close) effort_close "$@" ;;
112
+ plan) source "$LIB/effort-plan.sh"; effort_plan "$@" ;;
113
+ *) echo "cckit effort <new|start|pr|close|plan>" >&2; exit 2 ;;
114
+ esac
115
+ ;;
116
+ start)
117
+ # Isolated worktree + branch for an issue (wt_start drives off cckit.config.json: repo + base
118
+ # branch). Config must be loaded so KIT_REPO / KIT_BASE_BRANCH are set before wt_start runs.
119
+ # shellcheck source=/dev/null
120
+ source "$LIB/kit-config.sh" && load_kit_config
121
+ # shellcheck source=/dev/null
122
+ source "$LIB/role-identity.sh"; source "$LIB/worktree-start.sh"
123
+ if cckit_is_json; then
124
+ out="$(wt_start "$@" 2>&1)"; rc=$?
125
+ cckit_json verb start issue "${1:-}" ok "$([ "$rc" -eq 0 ] && echo true || echo false)" \
126
+ detail "$(printf '%s' "$out" | tail -1)"
127
+ exit "$rc"
128
+ fi
129
+ wt_start "$@"
130
+ ;;
131
+ pr|close)
132
+ # shellcheck source=/dev/null
133
+ source "$LIB/kit-config.sh" && load_kit_config
134
+ # shellcheck source=/dev/null
135
+ source "$LIB/role-identity.sh"; source "$LIB/gh-project.sh"; source "$LIB/kit-task-ops.sh"
136
+ if cckit_is_json; then
137
+ case "$cmd" in
138
+ pr) out="$(kto_task_pr "$@" 2>&1)"; rc=$? ;;
139
+ close) out="$(kto_task_close "$@" 2>&1)"; rc=$? ;;
140
+ esac
141
+ url="$(printf '%s' "$out" | grep -oE 'https://[^ ]+/pull/[0-9]+' | tail -1)"
142
+ cckit_json verb "$cmd" issue "${1:-}" ok "$([ "$rc" -eq 0 ] && echo true || echo false)" \
143
+ url "$url" detail "$(printf '%s' "$out" | tail -1)"
144
+ exit "$rc"
145
+ fi
146
+ case "$cmd" in
147
+ pr) kto_task_pr "$@" ;;
148
+ close) kto_task_close "$@" ;;
149
+ esac
150
+ ;;
151
+ sync) exec "$ROOT/scripts/task-sync.sh" "$@" ;;
152
+ gc)
153
+ # shellcheck source=/dev/null
154
+ source "$LIB/kit-config.sh" && load_kit_config
155
+ # shellcheck source=/dev/null
156
+ source "$LIB/kit-gc.sh"
157
+ case " $* " in
158
+ *" --prune "*|*" prune "*)
159
+ # Remove worktrees + local branches whose PR merged. Dry-run unless --yes.
160
+ kit_gc_prune "$@"
161
+ ;;
162
+ *)
163
+ if cckit_is_json; then
164
+ out="$(kit_gc_analyze 2>/dev/null || true)"
165
+ safe="$(printf '%s\n' "$out" | grep -c '> SAFE ' || true)"
166
+ protected="$(printf '%s\n' "$out" | grep -c 'PROTECTED:' || true)"
167
+ orphan="$(printf '%s\n' "$out" | grep -c 'ORPHAN' || true)"
168
+ cckit_json verb gc safe "$safe" protected "$protected" orphan "$orphan"
169
+ else
170
+ kit_gc_analyze "$@"
171
+ fi
172
+ ;;
173
+ esac
174
+ ;;
175
+ orchestrate) exec "$ROOT/scripts/orchestrate.sh" "$@" ;;
176
+ autopilot) exec "$ROOT/scripts/autopilot.sh" "$@" ;;
177
+ # Ops exposed so an agent/autopilot can run the whole lifecycle through the one CLI (#16).
178
+ release)
179
+ # Acts on cckit's own repo, so run from the install root regardless of where it was invoked.
180
+ cd "$ROOT"
181
+ # `--next` reports the version the conventional commits imply; otherwise cut a release.
182
+ case "${1:-}" in
183
+ --next) exec "$ROOT/scripts/lib/version-bump.sh" --next ;;
184
+ *) exec "$ROOT/scripts/publish.sh" "$@" ;;
185
+ esac
186
+ ;;
187
+ update) exec "$ROOT/scripts/kit-version-check.sh" "$@" ;;
188
+ migrate) exec "$ROOT/scripts/kit-migrate.sh" "$@" ;;
189
+ adopt) exec "$ROOT/scripts/kit-adopt.sh" "$@" ;;
190
+ doctor) exec "$ROOT/scripts/kit-doctor.sh" "$@" ;;
191
+ digest) exec "$ROOT/scripts/kit-digest.sh" "$@" ;;
192
+ scan) source "$LIB/project-scan.sh"; project_scan "$@" ;;
193
+ encode-context) source "$LIB/toon.sh"; toon_encode ;;
194
+ debug) exec "$ROOT/scripts/debug.sh" "$@" ;;
195
+ contribute) cd "$ROOT"; exec "$ROOT/scripts/contribute.sh" "$@" ;;
196
+ status|ui) exec "$ROOT/scripts/status.sh" "$@" ;;
197
+ resume) source "$LIB/handoff.sh"; handoff_read ;;
198
+ handoff) source "$LIB/handoff.sh"; handoff_write "$@" ;;
199
+ install) exec "$ROOT/scripts/install.sh" "$@" ;;
200
+ init) exec "$ROOT/scripts/init.sh" "$@" ;;
201
+ commands)
202
+ # The command catalog - verbs parsed from this dispatcher's own case labels (single source).
203
+ verbs="$(grep -oE '^ [a-z][a-z|-]*\)' "$BIN/cckit" | sed 's/[) ]//g' | tr '|' '\n' | grep -vE '^(-|$)' | sort -u)"
204
+ if cckit_is_json; then printf '%s\n' "$verbs" | jq -R . | jq -cs .; else printf '%s\n' "$verbs" | tr '\n' ' '; echo; fi
205
+ ;;
206
+ completions)
207
+ case "${1:-bash}" in
208
+ bash) cat "$ROOT/completions/cckit.bash" ;;
209
+ zsh) echo "autoload -Uz bashcompinit && bashcompinit"; cat "$ROOT/completions/cckit.bash" ;;
210
+ *) echo "cckit completions [bash|zsh]" >&2; exit 2 ;;
211
+ esac
212
+ ;;
213
+ help|--help|-h) usage ;;
214
+ *) echo "cckit: unknown command '$cmd' — run 'cckit help'" >&2; exit 2 ;;
215
+ esac
@@ -0,0 +1,34 @@
1
+ {
2
+ "$schema": "./kit.config.schema.json",
3
+ "kitVersion": "0.1.6",
4
+ "project": {
5
+ "name": "cckit",
6
+ "slug": "cckit",
7
+ "owner": "jeiemgi",
8
+ "language": "en"
9
+ },
10
+ "profile": "software",
11
+ "skillPrefix": "",
12
+ "github": {
13
+ "repo": "jeiemgi/cckit",
14
+ "owner": "jeiemgi",
15
+ "baseBranch": "main",
16
+ "projectsV2": false,
17
+ "projectNumber": null,
18
+ "projectTitle": null
19
+ },
20
+ "plans": {
21
+ "format": "github",
22
+ "dir": ""
23
+ },
24
+ "knowledge": {
25
+ "dir": "docs-site/src/content/docs"
26
+ },
27
+ "memory": {
28
+ "enabled": false,
29
+ "wing": "cckit"
30
+ },
31
+ "engine": {
32
+ "mode": "off"
33
+ }
34
+ }
@@ -0,0 +1,42 @@
1
+ ---
2
+ description: Stack a kit MODULE onto this project (e.g. `kit add software`) — turns a free workspace into a GitHub-managed island via a short wizard, without restructuring anything above it.
3
+ argument-hint: "<module> (e.g. software)"
4
+ allowed-tools: Bash, Read, AskUserQuestion
5
+ ---
6
+
7
+ # /kit-add — stack a module onto this project
8
+
9
+ Modules are **apilables** (D1): a base project stays a free workspace until a module is added on
10
+ demand. Adding `software` is the "build me an app" moment — it writes THIS island's
11
+ `.claude/kit.config.json` (modules + wizard answers) and nothing above it (D4/D17). A module is
12
+ **identity, not files** (D14): the agents/skills come from the installed plugin singleton; kit-add
13
+ only writes config, manifest-tracked so it can be updated or removed cleanly.
14
+
15
+ Engine (under `${CLAUDE_PLUGIN_ROOT}`):
16
+ - `scripts/lib/kit-interview.sh --catalog <module>` — the module's wizard questions.
17
+ - `scripts/kit-add.sh <module> --answers FILE [--dir DIR]` — derive + persist (the four-beat machine).
18
+ - `scripts/kit-add.sh <module> --set k=v ... ` — same, answers as flags.
19
+
20
+ ## Steps
21
+
22
+ 1. **Resolve the module** from `$ARGUMENTS` (default `software` if none given). Confirm a catalog
23
+ exists: `scripts/lib/kit-interview.sh --catalog <module>` (non-zero rc = unknown module → tell
24
+ the user which modules exist: look in `${CLAUDE_PLUGIN_ROOT}/modules/`).
25
+ 2. **Render the wizard** (the catalog already carries each question's recommended `default`).
26
+ 3. **Ask with AskUserQuestion** — one batched round. For each question use its `header`,
27
+ `question`, and `options`; put the `recommended` option first and label it "(Recommended)".
28
+ The kit recommends; the user decides.
29
+ 4. **Persist** — build `{ "<key>": "<value>", ... }` to a temp file and run
30
+ `scripts/kit-add.sh <module> --answers /tmp/kit-<module>.json` (add `--dir` if not in the
31
+ island root). For software the wizard covers **versioning** (GitHub vs local git),
32
+ **deploy** (none / Vercel / other), and **CI** (GitHub Actions / none).
33
+ 5. **Report** what changed: the island config path, `modules`, and the resolved github/deploy/ci.
34
+ Note the workspace above was untouched, and that `/kit-task-start` etc. now apply here.
35
+
36
+ ## Rules
37
+
38
+ - **Idempotent** — running it again with the same answers is a no-op; `modules` never duplicates.
39
+ - **Never hand-edit `kit.config.json`** — always go through `kit-add.sh` so the manifest stays true.
40
+ - **Writes only into this island** — never above the project level without an explicit confirm
41
+ (that's `kit-promote`'s job, not kit-add).
42
+ - Honors `KIT_DRY_RUN` (preview) and `KIT_ASSUME_YES` (accept recommended defaults, for batch/CI).
@@ -0,0 +1,45 @@
1
+ ---
2
+ description: Browse claude-kit's own documentation from inside Claude Code. Use to open the kit docs, read the usage / agents / reference / contributing guides, or get a navigable index — bilingual (EN/ES), with prev/next navigation. Triggers — "kit docs", "claude-kit documentation", "open the kit guide", "how do I use the kit".
3
+ argument-hint: "[readme|usage|agents|reference|contributing] [es]"
4
+ allowed-tools: Read, Glob
5
+ ---
6
+
7
+ # /kit-docs — browse the claude-kit docs
8
+
9
+ The kit's documentation ships inside the plugin at `${CLAUDE_PLUGIN_ROOT}`. Use this to read and
10
+ navigate it without leaving Claude Code. These docs are a **sequence** — readme → usage → agents →
11
+ reference → contributing — so always offer prev/next.
12
+
13
+ ## Steps
14
+
15
+ 1. **Resolve language.** Default to the user's working language. If `$ARGUMENTS` contains `es` (or the
16
+ user is writing Spanish), use the `.es.md` variants; otherwise the English `.md`.
17
+
18
+ 2. **Doc map** (paths relative to `${CLAUDE_PLUGIN_ROOT}`):
19
+
20
+ | Key | EN | ES | What |
21
+ | --- | -- | -- | ---- |
22
+ | `readme` | `README.md` | `README.es.md` | overview · install · update · best practices · stack |
23
+ | `usage` | `docs/usage.md` | `docs/usage.es.md` | what you get, profiles, per-project model, `/kit-init`, `--dry-run`, `/kit-customize`, demos |
24
+ | `agents` | `docs/agents.md` | `docs/agents.es.md` | orchestrator → sub-agent model, 13-agent table, mermaid diagrams |
25
+ | `reference` | `docs/reference.md` | `docs/reference.es.md` | how it works, config, stack skills, Spec Kit, pre-push gate, requirements |
26
+ | `contributing` | `CONTRIBUTING.md` | `CONTRIBUTING.md` | submit agents/skills/profiles/requests upstream |
27
+
28
+ 3. **No key in `$ARGUMENTS`** → print the **index**: each doc as a row (key + one-line description) in
29
+ the order above, and tell the user to run `/kit-docs <key>` to open one.
30
+
31
+ 4. **A key given** → `Read` the resolved file from `${CLAUDE_PLUGIN_ROOT}` and present it:
32
+ - If the user asked a specific question, surface the **relevant section** + its path — don't dump the
33
+ whole file.
34
+ - Otherwise render the doc (keep mermaid/code blocks fenced as-is; for long docs, lead with the
35
+ section headers so they can jump).
36
+ - End with a **nav footer**: `← Prev: /kit-docs <prev>` · `Index: /kit-docs` · `Next: /kit-docs <next> →`
37
+ using the sequence order (readme → usage → agents → reference → contributing).
38
+
39
+ 5. Mention the same page is on GitHub if they prefer the browser (link the repo path).
40
+
41
+ ## Rules
42
+
43
+ - Read only from `${CLAUDE_PLUGIN_ROOT}` (the installed kit) — never the user's project files.
44
+ - Unknown key → show the index instead of erroring.
45
+ - Keep it navigable: every response ends with how to reach the previous and next doc.
@@ -0,0 +1,52 @@
1
+ ---
2
+ description: Onboarding preflight — check deps (Homebrew, git, gh, jq, perl, node, pnpm), authenticate gh + add scope:project, optionally set up SSH. Auto-installs everything it can; pauses only for sudo password (Homebrew) and browser OAuth (gh auth login).
3
+ argument-hint: "[--dry-run] [--no-install] [--dismiss-local]"
4
+ allowed-tools: Bash
5
+ ---
6
+
7
+ # /kit-doctor — onboarding preflight
8
+
9
+ Run the kit-doctor script to check all dependencies and authentication required by claude-kit.
10
+
11
+ ## What it checks
12
+
13
+ | Tier | Checks |
14
+ | ---- | ------ |
15
+ | Tier 0 | Homebrew (macOS bootstrap — installs if missing, requires sudo password) |
16
+ | Tier 1 | `git`, `gh` (≥2.29 for Projects v2), `jq`, `perl` — auto-installs via brew |
17
+ | Tier 2 | `node`, `pnpm`, `vercel` (if .vercel/ exists), `turbo`/`playwright` (dev deps only) |
18
+ | Local | Only when `.local.enabled` — installs `mlx-lm` via `uv tool install` (fallback `pipx`, never plain `pip`) + starts `mlx_lm.server` in background with a port health check (first run downloads ~4.5 GB) |
19
+ | Auth | `gh auth status`, scope `project`, `git config user.name/email` |
20
+ | SSH | Optional: detect existing key; `KIT_DOCTOR_SSH=1` triggers guided ed25519 setup |
21
+
22
+ ## Flags
23
+
24
+ - `--dry-run` — report only, touch nothing (no installs, no server start)
25
+ - `--no-install` — check + auth only, skip package installs
26
+ - `--dismiss-local` — silence the "local layer down" SessionStart notice until the next x.y kit update (writes `.local.dismissed` to `kit.config.json`); session-only alternative: `KIT_LOCAL_DISMISS=1`
27
+
28
+ ## Steps
29
+
30
+ 1. Resolve the doctor script path: `${CLAUDE_PLUGIN_ROOT}/scripts/kit-doctor.sh`
31
+
32
+ 2. Pass through any `$ARGUMENTS` (e.g. `--dry-run` or `--no-install`):
33
+
34
+ ```bash
35
+ bash "${CLAUDE_PLUGIN_ROOT}/scripts/kit-doctor.sh" $ARGUMENTS
36
+ ```
37
+
38
+ 3. If the script exits non-zero (Tier 1 failures remain):
39
+ - Surface the "Action required" items from the output
40
+ - Tell the user to fix them and re-run `/kit-doctor`
41
+ - Do not proceed with `/kit-init` until all Tier 1 checks pass
42
+
43
+ 4. If all Tier 1 checks pass:
44
+ - Report success
45
+ - Remind the user the onboarding guide is at `http://localhost:3001/onboarding` (or `$CCKIT_ADMIN_URL/onboarding`)
46
+
47
+ ## Rules
48
+
49
+ - Never skip the preflight. `/kit-init` calls this automatically, but it can be run standalone.
50
+ - Bare URLs only in terminal output (Terminal.app does not support OSC 8 hyperlinks).
51
+ - The `--dry-run` flag makes the doctor read-only — safe to run in CI or before any changes.
52
+ - For SSH setup, the user must set `KIT_DOCTOR_SSH=1` explicitly — the doctor never generates SSH keys by default.
@@ -0,0 +1,58 @@
1
+ ---
2
+ description: Export this kit project to the non-terminal Claude surfaces (#376). Flattens CLAUDE.md (+ inlined @.claude/rules) into claude.ai custom-instructions, copies knowledge/ into an upload-ready folder, verifies Cowork compat, and emits a support matrix. Acceptance: the same project runs in terminal / Cowork / claude.ai with no hand edits.
3
+ argument-hint: "[--verify] [--matrix] [--out DIR] [--dry-run]"
4
+ allowed-tools: Bash
5
+ ---
6
+
7
+ # /kit-export-project — run the project on claude.ai + Cowork, no hand edits
8
+
9
+ A kit project runs on three Claude surfaces. **Terminal** and **Cowork** read `CLAUDE.md` + `.claude/`
10
+ natively — they need nothing from this command. **claude.ai Projects** have no filesystem: only a
11
+ "custom instructions" text box + uploaded "project knowledge". This command produces exactly those
12
+ two artifacts, and checks the project is portable.
13
+
14
+ ## Tier model (#373)
15
+
16
+ - **Tier A = portable** — skills / rules / agents / commands; meaningful in Cowork AND claude.ai.
17
+ - **Tier B = CLI-only** — `statusline.sh` / `settings.json` / `hooks/` / `lib/`; need a terminal +
18
+ filesystem. The export carries only tier-A semantics off-terminal; a tier-B file the project
19
+ _requires_ is a portability defect `--verify` flags.
20
+
21
+ ## What it writes (default `.kit-export/`)
22
+
23
+ | File | Use |
24
+ | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
25
+ | `claude-instructions.md` | Flattened `CLAUDE.md` with `@.claude/rules/*` inlined (tier-A only) — paste into the claude.ai Project custom-instructions box. |
26
+ | `project-knowledge/` | `knowledge/**` + tier-A `rules/` + `agents/` — upload as Project knowledge. |
27
+ | `SUPPORT-MATRIX.md` | terminal / Cowork / claude.ai capability table, generated from the manifest. |
28
+
29
+ ## Modes
30
+
31
+ - (no args) — full export to `.kit-export/` (or `--out DIR`).
32
+ - `--verify` — Cowork + claude.ai compat check only, writes nothing; rc 1 on a portability defect.
33
+ - `--matrix` — print the support matrix, write nothing.
34
+ - `--dry-run` — report what it would write, write nothing.
35
+
36
+ ## Steps
37
+
38
+ 1. Run the export (pass through `$ARGUMENTS`):
39
+
40
+ ```bash
41
+ bash "${CLAUDE_PLUGIN_ROOT}/scripts/kit-export-project.sh" $ARGUMENTS
42
+ ```
43
+
44
+ (or `kit export $ARGUMENTS` — the CLI dispatches to the same canonical script.)
45
+
46
+ 2. For a full export, tell the user the two manual steps claude.ai needs:
47
+ - paste `.kit-export/claude-instructions.md` into the Project's custom-instructions box
48
+ - upload `.kit-export/project-knowledge/` as the Project's knowledge
49
+
50
+ 3. If `--verify` exits non-zero, surface the flagged tier-B-required / missing imports — those
51
+ files silently no-op off-terminal; fix before relying on the non-terminal surfaces.
52
+
53
+ ## Rules
54
+
55
+ - Bare URLs only in terminal output (no OSC 8).
56
+ - The export carries **only tier-A** semantics to claude.ai — a tier-B shim has no meaning without a
57
+ filesystem. Run `--verify` to confirm the portable surface is self-sufficient.
58
+ - `/kit-doctor` runs the same `--verify` as a connection test — green there means this export is clean.
@@ -0,0 +1,49 @@
1
+ ---
2
+ description: OPT-IN export of your Claude Code sessions to redacted training JSONL — pick sessions, run the dataset builder with redaction ON, and get JSONL ready for the fine-tuning pipeline.
3
+ argument-hint: "[--match KEY ...] | [--sessions FILE ...] (default: current project)"
4
+ allowed-tools: Bash, Read, AskUserQuestion
5
+ ---
6
+
7
+ # /kit-export-training — export sessions as redacted training data
8
+
9
+ Fine-tuning a local model on your own work only helps if the data leaves the machine clean. This is
10
+ the **consent gate** in front of a dataset builder (`chat-datasets/build_dataset.py`): it lets a
11
+ builder choose which sessions to export, **always** runs the builder with redaction ON (secret /
12
+ key / token / email masking is the builder's default; this command never passes `--no-redact`), and
13
+ prints where it wrote plus a reminder that redaction must be verified before sharing.
14
+
15
+ Nothing here is automatic — it runs **only when explicitly invoked**, and it never uploads anything.
16
+ The output is plain JSONL on disk; what you do with it is your call.
17
+
18
+ Handler (under `${CLAUDE_PLUGIN_ROOT}`):
19
+ - `scripts/kit-export-training.sh [--builder PATH] [--match KEY ...] [--dirs DIR ...] [--sessions FILE ...] [--out PATH] [--split FRAC] [--final-only] [--drop-narration]`
20
+
21
+ ## Steps
22
+
23
+ 1. **Locate the builder (config-driven)** — the handler resolves `build_dataset.py` with NO
24
+ hardcoded user path, in this order: `--builder PATH` → `KIT_DATASET_BUILDER` env → a sibling
25
+ `chat-datasets/build_dataset.py` next to the git repo root. If none resolve it stops and asks for
26
+ `--builder` / `KIT_DATASET_BUILDER`.
27
+ 2. **Select what to export** — default is the **current git project** (matched by its slug under
28
+ `~/.claude/projects`). Let the builder choose instead:
29
+ - `--match KEY ...` — project-dir name substrings (e.g. `cckit tuempresa`)
30
+ - `--sessions FILE ...` — individual `*.jsonl` transcripts (staged into a temp dir)
31
+ - `--dirs DIR ...` — explicit `~/.claude/projects/<dir>` directories
32
+ 3. **Confirm (opt-in)** — on a TTY the handler asks before writing anything; aborting writes
33
+ nothing. Use AskUserQuestion to surface the selection + output path for an explicit yes.
34
+ 4. **Build with redaction ON** — runs `build_dataset.py` with masking (the builder's default; there
35
+ is deliberately **no `--no-redact` passthrough**). Optional `--split`, `--final-only`,
36
+ `--drop-narration` pass straight through.
37
+ 5. **Report** — prints the JSONL path, the sidecar `*.stats.json` (includes a `redactions_applied`
38
+ tally), and the train/valid split dir if `--split` was used.
39
+ 6. **Remind** — redaction is applied automatically but is **not a guarantee**; the user must verify
40
+ the output for leftover secrets, tokens, private names, or customer data **before sharing**.
41
+
42
+ ## Rules
43
+
44
+ - **Opt-in only** — never runs unprompted; never uploads. Output is local files.
45
+ - **Redaction is always on** — this command exists to enforce that; do not add a way to disable it.
46
+ - **Builder path is config-driven** — `--builder` / `KIT_DATASET_BUILDER` / sibling discovery; never
47
+ hardcode an absolute path.
48
+ - **Default output** — `~/.claude/exports/<slug>-training.jsonl` unless `--out` is given.
49
+ - Honors `KIT_ASSUME_YES` (skip the final confirm, for batch/CI).
@@ -0,0 +1,126 @@
1
+ ---
2
+ description: Scaffold a tailored .claude/ (agents + skills + rules + workflow) into the current project from a claude-kit role profile.
3
+ argument-hint: "[profile] [--name ...] [--repo owner/repo] [--project-number N] [--memory on]"
4
+ allowed-tools: Bash, Read, AskUserQuestion, Edit
5
+ ---
6
+
7
+ # /kit-init — scaffold this project's .claude/ from claude-kit
8
+
9
+ You are initializing the current project with the **claude-kit** setup. The kit lives at
10
+ `${CLAUDE_PLUGIN_ROOT}` (the installed plugin root). The engine is
11
+ `${CLAUDE_PLUGIN_ROOT}/scripts/init.sh`.
12
+
13
+ ## Steps
14
+
15
+ 1. **Identify the project, then gather inputs.**
16
+
17
+ **First, identify what you're initializing and recommend the per-project model:**
18
+ - Inspect the target. If it looks like a **parent/workspace** holding several projects (multiple
19
+ subdirectories with their own `.git` / `package.json` / `pyproject.toml` / `Cargo.toml` / `go.mod`),
20
+ **recommend running `/kit-init` inside each project separately** — one `.claude/` per project —
21
+ instead of once at the workspace root. Explain the payoff: each project maps to its own MemPalace
22
+ **wing**, so the kit keeps **traceability and history per project** (decisions, plans, and agent
23
+ diaries never bleed across projects). List the projects you detected and let the user pick.
24
+ - If it's a single project (a `.git` here, or one app), continue here.
25
+ - Suggest a layout that favors the kit — `CLAUDE.md` + `.claude/` at the project root, plans under
26
+ `docs/plans/`, the kit's `scripts/` alongside; **one repo = one kit setup**. See
27
+ [docs/usage.md → Project structure](${CLAUDE_PLUGIN_ROOT}/docs/usage.md).
28
+
29
+ **Then gather inputs.** If `$ARGUMENTS` already names a profile and the key values, use them.
30
+ Otherwise ask the user with `AskUserQuestion`:
31
+ - **Profile** — `software`, `content`, `research`, or `minimal`
32
+ (read `${CLAUDE_PLUGIN_ROOT}/profiles/*.json` to describe each)
33
+ - **GitHub repo** — `owner/repo` (offer `gh api user --jq .login` as the default owner)
34
+ - **Projects v2 board** — board number if they use one, else "off"
35
+ - **MemPalace memory** — on/off (off unless they actively use MemPalace)
36
+ - **Spec Kit (SDD)** — on/off; pass `--speckit on` to enable the spec-driven workflow section
37
+ - **Pre-push gate** — optional. If they want a check to run before every `git push` (e.g.
38
+ `pnpm build`, `pnpm typecheck`, `pnpm -w lint`), pass `--prepush "<command>"`. Omit for none —
39
+ projects without it are never blocked.
40
+ - **Language** — working language (e.g. English, Spanish, mixed)
41
+
42
+ Note: stack-gated build skills (`feature-build-refine`, `supabase-patterns`, …) ship with the
43
+ `software` profile and **self-activate** only when their technology is in the project's
44
+ `package.json` — nothing to choose at init.
45
+
46
+ Skip questions already answered in `$ARGUMENTS`. Derive sensible defaults (project name =
47
+ repo name, slug = lowercased name) and only confirm the non-obvious ones.
48
+
49
+ 2. **Run the engine** from the project root:
50
+
51
+ ```bash
52
+ "${CLAUDE_PLUGIN_ROOT}/scripts/init.sh" \
53
+ --profile <profile> \
54
+ --target "$PWD" \
55
+ --name "<Project Name>" \
56
+ --repo "<owner/repo>" \
57
+ [--project-number <N>] \
58
+ [--memory on] \
59
+ [--lang "<language>"]
60
+ ```
61
+
62
+ It substitutes `{{VARS}}`, resolves `<!-- IF:FLAG -->` blocks, and writes `CLAUDE.md`,
63
+ `.claude/{kit.config.json,agents,skills,rules,settings.local.json}`, and `scripts/`.
64
+
65
+ Tip: add `--dry-run` to print the exact scaffold plan (files, hooks, onboarding tools) **without
66
+ writing anything** — useful to confirm the profile first. Offer the user a dry-run preview if the
67
+ profile/target is at all uncertain.
68
+
69
+ 3. **Set up external tools — opt-in.** Configure the CLIs the scaffold relies on. This is
70
+ **opt-in and consent-based**: for each tool, **explain what it is and why it's needed, then
71
+ install/authenticate only with the user's go-ahead**. Nothing is forced; a declined tool just
72
+ leaves the matching features dormant (they don't error) and can be re-run anytime.
73
+
74
+ **GitHub CLI (`gh`)** — backs the whole task/PR workflow (issues, PRs, labels, milestones).
75
+ - Detect: `gh auth status`. If not authenticated, explain every `task-*` skill needs it and,
76
+ with consent, run `gh auth login`. Re-check with `gh auth status`.
77
+
78
+ **MemPalace** (only when memory was enabled) — the persistent-memory backend: an MCP server
79
+ exposing the `mempalace_*` tools plus the `mempalace-mcp` binary, which the `Stop`/`PreCompact`
80
+ hooks and every agent's diary protocol depend on. Absent = dormant, never errors.
81
+ - Detect: `command -v mempalace-mcp` and `claude mcp list | grep -i mempalace`.
82
+ - Binary present but unregistered → with consent run `claude mcp add mempalace mempalace-mcp`;
83
+ verify with `claude mcp list`. Then confirm with a `mempalace_status` call.
84
+ - Binary missing → explain it and ask the user for their install method; `mempalace-mcp` is a
85
+ user-provided tool, so **do not guess a package name or fabricate an installer**. Re-check
86
+ `command -v mempalace-mcp`.
87
+
88
+ **Google Workspace CLI (`gws`)** — opt-in; offer only if the user works with Google Docs / Sheets /
89
+ Slides / Drive / Gmail / Calendar (e.g. the `gws-slides` skill drives it).
90
+ - Detect: `command -v gws`, then `gws auth status`.
91
+ - Installed but not authenticated → with consent run `gws auth login` (OAuth, opens a browser).
92
+ `gws auth setup` configures the GCP project + OAuth client and needs `gcloud`. Re-check
93
+ `gws auth status`.
94
+ - `gws` missing → explain it and ask the user for their install method; **do not guess a package
95
+ name or installer**. Re-check `command -v gws`.
96
+
97
+ 4. **Report** what was written (echo the engine's summary) and surface the printed "Next steps"
98
+ (seed labels/milestones, capture Projects v2 IDs).
99
+
100
+ 5. **Offer** to run `./scripts/setup-labels.sh` and `./scripts/setup-milestones.sh` now if a
101
+ GitHub repo was configured. Ask before running — they mutate the repo.
102
+
103
+ 6. **Audit stack conformance** (when the `software` profile activated a stack-gated build skill).
104
+ The build skills (`feature-build-refine`, `supabase-patterns`, …) self-activate from
105
+ `package.json` and immediately become the project's "how we build" standard — but the existing
106
+ code may not follow them. Briefly audit the repo against each activated skill (directory layout,
107
+ the canonical form/handler/data-access patterns) and report **conforms / partial / divergent**.
108
+ On non-trivial drift, surface the reconciliation choice to the user — **migrate repo → standard**,
109
+ **amend standard → repo**, or **hybrid** — and, if they choose migrate/hybrid, offer a phased
110
+ migration plan (`docs/plans`, per the `plan-output-format` rule) + tracked issues. Don't present
111
+ the standard as already-followed when it isn't. (Spec Kit's `/speckit` runs the deeper version of
112
+ this audit in its §6 before authoring the constitution.)
113
+
114
+ 7. **Point to `/kit-customize`.** Tell the user they can tailor the setup anytime with `/kit-customize`
115
+ — add/edit/delete agents, wire skills + tools onto them, search/suggest skills for the profile, lint
116
+ agents, or build (and save) a custom profile. It also activates automatically when they ask to
117
+ create/edit/delete an agent. Use it whenever the presets don't fit exactly. And point them to
118
+ **`/kit-docs`** to browse the kit's guides (usage · agents · reference · contributing) from inside
119
+ Claude Code. For a React project, point them to **`/kit-annotate`** to add click-to-annotate UI
120
+ feedback wired to Claude (via Agentation).
121
+
122
+ ## Rules
123
+
124
+ - Never overwrite an existing `.claude/kit.config.json` without passing `--force` and confirming.
125
+ - Do not invent a repo or owner — confirm with the user.
126
+ - After scaffolding, the project owns its `.claude/` files. Edits there are the user's, not the kit's.