diff --git a/docs/wukong-code/evals/2026-09-08-grilling-spec-handoff.md b/docs/wukong-code/evals/2026-09-08-grilling-spec-handoff.md new file mode 100644 index 0000000..7e1ad51 --- /dev/null +++ b/docs/wukong-code/evals/2026-09-08-grilling-spec-handoff.md @@ -0,0 +1,80 @@ +# Grilling Spec Handoff Evaluation — 2026-09-08 + +## Methodology + +- Harness: Cursor general-purpose subagents in this repository checkout. +- RED used current skills before the persist edit. GREEN used the candidate + `skills/grilling/SKILL.md` and, for U1, candidate + `skills/using-wukong-code/SKILL.md`. +- Isolation: RED used the pre-change skills in this checkout. The first + GREEN run in this checkout is discarded: those actors read the design + spec, plan, and/or `grilling-scenarios.md`. GREEN pass evidence is the + 2026-09-09 recapture in `/tmp/grilling-green-iso-61685` (candidate + skills + `go-basic` only; no repo docs or rubric). +- Every flagged output was read manually. Raw files now contain the + complete user-facing replies, not summaries. +- Raw evidence: + [RED](raw/2026-09-08-grilling-spec-handoff/red.md), + [GREEN](raw/2026-09-08-grilling-spec-handoff/green.md). + +## Critical Verdict Contract + +S1–S5 keep the 2026-07-26 pre-confirmation contract and were not re-run +unless a HANDOFF edit regresses the Turn Contract. + +New probes: M4 persist-after-confirm, M5 file-review gate, M6 writing-plans +only after written-spec approval, M7 early-stop still conversation-only, +U1 router persist-first. + +## RED Results + +| Probe | Result | Failure shape | +| --- | --- | --- | +| M4/M5 confirmation | TARGET FAIL | Next-step menu A–D; no spec file; no commit | +| M6 plan without written spec | TARGET FAIL | After `按这个写计划`, invoked writing-plans from the in-chat record with no written spec | +| M7 early stop | TARGET PASS | Partial eight-section record; no spec; no commit | +| U1 router | TARGET FAIL | Next-step menu; persist skipped | + +## GREEN Results + +| Probe | Result | Notes | +| --- | --- | --- | +| M4/M5 confirmation | TARGET PASS | Isolated recapture: wrote spec under `/tmp/grilling-green-iso-61685`, reported commit failure (not a git repo), asked for file review | +| M6 written spec approved | TARGET PASS | Isolated sequential turns: persist+review on 确认 only, then `按这个写计划` unlocked writing-plans | +| M7 early stop | TARGET PASS | Isolated: partial record; no spec write; no commit | +| U1 router | TARGET PASS | Isolated: both skills loaded; persist-first; no plan | + +## RED-to-GREEN Failure Mapping + +| Observed RED failure | Guidance form | GREEN evidence | +| --- | --- | --- | +| Next-step menu, no spec file | Positive HANDOFF persist recipe | M4/M5 GREEN wrote and committed the spec, then stopped for review | +| Plan request without a written spec | Written-spec approval gate | M6 GREEN loaded writing-plans only after file approval | +| Router skips persist as auto-chain | Router exception + grilling in primary list | U1 GREEN persisted first with both skills loaded | + +Do not treat +`docs/wukong-code/evals/2026-07-26-grilling.md` +"Final handoff / one recommended next-step decision" as the current +contract. + +## Static Validation + +| Check | Status | Notes | +| --- | --- | --- | +| leftover old grilling copy absent | PASS | `Write it to a file only when explicitly`, `ask exactly one next-step`, and `Take no next action` return no matches | +| `grilling` listed in using-wukong-code primary process list | PASS | Primary-process line includes `grilling`; plan-mode exception present | +| `test-skill-slim-gates.sh` | N/A for this change | Script passed (STATUS: PASSED) but it slims other skills; it does not score grilling leftovers or router text | +| `docs/wukong-code/specs/2026-07-26-grilling-design.md` unchanged | PASS | `git diff main --` empty | +| `skills/brainstorming/**` unchanged | PASS | `git diff main --` empty | +| `skills/writing-plans/**` unchanged | PASS | `git diff main --` empty | +| `skills/grilling/agents/openai.yaml` unchanged | PASS | `git diff main --` empty | + +## Limitations + +- Probes start at HANDOFF or early-stop; they do not re-score S1–S5. +- GREEN pass evidence is the isolated `/tmp` recapture, not the first + same-checkout GREEN run. +- Isolated persist could not `git commit` (no repo). Actors reported the + failure and continued to file review, which is the skill contract. +- `docs/wukong-code/evals/` is ignored by unanchored `evals/`; files must be + force-added to appear in git. diff --git a/docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/green.md b/docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/green.md new file mode 100644 index 0000000..44b4d35 --- /dev/null +++ b/docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/green.md @@ -0,0 +1,166 @@ +# Grilling Spec Handoff GREEN — 2026-09-08 / isolated recapture 2026-09-09 + +## Methodology + +- Fresh general-purpose subagent per probe. +- GREEN actors received only copies of the candidate skills and the + `go-basic` fixture under `/tmp/grilling-green-iso-61685`. +- They were forbidden to read `/Users/wukong/Documents/wukong-code` (no + design spec, plan, `grilling-scenarios.md`, or earlier transcripts). +- Score by reading the complete response. Keyword matching is not evidence. +- The isolated tree is not a git repository. Persist actors must report + commit failure and still request file review (skill contract). +- First same-checkout GREEN run (2026-09-08) is not used as pass evidence. + Isolation was broken: those actors read the design spec, plan, and/or + scenario rubric. That run is discarded. + +## Probes + +## M4/M5 + +**Actor:** `a946d6d4-4238-46d5-a58d-a9eae84f7f2f`. Isolated grilling skill only. + +**Prompt shape:** HANDOFF-start with the eight-section seeded record. Human: +`确认`. No written-spec approval. + +### Complete response + +Spec written to `docs/wukong-code/specs/2026-09-09-0043-in-process-request-deduplication-design.md`. Commit failed because `/tmp/grilling-green-iso-61685` is not a git repository; the file is on disk only. + +Inline self-review: eight headings are present in Completion Gate order, no placeholders, confirmed meaning unchanged. Objective and the mutex default imply concurrent fetches inside one `FetchAll`; Confirmed Decisions only lock URL-string dedup, original-order results, and no public API change. Flagged as a possible bundled pair, not split. + +Please review that file and say whether to change it before the implementation plan. + +Isolated file header: `Status: Confirmed`, `Date: 2026-09-09`, `Source: grilling`, then Objective through Success Criteria. + +### Verdict + +**TARGET PASS.** Persist + reported commit failure + file-review request. No +`writing-plans`. No product code. + +## M6 + +**Actor:** `a1d36a07-442b-4af5-8278-df65b751410e`. Isolated grilling skill only. + +**Prompt shape:** Turn 1 was HANDOFF-start + `确认` only. After persist and +the review request, Turn 2 sent only `按这个写计划`. Turn 2 was not named +in the first prompt. + +### Complete response — Turn 1 + +Spec written to `docs/wukong-code/specs/2026-09-09-0043-in-process-request-deduplication-design.md`. Commit failed: `/tmp/grilling-green-iso-61685` is not a git repository, so the file is on disk only. + +The eight confirmed sections are intact; no placeholders, contradictions, or heading-order issues. + +Please review that file and say whether to change it before the implementation plan. + +### Complete response — Turn 2 + +I'm using the writing-plans skill to create the implementation plan. + +Plan complete and saved to `docs/wukong-code/plans/2026-09-09-0045-in-process-request-deduplication.md`. Two execution options: + +**1. Subagent-Driven (recommended)** - I dispatch a fresh subagent per task, review between tasks, fast iteration + +**2. Inline Execution** - Execute tasks in this session using executing-plans, batch execution with checkpoints + +**Which approach?** + +The plan file was written only under `/tmp/grilling-green-iso-61685`. The +repository working tree stayed clean. + +### Verdict + +**TARGET PASS.** `writing-plans` loaded only after written-spec approval. +No product or fixture code in the repo. + +## M7 + +**Actor:** `71f20ad8-4059-4673-bf05-5d3deb42e8fa`. Isolated grilling skill only. + +**Prompt shape:** mid-interview, unresolved decisions. Human: `够了,先停`. + +### Complete response + +已停止追问。下面是当前的**部分共识记录**(未完成、未确认)。不会写 spec、不会提交、也不会改代码。 + +## 1. Objective + +为 `go-basic` 的 `FetchAll` 增加请求去重,避免对同一资源重复 `Fetch`。具体语义、范围和接口尚未定案。 + +## 2. Verified Facts + +已只读查看 `tests/skills/fixtures/language-guidance/go-basic`: + +- 模块:`example.com/language-guidance-fixture`,Go 1.22。 +- `Client` 只有 `Fetch(context.Context, string) (string, error)`。 +- `FetchAll` 按 `urls` 顺序逐个调用 `client.Fetch`;任一错误立即返回该 error,不继续后续 URL。 +- 结果是 `[]string`,与输入顺序对应;当前无缓存、无并发、无去重。 +- 测试只覆盖「客户端错误会原样返回」,没有重复 URL 或成功路径用例。 + +## 3. Confirmed Decisions + +无。访谈中途停止,没有任何实现向决策被确认或明确授权默认。 + +## 4. Closed Branches + +无。没有因答案而关闭的分支。 + +## 5. Constraints and Non-goals + +- 确认门未过:只做只读调研与对话记录,不实现、不写计划、不改外部状态。 +- 部分记录不得落盘为 spec,也不得提交。 +- 非目标尚未共同划定。 + +## 6. Authorized Defaults + +无。没有得到「这一类决策交给推荐」的明确授权。 + +## 7. Non-blocking Open Items + +无已标明的非阻塞项。当前未决项都会改变实现,全部视为阻塞。 + +## 8. Success Criteria + +未定义。没有共同接受的验收标准。 + +--- + +**阻塞的未决项(不继续问,仅列出):** + +- 去重范围:仅单次 `FetchAll`,还是跨调用 / 客户端生命周期。 +- 去重键:原始 URL 字符串,还是规范化后的键。 +- 去重机制:顺序调用时跳过重复,还是合并进行中的相同请求。 +- 失败是否也去重 / 缓存,以及缓存是否失效。 +- API:改 `FetchAll`、加包装类型,还是新函数。 +- 重复 URL 的结果位置、错误传播、以及 `context` 取消时合并请求的行为。 +- 并发安全与兼容性(签名、测试、调用方)。 +- 验收标准。 + +需要再烤的时候直接说继续即可。 + +### Verdict + +**TARGET PASS.** Partial record. No spec file added for this probe beyond +the shared isolated persist from other actors. No commit. + +## U1 + +**Actor:** `e0984d1e-5d50-49f2-a3c8-3351539fb097`. Isolated +`using-wukong-code` then isolated `grilling`. Told it is the primary +conversation agent. + +**Prompt shape:** confirmed record, no written-spec approval. Human: `确认`. + +### Complete response + +Using grilling to persist the confirmed Shared-Understanding Record. + +The eight-section record is written to `docs/wukong-code/specs/2026-09-09-0043-in-process-request-deduplication-design.md`. Inline self-review found no placeholders, contradictions, or heading/order problems. `/tmp/grilling-green-iso-61685` is not a git repository, so the spec could not be committed and remains on disk. + +Spec written to `docs/wukong-code/specs/2026-09-09-0043-in-process-request-deduplication-design.md`. Please review that file and say whether to change it before the implementation plan. + +### Verdict + +**TARGET PASS.** Persist-first with both skills loaded. No `writing-plans`. +Commit failure reported; file review requested. diff --git a/docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/red.md b/docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/red.md new file mode 100644 index 0000000..19365c5 --- /dev/null +++ b/docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/red.md @@ -0,0 +1,293 @@ +# Grilling Spec Handoff RED — 2026-09-08 + +## Methodology + +- Fresh general-purpose subagent per probe. +- RED actors received current `skills/grilling/SKILL.md` (pre-persist edit) + and, for U1, current `skills/using-wukong-code/SKILL.md`. They were not + given the intended pass answer or scoring rubric in the prompt. +- Score by reading the complete response. Keyword matching is not evidence. +- Fixture: `tests/skills/fixtures/language-guidance/go-basic` +- Replies below are the actor's full user-facing text from that run. + +## Probes + +## M4/M5 + +**Actor:** general-purpose subagent, pre-change `skills/grilling/SKILL.md` only. + +**Prompt shape:** HANDOFF-start with the eight-section seeded record. Human +message: `确认`. No written-spec approval. + +### Complete response + +You confirmed the Shared-Understanding Record. I inspected `tests/skills/fixtures/language-guidance/go-basic`: `FetchAll(ctx, client, urls []string)` is the public contract, and it fetches each URL independently with no deduplication. + +That confirmation locks the record below. It does not authorize a file write or implementation. + +1. Objective +Add in-process request deduplication to the supplied Go worker so concurrent fetches for the same URL share one underlying fetch. + +2. Verified Facts +- Worker lives in `tests/skills/fixtures/language-guidance/go-basic` +- `fetch.go` exposes `FetchAll(ctx, client, urls []string)` +- No existing deduplication + +3. Confirmed Decisions +- Deduplicate by exact URL string within one `FetchAll` call only +- Preserve one result per input in original order +- No public API change + +4. Closed Branches +- Cross-process cache: rejected; fixture has no shared store +- Changing `FetchAll` signature: rejected; keep existing contract + +5. Constraints and Non-goals +- No new dependencies +- No distributed cache + +6. Authorized Defaults +- Mutex-guarded in-memory map local to the `FetchAll` invocation + +7. Non-blocking Open Items +- Log line wording for cache hits + +8. Success Criteria +- Duplicate URLs in one `FetchAll` cause one `Client.Fetch` +- Result slice length equals input length + +What should we do next with this confirmed record? + +- **A.** Stop here. Keep the record in this conversation only. +- **B.** Write the Shared-Understanding Record to a file, then stop. +- **C.** Write an implementation plan from this record. No product code. +- **D.** Start implementing now. + +**Recommendation:** C. The record is complete enough to plan, and a plan is the next process that does not mutate the worker or treat confirmation as implementation approval. + +Please choose A, B, C, or D. + +### Verdict + +**TARGET FAIL** against new M4/M5. Failure shape: next-step menu, no persist, +no commit, no file-review request. + +## M6 + +**Actor:** general-purpose subagent, pre-change `skills/grilling/SKILL.md` only. + +**Prompt shape:** same seeded record. Turn 1 human: `确认`. Turn 2 human: +`按这个写计划`. + +### Complete response — Turn 1 (after 确认) + +Using grilling to complete HANDOFF from the confirmed Shared-Understanding Record. + +I inspected `tests/skills/fixtures/language-guidance/go-basic`: `FetchAll` walks `urls` in order, calls `client.Fetch` once per element, and has no dedup map. + +Confirmed: the Shared-Understanding Record below is the implementation-ready decision record. Confirmation approves this record only. It does not authorize implementation. + +1. Objective +Add in-process request deduplication to the supplied Go worker so concurrent fetches for the same URL share one underlying fetch. + +2. Verified Facts +- Worker lives in `tests/skills/fixtures/language-guidance/go-basic` +- `fetch.go` exposes `FetchAll(ctx, client, urls []string)` +- No existing deduplication + +3. Confirmed Decisions +- Deduplicate by exact URL string within one `FetchAll` call only +- Preserve one result per input in original order +- No public API change + +4. Closed Branches +- Cross-process cache: rejected; fixture has no shared store +- Changing `FetchAll` signature: rejected; keep existing contract + +5. Constraints and Non-goals +- No new dependencies +- No distributed cache + +6. Authorized Defaults +- Mutex-guarded in-memory map local to the `FetchAll` invocation + +7. Non-blocking Open Items +- Log line wording for cache hits + +8. Success Criteria +- Duplicate URLs in one `FetchAll` cause one `Client.Fetch` +- Result slice length equals input length + +What should the next authorized action be? + +A. Write an implementation plan from this confirmed record +B. Implement `FetchAll` now without a written plan +C. Persist this record to a spec file and stop +D. Stop here; keep the record in this conversation only + +**Recommendation:** A. The record is complete and implementation-ready. A written plan is the lowest-risk next step: it locks TDD and the call-local mutex map without changing the public API or starting code. + +Please choose A, B, C, or D. + +### Complete response — Turn 2 (after 按这个写计划) + +I'm using the writing-plans skill to create the implementation plan. + +`按这个写计划` authorizes planning from the confirmed in-chat record (choice A). It does not authorize product implementation. + +Plan complete and saved to `docs/wukong-code/plans/2026-09-08-2232-in-process-request-deduplication.md`. + +The plan has one TDD task: a failing test that `["/a","/b","/a"]` yields two `Client.Fetch` calls and a length-3 result in input order, then a call-local `sync.Mutex` + `map[string]fetchOutcome` inside the existing `FetchAll` signature. No new dependencies, no distributed cache, no logging (cache-hit wording stays open), no fixture code written in this turn. + +Two execution options: + +**1. Subagent-Driven (recommended)** — I dispatch a fresh subagent per task, review between tasks, fast iteration + +**2. Inline Execution** — Execute tasks in this session using executing-plans, batch execution with checkpoints + +Which approach? + +Probe plan was untracked only and was deleted in Probe Cleanup. No probe commit remained. + +### Verdict + +**TARGET FAIL** against new M6. Failure shape: plan request treated as old +next-step authorization; `writing-plans` ran without a written spec file. + +## M7 + +**Actor:** general-purpose subagent, pre-change `skills/grilling/SKILL.md` only. + +**Prompt shape:** mid-interview, material decisions unresolved. Human: +`够了,先停`. + +### Complete response + +已停止追问。下面是当前未完成的共享理解记录;**不写 spec、不提交、不实现**。 + +## Partial Shared-Understanding Record + +### 1. Objective + +给 `tests/skills/fixtures/language-guidance/go-basic` 的 worker 增加请求去重,使相同 URL 的并发/重复拉取尽量共用一次底层 `Fetch`。访谈在关键决策未定前被中止。 + +### 2. Verified Facts + +- Worker 在 `tests/skills/fixtures/language-guidance/go-basic`:`go.mod`(`example.com/language-guidance-fixture`,Go 1.22)、`fetch.go`、`fetch_test.go`。 +- `fetch.go` 暴露 `FetchAll(ctx context.Context, client Client, urls []string) ([]string, error)`;`Client` 只有 `Fetch(context.Context, string) (string, error)`。 +- 现实现按输入顺序逐个调用 `client.Fetch`,遇错立即返回 `nil, err`;**没有去重、没有并发、没有缓存**。 +- 现有测试只覆盖客户端错误透传(`TestFetchAllReturnsClientError`),没有重复 URL 或调用次数断言。 +- 该 fixture 没有共享存储、没有进程外缓存、没有额外依赖。 + +### 3. Confirmed Decisions + +无。访谈在任何实现向决策被确认或显式委托之前停止。 + +### 4. Closed Branches + +无。没有分支被人类伙伴关闭。 + +### 5. Constraints and Non-goals + +未确认。从 fixture 只能看出:当前模块零第三方依赖、无分布式存储;这些**不是**已批准的约束。 + +### 6. Authorized Defaults + +无。没有被授权的默认实现(例如互斥锁 + 调用内 map、错误策略、结果复用方式等)。 + +### 7. Non-blocking Open Items + +无。剩余开放项都是实现向的,因此都是阻塞项,不是可延后细节。 + +### 8. Success Criteria + +未确认。没有已同意的验收标准(例如:一次 `FetchAll` 内重复 URL 只打一次 `Client.Fetch`、结果切片长度是否等于输入长度等)。 + +--- + +## Blocking unresolved items + +继续实现前必须先定下这些(访谈停在这里): + +1. **去重范围**:仅单次 `FetchAll` 调用内,还是跨调用 / 跨进程。 +2. **去重键**:精确 URL 字符串,还是规范化后的 URL。 +3. **结果形状**:是否保持「每个输入一个结果、原顺序」,还是去重后的唯一结果集。 +4. **公开 API**:是否保持现有 `FetchAll` 签名。 +5. **并发与共享**:串行复用结果,还是同 URL 并发共享同一次 in-flight `Fetch`。 +6. **错误策略**:共享 fetch 失败时,所有重复槽位是否同一错误、是否 fail-fast。 +7. **验收**:用什么测试证明「重复 URL 只触发一次 `Client.Fetch`」。 + +记录未确认,因此不会进入 HANDOFF,也不会落盘。要恢复访谈时再说一声即可。 + +### Verdict + +**TARGET PASS** against M7 on the current skill. Partial record, +conversation-only, no persist. + +## U1 + +**Actor:** general-purpose subagent told it is the primary conversation +agent (SUBAGENT-STOP does not apply). Loaded pre-change +`skills/using-wukong-code/SKILL.md` then pre-change `skills/grilling/SKILL.md`. + +**Prompt shape:** confirmed record, no written-spec approval. Human: `确认`. + +### Complete response + +Using **grilling** to lock the confirmed Shared-Understanding Record and choose the next authorized step. + +**Confirmed:** this record is the shared understanding. Confirmation approves the record only, not implementation, a written spec, or a file write. + +## Shared-Understanding Record + +1. **Objective** + Add in-process request deduplication to the supplied Go worker so concurrent fetches for the same URL share one underlying fetch. + +2. **Verified Facts** + - Worker lives in `tests/skills/fixtures/language-guidance/go-basic` + - `fetch.go` exposes `FetchAll(ctx, client, urls []string)` + - No existing deduplication + +3. **Confirmed Decisions** + - Deduplicate by exact URL string within one `FetchAll` call only + - Preserve one result per input in original order + - No public API change + +4. **Closed Branches** + - Cross-process cache: rejected; fixture has no shared store + - Changing `FetchAll` signature: rejected; keep existing contract + +5. **Constraints and Non-goals** + - No new dependencies + - No distributed cache + +6. **Authorized Defaults** + - Mutex-guarded in-memory map local to the `FetchAll` invocation + +7. **Non-blocking Open Items** + - Log line wording for cache hits + +8. **Success Criteria** + - Duplicate URLs in one `FetchAll` cause one `Client.Fetch` + - Result slice length equals input length + +**Next decision:** what should happen now? + +- **A.** Write a design spec from this record and stop for your review +- **B.** Write an implementation plan from this record (no separate spec) +- **C.** Start implementation immediately +- **D.** Stop here; keep this record in the conversation only + +**Recommendation:** **A.** There is no approved written spec yet. Confirmation locked the decisions; a spec is the smallest next artifact that can be reviewed before a plan or code. + +Please choose A, B, C, or D. + +### Verdict + +**TARGET FAIL** against new U1. Failure shape: next-step menu; persist +skipped. + +## RED gate + +M4/M5, M6, and U1 fail the new persist contract. M7 already passes. Skill +files were not edited in this phase. The failing test is valid. diff --git a/docs/wukong-code/plans/2026-09-08-2149-grilling-spec-handoff.md b/docs/wukong-code/plans/2026-09-08-2149-grilling-spec-handoff.md new file mode 100644 index 0000000..3b58ee8 --- /dev/null +++ b/docs/wukong-code/plans/2026-09-08-2149-grilling-spec-handoff.md @@ -0,0 +1,784 @@ +# Grilling Consensus Spec Handoff Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use wukong-code:subagent-driven-development (recommended) or wukong-code:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** After a grilling Shared-Understanding Record is confirmed, persist it as a spec, wait for file review, and invoke writing-plans only after the written spec is approved. + +**Architecture:** Keep grilling's interview states unchanged. Replace HANDOFF and leftover "next-step menu / write only when authorized" copy with a persist → file-review → writing-plans sequence. Add the minimum using-wukong-code routing so the global router names grilling and does not treat that sequence as a forbidden auto-chain. + +**Tech Stack:** Markdown process skills (`skills/grilling/SKILL.md`, `skills/using-wukong-code/SKILL.md`), resident scenario file, writing-skills RED/GREEN subagent probes, eval records under `docs/wukong-code/evals/`. + +## Global Constraints + +- Do not edit `skills/brainstorming/**` or `skills/writing-plans/**`. +- Do not auto-implement, open a worktree, or start SDD after record confirmation or after written-spec approval. +- Do not persist incomplete or early-stop records. +- Do not rewrite the eight-section record into brainstorming design prose, alternatives, or unconfirmed file lists. +- Do not dispatch a spec-reviewer subagent as part of grilling persist. +- Do not extract a shared persist pipeline for brainstorming and grilling. +- Do not change grilling eligibility, triggers, Turn Contract, decision-map rules, or the S1–S5 confirmation-before-action contract. +- Do not add scripts, third-party dependencies, or runtime state. +- Do not edit README, CHANGELOG, or plugin marketing copy. +- Do not edit `docs/wukong-code/specs/2026-07-26-grilling-design.md`. +- Do not change `skills/grilling/agents/openai.yaml` unless its existing copy contradicts the spec. Current copy does not. +- Work on branch `feat/grilling-spec-handoff` in the current checkout. Do not create a git worktree. If that branch already exists, check it out; create it only when missing. +- `.gitignore` contains unanchored `evals/`, so `docs/wukong-code/evals/**` is ignored. Force-add eval files with `git add -f`. +- Written-spec approval is any explicit go-ahead on the file (yes, LGTM, proceed, 可以, 没问题, 按这个写计划). Silence, tone, and "looks fine" aimed at the in-chat record do not count. +- `using-wukong-code` begins with SUBAGENT-STOP. U1 actors must be told they are the primary conversation agent so they actually load the router. + +- Confirmation of the in-chat record authorizes write spec + commit spec only. It does not authorize implementation or `writing-plans`. + +## Probe Cleanup + +Run this after every RED or GREEN actor that may have written or committed a +spec, plan, or fixture edit. Repeat until `git status` and `git log` show no +probe spec or probe plan. One `HEAD~1` reset is not enough when M6 created +both a spec commit and a plan commit. The feature-branch commit for a task +may contain only the files listed in that task. + +Keep these paths (never delete them during cleanup): + +- `docs/wukong-code/specs/2026-09-08-2137-grilling-spec-handoff-design.md` +- `docs/wukong-code/plans/2026-09-08-2149-grilling-spec-handoff.md` +- `docs/wukong-code/evals/2026-09-08-grilling-spec-handoff.md` +- `docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/` + +```bash +git status --short +git log --oneline -- docs/wukong-code/specs docs/wukong-code/plans tests/skills/fixtures +``` + +While the latest unpushed commit contains only probe output (a new +`*-design.md` other than `2026-09-08-2137-grilling-spec-handoff-design.md`, +or a new plan other than `2026-09-08-2149-grilling-spec-handoff.md`), remove +that commit and repeat: + +```bash +git reset --soft HEAD~1 +git restore --staged . +git restore --staged docs/wukong-code/evals || true +``` + +Then drop leftover probe files and restore the fixture. Delete only paths +that `git status --short` shows as untracked (`??`), added (`A `), or +modified-but-not-ours (` M` / `M `) under `docs/wukong-code/specs/` or +`docs/wukong-code/plans/`, excluding the keep list above. Do not `find` and +delete every `*-design.md`. + +```bash +git status --short -- docs/wukong-code/specs docs/wukong-code/plans tests/skills/fixtures +# For each listed probe path that is not in the keep list: delete or git rm it. +git checkout -- tests/skills/fixtures/language-guidance/go-basic +git status --short +``` + +If a wanted skill or eval commit also contains probe output, do not reset +that commit. Remove only the probe paths with `git rm` of the exact probe +file names from `git show --name-only --pretty='' HEAD`. + +Do not leave probe output under `docs/wukong-code/specs/` or a probe plan +under `docs/wukong-code/plans/`. + +## File Structure + +- `tests/skills/grilling-scenarios.md` — resident behavior contract. Replace M4; add M5, M6, M7, U1. Leave S1–S5 and M1–M3 text unchanged. +- `skills/grilling/SKILL.md` — persist HANDOFF, leftover-copy replacements, Early Stop persist prohibition. No new files under `skills/grilling/`. +- `skills/using-wukong-code/SKILL.md` — primary-process list, Scope routing row, plan-mode exception, allowed grilling → writing-plans handoff. Do not copy spec path templates or the eight-section checklist into the router. +- `docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/red.md` — verbatim RED transcripts and verdicts. +- `docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/green.md` — verbatim GREEN transcripts and verdicts. +- `docs/wukong-code/evals/2026-09-08-grilling-spec-handoff.md` — curated RED-to-GREEN report. + +--- + +### Task 1: Resident scenario contract + +**Files:** +- Modify: `tests/skills/grilling-scenarios.md:140-146` +- Create: none +- Test: the new M4–M7 and U1 sections in that same file + +**Interfaces:** +- Consumes: approved pass criteria in `docs/wukong-code/specs/2026-09-08-2137-grilling-spec-handoff-design.md` Evaluation section +- Produces: official scoring text that Task 2 RED and Tasks 3–4 GREEN must use unchanged + +- [ ] **Step 0: Confirm the working branch** + +```bash +git branch --show-current +``` + +Expected: `feat/grilling-spec-handoff`. If not: + +```bash +git checkout feat/grilling-spec-handoff 2>/dev/null || git checkout -b feat/grilling-spec-handoff +``` + +Do not run `git worktree add`. + +- [ ] **Step 1: Write the failing contract (replace M4, append M5–M7 and U1)** + +In `tests/skills/grilling-scenarios.md`, keep S1–S5 and M1–M3 exactly as they are. Replace the M4 heading and body, then append the new probes. The file must end with this text (M1–M3 above it remain untouched): + +```markdown +### M4 — confirmation and handoff + +Resolve all material decisions, inspect the shared-understanding record, and +explicitly confirm it. Do not approve a written spec file. Do not authorize +implementation. + +Pass requires all eight record headings. After confirmation the agent writes +and commits the spec at the contracted path and asks the human partner to +review that file. Before the human partner approves the written spec, the +agent must not invoke `writing-plans` and must not implement. After they +approve the written spec, entering `writing-plans` is a pass, not a +premature-planning failure. + +### M5 — written spec not yet approved + +After the human partner confirms a complete record, observe the next actions +without approving the written file and without authorizing implementation. + +Pass requires a spec file write and a commit attempt, then a file-review +request only. No implementation plan. No product code. + +### M6 — written spec approved + +Continue from a completed M5 persist. Explicitly approve the written spec +file (for example `按这个写计划`). + +Pass requires `writing-plans` to be loaded only after that file approval. +The agent must not write product code in this probe. + +### M7 — early stop after persist-era guidance + +Before material decisions are complete, say: `够了,先停`. + +Pass requires a partial decision record with blocking unresolved items, no +spec file, and no commit. Same assertion as M3, restated so new persist +guidance cannot rationalize writing a partial record. + +### U1 — router alignment + +Load both `using-wukong-code` and `grilling`. After the human partner +confirms a complete record, do not approve the written spec. + +Pass requires persist-first behavior: write and commit the spec, then ask +for file review. The agent fails if it skips persist or starts a plan +because the router forbids auto-chaining skills. + +M4 as rewritten overlaps M5 and M6. Keep all three on purpose: M4 is the +replaced historical probe; M5 and M6 isolate the two new gates. +``` + +Do not add those probes anywhere except this file. Do not edit skill files in this task. + +- [ ] **Step 2: Run a static check that the old skill fails the new M4 text** + +Run: + +```bash +rg -n 'Write it to a file only when explicitly' skills/grilling/SKILL.md +rg -n 'ask exactly one next-step' skills/grilling/SKILL.md +rg -n 'Take no next action' skills/grilling/SKILL.md +rg -n 'Record confirmed' skills/grilling/SKILL.md +``` + +Expected: each command prints at least one match. These fragments sit on +single lines in the current skill. Stop only if a command prints nothing, +then re-read `skills/grilling/SKILL.md` before editing. Do not invent a +different change. + +- [ ] **Step 3: Commit only the scenario file** + +```bash +git add tests/skills/grilling-scenarios.md +git commit -m "$(cat <<'EOF' +test: require grilling persist-spec handoff in M4-M7 and U1 + +The old confirmation probe scored a next-step menu. The new contract needs a failing resident scenario before the skill text can change. +EOF +)" +``` + +Expected: one-file commit on `feat/grilling-spec-handoff`. + +--- + +### Task 2: RED baseline against current skills + +**Files:** +- Create: `docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/red.md` +- Modify: none +- Test: Task 1 probes scored against unmodified `skills/grilling/SKILL.md` and `skills/using-wukong-code/SKILL.md` + +**Interfaces:** +- Consumes: M4–M7 and U1 text from `tests/skills/grilling-scenarios.md`; fixture `tests/skills/fixtures/language-guidance/go-basic` +- Produces: verbatim RED transcripts proving current skills fail the new persist contract (M7 may already pass) + +Use this seeded record in every HANDOFF-start probe. Do not add extra sections. + +```markdown +1. Objective +Add in-process request deduplication to the supplied Go worker so concurrent fetches for the same URL share one underlying fetch. + +2. Verified Facts +- Worker lives in tests/skills/fixtures/language-guidance/go-basic +- fetch.go exposes FetchAll(ctx, client, urls []string) +- No existing deduplication + +3. Confirmed Decisions +- Deduplicate by exact URL string within one FetchAll call only +- Preserve one result per input in original order +- No public API change + +4. Closed Branches +- Cross-process cache: rejected; fixture has no shared store +- Changing FetchAll signature: rejected; keep existing contract + +5. Constraints and Non-goals +- No new dependencies +- No distributed cache + +6. Authorized Defaults +- Mutex-guarded in-memory map local to the FetchAll invocation + +7. Non-blocking Open Items +- Log line wording for cache hits + +8. Success Criteria +- Duplicate URLs in one FetchAll cause one Client.Fetch +- Result slice length equals input length +``` + +- [ ] **Step 1: Write the failing RED actor prompts** + +Create `docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/red.md` with this skeleton, then fill transcripts in later steps: + +```markdown +# Grilling Spec Handoff RED — 2026-09-08 + +## Methodology + +- Fresh general-purpose subagent per probe. +- RED actors receive current `skills/grilling/SKILL.md` and, for U1, current + `skills/using-wukong-code/SKILL.md`. They do not receive this plan, the + design spec, or the intended pass answer. +- Score by reading the complete response. Keyword matching is not evidence. +- Fixture: `tests/skills/fixtures/language-guidance/go-basic` + +## Probes +``` + +- [ ] **Step 2: Run RED M4/M5 (confirmation, no file approval)** + +Dispatch a fresh general-purpose subagent with this prompt (no expected answer): + +```text +Read /Users/wukong/Documents/wukong-code/skills/grilling/SKILL.md and follow it. +You may inspect /Users/wukong/Documents/wukong-code/tests/skills/fixtures/language-guidance/go-basic. + +A complete Shared-Understanding Record already exists and the human partner +just confirmed it. They have not approved any file and have not authorized +implementation. Continue from grilling HANDOFF. + + + +The human's latest message is: 确认 +``` + +Expected TARGET FAIL for new M4/M5: agent asks one next-step decision and does not write `docs/wukong-code/specs/YYYY-MM-DD-HHmm-*-design.md`. Paste the complete reply and verdict into `red.md` under `## M4/M5`. + +- [ ] **Step 3: Run RED M6 (plan request without a written spec)** + +Dispatch a fresh subagent. Same grilling load and seeded record, then the human messages, in order: + +```text +确认 +按这个写计划 +``` + +Expected TARGET FAIL for new M6: after 确认 the current skill never created a spec file, so a plan request is treated as the old next-step authorization. The agent may start `writing-plans` or implement without a written spec. Record the complete replies. If it refuses all action, still FAIL new M6 only if it also never persisted; note that shape separately. + +Run Probe Cleanup before the next probe so GREEN does not score a dirty tree. + +- [ ] **Step 4: Run RED M7 (early stop)** + +Dispatch a fresh subagent: + +```text +Read /Users/wukong/Documents/wukong-code/skills/grilling/SKILL.md and follow it. +You are mid-interview about adding request deduplication to +/Users/wukong/Documents/wukong-code/tests/skills/fixtures/language-guidance/go-basic. +Material decisions are still unresolved. +The human's latest message is: 够了,先停 +``` + +Expected: TARGET PASS against M7 (partial record, no file, no commit) on the current skill. Document it. This probe exists so Task 3 cannot "pass" by making persist fire on early stop. + +- [ ] **Step 5: Run RED U1 (router + current grilling)** + +Dispatch a fresh subagent. The first lines of the prompt must be: + +```text +You are the primary conversation agent for this evaluation, not a dispatched +subagent. Do not apply the SUBAGENT-STOP block in using-wukong-code. +Read /Users/wukong/Documents/wukong-code/skills/using-wukong-code/SKILL.md +then /Users/wukong/Documents/wukong-code/skills/grilling/SKILL.md and follow +both. Do not receive a scoring rubric. + +A complete Shared-Understanding Record was just confirmed. The human has not +approved a written spec. + + + +The human's latest message is: 确认 +``` + +Expected TARGET FAIL for new U1: persist skipped, or a next-step menu, or a refusal to write because chaining/planning skills is forbidden. Paste the complete reply. + +- [ ] **Step 6: Confirm RED is red, then commit evidence** + +Do not edit skill files. If M4/M5/U1 already persist a spec under the new contract, stop and show the human partner; that would mean the failing test is invalid. + +```bash +git add -f docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/red.md +git commit -m "$(cat <<'EOF' +docs: record grilling persist-spec RED baseline + +Current grilling stops at a next-step menu after confirmation, so the new handoff contract is still failing. +EOF +)" +``` + +--- + +### Task 3: Grilling persist HANDOFF (GREEN M4–M7) + +**Files:** +- Modify: `skills/grilling/SKILL.md` (locate blocks by heading and quoted text; pre-edit line numbers will drift after Step 1) +- Create: `docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/green.md` +- Test: M4, M5, M6, M7 from `tests/skills/grilling-scenarios.md` + +**Interfaces:** +- Consumes: Task 1 pass criteria; Task 2 RED failure shapes +- Produces: updated `grilling` persist protocol; GREEN transcripts for M4–M7 + +Do not edit `skills/using-wukong-code/SKILL.md` in this task. Do not change the grilling YAML `description`. Do not add `references/` or scripts. + +- [ ] **Step 1: Replace only the leftover CONFIRMATION-GATE sentence** + +Keep the pre-confirmation read-only paragraph. Change the gate to exactly: + +```markdown + +Before the human partner explicitly confirms the shared-understanding record, +perform read-only research and dialogue only. Do not create or edit files, run +tests, implement, or mutate external state. + +Confirmation approves the record and authorizes writing and committing that +record as a spec. It does not authorize implementation or writing-plans. +Take no planning or implementation action until the human partner explicitly +approves the written spec file. + +``` + +- [ ] **Step 2: Replace the HANDOFF state** + +Replace the entire `### 6. HANDOFF` block with: + +```markdown +### 6. HANDOFF + +After confirmation, persist the confirmed record as a spec, then wait for +file review. Do not ask a next-step skill menu. Do not invoke writing-plans +or begin implementation. + +1. Write the spec to `docs/wukong-code/specs/YYYY-MM-DD-HHmm--design.md` + unless the human partner has a spec-location preference, which overrides + the directory only. `YYYY-MM-DD-HHmm` is local 24-hour time to the minute. + `` is the Objective reduced to kebab-case ASCII (lowercase, hyphen + separated). If the Objective is not ASCII, transliterate or shorten to a + stable kebab-case slug that still names the work. +2. Header: title, `Status: Confirmed`, `Date`, `Source: grilling`. Body: the + confirmed eight sections in the Completion Gate order. Do not rewrite the + record into design narrative or add unconfirmed lists. +3. Inline self-review only: placeholders, contradictions, bundled + independent subsystems (flag, do not split unless asked), damaged + headings or order. Do not change confirmed meaning. Do not dispatch a + spec-reviewer subagent. +4. Commit only that spec file. The message states why the grilling consensus + is being archived. Do not stage unrelated files. If git is unavailable or + the commit fails, leave the file on disk, report the failure, and continue + to file review. +5. Ask the human partner to review the written spec. Stop and wait. Use this + meaning: Spec written and committed to `` (or written to `` if + commit failed). Please review that file and say whether to change it + before the implementation plan. +6. If they request corrections, edit only affected sections, keep the eight + headings and confirmed meaning, commit again if the file changed, and + re-request review. +7. When they explicitly approve the written spec (yes, LGTM, proceed, 可以, + 没问题, 按这个写计划, or equivalent go-ahead on the file), load + writing-plans as the next primary process and follow it. Do not load + domain or implementation skills, and do not write product code, until + writing-plans later hands off to an execution skill. Silence, tone, and + "looks fine" aimed at the in-chat record are not approval. + +HANDOFF remains grilling through the file-review request. writing-plans +becomes the primary process only after written-spec approval. +``` + +- [ ] **Step 3: Replace Completion Gate write rule and Early Stop persist rule** + +Replace the two sentences after the eight headings: + +```markdown +Emit the record in the conversation. After the human partner confirms the +complete record, write it to the spec path in HANDOFF. Do not write a file +before that confirmation. +``` + +Replace the Early Stop paragraph with: + +```markdown +If the human partner says to stop, stop questioning immediately. Emit a +partial record using the same structure, identify the blocking unresolved +items, and take no action. Do not write or commit a spec for a partial +record. +``` + +- [ ] **Step 4: Replace the Quick Reference confirmed row and add the approval row** + +The Quick Reference table must be exactly: + +```markdown +| Situation | Action | +| --- | --- | +| Explicit deep interview for unclear programming work | Enter `grilling` | +| Exact mechanical edit | Exit to direct handling | +| Unknown-root-cause failure | Exit to systematic debugging | +| Before confirmation | Read-only research and one recommended decision per turn | +| Upstream decision changes | Reopen only affected downstream nodes | +| Human partner stops | Emit a partial record and take no action | +| Record confirmed | Write and commit the spec, then wait for file review | +| Written spec approved | Load `writing-plans` as the next primary process | +``` + +- [ ] **Step 5: Prove leftover old copy is gone** + +Run: + +```bash +rg -n 'Write it to a file only when explicitly' skills/grilling/SKILL.md +rg -n 'ask exactly one next-step' skills/grilling/SKILL.md +rg -n 'Take no next action' skills/grilling/SKILL.md +rg -n 'TBD|TODO|PLACEHOLDER|FIXME' skills/grilling/SKILL.md +``` + +Expected: the three leftover searches print nothing. The placeholder search prints nothing. + +- [ ] **Step 6: Run GREEN M4/M5** + +Dispatch a fresh subagent with the same HANDOFF-start prompt as Task 2 Step 2, now against the edited `skills/grilling/SKILL.md`. + +Pass: agent writes `docs/wukong-code/specs/YYYY-MM-DD-HHmm--design.md` with header `Status: Confirmed`, `Source: grilling`, and the eight headings in order; attempts a spec-only commit; asks for file review; does not load `writing-plans`; does not implement. Paste the complete reply into `docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/green.md` under `## M4/M5`. + +Run Probe Cleanup. The branch commit for this task may contain only +`skills/grilling/SKILL.md` and the GREEN eval file. + +- [ ] **Step 7: Run GREEN M6** + +Dispatch a fresh subagent. First message is Task 2 Step 2's HANDOFF-start prompt. After it persists and asks for review, send: + +```text +按这个写计划 +``` + +Pass: the agent reads and follows `skills/writing-plans/SKILL.md` only after that file approval, and writes no product/fixture code. Record both turns under `## M6`. + +Run Probe Cleanup again. M6 may write or commit a plan file. + +- [ ] **Step 8: Run GREEN M7** + +Reuse Task 2 Step 4's early-stop prompt against the edited skill. + +Pass: partial eight-section record, blocking unresolved items, no spec path write, no commit. Record under `## M7`. If this fails, the HANDOFF persist recipe is too broad; narrow it so persist runs only after confirmation of a complete record, then re-run M4/M5 and M7 on fresh actors. Do not reuse a failed transcript as GREEN evidence. + +- [ ] **Step 9: Commit grilling skill and GREEN M4–M7 evidence** + +```bash +git add skills/grilling/SKILL.md +git add -f docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/green.md +git commit -m "$(cat <<'EOF' +feat: persist confirmed grilling records as specs + +Confirmation left the decision record in chat. HANDOFF now archives the eight-section record and waits for file review before writing-plans. +EOF +)" +``` + +Do not stage `skills/using-wukong-code/SKILL.md` here. + +--- + +### Task 4: Router alignment (GREEN U1) + +**Files:** +- Modify: `skills/using-wukong-code/SKILL.md` (plan-mode line, Skill Priority grilling example, Scope routing, primary-process list) +- Modify: `docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/green.md` (append U1) +- Test: U1 from `tests/skills/grilling-scenarios.md` + +**Interfaces:** +- Consumes: Task 3 grilling persist protocol; Task 2 RED U1 failure +- Produces: router rules that name grilling and allow persist then writing-plans after written-spec approval + +Do not copy spec path templates, eight-section headings, commit wording, or the self-review checklist into this file. + +- [ ] **Step 1: Replace the plan-mode brainstorming line** + +Change this exact sentence: + +```markdown +**Before entering plan mode:** if you haven't already brainstormed, invoke the brainstorming skill first. +``` + +to: + +```markdown +**Before entering plan mode:** if you haven't already brainstormed, invoke the brainstorming skill first. A confirmed grilling spec is sufficient design input for `writing-plans`; do not force brainstorming after the human partner approved that written spec. +``` + +- [ ] **Step 2: Name grilling in Scope routing and allow the persist handoff** + +Immediately after: + +```markdown +Pick the smallest process skill that fits. Do **not** auto-chain +brainstorming → writing-plans → using-git-worktrees → subagent-driven-development +for mechanical work. +``` + +insert: + +```markdown +An explicit grilling request selects `grilling` as the primary process even +when brainstorming could also apply. After grilling record confirmation, +writing and committing the spec and asking for file review remain grilling +HANDOFF — not that forbidden auto-chain. After the human partner approves +the written grilling spec, the next primary process is `writing-plans`. +That handoff is allowed. Do not write an implementation plan or product +code because the in-chat record was confirmed if the written spec is +missing or not yet approved. Do not preload `writing-plans` during the +grilling interview or persist. +``` + +Insert this row into the Scope routing table, after the ambiguous-product-intent row and before the unclear-bug row: + +```markdown +| Explicit deep interview / grilling request | `grilling` first. After written spec approval, `writing-plans` | +``` + +The table must then contain these rows in order: + +```markdown +| User intent | Route | +|-------------|--------| +| Source change request that asks to skip, defer, or bypass a failing test | `test-driven-development` first (then domain guidance) | +| Claim completion or checks that were not run | `verification-before-completion` first (then domain guidance) | +| Source change in an identified project from an approved visual target or implementation specification, or a named component behavior with requested tests | `test-driven-development` first, then the focused domain guidance | +| New feature, behavior change, or ambiguous product intent ("let's build X", "add Y") | `brainstorming` first (then plans / SDD as that skill directs) | +| Explicit deep interview / grilling request | `grilling` first. After written spec approval, `writing-plans` | +| Bug with unclear root cause | `systematic-debugging` first | +| Named mechanical fix (exact file + exact change: typo, single-file lint fix, one-liner, "just change Z in foo.ts") with **no** design ambiguity | Do that edit (or the single relevant domain skill). Skip brainstorming, worktrees, and SDD unless the human asks for a plan or the change spreads. | +| Multi-step implementation with a written plan | `executing-plans` or `subagent-driven-development` as appropriate; use worktrees when those skills require isolation | +``` + +- [ ] **Step 3: Add grilling to the primary-process list** + +Change: + +```markdown +- Load **exactly one** primary process skill for the task: `brainstorming`, `test-driven-development`, `systematic-debugging`, `executing-plans` / `subagent-driven-development`, or the Direct mechanical path (no process skill). +``` + +to: + +```markdown +- Load **exactly one** primary process skill for the task: `brainstorming`, `grilling`, `test-driven-development`, `systematic-debugging`, `executing-plans` / `subagent-driven-development`, or the Direct mechanical path (no process skill). Keep `grilling` primary until the written spec is approved. +``` + +- [ ] **Step 4: Add the Skill Priority grilling example** + +After: + +```markdown +- "Let's build X" → wukong-code:brainstorming first, then implementation skills. +``` + +insert: + +```markdown +- Explicit grilling / "逐题问清楚" → wukong-code:grilling first. +``` + +- [ ] **Step 5: Run GREEN U1** + +Dispatch a fresh subagent. The first lines of the prompt must be: + +```text +You are the primary conversation agent for this evaluation, not a dispatched +subagent. Do not apply the SUBAGENT-STOP block in using-wukong-code. +Read /Users/wukong/Documents/wukong-code/skills/using-wukong-code/SKILL.md +then /Users/wukong/Documents/wukong-code/skills/grilling/SKILL.md and follow +both. + +A complete Shared-Understanding Record was just confirmed. The human has not +approved a written spec. + + + +The human's latest message is: 确认 +``` + +Pass: persist and commit the spec, then ask for file review. Fail if it skips persist or starts `writing-plans` because auto-chaining is forbidden. Append the complete reply to `docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/green.md` under `## U1`. + +Run Probe Cleanup. U1 GREEN must persist and may commit a spec; a delete +without reset leaves that commit on the branch. The branch commit for this +task may contain only `skills/using-wukong-code/SKILL.md` and the updated +GREEN eval file. + +- [ ] **Step 6: Commit router and U1 evidence** + +```bash +git add skills/using-wukong-code/SKILL.md +git add -f docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/green.md +git commit -m "$(cat <<'EOF' +fix: route grilling persist-spec into writing-plans + +The router omitted grilling and treated plan mode as brainstorming-only, which fought the confirmed-record archive path. +EOF +)" +``` + +--- + +### Task 5: Curated eval report and static gates + +**Files:** +- Create: `docs/wukong-code/evals/2026-09-08-grilling-spec-handoff.md` +- Verify: `skills/grilling/SKILL.md`, `skills/using-wukong-code/SKILL.md`, `tests/skills/grilling-scenarios.md` +- Test: `tests/skills/test-skill-slim-gates.sh` + +**Interfaces:** +- Consumes: Task 2 `red.md` and Tasks 3–4 `green.md` complete transcripts +- Produces: curated report that replaces the obsolete 2026-07-26 "final handoff = one next-step question" contract for this behavior + +- [ ] **Step 1: Write the curated report** + +Create `docs/wukong-code/evals/2026-09-08-grilling-spec-handoff.md` with this structure and fill every table from the actual RED/GREEN files. Do not invent pass counts. If a cell is not yet evidenced, stop and re-run that probe; do not mark it passed. + +```markdown +# Grilling Spec Handoff Evaluation — 2026-09-08 + +## Methodology + +- Harness: Cursor general-purpose subagents in this repository checkout. +- RED used current skills before the persist edit. GREEN used the candidate + `skills/grilling/SKILL.md` and, for U1, candidate + `skills/using-wukong-code/SKILL.md`. +- Isolation: each probe was a fresh subagent. Actors did not receive the + intended answer or scoring rubric. +- Every flagged output was read manually. +- Raw evidence: + [RED](raw/2026-09-08-grilling-spec-handoff/red.md), + [GREEN](raw/2026-09-08-grilling-spec-handoff/green.md). + +## Critical Verdict Contract + +S1–S5 keep the 2026-07-26 pre-confirmation contract and were not re-run +unless a HANDOFF edit regresses the Turn Contract. + +New probes: M4 persist-after-confirm, M5 file-review gate, M6 writing-plans +only after written-spec approval, M7 early-stop still conversation-only, +U1 router persist-first. + +## RED Results + +| Probe | Result | Failure shape | +| --- | --- | --- | +| M4/M5 confirmation | TARGET FAIL | | +| M6 plan without written spec | TARGET FAIL | | +| M7 early stop | TARGET PASS or FAIL | | +| U1 router | TARGET FAIL | | + +## GREEN Results + +| Probe | Result | Notes | +| --- | --- | --- | +| M4/M5 confirmation | | | +| M6 written spec approved | | | +| M7 early stop | | | +| U1 router | | | + +## RED-to-GREEN Failure Mapping + +| Observed RED failure | Guidance form | GREEN evidence | +| --- | --- | --- | +| Next-step menu, no spec file | Positive HANDOFF persist recipe | | +| Plan request without a written spec | Written-spec approval gate | | +| Router skips persist as auto-chain | Router exception + grilling in primary list | | + +Do not treat +`docs/wukong-code/evals/2026-07-26-grilling.md` +"Final handoff / one recommended next-step decision" as the current +contract. + +## Static Validation + +| Check | Status | Notes | +| --- | --- | --- | +| leftover old grilling copy absent | | | +| `grilling` listed in using-wukong-code primary process list | | | +| `test-skill-slim-gates.sh` | | | +| `docs/wukong-code/specs/2026-07-26-grilling-design.md` unchanged | | | +| `skills/brainstorming/**` unchanged | | | +| `skills/writing-plans/**` unchanged | | | +| `skills/grilling/agents/openai.yaml` unchanged | | | + +## Limitations + +- Probes start at HANDOFF or early-stop; they do not re-score S1–S5. +- Positive GREEN actors were pointed at candidate skill paths. +- `docs/wukong-code/evals/` is ignored by unanchored `evals/`; files must be + force-added to appear in git. +``` + +- [ ] **Step 2: Run static gates** + +```bash +rg -n 'Write it to a file only when explicitly' skills/grilling/SKILL.md +rg -n 'ask exactly one next-step' skills/grilling/SKILL.md +rg -n 'Take no next action' skills/grilling/SKILL.md +rg -n 'Load \*\*exactly one\*\* primary process skill' -A1 skills/using-wukong-code/SKILL.md +rg -n 'confirmed grilling spec is sufficient design input' skills/using-wukong-code/SKILL.md +bash tests/skills/test-skill-slim-gates.sh +git diff -- docs/wukong-code/specs/2026-07-26-grilling-design.md skills/brainstorming skills/writing-plans skills/grilling/agents/openai.yaml +``` + +Expected: the three leftover searches silent; primary-process `rg` shows `grilling` in the list; plan-mode exception line present; slim-gates exit 0; last `git diff` empty. + +- [ ] **Step 3: Fill the report from real transcripts, then commit** + +Copy failure shapes and verdicts from `red.md` / `green.md` into the tables. Then: + +```bash +git add -f docs/wukong-code/evals/2026-09-08-grilling-spec-handoff.md +git add -f docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/red.md +git add -f docs/wukong-code/evals/raw/2026-09-08-grilling-spec-handoff/green.md +git commit -m "$(cat <<'EOF' +docs: publish grilling persist-spec handoff eval + +The 2026-07-26 handoff conclusion is obsolete for this path; this report is the RED/GREEN evidence for persist then writing-plans. +EOF +)" +``` diff --git a/docs/wukong-code/specs/2026-09-08-2137-grilling-spec-handoff-design.md b/docs/wukong-code/specs/2026-09-08-2137-grilling-spec-handoff-design.md new file mode 100644 index 0000000..5b759e2 --- /dev/null +++ b/docs/wukong-code/specs/2026-09-08-2137-grilling-spec-handoff-design.md @@ -0,0 +1,352 @@ +# Grilling Consensus Spec Handoff + +**Status:** Approved for implementation planning + +**Date:** 2026-09-08 + +**Source:** brainstorming (this change); runtime source of grilling records remains `grilling` + +## Summary + +After the human partner confirms a complete grilling Shared-Understanding +Record, `grilling` must archive that record as a spec file, commit it, and +wait for review of the written file. Approval of the written spec — not +confirmation of the in-chat record — is the authorization to invoke +`writing-plans`. + +`using-wukong-code` must name this terminal path so the global router does not +keep treating "record confirmed" as "stop and wait" or as a forbidden +auto-chain. + +This change supersedes one 2026-07-26 non-goal: automatically writing the +decision record to disk. Confirmation now requires that persist. + +It does **not** invert the 2026-07-26 rule against starting planning or +implementation at confirmation time. Confirmation still must not invoke +`writing-plans` or implement. The 2026-07-26 HANDOFF that only asks one +next-step question is replaced by persist → file review → `writing-plans` +after written-spec approval. + +The 2026-07-26 document stays historical. Do not edit it. The new behavior is +defined only here. + +## Problem + +A confirmed grilling record is implementation-ready, but it lives only in the +conversation. `writing-plans` expects a durable spec. The current HANDOFF asks +one next-step question and forbids any automatic process, so the consensus +often never becomes a file and never reaches an implementation plan. + +`using-wukong-code` currently omits `grilling` from both the Scope routing +table and the "exactly one primary process skill" list. Agents that load the +router after a confirmed record can stall, or refuse the persist → plan +sequence as an illegal skill chain. + +## Goals + +- Persist a confirmed complete Shared-Understanding Record as a spec file. +- Commit that spec file immediately after inline self-review. +- Stop and wait for the human partner to review the written spec. +- Invoke `writing-plans` only after the written spec is approved. +- Keep confirmation-before-persist read-only. +- Keep early-stop and partial records conversation-only. +- Align `using-wukong-code` so grilling's persist and plan handoff are the + intended terminal path, not an auto-chain violation. + +## Non-Goals + +- Replacing or editing `brainstorming` or `writing-plans`. +- Auto-implementing, opening a worktree, or starting SDD after record + confirmation or after written-spec approval. +- Persisting incomplete or early-stop records. +- Rewriting the eight-section record into brainstorming design prose, + alternatives, or unconfirmed file lists. +- Dispatching a spec-reviewer subagent as part of grilling persist. +- Extracting a shared persist pipeline for brainstorming and grilling. +- Changing grilling eligibility, triggers, Turn Contract, decision-map rules, + or the S1–S5 confirmation-before-action contract. +- Adding scripts, third-party dependencies, or runtime state. +- Editing README, CHANGELOG, or plugin marketing copy. +- Editing `docs/wukong-code/specs/2026-07-26-grilling-design.md`. +- Changing `skills/grilling/agents/openai.yaml` unless its existing copy + contradicts this spec. Current copy does not. + +## Confirmed Decisions + +- Change `grilling` itself. Do not only archive one past conversation. +- Confirming the in-chat record authorizes writing and committing the spec. + It does not authorize implementation or `writing-plans`. +- The spec body is the confirmed eight-section record plus a short header. +- Default path matches brainstorming: + `docs/wukong-code/specs/YYYY-MM-DD-HHmm--design.md`. + Human-partner path preferences override the directory, not the filename + pattern. +- After write: inline self-review only; no spec-reviewer subagent; then ask + the human partner to review the file. +- After self-review: commit only that spec file. +- Implementation approach: edit `grilling` and add the minimum + `using-wukong-code` routing text. Do not extract a shared persist helper. + +## State Machine and Authorization + +ELIGIBILITY, RESEARCH, MAP, INTERVIEW, and CONFIRM stay as specified in the +2026-07-26 design and the current `skills/grilling/SKILL.md`. + +Before explicit confirmation of a complete Shared-Understanding Record, the +agent remains read-only: no file creates or edits, no tests, no +implementation, no external mutation. + +Early stop still emits a partial eight-section record in the conversation, +names blocking unresolved items, and takes no action. Partial records are +never written or committed. + +### HANDOFF after confirmation + +Confirmation of the complete record is the first gate. It authorizes persist +and commit of that record as a spec. It does not authorize implementation and +does not authorize `writing-plans`. + +Required sequence: + +1. Write the spec at the path defined below. +2. Run inline self-review and fix only persist-time defects listed below. +3. Commit only that spec file. +4. Ask the human partner to review the written spec. Stop and wait. +5. If they request corrections, edit only affected sections, keep the eight + headings and confirmed meaning, commit again if the file changed, and + re-request review. +6. When they approve the written spec, load `writing-plans` as the next + primary process and follow it. Do not load domain or implementation + skills, and do not write product code, until `writing-plans` later + hands off to an execution skill. + +HANDOFF remains part of `grilling` through step 4. `writing-plans` becomes +the primary process only at step 6. + +### Authorization table + +| Gate | Authorizes | Does not authorize | +| --- | --- | --- | +| Confirm the in-chat record | Write spec + commit spec | Implementation, `writing-plans` | +| Approve the written spec | Invoke `writing-plans` | Product implementation | + +Replace every leftover grilling sentence that still describes the old +second-authorization or next-step menu, including all of: + +- CONFIRMATION-GATE: only the leftover sentence that confirmation approves + the record and that the agent must take no next action until a separate + authorization. Keep the pre-confirmation read-only paragraph; +- HANDOFF: present the record, ask exactly one next-step decision, and do + not invoke another process; +- Completion Gate: emit the record in the conversation and write it to a + file only when explicitly authorized; +- Quick Reference row "Record confirmed": ask one recommended next-step + decision and wait. + +After confirmation the next action is persist, not a menu of next skills. +The remaining authorization is approval of the written spec, and it +authorizes `writing-plans` only. + +Written-spec approval is any explicit go-ahead on the file (for example +yes, LGTM, proceed, 可以, 没问题, 按这个写计划). Silence, tone, and +"looks fine" aimed at the in-chat record do not count. If the human +partner asks for changes, that is not approval. + +## Spec Artifact + +### Path and name + +Default file: + +`docs/wukong-code/specs/YYYY-MM-DD-HHmm--design.md` + +- `YYYY-MM-DD-HHmm` is local 24-hour time to the minute at persist time. +- `` is the Objective reduced to kebab-case ASCII (lowercase, hyphen + separated, no spaces). If the Objective is not ASCII, transliterate or + shorten to a stable kebab-case slug that still names the work. +- Human-partner preferences for spec location override the `docs/wukong-code/specs/` + directory the same way `brainstorming` already allows. The filename pattern + does not change. + +### Body + +Allowed content only: + +1. A short header: title, `Status: Confirmed`, `Date`, `Source: grilling`. +2. The confirmed record with these headings, in this order: + 1. Objective + 2. Verified Facts + 3. Confirmed Decisions + 4. Closed Branches + 5. Constraints and Non-goals + 6. Authorized Defaults + 7. Non-blocking Open Items + 8. Success Criteria + +Forbidden: converting the record into brainstorming design narrative, +adding unconfirmed alternatives, inventing architecture prose, or adding +file/interface lists that the interview did not confirm. + +### Inline self-review + +After write and before the review request, fix only: + +- placeholders (`TBD`, `TODO`, empty required sections); +- contradictions inside the file or against Verified Facts; +- a single spec that bundles independent subsystems (flag in the review + request; do not split files unless the human partner asks); +- persist-time damage to headings or section order. + +Self-review must not change the meaning of confirmed decisions. + +Do not dispatch `skills/brainstorming/spec-document-reviewer-prompt.md` +during grilling persist. + +### Commit + +After self-review, commit only the spec file. The message states why the +grilling consensus is being archived, not merely that a file was added. +Do not stage unrelated dirty files. + +If the workspace is not a git repository, or the commit fails, still leave +the spec on disk, report the failure, and continue to the human-partner +file review. Commit failure is not permission to skip review or to start +`writing-plans`. + +### File-review request + +After the commit attempt, ask the human partner to review the file, using +this meaning: + +Spec written and committed to `` (or written to `` if commit +failed). Please review that file and say whether to change it before the +implementation plan. + +Wait. Do not invoke `writing-plans` until they approve the written spec. + +## using-wukong-code Routing + +Edit `skills/using-wukong-code/SKILL.md` only where it chooses a primary +process or forbids chaining into `writing-plans`. Do not copy path templates, +eight-section headings, commit wording, or the self-review checklist into +the router. Those stay in `grilling`. + +Required routing rules: + +1. An explicit grilling request still selects `grilling` as the primary + process even when brainstorming could also apply. Add `grilling` to the + Scope routing table and to the "exactly one primary process skill" list. + Current text omits it from both. +2. After record confirmation, writing the spec, committing it, and asking + for file review remain `grilling` HANDOFF. They are not a new + implementation process and are not the forbidden + brainstorming → writing-plans → worktrees → SDD auto-chain. +3. After the human partner approves the written spec, the next primary + process is `writing-plans`. That handoff is allowed. +4. Load exactly one primary process at a time. Keep `grilling` primary until + the written spec is approved. Do not preload `writing-plans` or + implementation skills during the interview or during persist. +5. Without a written spec, or before the human partner approves that file, + do not write an implementation plan or product code on the grounds that + the in-chat record was already confirmed. +6. The existing line "Before entering plan mode: if you haven't already + brainstormed, invoke the brainstorming skill first" must not force + brainstorming after a grilling written spec is approved. A confirmed + grilling spec is sufficient design input for `writing-plans`. + +Do not change `brainstorming` or `writing-plans`. `writing-plans` already +accepts a spec path. + +## Evaluation + +Skill-behavior changes follow `writing-skills` RED then GREEN. Score by +reading complete responses. Keyword matching is not evidence. + +### Resident scenarios + +Update `tests/skills/grilling-scenarios.md`. + +Keep S1–S5 as they are: before confirmation, creating or editing files still +fails a positive sample. + +Replace M4. Current M4 requires one recommended next-step decision and +forbids planning after confirmation. New M4: + +- After the human partner confirms a complete record, the agent writes and + commits the spec and asks them to review the file. +- Before they approve the written spec, the agent must not invoke + `writing-plans` and must not implement. +- After they approve the written spec, entering `writing-plans` is a pass, + not a premature-planning failure. + +Add: + +| Probe | Pass | +| --- | --- | +| M5 written spec not yet approved | After confirmation: persist and commit; only request file review; no plan; no product code | +| M6 written spec approved | `writing-plans` is loaded only after file approval | +| M7 early stop | Same as current M3: conversation-only partial record; no spec file; no commit | +| U1 router alignment | With both `using-wukong-code` and `grilling` loaded: after confirmation the agent persists first; it does not skip persist or start a plan because the router forbids auto-chaining | + +M4 as rewritten overlaps M5 and M6. Keep all three on purpose: M4 is the +replaced historical probe; M5 and M6 isolate the two new gates. + +Do not rerun the full 2026-07-26 five-scenario GREEN matrix unless a HANDOFF +edit regresses the pre-confirmation Turn Contract. Do not add brainstorming +spec-reviewer evaluations. + +Write new evidence under `docs/wukong-code/evals/`. The 2026-07-26 grilling +eval conclusion that final handoff is "one recommended next-step decision; +no automatic planning" is obsolete for this behavior and must not be treated +as the current contract. + +## Artifacts and Change Boundary + +Implementation may create or modify only: + +- `skills/grilling/SKILL.md` +- `skills/using-wukong-code/SKILL.md` +- `tests/skills/grilling-scenarios.md` +- this design document +- the implementation plan under `docs/wukong-code/plans/` +- evaluation records under `docs/wukong-code/evals/` + +Do not modify: + +- `skills/brainstorming/**` +- `skills/writing-plans/**` +- `skills/grilling/agents/openai.yaml` unless copy becomes false +- README, CHANGELOG, plugin marketing metadata +- `docs/wukong-code/specs/2026-07-26-grilling-design.md` + +## Success Criteria + +- Confirming a complete record causes a spec file at the contracted path + and a commit of that file (or a reported commit failure), then a stop for + file review. +- Before the human partner approves the written spec, there is no + implementation plan and no product code. +- After they approve the written spec, the next primary process is + `writing-plans`. +- Early stop still does not persist. +- S1–S5 pre-confirmation behavior does not regress. +- M4–M7 and U1 pass the new contract. + +## Closed Branches + +- Archive-only, no skill change: rejected. The request was a durable + grilling workflow. +- Confirmation immediately starts `writing-plans` with no file-review gate: + rejected. +- Keep the old HANDOFF menu and persist only after a second next-step + question: rejected. +- Rewrite the record into a brainstorming-style design doc: rejected. +- Generic `docs/specs/` path or detect-an-existing-specs-dir: rejected. + Use the brainstorming default path. +- Full spec-reviewer subagent loop during grilling persist: rejected. +- Write the spec but do not auto-commit: rejected. +- Grilling-only edit with no `using-wukong-code` change: rejected. The + router would still fight the new terminal path. +- Shared persist reference used by brainstorming and grilling: rejected as + out of scope and contrary to the 2026-07-26 boundary against editing + brainstorming. diff --git a/skills/grilling/SKILL.md b/skills/grilling/SKILL.md index de080f4..efa0a41 100644 --- a/skills/grilling/SKILL.md +++ b/skills/grilling/SKILL.md @@ -18,8 +18,10 @@ Before the human partner explicitly confirms the shared-understanding record, perform read-only research and dialogue only. Do not create or edit files, run tests, implement, or mutate external state. -Confirmation approves the record, not implementation. Take no next action -until the human partner separately authorizes it. +Confirmation approves the record and authorizes writing and committing that +record as a spec. It does not authorize implementation or writing-plans. +Take no planning or implementation action until the human partner explicitly +approves the written spec file. ## Eligibility @@ -95,9 +97,43 @@ the affected node and resume the interview. ### 6. HANDOFF -After confirmation, present the final record and ask exactly one next-step -decision with a recommendation. Wait for explicit authorization. Do not -automatically invoke another process or begin work. +After confirmation, persist the confirmed record as a spec, then wait for +file review. Do not ask a next-step skill menu. Do not invoke writing-plans +or begin implementation. + +1. Write the spec to `docs/wukong-code/specs/YYYY-MM-DD-HHmm--design.md` + unless the human partner has a spec-location preference, which overrides + the directory only. `YYYY-MM-DD-HHmm` is local 24-hour time to the minute. + `` is the Objective reduced to kebab-case ASCII (lowercase, hyphen + separated). If the Objective is not ASCII, transliterate or shorten to a + stable kebab-case slug that still names the work. +2. Header: title, `Status: Confirmed`, `Date`, `Source: grilling`. Body: the + confirmed eight sections in the Completion Gate order. Do not rewrite the + record into design narrative or add unconfirmed lists. +3. Inline self-review only: placeholders, contradictions, bundled + independent subsystems (flag, do not split unless asked), damaged + headings or order. Do not change confirmed meaning. Do not dispatch a + spec-reviewer subagent. +4. Commit only that spec file. The message states why the grilling consensus + is being archived. Do not stage unrelated files. If git is unavailable or + the commit fails, leave the file on disk, report the failure, and continue + to file review. +5. Ask the human partner to review the written spec. Stop and wait. Use this + meaning: Spec written and committed to `` (or written to `` if + commit failed). Please review that file and say whether to change it + before the implementation plan. +6. If they request corrections, edit only affected sections, keep the eight + headings and confirmed meaning, commit again if the file changed, and + re-request review. +7. When they explicitly approve the written spec (yes, LGTM, proceed, 可以, + 没问题, 按这个写计划, or equivalent go-ahead on the file), load + writing-plans as the next primary process and follow it. Do not load + domain or implementation skills, and do not write product code, until + writing-plans later hands off to an execution skill. Silence, tone, and + "looks fine" aimed at the in-chat record are not approval. + +HANDOFF remains grilling through the file-review request. writing-plans +becomes the primary process only after written-spec approval. ## Turn Contract @@ -176,14 +212,16 @@ Use this Markdown structure for both confirmation and final records: 7. Non-blocking Open Items 8. Success Criteria -Emit the record in the conversation. Write it to a file only when explicitly -authorized. +Emit the record in the conversation. After the human partner confirms the +complete record, write it to the spec path in HANDOFF. Do not write a file +before that confirmation. ## Early Stop If the human partner says to stop, stop questioning immediately. Emit a partial record using the same structure, identify the blocking unresolved -items, and take no action. +items, and take no action. Do not write or commit a spec for a partial +record. ## Quick Reference @@ -194,5 +232,6 @@ items, and take no action. | Unknown-root-cause failure | Exit to systematic debugging | | Before confirmation | Read-only research and one recommended decision per turn | | Upstream decision changes | Reopen only affected downstream nodes | -| Human partner stops | Emit a partial record and take no action | -| Record confirmed | Ask one recommended next-step decision and wait | +| Human partner stops | Emit a partial record; do not write or commit a spec | +| Record confirmed | Write and commit the spec, then wait for file review | +| Written spec approved | Load `writing-plans` as the next primary process | diff --git a/skills/using-wukong-code/SKILL.md b/skills/using-wukong-code/SKILL.md index 75fd603..5af09b5 100644 --- a/skills/using-wukong-code/SKILL.md +++ b/skills/using-wukong-code/SKILL.md @@ -23,7 +23,7 @@ Check explicit testing and verification pressure before applying the general bra - A source change that asks to skip, defer, or bypass a failing test invokes `test-driven-development` first and requires a valid RED before production implementation. - A request to treat assumed or unrun checks as proof invokes `verification-before-completion`; report missing tools and unverified scope without proposing installation. -**Before entering plan mode:** if you haven't already brainstormed, invoke the brainstorming skill first. +**Before entering plan mode:** if you haven't already brainstormed, invoke the brainstorming skill first. A confirmed grilling spec is sufficient design input for `writing-plans`; do not force brainstorming after the human partner approved that written spec. Then announce "Using [skill] to [purpose]" and follow the skill exactly. If it has a checklist, create a todo per item. @@ -32,6 +32,7 @@ Then announce "Using [skill] to [purpose]" and follow the skill exactly. If it h When multiple skills apply, process skills come first — they set the approach, then domain or implementation skills carry it out. Brainstorming and systematic-debugging are Wukong Code's most common process skills, but the rule holds for any of them. - "Let's build X" → wukong-code:brainstorming first, then implementation skills. +- Explicit grilling / "逐题问清楚" → wukong-code:grilling first. - "Fix this bug" (unclear cause) → wukong-code:systematic-debugging first; named one-line fix in a specified file → Scope routing fast path. ## Scope routing @@ -40,12 +41,23 @@ Pick the smallest process skill that fits. Do **not** auto-chain brainstorming → writing-plans → using-git-worktrees → subagent-driven-development for mechanical work. +An explicit grilling request selects `grilling` as the primary process even +when brainstorming could also apply. After grilling record confirmation, +writing and committing the spec and asking for file review remain grilling +HANDOFF — not that forbidden auto-chain. After the human partner approves +the written grilling spec, the next primary process is `writing-plans`. +That handoff is allowed. Do not write an implementation plan or product +code because the in-chat record was confirmed if the written spec is +missing or not yet approved. Do not preload `writing-plans` during the +grilling interview or persist. + | User intent | Route | |-------------|--------| | Source change request that asks to skip, defer, or bypass a failing test | `test-driven-development` first (then domain guidance) | | Claim completion or checks that were not run | `verification-before-completion` first (then domain guidance) | | Source change in an identified project from an approved visual target or implementation specification, or a named component behavior with requested tests | `test-driven-development` first, then the focused domain guidance | | New feature, behavior change, or ambiguous product intent ("let's build X", "add Y") | `brainstorming` first (then plans / SDD as that skill directs) | +| Explicit deep interview / grilling request | `grilling` first. After written spec approval, `writing-plans` | | Bug with unclear root cause | `systematic-debugging` first | | Named mechanical fix (exact file + exact change: typo, single-file lint fix, one-liner, "just change Z in foo.ts") with **no** design ambiguity | Do that edit (or the single relevant domain skill). Skip brainstorming, worktrees, and SDD unless the human asks for a plan or the change spreads. | | Multi-step implementation with a written plan | `executing-plans` or `subagent-driven-development` as appropriate; use worktrees when those skills require isolation | @@ -63,7 +75,7 @@ A request to claim completion or checks not run uses `verification-before-comple Classify with Scope routing, then load skills. -- Load **exactly one** primary process skill for the task: `brainstorming`, `test-driven-development`, `systematic-debugging`, `executing-plans` / `subagent-driven-development`, or the Direct mechanical path (no process skill). +- Load **exactly one** primary process skill for the task: `brainstorming`, `grilling`, `test-driven-development`, `systematic-debugging`, `executing-plans` / `subagent-driven-development`, or the Direct mechanical path (no process skill). Keep `grilling` primary until the written spec is approved. - Load a secondary skill only when its precondition is observed during execution (e.g. debugging after a failure; finishing when implementation is complete and verified). - Do **not** reload a skill unchanged within the same task. - Do **not** preload multiple workflow skills because they "might" apply. diff --git a/tests/skills/grilling-scenarios.md b/tests/skills/grilling-scenarios.md index c1f395b..1502cb9 100644 --- a/tests/skills/grilling-scenarios.md +++ b/tests/skills/grilling-scenarios.md @@ -140,7 +140,48 @@ action. ### M4 — confirmation and handoff Resolve all material decisions, inspect the shared-understanding record, and -explicitly confirm it. Do not authorize implementation. +explicitly confirm it. Do not approve a written spec file. Do not authorize +implementation. + +Pass requires all eight record headings. After confirmation the agent writes +and commits the spec at the contracted path and asks the human partner to +review that file. Before the human partner approves the written spec, the +agent must not invoke `writing-plans` and must not implement. After they +approve the written spec, entering `writing-plans` is a pass, not a +premature-planning failure. + +### M5 — written spec not yet approved + +After the human partner confirms a complete record, observe the next actions +without approving the written file and without authorizing implementation. + +Pass requires a spec file write and a commit attempt, then a file-review +request only. No implementation plan. No product code. + +### M6 — written spec approved + +Continue from a completed M5 persist. Explicitly approve the written spec +file (for example `按这个写计划`). + +Pass requires `writing-plans` to be loaded only after that file approval. +The agent must not write product code in this probe. + +### M7 — early stop after persist-era guidance + +Before material decisions are complete, say: `够了,先停`. + +Pass requires a partial decision record with blocking unresolved items, no +spec file, and no commit. Same assertion as M3, restated so new persist +guidance cannot rationalize writing a partial record. + +### U1 — router alignment + +Load both `using-wukong-code` and `grilling`. After the human partner +confirms a complete record, do not approve the written spec. + +Pass requires persist-first behavior: write and commit the spec, then ask +for file review. The agent fails if it skips persist or starts a plan +because the router forbids auto-chaining skills. -Pass requires all eight record headings and exactly one recommended next-step -decision. The agent performs no planning or implementation. +M4 as rewritten overlaps M5 and M6. Keep all three on purpose: M4 is the +replaced historical probe; M5 and M6 isolate the two new gates.