For the love of code
Case study

Nisi

A workflow for AI-assisted coding

CLI and library, v0.3.0. A bounded workflow for proposed changes, checks, tests, review and a recorded outcome, with optional Jev analysis for local models.

CLI and library · Node.js 22+v0.3.0

  1. draft
  2. check
  3. test
  4. review
  5. repair
ProjectPublished case study
Built withNode.js · Local AI
Public Node.js CLI & library · v0.3.0

A coding workflow
with an inspectable outcome.

Your application supplies a task and its drafting, validation and review adapters. Nisi coordinates the stages within a deadline and repair limit, then returns proposed files and a report. Applying a change remains the application's decision.

NNisi v0.3.0
DraftCheckTestReviewRepair if needed

A proposed change, a recorded decision,
and a host that stays in control.

Releasev0.3.0 · Public CLI and library
RuntimeNode.js 22+
LicenseApache-2.0
What it does

How a run works.

An application sets the task and supplies its own authorization, author, check, test, and reviewer adapters. Nisi coordinates them and returns proposed file contents with a report.

  1. Bound the task

    Set allowed files, criteria, deadline, and repair budget.

  2. Authorize context

    Host policy decides whether the task's context may be used; a refusal stops the run.

  3. Draft a candidate

    The author proposes file snapshots without applying them.

  4. Check, then test

    Static checks pass before tests run on that candidate.

  5. Review separately

    Declared reviewer IDs differ from the author ID.

  6. Return a report

    Passing evidence returns proposed files and a run report.

Return to the author for repair. Failed checks, tests, or review can return to author repair when available and within budget. A repaired candidate repeats checks, tests, and review.

Stop path: Refused context, no valid candidate, missing evidence, unavailable repair, a repair that changes nothing or repeats an earlier candidate, exhausted budget, cancellation, or deadline ends without completion; the report records the outcome.

Edit-mode library workflow. Host adapters perform the work; a COMPLETED result does not apply files. Sources: Nisi v0.3.0 README ↗ (opens in a new tab) and workflow API ↗ (opens in a new tab).
Under the hood

What a run leaves behind.

A report you can inspect

The report shows the proposed files, check results, and why a run stopped. The host decides whether to apply any change.

A journal you can reopen

The optional append-only journal uses a hash chain. A host can store it, reopen it after a restart, and check its internal consistency (not authenticity).

Developer view · public v0.3.0

What a run returns.

Nisi coordinates adapters supplied by your application and returns proposed file contents with evidence for each stage.

The published, model-free node bin/nisi.mjs demo intentionally starts with an incorrect JavaScript module, repairs it once, reruns its checks, obtains a separate review result, and writes, verifies and removes a report. Its documented output includes:
{
  "outcome": "COMPLETED",
  "repairAttempts": 1,
  "reportStored": true
}

See the tagged example ↗ (opens in a new tab)

Bind the task before drafting

Allowed relative files, acceptance criteria, protected snapshots, deadline, repair budget, and reviewer count become part of a task fingerprint. A candidate is a proposed file snapshot, not an applied patch.

Task contract ↗ (opens in a new tab)

Keep stage evidence separate

Checks, tests, and reviews report their own status and evidence against the current candidate fingerprint. Malformed or mismatched records block completion; a repaired candidate goes through fresh checks, tests, and review.

Evidence schema ↗ (opens in a new tab)

Reopen the journal after a restart

The optional hash-chained journal distinguishes a fresh run from stale, expired, or revoked records. Its disk store reports whether a write committed and whether durability was confirmed.

Journal and store ↗ (opens in a new tab)

Measured on 16 harder tasks

New in v0.3.0, both optional: a reasoningEffort setting for local chat models, and an advisor that asks Jev, TypeSafe’s hosted model, to pick reasoning settings per task. You supply the call and the key, and your call decides what is sent: the task’s id, mode, language, allowed files and criteria, and for the optional Jev reviewer also the candidate’s files and whether the tests passed. With one 27B model, the adapter defaults solved 14 of 16, as did a single unchecked draft and the Jev plan. The plan’s shorter time came almost entirely from one task both runs got wrong, so these single runs show no accuracy or speed gain.

Measured results ↗ (opens in a new tab)

Try a configured local-model example

The separate local-model command sends one fixed JSON task to a loopback chat server using two differently named author and reviewer models. It checks four assertions and treats the JSON as data; the server and models are supplied separately.

Local-model setup ↗ (opens in a new tab)
Available now

Run the demo.

Needs Node.js 22 or newer. The demo repairs its example once and verifies a report it writes to a temporary folder, then removes. Clone the tagged source and run:

git clone --branch v0.3.0 --depth 1 https://github.com/louiscalata/nisi.git
cd nisi
node bin/nisi.mjs demo

The demo makes no model calls.

Read the source and documentation (opens in a new tab)See release files (opens in a new tab)
Continue exploring

AGIW Suite

See how local model inventory, activity, recorded routes, and recovery controls come together in a native Mac interface.

Read the case study

Next project

AGIW Suite