Implémenter les décisions

VérifiéPrudence

Implémente une ou plusieurs décisions proposées en modifiant le code, en ajoutant des annotations @decision et en mettant à jour le statut des décisions. Utile pour passer de décisions planifiées à des changements concrets dans le codebase, en respectant les pratiques du projet.

Spar Skills Guide Bot
DeveloppementIntermédiaire
02/06/2026
Claude Code
#decisions#implementation#annotations#decision-log#code-changes

Recommandé pour

Synthèse automatique

Ce skill implémente une ou plusieurs décisions proposées en modifiant le code, ajoutant des annotations @decision et mettant à jour le statut des décisions.

Points forts

  • Applique systématiquement les décisions enregistrées dans le journal
  • Gère automatiquement le lot de décisions couplées
  • Met à jour les annotations et le statut des décisions
  • Peut implémenter toutes les décisions proposées en une seule commande

Limites

  • Nécessite que les décisions soient déjà enregistrées via /dld-decide
  • Ne peut pas gérer les découvertes majeures qui changent l'intention de la décision
  • Dépend de la configuration dld.config.yaml
Quand l'utiliser

Utilisez ce skill lorsque vous avez une décision proposée prête à être codée et que vous souhaitez l'appliquer avec toutes ses annotations et la traçabilité associée.

Quand l'éviter

Ne l'utilisez pas pour prendre des décisions ou pour des modifications de code qui ne sont pas liées à une décision enregistrée.

Analyse de sécurité

Prudence
Score qualité85/100

The skill instructs the AI to execute local bash scripts for updating decision status and verifying annotations. While these scripts are part of the skill's intended workflow and do not obviously exfiltrate data or cause destruction, any bash execution carries inherent risk, especially if the skill's script contents are not fully trusted. The skill does not download or execute external payloads, and the risk is limited to the project's own environment.

Points d'attention
  • •Runs bash scripts (update-status.sh, verify-annotations.sh) from a local .claude/skills path, which could be risky if the scripts are compromised or misconfigured.
Comment cette analyse est faite

Exemples

Implement all proposed decisions
/dld-implement
Implement specific decisions by ID
/dld-implement DL-005 DL-006
Implement decisions by tag
/dld-implement tag:payment-gateway

name: dld-implement description: Implement one or more proposed decisions. Makes code changes, adds @decision annotations, and updates decision status. user_invocable: true

/dld-implement — Implement Decisions

You are implementing one or more proposed decisions by making code changes, adding @decision annotations, and updating the decision records.

Script Paths

Shared scripts:

.claude/skills/dld-common/scripts/regenerate-index.sh
.claude/skills/dld-common/scripts/update-status.sh

Skill-specific scripts:

.claude/skills/dld-implement/scripts/verify-annotations.sh

Prerequisites

  1. Check that dld.config.yaml exists at the repo root. If not, tell the user to run /dld-init first and stop.
  2. Parse the user's input to identify which decision(s) to implement:
    • Specific IDs: DL-005, DL-005 DL-006
    • By tag: tag:payment-gateway
    • No arguments: If the user runs /dld-implement without specifying decisions, find all decisions with status: proposed in the records subdirectory (decisions/records/) and implement all of them.
  3. Read each referenced decision file. Verify they exist and have status: proposed. If a decision is already accepted, tell the user and skip it. If it doesn't exist, report the error.

Read project context

  1. Read dld.config.yaml for project structure
  2. Read decisions/PRACTICES.md if it exists — this is where practices guidance is most important. Apply the project's testing approach, code style, error handling patterns, and architecture conventions when writing code.
  3. For namespaced projects, also read decisions/records/<namespace>/PRACTICES.md for namespace-specific practices

Implementation

Batch vs. single implementation

When multiple decisions are requested, decide whether to implement them individually or as a batch:

  • Batch together decisions that are tightly coupled — they touch the same code, share types, or depend on each other so heavily that implementing one without the others would produce incomplete or throwaway code (e.g., a data model + its validation + its state machine).
  • Implement separately decisions that are independent — they touch different areas of the codebase and can stand on their own.

When batching, implement all the code together, add annotations for all decisions, then update each decision record and status individually in step 4.

1. Understand the decision(s)

Read each decision record carefully. Understand:

  • What was decided
  • The rationale and constraints
  • The code areas referenced
  • Any superseded decisions (read those too for context on what changed)

2. Make code changes

Implement the decision(s) by modifying the codebase. Follow the practices manifest if one exists.

Refining decisions during implementation: While implementing, you may discover details that weren't anticipated during planning — a specific threshold value, an edge case handling approach, or a refinement to the original design. Since the decision is still in proposed status, it is mutable and can be updated:

  • Small refinements (implementation details, specific values, edge cases that don't change the decision's intent) — update the decision record inline. Amend the Decision, Rationale, or Consequences sections as needed. This is expected and encouraged.
  • Major discoveries (a fundamentally different approach is needed, or an entirely new design concern surfaces) — stop and suggest the user run /dld-decide to record a separate decision. If the new discovery invalidates the current decision, it may need to be superseded instead.

The boundary: if the discovery changes the intent of the decision, it's a new decision. If it refines the implementation details, update the current one.

3. Add @decision annotations

This step is mandatory. Every implemented decision MUST have at least one @decision(DL-NNN) annotation in the source code. Updating the decision record's references field alone is not sufficient. The annotation in code is what triggers AI agents to look up the decision before modifying the annotated code.

Add @decision(DL-NNN) annotations to the code you modified or created. Place annotations in comments near the relevant code.

Where to annotate:

  • Functions, methods, or classes that embody the decision
  • Configuration or constants that were chosen based on the decision
  • Key logic branches where the decision's rationale matters

Annotation format (adapt comment syntax to the language):

// @decision(DL-012)
function calculateVAT(order: Order): Money {
  // ...
}
# @decision(DL-012)
def calculate_vat(order: Order) -> Money:
    ...

Guidelines:

  • Annotate at the declaration level, not every line
  • One annotation per decision per code location
  • Multiple decisions can annotate the same code: // @decision(DL-012) @decision(DL-015)
  • Use the annotation_prefix from dld.config.yaml (default: @decision)

4. Update decision records

For each implemented decision:

  1. Update the references field in the decision record's YAML frontmatter. Edit the file directly — add the code paths and symbols that were annotated. Example:

    references:
      - path: src/billing/vat.ts
        symbol: calculateVAT
      - path: src/billing/vat.test.ts
    
  2. Update status from proposed to accepted:

    bash .claude/skills/dld-common/scripts/update-status.sh DL-NNN accepted
    

5. Verify annotations

After updating all decision records, run the verification script to confirm every implemented decision has at least one @decision annotation in the codebase:

bash .claude/skills/dld-implement/scripts/verify-annotations.sh DL-005 DL-006

Pass all the decision IDs that were implemented. If any are missing annotations, the script will report them and exit with an error. Go back and add the missing annotations before proceeding.

6. Regenerate INDEX.md

bash .claude/skills/dld-common/scripts/regenerate-index.sh

7. Suggest next steps

Implemented and accepted: DL-NNN (<title>)

Code changes:

  • src/billing/vat.ts — modified calculateVAT (annotated with @decision(DL-NNN))
  • src/billing/vat.test.ts — added tests

Next steps:

  • /dld-decide — record another decision
  • /dld-audit — check for drift between decisions and code

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 annexes

Ce 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.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/implement-decisions-mmk3nhan/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/implement-decisions-mmk3nhan' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/implement-decisions-mmk3nhan/download' --output '.skill-downloads/implement-decisions-mmk3nhan/SKILL.md.part' && mv '.skill-downloads/implement-decisions-mmk3nhan/SKILL.md.part' '.skill-downloads/implement-decisions-mmk3nhan/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.

Extrait original : Prerequisites
  1. Check that dld.config.yaml exists at the repo root. If not, tell the user to run /dld-init first and stop.
  2. Parse the user's input to identify which decision(s) to implement:
    • Specific IDs: DL-005, DL-005 DL-006
    • By tag: tag:payment-gateway
    • No arguments: If the user runs /dld-implement without specifying decisions, find all decisions with status: proposed in the records subdirectory (decisions/records/) and implement all of them.
  3. Read each referenced decision file. Verify they exist and have status: proposed. If a decision is already accepted, tell the user and skip it. If it doesn't exist, report the error.

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/implement-decisions-mmk3nhan/SKILL.md' && test -s '.skill-downloads/implement-decisions-mmk3nhan/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/dld-implement' && cp -R '.skill-downloads/implement-decisions-mmk3nhan' '.claude/skills/dld-implement'

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’OpenSkills
openskills install './.skill-downloads/implement-decisions-mmk3nhan'

openskills read 'implement-decisions-mmk3nhan'

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 sync

Mode 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/implement-decisions-mmk3nhan/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.

Skills similaires