@@ -52,8 +52,12 @@ protected function configure(): void
5252 on a single package. Useful to inspect exact diffs in large monorepos.
5353
5454Common options
55- - --concise: One-line summaries only (suppresses detailed blocks).
56- - --show-all: Include no-op summaries for debugging plan decisions.
55+ - Verbosity controls detail:
56+ - default: concise one-line summaries
57+ - -v: detailed blocks
58+ - -vv: detailed + include no-op summaries
59+ - -vvv: everything above plus full JSON plan at end
60+ - --show-all: Include no-op summaries (same as -vv or higher).
5761- --json: Output as JSON for apply or tooling (includes delta metadata).
5862- --project-root=PATH: Project root (defaults to current directory).
5963- --paths=DIR ...: Limit discovery to specific package paths (directories).
@@ -64,11 +68,11 @@ protected function configure(): void
6468
6569Examples
6670 chorale plan
67- chorale plan --concise
68- chorale plan --show-all
71+ chorale plan -v
72+ chorale plan -vv
6973 chorale plan --json > plan.json
7074 chorale plan sonsofphp/cache
71- chorale plan sonsofphp/cache --concise
75+ chorale plan sonsofphp/cache -v
7276 chorale plan --paths src/SonsOfPHP/Component/Cache
7377
7478Notes
@@ -81,7 +85,8 @@ protected function configure(): void
8185 ->addOption ('project-root ' , null , InputOption::VALUE_REQUIRED , 'Project root (default: CWD). ' )
8286 ->addOption ('paths ' , null , InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY , 'Limit to specific package paths ' , [])
8387 ->addOption ('json ' , null , InputOption::VALUE_NONE , 'Output as JSON instead of human-readable. ' )
84- ->addOption ('concise ' , null , InputOption::VALUE_NONE , 'One-line summaries only; omit detailed blocks. ' )
88+ // --concise retained for compatibility; default output is concise
89+ ->addOption ('concise ' , null , InputOption::VALUE_NONE , 'Force one-line summaries only; omit detailed blocks. ' )
8590 ->addOption ('show-all ' , null , InputOption::VALUE_NONE , 'Show no-op summaries (does not turn them into steps). ' )
8691 ->addOption ('force-split ' , null , InputOption::VALUE_NONE , 'Force split steps even if unchanged. ' )
8792 ->addOption ('verify-remote ' , null , InputOption::VALUE_NONE , 'Verify remote state if lockfile is missing/stale. ' )
@@ -96,8 +101,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
96101 /** @var list<string> $paths */
97102 $ paths = (array ) $ input ->getOption ('paths ' );
98103 $ json = (bool ) $ input ->getOption ('json ' );
99- $ concise = (bool ) $ input ->getOption ('concise ' );
100- $ showAll = (bool ) $ input ->getOption ('show-all ' );
104+ $ verbosity = $ output ->getVerbosity ();
105+ $ explicitConcise = (bool ) $ input ->getOption ('concise ' );
106+ // Concise by default; -v or higher switches to detailed unless --concise is given
107+ $ concise = $ explicitConcise || ($ verbosity <= OutputInterface::VERBOSITY_NORMAL );
108+ // Show no-op summaries at -vv or when explicitly requested
109+ $ showAll = (bool ) $ input ->getOption ('show-all ' ) || ($ verbosity >= OutputInterface::VERBOSITY_VERY_VERBOSE );
101110 $ force = (bool ) $ input ->getOption ('force-split ' );
102111 $ verify = (bool ) $ input ->getOption ('verify-remote ' );
103112 $ strict = (bool ) $ input ->getOption ('strict ' );
@@ -139,6 +148,22 @@ protected function execute(InputInterface $input, OutputInterface $output): int
139148 }
140149
141150 $ this ->renderHuman ($ io , $ steps , $ showAll ? $ noop : [], $ concise );
151+
152+ // At -vvv print the full JSON payload after human output
153+ if ($ verbosity >= OutputInterface::VERBOSITY_DEBUG ) {
154+ $ io ->newLine ();
155+ $ io ->section ('Full JSON plan ' );
156+ $ payload = [
157+ 'version ' => 1 ,
158+ 'steps ' => array_map (static fn (PlanStepInterface $ s ): array => $ s ->toArray (), $ steps ),
159+ 'noop ' => $ showAll ? $ noop : [],
160+ ];
161+ $ encoded = json_encode ($ payload , JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES );
162+ if ($ encoded !== false ) {
163+ $ output ->writeln ($ encoded );
164+ }
165+ }
166+
142167 return (int ) ($ result ['exit_code ' ] ?? 0 );
143168 }
144169
0 commit comments