feat(sdk): add NON_FAMILY_COMMAND_ALIASES to manifest — 14 missing commands (#3305)
* test(3251): red — assert 14 missing commands in command-aliases.generated.cjs Parametrized test covering all 14 commands from issue #3251. Requires the CJS manifest and asserts structurally (never greps source). Currently fails because NON_FAMILY_COMMAND_ALIASES is not exported and all 14 are missing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(3251): add 14 missing commands to command-aliases.generated.cjs Adds NON_FAMILY_COMMAND_ALIASES export to command-aliases.generated.cjs and extends sdk/src/query/command-manifest.non-family.ts with the 10 commands that were registered in static catalogs but absent from the manifest source-of-truth: - check.decision-coverage-plan / check.decision-coverage-verify - frontmatter.get - phase.mvp-mode - progress.bar - stats.json - task.is-behavior-adding - todo.match-phase - uat.render-checkpoint - workstream.list The other 4 (frontmatter.set, learnings.copy, milestone.complete, requirements.mark-complete) were already in non-family.ts but unexported. Generator (sdk/scripts/gen-command-aliases.ts) now produces both the TS and CJS artifacts including the non-family section, sorted by canonical for determinism. Freshness check (sdk/scripts/check-command-aliases-fresh.mjs) verifies TS and CJS non-family parity against the manifest source-of-truth. Fixes #3251 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(3251): add changeset and CHANGELOG entry for PR #3305 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(gen-command-aliases): preserve TS type interfaces and annotations on regen (#3251) - Add FamilyCommandAlias and NonFamilyCommandAlias interface declarations to tsBody so regen never strips them - Replace JSON.stringify with single-line compact serialisers for TS output (matches committed file format) - Apply typed annotations (readonly FamilyCommandAlias[] / readonly NonFamilyCommandAlias[]) to all exported TS constants - CJS path unchanged: remains untyped pure-JS with JSON.stringify multi-line format - Regenerate sdk/src/query/command-aliases.generated.ts to sync with updated generator Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: drop redundant CHANGELOG.md edit (use .changeset/ fragment per CONTRIBUTING.md) --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* GENERATED FILE — command alias expansion for state.*, verify.*, init.*, phase.*, phases.*, validate.*, and roadmap.* pilots.
|
||||
* Source: sdk/src/query/command-manifest.{state,verify,init,phase,phases,validate,roadmap}.ts
|
||||
* GENERATED FILE — command alias expansion for state.*, verify.*, init.*, phase.*, phases.*, validate.*, roadmap.*, and non-family commands.
|
||||
* Source: sdk/src/query/command-manifest.{state,verify,init,phase,phases,validate,roadmap,non-family}.ts
|
||||
*/
|
||||
|
||||
export interface FamilyCommandAlias {
|
||||
@@ -97,6 +97,55 @@ export const ROADMAP_COMMAND_ALIASES: readonly FamilyCommandAlias[] = [
|
||||
{ canonical: 'roadmap.annotate-dependencies', aliases: ['roadmap annotate-dependencies'], subcommand: 'annotate-dependencies', mutation: true },
|
||||
] as const;
|
||||
|
||||
export interface NonFamilyCommandAlias {
|
||||
canonical: string;
|
||||
aliases: string[];
|
||||
mutation: boolean;
|
||||
}
|
||||
|
||||
export const NON_FAMILY_COMMAND_ALIASES: readonly NonFamilyCommandAlias[] = [
|
||||
{ canonical: 'check-commit', aliases: [], mutation: true },
|
||||
{ canonical: 'check.decision-coverage-plan', aliases: ['check decision-coverage-plan'], mutation: false },
|
||||
{ canonical: 'check.decision-coverage-verify', aliases: ['check decision-coverage-verify'], mutation: false },
|
||||
{ canonical: 'commit', aliases: [], mutation: true },
|
||||
{ canonical: 'commit-to-subrepo', aliases: [], mutation: true },
|
||||
{ canonical: 'config-ensure-section', aliases: [], mutation: true },
|
||||
{ canonical: 'config-new-project', aliases: [], mutation: true },
|
||||
{ canonical: 'config-set', aliases: [], mutation: true },
|
||||
{ canonical: 'config-set-model-profile', aliases: [], mutation: true },
|
||||
{ canonical: 'docs-init', aliases: [], mutation: true },
|
||||
{ canonical: 'frontmatter.get', aliases: [], mutation: false },
|
||||
{ canonical: 'frontmatter.merge', aliases: [], mutation: true },
|
||||
{ canonical: 'frontmatter.set', aliases: [], mutation: true },
|
||||
{ canonical: 'frontmatter.validate', aliases: ['frontmatter validate'], mutation: true },
|
||||
{ canonical: 'generate-claude-md', aliases: [], mutation: true },
|
||||
{ canonical: 'generate-claude-profile', aliases: [], mutation: true },
|
||||
{ canonical: 'generate-dev-preferences', aliases: [], mutation: true },
|
||||
{ canonical: 'intel.patch-meta', aliases: ['intel patch-meta'], mutation: true },
|
||||
{ canonical: 'intel.snapshot', aliases: ['intel snapshot'], mutation: true },
|
||||
{ canonical: 'learnings.copy', aliases: ['learnings copy'], mutation: true },
|
||||
{ canonical: 'learnings.delete', aliases: ['learnings delete'], mutation: true },
|
||||
{ canonical: 'learnings.prune', aliases: ['learnings prune'], mutation: true },
|
||||
{ canonical: 'milestone.complete', aliases: ['milestone complete'], mutation: true },
|
||||
{ canonical: 'phase.mvp-mode', aliases: ['phase mvp-mode'], mutation: false },
|
||||
{ canonical: 'progress.bar', aliases: ['progress bar'], mutation: false },
|
||||
{ canonical: 'requirements.mark-complete', aliases: ['requirements mark-complete'], mutation: true },
|
||||
{ canonical: 'stats.json', aliases: ['stats json'], mutation: false },
|
||||
{ canonical: 'task.is-behavior-adding', aliases: ['task is-behavior-adding'], mutation: false },
|
||||
{ canonical: 'template.fill', aliases: [], mutation: true },
|
||||
{ canonical: 'template.select', aliases: ['template select'], mutation: true },
|
||||
{ canonical: 'todo.complete', aliases: ['todo complete'], mutation: true },
|
||||
{ canonical: 'todo.match-phase', aliases: ['todo match-phase'], mutation: false },
|
||||
{ canonical: 'uat.render-checkpoint', aliases: ['uat render-checkpoint'], mutation: false },
|
||||
{ canonical: 'verify-summary', aliases: ['verify.summary', 'verify summary'], mutation: false },
|
||||
{ canonical: 'workstream.complete', aliases: ['workstream complete'], mutation: true },
|
||||
{ canonical: 'workstream.create', aliases: ['workstream create'], mutation: true },
|
||||
{ canonical: 'workstream.list', aliases: ['workstream list'], mutation: false },
|
||||
{ canonical: 'workstream.progress', aliases: ['workstream progress'], mutation: true },
|
||||
{ canonical: 'workstream.set', aliases: ['workstream set'], mutation: true },
|
||||
{ canonical: 'write-profile', aliases: [], mutation: true },
|
||||
] as const;
|
||||
|
||||
export const STATE_SUBCOMMANDS = new Set<string>(STATE_COMMAND_ALIASES.map((entry) => entry.subcommand));
|
||||
export const VERIFY_SUBCOMMANDS = new Set<string>(VERIFY_COMMAND_ALIASES.map((entry) => entry.subcommand));
|
||||
export const INIT_SUBCOMMANDS = new Set<string>(INIT_COMMAND_ALIASES.map((entry) => entry.subcommand));
|
||||
@@ -104,4 +153,3 @@ export const PHASE_SUBCOMMANDS = new Set<string>(PHASE_COMMAND_ALIASES.map((entr
|
||||
export const PHASES_SUBCOMMANDS = new Set<string>(PHASES_COMMAND_ALIASES.map((entry) => entry.subcommand));
|
||||
export const VALIDATE_SUBCOMMANDS = new Set<string>(VALIDATE_COMMAND_ALIASES.map((entry) => entry.subcommand));
|
||||
export const ROADMAP_SUBCOMMANDS = new Set<string>(ROADMAP_COMMAND_ALIASES.map((entry) => entry.subcommand));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user