원클릭으로
debug-parse-failure
Debug a ShellSpec parse failure by identifying ERROR nodes and tracing to grammar rules
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Debug a ShellSpec parse failure by identifying ERROR nodes and tracing to grammar rules
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Add a new ShellSpec grammar rule with tests, following project conventions
Generate parser from grammar.js, run all tests, and verify spec files parse cleanly
Update highlights.scm to cover all grammar rules, detecting missing patterns
Run full pre-release validation - tests, spec parsing, highlight coverage, build
| name | debug-parse-failure |
| description | Debug a ShellSpec parse failure by identifying ERROR nodes and tracing to grammar rules |
Diagnose why a ShellSpec file or snippet doesn't parse correctly.
file (optional): Path to a file that fails to parsesnippet (optional): Inline ShellSpec code to debugParse the file/snippet and identify ERROR nodes:
tree-sitter parse <file> 2>&1
If debugging a snippet, write it to a temp file first.
Locate ERROR nodes: Look for (ERROR) in the AST output. Note:
Identify the grammar rule: Based on the ShellSpec construct that failed:
grammar.jsCheck common causes (from Grammar Gotchas):
"Data:raw" as single token)[ ... ] → $.test_command) not being recognized?_terminated_statement?Test a fix:
grammar.js with the proposed fixnpm run generate && npm test to verify no regressionsVerify broadly: Run the full spec file check:
for f in test/spec/*.sh; do
errors=$(tree-sitter parse "$f" 2>&1 | grep -c ERROR || true)
if [ "$errors" -gt 0 ]; then echo "ERRORS in $f: $errors"; fi
done