/dev-standards:dev-standards-grill-taskfrom dev-standards
Interrogate any new task before it is persisted — extract intent, flow, domain terms, design patterns, scope, and verification with tier-gated depth. 任務創建時審問之,層層深掘以求精確。 Use when: plugin creates task, schedule work, grill request, interrogate task before planning, task intake, dartai task creation
Ships in dev-standards. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
任務創建時運行。量料兩度,執行一刀。
Called by:
dartai: /dartai:task, skills/simple-planning, skills/adversarial-planning-loop
workflow: /workflow:add-task
Delegates to:
risk-pipeline:classify (optional; Step 5 — skipped if plugin absent or disabled)
Returns:
task_spec (required) — includes task_spec.risk from risk-pipeline:classify
or {enabled: false} when pipeline disabled/missing
backflow_writes (list of {skill, path, changes}; may be empty)
詢問前先讀。上下文愈豐,問題愈少。
Prefer LCI (
lci:searchfor symbols/terms,lci:explorefor module maps) over Grep when exploring; fall back to Grep/Read if the lci plugin is unavailable. If a question can be answered by exploring the codebase, explore instead of asking.
.claude/rules/* — project posture (security, testing, TDD level, architecture style)CLAUDE.md or .claude/CLAUDE.md — project identitydocs/DOMAIN.md or docs/domain/*.md — canonical domain termsdocs/user-stories/ — existing storiesdocs/user-flows/ — existing flowsdocs/design-guidelines.md and any component library READMEs detected.workflow/loop-state.json.tasks[])判斷此請求屬何級:
| Tier | Indicators | Action |
|---|---|---|
| Minimal | 1 file, trivial, unambiguous (typo, text, one-line fix) | Skip grill entirely, return one-line spec, done |
| Standard | 2-5 files, single feature/fix, minor clarification needed | Run full layered interrogation |
| Comprehensive | 5+ files, multiple criteria, significant discussion | Run full layered interrogation, all layers |
| Architectural | cross-cutting, multiple subsystems, new patterns | Run full layered interrogation, plus escalation if too large |
File counts above are rough indicators of interrogation depth, not gates — judge by context cost (file size + diff), not raw count.
Minimal 級立即返回:
task_spec:
requested: "<user's exact words>"
tier: minimal
scope:
files_to_modify: [<single file>]
acceptance: [<one-line criterion>]
backflow_writes: []
先讀後問,事實自查、決策方問。 凡探碼可答之事實(現有詞、模式、調用者),自查勿問;唯決策屬用戶——呈之待答。若「讀自」已答,摘要已知,問「此仍確乎?」勿重頭。
批量前置提問,勿逐一原子問。 提問前,先列各層之待問清單,將連動或同 sub-domain 之問題束為一組,一次呈多問(AskUserQuestion 每次至多 4 問;同輪跨層併問無妨)。此遵 [[ideation]] 之 strategy-bundle 慣例與項目 batch/front-load 偏好——串行單問耗 wall-clock。僅當一問之答會重構其餘諸問時,方單獨先問該問。
docs/user-stories/write-user-story (if present)docs/user-flows/define-user-flow (if present)docs/DOMAIN.mddomain-update (if present), or domain-init if no DOMAIN.md exists yetdocs/design-guidelines.md, component library README, existing patterns via LCIInvoke the
Skilltool withskill: dev-standards:update-rules— 將設計規範寫入項目規則。
.claude/rules/testing.md, .claude/rules/tdd.md審問之際,同步維護 .claude/rules/glossary.md:
lci:search <term> —— 代碼若與用戶所言相悖,浮之。skills/glossary/CONTEXT-FORMAT.md。docs/adr/ 提升)。調用任何項目本地寫手技能前,先探其是否存在:
test -f .claude/skills/<skill-name>/SKILL.md
若無,不中止。在任務規格中記 TODO:
notes:
- "TODO: install .claude/skills/write-user-story to persist Intent layer gap"
下次 grill-task 若項目已安裝(藉
Invoke the
Skilltool withskill: dev-standards:add-skill— 為項目添加缺失的寫手技能。
或後續 setup-project 運行),自動銜接。
插件本地寫手(decide、update-rules、update-project、add-skill)常備,無需探測。
task_spec.verdict = "TOO_LARGE_TO_GRILL",建議拆分任務risk.vector.scalar > 25(顯超 architectural 預算),亦觸 TOO_LARGE_TO_GRILL,附 reason: risk_budget_exceeded;若 risk.verdict == split_required,將 risk.split_proposal 併入回報供呼叫方直接建片,併附 recommended_action: "Split per proposal then re-run grill"風險分級若插件在。啟用時風險裁決為權威——驅 TOO_LARGE_TO_GRILL 觸發(risk.vector.scalar > 25 或 verdict == split_required)及下游 pipeline_tier 路由。不在或 enabled: false 則舊流繼,task_spec.risk = {enabled: false} 顯記之,層級邏輯回退驅動管道(legacy fallback path)。
先探二事:
plugins/risk-pipeline/skills/risk-classify.md 可達.claude/rules/risk.md frontmatter risk_pipeline.enabled == true二者缺一 → 跳此步,task_spec.risk = {enabled: false},續舊流。無錯,禁用為合法態。
Invoke the
Skilltool withskill: risk-pipeline:classify— 任務級風險分級,出向量、裁決、管道層。
入參:
task_id — dartai 上下文或合成識別符task_spec — 當前已審之規格主體touched_files — 自 Step 1 層級偵測導出出二態之一:
{enabled: false} → 插件或配置禁用,記「risk-pipeline disabled」,task_spec.risk = {enabled: false},跳合併task_spec.risk規格附:
task_spec:
# ... 原欄不動 ...
risk:
enabled: true
vector: {b, d, s, r, u, scalar, crit_axes}
verdict: ok | split_required | refactor_first_required | escalate
pipeline_tier: smoke | light | dim_matched | architectural
required_reviewers: [...]
model: haiku-4.5 | sonnet-4.6 | opus-4.7
tdd_required: <bool>
split_proposal: [...] # 僅 verdict == split_required 時出
findability_notes: "..." # 切片決策或 findability 檢查述
task_spec.risk = {enabled: false} 顯記,非略 —— 呼叫方可查而無需揣task_spec 欄一如既往,risk 純加性呈確認屏前,單輪自審 task_spec。不派對抗代理。
planning_quality_review:
directness:
check: "Does the spec attack the problem directly, or does it wander through indirection?"
pass_if:
- "The smallest change that delivers the request is identified"
- "No preparatory 'setup' steps that don't directly advance the goal"
- "Solution path is a straight line from problem to deliverable"
fail_if:
- "Introduces intermediary abstractions not required by the problem"
- "Adds configuration or indirection without multiple immediate consumers"
problem_solution_fit:
check: "Is the proposed solution appropriate for this specific codebase?"
pass_if:
- "Uses patterns and libraries already present in the codebase"
- "Leverages existing utilities rather than introducing new ones"
- "Fits naturally into the existing architecture"
fail_if:
- "Imports a new pattern when an established one suffices"
- "Creates a new subsystem for a localized change"
- "Ignores existing conventions (error handling, logging, testing style)"
testability:
check: "Is every acceptance criterion extremely testable?"
pass_if:
- "Each criterion can be verified by a single RED→GREEN test cycle"
- "Criteria are observable (output, behavior, state), not subjective"
- "Edge cases are enumerated as separate criteria"
- "Test approach matches the project's existing test runner and patterns"
fail_if:
- "Criteria use words like 'better', 'improved', 'user-friendly'"
- "No clear pass/fail condition for a criterion"
- "Testing would require manual verification or external coordination"
overengineering_guard:
check: "Is there any overengineering in the planned solution?"
pass_if:
- "No abstractions with only one consumer"
- "No generic interfaces for a single implementation"
- "No 'extensible' or 'configurable' additions not driven by current needs"
- "No horizontal-layer planning; only vertical slices"
fail_if:
- "Plans to build frameworks instead of solutions"
- "Adds parameterization for hypothetical future cases"
- "Introduces classes/modules that don't simplify the immediate change"
solution_depth:
check: "Has the solution been thoroughly explored without overcomplicating?"
pass_if:
- "Trade-offs between at least two reasonable approaches were considered"
- "The chosen approach is documented with a one-sentence rationale"
- "Known edge cases and error paths are addressed in the plan"
- "Integration points with existing code are identified"
fail_if:
- "Only one approach was considered"
- "No mention of how errors or edge cases are handled"
- "Integration points are vague or missing"
五項皆通方呈確認屏;不通則調整規格,重審。
寫入任何通道前,呈任務規格與所有待回流寫入,合為一屏:
Grilled Task Spec
=================
<task spec YAML>
Pending backflow writes
=======================
- write-user-story: docs/user-stories/US-43.md (new, 42 lines)
- domain-update: docs/DOMAIN.md (append LineItem definition)
Approve [y] / Edit field [e] / Another round [r] / Abort [x] ?
y:原子性執行所有回流寫入(暫存後一次提交),返回任務規格給調用者。
e:詢問修改哪個字段。
r:回 Step 2,追加問題(仍受上限約束)。
x:不寫任何內容,返回 task_spec.verdict = "ABORTED"。
task_spec:
requested: "<user's exact words>"
tier: standard | comprehensive | architectural
refs:
user_story: docs/user-stories/US-42.md # or null
flow: docs/user-flows/checkout.md # or null
domain: [Order, LineItem]
design: rules/design-guidelines.md#buttons
scope:
files_to_modify: [<paths, max 5>]
not_included: [<explicit exclusions>]
acceptance:
- <RED→GREEN criterion 1>
- <RED→GREEN criterion 2>
verification:
runner: vitest # or pytest, go test, etc.
manual: <optional manual check>
risk: # from risk-pipeline:classify (Step 5)
enabled: true | false # false when pipeline missing/disabled — all other risk.* fields absent
# when enabled: vector, verdict, pipeline_tier, required_reviewers, model, tdd_required, split_proposal?, findability_notes
notes: [] # populated on graceful degradation
verdict: OK | TOO_LARGE_TO_GRILL | ABORTED
# TOO_LARGE_TO_GRILL may carry reason: risk_budget_exceeded + recommended_action + risk.split_proposal
backflow_writes:
- skill: <skill-name>
location: plugin-local | project-local
path: <file path written>
summary: <one line>
AskUserQuestion 至多 4);勿逐一原子串問。唯「答之會重構其餘」之樞紐問方單先問。.claude/rules/karpathy-principles.md:不確定時反推,呈現取捨,不「假設跑」。grilling discipline(confirmation gate + facts-vs-decisions)adapted from mattpocock/skills v1.1 (MIT),
skills/productivity/grilling. Upstream's "one question at a time" rule is intentionally not carried — this repo front-loads and batches decisions instead.
Invoke the
Skilltool withskill: dev-standards:refactor-first-assessment— 規劃技能在 grill-task 後調用,決定是否需預備重構步驟。
Invoke the
Skilltool withskill: dev-standards:decide— 未決架構問題之回流寫手。
Invoke the
Skilltool withskill: dev-standards:update-rules— 新項目規則之回流寫手。
Invoke the
Skilltool withskill: dev-standards:add-skill— 新項目專屬技能之回流寫手。
Invoke the
Skilltool withskill: dev-standards:update-project— 項目描述變更之回流寫手。
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub standardbeagle/standardbeagle-tools --plugin dev-standards25 skills in this plugin
/dev-standards-add-skillCreate new project-specific skill in `.claude/skills/` to codify recurring pattern. 在項目中新建可複用技能。 Use when: add skill, create skill, new skill, codify pattern, make reusable workflow/dev-standards-ce-compound記錄已解決問題以複利機構知識。Document solved problems in docs/solutions/ with structured YAML frontmatter. Use when: non-trivial problem solved + verified, prevent re-discovery, capture institutional learning before context fades, document best practice or workflow pattern. Skip: trivial (typo), solution unverified, problem in progress, project lacks docs/solutions/ convention./dev-standards-ce-setupDiagnose + configure compound-engineering env — CLI deps, plugin version, repo-local config. Guided install for missing tools, gitignore + config bootstrap. Use when: troubleshoot missing tools, verify CE setup, onboard repo, refresh config template, /ce-setup re-check. Skip: unrelated to compound-engineering tooling.