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
1 change: 1 addition & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
"build": "tsc -p tsconfig.json && node scripts/bundle-packs.mjs",
"typecheck": "tsc -p tsconfig.json --noEmit",
"pretest": "tsc -p tsconfig.json && node scripts/bundle-packs.mjs",
"test": "node --experimental-strip-types --no-warnings=ExperimentalWarning --test test/cli.test.ts test/profiler.test.ts test/run-cmd.test.ts test/pack-new.test.ts test/install-agent-files-cmd.test.ts",
"test": "node --experimental-strip-types --no-warnings=ExperimentalWarning --test test/cli.test.ts test/profiler.test.ts test/run-cmd.test.ts test/pack-new.test.ts test/install-agent-files-cmd.test.ts test/report-cmd.test.ts",
"clean": "node --input-type=module -e \"import { rmSync } from 'node:fs'; for (const p of ['dist','.tsbuildinfo']) { try { rmSync(p, { recursive: true, force: true }); } catch {} }\""
},
"dependencies": {
"@aqa/adapters": "workspace:*",
"@aqa/pack-loader": "workspace:*",
"@aqa/reporter": "workspace:*",
"@aqa/runner": "workspace:*",
"@aqa/schemas": "workspace:*",
"kleur": "^4.1.5",
Expand Down
37 changes: 37 additions & 0 deletions packages/kit/src/cli/aqa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { type CheckStatus, runDoctor } from '../commands/doctor.js';
import { runInit } from '../commands/init.js';
import { runInstallAgentFiles } from '../commands/install-agent-files.js';
import { runPackNew } from '../commands/pack-new.js';
import { runReport } from '../commands/report.js';
import { runRun } from '../commands/run.js';
import { runValidate } from '../commands/validate.js';

Expand Down Expand Up @@ -32,6 +33,8 @@ const VALUE_FLAGS = new Set([
'license',
'targets',
'project-name',
'run-id',
'format',
]);

function parseArgs(argv: string[]): ParsedArgs {
Expand Down Expand Up @@ -93,6 +96,7 @@ ${bold('Commands')}
install-agent-files --targets … Write CLAUDE.md / AGENTS.md / GEMINI.md / .github/copilot-instructions.md
plus per-agent skills under .claude/ .agents/ .gemini/ .github/
run [--profile <p>] Execute scenarios for the given profile; write events + findings
report [--run-id <id>] Render the latest (or specified) run as report.md + report.json
pack new <slug> Scaffold a new pack at <cwd>/packs/<slug>/ (see the pack authoring
guide: https://github.com/padosoft/agentic-qa-kit/blob/main/docs/PACK-AUTHORING.md
— this path is only present in the source repo, not in the npm tarball)
Expand All @@ -104,6 +108,8 @@ ${bold('Common options')}
--seed <string> (run) deterministic run_id seed — useful for replay
--targets <list> (install-agent-files) comma-separated targets: claude,codex,gemini,copilot
--project-name <name> (install-agent-files) override the slug embedded in instruction files
--run-id <id> (report) target a specific run; default = latest
--format <fmt> (report) md | json | both (default: both)
--sut-type <type> (pack new) api | web | cli | lib | agent | pipeline
--description <text> (pack new) one-line summary written into the manifest
--author <name> (pack new) manifest author field
Expand Down Expand Up @@ -256,6 +262,37 @@ async function main(): Promise<number> {
}
return 0;
}
case 'report': {
printHeader('report');
if (args.flags.has('run-id') && !args.values.has('run-id')) {
console.error(red('aqa report: --run-id requires a value'));
return 1;
}
if (args.flags.has('format') && !args.values.has('format')) {
console.error(red('aqa report: --format requires a value'));
return 1;
}
const reportOpts: Parameters<typeof runReport>[0] = { root: cwd };
if (args.values.has('run-id')) reportOpts.runId = args.values.get('run-id') ?? '';
if (args.values.has('format')) {
const fmt = args.values.get('format') ?? '';
if (fmt !== 'md' && fmt !== 'json' && fmt !== 'both') {
console.error(red(`aqa report: --format must be md | json | both, got "${fmt}"`));
return 1;
}
reportOpts.format = fmt;
}
const result = runReport(reportOpts);
if (!result.ok) {
console.error(red(` ✗ ${result.error}`));
return 1;
}
console.info(` ${green('✓')} ${bold(result.runId)}`);
console.info(` ${dim('runDir: ')}${result.runDir}`);
console.info(` ${dim('findings: ')}${result.findingsCount}`);
for (const f of result.files) console.info(` ${green('+')} ${f}`);
return 0;
}
case 'pack': {
// Subcommand router for `aqa pack <subcommand>`.
const sub = args.positionals[0];
Expand Down
Loading
Loading