/pwdev-code:simplify [files | --diff HEAD~N] (default: diff of the current phase's execution commits)from PWDEV Code — Spec-Driven Development
Analyze the phase diff and apply human-approved high-confidence simplifications via the simplifier subagent
Ships in PWDEV Code — Spec-Driven Development. Installing the plugin adds it to Claude Code.
Optional quality step between EXECUTE and REVIEW: reuse, dead-code removal, complexity reduction, efficiency. It is NOT a bug hunt (that is /review's job) and it never changes behavior. Two passes: ANALYZE (propose) → human approves by ID → APPLY (implement + refactor commit).
ls .planning/phases/*/execution/*-summary.md >/dev/null 2>&1 || [ -n "$ARGUMENTS" ] || { echo "❌ No execution summaries and no explicit scope. Run /pwdev-code:execute first or pass files/--diff."; exit 1; }
Follow ${CLAUDE_PLUGIN_ROOT}/references/language.md (resolve lang from
.planning/config.json; ask only if unset).
$ARGUMENTS given → use it (file list or --diff HEAD~N).state.md for the active
phase, resolve the commit range since the phase's first execute commit
(git log --oneline + summaries' commit hashes).For the prompts only (do not analyze yourself): spec.md §5 (Quality) and §7
(Prohibitions) of the active phase; RELEVANT MEMORY block per
${CLAUDE_PLUGIN_ROOT}/references/memory.md (conventions first);
project verification commands (CLAUDE.md §12/§14).
Via the Task tool:
subagent_type: pwdev-code:simplifiermodel: resolve per ${CLAUDE_PLUGIN_ROOT}/references/model-profiles.md${CLAUDE_PLUGIN_ROOT}/references/spawn-contracts.md."${CLAUDE_PLUGIN_ROOT}/scripts/audit-log.sh" spawn simplify SIMPLIFY pwdev-code:simplifier <model>Log: "${CLAUDE_PLUGIN_ROOT}/scripts/audit-log.sh" event simplify SIMPLIFY simplify_proposed simplify-proposals.md '{"count":N}'
Present the proposals table from the status reply + report path. Ask: approve all / none / list of IDs (e.g. "S1, S3").
STATUS: NOTHING_TO_PROPOSE or 0 approved → end cleanly:
✨ Nothing to simplify (or nothing approved). Code stays as is.
👉 Next: /pwdev-code:review
Only with >=1 approved ID. Same subagent, APPLY template with the full text of the approved proposals + verification commands.
"${CLAUDE_PLUGIN_ROOT}/scripts/audit-log.sh" event simplify SIMPLIFY simplify_applied simplify-proposals.md '{"applied":N,"skipped":M}'.planning/state.md:
## Last Simplify
- Date: [timestamp]
- Applied: [N] | Skipped: [M]
- Commit: [hash]
- review_gate: STALE # only if N > 0 — review must re-run on the refactor diff
✅ Simplify: {N} applied, {M} skipped — commit {hash}.
⚠️ Changes applied → review must re-run on the refactor diff.
👉 Next: /pwdev-code:review --diff {refactor-range}
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub pwdev-solucoes/pwdev-claude-marketplace --plugin pwdev-code23 commands in this plugin
/audit/pwdev-code:audit — Audit Trail QueryQuery the audit trail database for events, decisions, artifacts, and statistics. Export full PDF report./codex/pwdev-code:codex — Delegate to Codex CLIDelegate an implementation task to the Codex CLI, then critically review the resulting diff/delegate/pwdev-code:delegate — Smart External DelegationPick the best external coding CLI for the task (codex, opencode, kimi, gemini, or kiro) and delegate with the standard safety protocol/design/pwdev-code:design — Design PhaseRun the design phase to produce spec.md with architecture decisions/discover/pwdev-code:discover — Discovery PhaseRun the discovery phase to gather requirements through interviews and research/execute/pwdev-code:execute — Execute PhaseExecute planned tasks by delegating to the executor subagentOther plugins' commands for the same job