decompose

decompose is a command for coding agents from studioKjm/ai-harness-template. It costs 38 tokens per session (1,118 once invoked), scanned A, original, MIT.

A command that breaks a large software change into small, independent tasks before implementation begins.

In plain words
What is it for?
Use it to plan multi-file work, separate data, logic, and presentation tasks, and order tasks by their dependencies.
Why use it?
It helps prevent one oversized request from touching too many files or layers at once. Each task is intended to be testable and have a clear completion condition.

Command

Part of the harness plugin — 44 commands, 11 agents shipped together

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 commands/studiokjm/ai-harness-template/decompose
Clone the repo
git clone --depth 1 https://github.com/studioKjm/ai-harness-template

Or install harness, the plugin that ships this one along with the rest of its 44 commands, 11 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for decompose

README.md
[![agentmods](https://agentmods.dev/badge/commands/studiokjm/ai-harness-template/decompose.svg)](https://agentmods.dev/commands/studiokjm/ai-harness-template/decompose)
Your own site
<a href="https://agentmods.dev/commands/studiokjm/ai-harness-template/decompose"><img src="https://agentmods.dev/badge/commands/studiokjm/ai-harness-template/decompose.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,118 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.1 $0.00038 $0.01118
Opus 5 $0.00019 $0.00559
Sonnet 5 $0.00008 $0.00224
Haiku 4.5 $0.00004 $0.00112

Measured 5d ago against content hash 3ce30ce114fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

decompose 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 5d 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.

commands/decompose.md · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/decompose — Atomic Task Decomposition

/run 전에 태스크를 원자적 단위로 분해하고 검증합니다. 메가 프롬프트를 방지하고, 각 단위가 독립적으로 구현/테스트 가능하도록 합니다.

Instructions

You are the Task Decomposer. Your job is to break down seed spec acceptance criteria into atomic, implementable units.

Why Decompose?

  • AI 에이전트는 큰 태스크보다 작은 태스크에서 정확도가 높다
  • 원자적 태스크는 독립적으로 테스트 가능하다
  • 실패 시 롤백 범위가 작다
  • 진행률 추적이 명확하다

Decomposition Rules

1. Atomic Unit Criteria

각 태스크는 다음 조건을 모두 만족해야 합니다:

  • 단일 레이어 — 한 태스크가 하나의 레이어(P/L/D)만 터치
  • 단일 AC — 한 태스크가 하나의 Acceptance Criteria에 기여
  • 독립 테스트 가능 — 다른 태스크 완료 없이도 테스트 가능
  • 30분 이내 구현 — 너무 크면 더 분해
  • 명확한 완료 기준 — "~가 되면 완료"

2. Decomposition Process

시드 스펙의 각 AC를 분해합니다:

AC-001: "사용자가 검색어를 입력하면 관련 매물을 보여준다"
    ↓
Task 1 [Data]:    검색 쿼리 레포지토리 메서드 구현 + 테스트
Task 2 [Logic]:   검색 필터링 서비스 (거리 2km, 미판매) + 테스트
Task 3 [Logic]:   검색 결과 정렬/페이지네이션 서비스 + 테스트
Task 4 [Present]: 검색 API 엔드포인트 + 테스트
Task 5 [Present]: 검색 UI 컴포넌트 + 테스트

3. Dependency Ordering

태스크 간 의존성을 명시하고 실행 순서를 결정합니다:

Task 1 (Data)
    ↓
Task 2 (Logic) ← depends on Task 1
Task 3 (Logic) ← depends on Task 1
    ↓
Task 4 (Present) ← depends on Task 2, 3
Task 5 (Present) ← depends on Task 4

Validation Checklist

분해 완료 후 검증:

═══ Decomposition Validation ══════════════════════
  Total tasks:     {N}
  By layer:        Data: {n} | Logic: {n} | Present: {n}
  Dependencies:    {dependency graph valid? YES/NO}
  All testable:    {YES/NO}
  All < 30min:     {YES/NO}
  AC coverage:     {all ACs covered? YES/NO}
  ─────────────────────────────
  Result:          VALID | NEEDS_REFINE

Anti-patterns to Detect

Anti-pattern 증상 해결
Mega Task 하나의 태스크가 여러 레이어를 터치 레이어별로 분할
Orphan Task 어떤 AC에도 기여하지 않는 태스크 제거 또는 AC에 연결
Circular Dep 태스크 A→B→A 순환 의존 공통 부분을 별도 태스크로 추출
Missing Test 테스트 작성이 계획에 없음 각 태스크에 테스트 포함
Too Small 한 줄짜리 태스크 관련 태스크와 병합

Output Format

decomposition:
  seed_ref: "seed-v1.yaml"
  total_tasks: N
  tasks:
    - id: "T-001"
      ac_ref: "AC-001"
      layer: "data"
      description: "검색 쿼리 레포지토리 메서드 구현"
      test: "검색 조건별 쿼리 결과 검증"
      depends_on: []
      estimated_minutes: 20
    - id: "T-002"
      ac_ref: "AC-001"
      layer: "logic"
      description: "검색 필터링 서비스 구현"
      test: "거리/판매상태 필터 로직 단위 테스트"
      depends_on: ["T-001"]
      estimated_minutes: 25
  execution_order:
    - phase: 1
      tasks: ["T-001"]
    - phase: 2
      tasks: ["T-002", "T-003"]
    - phase: 3
      tasks: ["T-004", "T-005"]

Read the full file on GitHub · 123 lines

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. 5d ago First seen · 123 lines · 38 tokens per session scan A 3ce30ce114fb

Subscribe to this mod's changes

decompose is a command published in the GitHub repository studioKjm/ai-harness-template (43 stars, last pushed 3mo ago), licensed MIT. It adds 38 tokens to every session and 1,118 once invoked, about $0.0002 per session on Opus 5. 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-30.