You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/skills/moai/SKILL.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -312,6 +312,8 @@ Last Updated: 2026-02-25
312
312
| "I can run /moai run without a SPEC, it is just a tweak" | Without a SPEC, there is no acceptance criterion to check. Every run without a SPEC silently degrades quality tracking. |
313
313
| "Parallel agents will just race, sequential is safer" | Independent tool calls are explicitly required to run in parallel. Sequentializing them wastes user time. |
314
314
| "I will respond in English since it is technical" | Conversation language is a HARD rule. User-facing output must match the configured language, always. |
315
+
| "Schema 로드가 귀찮으니 이번엔 산문으로 질문하자" | AskUserQuestion/Task* 는 deferred tool. ToolSearch 한 번으로 session 전체 사용 가능. 산문 질문은 HARD 위반 (CLAUDE.md §1, §8 Deferred Tool Preload Protocol). |
316
+
| "짧은 확인 질문은 산문으로 처리해도 된다" | 모든 user-facing 질문은 AskUserQuestion 경유 강제. "짧은 질문"은 예외 아님. Self-check: 응답에 "?" 있으면 AskUserQuestion 호출 동반 필수. |
315
317
316
318
<!-- moai:evolvable-end -->
317
319
@@ -324,6 +326,11 @@ Last Updated: 2026-02-25
324
326
- AskUserQuestion with more than 4 options or containing emoji
325
327
- Agent invocation prompt contains absolute paths to the main project when isolation is worktree
326
328
- /moai run executed without a corresponding SPEC-XXX document
329
+
- Response ends with "?" but no AskUserQuestion tool call accompanies it
330
+
- Options listed as markdown (`- A:`, `- B:`, `Option X:`) without structured AskUserQuestion
331
+
- Prose decision requests ("진행할까요?", "어느 것 선호?", "A or B?") instead of AskUserQuestion
332
+
- First AskUserQuestion call in session without prior ToolSearch preload (produces InputValidationError)
333
+
- Waiting for user's next message after prose question without AskUserQuestion tool call
327
334
328
335
<!-- moai:evolvable-end -->
329
336
@@ -337,5 +344,9 @@ Last Updated: 2026-02-25
337
344
-[ ] For non-trivial tasks, approach was explained and approved before code changes
338
345
-[ ] SPEC-ID is referenced when /moai run, /moai sync, or /moai fix is invoked
339
346
-[ ] TodoList used to decompose multi-file changes (3+ files)
347
+
-[ ] Session opened with ToolSearch preload of deferred tools (AskUserQuestion, TaskCreate/Update/List/Get)
348
+
-[ ] Every response containing "?" is accompanied by a structured AskUserQuestion tool call
349
+
-[ ] Option lists (`- A:`, `- B:`) are routed through AskUserQuestion, not markdown-only
350
+
-[ ] No silent "wait for user input" state after prose question (§8 Deferred Tool Preload Protocol)
Copy file name to clipboardExpand all lines: CLAUDE.local.md
+81-1Lines changed: 81 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1056,6 +1056,86 @@ v2.14.0 릴리스 과정에서 다음 문제 발생 → v2.15부터 방지:
1056
1056
1057
1057
---
1058
1058
1059
+
---
1060
+
1061
+
## 19. AskUserQuestion Enforcement Protocol
1062
+
1063
+
2026-04-24 세션에서 `AskUserQuestion` 미사용으로 [HARD] 규칙(§1, §8) 위반 반복 발생. 근본 원인은 **deferred tool 사전 로드 부재** + **산문 질문 편의주의**. v3.4.0부터 본 Enforcement Protocol을 [HARD] 운영 방침으로 고정.
1064
+
1065
+
### §19.1 근본 원인 체인
1066
+
1067
+
1.**1차 원인**: `AskUserQuestion`은 deferred tool. 세션 시작 시 schema 미로드 → 직접 호출 시 `InputValidationError` → agent가 회피 → 산문 질문으로 우회.
Copy file name to clipboardExpand all lines: CLAUDE.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ MoAI is the Strategic Orchestrator for Claude Code. All tasks must be delegated
11
11
-[HARD] No XML in User Responses: Never display XML tags in user-facing responses
12
12
-[HARD] Markdown Output: Use Markdown for all user-facing communication
13
13
-[HARD] AskUserQuestion-Only Interaction: ALL questions directed at the user MUST go through AskUserQuestion (See Section 8)
14
+
-[HARD] Deferred Tool Preload: AskUserQuestion, TaskCreate/Update/List/Get are deferred tools — schema is NOT loaded at session start. Call ToolSearch BEFORE first use to load schemas. Calling without schema produces InputValidationError. (See Section 8 Deferred Tool Preload Protocol)
14
15
-[HARD] Context-First Discovery: Conduct Socratic interview via AskUserQuestion when context is insufficient before executing non-trivial tasks (See Section 7)
15
16
-[HARD] Approach-First Development: Explain approach and get approval before writing code (See Section 7)
16
17
-[HARD] Multi-File Decomposition: Split work when modifying 3+ files (See Section 7)
@@ -316,6 +317,37 @@ Exceptions (free-form text questions permitted ONLY when):
316
317
- AskUserQuestion is technically unavailable (e.g., inside a subagent — should not happen since subagents must not ask users)
317
318
- The question is actually a statement of status, not a question
318
319
320
+
### Deferred Tool Preload Protocol [HARD]
321
+
322
+
[HARD]`AskUserQuestion`, `TaskCreate`, `TaskUpdate`, `TaskList`, `TaskGet` are **deferred tools** — their schemas are NOT loaded at session start. Calling them directly produces `InputValidationError`. Load schemas via `ToolSearch` BEFORE first use.
323
+
324
+
Preload triggers (execute ToolSearch immediately when any condition matches):
325
+
- Session start after first user input received
326
+
- Before any complex / multi-step task begins
327
+
- Before invoking Socratic interview (Section 7 Rule 5)
328
+
- When user decision is required ("Should I proceed?", "Which option?", "선택", "진행 여부")
329
+
- Immediately before first TaskCreate/Update/List/Get call
330
+
331
+
Preload command (once per session, BEFORE any user-facing question):
Copy file name to clipboardExpand all lines: internal/template/templates/.claude/skills/moai/SKILL.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -312,6 +312,8 @@ Last Updated: 2026-02-25
312
312
| "I can run /moai run without a SPEC, it is just a tweak" | Without a SPEC, there is no acceptance criterion to check. Every run without a SPEC silently degrades quality tracking. |
313
313
| "Parallel agents will just race, sequential is safer" | Independent tool calls are explicitly required to run in parallel. Sequentializing them wastes user time. |
314
314
| "I will respond in English since it is technical" | Conversation language is a HARD rule. User-facing output must match the configured language, always. |
315
+
| "Schema 로드가 귀찮으니 이번엔 산문으로 질문하자" | AskUserQuestion/Task* 는 deferred tool. ToolSearch 한 번으로 session 전체 사용 가능. 산문 질문은 HARD 위반 (CLAUDE.md §1, §8 Deferred Tool Preload Protocol). |
316
+
| "짧은 확인 질문은 산문으로 처리해도 된다" | 모든 user-facing 질문은 AskUserQuestion 경유 강제. "짧은 질문"은 예외 아님. Self-check: 응답에 "?" 있으면 AskUserQuestion 호출 동반 필수. |
315
317
316
318
<!-- moai:evolvable-end -->
317
319
@@ -324,6 +326,11 @@ Last Updated: 2026-02-25
324
326
- AskUserQuestion with more than 4 options or containing emoji
325
327
- Agent invocation prompt contains absolute paths to the main project when isolation is worktree
326
328
- /moai run executed without a corresponding SPEC-XXX document
329
+
- Response ends with "?" but no AskUserQuestion tool call accompanies it
330
+
- Options listed as markdown (`- A:`, `- B:`, `Option X:`) without structured AskUserQuestion
331
+
- Prose decision requests ("진행할까요?", "어느 것 선호?", "A or B?") instead of AskUserQuestion
332
+
- First AskUserQuestion call in session without prior ToolSearch preload (produces InputValidationError)
333
+
- Waiting for user's next message after prose question without AskUserQuestion tool call
327
334
328
335
<!-- moai:evolvable-end -->
329
336
@@ -337,5 +344,9 @@ Last Updated: 2026-02-25
337
344
-[ ] For non-trivial tasks, approach was explained and approved before code changes
338
345
-[ ] SPEC-ID is referenced when /moai run, /moai sync, or /moai fix is invoked
339
346
-[ ] TodoList used to decompose multi-file changes (3+ files)
347
+
-[ ] Session opened with ToolSearch preload of deferred tools (AskUserQuestion, TaskCreate/Update/List/Get)
348
+
-[ ] Every response containing "?" is accompanied by a structured AskUserQuestion tool call
349
+
-[ ] Option lists (`- A:`, `- B:`) are routed through AskUserQuestion, not markdown-only
350
+
-[ ] No silent "wait for user input" state after prose question (§8 Deferred Tool Preload Protocol)
Copy file name to clipboardExpand all lines: internal/template/templates/CLAUDE.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ MoAI is the Strategic Orchestrator for Claude Code. All tasks must be delegated
11
11
-[HARD] No XML in User Responses: Never display XML tags in user-facing responses
12
12
-[HARD] Markdown Output: Use Markdown for all user-facing communication
13
13
-[HARD] AskUserQuestion-Only Interaction: ALL questions directed at the user MUST go through AskUserQuestion (See Section 8)
14
+
-[HARD] Deferred Tool Preload: AskUserQuestion, TaskCreate/Update/List/Get are deferred tools — schema is NOT loaded at session start. Call ToolSearch BEFORE first use to load schemas. Calling without schema produces InputValidationError. (See Section 8 Deferred Tool Preload Protocol)
14
15
-[HARD] Context-First Discovery: Conduct Socratic interview via AskUserQuestion when context is insufficient before executing non-trivial tasks (See Section 7)
15
16
-[HARD] Approach-First Development: Explain approach and get approval before writing code (See Section 7)
16
17
-[HARD] Multi-File Decomposition: Split work when modifying 3+ files (See Section 7)
@@ -316,6 +317,37 @@ Exceptions (free-form text questions permitted ONLY when):
316
317
- AskUserQuestion is technically unavailable (e.g., inside a subagent — should not happen since subagents must not ask users)
317
318
- The question is actually a statement of status, not a question
318
319
320
+
### Deferred Tool Preload Protocol [HARD]
321
+
322
+
[HARD]`AskUserQuestion`, `TaskCreate`, `TaskUpdate`, `TaskList`, `TaskGet` are **deferred tools** — their schemas are NOT loaded at session start. Calling them directly produces `InputValidationError`. Load schemas via `ToolSearch` BEFORE first use.
323
+
324
+
Preload triggers (execute ToolSearch immediately when any condition matches):
325
+
- Session start after first user input received
326
+
- Before any complex / multi-step task begins
327
+
- Before invoking Socratic interview (Section 7 Rule 5)
328
+
- When user decision is required ("Should I proceed?", "Which option?", "선택", "진행 여부")
329
+
- Immediately before first TaskCreate/Update/List/Get call
330
+
331
+
Preload command (once per session, BEFORE any user-facing question):
0 commit comments