@@ -192,13 +192,7 @@ async function setupProject() {
192192 console . log ( '📝 Creating .gitignore with language-specific exclusions...' )
193193 createGitignore ( targetRoot )
194194
195- console . log ( '🔧 Running post-setup tasks...' )
196- const postSetupScript = path . join ( sourceRoot , 'scripts' , 'post-setup.js' )
197- if ( fs . existsSync ( postSetupScript ) ) {
198- execSync ( `node ${ postSetupScript } ` , { stdio : 'inherit' , cwd : targetRoot } )
199- }
200-
201- // Create .create-ai-project.json manifest
195+ // Create .create-ai-project.json manifest before the initial commit
202196 const packageJson = JSON . parse ( fs . readFileSync ( path . join ( sourceRoot , 'package.json' ) , 'utf8' ) )
203197 const manifest = {
204198 version : packageJson . version ,
@@ -212,6 +206,12 @@ async function setupProject() {
212206 )
213207 console . log ( '📋 Created .create-ai-project.json manifest.' )
214208
209+ console . log ( '🔧 Running post-setup tasks...' )
210+ const postSetupScript = path . join ( sourceRoot , 'scripts' , 'post-setup.js' )
211+ if ( fs . existsSync ( postSetupScript ) ) {
212+ execSync ( `node ${ postSetupScript } ` , { stdio : 'inherit' , cwd : targetRoot } )
213+ }
214+
215215 console . log ( '✅ Project setup completed!' )
216216 } catch ( error ) {
217217 console . error ( `❌ Setup failed: ${ error . message } ` )
0 commit comments