Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions hooks/finish-the-work.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,22 @@ if last_had_tool or not last_text:
# Inspect only the closing paragraph, not the whole report.
tail = last_text[-400:]

# Unfulfilled-promise patterns (English + Korean). Future/intent only; past tense is excluded.
promise = re.search(
# Unfulfilled-promise patterns, English + Korean. Future/intent only; past
# tense is excluded by construction (the Korean "-겠-" future/intention
# morpheme never appears in past-tense forms like "했습니다"/"완료했습니다").
promise_en = re.search(
r"\b(I'?ll|I will|let me|next,? I|now I'?ll)\b[^.]{0,60}\b(now|next|then|implement|create|write|add|run|fix|save|build|start|proceed)\b",
tail, re.IGNORECASE)
promise_ko = re.search(
r"(이제|이어서|다음으로|곧|바로)?[^.\n]{0,30}?"
r"(하겠습니다|할게요|하겠어요|진행하겠|시작하겠|작성하겠|만들겠|실행하겠|수정하겠|저장하겠)",
tail)
promise = promise_en or promise_ko

# A legitimate stop that ends by asking the user passes through.
asks_user = re.search(
r"(\?|shall i|would you like|do you want|let me know|which option)",
r"(\?|shall i|would you like|do you want|let me know|which option|"
r"할까요|괜찮을까|어떻게 할|어느 것|선택해)",
tail, re.IGNORECASE)

if promise and not asks_user:
Expand Down
10 changes: 6 additions & 4 deletions hooks/router.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ emit=""
add() { emit="${emit:+$emit
}$1"; }

# Debugging / root-cause → investigation-protocol
# Debugging / root-cause → investigation-protocol (English + Korean signals)
case "$low" in
*debug*|*bug*|*error*|*traceback*|*"stack trace"*|*crash*|*failing*|*"not working"*)
*debug*|*bug*|*error*|*traceback*|*"stack trace"*|*crash*|*failing*|*"not working"*|\
*버그*|*에러*|*오류*|*디버그*|*고쳐*|*"안 돼"*|*안돼*|*트레이스백*|*실패*|*죽*)
add "[fablize:investigation] Debugging/root-cause signal — follow $PACKS/investigation-protocol.txt: reproduce first, form 3+ competing hypotheses, gather evidence per hypothesis, trace the full causal chain, verify before/after, and report the hypotheses you rejected." ;;
esac
# Render/executable artifacts → verification-grounding
# Render/executable artifacts → verification-grounding (English + Korean signals)
case "$low" in
*html*|*svg*|*game*|*canvas*|*chart*|*render*|*website*|*webpage*)
*html*|*svg*|*game*|*canvas*|*chart*|*render*|*website*|*webpage*|\
*화면*|*렌더*|*차트*|*슬라이드*|*웹페이지*|*미리보기*)
add "[fablize:grounding] Render/executable artifact signal — follow $PACKS/verification-grounding-pack.txt grounding loop: run it in the real renderer, observe the actual output, fix what the observation reveals, then re-run. A static check is not observation." ;;
esac

Expand Down