LOGIKASign in

nock, the workflow behind it

A coding agent starts every session knowing nothing of the last one. nock is a small, open-source CLI that gives your agents a toolbox of their own and runs the rounds that improve your project, among them the ones that instrument your code for Logika and write its rules.

An example

Instrumenting your payments code, the agent working on that area finds something in the captures it can't settle alone, and asks:

checkout.captured is sometimes sent twice for one order in the captures
(2 orders of 340, both retries after a timeout). Is a second charge ever right?
  1. Never: add "An order is charged once" (recommended)
  2. Only for split payments: key it on order_id and payment_id
  3. Leave it for now

You answer in a word, and the rule is written and tested. If you'd rather not be asked, the agent takes the answer it recommends and lists it in its report for you to review.

What it gives you

A toolbox

The project's own commands, built by your agents for the work they keep repeating, and one check gate whose exit codes tell an agent what kind of problem it has.

A memory

A short file of what is where in your project, which every agent reads first, kept up to date by the rounds.

Rounds

Audits, fuzzing and the logika round, each split into subrounds that run in agents of their own and report what they found.

Instrumentation and rules

The logika round's logika.instrument instruments your code an area at a time and writes each area's rules; logika.analytics declares what is worth measuring.

Why Logika uses it

Instrumenting a codebase well is many agents' work: one per area, each logging what its code does and writing the rules that judge it, from what the code really emits. nock runs that work as a round, logika.instrument, which your agent leads when you ask it to instrument the repository with Logika. Once your code has run with Logika, logika.analytics works out with you what is worth measuring. So logika init sets nock up in your repository.

Logika is built with nock too. It is made by the same people, and its source is on GitHub; its own site is nock.dev.

Requirements and boundaries

  • Needs Python 3.12 or newer and uv. Without them, logika init says what to install and sets Logika up all the same; Logika works without nock, but best with it.
  • Local: nock runs on your machine, in your repository. Its tools, memory and settings are files you commit; its record of calls and sessions stays on your machine.
  • Shares nothing unless you say yes. On a yes, it sends its makers weekly counts and categories, never code, paths, names or prompts.

Running a round, step by step, is in the reflection guide.