When to invoke
Invoke this skill to refactor existing code to improve ideality (reduce waste, complexity, harmful effects) or to apply a specific TRIZ principle to resolve a known issue.
Inputs needed
A module path AND either (a) a stated contradiction, or (b) a request to "audit for ideality gaps".
Reference data used
reference/principles.mdreference/matrix.json(if a contradiction is provided)
Procedure
- Receive the module path and the specific contradiction or the request to audit for ideality gaps.
- If auditing for ideality gaps, identify areas of waste, unnecessary complexity, or harmful side-effects. If a contradiction was stated, resolve it using
reference/matrix.json. - Propose a refactoring plan that cites the specific TRIZ principle to be applied.
- Stop. Ask the user to confirm. Do not proceed until they reply.
- Apply the edits strictly scoped to the specified module.
- Confirm separately before performing any destructive operation. Do not add any new major dependencies.
Output format
A diff summary of the proposed changes, a citation of the applied principle, and a brief rationale explaining how it improves ideality or resolves the contradiction.