Skip to content

Scaffold and validate .meta/label-map.json in default readyup kit #416

Description

@williamthorsen

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

  • codeassembly-agents generate label-map generates .meta/label-map.json at the repo root with the canonical type set (including perf, sec, deprecate) and scopes derived from packages/*/
  • Generated file includes a $schema field pointing at the versioned raw GitHub URL
  • Running the command on an existing .meta/label-map.json does not overwrite without --force
  • JSON Schema exists at packages/agents/schemas/label-map.json
  • Default readyup kit includes a presence check for .meta/label-map.json with actionable fix guidance
  • New/modified behavior is covered by tests

Metadata

Metadata

Labels

featureAdded or improved external functionalitytoolingDevelopment tools

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions