Summary
Add a generic, namespaced categorical-tag query to skern skill list. skern already filters on flat --tag (exact
match); this adds tags of the form category:value, so a caller can narrow a skill set by structured dimensions
without skern knowing what any category means. Fully domain-agnostic. (How untagged skills are treated and how
multiple flags combine are deliberate design questions — see below.)
Scope
- New repeatable
--category category:value flag on skern skill list, with a matcher beside hasTag in
internal/cli/skill_helpers.go.
- Category-agnostic: split each tag on the first
: to derive its namespace; never enumerate or special-case
known categories.
- Base match: for a requested category, a skill matches if it carries
category:value. How a skill with no tag
in that category is treated is a design question (below), not assumed here.
- Keep the existing
--tag flag unchanged. Add --json contract coverage. Touches internal/cli/skill_list.go,
internal/cli/skill_helpers.go, and tests.
Open design questions (settle before implementation)
Two semantics decisions shape the flag surface and the matcher:
1. Untagged / category-absent handling. When a skill has no tag in a requested category, does it match
("absent = applies to all") or not — and is that the default, or opt-in behind a flag (e.g. --include-untagged,
vs a stricter default)? This changes the base matcher.
2. Combination of multiple flags.
- Multiple values in the same category (e.g.
--category lang:python --category lang:go) — OR within the category
(match if the skill has any requested value)? This is the likely-needed narrowing case.
- Multiple distinct categories (e.g.
--category lang:python --category topic:testing) — AND across categories
(the skill must satisfy each)?
- A natural model is OR within a category, AND across categories. Confirm, and decide the flag shape: repeated
--category cat:val, a comma list cat:a,b, or both.
Acceptance criteria
Dependencies
None to build.
Summary
Add a generic, namespaced categorical-tag query to
skern skill list. skern already filters on flat--tag(exactmatch); this adds tags of the form
category:value, so a caller can narrow a skill set by structured dimensionswithout skern knowing what any category means. Fully domain-agnostic. (How untagged skills are treated and how
multiple flags combine are deliberate design questions — see below.)
Scope
--category category:valueflag onskern skill list, with a matcher besidehasTagininternal/cli/skill_helpers.go.:to derive its namespace; never enumerate or special-caseknown categories.
category:value. How a skill with no tagin that category is treated is a design question (below), not assumed here.
--tagflag unchanged. Add--jsoncontract coverage. Touchesinternal/cli/skill_list.go,internal/cli/skill_helpers.go, and tests.Open design questions (settle before implementation)
Two semantics decisions shape the flag surface and the matcher:
1. Untagged / category-absent handling. When a skill has no tag in a requested category, does it match
("absent = applies to all") or not — and is that the default, or opt-in behind a flag (e.g.
--include-untagged,vs a stricter default)? This changes the base matcher.
2. Combination of multiple flags.
--category lang:python --category lang:go) — OR within the category(match if the skill has any requested value)? This is the likely-needed narrowing case.
--category lang:python --category topic:testing) — AND across categories(the skill must satisfy each)?
--category cat:val, a comma listcat:a,b, or both.Acceptance criteria
skern skill list --category <…> --jsonapplies the agreed combination + untagged-handling semantics.--jsoncontract covered; passes the manual-test-verification gate.Dependencies
None to build.