This skill is not about reviewing an already-adopted solution or adding features. It enumerates the implicit preconditions behind a solution, removes them one by one, and looks for an alternative that requires less implementation and explanation. Do not drift toward extending the current approach; think in terms of subtracting elements.
Rather than creating a proposal from scratch, make an existing implementation, policy, or design decision the subject of reconsideration.
Step 1: Identify the subject of analysis
Identify the "solution to reconsider now (the first proposal)."
- If there is an argument: Target the specified file, module, or feature
- If there is conversation context: Target the policy, design decision, or implementation approach reached immediately before. This is the primary identification method
- In the case of a cold start: When conversation context is thin and there are no arguments, automatically detect the most recent change and target it, and state in one phrase what you inferred as the target
Once the target is identified, check the code implementing that solution in the following order:
- If a target file or module is specified by an argument, read it directly first
- Check uncommitted changes with
git diffとgit diff --stagedcheck with - If there are no uncommitted changes, check the diff against the base branch or recent commits. Determine the base branch with
git symbolic-ref refs/remotes/origin/HEADetc., and for example take the diff asgit diff origin/main...HEAD. If it cannot be determined, look atgit log -p -3view
Step 2: Enumerate preconditions
Enumerate the preconditions that the adopted solution implicitly assumes, from the code and conversation context. Handle only preconditions grounded in the code and conversation context, and do not introduce imaginary requirements.
Examples:
- This API, data structure, or state must be maintained
- This processing must be provided at this timing, UI, or location
- The problem must be solved at this layer
Include not only the implementation itself but also the preconditions about the problem framing. Go back as far as "what kind of user or situation is this in the first place?" and "shouldn't it be addressed at an earlier stage?" If you do not remove these, you will just return to reviewing implementation differences.
Step 3: Remove the preconditions one by one and reconsider
Take up the enumerated preconditions one at a time, and think about "what kind of solution would there be if this precondition did not exist?" Do not remove multiple preconditions at once.
- For those that do not become simpler, briefly record the reason and skip them
- For those that do become simpler, flesh out that alternative
Step 4: Cost comparison
Compare the simplified alternative solutions with the first proposal from the following 5 perspectives.
- Implementation volume: how much code is reduced
- Compatibility with existing specifications: whether compatibility with existing behavior and APIs is broken
- Explanation cost: whether explaining the concepts and behavior becomes more difficult
- Operational and migration cost: whether migration of existing data or operational workflows is required
- Future maintainability: whether it becomes easier to maintain over the long term
In addition, account for the other mechanisms needed to make the removal of assumptions feasible. If additional implementation, documentation, training, etc. are required behind the scenes after removing an assumption, honestly estimate where the cost has shifted in exchange for simplicity.
Step 5: Classification
Classify each alternative solution into three categories.
- Should be considered now: the gain in simplicity is large, and the cost is reasonable
- Future discussion point: the first proposal is reasonable for now, but it is worth reconsidering if circumstances change
- The current adopted proposal is reasonable: even if the assumption is removed, the benefit is small, or the cost outweighs it
Step 6: Consultation with an external Agent (optional)
Consultation with an external Agent is performed only when the user explicitly requests it. For how to proceed with the consultation, leave it to the procedure in codex-consultation / subagent-consultation , and this skill specifies only the content of the consultation.
If left alone, an external Agent will drift into a normal review, so request not a review but Steps 2 through 5 themselves. That is, have the external Agent itself enumerate assumptions that have grounds, and when replacing each assumption with the case where "that assumption does not exist," have it consider whether an alternative solution can be found that requires less implementation and explanation. Do not take the received alternative solutions at face value; verify them by reading the code yourself.
Step 7: Report
Output the results to the conversation. Do not save them to a file. Stop at proposals and classification, and do not automatically apply code. A human decides which alternative solution to adopt.
Report format:
## 定石外発想によるシンプル化検討
### 対象
{再考対象の解の要約。コールドスタート時は推定した対象も明記}
### 各前提の再考結果
列挙した前提ごとに:
- **前提**: {内容}
- **前提を外した場合の別解**: {具体的な別解。シンプルにならない場合はその旨と理由}
- **5観点比較と前提解除に必要な別の仕組み**: {効くものだけ}
- **分類**: 今すぐ検討すべき / 将来の論点 / 現状の採用案で妥当
### 推奨アクション
{「今すぐ検討すべき」があれば何を検討すべきか。無ければ「現状の採用案で妥当」と結論する}