decompose

decompose is a command for Claude Code from alisunstar/OpenSunstar. It costs 0 tokens per session (300 once invoked), scanned A, original, Apache-2.0.

A requirements-planning command that breaks one change into separate application-level development contracts. It records dependencies, ordering, risks, and conditions before waiting for human approval.

In plain words
What is it for?
Use it after analysis to identify affected applications and create a requirement document for each one.
Why use it?
It prevents a broad request from being implemented without clear ownership between applications.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Good fit Use it after analysis to identify affected applications and create a requirement document for each one.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/alisunstar/opensunstar/decompose
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.

Clone the repo
git clone --depth 1 https://github.com/alisunstar/OpenSunstar

Made for: Claude Code.

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/alisunstar/opensunstar/decompose/github.svg)](https://agentmods.dev/commands/alisunstar/opensunstar/decompose)
Your own site
<a href="https://agentmods.dev/commands/alisunstar/opensunstar/decompose"><img src="https://agentmods.dev/badge/commands/alisunstar/opensunstar/decompose/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for decompose

Your own site · 80×15
<a href="https://agentmods.dev/commands/alisunstar/opensunstar/decompose"><img src="https://agentmods.dev/badge/commands/alisunstar/opensunstar/decompose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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 300 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00000 $0.00300
Opus 5.5 $0.00000 $0.00120
Sonnet 5.5 $0.00000 $0.00060
Haiku 4.5 $0.00000 $0.00030

Measured 1mo ago against content hash 6c695a10a741, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

rd-protocol/commands/decompose.md · 35 lines

What it actually says

/rd:decompose — 按应用拆解

阶段 2:把需求按应用拆解,每个应用产独立开发契约。

先读规则

  1. 读 .specs/<change-id>/ANALYSIS.md(分析结果)
  2. 读 knowledge/applications/ 现有应用清单
  3. 读 knowledge/ROUTING.md 确认应用归属

执行

  • 识别需求涉及的应用清单
  • 每个应用拆出独立 requirement(开发契约)
  • 标注跨应用依赖与顺序约束
  • 识别风险与前置条件

何时澄清

  • 应用归属不清 → 暂停
  • 跨应用职责边界冲突 → 暂停

何时停止

  • 无法明确应用清单 → 停止,回 analyze 补充

产物

  • .specs/<change-id>/DECOMPOSITION.md(应用清单 + 依赖 + 风险)
  • .specs/<change-id>/applications/{app}/requirement.md(每应用开发契约,最核心产物)

人工确认

是 — 产出 DECOMPOSITION + 应用级 requirement 后暂停,等人工确认拆解合理后继续。

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. 1mo ago First seen · 35 lines · 0 tokens per session scan A 6c695a10a741

Subscribe to this mod's changes

decompose is a command published in the GitHub repository alisunstar/OpenSunstar (31 stars, last pushed 14d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 300 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-30.