Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"ciCapable": true
},
{
"id": "revenue",
"id": "revenue-analytics",
"dir": "revenue",
"label": "Revenue Analytics",
"description": "Wire Stripe + PostHog for revenue tracking",
Expand Down
6 changes: 4 additions & 2 deletions services/wizard-benchmark/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,12 @@ function runBenchmark(
});
}

// Subcommand (e.g. 'revenue') must come before flags
// Subcommand (e.g. 'revenue', or a family leaf like 'audit events') must come
// before flags. Split on whitespace so multi-token subcommands become
// separate argv entries.
const subcommand = commandToSubcommand(command.id);
const args: string[] = [wizardBin];
if (subcommand) args.push(subcommand);
if (subcommand) args.push(...subcommand.split(' '));
args.push(
"--local-mcp",
"--benchmark",
Expand Down
6 changes: 4 additions & 2 deletions services/wizard-ci/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,12 @@ export function runWizard(appPath: string, options: WizardOptions = {}): Promise
});
}

// Build wizard args — subcommand (e.g. 'revenue') must come before flags
// Build wizard args — subcommand (e.g. 'revenue', or a family leaf like
// 'audit events') must come before flags. Split on whitespace so multi-token
// subcommands become separate argv entries.
const args = [wizardBin];
if (options.command) {
args.push(options.command);
args.push(...options.command.split(' '));
}
if (options.skillId) {
args.push(`--skill=${options.skillId}`);
Expand Down
14 changes: 13 additions & 1 deletion services/wizard-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,25 @@ function loadManifest(): WizardCommand[] {

export const WIZARD_COMMANDS: WizardCommand[] = loadManifest();

/**
* Family commands (e.g. `audit`) require a concrete leaf in non-interactive
* runs — after the CLI overhaul, bare `wizard audit` opens an interactive
* picker (or errors under `--ci`) instead of running an audit. Drive a
* sensible default leaf so CI keeps exercising the command. `all` runs the
* comprehensive audit so CI checks full integrations end-to-end.
*/
const FAMILY_DEFAULT_LEAF: Record<string, string> = { audit: 'all' };

/**
* Convert a command id to the subcommand string the wizard binary expects.
* 'default' → undefined (no subcommand), 'skill' → undefined (uses --skill flag),
* any other id → the id itself.
* a family id → "<family> <leaf>" (e.g. 'audit' → 'audit events'),
* any other id → the id itself. May be multi-token — callers must split on
* whitespace before pushing into an argv array.
*/
export function commandToSubcommand(id: string): string | undefined {
if (id === 'default' || id === 'skill') return undefined;
if (FAMILY_DEFAULT_LEAF[id]) return `${id} ${FAMILY_DEFAULT_LEAF[id]}`;
return id;
}

Expand Down