diff --git a/hosts/claude.ts b/hosts/claude.ts index b082e2ee..7c563dcb 100644 --- a/hosts/claude.ts +++ b/hosts/claude.ts @@ -38,7 +38,7 @@ const claude: HostConfig = { linkingStrategy: 'real-dir-symlink', }, - coAuthorTrailer: 'Co-Authored-By: Claude Opus 4.6 (1M context) ', + coAuthorTrailer: 'Co-Authored-By: Claude Opus 4.6 ', learningsMode: 'full', }; diff --git a/hosts/codex.ts b/hosts/codex.ts index dc04f736..cf60742f 100644 --- a/hosts/codex.ts +++ b/hosts/codex.ts @@ -32,12 +32,11 @@ const codex: HostConfig = { ], suppressedResolvers: [ - 'DESIGN_OUTSIDE_VOICES', - 'ADVERSARIAL_STEP', - 'SPEC_REVIEW_LOOP', - 'PLAN_VERIFICATION_EXEC', - 'CODEX_SECOND_OPINION', - 'REVIEW_ARMY', + 'DESIGN_OUTSIDE_VOICES', // design.ts:485 — Codex can't invoke itself + 'ADVERSARIAL_STEP', // review.ts:408 — Codex can't invoke itself + 'CODEX_SECOND_OPINION', // review.ts:257 — Codex can't invoke itself + 'CODEX_PLAN_REVIEW', // review.ts:541 — Codex can't invoke itself + 'REVIEW_ARMY', // review-army.ts:180 — Codex shouldn't orchestrate ], runtimeRoot: { diff --git a/scripts/gen-skill-docs.ts b/scripts/gen-skill-docs.ts index f6730729..3ecd9d56 100644 --- a/scripts/gen-skill-docs.ts +++ b/scripts/gen-skill-docs.ts @@ -437,10 +437,14 @@ function processTemplate(tmplPath: string, host: Host = 'claude'): { outputPath: const ctx: TemplateContext = { skillName, tmplPath, benefitsFrom, host, paths: HOST_PATHS[host], preambleTier }; // Replace placeholders (supports parameterized: {{NAME:arg1:arg2}}) + // Config-driven: suppressedResolvers return empty string for this host + const currentHostConfig = getHostConfig(host); + const suppressed = new Set(currentHostConfig.suppressedResolvers || []); let content = tmplContent.replace(/\{\{(\w+(?::[^}]+)?)\}\}/g, (match, fullKey) => { const parts = fullKey.split(':'); const resolverName = parts[0]; const args = parts.slice(1); + if (suppressed.has(resolverName)) return ''; const resolver = RESOLVERS[resolverName]; if (!resolver) throw new Error(`Unknown placeholder {{${resolverName}}} in ${relTmplPath}`); return args.length > 0 ? resolver(ctx, args) : resolver(ctx); diff --git a/scripts/resolvers/preamble.ts b/scripts/resolvers/preamble.ts index 49288500..ff5dc8ad 100644 --- a/scripts/resolvers/preamble.ts +++ b/scripts/resolvers/preamble.ts @@ -1,4 +1,5 @@ import type { TemplateContext } from './types'; +import { getHostConfig } from '../../hosts/index'; /** * Preamble architecture — why every skill needs this @@ -13,10 +14,10 @@ import type { TemplateContext } from './types'; */ function generatePreambleBash(ctx: TemplateContext): string { - const hostConfigDir: Record = { codex: '.codex', factory: '.factory' }; - const runtimeRoot = (ctx.host !== 'claude') + const hostConfig = getHostConfig(ctx.host); + const runtimeRoot = hostConfig.usesEnvVars ? `_ROOT=$(git rev-parse --show-toplevel 2>/dev/null) -GSTACK_ROOT="$HOME/${hostConfigDir[ctx.host]}/skills/gstack" +GSTACK_ROOT="$HOME/${hostConfig.globalRoot}" [ -n "$_ROOT" ] && [ -d "$_ROOT/${ctx.paths.localSkillRoot}" ] && GSTACK_ROOT="$_ROOT/${ctx.paths.localSkillRoot}" GSTACK_BIN="$GSTACK_ROOT/bin" GSTACK_BROWSE="$GSTACK_ROOT/browse/dist" diff --git a/scripts/resolvers/utility.ts b/scripts/resolvers/utility.ts index e6167d02..c3e6d690 100644 --- a/scripts/resolvers/utility.ts +++ b/scripts/resolvers/utility.ts @@ -367,13 +367,9 @@ Minimum 0 per category. } export function generateCoAuthorTrailer(ctx: TemplateContext): string { - if (ctx.host === 'codex') { - return 'Co-Authored-By: OpenAI Codex '; - } - if (ctx.host === 'factory') { - return 'Co-Authored-By: Factory Droid '; - } - return 'Co-Authored-By: Claude Opus 4.6 '; + const { getHostConfig } = require('../../hosts/index'); + const hostConfig = getHostConfig(ctx.host); + return hostConfig.coAuthorTrailer || 'Co-Authored-By: Claude Opus 4.6 '; } export function generateChangelogWorkflow(_ctx: TemplateContext): string {