File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " bmalph" ,
3- "version" : " 0.8.3 " ,
3+ "version" : " 0.8.4 " ,
44 "description" : " Unified AI Development Framework - BMAD phases with Ralph execution loop for Claude Code" ,
55 "type" : " module" ,
66 "bin" : {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const program = new Command();
1212program
1313 . name ( "bmalph" )
1414 . description ( "BMAD-METHOD + Ralph integration — structured planning to autonomous implementation" )
15- . version ( "0.8.3 " )
15+ . version ( "0.8.4 " )
1616 . option ( "--verbose" , "Enable debug logging" )
1717 . hook ( "preAction" , ( ) => {
1818 if ( program . opts ( ) . verbose ) {
@@ -25,7 +25,7 @@ program
2525 . description ( "Initialize bmalph in the current project" )
2626 . option ( "-n, --name <name>" , "Project name" )
2727 . option ( "-d, --description <desc>" , "Project description" )
28- . option ( "-l, --level <level>" , "Complexity level (0-4)" , "2" )
28+ . option ( "-l, --level <level>" , "Complexity level (0-4)" )
2929 . action ( initCommand ) ;
3030
3131program
Original file line number Diff line number Diff line change @@ -75,4 +75,10 @@ describe("CLI entry point", () => {
7575 const { stdout } = runCli ( [ "--help" ] ) ;
7676 expect ( stdout ) . toContain ( "--verbose" ) ;
7777 } ) ;
78+
79+ it ( "init level option has no default value" , ( ) => {
80+ const { stdout } = runCli ( [ "init" , "--help" ] ) ;
81+ expect ( stdout ) . toContain ( "--level" ) ;
82+ expect ( stdout ) . not . toContain ( "default" ) ;
83+ } ) ;
7884} ) ;
Original file line number Diff line number Diff line change @@ -102,6 +102,32 @@ describe("init command", () => {
102102 expect ( output ) . toContain ( "/bmalph" ) ;
103103 } ) ;
104104
105+ it ( "includes level prompt when level option not provided" , async ( ) => {
106+ const { isInitialized, installProject, mergeClaudeMd } = await import (
107+ "../../src/installer.js"
108+ ) ;
109+ const { writeConfig } = await import ( "../../src/utils/config.js" ) ;
110+ const inquirer = await import ( "inquirer" ) ;
111+
112+ vi . mocked ( isInitialized ) . mockResolvedValue ( false ) ;
113+ vi . mocked ( installProject ) . mockResolvedValue ( undefined ) ;
114+ vi . mocked ( mergeClaudeMd ) . mockResolvedValue ( undefined ) ;
115+ vi . mocked ( writeConfig ) . mockResolvedValue ( undefined ) ;
116+ vi . mocked ( inquirer . default . prompt ) . mockResolvedValue ( {
117+ name : "test" ,
118+ description : "test" ,
119+ level : 2 ,
120+ } ) ;
121+
122+ const { initCommand } = await import ( "../../src/commands/init.js" ) ;
123+ await initCommand ( { } ) ;
124+
125+ const promptArgs = vi . mocked ( inquirer . default . prompt ) . mock . calls [ 0 ] [ 0 ] as Array < { name : string ; type : string } > ;
126+ const levelQuestion = promptArgs . find ( ( q ) => q . name === "level" ) ;
127+ expect ( levelQuestion ) . toBeDefined ( ) ;
128+ expect ( levelQuestion ! . type ) . toBe ( "list" ) ;
129+ } ) ;
130+
105131 it ( "prompts user when options missing" , async ( ) => {
106132 const { isInitialized, installProject, mergeClaudeMd } = await import (
107133 "../../src/installer.js"
You can’t perform that action at this time.
0 commit comments