os-aidd-lint: harden new skill cops — Document#artifact_type unit tests, YAML-aware allowed-tools parsing #178
Labels
No labels
P0
P1
P2
P3
bug
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#178
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-ups from the 2026-07-30 cop implementation: artifact_type covered only via cop-level tests; BroadAllowedTools uses substring matching, not YAML flow-list parsing.
Problem:
Document#artifact_type(plugins/os-aidd-lint/lib/aidd_lint/document.rb:38-46) returns one of:skill, :claude_md, :agent, :reference, :prompt, :otherand is only exercised indirectly via cop tests; no dedicated unit test enumerates all six branches.BroadAllowedTools(plugins/os-aidd-lint/lib/aidd_lint/cops/broad_allowed_tools.rb:12,26-27) matchesBARE_BASHagainstfrontmatter.top_level_value('allowed-tools').to_s, a raw string — a YAML flow list likeallowed-tools: [Bash(git status:*), Read]is stringified and substring-matched, not parsed, so a scopedBash(...)entry inside a list can still false-positive/negative depending on formatting.Solution: Add
tests/document_test.rb(or extend existing) assertingartifact_typefor one fixture per basename/path pattern (SKILL.md, CLAUDE.md, agents/.md, references/.md, prompts/*.md, other). For BroadAllowedTools, parseallowed-toolsas YAML (flow or block list) and check each entry for a bareBash/Bash(*)token instead of substring-matching the joined string.Examples: Must still flag
allowed-tools: Bash. Must NOT flagallowed-tools: [Bash(git status:*), Read]once YAML-parsed per-entry (current substring match may already handle this case correctly by accident — verify via fixture, don't assume).Implemented via os-sdlc pipeline (test-writer -> red -> programmer -> green -> ac-lint -> lint -> reviewer APPROVE). Merged to main in
d180310.