Thanks for your interest in improving vigolium-audit! This guide covers local
setup, the project conventions, and what we look for in a pull request.
- Bun >= 1.3.0 (
engines.bunenforces this). Usebunrather thannode/npm/npxthroughout. - To exercise a real audit you'll also need
claudeand/orcodexonPATH, plus the matching API key or ambient subscription auth. The test suite does not require either — unit and integration tests never spawn the CLIs or hit the network.
bun install
bun run dev -- run --mode lite --agent claude --target ./tests/fixtures/... # run the CLI from sourcebun test # all tests (unit + integration)
bun test tests/unit/orchestrator.test.ts # a single file
bun test --test-name-pattern "topological" # a single test by name
bun run typecheck # tsc --noEmit (strict)
bun run lint # tsc with --noUnusedLocals/--noUnusedParameters
bun run preflight # typecheck + lint + test + build, end to end
bun run build # current-platform binaryRun bun run preflight before opening a PR — it's exactly what CI runs (plus a
build), so a green preflight means a green CI.
- TypeScript is strict.
tsconfig.jsonenablesstrict,noUncheckedIndexedAccess,noImplicitOverride, andexactOptionalPropertyTypes. The last one means you cannot assignundefinedto an optional field — use thecompact(...)helper or a conditional spread (...(x !== undefined ? { field: x } : {})). There are many examples insrc/engine/orchestrator.tsandsrc/cli/run.ts. - Imports use the
.jsextension on TypeScript sources (moduleResolution: bundler), and@/*resolves tosrc/*. - No floating promises. Fire-and-forget work must attach a
.catch(...)so a rejected promise can't crash the process. If a result genuinely doesn't matter,void somePromise.catch(() => {})documents that intent. - Match the surrounding style. Comments explain why, not what. Keep the comment density and naming consistent with the file you're editing.
The audit methodology (agent prompts, mode workflows, skills) is vendored
content under src/content/, not code. If you change anything under
src/content/agent-defs/ or src/content/command-defs/:
-
Dev mode (
bun run dev/bun test) picks it up immediately. -
Regenerate the SDK-safe variants before committing:
bun run transform # regenerates src/content/sdk-variants/CI does not do this for you, and the codex/SDK code path reads from
sdk-variants/. -
The compiled binary inlines
src/content/at build time, so shipping a content change requires a rebuild.
A mode is just a YAML phase graph in src/content/command-defs/<mode>.md
frontmatter — there are no hardcoded phase IDs in the engine. Any phase
referenced in depends_on/parallel_with must exist in phases:.
- Add unit tests next to the module you change under
tests/unit/. - For end-to-end behavior, follow the
ScriptedFakeAdapterpattern intests/integration/e2e-lite.test.ts— it writes real files to a tmpdir and drives the orchestrator without mocking the SDK. - Tests must not require network access or a real
claude/codexbinary.
- Branch off
main. - Keep the change focused; large refactors are easier to review when split out from behavior changes.
- Ensure
bun run preflightpasses. - Describe the motivation and any user-visible behavior change in the PR
description, and add a
CHANGELOG.mdentry under Unreleased.
Please do not file public issues for security vulnerabilities — see SECURITY.md for private reporting instructions.
By contributing, you agree that your contributions will be licensed under the MIT License.