fix: align new-project map gate and guard onboarding summary overwrite

init new-project now uses the same seven-file codebase map completeness
check as init onboard, so partial .planning/codebase/ directories no longer
skip the brownfield mapping offer after onboarding warns about an incomplete
map.

The onboard workflow now branches on onboarding_summary_exists and asks for
confirmation before regenerating SUMMARY.md on repeat runs.
This commit is contained in:
Cursor Agent
2026-07-03 15:30:48 +00:00
committed by Codesmith
parent 53f81ab5a9
commit 7b3bf9be3f
3 changed files with 36 additions and 4 deletions

View File

@@ -1599,6 +1599,9 @@ describe('cmdInitNewProject', () => {
test('brownfield with codebase map does not need map', () => {
fs.writeFileSync(path.join(tmpDir, 'package.json'), '{"name":"test"}');
fs.mkdirSync(path.join(tmpDir, '.planning', 'codebase'), { recursive: true });
for (const name of ['STACK', 'ARCHITECTURE', 'STRUCTURE', 'CONVENTIONS', 'TESTING', 'INTEGRATIONS', 'CONCERNS']) {
fs.writeFileSync(path.join(tmpDir, '.planning', 'codebase', `${name}.md`), `# ${name}\n`);
}
const result = runGsdTools('init new-project', tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`);