Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
e3c7426
docs: harness core design spec (sub-project 1 of 5)
sunilp Aug 29, 2026
8b73ea8
docs: harness core implementation plan (19 tasks)
sunilp Aug 29, 2026
27bec1b
docs: switch harness storage to node:sqlite; fix three pre-flight def…
sunilp Aug 29, 2026
dfa2759
feat(harness): uuidv7 and logical clock
sunilp Aug 29, 2026
86f5655
docs: fix uuidv7 clock-regression defect in Task 1 reference code
sunilp Aug 29, 2026
1ffd287
fix(harness): clock regression and add counter overflow tests
sunilp Aug 29, 2026
8e1441c
docs: replace uuidv7 spin-wait with RFC 9562 timestamp borrow
sunilp Aug 29, 2026
8d1e2a0
fix(harness): implement RFC 9562 borrow and fix counter overflow test
sunilp Aug 29, 2026
8475a8f
test(harness): bind the uuidv7 timestamp field
sunilp Aug 29, 2026
2f267fc
docs: route node:sqlite through a createRequire shim
sunilp Aug 29, 2026
0611307
feat(harness): semantic event journal on node:sqlite
sunilp Aug 29, 2026
00f17e5
feat(harness): content-addressed artifact store with previews
sunilp Aug 29, 2026
411426c
feat(harness): bounded disposable telemetry stream
sunilp Aug 29, 2026
feebb08
docs: stop preview() dropping error lines silently; fix vacuous dedup…
sunilp Aug 29, 2026
d89cc61
fix(harness): report omitted error lines in preview; assert artifact …
sunilp Aug 29, 2026
3eb57b9
feat(harness): ExecutionWorld seam with local implementation
sunilp Aug 29, 2026
6aa9ac7
docs: fix pre-aborted signal and overloaded exitCode -1 in ExecutionW…
sunilp Aug 29, 2026
c89c13c
fix(harness): short-circuit pre-aborted signals; distinguish spawn fa…
sunilp Aug 29, 2026
54cbeaf
feat(harness): tool interface, safe paths, disposable registry
sunilp Aug 29, 2026
412a2b0
docs: fail loud on unmodelled zod shapes; close safePath's fail-open …
sunilp Aug 29, 2026
278a537
fix(harness): derive JSON schema per-field type, fail closed on realp…
sunilp Aug 29, 2026
b001a8d
feat(harness): policy reference monitor and fail-closed approval
sunilp Aug 29, 2026
5dd02c3
docs: close the .jam guard bypass via run_command
sunilp Aug 29, 2026
f96e1ac
fix(harness): close run_command bypass of the .jam/ mutation guard
sunilp Aug 29, 2026
baf5206
docs: make the .jam guard case-insensitive
sunilp Aug 29, 2026
ffa756b
fix(harness): lower-case before matching the .jam/ guard
sunilp Aug 29, 2026
149a455
feat(harness): read-only tools
sunilp Aug 29, 2026
b10ae61
docs: return fs errors as values, and actually test git_diff
sunilp Aug 29, 2026
c1fa8c5
fix(harness): return fs permission errors as values, test git_diff
sunilp Aug 29, 2026
6ad3205
feat(harness): git-backed checkpoints
sunilp Aug 29, 2026
a432a7f
docs(plan): make partial checkpoint rollback visible
sunilp Aug 29, 2026
3f158c7
fix(harness): report files restore() cannot remove instead of a silen…
sunilp Aug 29, 2026
0f99a24
feat(harness): apply_patch as the sole mutation primitive
sunilp Aug 29, 2026
3fdce71
docs(plan): stop apply_patch dropping binary file changes
sunilp Aug 29, 2026
0d03ec2
fix(harness): apply_patch reports binary file changes in changedFiles
sunilp Aug 29, 2026
3861343
feat(harness): run_command with conservative risk classification
sunilp Aug 29, 2026
f0222e3
docs(plan): run_command must check spawnFailed and aborted, and gate …
sunilp Aug 29, 2026
60302b4
fix(harness): run_command reports spawn failure and cancellation as e…
sunilp Aug 29, 2026
4390977
feat(harness): single dispatch pipeline for all tool calls
sunilp Aug 29, 2026
cf08e55
docs(plan): bound preview by characters; keep emitted events when a t…
sunilp Aug 29, 2026
8dc0828
fix(harness): bound preview by character count and keep emitted event…
sunilp Aug 29, 2026
b4feaba
docs(plan): budget preview sections so clamp cannot eat the error block
sunilp Aug 29, 2026
b7f1e60
fix(harness): bound each preview section separately, not the joined s…
sunilp Aug 29, 2026
50b99da
docs(plan): close the last two holes in preview's no-silent-drop guar…
sunilp Aug 29, 2026
8da2fa2
fix(harness): stop preview's early-return path from blind-cutting too…
sunilp Aug 29, 2026
978cc84
docs(plan): scan for error lines in everything dropped, not just the …
sunilp Aug 29, 2026
569d278
fix(harness): scan everything preview drops for error lines, not just…
sunilp Aug 29, 2026
afd1249
docs(plan): report the remainder of a truncated line as dropped
sunilp Aug 29, 2026
9b01874
fix(harness): track the remainder of a truncated line so the error sc…
sunilp Aug 29, 2026
1be01b8
feat(harness): ModelProvider seam and scripted mock
sunilp Aug 29, 2026
31e99e8
docs(plan): assert the mock does not leak deltas into returned content
sunilp Aug 29, 2026
daa24c7
test(harness): assert MockProvider does not leak deltas into content
sunilp Aug 29, 2026
94d805f
feat(harness): naive budget-aware context assembly
sunilp Aug 29, 2026
63f6ed6
docs(plan): show the model what it called, and keep human approval in…
sunilp Aug 29, 2026
43542f5
fix(harness): correlate tool results to calls, preserve approval audi…
sunilp Aug 29, 2026
1145f4c
docs(plan): give the approval audit trail a regression test
sunilp Aug 29, 2026
2139d12
test(harness): pin the approval audit-trail decision sequence
sunilp Aug 29, 2026
cb7e643
feat(harness): deterministic verification engine and evidence ledger
sunilp Aug 29, 2026
007f505
docs(plan): be loud about a malformed verification config, and test t…
sunilp Aug 29, 2026
3096a2f
fix(harness): make loadRequirements loud on malformed config, cover v…
sunilp Aug 29, 2026
3aabf0e
docs(plan): let a requirement set its own timeout
sunilp Aug 29, 2026
b30e6a0
feat(harness): per-requirement verification timeout override
sunilp Aug 29, 2026
6f5473c
feat(harness): agent loop with verifier-gated completion
sunilp Aug 29, 2026
a5345ab
docs(plan): make the loop cancellable and never exit silently
sunilp Aug 29, 2026
8bcdb56
fix(harness): close post-generate abort window, backstop uncaught thr…
sunilp Aug 29, 2026
7d5848c
docs(plan): a cut-short verification can never report satisfied
sunilp Aug 29, 2026
4d7510b
fix(harness): require every declared requirement to run before verifi…
sunilp Aug 29, 2026
c92efd1
docs(plan): make the cut-short verification test reach the real window
sunilp Aug 29, 2026
7904bba
test(harness): reach the real cancel-mid-verification window instead …
sunilp Aug 29, 2026
424ff3f
feat(harness): jam agent command with headless json output
sunilp Aug 29, 2026
cd46277
docs(plan): stop reporting a blown budget as a user cancellation
sunilp Aug 29, 2026
19fa356
fix(harness): report why an agent session stopped, not just that it did
sunilp Aug 29, 2026
23df949
docs(plan): do not print CANCELLED alongside the real stop cause
sunilp Aug 29, 2026
db191be
fix(harness): replace the CANCELLED placeholder with the real stop cause
sunilp Aug 29, 2026
0ecdb18
docs(plan): catch startup failures instead of crashing with a stack t…
sunilp Aug 29, 2026
639cc7b
fix(harness): add a startup error boundary around jam agent
sunilp Aug 29, 2026
758b0aa
docs(plan): read --task-file inside the startup boundary too
sunilp Aug 29, 2026
a3c7075
fix(harness): bring the task-file read inside the startup error boundary
sunilp Aug 29, 2026
ae4c9f1
test(harness): adversarial suite for authority and workspace boundaries
sunilp Aug 29, 2026
63c5d5c
docs(plan): escalate shell commands that reach outside the workspace
sunilp Aug 29, 2026
1ff6816
fix(harness): escalate shell commands that reach outside the workspace
sunilp Aug 29, 2026
4758331
docs(plan): close two verified escapes the first workspace fix missed
sunilp Aug 29, 2026
66faec4
fix(harness): block interpreter inline code and fix workspace-escape …
sunilp Aug 29, 2026
7f29575
test(harness): end-to-end vertical slice and resume from journal
sunilp Aug 29, 2026
2d13ff1
test(harness): clean up e2e fixture temp directories after each test
sunilp Aug 29, 2026
6d60af2
docs: drop three unrelated files swept in by an over-broad git add
sunilp Aug 29, 2026
1a7eb04
fix(harness): fail loudly on invalid budget flags and requirement ent…
sunilp Aug 29, 2026
32a2462
fix(harness): scope workspace-escape check away from apply_patch bodies
sunilp Aug 29, 2026
cab6d05
fix(harness): distinguish a wall-clock deadline from the tool-call cap
sunilp Aug 29, 2026
aa52a80
test(harness): add provider-factory coverage and race the model call …
sunilp Aug 29, 2026
935a3b3
fix(harness): make checkpoints restorable across processes and prune …
sunilp Aug 29, 2026
834170d
docs: correct the verification guarantee and document jam agent
sunilp Aug 29, 2026
6623700
docs: preserve the harness build's decision log
sunilp Aug 29, 2026
ecf643f
docs: keep harness spec, plan and decision log local
sunilp Aug 30, 2026
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
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- `jam agent` — coding agent harness. Completion is decided by a deterministic
verifier rather than the model: a session reports `COMPLETED_VERIFIED` only
when every declared verification requirement ran and passed, and
`COMPLETED_UNVERIFIED` when none were declared. Every tool call is mediated by
a policy reference monitor and recorded in an append-only session journal.
Headless mode via `--json` with documented exit codes. **Limitation:** a
requirement's command is frozen as text at session start, not what it
resolves to, so a model that rewrites what that text resolves to (for
example `package.json`'s `scripts.test`) can still make a verified command
report success — the ordinary reward-hacking failure mode, not an exotic
attack.

## [0.12.0] - 2026-05-11

### Changed
Expand Down
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,55 @@ jam impact users.email # cross-language column impact
jam diagram --type architecture # Mermaid architecture diagram
```

## `jam agent` (experimental)

A coding-agent harness: give it a task, it runs a tool-calling loop against
your configured model, and it decides completion with a deterministic
verifier rather than trusting the model's own claim. Every tool call goes
through a policy reference monitor (auto-allow, ask, or deny) and is recorded
in an append-only session journal, so a run is auditable and resumable.

```bash
jam agent "make the failing test in src/foo.test.ts pass"
jam agent --json "..." > run.jsonl # headless mode, one JSON event per line
```

Declare what must pass in `.jam/config.yaml`:

```yaml
verification:
required:
- command: npm test
- gitDiffCheck: true
```

Exit codes (see `exitCodeFor` in `src/commands/agent.ts`):

| Code | Meaning |
|---|---|
| `0` | `COMPLETED_VERIFIED` — every declared requirement ran and passed |
| `1` | `COMPLETED_PARTIAL` (retries exhausted) or `FAILED` |
| `3` | `COMPLETED_UNVERIFIED` — nothing was declared to verify |
| `4` | stopped (cancelled, or a tool-call/token/time budget ran out) |

A denied or escalated tool call is not a separate exit code: the policy
engine's decision is fed back to the model as a recoverable tool result, and
only changes the outcome insofar as it changes what the model does next —
which may still end in any of the states above.

Requires **Node 22.5+** (it stores session history via the built-in
`node:sqlite` module); every other jam command still runs on Node 20.
`jam agent` fails fast with an actionable message on an older runtime rather
than crashing.

**Verification runs exactly the commands you declare** — it does not
independently confirm what those commands mean. A requirement's command is
frozen as text at session start, not what it resolves to, so an agent that
edits a file the command depends on (for example `package.json`'s
`scripts.test`) can still make a verified command report success. Treat
`COMPLETED_VERIFIED` as "the commands you named ran and exited zero," not as
an independent guarantee of correctness.

## Status

- **v0.12.0** (current) — Sharp pivot from generic AI CLI to cross-language code intelligence. AI-assistant features (ask/chat/run/go and friends) archived to [`archive/ai-suite`](https://github.com/sunilp/jam-cli/tree/archive/ai-suite).
Expand Down
Loading
Loading