fix: quote debug command argument-hint (#3435)

* test: add debug command YAML regression (#3431)

* fix: quote debug command argument-hint (#3431)

* docs: add changeset for #3431

* docs: set changeset pr for #3431

* test: parse debug frontmatter via shared helper
This commit is contained in:
Tom Boucher
2026-05-12 18:50:19 -04:00
committed by GitHub
parent c8efbe5382
commit 29b3e470f0
3 changed files with 34 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
type: Fixed
pr: 3435
---
**`/gsd-debug` command metadata now parses as valid YAML** — external YAML tooling and command-contract validation no longer fail on the unquoted argument hint.

View File

@@ -1,7 +1,7 @@
---
name: gsd:debug
description: Systematic debugging with persistent state across context resets
argument-hint: [list | status <slug> | continue <slug> | --diagnose] [issue description]
argument-hint: "[list | status <slug> | continue <slug> | --diagnose] [issue description]"
allowed-tools:
- Read
- Write

View File

@@ -0,0 +1,28 @@
// allow-test-rule: source-text-is-the-product
// Command markdown frontmatter is the deployed contract; this regression test
// verifies the real YAML surface that external parsers consume.
'use strict';
const { test } = require('node:test');
const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const { parseFrontmatter } = require('./helpers.cjs');
const DEBUG_COMMAND_PATH = path.join(__dirname, '..', 'commands', 'gsd', 'debug.md');
function readFrontmatter(filePath) {
return parseFrontmatter(fs.readFileSync(filePath, 'utf8'));
}
test('#3431: commands/gsd/debug.md frontmatter parses as YAML and preserves argument-hint', () => {
const frontmatter = readFrontmatter(DEBUG_COMMAND_PATH);
assert.equal(frontmatter.name, 'gsd:debug');
assert.equal(
frontmatter['argument-hint'],
'[list | status <slug> | continue <slug> | --diagnose] [issue description]',
'argument-hint should remain user-visible text after YAML parsing'
);
});