一键导入
deep-spec
Author the executable spec contract for deep-work research sessions. Invoked through /deep-spec, $deep-work:deep-spec, or orchestrator dispatch.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Author the executable spec contract for deep-work research sessions. Invoked through /deep-spec, $deep-work:deep-spec, or orchestrator dispatch.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
This skill should be used at Phase 3 of deep-work to execute slice-based TDD (RED → GREEN → REFACTOR) for each approved plan slice. Dispatches in solo (inline) or team (implement-slice-worker subagent delegation by cluster_id) mode, runs computational sensors (lint/typecheck/coverage), performs 2-stage slice review (delegate reviewer + evaluator_model), and emits M3-envelope-wrapped receipts/SLICE-*.json via hooks/scripts/wrap-receipt-envelope.js. Triggered by 'implement phase', '구현 시작', '/deep-work continue', /deep-implement slash, cross-platform Skill({ skill: "deep-work:deep-implement", args: "..." }), or orchestrator dispatch after plan approval.
This skill should be used at Phase 2 of deep-work, after research.md approval, to design a detailed implementation plan with TDD slices. Decomposes work into SLICE-NNN units with `depends_on` DAG, acceptance contracts (`failing_test`, `acceptance_threshold`), and optional `cluster_id` hint for parallel-safe grouping. Emits plan.md with the inline slice DAG (Implement Phase's deep-implement skill parses it for worker fan-out — no external slices.md/slice-graph.json is emitted). Triggered by 'create implementation plan', '계획 수립', /deep-plan slash, cross-platform Skill({ skill: "deep-work:deep-plan", args: "..." }), or orchestrator dispatch after research approval.
This skill should be used when the user invokes /deep-work "task", uses cross-platform Skill({ skill: "deep-work:deep-work-orchestrator", args: "task" }), asks to start a new deep-work session, or requests evidence-driven workflow auto-flow across Brainstorm → Research → Plan → Implement → Test phases. Handles session initialization (profile v3 load, capability detection, session-recommender sub-agent, AskUserQuestion 4-key ask, flag parsing) and dispatches the 5-phase pipeline with Exit Gates between each phase.
Use when the user finishes a deep-work session — merging, opening a PR, keeping the branch as-is, or discarding. Triggers on `/deep-finish`, "finish session", "wrap up session", "세션 마무리", "세션 종료", "PR 만들어줘", or orchestrator auto-call after Phase 5 (Integrate) completes. Emits an M3-envelope-wrapped `session-receipt.json` (and optionally a cross-plugin `handoff.json`). Supports `--skip-integrate` (Phase 5 bypass), `--handoff-to=<plugin>` / `--no-handoff` (post-finish handoff control).
Use when the user manually requests a deep-work phase document review. Parses --phase, --structural, and --adversarial compatibility arguments, then enters the canonical adaptive review protocol.
Use when the user wants to generate or view the comprehensive deep-work session report — session lifecycle, slice summary, evidence trail, TDD compliance, sensor pass-rate, model usage, evaluation outcomes. Triggers on `/deep-report`, `/deep-status --report`, "session report", "deep-work report", "세션 리포트", "세션 보고서", "리포트 생성". Writes to `$WORK_DIR/report.md` and prints inline summary. Sub-page of the deep-status hub.
| name | deep-spec |
| description | Author the executable spec contract for deep-work research sessions. Invoked through /deep-spec, $deep-work:deep-spec, or orchestrator dispatch. |
| user-invocable | true |
The medium|high|critical risk classes make this workflow mandatory. Low risk
may opt in.
[!IMPORTANT] Do not echo this skill body or its template. Perform the workflow and report only the gate result, artifact path, and actionable blockers.
--session=ID, otherwise from the active entry in
.claude/deep-work-sessions.json..claude/deep-work.{SESSION_ID}.md and resolve $WORK_DIR from its
work_dir field (default deep-work). Read $WORK_DIR/research.md.current_phase: research. The runtime records subphase: spec;
spec is not a new phase in the phase graph.risk_profile_json and
methodology_policy_json. medium|high|critical is mandatory and any
missing/corrupt admission input fails closed. A low session may opt out.$WORK_DIR/spec.md and the state fields
spec_approved_hash, spec_contract_json, and spec_gate_result_json.
Never trust those summaries until they match the current spec.md bytes.Do not implement source code and do not create requirements.json,
failure-matrix.json, or any other spec output.
Announce: "Spec 단계를 시작합니다. research.md를 실행 가능한 계약으로 고정합니다."
Read ../shared/templates/spec-template.md and write exactly one
$WORK_DIR/spec.md. Preserve the required heading order and exactly one
fenced json spec-contract block.
Replace every template marker. An unresolved marker (PENDING, TBD,
TODO, FIXME, PLACEHOLDER, bracket placeholder) or an unresolved
blocking Open Question is a gate failure.
Derive requirements, invariants, failure modes, negative tests, evidence gates, compatibility, and non-goals from the approved research and explicit user constraints. The JSON contract is normative; prose must not contradict it.
Run:
node scripts/validate-spec-contract.js --spec "$WORK_DIR/spec.md" --risk-class "$RISK_CLASS"
Require exit 0 and one stdout JSON object with pass:true. Medium+ requires
contract requirement coverage 1; High/Critical additionally requires a
non-empty failure matrix with coverage 1.
Submit spec.md through the existing document review workflow. Resolve all
blocking findings, rerun the validator after every edit, and obtain final
document approval for the exact current bytes.
After validator PASS and document review approval:
spec_approved_hash; it is distinct from the canonical contract
spec_sha256 returned by the validator.phase spec approve route with the current artifact
capability, spec_approved_hash, validated contract, and Spec Gate result.
The skill does not directly mutate state.current_phase: research and subphase: spec, then repeat
validation and document review. Fail closed for Medium+.spec_completed_at, spec_approved_hash, spec_contract_json, and
spec_gate_result_json. The Research Exit Gate clears subphase when it
advances to plan.On resume, a byte-identical approved artifact may re-display the gate result. Any edit invalidates approval. Plan-bound validation later rechecks the same whole-file freshness together with contract, risk, and plan binding digests.