Problem
The create-pr and create-ticket skills read .meta/label-map.json to resolve GitHub labels from commit-prefix scope/type. When the file is absent, label resolution is silently skipped — an easy-to-miss failure mode.
Context
- The label map has a fixed structure:
types (commit type → repo label) and scopes (commit scope → repo label)
- The type set is mostly canonical across projects; scopes are derived from
packages/*/ directory names
- Three types (
perf, sec, deprecate) are widely used but not yet in work-types.md — they should be included in the generated output; canonicalizing them in work-types.md is tracked separately
- Consumers:
create-pr skill, create-ticket skill
Solution
1. New CLI command: codeassembly-agents generate label-map
- Reads
packages/*/ directories to derive scope mappings ({dir}: scope:{dir})
- Falls back to an empty scopes section when no
packages/ directory exists
- Uses the canonical type set plus
perf, sec, and deprecate
- Writes
.meta/label-map.json with a $schema field referencing the versioned GitHub raw URL
- Refuses to overwrite without
--force
- Prints the output path to the console
2. JSON Schema: packages/agents/schemas/label-map.json
Standard JSON Schema defining the $schema, types, and scopes structure. Published at github.com/williamthorsen/codeassembly/raw/{version-tag}/packages/agents/schemas/label-map.json.
3. Readyup check
Add a check to .readyup/kits/default.ts that warns when .meta/label-map.json is missing, with a fix hint pointing at the generate label-map command.
Acceptance criteria
Problem
The
create-prandcreate-ticketskills read.meta/label-map.jsonto resolve GitHub labels from commit-prefix scope/type. When the file is absent, label resolution is silently skipped — an easy-to-miss failure mode.Context
types(commit type → repo label) andscopes(commit scope → repo label)packages/*/directory namesperf,sec,deprecate) are widely used but not yet inwork-types.md— they should be included in the generated output; canonicalizing them inwork-types.mdis tracked separatelycreate-prskill,create-ticketskillSolution
1. New CLI command:
codeassembly-agents generate label-mappackages/*/directories to derive scope mappings ({dir}: scope:{dir})packages/directory existsperf,sec, anddeprecate.meta/label-map.jsonwith a$schemafield referencing the versioned GitHub raw URL--force2. JSON Schema:
packages/agents/schemas/label-map.jsonStandard JSON Schema defining the
$schema,types, andscopesstructure. Published atgithub.com/williamthorsen/codeassembly/raw/{version-tag}/packages/agents/schemas/label-map.json.3. Readyup check
Add a check to
.readyup/kits/default.tsthat warns when.meta/label-map.jsonis missing, with a fix hint pointing at thegenerate label-mapcommand.Acceptance criteria
codeassembly-agents generate label-mapgenerates.meta/label-map.jsonat the repo root with the canonical type set (includingperf,sec,deprecate) and scopes derived frompackages/*/$schemafield pointing at the versioned raw GitHub URL.meta/label-map.jsondoes not overwrite without--forcepackages/agents/schemas/label-map.json.meta/label-map.jsonwith actionable fix guidance