agentsclimarketplace

Fai architecture blueprint

Skill frootai/frootai/skills/fai-architecture-blueprint

Generate solution architecture blueprints with Mermaid service topology, component responsibility tables, data flow annotations, and WAF pillar mapping — bridging system design to implementation.From its SKILL.md

Install
npx -y skills add frootai/frootai --skill fai-architecture-blueprint

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 7 stars7 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

6.1 KB, as published. Nobody here has run it

FAI Architecture Blueprint

Creates living, commit-tracked architecture blueprints that combine visual diagrams, component responsibility matrices, data flow descriptions, and WAF alignment in a single document. Prevents the gap between "what was designed" and "what was built" by making blueprints pull from the same source of truth as the infrastructure code.

When to Invoke

SignalExample
Starting a new solution playNo architecture doc exists yet
Services have drifted from original designCode added components not in any diagram
Onboarding a new team memberNeed a visual walkthrough of the system
Preparing for a WAF reviewNeed pillar mapping per component

Workflow

Step 1 — Discover Existing Components

Scan the repository for service definitions, infrastructure files, and API contracts.

# Discover services from Bicep resources
grep -r "resource " infra/ --include="*.bicep" | \
  grep -v "//" | awk '{print $2, $3}' | sort -u

# From docker-compose
grep "^  [a-z]" docker-compose.yml | tr -d ':' | sort

# From solution-play manifest
cat fai-manifest.json | node -e "
  const d = JSON.parse(require('fs').readFileSync('/dev/stdin', 'utf8'));
  console.log(JSON.stringify(d.infrastructure?.resources ?? [], null, 2));
"

Step 2 — Generate Service Topology Diagram

graph TD
    Client[Browser / Mobile Client]
    APIM[Azure API Management]
    FuncApp[Azure Functions -- AI Gateway]
    AOAI[Azure OpenAI gpt-4o]
    AISearch[Azure AI Search]
    CosmosDB[Cosmos DB -- Conversation History]
    Redis[Redis Cache -- Semantic Cache]
    KeyVault[Azure Key Vault]
    ContentSafety[Azure Content Safety]

    Client -->|HTTPS + Bearer| APIM
    APIM -->|rate-limit + auth| FuncApp
    FuncApp -->|semantic cache check| Redis
    FuncApp -->|moderation| ContentSafety
    FuncApp -->|hybrid search| AISearch
    FuncApp -->|chat completion| AOAI
    FuncApp -->|store turn| CosmosDB
    FuncApp -->|read secrets| KeyVault

Step 3 — Component Responsibility Table

ComponentResponsibilityOwnerSLAData Class
API ManagementAuth, rate limiting, routingPlatform99.95%Public
AI Gateway (Functions)Orchestration, caching, safetyApp99.9%Internal
Azure OpenAIText generationAzure99.9%Confidential
AI SearchHybrid retrievalApp99.9%Internal
Cosmos DBConversation persistenceApp99.999%Confidential
Redis CacheSemantic cacheApp99.9%Internal
Key VaultSecret managementPlatform99.99%Restricted
Content SafetyInput/output moderationApp99.9%Confidential

Step 4 — Data Flow Annotation

# data-flows.yaml — machine-readable flow registry
flows:
  - id: user-query
    type: sync
    path: [Client, APIM, FuncApp, ContentSafety, Redis, AISearch, AOAI]
    latency_budget_ms: 3000
    pii: true
    encryption: tls1.3

  - id: history-write
    type: async
    path: [FuncApp, CosmosDB]
    latency_budget_ms: 500
    pii: true
    encryption: at-rest-aes256

Step 5 — WAF Pillar Mapping

ComponentReliabilitySecurityCostPerformanceOpExResp. AI
APIMcircuit-breakerRBAC, JWTpay-per-callcachingAPI versioningrate limiting
AI Gatewayretry + DLQManaged Identitysemantic cachestreamingApp Insightscontent safety
Azure OpenAIPTU fallbackprivate endpointmodel routingTPM quotaaudit logscontent filter

Step 6 — Key Design Decisions

IDDecisionReasonTrade-off
D-01Semantic cache in Redis40% cost reduction on repeated queriesCache invalidation complexity
D-02Azure Functions for gatewayServerless scaling, low ops overheadCold start on first request
D-03Hybrid search (BM25 + vector)Better recall than pure vectorSlightly higher latency

Output Files

docs/
  architecture-blueprint.md        <- This document (human-readable)
  data-flows.yaml                   <- Machine-readable flow registry
  architecture-blueprint.mermaid    <- Standalone diagram for tooling

WAF Alignment

PillarContribution
Operational ExcellenceBlueprints committed to repo ensure design and code stay in sync
ReliabilityData flow annotations include latency budgets enabling SLO definition
SecurityData classification per component drives encryption and access decisions

Compatible Solution Plays

  • Play 02 — AI Landing Zone (infrastructure topology)
  • Play 01 — Enterprise RAG (service topology)
  • Play 11 — AI Landing Zone Advanced

Blueprint Freshness Check

Run this script in CI to flag components in deployment that are not documented in the blueprint:

#!/usr/bin/env bash
# Check for undocumented resources
DEPLOYED=$(az resource list --resource-group "$RG_NAME" \
  --query "[].name" --output tsv | sort)

DOCUMENTED=$(grep -oP '(?<=\[)[A-Za-z ]+(?=\])' docs/architecture-blueprint.md | \
  tr '[:upper:]' '[:lower:]' | sort)

UNDOCUMENTED=$(comm -23 <(echo "$DEPLOYED") <(echo "$DOCUMENTED"))
if [ -n "$UNDOCUMENTED" ]; then
  echo "WARNING: undocumented resources detected:"
  echo "$UNDOCUMENTED"
  exit 1
fi
echo "Blueprint is up to date with deployed resources."

Notes

  • Blueprints are living documents — update the decision log (Step 6) for every significant architecture change
  • Use Mermaid for diagrams; they render natively in GitHub, VS Code, and frootai.dev
  • data-flows.yaml can be consumed by scripts to auto-generate network security group rules
  • Run the freshness check in CI to catch undocumented resources before they become architecture drift

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.