Bring back the standalone /plan-eng-review command (GST-2726) (#4375)

Garry, 2026-11-15: people rely on /plan-eng-review, so it returns as its own
command on every host that had it before GST-1698 (#4108). /autoplan's eng
phase is unchanged: external hosts still ship the same methodology beside
gstack-autoplan/SKILL.md, now rendered from the same pass as the standalone
skill, and the Kiro sibling copy and ownership guards from #4108 stay.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
Garry Tanandcapy-ai[bot] authored and GitHub committed 2026-11-15 02:11:18 +00:00
1 parent caa7140eee
commit 8837fda399
82 files changed
+362 -279

No files matched your search

+13 -7
View File
@@ -12,14 +12,20 @@ const SKIP = new Set(['node_modules', '.git', 'dist']);
/**
* Retired skills: no host registers them, and setup removes an earlier
* install's gstack-owned entry. plan-eng-review's source stays as /autoplan's
* eng-phase methodology (GST-1698); external hosts get it beside
* gstack-autoplan/SKILL.md as <name>.md, since Codex and Copilot register every
* nested SKILL.md. investigate was cut after a no-gain eval and its source is
* gone (GST-1717). setup and gstack-relink read the same list from
* GSTACK_RETIRED_SKILLS in bin/gstack-install-registry.sh.
* install's gstack-owned entry. investigate was cut after a no-gain eval and
* its source is gone (GST-1717). setup and gstack-relink read the same list
* from GSTACK_RETIRED_SKILLS in bin/gstack-install-registry.sh.
*/
export const RETIRED_SKILLS = ['plan-eng-review', 'investigate'];
export const RETIRED_SKILLS = ['investigate'];
/**
* Review skills /autoplan reads as a phase methodology from its own directory
* on external hosts: each renders a second time beside gstack-autoplan/SKILL.md
* as <name>.md, so /autoplan's phase does not depend on the standalone skill
* staying installed (GST-1698; the standalone /plan-eng-review returned in
* GST-2726).
*/
export const AUTOPLAN_SIBLING_METHODOLOGIES = ['plan-eng-review'];
/**
* The gstack-on-Capy skills (crew/README.md): registered only on a Capy
+11 -8
View File
@@ -9,7 +9,7 @@
* Used by skill:check and CI freshness checks.
*/
import { discoverTemplates, discoverSectionTemplates, includesSkill, RETIRED_SKILLS } from './discover-skills';
import { discoverTemplates, discoverSectionTemplates, includesSkill, AUTOPLAN_SIBLING_METHODOLOGIES } from './discover-skills';
import { externalSkillName, extractNameAndDescription } from './external-skill-names';
export { extractNameAndDescription } from './external-skill-names';
import { generateLlmsTxt } from './gen-llms-txt';
@@ -755,10 +755,9 @@ function processExternalHost(
const hostConfig = getHostConfig(host);
const name = externalSkillName(skillDir === '.' ? '' : skillDir, frontmatterName);
const retired = RETIRED_SKILLS.includes(skillDir);
// --out-dir mirrors the host tree (outputs only; inputs read from ROOT).
const outputDir = path.join(options.outputRoot, hostConfig.hostSubdir, 'skills', retired ? 'gstack-autoplan' : name);
const outputPath = path.join(outputDir, retired ? `${skillDir}.md` : 'SKILL.md');
const outputDir = path.join(options.outputRoot, hostConfig.hostSubdir, 'skills', name);
const outputPath = path.join(outputDir, 'SKILL.md');
// Guard against symlink loops
let symlinkLoop = false;
@@ -791,7 +790,7 @@ function processExternalHost(
// Config-driven: generate metadata (e.g., openai.yaml for Codex). The
// default_prompt comes from the template's codex_default_prompt: key when set.
const metadata = hostConfig.generation.generateMetadata && !symlinkLoop && !retired ? {
const metadata = hostConfig.generation.generateMetadata && !symlinkLoop ? {
outputPath: path.join(outputDir, 'agents', 'openai.yaml'),
content: generateOpenAIYaml(name, condenseOpenAIShortDescription(extractedDescription), extractCodexDefaultPrompt(tmplContent)),
} : undefined;
@@ -807,7 +806,7 @@ function renderSharedPreamble(ctx: TemplateContext, hostConfig: HostConfig, opti
return GENERATED_HEADER.replace('{{SOURCE}}', 'scripts/resolvers/preamble-hoist.ts') + content;
}
function processTemplate(tmplPath: string, host: Host, options: RenderOptions): { outputPath: string; content: string; symlinkLoop?: boolean; metadata?: { outputPath: string; content: string }; preamble?: { outputPath: string; content: string } } {
function processTemplate(tmplPath: string, host: Host, options: RenderOptions): { outputPath: string; content: string; symlinkLoop?: boolean; metadata?: { outputPath: string; content: string }; preamble?: { outputPath: string; content: string }; autoplanSibling?: string } {
// Normalize to LF at the entry point. Templates may have CRLF on disk when
// checked out on Windows with core.autocrlf=true. Downstream regexes
// (processVoiceTriggers, transformFrontmatter) hardcode \n, so without
@@ -885,10 +884,13 @@ function processTemplate(tmplPath: string, host: Host, options: RenderOptions):
if (skillDir === '' || skillDir === '.') content = omitDisabledSkills(content, [...options.disabledSkills, ...excludedSkillDirs(options.modules)]);
content = rewriteInstallRoot(insertRuntimePreludes(rewriteCarvedSectionRefs(content, ctx), ctx), currentHostConfig, options.installRoot);
const preamble = !(host !== 'claude' && RETIRED_SKILLS.includes(skillDir)) && hoistsPreamble(ctx) && tmplContent.includes('{{PREAMBLE}}') && !effectiveSuppressedResolvers(currentHostConfig, options).has('PREAMBLE')
const preamble = hoistsPreamble(ctx) && tmplContent.includes('{{PREAMBLE}}') && !effectiveSuppressedResolvers(currentHostConfig, options).has('PREAMBLE')
? { outputPath: path.join(path.dirname(outputPath), 'sections', SHARED_PREAMBLE_FILE), content: renderSharedPreamble(ctx, currentHostConfig, options) }
: undefined;
return { outputPath, content, symlinkLoop, metadata, preamble };
const autoplanSibling = host !== 'claude' && AUTOPLAN_SIBLING_METHODOLOGIES.includes(skillDir)
? path.join(options.outputRoot, currentHostConfig.hostSubdir, 'skills', 'gstack-autoplan', `${skillDir}.md`)
: undefined;
return { outputPath, content, symlinkLoop, metadata, preamble, autoplanSibling };
}
/** autoplan/DRIVER.md (field wave item 13): one host-neutral render of autoplan/DRIVER.md.tmpl through the same resolvers. */
@@ -1066,6 +1068,7 @@ export async function runGeneration(settings: GenerationOptions = {}): Promise<G
continue;
}
emit(result.outputPath, result.content, 'skill', host);
if (result.autoplanSibling) emit(result.autoplanSibling, result.content, 'skill', host);
if (result.metadata) emit(result.metadata.outputPath, result.metadata.content, 'metadata', host);
if (result.preamble) emit(result.preamble.outputPath, result.preamble.content, 'preamble', host);
if (skillDir === 'qa') {
+2 -2
View File
@@ -2,7 +2,7 @@ import { toShellPath, type TemplateContext } from './types';
import * as path from 'path';
import { getHostConfig } from '../../hosts';
import { runtimeRootPrelude } from './runtime-root';
import { RETIRED_SKILLS } from '../discover-skills';
import { AUTOPLAN_SIBLING_METHODOLOGIES } from '../discover-skills';
/** Claude's scoped hook enforces the parent publication boundary during /autoplan. */
export function generateAutoplanPublicationHook(ctx: TemplateContext, args?: string[]): string {
@@ -120,7 +120,7 @@ export function generateAutoplanReviewFile(ctx: TemplateContext, args?: string[]
if (ctx.host === 'claude') return `\`${ctx.paths.skillRoot}/${skill}/SKILL.md\``;
const host = getHostConfig(ctx.host);
if (RETIRED_SKILLS.includes(skill)) {
if (AUTOPLAN_SIBLING_METHODOLOGIES.includes(skill)) {
const own = `gstack-autoplan/${skill}.md`;
return `the file \`${skill}.md\` in the installed \`/autoplan\` SKILL.md directory (local: \`${path.posix.dirname(host.localSkillRoot)}/${own}\`; global: \`~/${path.posix.dirname(host.globalRoot)}/${own}\`${ctx.host === 'codex' ? ', or the corresponding skills directory under CODEX_HOME when configured' : ''})`;
}
+2 -2
View File
@@ -58,7 +58,7 @@ and outside_status; retain partial coverage. These details do not clear Eng Revi
**3. Choose the historical verdict.** CLEARED requires the selected Eng Review
to be \`clean\`, within 7 days and fresh under step 2. Otherwise report NOT CLEARED
and its missing, stale or open-issue reason.${ctx.skillName === 'ship' ? ` With no Eng Review record, say "no saved Eng Review: run the \`PERSIST:\` line a read-only eng review printed, or rerun /autoplan" (docs/troubleshooting.md#plan-eng-review-not-persisted).` : ''} If \`skip_eng_review\` is true, show
and its missing, stale or open-issue reason.${ctx.skillName === 'ship' ? ` With no Eng Review record, say "no saved Eng Review: run the \`PERSIST:\` line a read-only /plan-eng-review printed, or rerun it" (docs/troubleshooting.md#plan-eng-review-not-persisted).` : ''} If \`skip_eng_review\` is true, show
"SKIPPED (global)" for Eng Review and CLEARED for this dashboard.
${ctx.skillName === 'ship' ? 'This verdict never skips Step 9 or its finding, approval and convergence gates. Continue Step 1 even when history is NOT CLEARED.' : 'Eng Review is required by default; `gstack-config set skip_eng_review true` disables that requirement.'}
@@ -164,7 +164,7 @@ ${conditionalWrites ? 'Display `clean` as CLEAR and `issues_open` as ISSUES OPEN
|--------|---------|-----|------|--------|----------|
| CEO Review | \\\`/plan-ceo-review\\\` | Scope & strategy | {runs} | {status} | {findings} |
| Outside Review | {recorded provider and trigger} | Independent 2nd opinion | {runs} | {outside_status} | {findings} |
| Eng Review | \\\`${ctx.skillName === 'plan-eng-review' ? '/plan-eng-review' : '/autoplan'}\\\` | Architecture & tests (required) | {runs} | {status} | {findings} |
| Eng Review | \\\`/plan-eng-review\\\` | Architecture & tests (required) | {runs} | {status} | {findings} |
| Design Review | \\\`/plan-design-review\\\` | UI/UX gaps | {runs} | {status} | {findings} |
| DX Review | \\\`/plan-devex-review\\\` | Developer experience gaps | {runs} | {status} | {findings} |
\\\`\\\`\\\`