一键导入
aidlc-code-generation
Use when a defined unit or feature needs code implementation with TDD, or when "코드 생성", "구현해줘", "code generation" is requested.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when a defined unit or feature needs code implementation with TDD, or when "코드 생성", "구현해줘", "code generation" is requested.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
아이디어를 설계로 전환하거나, 새로운 기능을 만들거나, 구현 전 구조화된 설계가 필요한 창의적/탐색적 작업에 사용. Use when turning an idea into a design, creating a new feature, or when any creative/exploratory work needs structured design before implementation.
태스크나 unit 구현이 완료되어 머지 전 코드 리뷰가 필요할 때, 또는 사용자가 명시적으로 코드 리뷰를 요청할 때 사용. Use when a task or unit implementation is complete and needs code review before merging, or when the user explicitly requests a code review on their changes.
설계 문서를 상세 구현 계획으로 변환하거나, "구현 계획 작성", "plan 만들어줘" 요청 시 사용. INCEPTION 워크플로우 계획은 aidlc-workflow-planning 사용. Use when a design document needs to be converted into a detailed implementation plan with task breakdown, or when "구현 계획 작성", "plan 만들어줘" is requested. Not for INCEPTION workflow planning — use aidlc-workflow-planning instead.
Use when user explicitly requests "auto 모드", "자동 모드", "auto mode", or "알아서 만들어줘". 초보자를 위한 완전 자동 devflow. greenfield 전용. 요구사항 입력 → inception → construction → build-test를 자동 진행하며 각 flow 종료 시 멀티에이전트 리뷰 필수.
현재 세션에서 구현 계획을 실행할 때 사용. 독립 태스크별 신규 서브에이전트 컨텍스트 활용. Use when executing an implementation plan in the current session with independent tasks that benefit from fresh subagent context per task.
프로덕션 코드 작성, 버그 수정, 리팩토링 시 사용 — 예외 없이 RED-GREEN-REFACTOR 사이클을 강제. Use when writing any production code, fixing bugs, or refactoring — enforces RED-GREEN-REFACTOR cycle with no exceptions.
| name | aidlc-code-generation |
| description | Use when a defined unit or feature needs code implementation with TDD, or when "코드 생성", "구현해줘", "code generation" is requested. |
| metadata | {"version":"0.5.0","author":"Jay","category":"ai-dlc-workflow","invoke_mode":"orchestrator-only","return_behavior":"stop-no-gate","output_path":"devflow-docs/construction/{unit}/code-plan.md","skill_nature":"hybrid","lifecycle":"active","model_dependency":"모델이 TDD 순서 없이 구현하고 합리화함","amplification_notes":"2단계 plan+generate 구조로 설계-구현 경계 유지"} |
Generate a code plan and, after orchestrator approval, execute the plan.
Create a code generation plan with checkboxes:
# Code Generation Plan: [unit-name]
> **For agentic workers:** REQUIRED: Use `aidlc:aidlc-code-generation` with the
> "GENERATE" signal to execute this plan. Do NOT implement ad-hoc.
> `"code-generation: GENERATE — proceed with the approved plan for [unit-name]"`
## Files to Create
- [ ] `path/to/file.py` — [purpose]
- [ ] `tests/path/to/test_file.py` — [what it tests]
## Files to Modify
- [ ] `path/to/existing.py` — [what changes]
## Implementation Steps
- [ ] Step 1: [기능명]
- [ ] RED: [테스트명] 작성
- [ ] Verify RED: 실패 확인
- [ ] GREEN: [구현 내용]
- [ ] Verify GREEN: 통과 확인 + 전체 회귀
- [ ] REFACTOR: [정리 대상이 있으면 명시, 없으면 생략]
- [ ] Step 2: [기능명]
- [ ] RED: [테스트명] 작성
...
## Test Strategy
- [ ] [test name]: [what it verifies]
> 각 테스트는 Implementation Steps의 RED 단계에서 작성된다. 별도 테스트 단계가 아님.
## Verification Contract
### 완료 조건
- [ ] [구체적 기능 요건 1]
- [ ] [구체적 기능 요건 2]
### 검증 명령
- `[test command]` — [what it verifies]
- `[lint command]` — [what it checks]
### 리스크 태그
- [ ] auth/security — [해당 시 표시]
- [ ] DB schema change — [해당 시 표시]
After writing the plan, display it and STOP:
[code-generation Plan 준비]
- 생성할 파일: [count]개
- 수정할 파일: [count]개
- 구현 단계: [count]개
The orchestrator will present the approval gate. Do NOT write any code yet.
session-summary 중간 기록: Plan 작성 완료 후 session-summary.md의 ## Completed Work에 [~] code-generation — Plan 작성 완료, 승인 대기 업데이트.
When invoked with explicit generation instruction such as:
"code-generation: GENERATE — proceed with the approved plan for [unit-name]"
Or when invoked with auto-fix error context:
"code-generation: GENERATE — auto-fix for [unit-name]: [failed test], [error summary]"
When error context is present, fix only the failing part instead of re-executing the full plan. Use the error message and failed test name to identify the affected Implementation Step.
Or when the conversation context clearly contains an approved plan and the orchestrator has signaled to proceed with generation.
_shared/tdd-protocol.md 읽기[~] code-generation — Step [N]/[M] 완료 업데이트_shared/tdd-protocol.md 참조)devflow-docs/construction/[unit-name]/code-plan.mdOrchestrator calls: "code-generation — plan for unit: notification-service"
Output:
# Code Generation Plan: notification-service
## Files to Create
- [ ] `notifications/service.py` — 알림 생성/조회/삭제 비즈니스 로직
- [ ] `tests/test_notification_service.py` — 서비스 단위 테스트
## Implementation Steps
- [ ] Step 1: NotificationService 클래스 스켈레톤 작성
- [ ] Step 2: create_notification() 테스트 작성 (RED)
- [ ] Step 3: create_notification() 구현 (GREEN)
- [ ] Step 4: list_notifications() 테스트 및 구현
- [ ] Step 5: delete_notification() 테스트 및 구현
## Test Strategy
- [ ] test_create_notification_success: 정상 생성 확인
- [ ] test_create_notification_invalid_user: 잘못된 사용자 처리
- [ ] test_list_notifications_empty: 빈 목록 반환
Orchestrator calls: "code-generation: GENERATE — proceed with the approved plan for notification-service"
Actions: _shared/tdd-protocol.md 읽기 → 각 Step에 대해 RED→GREEN→REFACTOR 사이클 → Self-Review → code-plan.md 저장
conventions Review Workflow 적용.
conventions 표준 형식. 반환 필드:
PART 1: 생성할 파일 [count]개 / 수정할 파일 [count]개 / 구현 단계 [count]개 / 리뷰
PART 2: 생성된 파일 [count]개 / 테스트 [count]개 통과 / TDD 사이클 [count]회 / Self-Review / 산출물 / 리뷰