Files
ax_hub_mcp_tool/docs/superpowers/plans/2026-08-13-dap-was-sys-executable-mock-tools.md
jade 58960af817
All checks were successful
Deploy to OCIWP / deploy (push) Successful in 6m30s
feat: add iam and pct mock tools
2026-08-13 23:47:05 +09:00

59 lines
3.6 KiB
Markdown

# dap-was-sys Executable Mock Tools Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** Expose the two existing system mock definitions as executable MCP tools and REST endpoints.
**Architecture:** Request DTOs enter `@McpTool` UseCase interfaces and REST controller methods. Spring services return deterministic response DTOs, with no external dependencies. The controller delegates to the UseCases so both interfaces share behavior.
**Tech Stack:** Spring Boot, Spring AI Community MCP annotations, Lombok, JUnit 5, MockMvc.
## Global Constraints
- Tools are read-only, non-destructive, idempotent, and synthetic-only.
- Endpoints are `GET /api/sys/status` and `GET /api/sys/notices`.
- Keep existing YAML and JSON mock resources aligned with response DTO fields.
---
### Task 1: Executable system-status tool
**Files:**
- Create: `dap-was-sys/src/main/java/io/shinhanlife/dap/mcc/sys/status/dto/SystemStatusRequest.java`
- Create: `dap-was-sys/src/main/java/io/shinhanlife/dap/mcc/sys/status/dto/SystemStatusResponse.java`
- Create: `dap-was-sys/src/main/java/io/shinhanlife/dap/mcc/sys/status/usecase/SystemStatusUseCase.java`
- Create: `dap-was-sys/src/main/java/io/shinhanlife/dap/mcc/sys/status/usecase/impl/SystemStatusUseCaseImpl.java`
- Test: `dap-was-sys/src/test/java/io/shinhanlife/dap/mcc/sys/status/usecase/impl/SystemStatusUseCaseImplTest.java`
- [ ] Write a test expecting default `development`, `AX Hub System`, `HEALTHY`, and a nonblank ISO timestamp; run it and observe compilation failure because the types do not exist.
- [ ] Implement request/response DTOs, MCP-annotated `getSystemStatus(SystemStatusRequest)`, and the service returning those literal mock values; rerun the focused test and expect pass.
### Task 2: Executable notice-list tool
**Files:**
- Create: `dap-was-sys/src/main/java/io/shinhanlife/dap/mcc/sys/notice/dto/SystemNoticeRequest.java`
- Create: `dap-was-sys/src/main/java/io/shinhanlife/dap/mcc/sys/notice/dto/SystemNoticeResponse.java`
- Create: `dap-was-sys/src/main/java/io/shinhanlife/dap/mcc/sys/notice/usecase/SystemNoticeUseCase.java`
- Create: `dap-was-sys/src/main/java/io/shinhanlife/dap/mcc/sys/notice/usecase/impl/SystemNoticeUseCaseImpl.java`
- Test: `dap-was-sys/src/test/java/io/shinhanlife/dap/mcc/sys/notice/usecase/impl/SystemNoticeUseCaseImplTest.java`
- [ ] Write a test expecting at least two notices with title, priority, and published date; run it and observe compilation failure because the types do not exist.
- [ ] Implement the DTOs, MCP-annotated `getSystemNotices(SystemNoticeRequest)`, and service returning deterministic notices; rerun the focused test and expect pass.
### Task 3: REST adapter
**Files:**
- Create: `dap-was-sys/src/main/java/io/shinhanlife/dap/mcc/sys/presentation/SystemMockToolController.java`
- Test: `dap-was-sys/src/test/java/io/shinhanlife/dap/mcc/sys/presentation/SystemMockToolControllerTest.java`
- [ ] Write MockMvc tests for both GET endpoints using optional query parameters and asserting response fields; run and observe compilation failure because the controller does not exist.
- [ ] Implement a controller that constructs request DTOs, delegates to the UseCases, and returns response DTOs; run `./gradlew.bat :dap-was-sys:test` and expect pass.
## Plan Self-Review
- The plan covers executable MCP registration, response DTOs, REST access, and tests for both tool contracts.
- Each runtime response remains synthetic and read-only.