@jeiemgi/cckit 0.11.0 → 0.12.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 +45 -41
- package/README.md +39 -29
- package/bin/cckit +111 -70
- package/cckit.config.json +1 -1
- package/package.json +1 -1
- package/scripts/advisor-test.sh +55 -0
- package/scripts/autopilot.sh +4 -4
- package/scripts/capture-project-ids.sh +16 -0
- package/scripts/check.sh +6 -0
- package/scripts/content-skills-test.sh +1 -1
- package/scripts/copilot-loop-test.sh +8 -8
- package/scripts/force-push-fence-test.sh +44 -0
- package/scripts/force-push-fence.baseline +1 -0
- package/scripts/force-push-fence.sh +51 -0
- package/scripts/init.sh +2 -2
- package/scripts/instruction-budget-baseline.txt +1 -1
- package/scripts/kit-doctor-test.sh +5 -0
- package/scripts/kit-doctor.sh +96 -2
- package/scripts/lib/agent-resolve-test.sh +2 -0
- package/scripts/lib/agent-resolve.sh +3 -2
- package/scripts/lib/board-view.sh +3 -3
- package/scripts/lib/captain.sh +1 -1
- package/scripts/lib/copilot-test.sh +4 -4
- package/scripts/lib/copilot.sh +13 -13
- package/scripts/lib/effort-close-subs-test.sh +96 -0
- package/scripts/lib/effort-dispatch-test.sh +2 -2
- package/scripts/lib/effort-ops-test.sh +98 -9
- package/scripts/lib/effort-ops.sh +390 -63
- package/scripts/lib/effort-parity-test.sh +37 -31
- package/scripts/lib/effort-plan.sh +3 -3
- package/scripts/lib/effort-review-test.sh +107 -0
- package/scripts/lib/effort-review.sh +93 -0
- package/scripts/lib/effort-slug-test.sh +4 -0
- package/scripts/lib/effort-slug.sh +5 -4
- package/scripts/lib/effort.sh +47 -74
- package/scripts/lib/forge-github.sh +18 -7
- package/scripts/lib/gh-board-add-test.sh +118 -0
- package/scripts/lib/gh-project-test.sh +115 -0
- package/scripts/lib/gh-project.sh +128 -6
- package/scripts/lib/gh-rest-test.sh +12 -8
- package/scripts/lib/gh-rest.sh +189 -15
- package/scripts/lib/git-core-test.sh +2 -2
- package/scripts/lib/grill-record-test.sh +49 -0
- package/scripts/lib/grill-record.sh +88 -0
- package/scripts/lib/handoff.sh +1 -1
- package/scripts/lib/kit-brief-test.sh +29 -0
- package/scripts/lib/kit-brief.sh +91 -6
- package/scripts/lib/kit-lib-test.sh +1 -1
- package/scripts/lib/kit-lib.sh +7 -7
- package/scripts/lib/kit-msg.sh +3 -3
- package/scripts/lib/kit-status.sh +1 -1
- package/scripts/lib/kit-task-ops-test.sh +17 -0
- package/scripts/lib/kit-task-ops.sh +73 -22
- package/scripts/lib/kto-task-new-test.sh +18 -0
- package/scripts/lib/kto-task-pr-merge-test.sh +44 -0
- package/scripts/lib/kto-task-pr-test.sh +3 -3
- package/scripts/lib/light-task.sh +16 -1
- package/scripts/lib/loose-issues.sh +65 -0
- package/scripts/lib/naming-test.sh +112 -0
- package/scripts/lib/naming-verbs-test.sh +126 -0
- package/scripts/lib/naming.sh +172 -0
- package/scripts/lib/next-test.sh +1 -1
- package/scripts/lib/next.sh +6 -6
- package/scripts/lib/plan-machine.sh +9 -9
- package/scripts/lib/plan-next.sh +4 -4
- package/scripts/lib/qa-lane.sh +1 -1
- package/scripts/lib/spec-lint-test.sh +63 -0
- package/scripts/lib/spec-lint.sh +95 -0
- package/scripts/lib/sprint-test.sh +96 -0
- package/scripts/lib/sprint.sh +216 -0
- package/scripts/lib/stage-receipt-test.sh +132 -0
- package/scripts/lib/stage-receipt.sh +184 -5
- package/scripts/lib/test-forge-shim.sh +2 -1
- package/scripts/lib/verbs.sh +1 -1
- package/scripts/lib/verbs.tsv +17 -15
- package/scripts/lib/worker-brief-test.sh +1 -1
- package/scripts/lib/worker-brief.sh +1 -1
- package/scripts/lib/worktree-start.sh +42 -1
- package/scripts/loose-issues-test.sh +102 -0
- package/scripts/loose-issues.baseline +5 -0
- package/scripts/night-grant.sh +1 -1
- package/scripts/portable-test.sh +1 -1
- package/scripts/status-test.sh +1 -1
- package/scripts/status.sh +4 -4
- package/scripts/task-sync-test.sh +34 -0
- package/scripts/task-sync.sh +81 -1
- package/scripts/terms-check.sh +1 -1
- package/scripts/verbs-ratchet-test.sh +6 -1
- package/scripts/verbs-test.sh +4 -4
- package/scripts/verbs.baseline +1 -1
- package/skills/kit-add/SKILL.md +1 -1
- package/skills/kit-advisor/SKILL.md +75 -0
- package/skills/kit-advisor/references/close.md +53 -0
- package/skills/kit-advisor/references/grill.md +69 -0
- package/skills/kit-advisor/references/orchestrate.md +56 -0
- package/skills/kit-advisor/references/plan.md +64 -0
- package/skills/kit-advisor/references/review.md +47 -0
- package/skills/kit-advisor/references/step-report.md +61 -0
- package/skills/kit-autopilot/SKILL.md +1 -1
- package/skills/kit-cleanup/SKILL.md +2 -2
- package/skills/kit-effort-close/SKILL.md +16 -8
- package/skills/kit-effort-new/SKILL.md +11 -8
- package/skills/kit-effort-pr/SKILL.md +7 -7
- package/skills/kit-next/SKILL.md +7 -7
- package/skills/kit-plan-next/SKILL.md +10 -11
- package/skills/kit-status/SKILL.md +5 -5
- package/skills/kit-task-pr-auto/SKILL.md +1 -1
- package/skills/kit-task-pr-merge/SKILL.md +3 -3
- package/skills/kit-task-sync/SKILL.md +2 -0
- package/skills/routing.yaml +5 -0
- package/templates/hooks/kit-mail-check.sh.tmpl +1 -1
- package/templates/instructions.md.tmpl +3 -3
- package/templates/rules/authoring.md +7 -3
- package/templates/rules/delegation-brief.md +4 -0
- package/templates/rules/effort-model.md +34 -31
- package/templates/rules/gate-and-review.md +1 -1
- package/templates/rules/merge-safety.md +9 -7
- package/templates/rules/naming-and-ids.md +20 -24
- package/templates/rules/plan-next.md +5 -5
- package/templates/skills/campaign/SKILL.md +2 -2
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# shellcheck shell=bash
|
|
3
|
+
# loose-issues-test.sh — the loose-issue count (E546.2) over the forge shim: scripts/lib/loose-issues.sh
|
|
4
|
+
# and `cckit doctor --loose [--ratchet]`. Fixture: an effort, a sub-issue (parent_issue_url), a
|
|
5
|
+
# standalone issue and a pull request -> one loose issue. Then the board marker (Status = Backlog),
|
|
6
|
+
# the ratchet (pass, fail, not judged) and the forge-less run (a skip line, never a silent pass).
|
|
7
|
+
# Run: bash scripts/loose-issues-test.sh
|
|
8
|
+
# errors: strict — a test runner: rc 1 on any failed assertion
|
|
9
|
+
set -u
|
|
10
|
+
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
11
|
+
# shellcheck source=/dev/null
|
|
12
|
+
. "$ROOT/scripts/lib/test-env.sh" && test_env_seal
|
|
13
|
+
DOCTOR="$ROOT/scripts/kit-doctor.sh"
|
|
14
|
+
fail=0
|
|
15
|
+
t() { if [ "$2" = "$3" ]; then echo "ok: $1"; else echo "FAIL: $1 -> got '[$2]' want '[$3]'"; fail=1; fi; }
|
|
16
|
+
has() { if grep -qF -- "$3" <<<"$2"; then echo "ok: $1"; else echo "FAIL: $1 -> '$3' not in: $2"; fail=1; fi; }
|
|
17
|
+
hasnt() { if grep -qF -- "$3" <<<"$2"; then echo "FAIL: $1 -> '$3' found in: $2"; fail=1; else echo "ok: $1"; fi; }
|
|
18
|
+
|
|
19
|
+
command -v jq >/dev/null 2>&1 || { echo "loose-issues-test: jq absent — skipping (dependency-light gate)"; exit 0; }
|
|
20
|
+
|
|
21
|
+
tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT
|
|
22
|
+
tmp="$(cd "$tmp" && pwd -P)"
|
|
23
|
+
# shellcheck source=/dev/null
|
|
24
|
+
. "$ROOT/scripts/lib/test-forge-shim.sh"; forge_shim_install "$tmp/bin"
|
|
25
|
+
export PATH="$tmp/bin:$PATH" GH_TOKEN=test-token CCKIT_FORGE=github
|
|
26
|
+
export GH_LOG="$tmp/gh.log"; : > "$GH_LOG"
|
|
27
|
+
export GH_ISSUES='[
|
|
28
|
+
{"number":10,"title":"[Effort] 10 · demo","state":"open","labels":[{"name":"effort"}]},
|
|
29
|
+
{"number":11,"title":"[Effort 10] 1 · a sub","state":"open","labels":[],"parent_issue_url":"https://api.github.com/repos/o/r/issues/10"},
|
|
30
|
+
{"number":12,"title":"Fix the login","state":"open","labels":[{"name":"kind:fix"}],"parent_issue_url":null},
|
|
31
|
+
{"number":13,"title":"a pull request","state":"open","labels":[],"pull_request":{}}
|
|
32
|
+
]'
|
|
33
|
+
|
|
34
|
+
# project <name> <config-json> -> a throwaway project (git repo, root cckit.config.json); echoes its dir.
|
|
35
|
+
project() {
|
|
36
|
+
mkdir -p "$tmp/$1"
|
|
37
|
+
git -C "$tmp/$1" init -q 2>/dev/null
|
|
38
|
+
printf '%s\n' "$2" > "$tmp/$1/cckit.config.json"
|
|
39
|
+
printf '%s\n' "$tmp/$1"
|
|
40
|
+
}
|
|
41
|
+
off="$(project off '{"github":{"repo":"o/r","projectsV2":false}}')"
|
|
42
|
+
on="$(project on '{"github":{"repo":"o/r","projectsV2":true,"projectNumber":3}}')"
|
|
43
|
+
doctor() { local d="$1"; shift; ( cd "$d" && KIT_ASCII=1 NO_COLOR=1 LC_ALL=C bash "$DOCTOR" "$@" </dev/null 2>"$tmp/err" ); }
|
|
44
|
+
|
|
45
|
+
# ── the library ───────────────────────────────────────────────────────────────────────────────
|
|
46
|
+
# shellcheck source=/dev/null
|
|
47
|
+
. "$ROOT/scripts/lib/loose-issues.sh"
|
|
48
|
+
t "repo: read from github.repo" "$(loose_repo "$off/cckit.config.json")" "o/r"
|
|
49
|
+
t "board off: projectsV2 false" "$(loose_board_on "$off/cckit.config.json" && echo on || echo off)" "off"
|
|
50
|
+
t "board on: projectsV2 true + a number" "$(loose_board_on "$on/cckit.config.json" && echo on || echo off)" "on"
|
|
51
|
+
out="$(loose_issues_list o/r "$off/cckit.config.json")"
|
|
52
|
+
t "effort, sub-issue and PR excluded -> the standalone issue alone" "$out" "$(printf '12\tFix the login')"
|
|
53
|
+
has "the read is GET repos/o/r/issues (open)" "$(cat "$GH_LOG")" "GET repos/o/r/issues?state=open&per_page=100"
|
|
54
|
+
t "a read only: no write request" "$(grep -cvE '^GET ' "$GH_LOG")" "0"
|
|
55
|
+
GH_FAIL_EP='repos/o/r/issues' loose_issues_list o/r "$off/cckit.config.json" >/dev/null 2>&1; rc=$?
|
|
56
|
+
t "a failed read -> rc 1, never zero loose" "$rc" "1"
|
|
57
|
+
|
|
58
|
+
# The board holds the Backlog marker: an issue whose Status is Backlog is not loose.
|
|
59
|
+
backlog='{"data":{"repository":{"issue":{"projectItems":{"nodes":[{"project":{"number":3},"fieldValueByName":{"name":"Backlog"}}]}}}}}'
|
|
60
|
+
todo='{"data":{"repository":{"issue":{"projectItems":{"nodes":[{"project":{"number":3},"fieldValueByName":{"name":"Todo"}}]}}}}}'
|
|
61
|
+
t "board on, Status Backlog -> not loose" "$(GH_GRAPHQL="$backlog" loose_issues_list o/r "$on/cckit.config.json")" ""
|
|
62
|
+
t "board on, Status Todo -> loose" "$(GH_GRAPHQL="$todo" loose_issues_list o/r "$on/cckit.config.json")" "$(printf '12\tFix the login')"
|
|
63
|
+
|
|
64
|
+
# ── cckit doctor --loose ──────────────────────────────────────────────────────────────────────
|
|
65
|
+
out="$(doctor "$off" --loose)"; rc=$?
|
|
66
|
+
has "--loose: one row with the count" "$out" "warn loose issues"
|
|
67
|
+
has "--loose: the count is 1" "$out" "1 in o/r"
|
|
68
|
+
has "--loose, board off: every standalone issue counts, and why" "$out" "no issue can carry the Backlog marker"
|
|
69
|
+
has "--loose: the list names #N title" "$out" "#12 Fix the login"
|
|
70
|
+
hasnt "--loose: the sub-issue is not listed" "$out" "#11 "
|
|
71
|
+
t "--loose: exit 0 (a count, not a gate)" "$rc" "0"
|
|
72
|
+
out="$(GH_GRAPHQL="$backlog" doctor "$on" --loose)"
|
|
73
|
+
has "--loose, board on + Backlog: zero" "$out" "ok loose issues 0 in o/r"
|
|
74
|
+
|
|
75
|
+
# ── the ratchet ───────────────────────────────────────────────────────────────────────────────
|
|
76
|
+
printf '# notes\n1\n' > "$tmp/at1"; printf '0\n' > "$tmp/at0"; printf '3\n' > "$tmp/at3"
|
|
77
|
+
out="$(doctor "$off" --loose --ratchet --baseline="$tmp/at1")"; rc=$?
|
|
78
|
+
t "ratchet: count = baseline -> exit 0" "$rc" "0"
|
|
79
|
+
has "ratchet: says equal" "$out" "1 loose = baseline 1"
|
|
80
|
+
out="$(doctor "$off" --ratchet --baseline="$tmp/at0")"; rc=$?
|
|
81
|
+
t "ratchet: count above baseline -> exit 1" "$rc" "1"
|
|
82
|
+
has "ratchet: names the rise" "$out" "1 loose > baseline 0"
|
|
83
|
+
out="$(doctor "$off" --ratchet --baseline="$tmp/at3")"; rc=$?
|
|
84
|
+
t "ratchet: count below baseline -> exit 0" "$rc" "0"
|
|
85
|
+
has "ratchet: asks to lower the baseline" "$out" "lower the number in $tmp/at3 to 1"
|
|
86
|
+
out="$(doctor "$off" --ratchet --baseline="$tmp/none")"; rc=$?
|
|
87
|
+
t "ratchet: no baseline -> exit 2, not judged" "$rc" "2"
|
|
88
|
+
has "ratchet: no baseline -> says so" "$out" "not judged — no number in"
|
|
89
|
+
t "ratchet: the repo's own baseline file holds a number" \
|
|
90
|
+
"$(loose_baseline_read "$ROOT/scripts/loose-issues.baseline" | grep -cE '^[0-9]+$')" "1"
|
|
91
|
+
|
|
92
|
+
# ── no forge: skipped, said out loud ──────────────────────────────────────────────────────────
|
|
93
|
+
: > "$GH_LOG"
|
|
94
|
+
out="$(CCKIT_FORGE=none GH_TOKEN= doctor "$off" --loose)"; rc=$?
|
|
95
|
+
has "no forge: a skip line" "$out" "loose issues skipped — no forge"
|
|
96
|
+
t "no forge: no request" "$(grep -c . "$GH_LOG")" "0"
|
|
97
|
+
t "no forge, --loose: exit 0" "$rc" "0"
|
|
98
|
+
out="$(CCKIT_FORGE=none GH_TOKEN= doctor "$off" --ratchet --baseline="$tmp/at1")"; rc=$?
|
|
99
|
+
t "no forge, --ratchet: exit 2, never a pass" "$rc" "2"
|
|
100
|
+
has "no forge, --ratchet: not judged" "$out" "not judged — the count was not read"
|
|
101
|
+
|
|
102
|
+
[ "$fail" = "0" ] && echo "ALL OK (loose-issues)" || { echo "loose-issues: FAILURES"; exit 1; }
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# loose-issues.baseline — the loose-issue count `cckit doctor --loose --ratchet` holds the line at
|
|
2
|
+
# (E546.2). A loose issue is open, not an effort, not a sub-issue, and not in Backlog on the board.
|
|
3
|
+
# The number may only go down: when an issue is closed or filed under an effort, lower it in the
|
|
4
|
+
# same change. Not run by scripts/check.sh (the gate stays offline); measured 2026-11-24 with a GET.
|
|
5
|
+
11
|
package/scripts/night-grant.sh
CHANGED
package/scripts/portable-test.sh
CHANGED
|
@@ -126,7 +126,7 @@ t "a refused qa up leaves no lane state in the invoking repo" "$([ -e "$fix/.cc
|
|
|
126
126
|
# A new verb that is neither exercised nor listed here fails the harness — forcing a coverage
|
|
127
127
|
# decision. SKIP holds verbs that mutate, need args, read stdin, are interactive, or act on the
|
|
128
128
|
# install itself (not the invoking project's board) — deliberately not driven here.
|
|
129
|
-
SKIP="adopt autopilot bench brief close commands completions contribute copilot debug digest effort encode-context handoff help hotfix init install merge migrate msg new orchestrate page pr qa receipt release render resume start task ui update version watch"
|
|
129
|
+
SKIP="adopt agent autopilot bench brief close commands completions contribute copilot debug digest effort encode-context handoff help hotfix init install merge migrate msg new orchestrate page pr qa receipt release render resume start task ui update version watch"
|
|
130
130
|
classified() { case " $EXERCISE $SKIP " in *" $1 "*) return 0 ;; *) return 1 ;; esac; }
|
|
131
131
|
for v in $("$CCKIT" commands); do
|
|
132
132
|
classified "$v" || { echo "FAIL: verb '$v' is unclassified — add it to EXERCISE (read-only, assert no own-repo leak) or SKIP in portable-test.sh"; fail=1; }
|
package/scripts/status-test.sh
CHANGED
|
@@ -81,7 +81,7 @@ has "section is present with no efforts" "$out3" "## Next effort per flow"
|
|
|
81
81
|
has "no efforts: states its own emptiness" "$out3" 'No open issue carries the `effort` label'
|
|
82
82
|
has "the section sits before the buckets" "$(printf '%s\n' "$out3" | grep -E '^## ' | tr '\n' '|')" \
|
|
83
83
|
"## Board|## Next effort per flow|## 1 · Local undone work|"
|
|
84
|
-
has "status names the cadence" "$out3" 'Monday: `cckit plan`'
|
|
84
|
+
has "status names the cadence" "$out3" 'Monday: `cckit effort plan --issues`'
|
|
85
85
|
has "status names the Friday step" "$out3" 'Friday: `cckit gc`'
|
|
86
86
|
|
|
87
87
|
# Two flows; core #11 is blocked_by the OPEN core #10, docs #20 is free.
|
package/scripts/status.sh
CHANGED
|
@@ -54,9 +54,9 @@ _status_md() {
|
|
|
54
54
|
echo "open issues: $open blocked: $blocked"
|
|
55
55
|
echo ""
|
|
56
56
|
printf '%s' "$board" | jq -r '.[:8][] | "- #\(.number) \(.title[0:56])"' 2>/dev/null || true
|
|
57
|
-
[ "$open" -gt 8 ] && echo "- … and $((open - 8)) more (\`cckit
|
|
57
|
+
[ "$open" -gt 8 ] && echo "- … and $((open - 8)) more (\`cckit status --board\`)"
|
|
58
58
|
else
|
|
59
|
-
echo "_(jq/gh absent — run \`cckit
|
|
59
|
+
echo "_(jq/gh absent — run \`cckit status --board\`)_"
|
|
60
60
|
fi
|
|
61
61
|
echo ""
|
|
62
62
|
|
|
@@ -82,11 +82,11 @@ _status_md() {
|
|
|
82
82
|
echo '```'
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
# `--
|
|
85
|
+
# `--json` (or `--llm`, or CCKIT_OUTPUT=json, set by the dispatcher) emits the buckets as JSON for an agent —
|
|
86
86
|
# same classifiers as the markdown path, so the two cannot disagree about a verdict.
|
|
87
87
|
for a in "$@"; do
|
|
88
88
|
case "$a" in
|
|
89
|
-
--llm|--output=json) CCKIT_OUTPUT=json ;;
|
|
89
|
+
--json|--llm|--output=json) CCKIT_OUTPUT=json ;;
|
|
90
90
|
esac
|
|
91
91
|
done
|
|
92
92
|
if [ "${CCKIT_OUTPUT:-}" = "json" ]; then
|
|
@@ -153,6 +153,40 @@ has "--plan lists the effort" "$pout" "demo effort"
|
|
|
153
153
|
has "--json --plan carries the plan text" "$(sync --json --plan 2>/dev/null | jq -r '.plan')" "kit effort plan"
|
|
154
154
|
t "--json without --plan has no plan key" "$(printf '%s' "$doc" | jq -r 'has("plan")')" "false"
|
|
155
155
|
|
|
156
|
+
# ── (7) the local board snapshot (E546.9): one greppable line per open issue ─────────────────────
|
|
157
|
+
cat > "$tmp/issues-efforts.json" <<'JSON'
|
|
158
|
+
[ {"number":546,"title":"[Effort] 546 · Traceable work","labels":[{"name":"effort"},{"name":"flow:core"}],"milestone":null,"assignees":[],"updated_at":"2026-11-24T00:00:00Z","body":""},
|
|
159
|
+
{"number":575,"title":"[E546.3] Local board snapshot","labels":[{"name":"kind:feat"}],"milestone":null,"assignees":[],"updated_at":"2026-11-24T00:00:00Z","body":""},
|
|
160
|
+
{"number":600,"title":"Fix the docs link","labels":[],"milestone":null,"assignees":[],"updated_at":"2026-11-24T00:00:00Z","body":""} ]
|
|
161
|
+
JSON
|
|
162
|
+
SNAP="$tmp/snap/board.md"; rm -f "$SNAP"
|
|
163
|
+
ENVV="GH_ISSUES=$tmp/issues-efforts.json CCKIT_BOARD_SNAPSHOT=$SNAP"; serr="$(sync --llm 2>&1 >/dev/null)"
|
|
164
|
+
t "the snapshot is written to CCKIT_BOARD_SNAPSHOT" "$([ -f "$SNAP" ] && echo yes || echo no)" "yes"
|
|
165
|
+
has "sync names the snapshot and how to read it" "$serr" "read with: rg <pattern> $SNAP"
|
|
166
|
+
t "the snapshot has one line per open issue" "$(grep -c '^#[0-9]' "$SNAP")" "3"
|
|
167
|
+
t "an effort line carries its token" "$(grep '^#546' "$SNAP" | cut -f2-5)" "$(printf 'open\teffort\tE546\teffort,flow:core')"
|
|
168
|
+
t "a sub line carries effort.step" "$(grep '^#575' "$SNAP" | cut -f3,4,6)" "$(printf 'sub\tE546.3\t[E546.3] Local board snapshot')"
|
|
169
|
+
t "a standalone line has no token" "$(grep '^#600' "$SNAP" | cut -f3-5)" "$(printf 'issue\t-\t-')"
|
|
170
|
+
t "rg on one number hits one line" "$(grep -c '#575' "$SNAP")" "1"
|
|
171
|
+
t "issues are grouped effort, sub, standalone" "$(grep -E '^(## |#[0-9])' "$SNAP" | cut -f1 | tr '\n' ' ')" "## Efforts #546 ## Sub-issues #575 ## Standalone #600 "
|
|
172
|
+
has "the header names the repo" "$(cat "$SNAP")" "# Board snapshot — octo/fixture"
|
|
173
|
+
has "the header names the command" "$(cat "$SNAP")" "made by: cckit status --board --llm"
|
|
174
|
+
has "the header says rg needs the path" "$(cat "$SNAP")" "gitignored"
|
|
175
|
+
t "the atomic write leaves no temp file" "$(find "$tmp/snap" -name 'board.md.*' | wc -l | tr -d ' ')" "0"
|
|
176
|
+
ENVV="GH_ISSUES=$tmp/issues-efforts.json"; sync >/dev/null 2>&1
|
|
177
|
+
t "the default snapshot lands in the repo's .cckit/" "$(grep -c '^#[0-9]' "$fix/.cckit/board.md" 2>/dev/null)" "3"
|
|
178
|
+
rm -f "$SNAP"
|
|
179
|
+
ENVV="GH_ISSUES=$tmp/issues-efforts.json CCKIT_BOARD_SNAPSHOT=$SNAP"; sync --no-snapshot >/dev/null 2>&1
|
|
180
|
+
t "--no-snapshot writes nothing" "$([ -e "$SNAP" ] && echo yes || echo no)" "no"
|
|
181
|
+
sync --raw-json >/dev/null 2>&1
|
|
182
|
+
t "--raw-json writes no snapshot" "$([ -e "$SNAP" ] && echo yes || echo no)" "no"
|
|
183
|
+
ENVV="CCKIT_FORGE=none CCKIT_BOARD_SNAPSHOT=$SNAP"; nerr="$(sync 2>&1 >/dev/null)"
|
|
184
|
+
t "no forge writes no snapshot" "$([ -e "$SNAP" ] && echo yes || echo no)" "no"
|
|
185
|
+
has "no forge says the snapshot was not written" "$nerr" "no forge — no board snapshot written"
|
|
186
|
+
ENVV="GH_FAIL=1 CCKIT_BOARD_SNAPSHOT=$SNAP"; sync >/dev/null 2>&1
|
|
187
|
+
t "a failed read writes no snapshot" "$([ -e "$SNAP" ] && echo yes || echo no)" "no"
|
|
188
|
+
ENVV=""
|
|
189
|
+
|
|
156
190
|
# ── unchanged surfaces ─────────────────────────────────────────────────────────────────────────
|
|
157
191
|
has "human board still renders" "$(sync 2>/dev/null)" "## Board — octo/fixture"
|
|
158
192
|
t "--raw-json still returns the issue objects" "$(sync --raw-json 2>/dev/null | jq -r '.[0].labels[0].name')" "role:tech-lead"
|
package/scripts/task-sync.sh
CHANGED
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
# --watch [SECS] refresh + write every SECS seconds (default 30); a failed refresh keeps the
|
|
13
13
|
# last good cache. KIT_SYNC_WATCH_MAX=<n> stops after n refreshes
|
|
14
14
|
# --plan inline `effort plan` (a "### Effort plan" section; `plan` in the document)
|
|
15
|
+
# The local snapshot (E546.9): every board read except --raw-json and a --cached hit also writes
|
|
16
|
+
# .cckit/board.md (kit_state_dir: the primary checkout's, shared by every worktree), one
|
|
17
|
+
# tab-separated line per open issue, for `rg`. Atomic (temp file + mv); never written from a failed
|
|
18
|
+
# read or without a forge. --no-snapshot skips it; CCKIT_BOARD_SNAPSHOT=<path> moves it.
|
|
15
19
|
# Every fetch emits op.start / op.done (op "sync") on the kit-events.jsonl bus.
|
|
16
20
|
# --json document: { schema, repo, generatedAt, generatedEpoch, open,
|
|
17
21
|
# roles:[{role, slug, issues:[{number,title,status,priority,milestone,blocked}]}],
|
|
@@ -28,6 +32,8 @@ set -euo pipefail
|
|
|
28
32
|
source "$(dirname "$0")/lib/kit-config.sh" && load_kit_config
|
|
29
33
|
# Pure board-view helpers (merge queue, stale flag, not-on-board flag, Project Status).
|
|
30
34
|
source "$(dirname "$0")/lib/board-view.sh"
|
|
35
|
+
# The shared .cckit/ state dir (kit_state_file) — the snapshot's home.
|
|
36
|
+
source "$(dirname "$0")/lib/kit-state.sh" 2>/dev/null || true
|
|
31
37
|
# The rendering seam (#82): the human board is markdown, routed through cckit_render — rich via glow
|
|
32
38
|
# in a TTY, verbatim markdown otherwise (renders natively in Claude Code, pipe-safe).
|
|
33
39
|
source "$(dirname "$0")/lib/ui.sh" 2>/dev/null || true
|
|
@@ -40,7 +46,8 @@ ROLE_FILTER=""; MS_FILTER=""
|
|
|
40
46
|
# OUT is what goes to stdout: human | json (TOON, the --llm form) | raw-json | doc (--json) | none.
|
|
41
47
|
OUT="${CCKIT_OUTPUT:-human}"; OUT_SET=0
|
|
42
48
|
case "$OUT" in json|raw-json) ;; *) OUT=human ;; esac
|
|
43
|
-
WRITE=0; PLAN=0; CACHED_TTL=""; WATCH_SECS=""
|
|
49
|
+
WRITE=0; PLAN=0; CACHED_TTL=""; WATCH_SECS=""; SNAPSHOT=1
|
|
50
|
+
SYNC_ARGS="$*"
|
|
44
51
|
_is_int() { case "${1:-}" in ''|*[!0-9]*) return 1 ;; *) return 0 ;; esac; }
|
|
45
52
|
while [[ $# -gt 0 ]]; do
|
|
46
53
|
case "$1" in
|
|
@@ -51,6 +58,7 @@ while [[ $# -gt 0 ]]; do
|
|
|
51
58
|
--json) OUT=doc; OUT_SET=1; shift ;;
|
|
52
59
|
--write) WRITE=1; shift ;;
|
|
53
60
|
--plan) PLAN=1; shift ;;
|
|
61
|
+
--no-snapshot) SNAPSHOT=0; shift ;;
|
|
54
62
|
--cached) CACHED_TTL=60; shift; if _is_int "${1:-}"; then CACHED_TTL="$1"; shift; fi ;;
|
|
55
63
|
--watch) WATCH_SECS=30; shift; if _is_int "${1:-}"; then WATCH_SECS="$1"; shift; fi ;;
|
|
56
64
|
*) echo "unknown flag: $1" >&2; exit 1 ;;
|
|
@@ -134,6 +142,74 @@ sync_fetch() {
|
|
|
134
142
|
return 0
|
|
135
143
|
}
|
|
136
144
|
|
|
145
|
+
# sync_snapshot_path — CCKIT_BOARD_SNAPSHOT, else <kit_state_dir>/board.md (one per repository).
|
|
146
|
+
sync_snapshot_path() {
|
|
147
|
+
if [ -n "${CCKIT_BOARD_SNAPSHOT:-}" ]; then printf '%s\n' "$CCKIT_BOARD_SNAPSHOT"; return 0; fi
|
|
148
|
+
if command -v kit_state_file >/dev/null 2>&1; then printf '%s\n' "$(kit_state_file board.md)"; return 0; fi
|
|
149
|
+
printf '%s/.cckit/board.md\n' "$PWD"
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
# sync_snapshot — write the fetched ISSUES to the snapshot, one tab-separated line per open issue:
|
|
153
|
+
# #N status kind token labels title
|
|
154
|
+
# status is the Projects v2 Status when the board is on and was read, else the issue state (open).
|
|
155
|
+
# kind/token follow the title prefix (scripts/lib/naming.sh: [E<n>], [E<n>.<s>], legacy
|
|
156
|
+
# [Effort] N · and [Effort N] M · ) or the `effort` label; a standalone issue is `issue` / `-`.
|
|
157
|
+
# Best-effort: a write that fails says so on stderr and never fails the sync.
|
|
158
|
+
sync_snapshot() {
|
|
159
|
+
[ "$SNAPSHOT" = 1 ] || return 0
|
|
160
|
+
local dest tmpf body
|
|
161
|
+
dest="$(sync_snapshot_path)" || return 0
|
|
162
|
+
body="$(printf '%s' "$ISSUES" | jq -r --argjson st "$STATUS_MAP" --arg repo "$KIT_REPO" \
|
|
163
|
+
--arg at "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg cmd "cckit status --board${SYNC_ARGS:+ $SYNC_ARGS}" \
|
|
164
|
+
--arg path "$dest" '
|
|
165
|
+
def tok: (.title // "") as $t
|
|
166
|
+
| if ($t | test("^\\[E[0-9]+\\.[0-9]+\\] ")) then ($t | capture("^\\[E(?<e>[0-9]+)\\.(?<s>[0-9]+)\\]") | "E\(.e).\(.s)")
|
|
167
|
+
elif ($t | test("^\\[E[0-9]+\\] ")) then ($t | capture("^\\[E(?<e>[0-9]+)\\]") | "E\(.e)")
|
|
168
|
+
elif ($t | test("^\\[Effort [0-9]+\\] [0-9]+ ·")) then ($t | capture("^\\[Effort (?<e>[0-9]+)\\] (?<s>[0-9]+) ·") | "E\(.e).\(.s)")
|
|
169
|
+
elif ($t | test("^\\[Effort\\] [0-9]+ ·")) then ($t | capture("^\\[Effort\\] (?<e>[0-9]+) ·") | "E\(.e)")
|
|
170
|
+
else null end;
|
|
171
|
+
def row: tok as $k
|
|
172
|
+
| (if ($k // "" | contains(".")) then "sub"
|
|
173
|
+
elif $k != null or any(.labels[]?; .name == "effort") then "effort"
|
|
174
|
+
else "issue" end) as $kind
|
|
175
|
+
| { n: .number, kind: $kind,
|
|
176
|
+
token: (if $kind == "issue" then "-" else ($k // "E\(.number)") end),
|
|
177
|
+
status: (($st[(.number | tostring)] // "open") | if . == "—" then "open" else . end),
|
|
178
|
+
labels: ([.labels[]?.name] | join(",") | if . == "" then "-" else . end),
|
|
179
|
+
title: ((.title // "") | gsub("[\t\r\n]"; " ")) };
|
|
180
|
+
def line: "#\(.n)\t\(.status)\t\(.kind)\t\(.token)\t\(.labels)\t\(.title)";
|
|
181
|
+
def section($name; $kind; $rows):
|
|
182
|
+
"", "## \($name)", ([$rows[] | select(.kind == $kind) | line] | if length == 0 then "(none)" else .[] end);
|
|
183
|
+
[.[] | row] | sort_by(.n) as $rows
|
|
184
|
+
| "# Board snapshot — \($repo)",
|
|
185
|
+
"generated-at: \($at)",
|
|
186
|
+
"made by: \($cmd)",
|
|
187
|
+
"read with: rg <pattern> \($path)",
|
|
188
|
+
" (.cckit/ is gitignored, so a bare `rg` skips this file: always give rg the path)",
|
|
189
|
+
"columns: #N<TAB>status<TAB>kind<TAB>effort-token<TAB>labels<TAB>title — open issues only",
|
|
190
|
+
section("Efforts"; "effort"; $rows),
|
|
191
|
+
section("Sub-issues"; "sub"; $rows),
|
|
192
|
+
section("Standalone"; "issue"; $rows)')" \
|
|
193
|
+
|| { echo "sync: could not build the board snapshot — $dest left as it was" >&2; return 0; }
|
|
194
|
+
mkdir -p "$(dirname "$dest")" 2>/dev/null || { echo "sync: cannot create $(dirname "$dest") — no board snapshot" >&2; return 0; }
|
|
195
|
+
tmpf="$dest.$$.tmp"
|
|
196
|
+
if printf '%s\n' "$body" > "$tmpf" 2>/dev/null && mv -f "$tmpf" "$dest" 2>/dev/null; then
|
|
197
|
+
echo "sync: board snapshot $dest (read with: rg <pattern> $dest)" >&2
|
|
198
|
+
else
|
|
199
|
+
rm -f "$tmpf"; echo "sync: could not write the board snapshot $dest" >&2
|
|
200
|
+
fi
|
|
201
|
+
return 0
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
# sync_snapshot_check_forge — without a forge there is no board to snapshot: say so once.
|
|
205
|
+
sync_snapshot_check_forge() {
|
|
206
|
+
[ "$SNAPSHOT" = 1 ] || return 0
|
|
207
|
+
[ "$OUT" = raw-json ] && return 0
|
|
208
|
+
command -v forge_available >/dev/null 2>&1 || return 0
|
|
209
|
+
forge_available && return 0
|
|
210
|
+
forge_note_none sync "no board snapshot written ($(sync_snapshot_path))"
|
|
211
|
+
}
|
|
212
|
+
|
|
137
213
|
# sync_plan — fill PLAN_TEXT with `effort plan` output. Non-zero when the plan cannot be produced.
|
|
138
214
|
sync_plan() {
|
|
139
215
|
local lib; lib="$(dirname "$0")/lib/effort-plan.sh"
|
|
@@ -205,7 +281,9 @@ sync_write() {
|
|
|
205
281
|
sync_refresh() {
|
|
206
282
|
local ok=1
|
|
207
283
|
emit_event op.start sync "{\"mode\":\"$OUT\",\"write\":$WRITE}"
|
|
284
|
+
sync_snapshot_check_forge
|
|
208
285
|
sync_fetch strict || ok=0
|
|
286
|
+
if [ "$ok" = 1 ]; then sync_snapshot; fi
|
|
209
287
|
if [ "$ok" = 1 ] && [ "$PLAN" = 1 ]; then sync_plan || ok=0; fi
|
|
210
288
|
if [ "$ok" = 1 ]; then sync_doc || ok=0; fi
|
|
211
289
|
if [ "$ok" = 1 ] && [ "$WRITE" = 1 ]; then sync_write || ok=0; fi
|
|
@@ -257,7 +335,9 @@ if [ "$OUT" = doc ] || [ "$WRITE" = 1 ]; then
|
|
|
257
335
|
[ "$OUT" = none ] && exit 0
|
|
258
336
|
else
|
|
259
337
|
emit_event op.start sync "{\"mode\":\"$OUT\",\"write\":0}"
|
|
338
|
+
sync_snapshot_check_forge
|
|
260
339
|
sync_fetch lenient || { emit_event op.done sync '{"ok":false}'; echo "sync: could not read the board" >&2; exit 1; }
|
|
340
|
+
[ "$OUT" = raw-json ] || sync_snapshot
|
|
261
341
|
emit_event op.done sync "{\"ok\":true,\"open\":$(printf '%s' "$ISSUES" | jq 'length' 2>/dev/null || echo 0)}"
|
|
262
342
|
fi
|
|
263
343
|
|
package/scripts/terms-check.sh
CHANGED
|
@@ -27,7 +27,7 @@ OUT=human
|
|
|
27
27
|
while [ $# -gt 0 ]; do
|
|
28
28
|
case "$1" in
|
|
29
29
|
--root) ROOT="$(cd "${2:?--root needs a directory}" && pwd)"; shift 2 ;;
|
|
30
|
-
--llm|--output=json) OUT=json; shift ;;
|
|
30
|
+
--json|--llm|--output=json) OUT=json; shift ;;
|
|
31
31
|
-h|--help) sed -n '2,13p' "$0"; exit 0 ;;
|
|
32
32
|
*) echo "terms-check: unknown argument '$1'" >&2; exit 2 ;;
|
|
33
33
|
esac
|
|
@@ -57,8 +57,13 @@ for a in $(verbs_names alias); do
|
|
|
57
57
|
target="$(verbs_alias_target "$a")"
|
|
58
58
|
err="$("$CCKIT" "$a" --help 2>&1 >/dev/null)"
|
|
59
59
|
t "cckit $a: one notice line on stderr" "$err" "$(verbs_alias_notice "$a" "$target")"
|
|
60
|
-
|
|
60
|
+
# A target may carry words after its verb (`status --board`); help answers for the verb.
|
|
61
|
+
tverb="${target%% *}"
|
|
62
|
+
t "cckit $a --help is cckit $tverb --help on stdout" "$("$CCKIT" "$a" --help 2>/dev/null)" "$("$CCKIT" "$tverb" --help 2>/dev/null)"
|
|
61
63
|
done
|
|
64
|
+
# An alias with words in front: they reach the verb ahead of the typed arguments.
|
|
65
|
+
t "cckit lib runs cckit agent lib" "$("$CCKIT" lib --root "$ROOT" 2>/dev/null | sed -n 1p)" "$("$CCKIT" agent lib --root "$ROOT" 2>/dev/null | sed -n 1p)"
|
|
66
|
+
t "cckit agent with no subcommand: rc 2" "$("$CCKIT" agent >/dev/null 2>&1; echo $?)" "2"
|
|
62
67
|
|
|
63
68
|
[ "$fail" -eq 0 ] && echo "ALL OK (verbs-ratchet)" || echo "verbs-ratchet: FAILURES"
|
|
64
69
|
exit "$fail"
|
package/scripts/verbs-test.sh
CHANGED
|
@@ -38,8 +38,8 @@ groups=" $(verbs_names group | tr '\n' ' ') "
|
|
|
38
38
|
bad="$(verbs_rows | awk -F'\t' -v g="$groups" '($2 == "verb" || $2 == "default") && !index(g, " " $4 " ") { print $1 }')"
|
|
39
39
|
t "every verb sits in a declared group" "$bad" ""
|
|
40
40
|
verbs=" $(verbs_names verb default | tr '\n' ' ') "
|
|
41
|
-
bad="$(verbs_rows | awk -F'\t' -v v="$verbs" '$2 == "alias" && !index(v, " "
|
|
42
|
-
t "every alias targets a verb" "$bad" ""
|
|
41
|
+
bad="$(verbs_rows | awk -F'\t' -v v="$verbs" '$2 == "alias" { split($3, w, " ") } $2 == "alias" && !index(v, " " w[1] " ") { print $1 }')"
|
|
42
|
+
t "every alias targets a verb (its first word; later words are arguments)" "$bad" ""
|
|
43
43
|
first="$(verbs_names group | sed -n 1p)"
|
|
44
44
|
t "git mechanics come first in the help" "$first" "git"
|
|
45
45
|
bad="$(verbs_rows | awk -F'\t' '$4 == "git" && $1 !~ /^(start|pr|merge|close|hotfix|task)$/ { print $1 }')"
|
|
@@ -66,8 +66,8 @@ t "cckit commands --llm keeps the array of names" "$("$CCKIT" commands --llm | j
|
|
|
66
66
|
json="$("$CCKIT" commands --json)"
|
|
67
67
|
t "cckit commands --json is valid JSON with one object per name" "$(jq length <<<"$json")" "$(verbs_names | wc -l | tr -d ' ')"
|
|
68
68
|
t "commands --json: start's question" "$(jq -r '.[] | select(.name=="start") | .question' <<<"$json")" "$(verbs_get start 8)"
|
|
69
|
-
t "commands --json: an alias carries its target" "$(jq -r '.[] | select(.name=="copilot") | .target' <<<"$json")" "wave"
|
|
70
|
-
t "commands --json: a multi-line usage is an array" "$(jq -r '.[] | select(.name=="effort") | .usage | length' <<<"$json")" "
|
|
69
|
+
t "commands --json: an alias carries its target" "$(jq -r '.[] | select(.name=="copilot") | .target' <<<"$json")" "effort plan --wave"
|
|
70
|
+
t "commands --json: a multi-line usage is an array" "$(jq -r '.[] | select(.name=="effort") | .usage | length' <<<"$json")" "$(verbs_get effort 10 | awk -F'\\\\n' '{print NF}')"
|
|
71
71
|
has "the completions read cckit commands" "$("$CCKIT" completions bash)" 'cckit commands'
|
|
72
72
|
|
|
73
73
|
# ── 4. the CLI reference page ───────────────────────────────────────────────────────────────────
|
package/scripts/verbs.baseline
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
# The number of `verb` rows in scripts/lib/verbs.tsv may only go down. A rename keeps the old name
|
|
3
3
|
# as an `alias` row, which does not count. When a verb is retired or folded under another, lower
|
|
4
4
|
# this number in the same change; the gate fails until you do.
|
|
5
|
-
|
|
5
|
+
38
|
package/skills/kit-add/SKILL.md
CHANGED
|
@@ -22,7 +22,7 @@ separate step.
|
|
|
22
22
|
|
|
23
23
|
## Steps
|
|
24
24
|
|
|
25
|
-
1. **List.** `cckit add --
|
|
25
|
+
1. **List.** `cckit add --json` returns
|
|
26
26
|
`{"integrations":[{id,label,summary,key,enabled,applies}],"modules":[{id,label}]}`.
|
|
27
27
|
If the user named nothing, show the list and let them pick. Do not offer an integration whose
|
|
28
28
|
`applies` is `false` — the tool cannot work on this repo — and say which one was left out.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kit-advisor
|
|
3
|
+
terms: Advisor
|
|
4
|
+
description: >
|
|
5
|
+
Run project management as a mode of the builder: route a request to its stage (grill, plan,
|
|
6
|
+
orchestrate, review, close), run that stage with the cckit verbs, and end every stage with a step
|
|
7
|
+
report and its trail comment.
|
|
8
|
+
when_to_use: >
|
|
9
|
+
"create an effort", "plan an effort", "plan the sprint", "brief the workers", "review the
|
|
10
|
+
effort", "close the sprint". Not for one issue (kit-ship) or a plan already approved (kit-autopilot).
|
|
11
|
+
metadata:
|
|
12
|
+
version: 1.0.0
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# kit-advisor — the stage router
|
|
16
|
+
|
|
17
|
+
The advisor helps the owner decide the work and then keeps it honest. It writes no code: builders
|
|
18
|
+
do, in their own worktrees. Each stage below has one reference file; read only the one you route to.
|
|
19
|
+
|
|
20
|
+
## 1. Route the request
|
|
21
|
+
|
|
22
|
+
| The request | Stage | Reference |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| a goal with open decisions: "create an effort", "grill me on this" | grill | `references/grill.md` |
|
|
25
|
+
| a grilled goal: "plan the effort", "plan the sprint", "what goes in this week" | plan | `references/plan.md` |
|
|
26
|
+
| a planned effort: "start it", "brief the workers", "run the wave" | orchestrate | `references/orchestrate.md` |
|
|
27
|
+
| landed subs: "review the effort", "is it done", "check the subs" | review | `references/review.md` |
|
|
28
|
+
| a finished sprint or effort: "close the sprint", "retro", "wrap up" | close | `references/close.md` |
|
|
29
|
+
|
|
30
|
+
Pick the earliest stage whose input is missing. A goal with no `## Grilling` record goes to grill,
|
|
31
|
+
even when the request said "plan": a plan built on undecided questions gets planned twice.
|
|
32
|
+
|
|
33
|
+
## 2. Find where the work stands
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
cckit status --board # the open efforts, their subs, what is blocked
|
|
37
|
+
cckit effort sprint name # the current sprint, Monday to Monday
|
|
38
|
+
cckit effort sprint list # the sprints open on the forge, with their counts
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Facts are looked up, never asked: the sprint, the subs, their state and their Specs come from these
|
|
42
|
+
verbs. Only decisions go to the owner.
|
|
43
|
+
|
|
44
|
+
## 3. Run the stage
|
|
45
|
+
|
|
46
|
+
Open its reference and follow it. Every stage uses the verbs it names and nothing else; a step the
|
|
47
|
+
verbs cannot do is a defect in the kit, so report it instead of hand-rolling `git` or `gh` calls.
|
|
48
|
+
|
|
49
|
+
| Stage | Main verbs |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| grill | `cckit page open` · `cckit effort new --grilling-file F` |
|
|
52
|
+
| plan | `cckit effort sprint open` · `cckit effort new --sprint` · `cckit effort sub --spec` · `cckit effort plan --issues --effort N` |
|
|
53
|
+
| orchestrate | `cckit effort start N` · `cckit brief <sub> --skills S --verbs V` · `cckit effort plan --wave --effort N` |
|
|
54
|
+
| review | `cckit effort review N` |
|
|
55
|
+
| close | `cckit effort sprint close` · `cckit effort close N` |
|
|
56
|
+
|
|
57
|
+
## 4. Report the stage
|
|
58
|
+
|
|
59
|
+
Every stage ends with a step report, in this order and no other:
|
|
60
|
+
|
|
61
|
+
**Status · Done · Waiting for a yes · Numbers · Failing or risky · Open questions · Next step**
|
|
62
|
+
|
|
63
|
+
Write it to `.cckit/reports/<YYYY-MM-DD-HHMM>-<effort>-<stage>.md`, then post its trail comment on
|
|
64
|
+
the effort issue:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
cckit agent receipt <issue> --report .cckit/reports/<file>.md
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The template and the rules for each section are in `references/step-report.md`.
|
|
71
|
+
|
|
72
|
+
## 5. Stop where the owner decides
|
|
73
|
+
|
|
74
|
+
Stop and ask at: the grill playback, a plan that adds cost, a sprint close, a release. Everything
|
|
75
|
+
mechanical (start, brief, merge on a green gate, close) the advisor runs and reports.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Stage: close — the sprint review, the retrospective, the effort
|
|
2
|
+
|
|
3
|
+
Input: a reviewed effort, or a sprint whose week is over. Output: the review and retrospective page,
|
|
4
|
+
the milestone closed, the effort merged and closed with its subs.
|
|
5
|
+
|
|
6
|
+
## 1. Close the effort
|
|
7
|
+
|
|
8
|
+
Only after `cckit effort review <N>` exits 0 and the Spec items held (`references/review.md`):
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
cckit effort close <N> # merge the one PR, close the parent and every sub, clean the branch
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
It refuses an effort whose parent has no checkable `## Spec`. A refusal is a fact for the report;
|
|
15
|
+
`--no-spec-check` is the owner's call, never the advisor's.
|
|
16
|
+
|
|
17
|
+
## 2. Close the sprint
|
|
18
|
+
|
|
19
|
+
At the end of the week, with the owner. Draft the review (what the sprint goal promised, what
|
|
20
|
+
shipped) and the retrospective (what to keep, what to change), then preview the page:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
cckit effort sprint close --review-file review.md --retro-file retro.md --dry-run
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The page lists the sprint goal, the issues done and the issues carried over, from the milestone.
|
|
27
|
+
Show it to the owner as a review page when the session can show one:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
cckit page mode
|
|
31
|
+
cckit page open <sprint.html> --fallback .cckit/reports/<date>-sprint-<YYYY-Www>.md
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Stop there and wait for a yes. The close writes the page and closes the milestone:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
cckit effort sprint close --review-file review.md --retro-file retro.md
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Carried-over issues stay open. Move them to the next sprint with `cckit effort sprint open` and
|
|
41
|
+
their milestone, or drop them from the plan; say which in the report.
|
|
42
|
+
|
|
43
|
+
## 3. Report
|
|
44
|
+
|
|
45
|
+
Write the step report in the order Status · Done · Waiting for a yes · Numbers · Failing or risky ·
|
|
46
|
+
Open questions · Next step (`references/step-report.md`), then post its trail comment:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
cckit agent receipt <N> --report .cckit/reports/<file>.md
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Numbers: issues done and carried over, efforts closed. Waiting for a yes: the sprint close itself,
|
|
53
|
+
and any release, which this stage never runs.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Stage: grill — one interview, a playback, a record
|
|
2
|
+
|
|
3
|
+
Input: a goal with open decisions. Output: a confirmed `## Grilling` record that
|
|
4
|
+
`cckit effort new` accepts.
|
|
5
|
+
|
|
6
|
+
## 1. Look the facts up first
|
|
7
|
+
|
|
8
|
+
Read the board, the code and the issues the goal touches. A question whose answer is in the repo
|
|
9
|
+
is never asked. Only decisions go to the owner: scope, trade-offs, order, names, cost.
|
|
10
|
+
|
|
11
|
+
## 2. One interview
|
|
12
|
+
|
|
13
|
+
Put every open question on one page, at once:
|
|
14
|
+
|
|
15
|
+
- one line per question, two or three short choices, the recommendation preselected and marked;
|
|
16
|
+
- an optional free-text field per question, and one at the end for what the interview missed;
|
|
17
|
+
- one submit: the answers come back together.
|
|
18
|
+
|
|
19
|
+
Open it as a review page when this session can show one; `cckit page mode` decides, and terminal
|
|
20
|
+
mode prints the same questions as one numbered message:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
cckit page mode
|
|
24
|
+
cckit page open <interview.html> --fallback <interview.md>
|
|
25
|
+
cckit page poll <interview.html>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## 3. Play it back
|
|
29
|
+
|
|
30
|
+
Before anything is filed, answer with "what I understood": the decisions numbered, a diagram when
|
|
31
|
+
the plan has moving parts, and your own interpretations marked as yours. The owner confirms or
|
|
32
|
+
corrects. Only a confirmed playback becomes the record. An answer that opens a new question goes
|
|
33
|
+
into a second, smaller interview, never a lone question.
|
|
34
|
+
|
|
35
|
+
## 4. Record it
|
|
36
|
+
|
|
37
|
+
Write the confirmed record to a file in this shape:
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
Grilled: <who>, <YYYY-MM-DD>, <where>.
|
|
41
|
+
1. <decision>
|
|
42
|
+
2. <decision>
|
|
43
|
+
3. <decision>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- The first line starts `Grilled:` and names who was grilled; a `YYYY-MM-DD` date is in the record.
|
|
47
|
+
- At least 3 decisions as column-0 `1.` items, or a link to the issue comment that holds them.
|
|
48
|
+
- Nothing to decide: the single line `waived: <reason>`.
|
|
49
|
+
- An unattended run writes `Grilled: <agent> (assumed), <date>` and lists what it assumed.
|
|
50
|
+
|
|
51
|
+
Then file it with the effort (the plan stage does this):
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
cckit effort new --spec-file spec.md --grilling-file grilling.md "<name>"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`effort new` lints the record before any forge write (`scripts/lib/grill-record.sh`) and refuses
|
|
58
|
+
one that names nobody, carries no date or holds fewer than 3 decisions.
|
|
59
|
+
|
|
60
|
+
## 5. Report
|
|
61
|
+
|
|
62
|
+
Write the step report in the order Status · Done · Waiting for a yes · Numbers · Failing or risky ·
|
|
63
|
+
Open questions · Next step (`references/step-report.md`), then post its trail comment:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
cckit agent receipt <issue> --report .cckit/reports/<file>.md
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Waiting for a yes holds the playback until the owner confirms it.
|