Component: crates/core (parser.rs) + SPEC.md | Severity: Low-Medium | Status: Code-traced (unit-replicable)
SPEC §Quoting claims "POSIX shell quoting rules (shlex)" and §Inline Comments claims a # inside a quoted field is never a comment. The implementation:
- Only double quotes are recognized; single-quoted fields keep their quotes (then fail name validation or become literal path chars).
strip_inline_comment runs AFTER quotes are stripped and drops any field that starts with # - so local skill x "#drafts/skill.md" loses the path field (treated as a comment), violating the SPEC rule.
- SPEC's own example line
local skill "my skills/git commit.md" is rejected at parse time: the inferred name "git commit" contains a space → "invalid name … skipping". The spec example cannot work as written (explicit-name variants do).
Where: crates/core/src/parser.rs:53-71 (split_line), :73-79 (strip_inline_comment), :36-41 + :342-359 (name validation applied to the inferred spaced name); SPEC.md §Quoting/§Inline Comments/§Local example.
Repro (unit): parse_manifest_line("local skill \"#drafts/skill.md\"") → None/too-few-fields; parse_manifest over SPEC's example line → 0 entries + invalid-name warning.
Expected: parser and SPEC agree - either implement quote-aware comment stripping (track quoted-ness per token) + document "double quotes only", and fix the SPEC example to use an explicit name; or implement the documented shlex behavior.
Actual: three silent divergences.
Fix sketch: carry a was_quoted flag per token out of split_line; strip_inline_comment skips quoted tokens. Update SPEC (single quotes unsupported; example gains an explicit name, since spaced names are invalid by the name rule).
Tests: unit in parser.rs: quoted-# field preserved; SPEC example line parses (after SPEC correction, with explicit name); single-quote behavior documented by a test either way.
Component:
crates/core(parser.rs) + SPEC.md | Severity: Low-Medium | Status: Code-traced (unit-replicable)SPEC §Quoting claims "POSIX shell quoting rules (shlex)" and §Inline Comments claims a
#inside a quoted field is never a comment. The implementation:strip_inline_commentruns AFTER quotes are stripped and drops any field that starts with#- solocal skill x "#drafts/skill.md"loses the path field (treated as a comment), violating the SPEC rule.local skill "my skills/git commit.md"is rejected at parse time: the inferred name "git commit" contains a space → "invalid name … skipping". The spec example cannot work as written (explicit-name variants do).Where:
crates/core/src/parser.rs:53-71(split_line),:73-79(strip_inline_comment),:36-41+:342-359(name validation applied to the inferred spaced name); SPEC.md §Quoting/§Inline Comments/§Local example.Repro (unit):
parse_manifest_line("local skill \"#drafts/skill.md\"")→ None/too-few-fields;parse_manifestover SPEC's example line → 0 entries + invalid-name warning.Expected: parser and SPEC agree - either implement quote-aware comment stripping (track quoted-ness per token) + document "double quotes only", and fix the SPEC example to use an explicit name; or implement the documented shlex behavior.
Actual: three silent divergences.
Fix sketch: carry a
was_quotedflag per token out ofsplit_line;strip_inline_commentskips quoted tokens. Update SPEC (single quotes unsupported; example gains an explicit name, since spaced names are invalid by the name rule).Tests: unit in
parser.rs: quoted-#field preserved; SPEC example line parses (after SPEC correction, with explicit name); single-quote behavior documented by a test either way.