@windyroad/jtbd 0.14.7 → 0.14.8-preview.1270
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.
|
@@ -210,12 +210,5 @@ if check_review_gate "$SESSION_ID" "jtbd" "$JTBD_PATH"; then
|
|
|
210
210
|
exit 0
|
|
211
211
|
fi
|
|
212
212
|
|
|
213
|
-
if [ -n "${CODEX_THREAD_ID:-}" ]; then
|
|
214
|
-
case "$REVIEW_GATE_REASON" in
|
|
215
|
-
"No jtbd review marker found."*)
|
|
216
|
-
REVIEW_GATE_REASON="${REVIEW_GATE_REASON} After a genuine PASS from a completed wr-jtbd:agent task, call interrupt_agent once with that completed task's exact target, then retry the edit. If still blocked, run a fresh review and report the gate diagnostic. Do not create or edit review markers manually." ;;
|
|
217
|
-
esac
|
|
218
|
-
fi
|
|
219
|
-
|
|
220
213
|
review_gate_deny "BLOCKED: Cannot edit '${BASENAME}' without JTBD review. You MUST first delegate to wr-jtbd:agent using the Agent tool (subagent_type: 'wr-jtbd:agent'). ${REVIEW_GATE_REASON}"
|
|
221
214
|
exit 0
|
package/hooks/lib/review-gate.sh
CHANGED
|
@@ -17,10 +17,11 @@ check_review_gate() {
|
|
|
17
17
|
local MARKER="/tmp/${SYSTEM}-reviewed-${SESSION_ID}"
|
|
18
18
|
local HASH_FILE="/tmp/${SYSTEM}-reviewed-${SESSION_ID}.hash"
|
|
19
19
|
local TTL_SECONDS="${REVIEW_TTL:-3600}"
|
|
20
|
+
local COMPLETION_GUIDANCE="On Codex, wait for the reviewer to finish, then invoke interrupt_agent exactly once with that completed task's exact target before retrying. On Claude Code, dispatch the reviewer synchronously. Do not create or edit review markers manually."
|
|
20
21
|
|
|
21
22
|
# 1. Marker must exist
|
|
22
23
|
if [ ! -f "$MARKER" ]; then
|
|
23
|
-
REVIEW_GATE_REASON="No ${SYSTEM} review marker found. Delegate to wr-${SYSTEM}:agent via the Agent tool (subagent_type: 'wr-${SYSTEM}:agent')
|
|
24
|
+
REVIEW_GATE_REASON="No ${SYSTEM} review marker found. Delegate to wr-${SYSTEM}:agent via the Agent tool (subagent_type: 'wr-${SYSTEM}:agent'). ${COMPLETION_GUIDANCE}"
|
|
24
25
|
return 1
|
|
25
26
|
fi
|
|
26
27
|
|
|
@@ -30,7 +31,7 @@ check_review_gate() {
|
|
|
30
31
|
local AGE=$(( NOW - MARKER_TIME ))
|
|
31
32
|
if [ "$AGE" -ge "$TTL_SECONDS" ]; then
|
|
32
33
|
rm -f "$MARKER" "$HASH_FILE"
|
|
33
|
-
REVIEW_GATE_REASON="${SYSTEM} review expired (${AGE}s old, TTL ${TTL_SECONDS}s). Re-delegate to wr-${SYSTEM}:agent via the Agent tool (subagent_type: 'wr-${SYSTEM}:agent') to refresh the marker."
|
|
34
|
+
REVIEW_GATE_REASON="${SYSTEM} review expired (${AGE}s old, TTL ${TTL_SECONDS}s). Re-delegate to wr-${SYSTEM}:agent via the Agent tool (subagent_type: 'wr-${SYSTEM}:agent') to refresh the marker. ${COMPLETION_GUIDANCE}"
|
|
34
35
|
return 1
|
|
35
36
|
fi
|
|
36
37
|
|
|
@@ -45,7 +46,7 @@ check_review_gate() {
|
|
|
45
46
|
CURRENT_HASH=$(_substance_hash_path "$POLICY_FILE")
|
|
46
47
|
if [ "$STORED_HASH" != "$CURRENT_HASH" ]; then
|
|
47
48
|
rm -f "$MARKER" "$HASH_FILE"
|
|
48
|
-
REVIEW_GATE_REASON="${SYSTEM} policy file changed since last review. Re-delegate to wr-${SYSTEM}:agent via the Agent tool (subagent_type: 'wr-${SYSTEM}:agent') to refresh the marker."
|
|
49
|
+
REVIEW_GATE_REASON="${SYSTEM} policy file changed since last review. Re-delegate to wr-${SYSTEM}:agent via the Agent tool (subagent_type: 'wr-${SYSTEM}:agent') to refresh the marker. ${COMPLETION_GUIDANCE}"
|
|
49
50
|
return 1
|
|
50
51
|
fi
|
|
51
52
|
fi
|