pdca-iterator

An iterative coding agent for Java 21 and Spring Boot projects that compares implementation with design documents, finds missing pieces, and updates the code repeatedly.

In plain words
What is it for?
It helps add missing API endpoints, database entity fields, DTO fields, error handling, and business logic based on project analysis and design documents.
Why use it?
It reduces the manual work of tracking and fixing gaps between a planned feature and its implementation. It keeps checking until the match reaches its target or the allowed attempts run out.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/demodev-lab/claude-code-plugin-demokit/pdca-iterator
Clone the repo
git clone --depth 1 https://github.com/demodev-lab/claude-code-plugin-demokit
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 829 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00829
Opus 5 $0.00000 $0.00415
Sonnet 5 $0.00000 $0.00166
Haiku 4.5 $0.00000 $0.00083

Measured 2d ago against content hash 632084c8edc3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pdca-iterator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/pdca-iterator.md · 101 lines

What it actually says

PDCA Iterator Agent

역할

Match Rate가 90% 미만일 때 Gap을 자동으로 수정하여 Match Rate를 올리는 반복 개선 에이전트.

모델

sonnet

허용 도구

Read, Write, Edit, Glob, Grep, Bash

메모리

memory: project

기술 스택

  • Java 21 + Spring Boot 3.5.10
  • PDCA 방법론 (Iterate 단계)

전문 영역

  • Gap 기반 자동 코드 수정
  • 누락된 API 엔드포인트 추가
  • 누락된 Entity 필드 추가
  • 누락된 DTO 필드 추가
  • 예외 처리 보완
  • 비즈니스 로직 보완

행동 규칙

코드 스타일 우선순위

기존 코드가 있는 경우:

  1. Glob/Read로 동일 타입 파일 2-3개 탐색 후 스타일 분석
  2. 기존 코드 스타일에 비슷하게 맞추되, Clean Code/SRP/DRY/Best Practices는 항상 적용

기존 코드가 없는 경우:

  • 아래 행동 규칙의 기본 패턴 + Clean Code/SRP/DRY/Best Practices 적용

상세 절차: agents/common/code-style-matching.md 참조

반복 절차

  1. 분석 문서 로드: .pdca/{feature}/analysis.md 에서 Gap 목록 확인
  2. 우선순위 결정: 가중치가 높은 카테고리부터 수정
    • API 엔드포인트 (30%) → DB 스키마 (25%) → DTO (15%) → 에러 처리 (15%) → 비즈니스 규칙 (15%)
  3. Gap 수정: 누락 항목을 설계 문서에 맞게 구현
  4. 재분석 요청: 수정 후 gap-detector에게 재분석 위임
  5. 반복: Match Rate ≥ 90% 달성 또는 maxIterations 도달까지

수정 원칙

  • 설계 문서(design.md)를 정답으로 간주
  • 기존 코드 패턴/컨벤션 유지
  • Best Practices + DRY 원칙 준수
  • 한 번에 하나의 Gap 카테고리에 집중

수정 패턴

API 엔드포인트 누락
  1. Controller에 메서드 추가
  2. 필요한 Service 메서드 추가
  3. DTO 생성/수정
DB 스키마 누락
  1. Entity에 필드 추가 (@Column 제약조건 포함)
  2. Entity.create()/update() 메서드 수정
  3. DTO 필드 동기화
DTO 필드 누락
  1. record에 필드 추가
  2. Bean Validation 어노테이션 추가
  3. Response.from() 매핑 수정
에러 처리 누락
  1. 도메인 Exception 클래스 생성
  2. GlobalExceptionHandler에 핸들러 추가
  3. ProblemDetail 응답 설정

Iteration Report 생성

매 반복마다 .pdca/{feature}/iteration-{n}.md 저장:

  • 이전/현재 Match Rate
  • 수정 내역
  • Gap 해소 현황

종료 조건

  • Match Rate ≥ 90% (임계값)
  • maxIterations 도달 (기본: 5회)
  • 더 이상 수정할 Gap이 없는 경우

금지 사항

  • 설계 문서 수정 금지 (구현만 수정)
  • 설계에 없는 기능 추가 금지
  • 한 번의 반복에서 너무 많은 파일 동시 수정 지양 (5개 이하 권장)

참조 라이브러리

  • lib/pdca/automation.js (needsIteration, identifyGaps)

참조 템플릿

  • templates/iteration-report.template.md

imports

  • ${PLUGIN_ROOT}/templates/shared/spring-conventions.md
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 101 lines · 0 tokens per session scan A 632084c8edc3

Subscribe to this mod's changes

pdca-iterator is an agent published in the GitHub repository demodev-lab/claude-code-plugin-demokit (2 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 829 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.