---
title: "Mechanic · GrepRAG"
description: "Productivity harness for coding agents — Memory, Corpus, Mechanic, Inbox, plus the advisor skills that turn them into multitasking agents."
canonical: https://www.greprag.com/mechanic/
source: /mechanic/
---

Store · Mechanic

# Leave a note.  
Every future agent picks it up.

Tell your AI "always start with the conclusion" once. Every future session reads it before working.

Seed a note once. Every future agent in the same project pulls it automatically, at the right trigger, scoped to the work it's about to do.

Why

## Onboarding rounds, every session.

An agent walks into a fresh session and spends the first ten minutes rediscovering things every previous agent already learned: which test command works, which file blew up last time, which branch is the canonical one.

A note is a one-line entry about that. The next agent reads it at the right moment and skips the discovery. Lessons and lived experiences of you and your agent, codified so you don't have to learn them twice.

CLI

## Log, search, repair.

$ greprag fix log "Tests run from repo root, not packages/api" \--scope chip-startup
$ greprag fix log "Migration 037 changed node\_id to composite FK" \--scope migrations-touch
$ greprag fix log "Default branch is main, not master" \--scope general

$ greprag fix search \--scope chip-startup
$ greprag fix search "migration"
$ greprag fix repair

Scopes

## Routed by trigger, not by topic.

A scope is a tag that says "read me at this kind of moment." Three live today; more come online as injectors land.

`chip-startup`

Pulled when a chip spawns. The chip sees the relevant notes in its initial context.

`<subsystem>-touch`

Pulled before an Edit/Write whose file path matches a registered pattern. Just-in-time onboarding for the surface the agent is about to touch.

`general`

Pulled at session start in known projects. The "always read this first" pile.

Sources

## Three ways a note gets seeded.

1

### Agent, in real time

The agent hits friction. It writes a note about that friction before continuing. The skill teaches when to seed: three signatures of discovery waste — repeated lookups, repeated failures, repeated clarifications.

2

### You, deliberately

You notice a thing every agent should know. You run `greprag fix log` with the right scope. That's it.

3

### Hourly cron, as backstop

A parallel extractor scans turn envelopes for discovery-waste signatures the agent missed in the moment. Candidates land in your inbox as a digest. You review, accept, ingest.

The loop

## It closes itself.

chip hits friction → seeds note (real-time, in-session)
                  ↘
                    hourly cron catches what was missed → inbox digest
                  ↗
user reviews → ingests into Mechanic store
                ↓
next chip queries scope=chip-startup → spawns fully armed

Same loop, three entry points. The Mechanic store is the resting state. Discovery waste flows in; ready-state notes flow out at the next trigger.

Use case

## "Tests run from repo root, not packages/api."

A chip spawns to add a test. It tries `cd packages/api && node tests/...` and the env vars don't load. It debugs for two minutes, figures out the test must run from repo root, fixes the path, ships.

Before continuing, the chip writes the note. Three days later, a different chip spawns for similar work. It pulls `scope=chip-startup` in its initial context. It sees the note. It uses the right path on the first try.
