@jeiemgi/cckit 0.10.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 +136 -127
- package/README.md +66 -43
- package/bin/cckit +151 -181
- package/cckit.config.json +1 -4
- package/package.json +1 -1
- package/scripts/advisor-test.sh +55 -0
- package/scripts/autopilot-run-test.sh +20 -12
- package/scripts/autopilot-run.sh +9 -1
- package/scripts/autopilot-test.sh +29 -13
- package/scripts/autopilot.sh +4 -4
- package/scripts/benchmark/verb-timings-test.sh +4 -0
- package/scripts/benchmark/verb-timings.sh +16 -5
- package/scripts/capture-project-ids.sh +23 -1
- package/scripts/check.sh +25 -0
- package/scripts/content-skills-test.sh +1 -1
- package/scripts/contribute.sh +8 -3
- package/scripts/copilot-loop-test.sh +66 -81
- package/scripts/exec-targets-test.sh +20 -0
- 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/forge-fence-test.sh +69 -0
- package/scripts/forge-fence.baseline +2 -0
- package/scripts/forge-fence.sh +76 -0
- package/scripts/forge-report-test.sh +100 -0
- package/scripts/forge-report.sh +176 -0
- package/scripts/init-guided-test.sh +94 -82
- package/scripts/init.sh +12 -7
- package/scripts/install-test.sh +26 -0
- package/scripts/install.sh +7 -0
- package/scripts/instruction-budget-baseline.txt +1 -1
- package/scripts/kit-doctor-test.sh +60 -12
- package/scripts/kit-doctor.sh +170 -77
- package/scripts/lib/agent-resolve-test.sh +2 -0
- package/scripts/lib/agent-resolve.sh +15 -8
- package/scripts/lib/board-view.sh +3 -3
- package/scripts/lib/captain.sh +37 -8
- package/scripts/lib/content-kinds-gc-test.sh +22 -21
- package/scripts/lib/copilot-test.sh +20 -11
- package/scripts/lib/copilot.sh +19 -13
- package/scripts/lib/effort-close-subs-test.sh +96 -0
- package/scripts/lib/effort-dispatch-test.sh +5 -3
- package/scripts/lib/effort-metrics-test.sh +7 -12
- package/scripts/lib/effort-metrics.sh +17 -46
- package/scripts/lib/effort-ops-test.sh +261 -167
- package/scripts/lib/effort-ops.sh +449 -171
- package/scripts/lib/effort-parity-test.sh +57 -62
- package/scripts/lib/effort-plan-test.sh +56 -54
- package/scripts/lib/effort-plan.sh +14 -7
- package/scripts/lib/effort-review-test.sh +107 -0
- package/scripts/lib/effort-review.sh +93 -0
- package/scripts/lib/effort-slug-test.sh +34 -14
- package/scripts/lib/effort-slug.sh +13 -13
- package/scripts/lib/effort.sh +58 -80
- package/scripts/lib/forge-github.sh +260 -0
- package/scripts/lib/forge-none.sh +24 -0
- package/scripts/lib/forge-test.sh +186 -0
- package/scripts/lib/forge.sh +133 -0
- package/scripts/lib/gh-board-add-test.sh +118 -0
- package/scripts/lib/gh-project-test.sh +151 -31
- package/scripts/lib/gh-project.sh +139 -11
- package/scripts/lib/gh-rest-test.sh +63 -118
- package/scripts/lib/gh-rest.sh +275 -52
- package/scripts/lib/git-core-test.sh +128 -0
- 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/init-github.sh +38 -13
- package/scripts/lib/kinds-test.sh +13 -16
- package/scripts/lib/kit-brief-test.sh +51 -10
- package/scripts/lib/kit-brief.sh +103 -18
- package/scripts/lib/kit-gc-test.sh +90 -109
- package/scripts/lib/kit-gc.sh +19 -22
- package/scripts/lib/kit-hotfix.sh +18 -16
- package/scripts/lib/kit-interview.sh +6 -0
- 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 +19 -14
- package/scripts/lib/kit-task-ops-test.sh +20 -1
- package/scripts/lib/kit-task-ops.sh +177 -94
- package/scripts/lib/kto-hotfix-test.sh +53 -58
- package/scripts/lib/kto-task-close-test.sh +28 -27
- package/scripts/lib/kto-task-new-test.sh +55 -48
- package/scripts/lib/kto-task-pr-merge-test.sh +77 -41
- package/scripts/lib/kto-task-pr-test.sh +30 -34
- package/scripts/lib/light-task-run-test.sh +19 -15
- package/scripts/lib/light-task-test.sh +34 -29
- package/scripts/lib/light-task.sh +24 -13
- 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 +27 -22
- package/scripts/lib/next.sh +13 -7
- package/scripts/lib/orchestration-runtime-test.sh +11 -8
- package/scripts/lib/plan-machine.sh +22 -16
- package/scripts/lib/plan-next.sh +4 -4
- package/scripts/lib/pr-evidence-test.sh +63 -74
- package/scripts/lib/pr-evidence.sh +15 -12
- package/scripts/lib/qa-lane-test.sh +59 -27
- package/scripts/lib/qa-lane.sh +14 -6
- package/scripts/lib/review-page-test.sh +34 -25
- package/scripts/lib/review-page.sh +10 -4
- 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 +169 -19
- package/scripts/lib/stage-receipt.sh +195 -10
- package/scripts/lib/test-forge-shim.sh +115 -0
- package/scripts/lib/verbs.sh +105 -0
- package/scripts/lib/verbs.tsv +92 -0
- package/scripts/lib/version-bump-test.sh +20 -0
- package/scripts/lib/version-bump.sh +4 -2
- package/scripts/lib/worker-brief-test.sh +1 -1
- package/scripts/lib/worker-brief.sh +1 -1
- package/scripts/lib/worktree-issue-test.sh +24 -19
- package/scripts/lib/worktree-issue.sh +10 -10
- package/scripts/lib/worktree-start-test.sh +13 -16
- package/scripts/lib/worktree-start.sh +57 -7
- package/scripts/loose-issues-test.sh +102 -0
- package/scripts/loose-issues.baseline +5 -0
- package/scripts/marketing-walkthrough-test.sh +25 -30
- package/scripts/night-grant.sh +14 -8
- package/scripts/night-run.mjs +1 -1
- package/scripts/orchestrate-test.sh +27 -31
- package/scripts/orchestrate.sh +9 -3
- package/scripts/portable-test.sh +37 -36
- package/scripts/publish.sh +9 -3
- package/scripts/setup-labels.sh +23 -12
- package/scripts/setup-milestones.sh +8 -2
- package/scripts/status-test.sh +39 -33
- package/scripts/status.sh +12 -6
- package/scripts/task-sync-test.sh +75 -32
- package/scripts/task-sync.sh +97 -6
- package/scripts/terms-check-test.sh +191 -0
- package/scripts/terms-check.sh +242 -0
- package/scripts/verbs-gen.sh +43 -0
- package/scripts/verbs-help-test.sh +61 -0
- package/scripts/verbs-ratchet-test.sh +69 -0
- package/scripts/verbs-ratchet.sh +34 -0
- package/scripts/verbs-test.sh +120 -0
- package/scripts/verbs.baseline +5 -0
- package/skills/kit-add/SKILL.md +2 -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-annotate/SKILL.md +1 -0
- package/skills/kit-autopilot/SKILL.md +2 -1
- package/skills/kit-cleanup/SKILL.md +3 -2
- package/skills/kit-contribute/SKILL.md +1 -0
- package/skills/kit-customize/SKILL.md +1 -0
- package/skills/kit-dev/SKILL.md +1 -0
- package/skills/kit-digest/SKILL.md +1 -0
- package/skills/kit-docs-writer/SKILL.md +4 -3
- package/skills/kit-effort-close/SKILL.md +18 -9
- package/skills/kit-effort-new/SKILL.md +12 -8
- package/skills/kit-effort-pr/SKILL.md +8 -7
- package/skills/kit-effort-start/SKILL.md +1 -0
- package/skills/kit-gc/SKILL.md +1 -0
- package/skills/kit-next/SKILL.md +8 -7
- package/skills/kit-onboard/SKILL.md +1 -0
- package/skills/kit-page/SKILL.md +1 -0
- package/skills/kit-plan-next/SKILL.md +11 -11
- package/skills/kit-security-sweep/SKILL.md +1 -0
- package/skills/kit-ship/SKILL.md +1 -0
- package/skills/kit-status/SKILL.md +6 -5
- package/skills/kit-task-close/SKILL.md +1 -0
- package/skills/kit-task-new/SKILL.md +1 -0
- package/skills/kit-task-pr/SKILL.md +1 -0
- package/skills/kit-task-pr-auto/SKILL.md +2 -1
- package/skills/kit-task-pr-merge/SKILL.md +4 -3
- package/skills/kit-task-start/SKILL.md +1 -0
- package/skills/kit-task-sync/SKILL.md +3 -0
- package/skills/kit-ux-audit/SKILL.md +1 -0
- package/skills/routing.yaml +124 -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
- package/scripts/lib/engine-adapter.sh +0 -93
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# shellcheck shell=bash
|
|
3
|
+
# effort-review.sh — `cckit effort review <N>` (E547, #583): check each sub of an effort against its
|
|
4
|
+
# own `## Spec`, one verdict line per sub. A read: it writes nothing on the forge or in git.
|
|
5
|
+
#
|
|
6
|
+
# effort_review <N> [--branch B]
|
|
7
|
+
#
|
|
8
|
+
# Per sub it reads the forge state and the body, runs spec_lint on the body, and looks on the
|
|
9
|
+
# effort branch (`effort/<N>-*`, local or origin, or --branch) for a commit that names the sub
|
|
10
|
+
# (`#<sub>`). Verdicts, first match wins:
|
|
11
|
+
# no spec the sub's body has no checkable `## Spec` — nothing to review against
|
|
12
|
+
# done closed, and on the branch (or no branch found to check)
|
|
13
|
+
# closed, not on the branch closed on the forge, but no commit on the effort branch names it
|
|
14
|
+
# landed, still open a commit names it, the issue is still open
|
|
15
|
+
# open neither
|
|
16
|
+
# Output: a TSV table (sub, state, spec, landed, verdict, title), then `review #N: D of M done`.
|
|
17
|
+
# rc 0 when every sub is done · 1 when one is not, or the forge read failed · 2 usage.
|
|
18
|
+
# bash 3.2 compatible.
|
|
19
|
+
# errors: strict — a check: rc 1 on any sub that is not done
|
|
20
|
+
|
|
21
|
+
if ! command -v spec_lint >/dev/null 2>&1; then
|
|
22
|
+
# shellcheck source=/dev/null
|
|
23
|
+
. "$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)/spec-lint.sh"
|
|
24
|
+
fi
|
|
25
|
+
if ! command -v forge_rest >/dev/null 2>&1 && ! command -v gh_rest_issue_json >/dev/null 2>&1; then
|
|
26
|
+
# shellcheck source=/dev/null
|
|
27
|
+
. "$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)/gh-rest.sh"
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
# _er_branch <N> — the effort branch: a local `effort/<N>-*`, else origin's. Empty when neither.
|
|
31
|
+
_er_branch() {
|
|
32
|
+
git for-each-ref --format='%(refname:short)' "refs/heads/effort/$1-*" "refs/remotes/origin/effort/$1-*" 2>/dev/null | sed -n 1p
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
# effort_review_verdict <state> <spec ok|none> <landed yes|no|-> — the verdict for one sub. Pure.
|
|
36
|
+
effort_review_verdict() {
|
|
37
|
+
local state="$1" spec="$2" landed="$3"
|
|
38
|
+
if [ "$spec" != ok ]; then echo "no spec"; return; fi
|
|
39
|
+
case "$state:$landed" in
|
|
40
|
+
closed:yes|closed:-) echo "done" ;;
|
|
41
|
+
closed:no) echo "closed, not on the branch" ;;
|
|
42
|
+
open:yes) echo "landed, still open" ;;
|
|
43
|
+
*) echo "open" ;;
|
|
44
|
+
esac
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
effort_review() {
|
|
48
|
+
local num="" branch="" repo subs n i sub state title body spec landed verdict log done_n=0
|
|
49
|
+
while [ $# -gt 0 ]; do
|
|
50
|
+
case "$1" in
|
|
51
|
+
--branch) [ $# -ge 2 ] || { echo "effort review: --branch needs a name" >&2; return 2; }; branch="$2"; shift 2 ;;
|
|
52
|
+
--branch=*) branch="${1#--branch=}"; shift ;;
|
|
53
|
+
-*) echo "effort review: unknown flag '$1'" >&2; return 2 ;;
|
|
54
|
+
*) [ -z "$num" ] || { echo "effort review: one effort at a time" >&2; return 2; }; num="${1#\#}"; shift ;;
|
|
55
|
+
esac
|
|
56
|
+
done
|
|
57
|
+
case "$num" in ''|*[!0-9]*) echo "usage: cckit effort review <N> [--branch B]" >&2; return 2 ;; esac
|
|
58
|
+
forge_need "effort review" || return 1
|
|
59
|
+
command -v jq >/dev/null 2>&1 || { echo "effort review: jq is required" >&2; return 1; }
|
|
60
|
+
repo="${EFFORT_REPO:-${KIT_REPO:-}}"
|
|
61
|
+
[ -n "$repo" ] || repo="$(forge_repo_from_git 2>/dev/null)" || { echo "effort review: no repository (github.repo unset)" >&2; return 1; }
|
|
62
|
+
|
|
63
|
+
subs="$(forge_rest "repos/$repo/issues/$num/sub_issues" -X GET -f per_page=100 \
|
|
64
|
+
--jq '[.[] | {number, state, title, body: (.body // "")}] | tojson' 2>&1)" || {
|
|
65
|
+
printf 'effort review: could not read the subs of #%s\n%s\n' "$num" "$subs" >&2; return 1; }
|
|
66
|
+
n="$(printf '%s' "$subs" | jq 'length')"
|
|
67
|
+
[ "${n:-0}" -gt 0 ] || { echo "effort review: #$num has no sub-issues" >&2; return 1; }
|
|
68
|
+
|
|
69
|
+
[ -n "$branch" ] || branch="$(_er_branch "$num")"
|
|
70
|
+
log=""
|
|
71
|
+
if [ -n "$branch" ]; then
|
|
72
|
+
log="$(git log --format=%B "$branch" 2>/dev/null)" || { echo "effort review: cannot read branch '$branch'" >&2; return 1; }
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
printf 'sub\tstate\tspec\tlanded\tverdict\ttitle\n'
|
|
76
|
+
i=0
|
|
77
|
+
while [ "$i" -lt "$n" ]; do
|
|
78
|
+
sub="$(printf '%s' "$subs" | jq -r ".[$i].number")"
|
|
79
|
+
state="$(printf '%s' "$subs" | jq -r ".[$i].state")"
|
|
80
|
+
title="$(printf '%s' "$subs" | jq -r ".[$i].title")"
|
|
81
|
+
body="$(printf '%s' "$subs" | jq -r ".[$i].body")"
|
|
82
|
+
if spec_lint "$body" 2>/dev/null; then spec=ok; else spec=none; fi
|
|
83
|
+
if [ -z "$branch" ]; then landed="-"
|
|
84
|
+
elif grep -qE "(^|[^0-9A-Za-z])#$sub([^0-9]|$)" <<<"$log"; then landed=yes
|
|
85
|
+
else landed=no; fi
|
|
86
|
+
verdict="$(effort_review_verdict "$state" "$spec" "$landed")"
|
|
87
|
+
[ "$verdict" = done ] && done_n=$((done_n + 1))
|
|
88
|
+
printf '#%s\t%s\t%s\t%s\t%s\t%s\n' "$sub" "$state" "$spec" "$landed" "$verdict" "$title"
|
|
89
|
+
i=$((i + 1))
|
|
90
|
+
done
|
|
91
|
+
printf 'review #%s: %s of %s done%s\n' "$num" "$done_n" "$n" "${branch:+ (branch $branch)}"
|
|
92
|
+
[ "$done_n" -eq "$n" ]
|
|
93
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# effort-slug-test.sh — covers the effort slug layer (#93/#94/#96): slug derivation (doubling fix),
|
|
4
4
|
# `slug #N` display, and effort_slug_resolve (number passthrough, branch match, ambiguity, no-match,
|
|
5
5
|
# slug:<slug> label vs title-derived precedence). Hermetic: a throwaway git repo with effort/* branches
|
|
6
|
-
# +
|
|
6
|
+
# + the forge shim (no network/auth). Run: bash scripts/lib/effort-slug-test.sh
|
|
7
7
|
# errors: strict — a test runner: rc 1 on any failed assertion
|
|
8
8
|
set -u
|
|
9
9
|
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
@@ -16,20 +16,21 @@ command -v git >/dev/null 2>&1 || { echo "effort-slug-test: git required" >&2; e
|
|
|
16
16
|
|
|
17
17
|
tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT
|
|
18
18
|
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
#
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
# The forge shim (test-forge-shim.sh) makes the issue-based fallback deterministic: the open issue
|
|
20
|
+
# list carries #205 "[Effort] 205 · [Core] Title Only Effort" (title-derived match), and a fixture
|
|
21
|
+
# answers the slug:explicit-handle label query with #207; any other slug: label matches nothing.
|
|
22
|
+
stub="$tmp/bin"
|
|
23
|
+
# shellcheck source=/dev/null
|
|
24
|
+
. "$LIB/test-forge-shim.sh"; forge_shim_install "$stub"
|
|
25
|
+
export PATH="$stub:$PATH" GH_TOKEN=test-token CCKIT_FORGE=github GH_LOG="$tmp/gh.log"
|
|
26
|
+
export GH_ISSUES='[{"number":205,"title":"[Effort] 205 · [Core] Title Only Effort","state":"open","labels":[]},{"number":206,"title":"plain issue","state":"open","labels":[]}]'
|
|
27
|
+
export GH_FIXTURE="$tmp/fixture.sh"
|
|
28
|
+
cat > "$GH_FIXTURE" <<'SH'
|
|
29
|
+
case "$method $path" in
|
|
30
|
+
"GET repos/o/r/issues?"*"labels=slug%3Aexplicit-handle"*) out='[{"number":207,"title":"[Effort] 207 · handle","state":"open","labels":[{"name":"slug:explicit-handle"}]}]' ;;
|
|
31
|
+
"GET repos/o/r/issues?"*"labels=slug%3A"*) out='[]' ;;
|
|
29
32
|
esac
|
|
30
33
|
SH
|
|
31
|
-
chmod +x "$stub/gh"
|
|
32
|
-
export PATH="$stub:$PATH"
|
|
33
34
|
export EFFORT_REPO="o/r" KIT_REPO="o/r"
|
|
34
35
|
|
|
35
36
|
# shellcheck source=/dev/null
|
|
@@ -42,6 +43,10 @@ t "_eff_title_slug peels prefix + flow (sub)" \
|
|
|
42
43
|
"$(_eff_title_slug '[Effort 93] 2 · [UI] Accept slug in commands')" "accept-slug-in-commands"
|
|
43
44
|
t "_eff_title_slug without a flow tag" \
|
|
44
45
|
"$(_eff_title_slug '[Effort] 12 · plain outcome name')" "plain-outcome-name"
|
|
46
|
+
t "_eff_title_slug peels the [E<n>] prefix" \
|
|
47
|
+
"$(_eff_title_slug '[E93] Slug handles for efforts')" "slug-handles-for-efforts"
|
|
48
|
+
t "_eff_title_slug peels the [E<n>.<step>] prefix" \
|
|
49
|
+
"$(_eff_title_slug '[E93.2] Accept slug in commands')" "accept-slug-in-commands"
|
|
45
50
|
t "_eff_slug lowercases + dashes arbitrary text" \
|
|
46
51
|
"$(_eff_slug 'Some Mixed CASE!!')" "some-mixed-case"
|
|
47
52
|
|
|
@@ -75,15 +80,30 @@ rc "ambiguous slug returns nonzero rc" "$r" "1"
|
|
|
75
80
|
case "$out" in *ambiguous*) echo "ok: ambiguous slug explains itself" ;; *) echo "FAIL: ambiguous message: $out"; fail=1 ;; esac
|
|
76
81
|
git branch -D effort/103-resolve-slug >/dev/null 2>&1
|
|
77
82
|
|
|
78
|
-
# ──
|
|
83
|
+
# ── forge fallback: slug:<slug> label wins; title-derived used when no branch/label matches ────
|
|
84
|
+
: > "$GH_LOG"
|
|
79
85
|
t "resolve via slug label (no branch)" "$(effort_slug_resolve explicit-handle)" "207"
|
|
86
|
+
t "the label lookup is one REST read of the open issues" \
|
|
87
|
+
"$(grep -c '^GET repos/o/r/issues?state=open&labels=slug%3Aexplicit-handle&per_page=100 $' "$GH_LOG")" "1"
|
|
88
|
+
: > "$GH_LOG"
|
|
80
89
|
t "resolve via title-derived (no branch)" "$(effort_slug_resolve title-only-effort)" "205"
|
|
90
|
+
t "the title pass reads the open issues after the label miss" \
|
|
91
|
+
"$(grep -c '^GET repos/o/r/issues?state=open&per_page=100 $' "$GH_LOG")" "1"
|
|
92
|
+
t "the fallback ran no gh subcommand" "$(grep -c '^GH-SUBCOMMAND' "$GH_LOG")" "0"
|
|
81
93
|
|
|
82
94
|
# ── no match anywhere → nonzero rc ─────────────────────────────────────────────────────────────
|
|
83
95
|
out="$(effort_slug_resolve nope-not-here 2>&1)"; r=$?
|
|
84
96
|
rc "unknown slug returns nonzero rc" "$r" "1"
|
|
85
97
|
case "$out" in *"no effort matches"*) echo "ok: unknown slug explains itself" ;; *) echo "FAIL: no-match message: $out"; fail=1 ;; esac
|
|
86
98
|
|
|
99
|
+
# ── no forge configured: the branch scan still answers; the issue fallback is skipped, not failed ─
|
|
100
|
+
: > "$GH_LOG"
|
|
101
|
+
t "no forge: a branch slug still resolves" "$(CCKIT_FORGE=none effort_slug_resolve resolve-slug 2>/dev/null)" "101"
|
|
102
|
+
out="$(CCKIT_FORGE=none effort_slug_resolve explicit-handle 2>&1)"; r=$?
|
|
103
|
+
rc "no forge: a label-only slug is a no-match (rc 1)" "$r" "1"
|
|
104
|
+
case "$out" in *"no effort matches"*) echo "ok: no forge: the no-match line is the same" ;; *) echo "FAIL: no-forge message: $out"; fail=1 ;; esac
|
|
105
|
+
t "no forge: no request was made" "$(wc -l < "$GH_LOG" | tr -d ' ')" "0"
|
|
106
|
+
|
|
87
107
|
# ── #244 · effort_branch_rows — the ONE effort-branch scan (shared with the WIP gate) ──────────
|
|
88
108
|
# `<N>\t<slug>` per effort/<N>-<slug> ref, local heads AND remote-tracking. #101 is local+remote
|
|
89
109
|
# (two rows, de-duplication is the caller's job); #102 is remote-only and must still appear.
|
|
@@ -29,6 +29,12 @@
|
|
|
29
29
|
# effort_branch_rows_origin reaches the network and returns rc 1 when it cannot
|
|
30
30
|
|
|
31
31
|
# The GitHub transport switch (#396): rest mode routes the gh calls below through gh-rest.sh.
|
|
32
|
+
# The forge port (E537): every GitHub call goes through forge_* / gh_rest_* (scripts/lib/gh-rest.sh).
|
|
33
|
+
if ! command -v gh_rest_issue_json >/dev/null 2>&1; then
|
|
34
|
+
# shellcheck source=/dev/null
|
|
35
|
+
. "$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)/gh-rest.sh"
|
|
36
|
+
fi
|
|
37
|
+
|
|
32
38
|
if ! command -v cckit_gh_rest >/dev/null 2>&1; then
|
|
33
39
|
_ghr_lib="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" 2>/dev/null && pwd)/gh-rest.sh"
|
|
34
40
|
# shellcheck source=/dev/null
|
|
@@ -51,8 +57,9 @@ _eff_slug() {
|
|
|
51
57
|
# the cosmetic doubling that produced branches like `effort/98-98-core-…`). See #93 / sub #96.
|
|
52
58
|
_eff_title_slug() {
|
|
53
59
|
local t="$1"
|
|
54
|
-
# structural prefix: "[
|
|
55
|
-
|
|
60
|
+
# structural prefix: "[E<n>] " / "[E<n>.<step>] ", or the legacy "[Effort] N · " (parent) and
|
|
61
|
+
# "[Effort N] M · " (sub)
|
|
62
|
+
t="$(printf '%s' "$t" | sed -E -e 's/^\[E[0-9]+(\.[0-9]+)?\] +//' -e 's/^\[Effort( [0-9]+)?\] [0-9]+ ·? ?//')"
|
|
56
63
|
# one optional leading [Flow] tag
|
|
57
64
|
t="$(printf '%s' "$t" | sed -E 's/^\[[A-Za-z]+\][[:space:]]*//')"
|
|
58
65
|
_eff_slug "$t"
|
|
@@ -127,7 +134,7 @@ effort_branch_rows_origin() {
|
|
|
127
134
|
# effort_slug_resolve <slug|N> → echo the canonical effort number on stdout (rc 0).
|
|
128
135
|
# - pure digits → passthrough (number stays canonical; never re-mapped).
|
|
129
136
|
# - otherwise normalize and match, in order: effort/* branches (local + remote), then (via gh)
|
|
130
|
-
# slug:<slug> labels, then title-derived slugs of open `[Effort]` issues.
|
|
137
|
+
# slug:<slug> labels, then title-derived slugs of open `[E<n>]` (or legacy `[Effort]`) issues.
|
|
131
138
|
# - no match → rc 1; >1 distinct match → rc 1 (ambiguous, never a wrong guess); empty/unusable → rc 2.
|
|
132
139
|
effort_slug_resolve() {
|
|
133
140
|
local input="${1:-}"
|
|
@@ -149,20 +156,13 @@ effort_slug_resolve() {
|
|
|
149
156
|
matches="$(printf '%s' "$matches" | grep -E '^[0-9]+$' | sort -un)"
|
|
150
157
|
|
|
151
158
|
# 2. gh fallback (only when no branch matched): slug:<slug> label first, then open effort titles.
|
|
152
|
-
if [ -z "$matches" ] &&
|
|
159
|
+
if [ -z "$matches" ] && forge_available; then
|
|
153
160
|
local repo; repo="$(_eff_slug_repo)"
|
|
154
161
|
if [ -n "$repo" ]; then
|
|
155
|
-
|
|
156
|
-
matches="$(gh_rest_issue_numbers_by_label "$repo" "slug:$norm" 2>/dev/null | grep -E '^[0-9]+$' | sort -un)"
|
|
157
|
-
else
|
|
158
|
-
matches="$(gh issue list --repo "$repo" --state open --label "slug:$norm" \
|
|
159
|
-
--json number -q '.[].number' 2>/dev/null | grep -E '^[0-9]+$' | sort -un)"
|
|
160
|
-
fi
|
|
162
|
+
matches="$(gh_rest_issue_numbers_by_label "$repo" "slug:$norm" 2>/dev/null | grep -E '^[0-9]+$' | sort -un)"
|
|
161
163
|
if [ -z "$matches" ]; then
|
|
162
164
|
local in it
|
|
163
|
-
matches="$( {
|
|
164
|
-
else gh issue list --repo "$repo" --state open --search '[Effort] in:title' --limit 200 \
|
|
165
|
-
--json number,title -q '.[] | "\(.number)\t\(.title)"'; fi; } 2>/dev/null \
|
|
165
|
+
matches="$( { gh_rest_open_issue_titles "$repo" | grep -E "$(printf '\t')"'\[(Effort\]|E[0-9]+\] )'; } 2>/dev/null \
|
|
166
166
|
| while IFS="$(printf '\t')" read -r in it; do
|
|
167
167
|
[ "$(_eff_title_slug "$it")" = "$norm" ] && printf '%s\n' "$in"
|
|
168
168
|
done | grep -E '^[0-9]+$' | sort -un)"
|
package/scripts/lib/effort.sh
CHANGED
|
@@ -9,13 +9,19 @@
|
|
|
9
9
|
# effort_branch_num echo the effort issue # parsed from the current branch
|
|
10
10
|
# effort_trace_dir <parent_num> echo (and mkdir -p) the trace dir under the git-common-dir
|
|
11
11
|
# effort_snapshot_subs <parent_num> [base_ref] snapshot per-sub-issue diffs BEFORE squash (work trace)
|
|
12
|
-
# effort_title_lint <full-title>
|
|
12
|
+
# effort_title_lint <full-title> the effort/sub title rule (wrapper over naming.sh)
|
|
13
13
|
# effort_set_blocked_by <issue> <blocker> set a native GitHub blocked_by dependency edge
|
|
14
14
|
#
|
|
15
15
|
# Requires: gh, jq, git. bash 3.2 compatible.
|
|
16
16
|
# errors: strict — git mechanics: a failed link, snapshot or lint propagates
|
|
17
17
|
|
|
18
18
|
# The GitHub transport switch (#396): rest mode routes the gh calls below through gh-rest.sh.
|
|
19
|
+
# The forge port (E537): every GitHub call goes through forge_* / gh_rest_* (scripts/lib/gh-rest.sh).
|
|
20
|
+
if ! command -v gh_rest_issue_json >/dev/null 2>&1; then
|
|
21
|
+
# shellcheck source=/dev/null
|
|
22
|
+
. "$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)/gh-rest.sh"
|
|
23
|
+
fi
|
|
24
|
+
|
|
19
25
|
if ! command -v cckit_gh_rest >/dev/null 2>&1; then
|
|
20
26
|
_ghr_lib="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" 2>/dev/null && pwd)/gh-rest.sh"
|
|
21
27
|
# shellcheck source=/dev/null
|
|
@@ -41,6 +47,15 @@ if ! command -v kit_kind_commit_type >/dev/null 2>&1; then
|
|
|
41
47
|
unset _eff_kinds
|
|
42
48
|
fi
|
|
43
49
|
|
|
50
|
+
# The one title convention (naming.sh, E546.1): effort_title_lint and effort_pr_title_check below
|
|
51
|
+
# are thin wrappers over naming_title_lint.
|
|
52
|
+
if ! command -v naming_title_lint >/dev/null 2>&1; then
|
|
53
|
+
_eff_naming="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" 2>/dev/null && pwd)/naming.sh"
|
|
54
|
+
# shellcheck source=/dev/null
|
|
55
|
+
[ -f "$_eff_naming" ] && . "$_eff_naming"
|
|
56
|
+
unset _eff_naming
|
|
57
|
+
fi
|
|
58
|
+
|
|
44
59
|
EFFORT_REPO="${EFFORT_REPO:-${KIT_REPO:-}}"
|
|
45
60
|
|
|
46
61
|
# Link a child issue as a native GitHub sub-issue of a parent.
|
|
@@ -49,9 +64,9 @@ EFFORT_REPO="${EFFORT_REPO:-${KIT_REPO:-}}"
|
|
|
49
64
|
effort_link_sub() {
|
|
50
65
|
local parent="$1" child="$2" child_id
|
|
51
66
|
[[ -n "$parent" && -n "$child" ]] || { echo "effort_link_sub: parent + child issue numbers required" >&2; return 1; }
|
|
52
|
-
child_id="$(
|
|
67
|
+
child_id="$(forge_rest "repos/$EFFORT_REPO/issues/$child" --jq .id 2>/dev/null)" \
|
|
53
68
|
|| { echo "effort_link_sub: could not resolve db id for #$child" >&2; return 1; }
|
|
54
|
-
|
|
69
|
+
forge_rest --method POST "repos/$EFFORT_REPO/issues/$parent/sub_issues" \
|
|
55
70
|
-F sub_issue_id="$child_id" >/dev/null 2>&1 \
|
|
56
71
|
&& { echo " ✓ linked #$child as sub-issue of #$parent" >&2; return 0; } \
|
|
57
72
|
|| { echo " ✗ failed to link #$child under #$parent (already linked? API unavailable?)" >&2; return 1; }
|
|
@@ -167,8 +182,7 @@ effort_snapshot_merged_subs() {
|
|
|
167
182
|
seq=$((seq + 1))
|
|
168
183
|
short="$(printf '%.7s' "$oid")"; [[ -n "$short" ]] || short="pr$pr"
|
|
169
184
|
stub="$(printf '%02d-%s' "$seq" "$short")"
|
|
170
|
-
|
|
171
|
-
else gh pr diff "$pr" --repo "$EFFORT_REPO" > "$dir/$stub.diff" 2>/dev/null || rm -f "$dir/$stub.diff"; fi
|
|
185
|
+
gh_rest_pr_diff "$EFFORT_REPO" "$pr" > "$dir/$stub.diff" 2>/dev/null || rm -f "$dir/$stub.diff"
|
|
172
186
|
[[ -s "$dir/$stub.diff" ]] || { rm -f "$dir/$stub.diff"; seq=$((seq - 1)); continue; }
|
|
173
187
|
jq -c -n --arg parent "$parent" --arg sub "${sub:-}" --arg sha "${oid:-}" \
|
|
174
188
|
--arg subject "$title" --arg pr "$pr" --arg file "$stub.diff" \
|
|
@@ -187,29 +201,29 @@ EOF_ROWS
|
|
|
187
201
|
}
|
|
188
202
|
|
|
189
203
|
# ── Effort PR title — ONE composer shared by the verb + the skill (#121) ────────────────────────
|
|
190
|
-
# `cckit effort pr` (the verb) and /kit-effort-pr (the skill)
|
|
191
|
-
#
|
|
192
|
-
#
|
|
193
|
-
# (effort-model.md), enforced by effort_pr_title_check.
|
|
204
|
+
# `cckit effort pr` (the verb) and /kit-effort-pr (the skill) both call effort_pr_title, so an effort
|
|
205
|
+
# PR is titled identically no matter who opens it. The MANDATORY element is the trailing [E<n>]
|
|
206
|
+
# effort token (rules/naming-and-ids.md), enforced by naming_title_lint pr and effort_pr_title_check.
|
|
194
207
|
#
|
|
195
208
|
# effort_pr_title <num> <name> [labels_csv] [type] [role_display] — compose the title (#237).
|
|
196
209
|
# PRs are squash-merged, so the title becomes the commit release-please reads and the commitlint
|
|
197
210
|
# gate (.github/workflows/commitlint.yml) checks. The default is therefore a Conventional Commit
|
|
198
|
-
# subject with the
|
|
199
|
-
# effort_pr_title 115 "adoption hardening" -> "feat: adoption hardening [
|
|
200
|
-
# effort_pr_title 115 "adoption hardening" "flow:core,kind:chore" -> "chore(core): adoption hardening [
|
|
201
|
-
# effort_pr_title 115 "[
|
|
202
|
-
#
|
|
203
|
-
#
|
|
211
|
+
# subject with the token trailing:
|
|
212
|
+
# effort_pr_title 115 "adoption hardening" -> "feat: adoption hardening [E115]"
|
|
213
|
+
# effort_pr_title 115 "adoption hardening" "flow:core,kind:chore" -> "chore(core): adoption hardening [E115]"
|
|
214
|
+
# effort_pr_title 115 "[E115] adoption hardening" -> "feat: adoption hardening [E115]"
|
|
215
|
+
# effort_pr_title 115 "[Effort] 115 · [Core] adoption hardening" -> "feat(core): adoption hardening [E115]"
|
|
216
|
+
# scope the `flow:<flow>` label, else the name's leading [Flow] tag (legacy titles); lowercased,
|
|
217
|
+
# and dropped when it is not a valid Conventional Commit scope. The tag is peeled.
|
|
204
218
|
# type the explicit <type> (`effort pr --type`), else the `kind:` label mapped as kto_pr_title
|
|
205
219
|
# maps it (kind:task and anything unknown -> feat; a content kind -> docs; a `bug` label -> fix).
|
|
206
|
-
# A full parent title
|
|
220
|
+
# A full parent title, new or legacy, is accepted: its prefix is peeled so the id is never doubled.
|
|
207
221
|
# pr.titleStyle = issue-title (KIT_PR_TITLE_STYLE) keeps the non-conventional form, for a repo with
|
|
208
222
|
# no commitlint gate: "[Role] [#N] <name>" (the role prefix only when <role_display> is given).
|
|
209
223
|
effort_pr_title() {
|
|
210
224
|
local num="${1:-}" name="${2:-}" labels="${3:-}" ctype="${4:-}" role="${5:-}" tag scope kind
|
|
211
225
|
num="${num#\#}"
|
|
212
|
-
name="$(
|
|
226
|
+
name="$(naming_strip_structural "$name")"
|
|
213
227
|
[ -n "$name" ] || name="effort"
|
|
214
228
|
if [ "${KIT_PR_TITLE_STYLE:-conventional}" = "issue-title" ]; then
|
|
215
229
|
if [ -n "$role" ]; then printf '[%s] [#%s] %s' "$role" "$num" "$name"
|
|
@@ -239,31 +253,28 @@ effort_pr_title() {
|
|
|
239
253
|
fi
|
|
240
254
|
case ",$labels," in *,bug,*) ctype=fix ;; esac
|
|
241
255
|
fi
|
|
242
|
-
if [ -n "$scope" ]; then printf '%s(%s): %s [
|
|
243
|
-
else printf '%s: %s [
|
|
256
|
+
if [ -n "$scope" ]; then printf '%s(%s): %s [E%s]' "$ctype" "$scope" "$name" "$num"
|
|
257
|
+
else printf '%s: %s [E%s]' "$ctype" "$name" "$num"; fi
|
|
244
258
|
}
|
|
245
259
|
|
|
246
|
-
# effort_pr_title_check <title> [num] — rc 0 iff <title> carries the effort
|
|
247
|
-
# [
|
|
248
|
-
# and the skill
|
|
260
|
+
# effort_pr_title_check <title> [num] — rc 0 iff <title> carries the effort's token: [E<num>] or the
|
|
261
|
+
# legacy [#<num>] when <num> is given, else any [E<digits>] or [#<digits>]. Prints the reason + rc 1
|
|
262
|
+
# when it doesn't, so the verb and the skill refuse to open a PR whose title lacks the effort id.
|
|
249
263
|
effort_pr_title_check() {
|
|
250
264
|
local title="${1:-}" num="${2:-}"
|
|
251
265
|
if [ -n "$num" ]; then
|
|
252
266
|
num="${num#\#}"
|
|
253
|
-
case "$title" in *"[#$num]"*) return 0 ;; esac
|
|
254
|
-
echo "effort_pr_title_check: PR title lacks the [
|
|
267
|
+
case "$title" in *"[E$num]"*|*"[#$num]"*) return 0 ;; esac
|
|
268
|
+
echo "effort_pr_title_check: PR title lacks the [E$num] effort token: '$title'" >&2; return 1
|
|
255
269
|
fi
|
|
256
|
-
grep -qE '\[
|
|
257
|
-
echo "effort_pr_title_check: PR title lacks
|
|
270
|
+
grep -qE '\[(E|#)[0-9]+\]' <<<"$title" && return 0
|
|
271
|
+
echo "effort_pr_title_check: PR title lacks an [E<n>] effort token: '$title'" >&2; return 1
|
|
258
272
|
}
|
|
259
273
|
|
|
260
|
-
# ── Effort-title rule —
|
|
261
|
-
#
|
|
262
|
-
#
|
|
263
|
-
#
|
|
264
|
-
# sub-clauses, or >6 words (detail goes in the body). See rules/effort-model.md § Titles.
|
|
265
|
-
|
|
266
|
-
# Controlled flow vocabulary for the optional leading [Flow] title tag. Resolution order (#150):
|
|
274
|
+
# ── Effort-title rule — one convention, linted in naming.sh ───────────────────────────────────────
|
|
275
|
+
# `[E<n>] <name>` for an effort, `[E<n>.<step>] <name>` for a sub (rules/naming-and-ids.md). The
|
|
276
|
+
# flow lives in the `flow:` label; a legacy leading `[Flow]` tag is still tolerated by the lint, and
|
|
277
|
+
# validated against this controlled vocabulary. Resolution order (#150):
|
|
267
278
|
# 1. an explicit EFFORT_FLOWS env var always wins (per-invocation override)
|
|
268
279
|
# 2. the project config `effort.flows[]` — via KIT_EFFORT_FLOWS (exported by load_kit_config) or
|
|
269
280
|
# read straight from the config file, so a configured vocabulary works even for callers that
|
|
@@ -287,50 +298,17 @@ EFFORT_FLOWS="${EFFORT_FLOWS:-Core UI API Docs Infra Auth Data Web App}"
|
|
|
287
298
|
# Jargon denylist — internal terms that read as noise on the board. Override via EFFORT_TITLE_JARGON.
|
|
288
299
|
EFFORT_TITLE_JARGON="${EFFORT_TITLE_JARGON:-chrome seam contract claim rescue stash teardown scaffolding shim boilerplate refactor wiring}"
|
|
289
300
|
|
|
290
|
-
# effort_title_lint <full-title> — 0 if the title is clean; 1 + reasons on stderr otherwise.
|
|
291
|
-
#
|
|
301
|
+
# effort_title_lint <full-title> — 0 if the title is clean; 1 + reasons on stderr otherwise. A thin
|
|
302
|
+
# wrapper over naming_title_lint: a sub title ([E<n>.<step>] or legacy [Effort N] M · ) is linted as
|
|
303
|
+
# a sub, anything else as an effort ([E<n>] or legacy [Effort] N · ).
|
|
292
304
|
effort_title_lint() {
|
|
293
|
-
local title="$1"
|
|
294
|
-
local -a reasons=()
|
|
305
|
+
local title="${1:-}"
|
|
295
306
|
[[ -n "$title" ]] || { echo "effort_title_lint: title required" >&2; return 2; }
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
# 2. peel one optional leading [Flow] tag and validate it against the controlled vocabulary.
|
|
302
|
-
if [[ "$name" =~ ^\[([A-Za-z]+)\]\ (.+)$ ]]; then
|
|
303
|
-
flow="${BASH_REMATCH[1]}"; rest="${BASH_REMATCH[2]}"; name="$rest"
|
|
304
|
-
case " $EFFORT_FLOWS " in
|
|
305
|
-
*" $flow "*) : ;;
|
|
306
|
-
*) reasons+=("flow tag [$flow] is not in the vocabulary ($EFFORT_FLOWS)") ;;
|
|
307
|
-
esac
|
|
308
|
-
fi
|
|
309
|
-
|
|
310
|
-
# 3. the remaining name must be a concise, plain outcome phrase.
|
|
311
|
-
case "$name" in *"("*|*")"*) reasons+=("no parentheses — detail goes in the body") ;; esac
|
|
312
|
-
case "$name" in *" — "*|*" · "*|*" / "*) reasons+=("no ' — ' / ' · ' / ' / ' sub-clauses — one clear phrase") ;; esac
|
|
313
|
-
case "$name" in *—*|*▾*|*▸*|*→*|*✓*|*✗*|*…*|*•*) reasons+=("no glyphs (— ▾ ▸ → ✓ ✗ … •) in the title") ;; esac
|
|
314
|
-
# code identifiers: file extensions, snake_case, or a code-dir path.
|
|
315
|
-
if grep -qE '\.(sh|ts|tsx|js|mjs|json|css|md|ya?ml)([^A-Za-z0-9]|$)|[a-z0-9]+_[a-z0-9]+|(^|[^A-Za-z])(scripts|apps|packages|src)/' <<<"$name"; then
|
|
316
|
-
reasons+=("no code identifiers (file names, paths, snake_case) — name the outcome")
|
|
317
|
-
fi
|
|
318
|
-
# jargon denylist (word-boundary, case-insensitive).
|
|
319
|
-
local w
|
|
320
|
-
for w in $EFFORT_TITLE_JARGON; do
|
|
321
|
-
grep -qiwE "$w" <<<"$name" && reasons+=("jargon word '$w' — use plain language")
|
|
322
|
-
done
|
|
323
|
-
# word count ≤ 6.
|
|
324
|
-
local wc; wc=$(printf '%s\n' "$name" | wc -w | tr -d ' ')
|
|
325
|
-
[[ "$wc" -gt 6 ]] && reasons+=("name is $wc words — keep it ≤ 6 (detail goes in the body)")
|
|
326
|
-
|
|
327
|
-
if [[ "${#reasons[@]}" -gt 0 ]]; then
|
|
328
|
-
{ echo "✗ effort title fails the concise / no-jargon rule: $title"
|
|
329
|
-
for w in "${reasons[@]}"; do echo " - $w"; done
|
|
330
|
-
} >&2
|
|
331
|
-
return 1
|
|
307
|
+
if grep -qE '^\[(E[0-9]+\.[0-9]+|Effort [0-9]+)\] ' <<<"$title"; then
|
|
308
|
+
naming_title_lint sub "$title"
|
|
309
|
+
else
|
|
310
|
+
naming_title_lint effort "$title"
|
|
332
311
|
fi
|
|
333
|
-
return 0
|
|
334
312
|
}
|
|
335
313
|
|
|
336
314
|
# effort_set_blocked_by <issue> <blocker-issue> — declare the native GitHub dependency "<issue> is
|
|
@@ -338,9 +316,9 @@ effort_title_lint() {
|
|
|
338
316
|
effort_set_blocked_by() {
|
|
339
317
|
local issue="$1" blocker="$2" bid
|
|
340
318
|
[[ -n "$issue" && -n "$blocker" ]] || { echo "effort_set_blocked_by: <issue> <blocker> required" >&2; return 1; }
|
|
341
|
-
bid="$(
|
|
319
|
+
bid="$(forge_rest "repos/$EFFORT_REPO/issues/$blocker" --jq .id 2>/dev/null)" \
|
|
342
320
|
|| { echo "effort_set_blocked_by: could not resolve db id for #$blocker" >&2; return 1; }
|
|
343
|
-
|
|
321
|
+
forge_rest --method POST "repos/$EFFORT_REPO/issues/$issue/dependencies/blocked_by" -F issue_id="$bid" >/dev/null 2>&1 \
|
|
344
322
|
&& { echo " ✓ #$issue blocked_by #$blocker" >&2; return 0; } \
|
|
345
323
|
|| { echo " ✗ failed to set #$issue blocked_by #$blocker (already set? API unavailable?)" >&2; return 1; }
|
|
346
324
|
}
|
|
@@ -351,11 +329,11 @@ if [[ "${BASH_SOURCE[0]:-}" == "${0:-}" && "${1:-}" == "--selftest" ]]; then
|
|
|
351
329
|
_et_rc=0
|
|
352
330
|
_et_fail() { if effort_title_lint "$1" >/dev/null 2>&1; then echo "FAIL expected-reject passed: $1"; _et_rc=1; else echo "ok reject: $1"; fi; }
|
|
353
331
|
_et_pass() { if effort_title_lint "$1" >/dev/null 2>&1; then echo "ok accept: $1"; else echo "FAIL expected-accept rejected: $1"; effort_title_lint "$1"; _et_rc=1; fi; }
|
|
354
|
-
_et_fail "[
|
|
355
|
-
_et_fail "[
|
|
332
|
+
_et_fail "[E12] operator chrome — Settings ▾ dropdown + layout fixes"
|
|
333
|
+
_et_fail "[E12.4] Section tables — columns + joins (contract B)"
|
|
356
334
|
_et_fail "[Effort] 12 · refactor scripts/kit + quote-aware free-prompt args"
|
|
335
|
+
_et_pass "[E12] operator navigation"
|
|
357
336
|
_et_pass "[Effort] 12 · [UI] operator navigation"
|
|
358
|
-
_et_pass "[
|
|
359
|
-
_et_pass "[Effort 12] 4 · module tables"
|
|
337
|
+
_et_pass "[E12.4] module tables"
|
|
360
338
|
exit "$_et_rc"
|
|
361
339
|
fi
|