70 lines
2.2 KiB
Markdown
70 lines
2.2 KiB
Markdown
---
|
|
name: finalize-code-design
|
|
description: "Final sanity check and handoff preparation for the code design document. Ensures structural completeness, format validation, and strict adherence to the single-file output rule."
|
|
---
|
|
|
|
This skill performs the final verification of the code design document before it is handed off to the Planner and QA agents.
|
|
|
|
**Announce at start:** "I'm using the finalize-code-design skill to perform the final check on the code design document."
|
|
|
|
## Primary Input
|
|
|
|
- `docs/code-design/{feature}.md`
|
|
|
|
## Primary Output (STRICT PATH)
|
|
|
|
- Final `docs/code-design/{feature}.md`
|
|
|
|
## Process
|
|
|
|
You MUST complete these steps in order:
|
|
|
|
1. ** Structural Completeness Check**
|
|
Verify that all 14 required sections are present in the document:
|
|
- Overview
|
|
- Project Structure
|
|
- Layer Architecture
|
|
- Interface Definitions
|
|
- Domain Models
|
|
- Database Implementation Design
|
|
- Error Design
|
|
- Dependency Injection
|
|
- Configuration
|
|
- Testing Architecture
|
|
- Build & Deployment
|
|
- Architecture Traceability
|
|
- Code Design Review
|
|
- Open Questions
|
|
|
|
2. **Format & Idiom Validation**
|
|
- Check that all Go code blocks use correct syntax and idiomatic naming.
|
|
- Verify that all interface methods include `context.Context` and `error`.
|
|
- Verify that all structs have appropriate tags.
|
|
- Check for and remove any remaining placeholder text or example components.
|
|
|
|
3. **Single-File Enforcement**
|
|
- Ensure NO separate files (e.g., `interfaces.go`, `models.go`) were created.
|
|
- If any external files were created, delete them and move their content into the main document.
|
|
|
|
4. **Traceability Final Audit**
|
|
- Spot-check the Traceability Matrix to ensure every critical architecture component is linked to a code design element.
|
|
|
|
5. **Final Polish**
|
|
- Fix any typos, formatting issues, or inconsistent naming.
|
|
|
|
## Guardrails
|
|
|
|
Do:
|
|
- Be extremely pedantic about the 14 required sections
|
|
- Ensure the document is a "single source of truth"
|
|
- Remove all "TBD" or "Example" placeholders
|
|
|
|
Do not:
|
|
- Add new design decisions at this stage
|
|
- Change the core architecture
|
|
- Create new files
|
|
|
|
## Transition
|
|
|
|
After finalization, the Code Design Agent's work is complete. The handoff is now ready for the Planner Agent.
|