---
name: kd-spec
description: Kingdee Harness Engineering specification phase for acceptance criteria, lifecycle hooks, data objects, constraints, and risks.
---

# Kingdee Spec Phase

Use this skill after `CONTEXT.md` exists.

Goal:

- Produce or update `.pi/kd/runs/<run-id>/SPEC.md`.
- Define acceptance criteria.
- Define target lifecycle event or extension point.
- List data objects, fields, table assumptions, and SDK assumptions.
- Capture exception behavior, performance constraints, and risk level.

Rules:

- Separate confirmed facts from assumptions.
- Write only verifiable facts into the specification; unresolved business identifiers must become a single blocking question.
- Mark every API/table assumption as requiring lookup with local metadata, SDK signature, build output, or product evidence. Bundled knowledge alone is only a clue.
- Do not edit product code in this phase.
- If acceptance criteria are vague, ask targeted questions through `kd_ask_user`. Use `questions[]` only for independent questions in the same current fact group; do not submit a free-text checklist.
- User answers must be recorded with `kd_answer_user action=answer` before continuing. Fact corrections must use `kd_answer_user action=revise`.
- If any open blocking question already exists, stop and record the answer before continuing.
- Do not generate implementation templates, sample code, or pseudo-code in `SPEC.md`.
