AUR-559: prompt and skills without language names in Go
Design
grammar.ProvidergainsIsComment(lang, line) (isComment, ok bool). The runtime adapter (internal/grammar/comment.go) parses the line with the named grammar and reports a comment when a node whose type containscomment(tree-sitter vocabulary shared by every grammar) starts at the first non-blank byte and reaches the end of the line.ok == falsemeans the runtime has no such grammar.internal/grammar/catalog/aliases.yml(embedded,version+aliasessection) maps selector spellings to the runtime's canonical grammar names. Canonical names are never listed: they come fromProvider.Languages().LoadAliases(provider, policyRoot)is strict (unknown keys, or an alias whose target is not a grammar of the runtime, are load errors). A central policy overrides with.aurumcode/grammar/aliases.yml; itsaliasessection replaces the embedded one.internal/prompt/commentfilter.go:isCommentLine(provider, line, language)has no language knowledge. A language without grammar is never a comment (no filter) andCommentFilterNoticeappends a declared notice to the change-scope paragraph (ChangeScopeWith, used byReviewChangeScope).HasSubstantiveCodeChangekeeps its signature and delegates toHasSubstantiveCodeChangeWith(diff, provider).internal/context/skills/languages.go:Languagesresolves the file's language throughProvider.Detectand selector names through the alias catalog.Set.SelectWithreturnsSelection{Skills, Warnings}; an unknown language in a selector produces a warning thatProvider.Providerenders as a### Skill selection warningsblock.Set.Selectkeeps its signature.
Compatibility
- Behavior change (intended): the old fallback "
//,/*,*/is a comment" is gone. A line is a comment only if the grammar parses it as one, so a bare block-comment continuation line (* text) in a multi-line hunk is no longer filtered (a single line cannot be classified without its block context). Files without grammar get no filter, plus the notice. - Selector spellings that were accepted as raw file extensions now work only
when listed in the alias catalog (the shipped catalog covers the common ones);
anything else is declared as unknown instead of ignored.
shellis an alias of the runtime'sbash. analyzer's language_catalog.yml is untouched.
Acceptance
bash tests/acceptance/AUR-559.sh all: AC-001 (go/ast scan with the forbidden
name list kept in the script), AC-002..AC-004 (tests), AC-003-MUT-001. Unknown
selector exits 64.
Limits
Single-line classification only; no new grammars.