agentleFS
d-oitd-oit/rust-2026-template/.agents/skills/triz-solver/SKILL.md

triz-solver

Skill15 starsChanged 5 months agoMITView on GitHub

Systematic problem-solving using TRIZ (Theory of Inventive Problem Solving) principles adapted for software engineering. Use when stuck on complex problems, facing technical contradictions, optimizing system design, or seeking innovative solutions beyond trial-and-error. Prevents solving the wrong problem correctly.

2 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    System-level: Add component that resolves both

    line 115
  2. Distinctive:

    task-decomposition: Use TRIZ to identify contradictions before decomposing

    line 187
  3. Distinctive:

    iterative-refinement: Use contradiction analysis to guide refinement cycles

    line 189
  4. Distinctive:

    No new contradictions introduced

    line 198

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

TRIZ Problem Solver — Rust Edition

Systematic innovation methodology for Rust engineering problems.

Core Protocol

Contradiction-First Approach

1. STATE the problem in one sentence
2. IDENTIFY contradiction: "Improving [X] causes [Y] to worsen"
3. CHECK if contradiction is real or apparent
4. RESOLVE using separation principles
5. VALIDATE no new contradictions introduced

Ideal Final Result (IFR)

"The ideal Rust solution delivers all benefits with zero cost, zero unsafe, zero clones"

1. What is the ideal outcome? (no implementation details)
2. What prevents reaching it? (Rust constraints: ownership, lifetimes, traits)
3. Which constraints are real vs assumed?
4. Can the type system enforce correctness without runtime checks?

Inventive Principles (Software Edition)

Principles Applied to Rust

#PrincipleRust AnalogyWhen to Apply
1SegmentationSplit crate, module, functionMonolithic code, complex functions
2Taking outExtract trait, separate modMixed responsibilities in one type
3Local qualityDomain-specific types (Url, UserId)Generic String everywhere
4AsymmetryFeature-gated impls, sealed traitsOne-size-fits-all antipattern
5MergingBatch operations, reduce round-tripsExcessive function calls, I/O
6UniversalityShared trait, polymorphismDuplicate implementations
7NestingCow, lifetime hierarchiesFlat complex types
9IntermediaryInsert an adapter, cache, or queue between two componentsTwo systems must change in lockstep
12InversionPull-based deps, IoC, callbacksCurrent push approach failing
13DynamicsRuntime config, feature flags, hot-reloadStatic rigid configurations
15FeedbackTelemetry, regression test, sensor-driven gateNo way to tell whether a change helped
17Another dimensionAdd newtype, wrapper, sidecar, indexImpasse at current abstraction level
35Parameter changeRetune batch size, shard count, lock widthAlgorithm is sound; the tunable is wrong

This table is the complete set the contradiction matrix below draws from. A resolution citing a number absent from this table has not applied a principle.

Contradiction Matrix (Software)

Improving            vs Worsening              → Principle
──────────────────────────────────────────────────────────────
Functionality        vs Complexity             → #1, #9, #15
Performance          vs Maintainability        → #7, #13, #17
Flexibility          vs Simplicity             → #6, #2, #3
Security             vs Usability              → #12, #4, #17
Scalability          vs Resource Cost          → #1, #13, #35

Rust-Specific Additions

Compile time         vs Runtime perf           → #13, #35
API ergonomics       vs Binary size            → #1, #15
Async surface        vs Blocking cost          → #1, #15
Genericity           vs Compile time           → #2, #6

Decision Workflow

Step 1: Frame Problem

Problem: [One sentence]
Current approach: [What you're doing]
Stuck because: [Why it doesn't work]
Rust constraints hit: [Ownership / Lifetime / Trait bounds / Async / Unsafe]

Step 2: Identify Contradiction

Improving: [Parameter that needs improvement]
Worsens: [Parameter that degrades]
Type: [Technical / Physical / Inherent]
Rust-specific: [Is the borrow checker the bottleneck?]

Step 3: Apply Resolution

Choose separation strategy:

  • Time: Different behavior at different stages
    • Rust: OnceCell, Phased init, staged builder
  • Space: Different behavior in different contexts
    • Rust: feature flags, #[cfg], target_arch
  • Condition: Different behavior based on input type
    • Rust: trait objects, sealed traits, match
  • System-level: Add component that resolves both
    • Rust: newtype wrapper, sidecar crate, separate binary

Step 4: Validate

✓ Original problem solved
✓ No new contradictions introduced
✓ Solution approaches IFR (minimal complexity added)
✓ `cargo clippy --workspace --all-targets --all-features -- -D warnings` passes
✓ `cargo nextest run --workspace` passes
✓ No `unsafe` without `// SAFETY:` rationale

Examples

Example 1: Compile Time vs Runtime Performance

Problem: Heavy generics in core crate cause slow dev builds
Contradiction: Genericity (improve) vs Compile time (worsen)
Apply: #2 Taking out → Extract hot-loop into runtime-dispatched `dyn Trait` crate
Result: Core crate compiles fast, hot loop dispatched at runtime

Example 2: API Ergonomics vs Binary Size

Problem: Convenience methods bloat the binary
Contradiction: API ergonomics (improve) vs Binary size (worsen)
Apply: #1 Segmentation → Feature-gate convenience methods, default off
Result: Users opt in to convenience, base binary stays small

Example 3: Async Surface vs Blocking Cost

Problem: Exposing async requires every caller to .await
Contradiction: Async surface (improve) vs Blocking cost (worsen)
Apply: #12 Inversion → Provide blocking wrapper that calls `tokio::runtime::Handle::block_on`
Result: Both sync and async callers served

Example 4: Security vs Usability (Auth)

Problem: Strong auth improves security but hurts UX
Contradiction: Security (improve) vs Usability (worsen)
Apply: #12 Inversion → Risk-based auth (challenge only suspicious sessions)
Result: Both sync and async callers served

Example 5: Agent Instruction Optimization

Problem: More instructions improve reliability but consume context
Contradiction: Completeness (improve) vs Token limits (worsen)
Apply: #4 Asymmetry → Heavy knowledge in `references/`, load lazily
Result: Reliability maintained, context efficiency improved

Example 6: Lifetime vs Extensibility

Problem: Adding a borrow makes the trait less flexible for downstream impls
Contradiction: Borrow safety (improve) vs Extensibility (worsen)
Apply: #7 Nesting → Use `Cow<'_, T>` or lifetime-generic type parameter
Result: Borrow enforced where needed, flexible where not

Integration with Other Skills

  • task-decomposition: Use TRIZ to identify contradictions before decomposing
  • agent-coordination: Apply IFR to coordination strategy selection
  • iterative-refinement: Use contradiction analysis to guide refinement cycles
  • triz-analysis: Audit first, then solve
  • anti-ai-slop: Validate the TRIZ solution isn't boilerplate-heavy

Quality Checklist

  • Contradiction explicitly stated before solution
  • IFR defined before implementation
  • Solution verified against contradiction matrix
  • No new contradictions introduced
  • Approaches ideal state (minimal added complexity, idiomatic Rust)
  • cargo clippy and cargo nextest pass

Rationalizations

RationalizationReality
"I already know the solution, no need for TRIZ analysis"Skipping contradiction analysis often means solving the wrong problem correctly, wasting implementation effort.
"This is just a minor tweak, not a real problem"Minor tweaks can introduce new contradictions; validate that no new trade-offs are created.
"Just add unsafe to bypass the borrow checker"unsafe is the cost; TRIZ avoids paying it. Re-examine the design first.

Red Flags

  • Proposing a solution without explicitly stating the contradiction first
  • Skipping IFR definition and jumping to implementation details
  • Introducing new contradictions without validating the solution
  • Using unsafe to bypass the borrow checker instead of redesigning
  • Adding unwrap(), clone(), or Box<dyn Trait> as the first solution

Reference Files

Related Skills

  • triz-analysis - Audit first, then solve
  • task-decomposition - Break complex problems into sub-tasks
  • goap-agent - Use TRIZ in Phase 1 (Analyze) of GOAP
  • anti-ai-slop - Audit rewritten code for boilerplate

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.