omp packages

pi-semguard0.3.0

Runs `semguard check` when a pi run settles, and has the agent fix the violations it introduced.

leostera Published 13 hours ago MIT ~294 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-semguard

A pi extension that keeps an agent inside a project's semguard rules.

When a run starts, pi-semguard records the violations semguard check already reports. When the run is about to settle, it checks again, and if the run introduced a violation of a rule that denies, it hands the agent those violations, with each rule's summary and help, and asks it to continue. It does so at most three times per run, then tells the person.

A violation is the same violation when it breaks the same rule about the same things (every binding but File and Line), so moving code doesn't count as introducing one; a second one about the same things does. Warnings are only passed along with errors, never on their own.

Projects without an semguard.toml or an .semguard directory, here or above, are left alone. If semguard check can't run when a run starts, the run isn't checked; if it could then and can't at the end, the agent is told what broke.

/semguard runs the check and shows the result.

With semguard server (RFD0002), the check when a run starts also has the server watch the project, so the check when it settles is usually answered with a report the server computed while the agent worked.

Install

cargo install --path crates/semguard   # puts `semguard` on PATH
pi install ./packages/pi-semguard

pi-semguard runs the semguard on PATH, else the one cargo install put in ~/.cargo/bin (a pi started from an app may not have it on PATH). SEMGUARD_BIN points it at another.

Develop

npm install
npm run check   # tsc
npm test        # node --test