From 64d9f84cf273dfeec938ee74dc80fc3fc122a78f Mon Sep 17 00:00:00 2001 From: Jeremy McSpadden Date: Fri, 3 Jul 2026 15:28:26 -0500 Subject: [PATCH] no-mistakes(review): Forward onboard text flag --- src/init-command-router.cts | 4 ++-- src/init.cts | 2 +- tests/onboard-command.test.cjs | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/init-command-router.cts b/src/init-command-router.cts index 90e09e2e6..6ea4b4dac 100644 --- a/src/init-command-router.cts +++ b/src/init-command-router.cts @@ -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), diff --git a/src/init.cts b/src/init.cts index 5c781ba25..19d8e6f1c 100644 --- a/src/init.cts +++ b/src/init.cts @@ -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), }; diff --git a/tests/onboard-command.test.cjs b/tests/onboard-command.test.cjs index 762068b74..4904e18c2 100644 --- a/tests/onboard-command.test.cjs +++ b/tests/onboard-command.test.cjs @@ -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']) {