Evidence-backed debate engine for engineering decisions.
BenchMemo treats a decision like a pipeline, not a chatbot:
- auto-discover repo docs and recent GitHub planning artifacts
- frame the decision
- generate pro and con cases per option
- probe the repo with Codex in read-only mode
- verify claims against docs / web / repo evidence
- score options deterministically
- emit a final memo with dissent and evidence gaps
apps/api- orchestrator, agents, state machineapps/cli- interactive console apppackages/shared- schemas and shared typesworkers/codex-runner- thin wrapper aroundcodex exec
pnpm install
pnpm --filter @benchmemo/api devOPENAI_API_KEY
GITHUB_TOKEN- enables automatic GitHub issue, pull request, and release discovery during evidence preparation
Install the Codex CLI so codex is on your PATH.
npm install -g @openai/codexBenchMemo now includes lightweight dependency checks plus two eval paths:
pnpm run doctor
pnpm evals
pnpm evals:liveNotes:
pnpm run doctorverifiesOPENAI_API_KEY, the localcodexbinary, andcodex login status.pnpm run doctoris a lightweight readiness check; it does not execute a livecodex execprobe.pnpm run doctoralso reports whether GitHub artifact discovery is enabled or limited by a missingGITHUB_TOKEN.- BenchMemo now runs one merged read-only
repo_scanper option, rather than separate impact and risk probes. - Repo probes default to a conservative local posture:
BENCHMEMO_MAX_PARALLEL_PROBES=1,BENCHMEMO_CODEX_PROBE_TIMEOUT_MS=45000, andBENCHMEMO_CODEX_PROBE_MAX_ATTEMPTS=1. pnpm evalsruns 5 deterministic stage-driven fixtures:- easy winner
- stale-doc trap
- hidden-coupling trap
- need-more-evidence
- rollback-risk
pnpm evals:liveruns a real end-to-end smoke against the local API path and reportsPASS,FAIL, orSKIPPED.- Live smoke failures include the decision id, run timing, repo probe stage timing, and grouped failure kinds with example errors.
- With serialized 45-second probes,
pnpm evals:livecan take several minutes to finish. - On current
pnpm,pnpm doctoris reserved by pnpm itself, so usepnpm run doctorfor the BenchMemo doctor command.
Start the API:
pnpm dev:apiCreate a decision run:
curl -X POST http://127.0.0.1:3000/decisions \
-H 'content-type: application/json' \
-d @decision-brief.jsonFetch run status and final memo:
curl http://127.0.0.1:3000/decisions/dec_001Run data is stored in .benchmemo-data/ during local development.
BenchMemo now auto-prepares a docs knowledge base per decision before framing:
- repo-native docs come from
AGENTS.md,README*, top-level*.md, and markdown underdocs/,plans/, andadr/ - GitHub context comes from recent open issues, merged pull requests, and releases when
GITHUB_TOKENis available - the preparation manifest is stored as the
evidence_preparedartifact for each run
BenchMemo keeps decision runs code-orchestrated and tries to finish with a useful memo even when repo probing is unhealthy.
- If repo probing is blocked by auth, CLI, transport, timeout, or invalid-output issues, the run records structured failed probe outcomes instead of crashing the pipeline.
- If GitHub discovery is unavailable or docs ingestion fails, BenchMemo continues with whatever evidence it could prepare and records the missing context as warnings and evidence gaps.
- When required repo evidence is incomplete, the final memo is forced to
need_more_evidencewith explicit evidence gaps and next steps. - Repeated platform failures are collapsed into shared memo guidance instead of repeating the same probe error for every option.