---
name: kd-plan
description: Kingdee Harness Engineering planning phase for file inspection, implementation steps, SDK lookup, validation commands, and rollback notes.
---

# Kingdee Plan Phase

Use this skill after `SPEC.md` exists.

Goal:

- Produce or update `.pi/kd/runs/<run-id>/PLAN.md`.
- List files to inspect before editing.
- List the inspected project layout and the exact target source root or file path before editing.
- List expected files to modify.
- State whether the plan involves product implementation, build, metadata, or SDK verification, with a brief basis for the decision.
- List required `kd_sdk_signature`, `kd_search`, `kd_table`, metadata, and build/compile checks.
- For Cangqiong/Xinghan/Flagship Java projects, plan a Gradle build check for syntax/compile validation, using the current project command such as `.\gradlew.bat build`, `./gradlew build`, or `.\gradlew.bat :module:build`.
- For C#/Enterprise projects, plan `dotnet build` or `dotnet build <.sln/.csproj>` for syntax/compile validation.
- List `## Execution Steps` using `- [ ] STEP-001: ...` style IDs.
- List `## TDD / Red-Green Checks` with red evidence, green evidence, and the command/tool or product-specific check.
- Do not plan to add third-party test jars or frameworks only for red/green checks. For Kingdee plugin work, prefer `kd_sdk_signature` against current project jars/dlls, metadata checks, compile/build checks, existing project tests, or minimal external-interface tests.
- Define validation commands and expected evidence.
- Add rollback or containment notes for medium/high risk work.
- For enterprise Python plugins, do not invent a local build step; require BOS registration and user-provided functional test evidence in `VERIFY.md`.

Gate:

- Execution must not start without `PLAN.md`.
- A plan for 星空旗舰版 is incomplete unless it records the existing project layout and exact target path to edit. If `code/` exists, follow its actual structure; if it does not, record the discovered source root or existing target file.
- A plan without validation commands is incomplete.
- A Java/C# plan without a concrete Gradle or dotnet validation command is incomplete.
- A plan without structured `STEP-001` execution steps is incomplete.
- A plan without TDD red/green checks is incomplete.
- A plan that relies on unverified Kingdee API names is incomplete; bundled knowledge alone is not enough when local SDK jars/dlls or compile evidence are available.
- A plan that lacks implementation contract, data source context, integration context, or acceptance data must stop at one blocking question; do not create a broad question list.
- A plan that writes demo/sample/scaffold or placeholder paths is invalid.
