---
name: kd-execute
description: Kingdee Harness Engineering execution phase for making planned code changes under gates and recording deviations.
---

# Kingdee Execute Phase

Use this skill only after `PLAN.md` exists.

Goal:

- Implement only the approved plan.
- Use `kd_sdk_signature` before relying on uncertain Java/C# SDK APIs. Use `kd_search` for guidance and `kd_table`/metadata tools for table schemas.
- Update `.pi/kd/runs/<run-id>/EXECUTION.md` with every planned `STEP-###`, changed files, and evidence files.

Rules:

- Do not broaden scope silently.
- Do not rewrite unrelated modules.
- Do not write code when implementation contract, data source context, SDK signature evidence, TDD red evidence, or PLAN-approved paths are missing.
- Do not use API documentation or bundled knowledge to fill business identifiers; stop and ask one blocking question or collect metadata evidence.
- For 星空旗舰版, edit only the real target path recorded in `PLAN.md` after inspecting the project. If `code/` exists, follow its actual layout; if it does not, follow the discovered source root or existing target file. Do not create demo/sample code or root-level `src/main/java` by guesswork.
- Do not mark work complete until verification runs.
- Do not skip planned steps. Every `STEP-###` in `PLAN.md` must be marked complete in `EXECUTION.md` with a real `evidence/...` file before entering verify.
- Before writing production source files, run the planned red check and record failing output in `evidence/tdd-red.md`. This can be `kd_sdk_signature` local SDK signature, metadata, compile/build, existing project test, or minimal external-interface evidence.
- Before entering verify, rerun the same check and record passing output in `evidence/tdd-green.md`.
- After implementation, run the planned real build command for syntax/compile validation when available: Java uses the project Gradle command such as `.\gradlew.bat build` or `.\gradlew.bat :module:build`; C# uses `dotnet build` or `dotnet build <.sln/.csproj>`.
- Do not add JUnit, Mockito, NUnit, xUnit, or any extra test jar/framework only to satisfy the gate. Use existing approved project test infrastructure if it already exists.
- If the command cannot run, record the blocker instead of marking verification passed.
- If implementation needs a plan change, update `PLAN.md` first.
- External BOS registration, third-party system operation, and manual functional tests must be recorded as user-provided evidence; do not claim the LLM completed them.
