Skip to content

fix(commands): quote argument-hint values for Copilot CLI 1.0.65 YAML parser - #128

Closed
thejesh23 wants to merge 1 commit into
lis186:mainfrom
thejesh23:fix/copilot-cli-1.0.65-argument-hint-string
Closed

thejesh23 wants to merge 1 commit into
lis186:mainfrom
thejesh23:fix/copilot-cli-1.0.65-argument-hint-string

Conversation

@thejesh23

@thejesh23 thejesh23 commented Jul 3, 2026 •

Copy link
Copy Markdown

Description

Copilot CLI 1.0.65 tightened frontmatter parsing so that argument-hint must be a YAML string. The current command files declare values in two shapes that no longer parse cleanly:

  1. Flow-sequence shape (9 files): values start with an unquoted [, so YAML parses them as arrays rather than strings.
    argument-hint: [target, e.g., "react 17 → 18", "iOS 16", "lodash"] [--force]
  2. Mapping-value shape (2 files): values contain [target: overview|patterns|...] where the bare : inside the flow node causes YAML to raise mapping values are not allowed here.
    argument-hint: (optional) [target: overview|patterns|flows|history|impact|deps]

Both forms happen to work under looser parsers used by earlier tool versions but fail hard under the new contract.

Related Issue

No open issue in this repo. Cross-references:

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Changes Made

  • Wrap 9 argument-hint values that start with [ in single quotes (values contain double-quoted examples like "react", so single quotes avoid escaping):
    • .claude/commands/atlas.pattern.md
    • .claude/commands/atlas.flow.md
    • .claude/commands/atlas.deps.md
    • .claude/commands/atlas.impact.md
    • .claude/commands/atlas.overview.md
    • plugin/commands/pattern/SKILL.md
    • plugin/commands/flow/SKILL.md
    • plugin/commands/deps/SKILL.md
    • plugin/commands/impact/SKILL.md
  • Wrap 2 argument-hint values containing [target: overview|...] in double quotes to escape the bare : that YAML would otherwise treat as a mapping separator:
    • .claude/commands/atlas.reset.md
    • plugin/commands/reset/SKILL.md
  • Total: 11 files, 11 lines changed. No functional behavior change — the rendered hint text and displayed characters are identical.

The 3 other command files already had correct string forms (plugin/commands/overview/SKILL.md was already double-quoted; the history files start with (optional) which YAML parses as a scalar and were not affected by either failure mode).

Testing

Verified every argument-hint value parses as a YAML string with yaml.safe_load on the frontmatter block for all 14 command files (7 under .claude/commands/, 7 under plugin/commands/*/SKILL.md). All 14 now report type=str; the 2 reset files previously raised mapping values are not allowed here and the 9 array-form files previously parsed as list.

  • Tested on macOS
  • Tested on Linux
  • Tested with iOS/Swift project
  • Tested with TypeScript project
  • Tested with Python project

The change is a pure YAML-quoting fix in frontmatter; the underlying analysis flows are untouched, so platform matrix testing is not applicable.

Checklist

  • My code follows the project's style guidelines (frontmatter-only edit, fix(scope): ... conventional commit)
  • I have updated the documentation accordingly (no docs affected; PRD.md and dev-notes/archives/* contain the same syntax in fenced code blocks documenting historical designs — left untouched to preserve historical accuracy)
  • I have added comments where necessary (none needed; one-line quoting change)
  • My changes generate no new warnings
  • I have tested my changes locally (YAML round-trip verification)

Screenshots (if applicable)

n/a

… parser

Copilot CLI 1.0.65 tightened frontmatter parsing to require argument-hint
to be a YAML string. Unquoted values starting with '[' were previously
parsed as YAML flow sequences (arrays), and values containing bare ':'
inside brackets triggered "mapping values are not allowed here" errors.

Wrap all affected argument-hint values in explicit YAML quotes:
- 9 files with unquoted '[' start: wrap in single quotes (values contain
  double-quoted examples, so single quotes avoid escaping)
- 2 reset commands with '[target: overview|...]': wrap in double quotes
  to escape the ':' that would otherwise be read as a mapping separator

Latent under prior parsers; surfaces as a hard error under Copilot CLI
1.0.65 and matches the tightened Claude Code frontmatter contract
tracked in anthropics/claude-code#22161.
@thejesh23

Copy link
Copy Markdown
Author

Tracking issue: #129 — captures the bug diagnosis and reproducer separately for anyone searching the repo who lands there before this PR.

lis186 added a commit that referenced this pull request Oct 21, 2026
)

* ci: add frontmatter lint workflow (Tier 1)

Parses YAML frontmatter of plugin/commands/*/SKILL.md, plugin/skills/*/SKILL.md and .claude/commands/*.md; fails on parse errors, non-string argument-hint, missing name/description. Refs #129.

* ci(lint): only treat column-0 --- as frontmatter delimiter
@lis186 lis186 closed this Oct 21, 2026
@lis186 lis186 reopened this Oct 21, 2026
lis186 added a commit that referenced this pull request Oct 22, 2026
…137)

* ci: add frontmatter lint workflow (expected red until #128 merges) (#134)

* ci: add frontmatter lint workflow (Tier 1)

Parses YAML frontmatter of plugin/commands/*/SKILL.md, plugin/skills/*/SKILL.md and .claude/commands/*.md; fails on parse errors, non-string argument-hint, missing name/description. Refs #129.

* ci(lint): only treat column-0 --- as frontmatter delimiter

(cherry picked from commit e3c7d6c)

* ci: also run verify on push to feature/skill-slim
lis186 added a commit that referenced this pull request Oct 22, 2026
Same fix as #128: unquoted argument-hint values starting with [ or
containing ': ' are not valid YAML strings, so Copilot CLI 1.0.65+ fails
to load deps/flow/impact/reset. Only the argument-hint line changes in
each file; hint text is unchanged.
@thejesh23 thejesh23 closed this Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants