This deterministic, offline demo exercises the production AgentLoop, tool
registry, approval boundary, named test runner, durable session, transaction
ledger, and evidence review. It needs Python 3.11+, uv, and no API key.
Always use a fresh temporary workspace: the fixture writer refuses to
overwrite an existing fixture.
From the repository root, install dependencies and inspect the local runtime:
uv sync
uv run forgecode doctor
uv run forgecode tools
uv run forgecode provider list
uv run forgecode provider health
uv run forgecode skills list
uv run forgecode config profilesCreate an isolated workspace and run the scripted scenario:
$demo = Join-Path ([IO.Path]::GetTempPath()) ('forgecode-demo-' + [guid]::NewGuid().ToString('N'))
New-Item -ItemType Directory -Path $demo | Out-Null
uv run forgecode --workspace $demo run --demo --auto-approveThe offline provider asks the agent to inspect a calculator fixture, reproduce
an intentional failing edge case, apply a validated unified patch, and rerun
the regression test. --auto-approve is suitable only for this disposable
workspace.
Run the named test profile and inspect the same session after the process exits:
uv run forgecode --workspace $demo test list --jsonl
uv run forgecode --workspace $demo test run default --auto-approve --jsonl
uv run forgecode --workspace $demo sessions
uv run forgecode --workspace $demo status
uv run forgecode --workspace $demo diff
uv run forgecode --workspace $demo transaction
uv run forgecode --workspace $demo review --jsonlExport a review artifact and verify its workspace/hash binding:
uv run forgecode --workspace $demo review --export review-artifact.json --jsonl
uv run forgecode --workspace $demo review --verify review-artifact.json --jsonlExpected evidence includes status=completed, a passing verification result,
an audit-complete session, bounded stdout/stderr, approval metadata, changed
file hashes, and a review report. A non-zero command or denied approval must
remain visible in the session; never infer success from the final model text.
The context commands build an ignored, bounded local index and expose session recovery metadata:
uv run forgecode --workspace $demo context index --json
uv run forgecode --workspace $demo context search "calculator" --json
uv run forgecode --workspace $demo context show --json
uv run forgecode --workspace $demo context complete demo --jsonl
uv run forgecode --workspace $demo session tree --jsonl
uv run forgecode --workspace $demo eval latest --jsonlTo demonstrate hash-checked undo, execute the latest recorded transaction in the disposable workspace and inspect the ledger again:
uv run forgecode --workspace $demo transaction latest --execute --auto-approve
uv run forgecode --workspace $demo transactionUndo intentionally restores the pre-fix state, so the original failing test can fail again. Do not run it against a real project without a backup.
The run proves that provider output is normalized before dispatch, tool arguments and paths are validated, side effects cross an explicit approval boundary, writes are atomic and reversible, command limits are enforced, and all model/tool/verification outcomes are persisted as auditable JSONL events.