Simplify without changing behavior
Read execution, collaboration, memory, artifacts, and safety.
MODE: ANALYZE
- Resolve an explicit diff or current phase execution scope.
- Read quality criteria, prohibitions, repository conventions, relevant memories, tests, and the full diff.
- Do not edit code in ANALYZE mode.
- Propose only changes with at least 80% confidence that preserve observable behavior:
- reuse an existing abstraction;
- remove proven dead or duplicate code;
- flatten needless control flow or indirection;
- remove avoidable work with equivalent semantics.
- Exclude bug fixes, behavior changes, speculative abstractions, broad rewrites, and style-only churn.
- Write
simplify-proposals.md with ID, confidence, kind, files, before/after sketch, evidence, risk, and verification command.
- Present proposals by ID and stop. MODE: APPLY requires explicit approval; never analyze and apply in one uninterrupted step.
MODE: APPLY
- Require explicit approval listing proposal IDs. Ignore unapproved proposals.
- Re-read the current diff and stop if proposal assumptions are stale.
- Apply one approved proposal at a time within its declared files.
- Run its focused verification immediately. On failure, restore only that proposal's edits when they can be isolated safely; otherwise stop and request direction.
- Run the broader affected suite after all successful proposals.
- Append applied, skipped, and evidence results to
simplify-proposals.md.
- Mark prior review evidence stale and set
REVIEW_REQUIRED.
Work inline by default. Use a worker only when the user explicitly requests delegation, and keep ANALYZE and APPLY as separate approval-gated actions.
Do not commit or change unrelated files. Return mode, proposal or application counts, report path, verification evidence, and next action.
1---2name: flow-simplify3description: Analyzes a completed phase diff for high-confidence behavior-preserving simplifications and applies only explicitly approved proposals, reducing duplication, dead code, needless complexity, or avoidable inefficiency.4---56# Simplify without changing behavior78Read [execution](../../references/execution.md), [collaboration](../../references/collaboration.md), [memory](../../references/memory.md), [artifacts](../../references/artifacts.md), and [safety](../../references/safety.md).910## MODE: ANALYZE11121. Resolve an explicit diff or current phase execution scope.132. Read quality criteria, prohibitions, repository conventions, relevant memories, tests, and the full diff.143. Do not edit code in ANALYZE mode.154. Propose only changes with at least 80% confidence that preserve observable behavior:16 - reuse an existing abstraction;17 - remove proven dead or duplicate code;18 - flatten needless control flow or indirection;19 - remove avoidable work with equivalent semantics.205. Exclude bug fixes, behavior changes, speculative abstractions, broad rewrites, and style-only churn.216. Write `simplify-proposals.md` with ID, confidence, kind, files, before/after sketch, evidence, risk, and verification command.227. Present proposals by ID and stop. MODE: APPLY requires explicit approval; never analyze and apply in one uninterrupted step.2324## MODE: APPLY25261. Require explicit approval listing proposal IDs. Ignore unapproved proposals.272. Re-read the current diff and stop if proposal assumptions are stale.283. Apply one approved proposal at a time within its declared files.294. Run its focused verification immediately. On failure, restore only that proposal's edits when they can be isolated safely; otherwise stop and request direction.305. Run the broader affected suite after all successful proposals.316. Append applied, skipped, and evidence results to `simplify-proposals.md`.327. Mark prior review evidence stale and set `REVIEW_REQUIRED`.3334Work inline by default. Use a worker only when the user explicitly requests delegation, and keep ANALYZE and APPLY as separate approval-gated actions.3536Do not commit or change unrelated files. Return mode, proposal or application counts, report path, verification evidence, and next action.