ワンクリックで
new-feature
Scaffold a new domain feature with TDD order (entity -> test -> service -> test -> controller -> test)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Scaffold a new domain feature with TDD order (entity -> test -> service -> test -> controller -> test)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
새 Spring Boot 멀티모듈 프로젝트의 기초 세팅(common shared kernel + Gradle/Docker/CI 골격)을 깔아주는 스킬. 시스템 설계 문서 기반 구현 시작 시 가장 먼저 발동. 핵심 골격만 포함 — `BusinessException`/`ErrorCodeBase`/`ApiResponse`/`GlobalExceptionHandler`/`BaseEntity` + JPA/CORS/OpenAPI configs. Kafka/Outbox/QueryDSL 같은 도메인 특화 패턴은 별도 llm-wiki에서 끌어다 쓴다.
Design partner mode for system design practice. Activated when the user wants to design a new system (chat, notification, news feed, URL shortener, etc.). Sets up topic directory, copies the mock-interview template, loads the matching problem from sysdesign-question-bank, marks the topic as active in .omx/state/, and conducts a back-and-forth Clarifying → High Level → Drill Down conversation, updating <topic>/System-Design-Document/mock-interview.md immediately as each decision lands. Uses Alex Xu Vol.1's canned numbers as the starting point (book-first), user adjusts. NOT an interview — the user drives, this skill is a design collaborator with a calculator (back-of- envelope, latency estimation via auto-injected sysdesign-frameworks) and a reference book (sysdesign-question-bank).
Scaffold a minimum-viable implementation of a designed system. Activated when the user is ready to write code. Reads sdd.md (or falls back to mock-interview.md), determines the smallest component subset that lets the design's NFRs be testable (NOT a full production build — single-region, in-memory or single-container infra, no CDN, no multi-region), asks the user for the language/framework stack (default Spring Boot + PostgreSQL + Kafka per project's existing skill set), then scaffolds <topic>/source/ with per-service directories, a docker-compose.yml that brings everything up locally, and test-results/ scaffolding for functional / load / failure tests. The point is verification of design assumptions, not production.
Promote a filled mock-interview.md into a formal Software Design Document (sdd.md) following the IEEE 1016 / Atlassian / Google design-doc style. Activated when the user says they are ready to write the SDD. Reads the topic's mock-interview.md AND the topic's conversation log files (which capture the back-and-forth detail not preserved in the structured mock-interview), then asks the user the SDD-specific questions that mock-interview doesn't cover (Constraints, ADRs, Risk Register, Rollout, Testing strategy). Writes sdd.md incrementally as decisions land.
TDD workflow, per-layer test types, naming conventions, and test fixture patterns for Spring Boot. Use when writing or reviewing tests.
Applies Eric Evans' Domain-Driven Design patterns to design and review domain model classes. Covers tactical patterns (Entity, Value Object, Aggregate, Service, Repository, Factory, Domain Event) and strategic patterns (Bounded Context, Context Map, Anti-Corruption Layer, Core Domain, Distillation). Use when designing JPA entities, defining aggregate boundaries, identifying value objects, mapping bounded contexts, creating domain events, or reviewing domain model code. Also use when asked about ubiquitous language, context maps, or anti-corruption layers.
| name | new-feature |
| description | Scaffold a new domain feature with TDD order (entity -> test -> service -> test -> controller -> test) |
| argument-hint | <feature description> |
| disable-model-invocation | true |
| allowed-tools | Read, Glob, Grep, Edit, Write, Bash |
You are implementing a new domain feature for the E-Commerce Order Platform following TDD + DDD + Layered Architecture conventions.
Feature to implement: $ARGUMENTS
Before generating any code, identify:
| Question | Answer (fill in) |
|---|---|
| Domain context | Which bounded context owns this feature? (Order / Payment / Product / Search) |
| Aggregate root | Which entity is the aggregate root? |
| Value objects | What value objects are needed? |
| Domain events | What events does this feature publish? |
| Service package | com.ecommerce.{service} |
Implement in this exact sequence. Complete each item before starting the next.
| Step | Artifact | Package | File Naming |
|---|---|---|---|
| 1 | Domain entity (aggregate root) | domain/model/ | {Entity}.java |
| 2 | Value objects | domain/model/ | {ValueObject}.java (use @Embeddable record or class) |
| 3 | Domain event records | domain/event/ | {Entity}{Action}Event.java |
| 4 | Entity unit tests (RED -> GREEN) | test/.../domain/model/ | {Entity}Test.java |
| 5 | Repository interface | domain/repository/ | {Entity}Repository.java |
| 6 | Repository slice tests | test/.../infra/persistence/ | {Entity}RepositoryTest.java using @DataJpaTest + Testcontainers |
| 7 | Application service | application/service/ | {Feature}Service.java |
| 8 | Service unit tests (RED -> GREEN) | test/.../application/service/ | {Feature}ServiceTest.java |
| 9 | Service integration tests | test/.../application/service/ | {Feature}ServiceIntegrationTest.java using @SpringBootTest + Testcontainers |
| 10 | Request DTOs | api/dto/request/ | Create{Entity}Request.java, Update{Entity}Request.java |
| 11 | Response DTOs | api/dto/response/ | {Entity}Response.java, {Entity}Summary.java |
| 12 | Controller | api/controller/ | {Entity}Controller.java |
| 13 | Controller slice tests (RED -> GREEN) | test/.../api/controller/ | {Entity}ControllerTest.java using @WebMvcTest |
All code must follow this package layout (from AGENTS.md):
com.ecommerce.{service}/
├── api/
│ ├── controller/
│ └── dto/
│ ├── request/ (CreateXxxRequest, UpdateXxxRequest — API contract only)
│ └── response/ (XxxResponse, XxxSummary, PageResponse<T> — API contract only)
├── application/
│ ├── service/
│ └── dto/ (XxxCommand, XxxResult — internal between layers only)
├── domain/
│ ├── model/ (entities, value objects)
│ ├── event/ (domain event records)
│ ├── repository/ (interfaces only — NO implementations)
│ └── service/ (domain services — cross-aggregate logic only)
└── infra/
├── persistence/ (JPA repository implementations)
├── kafka/ (producer/consumer)
└── config/ (Spring configuration)
DTO Location Rule: Request/Response DTOs (API contract) go in api/dto/. Internal DTOs passed between application and domain layers go in application/dto/. Never mix locations.
| Artifact | Naming Rule | Example |
|---|---|---|
| Entity | Singular PascalCase | Order, Product, Payment |
| Value Object | Noun PascalCase | Money, OrderStatus, StockQuantity |
| Domain Event | {Entity}{PastTenseVerb}Event | OrderCreatedEvent, StockReservedEvent |
| Repository | {Entity}Repository | OrderRepository |
| Application Service | {Feature}Service | OrderService, PaymentProcessingService |
| Create Request DTO | Create{Entity}Request | CreateOrderRequest |
| Update Request DTO | Update{Entity}Request | UpdateOrderRequest |
| Response DTO | {Entity}Response | OrderResponse |
| Summary DTO (list) | {Entity}Summary | OrderSummary |
| Test class | {Subject}Test | OrderServiceTest |
.codex/skills/domain-modeling.md)Apply these rules to every entity:
| Rule | Requirement |
|---|---|
| Identity | Long id with @GeneratedValue(strategy = GenerationType.IDENTITY) |
| Constructor | Protected no-arg constructor + static factory method or builder |
| Field access | @Access(AccessType.FIELD) |
| Collections | Expose unmodifiable view; mutate via domain methods |
| Enums | @Enumerated(EnumType.STRING) always |
| Lazy loading | @ManyToOne(fetch = FetchType.LAZY) always |
| Timestamps | @CreatedDate, @LastModifiedDate via @EntityListeners(AuditingEntityListener.class) |
| Cascade | CascadeType.ALL + orphanRemoval = true on aggregate root -> owned children only |
| Cross-aggregate | Reference by ID only (Long field), never object reference |
| Table naming | Singular snake_case: order_item, not OrderItems |
.codex/skills/tdd-patterns.md)For each test file:
should_{expected_behavior}_when_{condition}
Examples:
should_create_order_when_valid_requestshould_throw_exception_when_insufficient_stockshould_return_empty_when_product_not_foundshould_publish_event_when_order_placed| Layer | Annotation | Mock Strategy |
|---|---|---|
| Entity unit test | @ExtendWith(MockitoExtension.class) | Nothing — pure Java |
| Repository slice | @DataJpaTest + @AutoConfigureTestDatabase(replace = NONE) + Testcontainers PostgreSQL | Nothing |
| Service unit test | @ExtendWith(MockitoExtension.class) | Mock repositories, domain services |
| Service integration | @SpringBootTest + Testcontainers PostgreSQL | External APIs only |
| Controller slice | @WebMvcTest({Entity}Controller.class) | @MockBean application service |
.codex/skills/layer-architecture.md)@RestController + @RequestMapping("/api/v1/{resource}")@Valid on all @RequestBody parametersResponseEntity<T> with correct HTTP status codes| Operation | Method | URI | Response Status |
|---|---|---|---|
| Create | POST | /api/v1/{resource} | 201 Created |
| Get one | GET | /api/v1/{resource}/{id} | 200 OK |
| List | GET | /api/v1/{resource}?page=&size=&sort= | 200 OK |
| Update | PUT | /api/v1/{resource}/{id} | 200 OK |
| Delete | DELETE | /api/v1/{resource}/{id} | 204 No Content |
@Transactional on application service public methods only@Transactional(readOnly = true)@TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)After completing all 13 steps, print this summary table:
| Step | File Path | Status |
|---|---|---|
| 1 | src/main/java/com/ecommerce/{service}/domain/model/{Entity}.java | Created |
| 2 | src/main/java/com/ecommerce/{service}/domain/model/{ValueObject}.java | Created |
| 3 | src/main/java/com/ecommerce/{service}/domain/event/{Entity}{Action}Event.java | Created |
| 4 | src/test/java/com/ecommerce/{service}/domain/model/{Entity}Test.java | Created |
| 5 | src/main/java/com/ecommerce/{service}/domain/repository/{Entity}Repository.java | Created |
| 6 | src/test/java/com/ecommerce/{service}/infra/persistence/{Entity}RepositoryTest.java | Created |
| 7 | src/main/java/com/ecommerce/{service}/application/service/{Feature}Service.java | Created |
| 8 | src/test/java/com/ecommerce/{service}/application/service/{Feature}ServiceTest.java | Created |
| 9 | src/test/java/com/ecommerce/{service}/application/service/{Feature}ServiceIntegrationTest.java | Created |
| 10 | src/main/java/com/ecommerce/{service}/api/dto/request/Create{Entity}Request.java | Created |
| 11 | src/main/java/com/ecommerce/{service}/api/dto/response/{Entity}Response.java | Created |
| 12 | src/main/java/com/ecommerce/{service}/api/controller/{Entity}Controller.java | Created |
| 13 | src/test/java/com/ecommerce/{service}/api/controller/{Entity}ControllerTest.java | Created |
Then run ./gradlew test and report the result. If any tests fail, fix them before declaring completion.