fta-code-level

Decompose a target method's control flow into OR/AND gates and generate a Mermaid diagram with a Markdown traceability table.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/luansilvadb/agoravai --skill fta-code-level
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fta-code-level
Source: https://github.com/luansilvadb/agoravai/tree/main/.rag/context/fta-code-level
Command: npx skills add https://github.com/luansilvadb/agoravai --skill fta-code-level

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Decomposes functions and methods into deterministic fault trees, connecting logical gates to concrete exceptions and invalid states to produce testable resilience artifacts.

Core Features & Use Cases

  • Deterministic fault-tree generation from a target method by mapping try/catch and control-flow to OR/AND gates.
  • Produces a Mermaid diagram and a Markdown traceability table that map leaves to code mitigations and remediation snippets.
  • Supports guidance for adding guards, fallbacks, and retries to improve resilience in critical methods.

Quick Start

Input a target method and run the skill to generate a Mermaid diagram and a Markdown table of failures and mitigations.

Frequently Asked Questions about fta-code-level

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a fault tree analysis from a specific method's control flow?

Generate a fault tree analysis by inputting a target method; the skill isolates its signature and dependencies, decomposes control flow and exception surface into OR/AND gates, and outputs a Mermaid diagram with a Markdown traceability table.

What is code-level fault tree analysis and when do I need it?

Code-level fault tree analysis decomposes functions into deterministic fault trees, connecting logical gates to concrete exceptions and invalid states. You need it when mapping testable resilience artifacts for critical methods to identify failures and mitigations.

Can I map try/catch blocks and exceptions to logical AND/OR gates automatically?

Yes, the skill maps try/catch blocks to OR/AND gates automatically by decomposing the target method's flow, capturing each leaf as a concrete exception or invalid state, and annotating mitigations where present.

How do I create a Mermaid diagram for code exceptions and invalid states?

Create a Mermaid diagram for exceptions by running the skill on a target method. It produces a deterministic Mermaid diagram mapping logical gates to concrete exceptions and invalid states, alongside a Markdown traceability table.

Does fault tree analysis help identify where to add guards, fallbacks, and retries in my code?

Yes, fault tree analysis identifies where to add guards, fallbacks, and retries by mapping each leaf to its remediation snippet. The generated Markdown traceability table provides guidance for improving resilience in critical methods.

What are the limitations of mapping code-level fault trees using Mermaid diagrams?

Mapping code-level fault trees using Mermaid diagrams is limited to the target method's isolated signature and dependencies. It focuses on deterministic control flow and exception surface mapping, producing static artifacts rather than dynamic runtime resilience analysis.