You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The label-map.json schema currently lives at packages/agents/schemas/label-map.json in this repo, and generated label-map.json files reference it via https://github.com/williamthorsen/codeassembly/raw/agents-v0.1.0/packages/agents/schemas/label-map.json. The schema is minimal and generically useful — nothing about it is agent-specific. Its natural owner is @williamthorsen/release-kit, which already owns .github/labels.yaml (the canonical label declaration) and ships its schemas at stable, semver-tagged URLs.
This ticket migrates codeassembly to consume the release-kit-hosted schema and removes the local copy.
Context
Companion ticket williamthorsen/node-monorepo-tools#322 is shipped: release-kit v5.1.0 publishes the schema at https://github.com/williamthorsen/node-monorepo-tools/raw/release-kit-v{version}/packages/release-kit/schemas/label-map.json.
Release-kit v5.1.0 also renamed the utility label to internal. Codeassembly's generator still emits internal: utility. The rename rides along with this ticket because regenerating .meta/label-map.json after the release-kit bump must produce values that exist in .github/labels.yaml, and that file will declare internal (not utility) once it's regenerated against the v5.1.0 preset.
Old $schema URLs in any external repo that pinned raw/agents-v0.1.0/... continue to resolve — that URL points at an immutable tag. Deleting packages/agents/schemas/label-map.json from main only affects future regenerations from this repo's generator, not historical references.
In packages/agents/src/commands/generate-label-map.ts:
Replace buildSchemaUrl() so it emits https://github.com/williamthorsen/node-monorepo-tools/raw/release-kit-v{version}/packages/release-kit/schemas/label-map.json, where {version} is the installed release-kit version (read at runtime from node_modules/@williamthorsen/release-kit/package.json, mirroring the existing pattern of reading the agents version from its own package.json).
Update TYPE_MAP['internal'] from 'utility' to 'internal'.
Update tests in packages/agents/src/commands/__tests__/generate-label-map.test.ts to reflect the new URL pattern and the renamed label.
Regenerate .meta/label-map.json in this repo (codeassembly-agents generate label-map --force).
Delete packages/agents/schemas/label-map.json.
Verify no remaining references to the codeassembly schema URL pattern in the codebase.
Optionally regenerate .meta/label-map.json in other repos under our ownership for consistency. Their existing files continue to validate against the immutable tag URL, so this is a clean-up nicety, not a fix.
Acceptance criteria
generate-label-map.ts:buildSchemaUrl() emits a release-kit-v{installed-version} URL pointing at the release-kit schema path.
TYPE_MAP['internal'] is 'internal' (not 'utility').
.meta/label-map.json in this repo is regenerated: $schema references the new release-kit URL; types.internal is 'internal'.
packages/agents/schemas/label-map.json is removed.
No remaining references in this repo to the codeassembly schema URL pattern (grep -rn "codeassembly.*label-map.json" returns nothing).
Tests in generate-label-map.test.ts updated to reflect the new URL pattern and the renamed label.
Documentation referencing the old URL or the local schema file is updated.
Other repos under our ownership are audited for .meta/label-map.json files; regenerate where present for consistency, or note absent.
Problem
The
label-map.jsonschema currently lives atpackages/agents/schemas/label-map.jsonin this repo, and generatedlabel-map.jsonfiles reference it viahttps://github.com/williamthorsen/codeassembly/raw/agents-v0.1.0/packages/agents/schemas/label-map.json. The schema is minimal and generically useful — nothing about it is agent-specific. Its natural owner is@williamthorsen/release-kit, which already owns.github/labels.yaml(the canonical label declaration) and ships its schemas at stable, semver-tagged URLs.This ticket migrates codeassembly to consume the release-kit-hosted schema and removes the local copy.
Context
v5.1.0publishes the schema athttps://github.com/williamthorsen/node-monorepo-tools/raw/release-kit-v{version}/packages/release-kit/schemas/label-map.json.v5.1.0also renamed theutilitylabel tointernal. Codeassembly's generator still emitsinternal: utility. The rename rides along with this ticket because regenerating.meta/label-map.jsonafter the release-kit bump must produce values that exist in.github/labels.yaml, and that file will declareinternal(notutility) once it's regenerated against the v5.1.0 preset.$schemaURLs in any external repo that pinnedraw/agents-v0.1.0/...continue to resolve — that URL points at an immutable tag. Deletingpackages/agents/schemas/label-map.jsonfrommainonly affects future regenerations from this repo's generator, not historical references..meta/label-map.jsonand.github/labels.yaml(the original concern of #418) is being handled by #505 — explicitly out of scope here. This ticket does not close#418; Validate.meta/label-map.jsonlabel values against.github/labels.yamlat generate-time #505 does.Solution
In
packages/agents/src/commands/generate-label-map.ts:buildSchemaUrl()so it emitshttps://github.com/williamthorsen/node-monorepo-tools/raw/release-kit-v{version}/packages/release-kit/schemas/label-map.json, where{version}is the installed release-kit version (read at runtime fromnode_modules/@williamthorsen/release-kit/package.json, mirroring the existing pattern of reading the agents version from its ownpackage.json).TYPE_MAP['internal']from'utility'to'internal'.Update tests in
packages/agents/src/commands/__tests__/generate-label-map.test.tsto reflect the new URL pattern and the renamed label.Regenerate
.meta/label-map.jsonin this repo (codeassembly-agents generate label-map --force).Delete
packages/agents/schemas/label-map.json.Verify no remaining references to the codeassembly schema URL pattern in the codebase.
Optionally regenerate
.meta/label-map.jsonin other repos under our ownership for consistency. Their existing files continue to validate against the immutable tag URL, so this is a clean-up nicety, not a fix.Acceptance criteria
generate-label-map.ts:buildSchemaUrl()emits arelease-kit-v{installed-version}URL pointing at the release-kit schema path.TYPE_MAP['internal']is'internal'(not'utility')..meta/label-map.jsonin this repo is regenerated:$schemareferences the new release-kit URL;types.internalis'internal'.packages/agents/schemas/label-map.jsonis removed.grep -rn "codeassembly.*label-map.json"returns nothing).generate-label-map.test.tsupdated to reflect the new URL pattern and the renamed label..meta/label-map.jsonfiles; regenerate where present for consistency, or note absent.