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

triz-analysis

Skill15 starsChanged 5 months agoMITView on GitHub

Run a systematic TRIZ contradiction audit against a Rust codebase, architecture, or workflow to identify hidden trade-offs and innovation opportunities. Use when facing design trade-offs, contradictory requirements, or needing to identify innovation opportunities through systematic contradiction analysis. Triggers: 'TRIZ audit', 'contradiction analysis', 'innovation audit', 'trade-off analysis', 'hidden trade-offs'.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All agent-generated analysis must be written to analysis/ using:

    line 26
  2. Very specific:

    REPORT: Document findings in analysis/.

    line 41
  3. Very specific:

    When auditing async Rust, do not treat spawn_blocking as a universal optimization.

    line 84
  4. Distinctive:

    task-decomposition: Use to break a large workspace audit into smaller scoped TRIZ analyses.

    line 120

≈ “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 Analysis — Rust Edition

Systematic innovation audit for Rust codebases, workspace architectures, and CI/CD pipelines.

Input Requirements

  • Target Scope: The specific directory, pipeline, or framework to analyze (e.g., crates/, scripts/, .github/workflows/, agent-coordination).
  • Language Focus: Rust-specific patterns (ownership, async, traits, lifetimes).

Output Convention

All agent-generated analysis must be written to analysis/ using:

analysis/triz-<scope>-YYYY-MM-DD.md

Example: analysis/triz-scripts-2026-06-18.md

Audit Process

  1. SCOPE SCAN: Examine the target scope for existing pain points or trade-offs.
  2. CONTRADICTION DISCOVERY: Identify technical contradictions: "Improving [X] in this scope causes [Y] to worsen."
  3. PRINCIPLE MAPPING: Map discovered contradictions to TRIZ inventive principles.
  4. INNOVATION ROADMAP: Propose specific Rust-idiomatic changes based on TRIZ resolutions.
  5. REPORT: Document findings in analysis/.

Core Protocol

Contradiction-First Approach

1. SCAN the scope
2. IDENTIFY contradiction: "Improving [X] causes [Y] to worsen"
3. CHECK if contradiction is real or apparent
4. RESOLVE using separation principles
5. DOCUMENT findings in analysis/

Ideal Final Result (IFR) for Rust Audits

"The ideal Rust system performs its function with minimal unsafe code, unnecessary cloning, and contention"

1. What is the ideal outcome for this scope?
2. What prevents reaching it? (current type/ownership/CI constraints)
3. Which constraints are real vs assumed?
4. Could the borrow checker enforce correctness instead of runtime checks?

Contradiction Matrix (Rust-Specific)

Improvingvs Worsening→ PrincipleRust Pattern
Throughputvs Latency#7, #13, #17Batching, bounded queues, workload-aware scheduling
API ergonomicsvs Binary size#1, #15Feature flags, #[cfg], trait-based DI
Compile timevs Runtime perf#13, #35LTO off, cargo-bloat profile tuning
Safetyvs Performance#12, #4unsafe minimization, scoped SIMD
Genericityvs Compile time#2, #6Carefully scoped generics, sealed traits
Async surfacevs Blocking cost#1, #15Workload-aware direct execution, spawn_blocking, bounded workers
Throughputvs Fairness#13, #15Batching, bounded poll work, deliberate yield_now
Concurrencyvs Resource usage#1, #35Semaphore, bounded mpsc, worker pools
Shared statevs Contention#1, #2Ownership/message passing, short lock scope
Build matrixvs CI minutes#1, #9cargo-hack, workspace inheritance
Test coveragevs Test runtime#13, #35cargo-nextest sharding, proptest shrinking

Tokio-Specific Audit Rules

When auditing async Rust, do not treat spawn_blocking as a universal optimization. Determine whether work is blocking, short bounded CPU work, sustained CPU work, or latency-sensitive. Consider scheduler fairness, coordination overhead, blocking-pool pressure, batching, and isolation.

Check for:

  • unbounded tokio::spawn fan-out
  • queues without deliberate backpressure
  • locks held across .await
  • expensive work while holding a lock
  • repeatedly-ready loops that monopolize workers
  • fragmented small I/O operations
  • claims of performance without representative benchmarks

For detailed Tokio performance guidance, invoke the tokio-performance skill.

Software Contradiction Matrix (General)

Improvingvs Worsening→ Principle
Functionalityvs Complexity#1, #9, #15
Performancevs Maintainability#7, #13, #17
Flexibilityvs Simplicity#6, #2, #3
Securityvs Usability#12, #4, #17
Scalabilityvs Resource Cost#1, #13, #35

Separation Principles (Rust Mapping)

StrategyWhenRust Pattern
TimeDifferent behavior at stagesLifecycle generics, OnceCell, phased init
SpaceDifferent behavior in contextCrate features, cfg flags, target_arch
ConditionDifferent by inputTrait objects, sealed traits, match
System-levelNew component resolvesNewtype wrapper, sidecar crate, separate binary

Integration with Other Skills

  • tokio-performance: Apply for Tokio scheduling, fairness, contention, blocking, and bounded-concurrency analysis.
  • agent-coordination: Orchestrate as a swarm sub-task where multiple agents analyze different crates or pipelines in parallel.
  • task-decomposition: Use to break a large workspace audit into smaller scoped TRIZ analyses.
  • anti-ai-slop: Apply after TRIZ resolutions to keep the rewrite idiomatic and not boilerplate-heavy.

Quality Checklist

  • Target scope clearly defined
  • Discovered contradictions explicitly stated
  • Recommendations mapped to TRIZ inventive principles
  • Rust-idiomatic pattern suggested (not just generic advice)
  • Findings saved to analysis/triz-<scope>-YYYY-MM-DD.md
  • Async recommendations are workload-aware rather than cargo-cult patterns

Rationalizations

RationalizationReality
"This Rust code compiles, no contradictions exist"Compilation proves type safety, not design trade-offs. Many crates have hidden coupling or runtime bottlenecks.
"TRIZ is too theoretical for Rust"TRIZ principles map directly to Rust patterns: segmentation = crate split, taking out = extract trait, separation = workload-specific execution.
"Just run clippy, that catches everything"Clippy catches idiomatic violations; TRIZ catches architectural contradictions clippy cannot see.
"spawn_blocking is always faster"It adds coordination and uses a shared blocking pool; workload characteristics determine the appropriate execution model.

Red Flags

  • Skipping the contradiction statement and jumping straight to solutions
  • Defining contradictions too vaguely to map to specific principles
  • Not saving findings to analysis/ as specified
  • Proposing non-idiomatic Rust or speculative optimization without measurement
  • Treating spawn_blocking, yield_now, locks, or extra runtimes as universal performance fixes

Reference Files

Related Skills

  • tokio-performance - Tokio scheduling, fairness, contention, blocking, I/O, and concurrency audits
  • triz-solver - Apply TRIZ principles to solve specific problems
  • task-decomposition - Break audits into scoped sub-tasks
  • goap-agent - Use TRIZ in Phase 1 (Analyze) of GOAP
  • anti-ai-slop - Audit rewritten code for boilerplate and over-abstraction

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.