no-mistakes(review): Forward onboard text flag

This commit is contained in:
Jeremy McSpadden
2026-07-03 15:28:26 -05:00
committed by Codesmith
parent c9d964243a
commit 64d9f84cf2
3 changed files with 11 additions and 3 deletions

View File

@@ -73,8 +73,8 @@ function routeInitCommand({ init, args, cwd, raw, error }: RouteInitCommandOptio
'new-project': () => init.cmdInitNewProject(cwd, raw),
'new-milestone': () => init.cmdInitNewMilestone(cwd, raw),
onboard: () => {
const namedArgs = parseNamedArgs(args, [], ['fast']);
init.cmdInitOnboard(cwd, raw, { fast: namedArgs['fast'] });
const namedArgs = parseNamedArgs(args, [], ['fast', 'text']);
init.cmdInitOnboard(cwd, raw, { fast: namedArgs['fast'], text: namedArgs['text'] });
},
quick: () => init.cmdInitQuick(cwd, args.slice(2).join(' '), raw),
'ingest-docs': () => init.cmdInitIngestDocs(cwd, raw),

View File

@@ -802,7 +802,7 @@ function cmdInitOnboard(
...buildOnboardProjection(cwd, {
commitDocs: !!config.commit_docs,
fast: options['fast'] === true,
textMode: !!config.text_mode || !!workflowConfig['text_mode'],
textMode: options['text'] === true || !!config.text_mode || !!workflowConfig['text_mode'],
}),
...getInitGitState(cwd),
};

View File

@@ -97,6 +97,14 @@ describe('init onboard public CLI projection', () => {
]);
});
test('forwards the --text flag into the public projection', () => {
const result = runGsdTools(['init', 'onboard', '--text', '--raw'], tmpDir, { HOME: tmpDir });
assert.ok(result.success, `init onboard should succeed: ${result.error}`);
const parsed = JSON.parse(result.output);
assert.strictEqual(parsed.text_mode, true);
});
test('reports complete codebase map and onboarding summary in existing planning', () => {
fs.mkdirSync(path.join(tmpDir, '.planning', 'codebase'), { recursive: true });
for (const name of ['STACK', 'ARCHITECTURE', 'STRUCTURE', 'CONVENTIONS', 'TESTING', 'INTEGRATIONS', 'CONCERNS']) {