Skip to main content
Glama

Clarify Spec

vdd_clarify
Destructive

Resolves unresolved [NEEDS CLARIFICATION] markers in an existing spec, replaces [e.g.] placeholders with concrete values, and adds edge-case acceptance criteria. Run after vdd_specify when a spec has unresolved markers.

Instructions

VDD Phase 4b: Clarify an existing spec in place — resolves every [NEEDS CLARIFICATION] marker, replaces [e.g.] placeholders with concrete values, and adds edge-case acceptance criteria (AC-E*). Mutates vdd/specs//spec.md. Pass feature (spec directory name). Run after vdd_specify when a spec has unresolved markers; to author a brand-new spec use vdd_specify instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
featureYesFeature name (spec directory name)
projectRootNoProject root: directory that constitution.md and the vdd/ folder are written to and resolved against (default ".").

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
_sdtYesStrategy-and-Tactic instructions for the next step
errorNoError message when the phase fails
_phaseYesVDD phase that produced this result
outputNoAdditional structured phase output
successYesWhether the phase completed successfully
artifactNoPrimary artifact produced or returned
gateResultNoQuality-gate result, when the phase runs a gate

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.3
    • changedInput schema / properties / projectRoot / description
      Previous value: -"Path to project root directory"New value: +"Project root: directory that constitution.md and the vdd/ folder are written to and resolved against (default \".\")"
  2. Changed1 schema field changedv0.1.2
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "_phase": {
      +      "description": "VDD phase that produced this result",
      +      "type": "string"
      +    },
      +    "_sdt": {
      +      "description": "Strategy-and-Tactic instructions for the next step",
      +      "type": "string"
      +    },
      +    "artifact": {
      +      "description": "Primary artifact produced or returned",
      +      "type": "string"
      +    },
      +    "error": {
      +      "description": "Error message when the phase fails",
      +      "type": "string"
      +    },
      +    "gateResult": {
      +      "additionalProperties": false,
      +      "description": "Quality-gate result, when the phase runs a gate",
      +      "properties": {
      +        "checks": {
      +          "description": "Number of checks run",
      +          "type": "number"
      +        },
      +        "passed": {
      +          "description": "Whether the quality gate passed",
      +          "type": "boolean"
      +        },
      +        "total": {
      +          "description": "Total number of checks",
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "passed",
      +        "checks",
      +        "total"
      +      ],
      +      "type": "object"
      +    },
      +    "output": {
      +      "additionalProperties": {},
      +      "description": "Additional structured phase output",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "success": {
      +      "description": "Whether the phase completed successfully",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success",
      +    "_phase",
      +    "_sdt"
      +  ],
      +  "type": "object"
      +}
  3. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare destructiveHint: true, and the description aligns by stating 'Mutates vdd/specs/<feature>/spec.md'. Beyond that, it details exactly what changes occur (resolving markers, replacing placeholders, adding AC-E*), providing behavioral context beyond the annotation alone. It does not describe side effects like reverting or rollback, but the destructive flag plus the mutation specifics are sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is longer than one sentence but every clause contributes: it opens with the purpose, then details the mutations, then the resource path, and finally usage guidance. It is front-loaded with the core action and does not waste words, though it could be tightened by removing the redundant schema echo of 'feature'.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description need not explain return values. It covers the purpose, the mutation target, the exact changes, and the usage workflow, giving an agent everything needed to decide when to invoke and what to expect. It does not mention any prerequisites beyond having an existing spec, but that is implied by 'existing spec' and the sibling guidance.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%: both feature and projectRoot have descriptions. The description merely repeats 'Pass feature (spec directory name)', which is already in the schema, adding no new semantic information. Since the schema fully documents the parameters, the baseline of 3 is appropriate; the description does not elevate it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Clarify an existing spec in place') and a clear resource (vdd/specs/<feature>/spec.md), enumerating concrete actions: resolving [NEEDS CLARIFICATION] markers, replacing [e.g.] placeholders, and adding AC-E* criteria. It explicitly distinguishes itself from the sibling vdd_specify by directing new specs to that tool, eliminating ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit when-to-use guidance ('Run after vdd_specify when a spec has unresolved markers') and when-not-to-use with an alternative ('to author a brand-new spec use vdd_specify instead'). This fully orients an agent on the correct invocation context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.