Synthèse automatique
Guide pour piloter un serveur MCP adossé au runtime SPARDA : lecture du contexte de graphe, cache « flywheel », disjoncteur de quarantaine et protocole de confirmation en deux phases pour les écritures.
Points forts
- Donne un protocole opérationnel précis : appeler sparda_get_context en début de session, puis s'orienter grâce aux routes, événements et métriques renvoyés.
- Explique le mécanisme du flywheel avec ses seuils concrets (3 lectures identiques en 30 s) et déconseille explicitement un cache client qui masquerait le signal.
- Décrit le comportement du disjoncteur (quarantaine après 3 erreurs 5xx, réponse 503 avec retryInMs) et impose de respecter le délai au lieu de réessayer en boucle.
- Clarifie les états de configuration : outils d'écriture masqués tant que l'utilisateur n'a pas opté pour leur activation, schémas partiels signalés par un préfixe.
Limites
- Entièrement spécifique au runtime propriétaire SPARDA : sans serveur compilé exposant les outils sparda_*, le skill n'a aucune prise.
- Ne couvre pas les commandes CLI de preuve (review, apocalypse, timeless, heal, mirror) et renvoie au README du projet pour cette moitié de l'outillage.
- Les seuils cités (3 lectures/30 s, 3 erreurs 5xx) peuvent varier selon la configuration opérateur, notamment SPARDA_FLYWHEEL=off.
À utiliser dès qu'une session est connectée à un serveur MCP SPARDA et expose des outils sparda_get_context, sparda_confirm ou des outils composites.
À éviter sur un serveur MCP classique ou lorsque le besoin porte sur les commandes CLI de vérification SPARDA plutôt que sur le pilotage du runtime en direct.
Analyse de sécurité
SûrThe content is product documentation for driving a SPARDA MCP server. It contains no destructive commands, no curl|sh piping, no base64 payloads, no credential/token exfiltration, and no instruction to disable safety controls. The write path is explicitly gated behind a human-confirmation two-phase protocol with single-use expiring tokens and an explicit 'never bypass' rule. Network/CLI references are incidental documentation of the vendor's own tooling, not instructions the agent is told to execute, so the listing risk is low; the only mild notes are the cache-priming advice and incidental npx/network mentions.
- •References external CLI/network operations (e.g. `npx -y js-yaml`, `sparda twin --learn`, `sparda seed export/import`) as troubleshooting context, but does not instruct the agent to run them or to exfiltrate data; these are documented in-app commands.
- •Encourages deliberately repeating identical read calls to trigger the flywheel cache — a behavioral quirk (extra tool traffic) rather than a safety hazard.
Exemples
Call sparda_get_context and summarize the runtime health, any quarantined tools, and the current flywheel hit rate before we do anything else.get_users just returned a 503 with a retryInMs value. Walk me through what the circuit-breaker is doing and what I should do next instead of retrying.I need to update a user record through the SPARDA server. Show me the two-phase sparda_confirm flow and check the write tool is actually enabled first.name: sparda-mcp
description: >-
Drive a SPARDA compiled Behavior Runtime to its full potential. Use this whenever
you are connected to a backend running the SPARDA Runtime (compiled into a Unified
Behavior Graph - UBG) — recognizable by the tools sparda_get_context, sparda_info,
sparda_confirm, or composite tools. It teaches the graph-context-first workflow,
how to exploit the response-recycling flywheel, the circuit-breaker, crystallized
circuits, offline Twin simulations, and the two-phase confirm protocol for writes.
Driving a SPARDA Behavior Runtime
A SPARDA server is driven by a compiled Unified Behavior Graph (UBG) — the graph SPARDA's compiler produces from the host application's states, transitions, permissions, and side-effects, serialized under the SBIR specification. Instead of exposing raw, disconnected endpoints, SPARDA compiles the app into a deterministic behavioral model. The local SPARDA Runtime dynamically executes this graph inside the live host process, powering the MCP interface, the Twin simulation clone, and the Immune system offline.
This skill covers the runtime (driving a live MCP server) — the live half of SPARDA's trust layer: "AI writes. SPARDA proves." The same graph also powers dev-time proof commands you run in the app's repo —
sparda review(the behavior diff of a PR),apocalypse(prove the deploy),timeless(record/replay a request),heal(prove a fix),mirror(serve the graph),ubg(compile),verify(prove the compiler's laws). Those are CLI, not MCP tools; see the project README.
Rule 0 — call sparda_get_context first, every session
Before anything else, call sparda_get_context (no params). It returns the live state of the SPARDA Behavior Graph:
- the active routes/tools, workflows, and type-propagated schemas;
runtime— current stats (calls, errors, quarantine states, Twin mode active);- the last ~20 events (errors, latency anomalies, immune alerts);
- immune memory (cached antibodies and error diagnoses);
- recycling metrics (flywheel memory hit rates);
- a
behaviorsnapshot of stable variables.
Read it to orient yourself inside the graph. sparda_info gives a lighter summary of counts.
The tools you'll see
- Per-route tools —
snake_casenames derived from the app's real routes (e.g.get_users,get_users_by_id). A[partial schema]prefix means the parameter schema was only partially inferred — pass arguments carefully. - Meta-tools —
sparda_get_context,sparda_info,sparda_list_disabled_tools,sparda_confirm. - Composite tools — labelled
[Labs circuit ×N],readOnly. One call runs a whole proven multi-step chain (see Crystallized circuits below).
Only enabled tools appear. Write tools are hidden until the user opts in, so a missing write is a config state, not an error — see Writing safely.
Exploit the intelligence layer (this is the "full potential")
1. Response-recycling flywheel — make repeated reads free.
When the same read tool returns a byte-identical result for the same arguments
3 times within 30 seconds, SPARDA serves the next identical call straight from
RAM (servedByFlywheel: true) without touching the host app. So:
- Don't fear repeating stable GETs — repetition is what activates the cache.
- Don't bolt your own client-side cache on top; you'd hide the signal that lets SPARDA recycle, and you'd lose freshness control.
- Watch
recycling.flywheel.servedFromMemoryclimb in context — that's free work. - Reads only; writes always hit the host. Operators can disable it (
SPARDA_FLYWHEEL=off).
2. Circuit-breaker / quarantine — stop hammering a sick backend.
After 3 consecutive 5xx on a tool, SPARDA quarantines it: subsequent calls
return HTTP 503 with reason and retryInMs instead of hitting the failing
host. Honor retryInMs — do not retry-loop. Check runtime.quarantine in context
before depending on a tool. After a cooldown (~60s) the tool half-opens for one
probe; one more 5xx re-quarantines it.
3. Crystallized circuits (Labs) — collapse a chain into one tool.
If you repeat a GET→GET sequence where one call's output feeds the next call's
argument 3 times (and the operator enabled Labs recording), SPARDA mints a
single composite tool for that chain and announces it mid-session via
tools/list_changed. Prefer the composite over re-walking the steps — it's one
call and it's marked read-only. (Writes are never absorbed into a circuit.)
4. Adaptive immunity — read the diagnosis before retrying.
Repeated, unfamiliar failures trigger a one-shot LLM diagnosis that SPARDA caches
as an "antibody" (keyed by source|tool|status). Recurrences reuse the cached
diagnosis at zero cost. When an error event carries a diagnosis, read it and
adapt — don't blindly retry the same call.
5. Latency anomalies. A call far slower than a tool's own baseline surfaces as
an immune event in /mcp/events. Treat it as a hint to back off or warn the user.
6. Twin Simulation Mode — practice safely on a clone.
When /mcp/stats or sparda_get_context.runtime contains "twin": true, you are connected to a safe, in-memory mock clone of the application.
- All GET reads return learned exemplars (observed response shapes and mock values).
- All write tools return simulated
202echoes but do not write to database or external APIs. - Use this twin mode to practice multi-step workflows, debug tool sequences, and test your plans without touching the live production backend.
7. Grammar & Evolution — discover optimal workflows.
- You can query or contribute to the app's grammar (
.sparda/grammar.json). The grammar maps valid sequences of tool calls (edges). - Running
sparda evolvemutates and runs candidate chains against the twin. The successful evolved sequences are suggested as mid-session workflows.
Writing safely — the mandatory two-phase protocol
Writes are disabled by default. The protocol is not optional:
- No write tool listed? Call
sparda_list_disabled_tools. Tell the user how to enable it: set"enabled": truefor that tool insparda.json, re-runsparda init, and restart the bridge. Never try to bypass it. - Calling an enabled write under the default
require_humanpolicy returns HTTP 202awaiting_confirmation— the host was not touched. The payload carries:confirm(a single-use token),preview,instruction,expiresInMs, and aspardingProof(SPARDA's safety verdict for this action). - Inspect first. Follow
preview.inspectFirst: call the matching read tool and show the user the current state, so the confirmation is informed. - Commit by calling
sparda_confirmwith{ "token": "<confirm>" }. The token is single-use and expires (~120s). SPARDA then executes and, because of proof-after-write, re-reads the resource and returns aproofof the new state — surface that proof to the user. - Never fabricate or reuse a token; never loop a write. If the client supports MCP elicitation, SPARDA may also prompt the user directly before the write — let it.
Read the dashboards to steer
/mcp/stats(insparda_get_context.runtime): per-toolcalls/errors;purity.class === 'pure'marks a tool whose answers are flywheel-recyclable;quarantinelists tools to avoid right now. Use it to pick hot, healthy tools./mcp/events: the error / latency / immune stream, delivered as MCP logging notifications with any cached diagnosis attached.
Full-potential plays
- Resume cold →
sparda_get_context; readruntime.quarantine, immune memory, andworkflowsbefore touching anything. - Inspect-before-write → on a 202, call the same-path read tool, show state,
then
sparda_confirm. - Crystallize then call → repeat a GET→GET id-chain to mint a
[Labs circuit]composite, then call the composite once instead of N times. - Find hot / sick tools → read
/mcp/stats: preferpurity: pure, skipquarantine. - Free repeated reads → repeat a stable GET to trigger flywheel serves; watch
servedFromMemoryrise. - Listen → keep an eye on
/mcp/events; act on immune diagnoses and latency flags instead of retrying blindly.
Troubleshooting
- Bridge won't start / "localKey" error →
sparda.jsonis missing its key; re-runsparda init(the key is preserved across re-inits). - A tool you expect is missing → it's disabled (write-safety) or the route was
removed; run
sparda syncafter route edits, orsparda_list_disabled_tools. - General health →
sparda doctorchecks Node version, framework detection, manifest validity, the semantic/immune cache, host reachability, and quarantine; it exits non-zero so it can gate CI. - Formal Deployment Proof →
sparda apocalypsereads the compiled graph (ubg.json) and proves five correctness obligations: catches unguarded mutations, non-atomic aggregate writes, unvalidated writes to constrained tables, uncompensated observable effects, and aggregate root bypasses. Runsparda apocalypse --save-baselineto store the reference graph; subsequent runs diff against the baseline to catch dropped guards, dropped SQL invariants, or grown blast radiuses. - Safety Matrix Report →
sparda dossiergenerates an ultra-premium, self-contained HTML matrix of the app's safety proof, ideal for security engineers and audit compliance. - Deep Framework Resolution → SPARDA natively traces multi-hop Dependency Injection in NestJS, external controllers in Express, and wrapped handlers in Next.js, mapping them into the final Behavior Graph.
- OpenAPI Ingestion → Run
sparda ubg --openapi <openapi_spec.json>to compile any non-JS/Python backend (Go, Java, Rails, Laravel, .NET) into a Unified Behavior Graph by mapping security schemes into guards and request/response structures. (JSON specs only — convert YAML once withnpx -y js-yaml spec.yaml > spec.json.) - Executing the Graph (No code mock) → Run
sparda mirrorto host a mock HTTP simulation server directly fromubg.jsonwithout any backend code. Enforces authentication guards, returns typed responses, and acts as a contract sandbox. - Exporting OpenAPI 3.1 Spec → Run
sparda openapito generate a valid, deterministic OpenAPI 3.1 spec dynamically from the compiled behavior graph. - Self-Verification → Run
sparda verifyto test the compiler's own invariants (byte-determinism, soundness, and spec round-trip) to guarantee trust. - Time-Travel Debugging →
sparda timelessrecords a production request's nondeterminism (db, http, clock, random, uuid) and replays it byte-identically against current code.sparda timeless replay <id>re-flies it;sparda timeless export <id>turns the bug into a vitest test. Recording is opt-in in the app (deterministic sampling + GDPR redaction built in). - Self-Healing, Proven →
sparda heal <id>builds a fix brief from the graph, then--check --expect '{"status":200}'gates a candidate fix on three axes at once: the recorded flight now returns the expected response (not the bug),verifystill passes, andapocalypsefinds no new critical/high and no removed guard. The gate is honest both ways — an unfixed bug keeps it closed (exit 1). - Clone learning / Transfer sémantique → Use
sparda seed exportto package your app's descriptions, workflows, and antibodies. Thensparda seed import --germinatein another clone to import the structure and germinate simulated twin instances. - Learn exemplars → Start your live app and run
sparda twin --learnto fetch actual response data and construct.sparda/twin.jsonlocally.
This skill ships with sparda-mcp and is regenerated from SPARDA's capability
surface each release, so it tracks new tools and behaviors. The live, per-project
tool list, stats, and workflows always come from sparda_get_context at runtime —
trust it over any static list.
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/driving-a-sparda-behavior-runtime-mvda89br/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/driving-a-sparda-behavior-runtime-mvda89br' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/driving-a-sparda-behavior-runtime-mvda89br/download' --output '.skill-downloads/driving-a-sparda-behavior-runtime-mvda89br/SKILL.md.part' && mv '.skill-downloads/driving-a-sparda-behavior-runtime-mvda89br/SKILL.md.part' '.skill-downloads/driving-a-sparda-behavior-runtime-mvda89br/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/driving-a-sparda-behavior-runtime-mvda89br/SKILL.md' && test -s '.skill-downloads/driving-a-sparda-behavior-runtime-mvda89br/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/sparda-mcp' && cp -R '.skill-downloads/driving-a-sparda-behavior-runtime-mvda89br' '.claude/skills/sparda-mcp'Cursor
test -f '.skill-downloads/driving-a-sparda-behavior-runtime-mvda89br/SKILL.md' && test -s '.skill-downloads/driving-a-sparda-behavior-runtime-mvda89br/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/sparda-mcp' && cp -R '.skill-downloads/driving-a-sparda-behavior-runtime-mvda89br' '.cursor/skills/sparda-mcp'Codex
test -f '.skill-downloads/driving-a-sparda-behavior-runtime-mvda89br/SKILL.md' && test -s '.skill-downloads/driving-a-sparda-behavior-runtime-mvda89br/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/sparda-mcp' && cp -R '.skill-downloads/driving-a-sparda-behavior-runtime-mvda89br' '.agents/skills/sparda-mcp'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/driving-a-sparda-behavior-runtime-mvda89br'openskills read 'driving-a-sparda-behavior-runtime-mvda89br'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/driving-a-sparda-behavior-runtime-mvda89br/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.