@jeiemgi/cckit 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/AGENTS.md +169 -21
- package/README.md +505 -35
- package/SECURITY.md +5 -0
- package/bin/cckit +189 -20
- package/cckit.config.json +1 -1
- package/commands/kit-doctor.md +13 -5
- package/commands/kit-export-project.md +0 -2
- package/commands/kit-export-training.md +6 -9
- package/commands/kit-init.md +43 -13
- package/commands/kit-routines.md +1 -1
- package/commands/kit-update.md +11 -6
- package/databases/supabase/guide.html +106 -0
- package/databases/supabase/nextjs/lib/supabase/client.ts +9 -0
- package/databases/supabase/nextjs/lib/supabase/server.ts +29 -0
- package/databases/supabase.json +70 -0
- package/integrations/emil-design-eng.json +41 -0
- package/integrations/graft.json +81 -0
- package/integrations/impeccable.json +42 -0
- package/integrations/integration.schema.json +215 -0
- package/integrations/lavish.json +43 -0
- package/integrations/mempalace.json +28 -0
- package/integrations/mlx-lm.json +32 -0
- package/integrations/web-design-guidelines.json +42 -0
- package/kit.config.schema.json +183 -5
- package/package.json +4 -1
- package/profiles/automation.json +7 -1
- package/profiles/content.json +10 -2
- package/profiles/marketing.json +57 -0
- package/profiles/minimal.json +7 -1
- package/profiles/research.json +7 -1
- package/profiles/software.json +7 -1
- package/recipes/nextjs-shadcn.json +49 -0
- package/scripts/agent-skills-external.txt +45 -0
- package/scripts/agent-skills-lint-test.sh +131 -0
- package/scripts/agent-skills-lint.sh +115 -0
- package/scripts/agent-template-lint-test.sh +42 -0
- package/scripts/agent-template-lint.sh +58 -0
- package/scripts/annotate-setup.sh +1 -1
- package/scripts/autopilot-run-test.sh +338 -0
- package/scripts/autopilot-run.sh +448 -0
- package/scripts/autopilot-test.sh +8 -0
- package/scripts/autopilot.sh +10 -1
- package/scripts/benchmark/benchmark-test.sh +85 -0
- package/scripts/benchmark/checkpoint-test.sh +314 -0
- package/scripts/benchmark/checkpoint.sh +408 -0
- package/scripts/benchmark/lib/model.sh +31 -6
- package/scripts/benchmark/report.sh +17 -2
- package/scripts/benchmark/run-quality.sh +36 -10
- package/scripts/benchmark/verb-timings-test.sh +124 -0
- package/scripts/benchmark/verb-timings.sh +149 -0
- package/scripts/check.sh +29 -19
- package/scripts/content-skills-test.sh +144 -0
- package/scripts/copilot-loop-test.sh +25 -0
- package/scripts/database-supabase-test.sh +121 -0
- package/scripts/docs-marketing-words-test.sh +73 -0
- package/scripts/docs-record-tables-test.sh +72 -0
- package/scripts/guard-raw-git-ops-test.sh +8 -0
- package/scripts/hook-adapter-test.sh +193 -0
- package/scripts/init-content-test.sh +225 -0
- package/scripts/init-guided-test.sh +474 -0
- package/scripts/init-recipes-test.sh +104 -0
- package/scripts/init-upgrade-test.sh +341 -2
- package/scripts/init.sh +746 -95
- package/scripts/instruction-budget-baseline.txt +8 -0
- package/scripts/instruction-budget-lint-test.sh +166 -0
- package/scripts/instruction-budget-lint.sh +219 -0
- package/scripts/integrations-check-test.sh +200 -0
- package/scripts/integrations-check.sh +157 -0
- package/scripts/kit-add-test.sh +214 -0
- package/scripts/kit-add.sh +305 -5
- package/scripts/kit-adopt-test.sh +16 -0
- package/scripts/kit-adopt.sh +3 -2
- package/scripts/kit-digest.sh +2 -2
- package/scripts/kit-doctor-test.sh +293 -0
- package/scripts/kit-doctor.sh +272 -140
- package/scripts/kit-export-project-test.sh +3 -3
- package/scripts/kit-remove-test.sh +19 -0
- package/scripts/kit-routines.sh +2 -2
- package/scripts/kit-self-update.sh +1 -1
- package/scripts/kit-version-check-test.sh +4 -0
- package/scripts/kit-version-check.sh +4 -2
- package/scripts/knowledge-lint.sh +4 -4
- package/scripts/leak-fence-test.sh +89 -0
- package/scripts/lib/adapter-select-test.sh +136 -0
- package/scripts/lib/adapter-select.sh +158 -0
- package/scripts/lib/agent-def-test.sh +69 -0
- package/scripts/lib/agent-def.sh +106 -0
- package/scripts/lib/agent-launch-test.sh +212 -0
- package/scripts/lib/agent-launch.sh +335 -0
- package/scripts/lib/board-view-test.sh +11 -0
- package/scripts/lib/board-view.sh +42 -26
- package/scripts/lib/branch-owner-test.sh +26 -0
- package/scripts/lib/branch-owner.sh +16 -9
- package/scripts/lib/captain-test.sh +105 -0
- package/scripts/lib/captain.sh +87 -8
- package/scripts/lib/codex-hooks-test.sh +100 -0
- package/scripts/lib/codex-hooks.sh +69 -0
- package/scripts/lib/commitlint.sh +1 -1
- package/scripts/lib/content-kinds-gc-test.sh +88 -0
- package/scripts/lib/copilot-test.sh +70 -4
- package/scripts/lib/copilot.sh +66 -14
- package/scripts/lib/effort-dispatch-test.sh +3 -3
- package/scripts/lib/effort-metrics-test.sh +178 -1
- package/scripts/lib/effort-metrics.sh +188 -35
- package/scripts/lib/effort-ops-test.sh +217 -7
- package/scripts/lib/effort-ops.sh +281 -49
- package/scripts/lib/effort-parity-test.sh +49 -13
- package/scripts/lib/effort-plan-test.sh +337 -0
- package/scripts/lib/effort-plan.sh +200 -23
- package/scripts/lib/effort-slug.sh +16 -2
- package/scripts/lib/effort.sh +67 -12
- package/scripts/lib/errors-header-test.sh +1 -1
- package/scripts/lib/gh-project-test.sh +35 -1
- package/scripts/lib/gh-project.sh +37 -16
- package/scripts/lib/gh-rest-test.sh +330 -0
- package/scripts/lib/gh-rest.sh +304 -0
- package/scripts/lib/hook-refresh.sh +1 -1
- package/scripts/lib/init-github.sh +412 -0
- package/scripts/lib/init-guide.sh +630 -0
- package/scripts/lib/integration-install-test.sh +343 -0
- package/scripts/lib/integration-install.sh +257 -0
- package/scripts/lib/integrations-test.sh +366 -0
- package/scripts/lib/integrations.sh +244 -0
- package/scripts/lib/kinds-test.sh +125 -0
- package/scripts/lib/kinds.sh +66 -0
- package/scripts/lib/kit-brief-test.sh +22 -3
- package/scripts/lib/kit-brief.sh +45 -5
- package/scripts/lib/kit-config-resolve.sh +2 -2
- package/scripts/lib/kit-config-test.sh +64 -1
- package/scripts/lib/kit-config.sh +37 -1
- package/scripts/lib/kit-events.sh +7 -0
- package/scripts/lib/kit-gc-test.sh +173 -1
- package/scripts/lib/kit-gc.sh +244 -37
- package/scripts/lib/kit-hotfix.sh +216 -0
- package/scripts/lib/kit-interview-test.sh +93 -0
- package/scripts/lib/kit-interview.sh +117 -8
- package/scripts/lib/kit-lib-test.sh +1 -1
- package/scripts/lib/kit-lib.sh +3 -3
- package/scripts/lib/kit-local.sh +2 -2
- package/scripts/lib/kit-manifest.sh +33 -1
- package/scripts/lib/kit-profile-test.sh +3 -3
- package/scripts/lib/kit-status-test.sh +112 -4
- package/scripts/lib/kit-status.sh +246 -16
- package/scripts/lib/kit-task-ops-test.sh +37 -0
- package/scripts/lib/kit-task-ops.sh +362 -89
- package/scripts/lib/kto-hotfix-test.sh +232 -0
- package/scripts/lib/kto-task-close-test.sh +83 -0
- package/scripts/lib/kto-task-new-test.sh +95 -0
- package/scripts/lib/kto-task-pr-merge-test.sh +97 -6
- package/scripts/lib/kto-task-pr-test.sh +70 -0
- package/scripts/lib/leak-fence.sh +89 -0
- package/scripts/lib/light-task-run-test.sh +255 -0
- package/scripts/lib/light-task-test.sh +309 -0
- package/scripts/lib/light-task.sh +706 -0
- package/scripts/lib/next-test.sh +99 -0
- package/scripts/lib/next.sh +9 -3
- package/scripts/lib/orchestration-runtime-test.sh +72 -0
- package/scripts/lib/orchestration-runtime.sh +57 -5
- package/scripts/lib/plan-machine-test.sh +15 -2
- package/scripts/lib/plan-machine.sh +20 -7
- package/scripts/lib/plan-next-test.sh +1 -1
- package/scripts/lib/plan-next.sh +4 -4
- package/scripts/lib/pr-evidence-test.sh +3 -3
- package/scripts/lib/pr-evidence.sh +1 -1
- package/scripts/lib/qa-lane-test.sh +626 -0
- package/scripts/lib/qa-lane.sh +1357 -0
- package/scripts/lib/qa-lanes-test.sh +175 -0
- package/scripts/lib/react-detect.sh +1 -1
- package/scripts/lib/render-test.sh +1 -1
- package/scripts/lib/review-page-test.sh +318 -0
- package/scripts/lib/review-page.sh +369 -0
- package/scripts/lib/review-stage-test.sh +62 -11
- package/scripts/lib/review-stage.sh +42 -60
- package/scripts/lib/role-identity-test.sh +65 -0
- package/scripts/lib/role-identity.sh +25 -2
- package/scripts/lib/secret-guard.sh +3 -3
- package/scripts/lib/session-registry-test.sh +111 -0
- package/scripts/lib/session-registry.sh +233 -0
- package/scripts/lib/stage-receipt-test.sh +14 -1
- package/scripts/lib/stage-receipt.sh +13 -8
- package/scripts/lib/task-source-file.sh +309 -0
- package/scripts/lib/task-source.sh +130 -0
- package/scripts/lib/test-env-test.sh +3 -3
- package/scripts/lib/test-env.sh +7 -4
- package/scripts/lib/upgrade-report-test.sh +120 -0
- package/scripts/lib/upgrade-report.sh +138 -0
- package/scripts/lib/version-bump.sh +3 -3
- package/scripts/lib/wave-result-test.sh +80 -0
- package/scripts/lib/wave-result.sh +127 -0
- package/scripts/lib/worker-brief-test.sh +5 -0
- package/scripts/lib/worker-brief.sh +2 -2
- package/scripts/lib/worktree-issue-test.sh +30 -1
- package/scripts/lib/worktree-issue.sh +93 -9
- package/scripts/lib/worktree-ports-test.sh +57 -4
- package/scripts/lib/worktree-start-test.sh +197 -0
- package/scripts/lib/worktree-start.sh +169 -32
- package/scripts/lib/zsh-safety-test.sh +19 -3
- package/scripts/marketing-walkthrough-test.sh +152 -0
- package/scripts/night-grant-test.sh +37 -0
- package/scripts/night-grant.sh +448 -0
- package/scripts/night-run-test.sh +8 -0
- package/scripts/night-run.mjs +275 -0
- package/scripts/night-run.test.mjs +324 -0
- package/scripts/orchestrate-test.sh +190 -0
- package/scripts/orchestrate.sh +79 -8
- package/scripts/portable-test.sh +11 -2
- package/scripts/publish.sh +28 -3
- package/scripts/review-lint-test.sh +7 -7
- package/scripts/review-lint.sh +2 -2
- package/scripts/review-rules.conf +8 -0
- package/scripts/rule-recipes-test.sh +96 -0
- package/scripts/self-install-test.sh +39 -9
- package/scripts/setup-labels.sh +18 -1
- package/scripts/setup-milestones.sh +1 -1
- package/scripts/showcase.sh +1 -1
- package/scripts/skill-frontmatter-lint-test.sh +4 -4
- package/scripts/skill-frontmatter-lint.sh +1 -1
- package/scripts/status-test.sh +113 -2
- package/scripts/status.sh +16 -3
- package/scripts/task-sync-test.sh +154 -0
- package/scripts/task-sync.sh +243 -32
- package/scripts/test-runner-test.sh +158 -0
- package/scripts/test.sh +131 -23
- package/scripts/update-path-test.sh +279 -0
- package/scripts/ux-ds-audit.sh +1 -1
- package/scripts/ux-graph-scan.sh +6 -6
- package/scripts/wave-worker.sh +54 -0
- package/skills/kit-add/SKILL.md +77 -0
- package/skills/kit-autopilot/SKILL.md +123 -12
- package/skills/kit-cleanup/SKILL.md +5 -2
- package/skills/kit-contribute/SKILL.md +4 -4
- package/skills/kit-docs-writer/SKILL.md +16 -6
- package/skills/kit-effort-close/SKILL.md +17 -8
- package/skills/kit-effort-new/SKILL.md +15 -9
- package/skills/kit-effort-pr/SKILL.md +15 -7
- package/skills/kit-effort-start/SKILL.md +5 -2
- package/skills/kit-gc/SKILL.md +5 -2
- package/skills/kit-next/SKILL.md +5 -1
- package/skills/kit-onboard/SKILL.md +3 -3
- package/skills/kit-page/SKILL.md +93 -0
- package/skills/kit-plan-next/SKILL.md +8 -4
- package/skills/kit-security-sweep/SKILL.md +1 -3
- package/skills/kit-ship/SKILL.md +2 -3
- package/skills/kit-status/SKILL.md +35 -4
- package/skills/kit-task-new/SKILL.md +3 -3
- package/skills/kit-task-pr/SKILL.md +7 -2
- package/skills/kit-task-pr-merge/SKILL.md +7 -2
- package/skills/kit-task-start/SKILL.md +7 -7
- package/skills/kit-task-sync/SKILL.md +19 -3
- package/skills/kit-ux-audit/SKILL.md +3 -2
- package/templates/agents/auto-dev.md +5 -4
- package/templates/agents/backend.md +1 -1
- package/templates/agents/designer.md +2 -0
- package/templates/agents/devops.md +1 -1
- package/templates/agents/editor.md +9 -1
- package/templates/agents/frontend.md +1 -1
- package/templates/agents/local-delegate.md +1 -1
- package/templates/agents/pm.md +5 -5
- package/templates/agents/tech-lead.md +1 -1
- package/templates/benchmarks/SCHEMA.md +9 -3
- package/templates/codex/hooks.json.tmpl +89 -0
- package/templates/hooks/guard-base-branch-commit.sh.tmpl +13 -7
- package/templates/hooks/guard-raw-git-ops.sh.tmpl +27 -14
- package/templates/hooks/mempal_followup.sh.tmpl +2 -2
- package/templates/hooks/mempal_session_start.sh.tmpl +1 -1
- package/templates/hooks/prepush_gate.sh.tmpl +4 -2
- package/templates/hooks/repo-hygiene.sh.tmpl +3 -2
- package/templates/instructions.md.tmpl +174 -0
- package/templates/kit.config.json.tmpl +3 -3
- package/templates/knowledge-INDEX.md.tmpl +1 -1
- package/templates/lib/kit-sigil.sh.tmpl +1 -1
- package/templates/rules/authoring.md +106 -0
- package/templates/rules/branch-naming.md +40 -4
- package/templates/rules/code-retrieval.md +63 -0
- package/templates/rules/delegation-brief.md +0 -3
- package/templates/rules/design-routing.md +3 -3
- package/templates/rules/effort-model.md +14 -10
- package/templates/rules/gate-and-review.md +94 -0
- package/templates/rules/issue-lifecycle.md +88 -0
- package/templates/rules/knowledge-base.md +1 -1
- package/templates/rules/mempalace.md +1 -1
- package/templates/rules/merge-safety.md +108 -0
- package/templates/rules/naming-and-ids.md +23 -17
- package/templates/rules/plain-language.md +59 -0
- package/templates/rules/plan-next.md +9 -11
- package/templates/rules/react-annotate.md +6 -0
- package/templates/rules/review-pages.md +49 -0
- package/templates/rules/risk-tiered-review.md +13 -4
- package/templates/rules/shared-checkout.md +106 -0
- package/templates/rules/skill-gaps.md +2 -7
- package/templates/rules/task-management.md +13 -1
- package/templates/skills/brand-voice/SKILL.md +91 -0
- package/templates/skills/brand-voice/references/voice-template.md +61 -0
- package/templates/skills/campaign/SKILL.md +123 -0
- package/templates/skills/campaign/references/plan-template.md +55 -0
- package/templates/skills/concrete/SKILL.md +2 -2
- package/templates/skills/copywriting/SKILL.md +8 -1
- package/templates/skills/feature-build-refine/SKILL.md +2 -4
- package/templates/skills/morning-briefing/SKILL.md +2 -2
- package/templates/skills/page-design/SKILL.md +145 -0
- package/templates/skills/page-design/add.json +5 -0
- package/templates/skills/page-design/references/design-file-template.md +40 -0
- package/templates/skills/page-design/references/generic-page-patterns.md +43 -0
- package/templates/skills/page-design/references/minimum-rules.md +42 -0
- package/templates/skills/speckit/SKILL.md +4 -5
- package/templates/skills/supabase-patterns/SKILL.md +1 -1
- package/commands/kit-add.md +0 -42
- package/templates/CLAUDE.md.tmpl +0 -106
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"hooks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "command",
|
|
8
|
+
"command": "bash \"$(git rev-parse --show-toplevel)/.codex/hooks/repo-hygiene.sh\"",
|
|
9
|
+
"timeout": 10
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"hooks": [
|
|
15
|
+
{
|
|
16
|
+
"type": "command",
|
|
17
|
+
"command": "bash \"$(git rev-parse --show-toplevel)/.codex/hooks/kit_version_check.sh\"",
|
|
18
|
+
"timeout": 10
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"hooks": [
|
|
24
|
+
{
|
|
25
|
+
"type": "command",
|
|
26
|
+
"command": "bash \"$(git rev-parse --show-toplevel)/.codex/hooks/kit-mail-check.sh\"",
|
|
27
|
+
"timeout": 10
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"PreToolUse": [
|
|
33
|
+
{
|
|
34
|
+
"matcher": "Bash",
|
|
35
|
+
"hooks": [
|
|
36
|
+
{
|
|
37
|
+
"type": "command",
|
|
38
|
+
"command": "bash \"$(git rev-parse --show-toplevel)/.codex/hooks/guard-base-branch-commit.sh\"",
|
|
39
|
+
"timeout": 10
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"matcher": "Bash",
|
|
45
|
+
"hooks": [
|
|
46
|
+
{
|
|
47
|
+
"type": "command",
|
|
48
|
+
"command": "bash \"$(git rev-parse --show-toplevel)/.codex/hooks/guard-raw-git-ops.sh\"",
|
|
49
|
+
"timeout": 10
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"PostToolUse": [
|
|
55
|
+
{
|
|
56
|
+
"matcher": "*",
|
|
57
|
+
"hooks": [
|
|
58
|
+
{
|
|
59
|
+
"type": "command",
|
|
60
|
+
"command": "bash \"$(git rev-parse --show-toplevel)/.codex/hooks/kit-mail-check.sh\"",
|
|
61
|
+
"timeout": 10
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"UserPromptSubmit": [
|
|
67
|
+
{
|
|
68
|
+
"hooks": [
|
|
69
|
+
{
|
|
70
|
+
"type": "command",
|
|
71
|
+
"command": "bash \"$(git rev-parse --show-toplevel)/.codex/hooks/kit-mail-check.sh\"",
|
|
72
|
+
"timeout": 10
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"Stop": [
|
|
78
|
+
{
|
|
79
|
+
"hooks": [
|
|
80
|
+
{
|
|
81
|
+
"type": "command",
|
|
82
|
+
"command": "bash \"$(git rev-parse --show-toplevel)/.codex/hooks/kit-mail-check.sh\"",
|
|
83
|
+
"timeout": 10
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# guard-base-branch-commit.sh — PreToolUse(Bash) hook. Scaffolded by claude-kit.
|
|
3
|
+
# One script for both adapters: Claude Code and Codex send the same event fields this reads
|
|
4
|
+
# (`tool_input.command`, `cwd`) and both treat exit 2 + stderr as "block, here is the reason".
|
|
3
5
|
#
|
|
4
6
|
# Enforces the hard project rule: NO direct commits to the base branch (main/develop).
|
|
5
7
|
# Every change lands through a PR from a <kind>/<issue>-<slug> branch.
|
|
6
8
|
#
|
|
7
9
|
# Reads the tool call JSON on stdin. If the Bash command is a `git commit`
|
|
8
|
-
# and HEAD is on the base branch, it blocks the tool (exit 2 →
|
|
10
|
+
# and HEAD is on the base branch, it blocks the tool (exit 2 → the agent sees the
|
|
9
11
|
# reason and must branch first). Anything else passes through (exit 0).
|
|
10
12
|
# Depends on jq for the stdin parse.
|
|
11
13
|
#
|
|
12
14
|
# This is local fast-feedback. The durable enforcement is branch protection
|
|
13
|
-
# on GitHub (see
|
|
15
|
+
# on GitHub (see the branch-naming rule → "Leverage GitHub automations").
|
|
14
16
|
|
|
15
17
|
set -uo pipefail
|
|
16
18
|
|
|
17
19
|
input=$(cat 2>/dev/null)
|
|
18
|
-
|
|
20
|
+
# A command sent as an argv array (a shell tool may do that) is read as one string: the script of
|
|
21
|
+
# `<shell> -c <script>`, else the words joined.
|
|
22
|
+
cmd=$(printf '%s' "$input" | jq -r '.tool_input.command // empty | if type == "array" then (if length > 2 and (.[1] | test("^-[a-z]*c$")) then .[2:] else . end | join(" ")) else . end' 2>/dev/null)
|
|
19
23
|
[[ -z "$cmd" ]] && exit 0
|
|
20
24
|
|
|
21
25
|
# Only care about commit commands (not log/show/commit-graph/etc.)
|
|
22
|
-
|
|
26
|
+
grep -Eq '(^|[;&|[:space:]])git[[:space:]]+(.*[[:space:]])?commit([[:space:]]|$)' <<<"$cmd" || exit 0
|
|
23
27
|
|
|
24
28
|
# Resolve the directory the commit will actually run in — NOT CLAUDE_PROJECT_DIR,
|
|
25
|
-
# which is always the main checkout. An agent in a linked worktree commits via
|
|
29
|
+
# which is always the main checkout (and is unset under Codex). An agent in a linked worktree commits via
|
|
26
30
|
# `cd <worktree> && git commit` or `git -C <worktree> commit`; honor that so we
|
|
27
31
|
# read the worktree's real branch instead of false-blocking on the main checkout.
|
|
28
32
|
dir=""
|
|
@@ -31,7 +35,9 @@ if [[ "$cmd" =~ git[[:space:]]+-C[[:space:]]+([^[:space:]]+) ]]; then
|
|
|
31
35
|
elif [[ "$cmd" =~ (^|[\&\;\|])[[:space:]]*cd[[:space:]]+([^[:space:]\&\;\|]+) ]]; then
|
|
32
36
|
dir="${BASH_REMATCH[2]}"
|
|
33
37
|
fi
|
|
34
|
-
|
|
38
|
+
# No directory named in the command: the event's own cwd is where the tool runs.
|
|
39
|
+
cwd=$(printf '%s' "$input" | jq -r '.cwd // empty' 2>/dev/null)
|
|
40
|
+
dir="${dir:-${cwd:-${CLAUDE_PROJECT_DIR:-$PWD}}}"
|
|
35
41
|
# strip surrounding quotes
|
|
36
42
|
dir="${dir%\"}"; dir="${dir#\"}"; dir="${dir%\'}"; dir="${dir#\'}"
|
|
37
43
|
branch=$(git -C "$dir" rev-parse --abbrev-ref HEAD 2>/dev/null) || exit 0
|
|
@@ -39,7 +45,7 @@ branch=$(git -C "$dir" rev-parse --abbrev-ref HEAD 2>/dev/null) || exit 0
|
|
|
39
45
|
if [[ "$branch" == "main" || "$branch" == "develop" ]]; then
|
|
40
46
|
echo "BLOCKED: direct commit to '$branch'. No direct commits to the base branch." >&2
|
|
41
47
|
echo "Start a branch first: /task-start <issue> (or git checkout -B <kind>/<issue>-<slug> origin/$branch)." >&2
|
|
42
|
-
echo "Then commit there and open a PR. See
|
|
48
|
+
echo "Then commit there and open a PR. See the branch-naming rule." >&2
|
|
43
49
|
exit 2
|
|
44
50
|
fi
|
|
45
51
|
exit 0
|
|
@@ -52,21 +52,32 @@ _grg_segments() {
|
|
|
52
52
|
# _grg_classify <segment> — print the raw-op key for one simple command, or nothing.
|
|
53
53
|
_grg_classify() {
|
|
54
54
|
local s="$1"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
elif
|
|
59
|
-
elif
|
|
55
|
+
# `--help` / `-h` only prints usage: read-only, never a bypass.
|
|
56
|
+
grep -qE '[[:space:]](--help|-h)([[:space:]]|$)' <<<"$s" && return 0
|
|
57
|
+
if grep -qE '^gh([[:space:]]+(-R|--repo)[[:space:]]+[^[:space:]]+|[[:space:]]+--repo=[^[:space:]]+)*[[:space:]]+issue[[:space:]]+create([[:space:]]|$)' <<<"$s"; then echo issue-create
|
|
58
|
+
elif grep -qE '^gh([[:space:]]+(-R|--repo)[[:space:]]+[^[:space:]]+|[[:space:]]+--repo=[^[:space:]]+)*[[:space:]]+issue[[:space:]]+close([[:space:]]|$)' <<<"$s"; then echo issue-close
|
|
59
|
+
elif grep -qE '^gh([[:space:]]+(-R|--repo)[[:space:]]+[^[:space:]]+|[[:space:]]+--repo=[^[:space:]]+)*[[:space:]]+pr[[:space:]]+create([[:space:]]|$)' <<<"$s"; then echo pr-create
|
|
60
|
+
elif grep -qE '^gh([[:space:]]+(-R|--repo)[[:space:]]+[^[:space:]]+|[[:space:]]+--repo=[^[:space:]]+)*[[:space:]]+pr[[:space:]]+merge([[:space:]]|$)' <<<"$s"; then echo pr-merge
|
|
61
|
+
elif grep -qE '^git([[:space:]]+-C[[:space:]]+[^[:space:]]+)*[[:space:]]+(checkout[[:space:]]+(.*[[:space:]])?-[bB]|switch[[:space:]]+(.*[[:space:]])?(-c|-C|--create)|worktree[[:space:]]+add)([[:space:]]|$)' <<<"$s"; then echo branch
|
|
60
62
|
fi
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
# _grg_hint <key> — the verb to run instead.
|
|
64
|
-
_grg_hint() {
|
|
66
|
+
_grg_hint() { # <key> [segment] — the segment's flags pick the matching verb flag (#376/#377)
|
|
67
|
+
local seg="${2:-}" n
|
|
65
68
|
case "$1" in
|
|
66
69
|
issue-create) echo 'cckit new --role <role> [--kind K --priority P --body-file F] "<title>" (multi-part work: cckit effort new)' ;;
|
|
67
|
-
issue-close)
|
|
70
|
+
issue-close)
|
|
71
|
+
n="$(printf '%s' "$seg" | sed -nE 's/.*--duplicate-of[= ]+#?([0-9]+).*/\1/p')"
|
|
72
|
+
if [ -n "$n" ]; then echo "cckit close <issue> --duplicate-of $n (state_reason duplicate, board Done)"
|
|
73
|
+
elif grep -qiE -- '(--reason|-r)[= ]+.?not[ _-]?planned' <<<"$seg"; then
|
|
74
|
+
echo 'cckit close <issue> "<why>" --reason not-planned (superseded: --superseded-by <N>)'
|
|
75
|
+
else echo 'cckit close <issue> "<summary>" [--reason completed|not-planned|duplicate] (an effort: cckit effort close <N>)'; fi ;;
|
|
68
76
|
pr-create) echo 'cckit pr <issue> "<summary>" (an effort: cckit effort pr <N> --summary-file F --for-agents-file F)' ;;
|
|
69
|
-
pr-merge)
|
|
77
|
+
pr-merge)
|
|
78
|
+
if grep -qE -- '(--merge|-m)([[:space:]]|$)' <<<"$seg"; then echo 'cckit merge [<pr>] --merge (a merge commit; also into an effort/<N> base)'
|
|
79
|
+
elif grep -qE -- '(--rebase|-r)([[:space:]]|$)' <<<"$seg"; then echo 'cckit merge [<pr>] --rebase'
|
|
80
|
+
else echo 'cckit merge [<pr>] [--merge|--rebase] (an effort: cckit effort close <N>)'; fi ;;
|
|
70
81
|
branch) echo 'cckit start <issue> (an effort: cckit effort start <N>)' ;;
|
|
71
82
|
esac
|
|
72
83
|
}
|
|
@@ -109,6 +120,8 @@ branch|git -C /tmp/r switch -c feat/1-x
|
|
|
109
120
|
branch|git worktree add ../wt -b feat/1-x
|
|
110
121
|
branch|git checkout -q -b feat/1-x origin/develop
|
|
111
122
|
|gh issue view 5
|
|
123
|
+
|gh issue close --help
|
|
124
|
+
|gh pr merge -h
|
|
112
125
|
|gh pr list --state open
|
|
113
126
|
|gh pr view 7 --json body
|
|
114
127
|
|git checkout develop
|
|
@@ -130,15 +143,15 @@ CASES
|
|
|
130
143
|
|
|
131
144
|
command -v jq >/dev/null 2>&1 || exit 0
|
|
132
145
|
input="$(cat 2>/dev/null)"
|
|
133
|
-
cmd="$(printf '%s' "$input" | jq -r '.tool_input.command // empty' 2>/dev/null)"
|
|
146
|
+
cmd="$(printf '%s' "$input" | jq -r '.tool_input.command // empty | if type == "array" then (if length > 2 and (.[1] | test("^-[a-z]*c$")) then .[2:] else . end | join(" ")) else . end' 2>/dev/null)"
|
|
134
147
|
[ -z "$cmd" ] && exit 0
|
|
135
148
|
# Cheap prefilter: nothing to inspect unless gh or git appears at all.
|
|
136
|
-
|
|
149
|
+
grep -qE '(^|[^A-Za-z0-9_-])(gh|git)[[:space:]]' <<<"$cmd" || exit 0
|
|
137
150
|
|
|
138
|
-
key=""
|
|
151
|
+
key=""; hit=""
|
|
139
152
|
while IFS= read -r seg; do
|
|
140
153
|
[ -z "$seg" ] && continue
|
|
141
|
-
key="$(_grg_classify "$seg")"; [ -n "$key" ] && break
|
|
154
|
+
key="$(_grg_classify "$seg")"; [ -n "$key" ] && { hit="$seg"; break; }
|
|
142
155
|
done <<< "$(_grg_segments "$cmd")"
|
|
143
156
|
[ -z "$key" ] && exit 0
|
|
144
157
|
|
|
@@ -161,7 +174,7 @@ if [ "$key" = branch ]; then
|
|
|
161
174
|
case "$cur" in "${base:-develop}"|main|master|develop) : ;; *) exit 0 ;; esac
|
|
162
175
|
fi
|
|
163
176
|
|
|
164
|
-
if [ "${KIT_ALLOW_RAW:-}" = 1 ] ||
|
|
177
|
+
if [ "${KIT_ALLOW_RAW:-}" = 1 ] || grep -qE '(^|[^A-Za-z0-9_])KIT_ALLOW_RAW=1([[:space:]]|$)' <<<"$cmd"; then
|
|
165
178
|
common="$(git -C "$dir" rev-parse --path-format=absolute --git-common-dir 2>/dev/null)"
|
|
166
179
|
if [ -n "$common" ]; then
|
|
167
180
|
mkdir -p "$common/cckit" 2>/dev/null
|
|
@@ -174,7 +187,7 @@ fi
|
|
|
174
187
|
|
|
175
188
|
{
|
|
176
189
|
echo "BLOCKED: raw '$key' in a cckit repo. The verb owns the side effects (board, labels, worktree); the raw command skips them silently."
|
|
177
|
-
echo "Run instead: $(_grg_hint "$key")"
|
|
190
|
+
echo "Run instead: $(_grg_hint "$key" "${hit:-}")"
|
|
178
191
|
echo "If the verb is broken, fix the verb. Deliberate one-off: prefix KIT_ALLOW_RAW=1 (recorded in <git-common-dir>/cckit/raw-bypass.log)."
|
|
179
192
|
} >&2
|
|
180
193
|
exit 2
|
|
@@ -53,11 +53,11 @@ dtip=$(git log -1 --format='%h %s' origin/develop 2>/dev/null || echo unknown)
|
|
|
53
53
|
echo "- develop tip: $dtip"
|
|
54
54
|
if [[ "${ahead:-0}" -gt 0 ]]; then
|
|
55
55
|
echo "- unpushed commits ($ahead):"
|
|
56
|
-
git log --format=' - %h %s' "${up:-origin/develop}..HEAD" 2>/dev/null |
|
|
56
|
+
git log --format=' - %h %s' "${up:-origin/develop}..HEAD" 2>/dev/null | sed -n 1,20p
|
|
57
57
|
fi
|
|
58
58
|
if [[ "${dirty:-0}" -gt 0 ]]; then
|
|
59
59
|
echo "- uncommitted changes ($dirty):"
|
|
60
|
-
git status --porcelain 2>/dev/null |
|
|
60
|
+
git status --porcelain 2>/dev/null | sed -n 1,40p | sed 's/^/ - /'
|
|
61
61
|
fi
|
|
62
62
|
st=$(git stash list 2>/dev/null | wc -l | tr -d ' ')
|
|
63
63
|
[[ "${st:-0}" -gt 0 ]] && echo "- stashes present: $st (review: git stash list)"
|
|
@@ -25,7 +25,7 @@ for _cand in "$_dir/../mempal-identity.{{WING}}.txt" "$_dir/../mempal-identity.t
|
|
|
25
25
|
done
|
|
26
26
|
|
|
27
27
|
# No per-wing identity, or output not in the expected L0/L1 shape → pass through verbatim.
|
|
28
|
-
if [ -z "$_id" ] || !
|
|
28
|
+
if [ -z "$_id" ] || ! grep -q '^## L1' <<<"$_wake"; then
|
|
29
29
|
printf '%s\n' "$_wake"
|
|
30
30
|
exit 0
|
|
31
31
|
fi
|
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
# - only acts on Bash commands containing 'git push'
|
|
5
5
|
# - passes (continue:true) if prePush is disabled or no command is configured
|
|
6
6
|
# - blocks (continue:false) only when the configured check command exits non-zero
|
|
7
|
-
# Config
|
|
7
|
+
# Config: .prePush { enabled, command } in .claude/kit.config.json, or in the root
|
|
8
|
+
# cckit.config.json of a project with no .claude/ tree (a Codex-only install).
|
|
8
9
|
set -uo pipefail
|
|
9
10
|
|
|
10
11
|
INPUT="$(cat)"
|
|
11
|
-
CMD="$(printf '%s' "$INPUT" | jq -r '.tool_input.command // ""' 2>/dev/null)"
|
|
12
|
+
CMD="$(printf '%s' "$INPUT" | jq -r '.tool_input.command // "" | if type == "array" then (if length > 2 and (.[1] | test("^-[a-z]*c$")) then .[2:] else . end | join(" ")) else . end' 2>/dev/null)"
|
|
12
13
|
|
|
13
14
|
# Not a push? let it through.
|
|
14
15
|
case "$CMD" in
|
|
@@ -17,6 +18,7 @@ case "$CMD" in
|
|
|
17
18
|
esac
|
|
18
19
|
|
|
19
20
|
CFG=".claude/kit.config.json"
|
|
21
|
+
[[ -f "$CFG" ]] || CFG="cckit.config.json"
|
|
20
22
|
ENABLED="$(jq -r '.prePush.enabled // false' "$CFG" 2>/dev/null)"
|
|
21
23
|
CHECK="$(jq -r '.prePush.command // ""' "$CFG" 2>/dev/null)"
|
|
22
24
|
|
|
@@ -28,8 +28,9 @@ if [[ "$branch" == "main" || "$branch" == "develop" ]]; then
|
|
|
28
28
|
WARN+=("• On '$branch' directly — start work with /task-start <issue> (no direct commits to the base branch).")
|
|
29
29
|
# 2. Non-conventional branch name (not <kind>/<issue>-<slug> and not a bot branch)?
|
|
30
30
|
elif [[ ! "$branch" =~ ^(feat|fix|task|chore|security|scaffold|ci|adr|spike|plan)/[0-9]+- ]] \
|
|
31
|
-
&& [[ ! "$branch" =~ ^(agent|claude)/ ]]
|
|
32
|
-
|
|
31
|
+
&& [[ ! "$branch" =~ ^(agent|claude)/ ]] \
|
|
32
|
+
&& [[ ! "$branch" =~ ^light/[a-z][a-z0-9]+- ]]; then
|
|
33
|
+
WARN+=("• Branch '$branch' doesn't match <kind>/<issue>-<slug> — see the branch-naming rule.")
|
|
33
34
|
fi
|
|
34
35
|
|
|
35
36
|
# 3. Stale base — commits behind the base branch (uses last fetch; no network here)
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
> Scaffolded by [cckit](https://github.com/jeiemgi/cckit) — profile `{{PROFILE}}`.
|
|
4
|
+
> Project config lives in `{{CONFIG_REL}}`. Edit freely; this file is yours now.
|
|
5
|
+
|
|
6
|
+
<!-- IF:ADAPTER_CLAUDE --><!-- 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
|
+
<!-- /IF:ADAPTER_CLAUDE --><!-- IF:ADAPTER_CODEX -->
|
|
25
|
+
## How this project is driven
|
|
26
|
+
|
|
27
|
+
This project runs on [cckit](https://cckit.dev). Every operation is a `cckit` verb you run in the
|
|
28
|
+
shell — read state with `cckit sync --llm` before acting, and append `--llm` to any verb for
|
|
29
|
+
machine-readable output. `cckit init` registers hooks in `.codex/hooks.json`: a guard that blocks a
|
|
30
|
+
commit to the base branch, a guard that blocks raw `gh`/`git` operations a `cckit` verb owns, session
|
|
31
|
+
mail (`cckit msg`), and two session-start checks. Codex runs them only after they are trusted
|
|
32
|
+
(`/hooks`), and a hook is fast feedback, not enforcement — the rules below apply whether or not one
|
|
33
|
+
fires.
|
|
34
|
+
<!-- IF:MEMORY -->
|
|
35
|
+
Memory hooks are not installed for Codex: they read Claude Code transcripts. If a MemPalace MCP
|
|
36
|
+
server is configured, call its tools explicitly (wing `{{WING}}`).
|
|
37
|
+
<!-- /IF:MEMORY -->
|
|
38
|
+
|
|
39
|
+
## Agents
|
|
40
|
+
|
|
41
|
+
`cckit init` installs one Codex custom agent per role in `.codex/agents/<role>.toml`, rendered from
|
|
42
|
+
the same role source as the Claude Code agents. Ask Codex to spawn the matching agent for a domain
|
|
43
|
+
task. A Claude tool allowlist does not translate: the Codex sandbox and approval policy govern each
|
|
44
|
+
agent.
|
|
45
|
+
|
|
46
|
+
{{AGENT_TABLE}}
|
|
47
|
+
<!-- /IF:ADAPTER_CODEX -->
|
|
48
|
+
|
|
49
|
+
## Skills
|
|
50
|
+
|
|
51
|
+
{{SKILL_TABLE}}
|
|
52
|
+
|
|
53
|
+
<!-- IF:ADAPTER_CLAUDE -->Invoke a skill when the user types `/<skill-name>` or when its `when_to_use` matches.<!-- /IF:ADAPTER_CLAUDE --><!-- IF:ADAPTER_CODEX -->Skills live in `.agents/skills/<name>/SKILL.md`. Use one when its description matches the task.<!-- /IF:ADAPTER_CODEX -->
|
|
54
|
+
|
|
55
|
+
<!-- IF:STACK_SKILLS -->
|
|
56
|
+
## Stack conventions (auto-applying skills)
|
|
57
|
+
|
|
58
|
+
Build conventions are **stack-gated skills** — each applies **only when its technology is in this
|
|
59
|
+
project's `package.json`**. Before building features, check which apply:
|
|
60
|
+
|
|
61
|
+
- `feature-build-refine` — when **RefineDev** (`@refinedev/*`) is present
|
|
62
|
+
- `supabase-patterns` — when **Supabase** (`@supabase/supabase-js`) is present
|
|
63
|
+
|
|
64
|
+
If the matching technology isn't in the stack, the skill simply doesn't apply. Add more per
|
|
65
|
+
technology the same way. None are mandatory across the board.
|
|
66
|
+
<!-- /IF:STACK_SKILLS -->
|
|
67
|
+
|
|
68
|
+
<!-- IF:SPECKIT -->
|
|
69
|
+
## Spec-driven development (Spec Kit)
|
|
70
|
+
|
|
71
|
+
This project uses **Spec Kit** for feature work. Build through the SDD lifecycle with review gates:
|
|
72
|
+
|
|
73
|
+
`/speckit-specify → /speckit-clarify → /speckit-plan → /speckit-tasks → /speckit-analyze → /speckit-implement`
|
|
74
|
+
|
|
75
|
+
Run `/speckit-constitution` once per project. The `speckit` skill installs/identifies Spec Kit and
|
|
76
|
+
explains the lifecycle.<!-- IF:STACK_SKILLS --> Any stack convention skill that matches the stack
|
|
77
|
+
becomes the Spec Kit `feature-module.md` override.<!-- /IF:STACK_SKILLS --> Pick one branch authority
|
|
78
|
+
— Spec Kit's git extension OR the kit's `task-*` skills — not both.
|
|
79
|
+
<!-- /IF:SPECKIT -->
|
|
80
|
+
|
|
81
|
+
<!-- IF:LIGHT_TASKS -->
|
|
82
|
+
## Work is tracked as light tasks
|
|
83
|
+
|
|
84
|
+
This project keeps its task list in the project itself, one file per task under `tasks/`, and not
|
|
85
|
+
in GitHub issues (`tasks.default` is `light` in `{{CONFIG_REL}}`). Review is still a pull request.
|
|
86
|
+
|
|
87
|
+
| Step | Command | What it does |
|
|
88
|
+
| ---- | ------- | ------------ |
|
|
89
|
+
| 1. See what is next | `cckit next` · `cckit task list` | The task to take, and every open task with its state |
|
|
90
|
+
| 2. Add work | `cckit task new --kind <post\|campaign\|brand\|research> "<title>"` | Records a task; nothing is shared yet |
|
|
91
|
+
| 3. Start | `cckit task start <id>` | A separate folder and branch for this task; work there |
|
|
92
|
+
| 4. Send for review | `cckit task finish <id> "<summary>" --all` | Opens the pull request; report the link and stop |
|
|
93
|
+
|
|
94
|
+
To hand a whole task to an agent in one step, `cckit task run <id>` does steps 3 and 4: it starts the
|
|
95
|
+
task, runs one unattended round on it behind the project's check (`tasks.check`, or `--check "<cmd>"`),
|
|
96
|
+
and opens the pull request. It opens none when the check fails or the round changed nothing.
|
|
97
|
+
|
|
98
|
+
`--all` includes the files created for the task. Without it `finish` sends only files that already
|
|
99
|
+
existed and lists the new ones it left out, so a new draft would not reach the reviewer.
|
|
100
|
+
|
|
101
|
+
Create a GitHub issue only when {{OWNER_NAME}} asks for one.
|
|
102
|
+
<!-- /IF:LIGHT_TASKS -->
|
|
103
|
+
|
|
104
|
+
## Task management
|
|
105
|
+
|
|
106
|
+
<!-- IF:LIGHT_TASKS -->- **Source of truth:** the task files under `tasks/`, read with `cckit task list` (section above). Do not keep a second list anywhere else.
|
|
107
|
+
- Repo: `{{GH_REPO}}`
|
|
108
|
+
- GitHub issues are for work {{OWNER_NAME}} asks to track there; "PR workflow" below is the path such an issue takes.
|
|
109
|
+
<!-- /IF:LIGHT_TASKS --><!-- IF:ISSUE_TASKS -->- **Source of truth:** GitHub issues<!-- IF:PROJECTS_V2 --> + Projects v2 board (`https://github.com/users/{{GH_OWNER}}/projects/{{PROJECT_NUMBER}}`)<!-- /IF:PROJECTS_V2 -->
|
|
110
|
+
- Repo: `{{GH_REPO}}`
|
|
111
|
+
- **Never** maintain task lists in markdown — use <!-- IF:ADAPTER_CLAUDE -->`gh issue` + the `task-*` skills<!-- /IF:ADAPTER_CLAUDE --><!-- IF:ADAPTER_CODEX -->the `cckit` verbs below<!-- /IF:ADAPTER_CODEX -->
|
|
112
|
+
<!-- /IF:ISSUE_TASKS -->- Milestones: {{MILESTONES_HUMAN}}
|
|
113
|
+
<!-- IF:PLANS -->
|
|
114
|
+
- Plans live in `{{PLANS_DIR}}` (format: `{{PLANS_FORMAT}}`) — see `{{ADAPTER_DIR}}/rules/plan-output-format.md`
|
|
115
|
+
<!-- /IF:PLANS -->
|
|
116
|
+
|
|
117
|
+
## PR workflow
|
|
118
|
+
|
|
119
|
+
<!-- IF:LIGHT_TASKS -->Every task and every issue lands on `{{BASE_BRANCH}}` through a Pull Request. No direct commits to `{{BASE_BRANCH}}`. A light task follows the four steps above; the table below is for a GitHub issue.<!-- /IF:LIGHT_TASKS --><!-- IF:ISSUE_TASKS -->Every issue lands on `{{BASE_BRANCH}}` through a Pull Request. No direct commits to `{{BASE_BRANCH}}`.<!-- /IF:ISSUE_TASKS -->
|
|
120
|
+
|
|
121
|
+
<!-- IF:ADAPTER_CLAUDE -->| Step | Skill | What it does |
|
|
122
|
+
| ----------------- | ------------------ | ------------------------------------------------------- |
|
|
123
|
+
| 1. Pick an issue | `/kit-task-sync` | See the open board, choose what's unblocked |
|
|
124
|
+
| 2. Start work | `/kit-task-start <N>` | Isolated worktree + branch `<kind>/<N>-<slug>` from the base + mark In Progress |
|
|
125
|
+
| 3. Do the work | — | Code, write plans, etc. |
|
|
126
|
+
| 4. Open PR | `/kit-task-pr <N>` | Commit + push + open PR with template/labels/milestone |
|
|
127
|
+
| 5. Review + merge | `/kit-task-pr-merge` | Squash-merge PR, switch to `{{BASE_BRANCH}}`, pull |
|
|
128
|
+
| 6. Close | `/kit-task-close <N>` | Close issue (auto on `Closes #N`) + archive plan |
|
|
129
|
+
<!-- /IF:ADAPTER_CLAUDE --><!-- IF:ADAPTER_CODEX -->| Step | Command | What it does |
|
|
130
|
+
| ----------------- | ------------------------------- | ------------------------------------------------------- |
|
|
131
|
+
| 1. Pick an issue | `cckit sync --llm` | See the open board, choose what's unblocked |
|
|
132
|
+
| 2. Start work | `cckit start <N>` | Isolated worktree + branch `<kind>/<N>-<slug>` from the base |
|
|
133
|
+
| 3. Do the work | — | Work inside the worktree `cckit start` printed |
|
|
134
|
+
| 4. Open PR | `cckit pr <N> "<summary>"` | Commit + push + open PR |
|
|
135
|
+
| 5. Review + merge | — | A human decision; report the PR URL and stop |
|
|
136
|
+
| 6. Close | `cckit close <N> "<summary>"` | Close the issue once its PR merged |
|
|
137
|
+
<!-- /IF:ADAPTER_CODEX -->
|
|
138
|
+
|
|
139
|
+
### Branch naming
|
|
140
|
+
|
|
141
|
+
`<kind>/<issue-number>-<slug>` — kinds: `task`, `plan`, `adr`, `scaffold`, `spike`.
|
|
142
|
+
|
|
143
|
+
### PR conventions
|
|
144
|
+
|
|
145
|
+
- Title = exact issue title · Body includes `Closes #N`
|
|
146
|
+
- Labels + milestone inherited from the issue · One PR per issue (coupled migration chains group into one) · Squash merge, linear history
|
|
147
|
+
|
|
148
|
+
## Rules
|
|
149
|
+
|
|
150
|
+
<!-- IF:ADAPTER_CODEX -->Codex does not load a rules directory on its own. Read the rule that applies before acting:
|
|
151
|
+
|
|
152
|
+
{{RULE_LIST}}
|
|
153
|
+
|
|
154
|
+
<!-- /IF:ADAPTER_CODEX -->- Keep this file tight — point to files, don't duplicate content.
|
|
155
|
+
- Bullets and tables preferred. No long intros.
|
|
156
|
+
- A rule about one kind of file opens with a `paths:` frontmatter (a list of globs) so it loads only when a matching file is read. A rule without it loads into every session.
|
|
157
|
+
- A long rule splits in two: a short rule here, the full reference in `knowledge/`. `scripts/instruction-budget-lint.sh --report` shows what every session pays.
|
|
158
|
+
- Communication style → `{{ADAPTER_DIR}}/rules/communication-style.md`
|
|
159
|
+
<!-- IF:DESIGN -->
|
|
160
|
+
- All design + adjustment questions → Designer agent (`{{ADAPTER_DIR}}/rules/design-routing.md`)
|
|
161
|
+
<!-- /IF:DESIGN -->
|
|
162
|
+
<!-- IF:PLANS -->
|
|
163
|
+
- Plan output format → `{{ADAPTER_DIR}}/rules/plan-output-format.md`
|
|
164
|
+
<!-- /IF:PLANS -->
|
|
165
|
+
<!-- IF:MEMORY -->
|
|
166
|
+
- Persistent memory protocol → `{{ADAPTER_DIR}}/rules/mempalace.md`
|
|
167
|
+
<!-- /IF:MEMORY -->
|
|
168
|
+
<!-- IF:CODEGRAPH -->
|
|
169
|
+
- Code search → ask the code graph first, fall back to Grep/Glob silently (`{{ADAPTER_DIR}}/rules/code-retrieval.md`)
|
|
170
|
+
<!-- /IF:CODEGRAPH -->
|
|
171
|
+
|
|
172
|
+
## Language
|
|
173
|
+
|
|
174
|
+
Default working language: {{COMMS_LANG}}. Match the language {{OWNER_NAME}} uses.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://github.com/
|
|
2
|
+
"$schema": "https://github.com/jeiemgi/cckit/kit.config.schema.json",
|
|
3
3
|
"kitVersion": "0.1.0",
|
|
4
|
+
"adapters": ["claude"],
|
|
4
5
|
"mode": "guided",
|
|
5
6
|
"project": {
|
|
6
7
|
"name": "{{PROJECT_NAME}}",
|
|
7
8
|
"slug": "{{PROJECT_SLUG}}",
|
|
8
9
|
"owner": "{{OWNER_NAME}}",
|
|
9
|
-
"language": "{{COMMS_LANG}}"
|
|
10
|
-
"path": "{{PROJECT_PATH}}"
|
|
10
|
+
"language": "{{COMMS_LANG}}"
|
|
11
11
|
},
|
|
12
12
|
"profile": "{{PROFILE}}",
|
|
13
13
|
"roles": [{{ROLES_JSON}}],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Knowledge Index — {{PROJECT_NAME}}
|
|
2
2
|
|
|
3
|
-
Manifest of the knowledge base. Rules (
|
|
3
|
+
Manifest of the knowledge base. Rules (`{{ADAPTER_DIR}}/rules/knowledge-base.md`):
|
|
4
4
|
|
|
5
5
|
- **If a file exists in `knowledge/`, it is current.** Superseded docs get DELETED — git is the archive.
|
|
6
6
|
- **The latest decision wins.** Conflicts resolve by decision log + `updated` date.
|
|
@@ -33,7 +33,7 @@ kit_color_mode() {
|
|
|
33
33
|
local loc="${LC_ALL:-${LC_CTYPE:-${LANG:-}}}"
|
|
34
34
|
if [ "${KIT_ASCII:-}" = "1" ]; then
|
|
35
35
|
KIT_UNICODE=0
|
|
36
|
-
elif
|
|
36
|
+
elif grep -qiE 'utf-?8' <<<"$loc"; then
|
|
37
37
|
KIT_UNICODE=1
|
|
38
38
|
else
|
|
39
39
|
KIT_UNICODE=0
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Authoring — docs in the same change, prompts without issue numbers, summaries a person can read
|
|
2
|
+
|
|
3
|
+
Three conventions about what gets written alongside the work: the docs, the prompts in those docs,
|
|
4
|
+
and the summary handed back to a person. Each was a correction the kit's maintainer repeated across
|
|
5
|
+
projects before it was written down; they were recorded as cckit effort `E231` on 2026-09-07.
|
|
6
|
+
|
|
7
|
+
Complements `communication-style.md` (format, length, the `concrete` pass on durable prose),
|
|
8
|
+
`naming-and-ids.md` (the `E241` / `#209` / `PR 268` tokens), `plan-next.md` (the docs step in a
|
|
9
|
+
forward plan) and `effort-model.md` (efforts render as `slug #N`). A profile may install only some
|
|
10
|
+
of those; the precedence stated under each convention applies to whichever are present.
|
|
11
|
+
|
|
12
|
+
## 1. Docs and README are acceptance criteria, never a follow-up
|
|
13
|
+
|
|
14
|
+
**A unit of work is not done until the docs it makes untrue are corrected, in the same change.**
|
|
15
|
+
The unit is whatever lands as one reviewed diff: a task PR, or one sub-issue's commit on an effort
|
|
16
|
+
branch.
|
|
17
|
+
|
|
18
|
+
- **Origin:** a stated rule, not an incident — the maintainer made it mandatory that every proposed
|
|
19
|
+
or shipped unit of work updates the docs and the README, small changes included. Until this rule
|
|
20
|
+
it was written down only for `plan-next` output (`plan-next.md` § *The mandatory docs + README
|
|
21
|
+
step*), a rule no profile ships.
|
|
22
|
+
- **What "the docs" means:** every place that states the behaviour the change alters. In most
|
|
23
|
+
projects that is the `README.md`, the agent contract (`CLAUDE.md` / `AGENTS.md`) and the matching
|
|
24
|
+
page of the docs site or knowledge base. Find them by searching for the verb, flag, config key or
|
|
25
|
+
path the change touches; a match the diff leaves stale is unfinished work.
|
|
26
|
+
- **In the issue:** the acceptance criteria of an issue that changes behaviour name the doc
|
|
27
|
+
updates. An issue that omits them still owes them.
|
|
28
|
+
- **In review:** a behaviour change whose diff touches no doc is incomplete. The fix is the doc
|
|
29
|
+
edit in that PR, not a new issue.
|
|
30
|
+
- **What does not count:** "docs to follow" in a PR body, and a docs issue filed to be picked up
|
|
31
|
+
later. Both leave the base branch describing behaviour it no longer has.
|
|
32
|
+
- **When there is nothing to update:** a change with no user-visible or agent-visible behaviour
|
|
33
|
+
(an internal rename, a test) owes no doc edit. Say so in the PR body in one line, so the reviewer
|
|
34
|
+
reads a decision and not an omission.
|
|
35
|
+
|
|
36
|
+
**Precedence — `plan-next.md` § *The mandatory docs + README step*.** That section puts a docs +
|
|
37
|
+
README step at rank 1 of every forward plan and requires the effort scoped from it to keep a docs
|
|
38
|
+
sub-issue. This rule wins on where a sub's own docs go: each sub-issue updates the docs its change
|
|
39
|
+
alters, in its own commit, and does not defer them to the docs sub-issue. The docs sub-issue stays
|
|
40
|
+
for what no single sub owns — an overview, a tutorial, an index page. `plan-next.md` still wins on
|
|
41
|
+
the plan's shape: the step is in every plan it emits.
|
|
42
|
+
|
|
43
|
+
**Precedence — `communication-style.md` § *Durable prose*.** That section governs how a doc is
|
|
44
|
+
worded; this rule governs whether it is written. They do not conflict.
|
|
45
|
+
|
|
46
|
+
## 2. A prompt in a doc never hardcodes an issue number
|
|
47
|
+
|
|
48
|
+
**A prompt the reader is meant to paste — in a tutorial, a README, a runbook, an onboarding page —
|
|
49
|
+
tells the agent to read the board and lets the human pick the work.** It carries no literal issue
|
|
50
|
+
number.
|
|
51
|
+
|
|
52
|
+
- **Origin:** a correction. Tutorial prompts shipped with literal numbers, of the form
|
|
53
|
+
`cckit orchestrate 46 47 48`. Those numbers were issues in the author's repository on the day the
|
|
54
|
+
page was written; in the reader's repository they are other issues, closed ones, or nothing.
|
|
55
|
+
- **Write instead:** *sync the board, show me what is ready, and I will pick.* The agent runs
|
|
56
|
+
`cckit sync`, presents what is unblocked, and the person chooses. Which lane the choice goes to —
|
|
57
|
+
one issue, an effort, a wave, an unattended run — depends on what was picked, so the prompt does
|
|
58
|
+
not fix that either.
|
|
59
|
+
- **In a command line:** a placeholder (`cckit start <issue>`, `cckit orchestrate <issues…>`) or a
|
|
60
|
+
form that selects for itself (`cckit next`, `cckit autopilot --cap 2`).
|
|
61
|
+
- **Verify the verbs.** A prompt is run as written. Check each verb and flag against the CLI
|
|
62
|
+
reference before the page ships; a prompt naming a verb that does not exist fails on the reader's
|
|
63
|
+
first paste.
|
|
64
|
+
|
|
65
|
+
This binds prompts and tutorials, which are instructions for a repository the author has not seen.
|
|
66
|
+
It does not bind a record — a commit message, a PR body, a changelog, an ADR — which cites the real
|
|
67
|
+
number because it describes one repository's history. An example that illustrates a format (the
|
|
68
|
+
`E241` in `naming-and-ids.md`) is not a prompt either.
|
|
69
|
+
|
|
70
|
+
**Precedence — `naming-and-ids.md`.** That rule decides how a reference is written when there is
|
|
71
|
+
one. This rule decides that a pasted prompt has none. For a prompt, this rule wins; everywhere else
|
|
72
|
+
`naming-and-ids.md` stands.
|
|
73
|
+
|
|
74
|
+
## 3. A human-facing summary names the work and carries no machine-flag decoration
|
|
75
|
+
|
|
76
|
+
**A summary written for a person — a status recap, a hand-off, the end-of-task report — leads with
|
|
77
|
+
the name of the work and its outcome.** Two parts:
|
|
78
|
+
|
|
79
|
+
- **No machine-flag decoration.** Do not attach an output-mode variant to a verb you are only
|
|
80
|
+
mentioning: `cckit sync --llm`, `--output=json`, `--porcelain`. The flag tells the reader how a
|
|
81
|
+
program would parse the output, which is not something they asked.
|
|
82
|
+
- **Name the work, with its number.** An effort is written `slug #N` — `auth-hardening #42` — the
|
|
83
|
+
form `effort_display` prints in the kit's own listings. A bare `#42` makes the reader look the
|
|
84
|
+
issue up to learn what it is.
|
|
85
|
+
|
|
86
|
+
- **Origin:** a correction. Recaps carried `cckit … --llm` beside each verb they mentioned, and the
|
|
87
|
+
maintainer's response was that the tags said nothing and were not visually useful. The same
|
|
88
|
+
correction asked for efforts to be named `slug #N` and not by number alone.
|
|
89
|
+
- **A command still belongs in a summary when the reader runs it next.** Then it is written
|
|
90
|
+
exactly as it should be typed, flags included. The test is whether the reader will execute the
|
|
91
|
+
line; a command listed to show what the agent ran is decoration.
|
|
92
|
+
- **Scope:** text a person reads. Output an agent parses, a brief handed to a sub-agent, and the
|
|
93
|
+
machine-read lines `naming-and-ids.md` lists (`- Depends on #N`, `Closes #N`) are not summaries.
|
|
94
|
+
|
|
95
|
+
**Precedence — `naming-and-ids.md`.** That rule writes an effort as `E241`, a pull request as
|
|
96
|
+
`PR 268` and a standalone issue as `#209`, and forbids a bare `#241` for an effort. Where it is
|
|
97
|
+
installed, it wins on the identifier: write `E241`, not `#241`, and `PR 268`. This rule wins on the
|
|
98
|
+
name: `naming-and-ids.md` adds the name on first mention "if the reader needs it"; in a summary the
|
|
99
|
+
first mention always carries it — `E241 auth-hardening`, `#209 the pr-merge cleanup fix`. Where
|
|
100
|
+
`naming-and-ids.md` is not installed (no profile ships it), `slug #N` is the form.
|
|
101
|
+
|
|
102
|
+
**Precedence — `communication-style.md`.** That rule sets format and length (bullets, tables,
|
|
103
|
+
short). This rule adds what a summary must name and what it must leave out. Its § *Durable prose*
|
|
104
|
+
sends commits and PR bodies through `concrete`, which treats flag names as evidence that is never
|
|
105
|
+
cut. That stands: a flag that is evidence — the command that was run and its exit code in a PR
|
|
106
|
+
body — stays. This rule removes only the flag attached to a verb the text merely mentions.
|