mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-08 06:26:45 +02:00
refactor: extract processExternalHost() shared helper for multi-host generation
Refactor the Codex-specific output routing block in gen-skill-docs.ts into a shared processExternalHost() function. Both Codex and future external hosts (Factory Droid) will use this helper for output routing, symlink loop detection, frontmatter transformation, path rewrites, and metadata generation. - Rename codexSkillName() to externalSkillName() everywhere - Extract ExternalHostConfig interface with per-host settings - Codex output is byte-identical (verified via --dry-run) - Skip /codex skill for all non-Claude hosts (not just codex) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -61,7 +61,8 @@ policy:
|
||||
`;
|
||||
}
|
||||
|
||||
export function codexSkillName(skillDir: string): string {
|
||||
/** Compute skill name for external hosts (Codex, Factory, etc.) */
|
||||
export function externalSkillName(skillDir: string): string {
|
||||
if (skillDir === '.' || skillDir === '') return 'gstack';
|
||||
// Don't double-prefix: gstack-upgrade → gstack-upgrade (not gstack-gstack-upgrade)
|
||||
if (skillDir.startsWith('gstack-')) return skillDir;
|
||||
|
||||
Reference in New Issue
Block a user