一键导入
tdk-implement
Primary implementation skill. Execute phases from plan.md ## Phases table. Read plan.md as source of truth for status + dependency graph.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Primary implementation skill. Execute phases from plan.md ## Phases table. Read plan.md as source of truth for status + dependency graph.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
Execute the implementation planning workflow using the plan template to generate design artifacts.
Create spec.md from a feature or child-slice description, or replay --interview against existing spec.md. Supports --fast, memory, and an embedded quality gate.
Project-level architecture recommendation and brownfield recovery advisor. Writes architecture reports only; does not mutate layout or config.
Deprecated compatibility route for /tdk-workspace-layout-propose.
Observe-first onboarding for existing repositories. Summarizes repo shape, current TDK config state, and safe next-step recommendations without product discovery or source-tree changes.
| name | tdk-implement |
| description | Primary implementation skill. Execute phases from plan.md ## Phases table. Read plan.md as source of truth for status + dependency graph. |
| metadata | {"version":"11.0.0"} |
If ANY script returns an error, you MUST:
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
This skill reads plan.md and executes phases using the ## Phases table as the single source of truth (SoT).
## Phases table--phase NN / --phase=NN executes one numeric phase onlyupdatePhaseStatus - no HTML comment markersin_progress rows at startup and requires explicit recovery choice before any status mutationLoad: references/project-and-phase-contract.md
Use this reference for argument parsing, portable script invocation, status preflight, phase-table parsing, F3 recovery, target resolution, and confirmation.
Load: references/routing-preflight.md
Use this reference for plan-skill-routing.md loading and delegate drift handling before status mutation.
Load: references/phase-execution.md
Use this reference for row-order execution, delegate skill parsing/running, generic implementation, and completion reporting.
Parse user input before project context loading or status mutation. Follow references/project-and-phase-contract.md.
Invoke tdk-validate-task-id with cleaned TASK_ID and host skill name /tdk-implement.
If STOP -> halt execution. Store: TASK_ID, TASK_ID_SOURCE.
Invoke tdk-load-project-context with validated TASK_ID.
Store: PROJECT_CONTEXT, FEATURE_DIR.
Load routing after project context and before any phase status mutation. Follow references/routing-preflight.md.
Before any direct TDK TypeScript script call, resolve the project root at the agent layer using the active coding harness/session context. Ask the user for the project root if you cannot identify it confidently before running the command. Replace <agent-resolved-project-root> with the actual absolute project root; do not pass the placeholder literally.
bash -lc '
PROJECT_DIR="$1"
if [ -z "$PROJECT_DIR" ] || [ ! -d "$PROJECT_DIR/.specify/scripts/ts" ]; then
echo "Invalid project root: $PROJECT_DIR" >&2
exit 1
fi
(cd "$PROJECT_DIR/.specify/scripts/ts" && bun src/commands/...)
' -- "<agent-resolved-project-root>"
Do not run TDK scripts by changing into the scripts directory with a relative path.
Run prerequisite check per references/project-and-phase-contract.md. plan.md is required; if missing, STOP and tell the user to run /tdk-plan {task_id} first.
Run the read-only status collector before reading phase files or mutating statuses. Use structured fields only; do NOT invoke /tdk-status. See references/project-and-phase-contract.md.
Parse ## Phases with parse-phases-table.ts "{FEATURE_DIR}/plan.md" --json. This parser remains the execution source of truth before writes.
Before resolving targets, scan all rows for stale in_progress status and use AskUserQuestion recovery. Any recovery write must update phase frontmatter first, then plan.md, then reparse.
Build phaseByNumber and TARGET_ROWS after global F3 recovery. Selected mode never auto-runs dependencies.
Display compact status + phase list from parsed rows. Do not read phase files before this confirmation.
Run phases in ascending row order. Before each todo phase status transition:
Load routing expectations from references/routing-preflight.md. This is read-only before the first in_progress status transition; cancel stops without status mutation. Actual status writes still keep phase frontmatter first, then plan.md.
Before routing preflight, run validate-phase-file.ts for the current phase as
defined in references/phase-execution.md. Validation failure stops before
status mutation.
If the phase contains usable ## Delegate Skills, run listed delegates in order. Delegate failures leave the phase in_progress and emit the F3 recovery reminder.
If no delegate section applies, execute the phase as generic implementation. You MUST actually implement the code, not just read and summarize the plan.
For every normal phase, validate success criteria when present, mark done with
phase frontmatter first and plan.md second, then log completion. For a spike,
write ## Spike Result, run its decision gate, and keep dependents blocked
until approval or a replan updates the graph.
After all phases, report executed/skipped counts and suggest /tdk-status {task_id}.
For every internal Load: references/X.md directive, resolve the target from SKILL_BASE_DIR, the directory containing this SKILL.md, to the expected absolute path SKILL_BASE_DIR/references/X.md. Before proceeding with the current step:
<!-- DO NOT LOAD.On missing, unreadable, or stubbed internal references, STOP and report the expected absolute path and current step. Do not try alternate paths, fallback layouts, or partial reconstruction from memory.
This contract applies only to internal references/*.md loads. Project-specific files governed by references/routing-preflight.md keep their documented exact-path missing-file behavior.