refactor(#1099): extract runtime artifact conversion module (#1100)

* refactor(#1099): extract runtime artifact conversion module

* docs(#1099): update runtime conversion inventory

* docs(#1099): reconcile runtime conversion inventory count

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Tom Boucher
2026-06-13 10:27:12 -04:00
committed by GitHub
parent f116b76128
commit 89a8f915a4
9 changed files with 2222 additions and 14 deletions

29
src/command-roster.cts Normal file
View File

@@ -0,0 +1,29 @@
'use strict';
/**
* Command Roster Module
*
* Read-only helper for discovering canonical commands/gsd command stems and
* applying the shared GSD slash-command namespace transform.
*/
// eslint-disable-next-line @typescript-eslint/no-require-imports
const slashCommandTransformer = require('../../../scripts/fix-slash-commands.cjs') as {
readCmdNames: () => string[];
transformContentToHyphen: (src: string, cmdNames: string[]) => string;
transformContent: (src: string, cmdNames: string[]) => string;
buildPattern: (cmdNames: string[]) => RegExp | null;
buildColonPattern: (cmdNames: string[]) => RegExp | null;
};
function readGsdCommandNames(): string[] {
return slashCommandTransformer.readCmdNames();
}
export = {
readGsdCommandNames,
transformContentToHyphen: slashCommandTransformer.transformContentToHyphen,
transformContent: slashCommandTransformer.transformContent,
buildPattern: slashCommandTransformer.buildPattern,
buildColonPattern: slashCommandTransformer.buildColonPattern,
};