Générateur de Règles

VérifiéSûr

Crée de nouvelles règles Antigravity pour imposer durablement des comportements, préférences utilisateur ou conventions de projet. Se déclenche lorsque l'observateur d'évolution détecte une préférence ou que l'utilisateur demande explicitement une nouvelle règle. Vérifie l'absence de conflit avec les règles existantes et respecte les conventions de nommage.

Spar Skills Guide Bot
DeveloppementIntermédiaire
7002/06/2026
Claude Code
#rule-generation#antigravity#agent-rules#workflow-enforcement

Recommandé pour

Notre avis

Ce métaskill crée des règles Antigravity pour imposer durablement des comportements, préférences ou conventions de projet.

Points forts

  • Automatise la création de règles cohérentes et sans conflit
  • Utilise un modèle standard pour une structure claire
  • Intègre une vérification des conflits avec les règles existantes
  • Journalise chaque nouvelle règle pour traçabilité

Limites

  • Nécessite une validation par l'orchestrateur avant création
  • Ne peut modifier les règles 00-06 du noyau
  • Dépend de la qualité des instructions fournies par l'utilisateur
Quand l'utiliser

Lorsqu'un pattern comportemental, une préférence utilisateur ou une convention de projet doit être appliqué de façon permanente dans l'environnement Antigravity.

Quand l'éviter

Pour des décisions temporaires ou ponctuelles qui ne justifient pas une règle permanente, ou si la règle proposée affaiblit la sécurité.

Analyse de sécurité

Sûr
Score qualité88/100

The skill only creates and edits rule files within the agent's internal .agent/rules/ directory. It does not execute shell commands, access networks, handle secrets, or disable safety measures. It explicitly forbids modifying core safety rules and requires orchestrator approval, ensuring a human-in-the-loop for any rule changes. No destructive or exfiltrating actions are possible.

Aucun point d'attention détecté

Exemples

Enforce Python style
Create a rule that always uses Black for Python formatting and requires type hints for all function signatures.
Avoid redundant logging
I keep asking the assistant to not print debug info unless I ask. Please create a rule that suppresses verbose logging by default.
Project-specific API pattern
Create a rule for our project: all API endpoints must follow the pattern /api/v2/{resource} and return JSON with an envelope format.

name: rule-generator description: "Creates new Antigravity rules when a behavioral pattern, user preference, or project convention needs to be enforced permanently. Triggers when the evolution observer detects a preference, or when the user explicitly asks for a new rule."

Rule Generator (Meta-Skill)

Goal

Create properly formatted Antigravity rules that are clear, actionable, and do not conflict with existing rules.

Instructions

Step 1: Define the Rule

Before creating the file, clarify:

  • What behavior to enforce: What should the agent always do (or never do)?
  • Why it matters: What goes wrong if this rule is not followed?
  • Source: Where did this rule come from? (user preference, error prevention, project convention)

Step 2: Check for Conflicts

Read all existing rules in .agent/rules/:

  • Does any existing rule contradict this new one?
  • Does any existing rule already cover this? (in which case, update it instead of creating a new one)
  • If there is a conflict, present both rules to the orchestrator and ask which takes priority

Step 3: Write the Rule File

Create a new file in .agent/rules/ with the naming convention:

  • Core rules (00-06): NEVER modify these
  • Project-specific rules: start numbering from 10- onwards (e.g., 10-python-style.md, 11-api-conventions.md)
  • This leaves room for future core rules (07-09)

Use the template in resources/rule-template.md.

Step 4: Log and Inform

  • Append to .agent/knowledge/evolution-log.md
  • Tell the orchestrator:
    • What the new rule does (plain English)
    • Why it was created
    • That it is now active in all future interactions
    • Where to find it (.agent/rules/<filename>)

Constraints

  • NEVER modify rules 00 through 06 — these are the Ground Zero core
  • NEVER create rules that weaken safety (e.g., "skip quality checks," "ignore errors")
  • ALWAYS get orchestrator approval before creating a rule
  • Rules must be phrased as clear imperatives ("Always do X," "Never do Y," "When X happens, do Y")
  • Avoid vague rules ("Try to be clean" — what does "clean" mean? Be specific.)
Skills similaires