AGENT-POWERED. ENGINEERING-DRIVEN.

The power of agents.
The discipline of software engineering.

Your agents can code. Give them a method.
pi-495 organises their work in Pi: clarify the need, specify expected behaviour, prepare tests, design the solution and verify the code before Git integration.

$pi install npm:pi-495

OPEN SOURCE · NATIVE TO PI · YOUR MODELS, YOUR CODE

This page presents the current lifecycle and planned developments: application creation, modernisation and a strengthened process. View the Git repository and its progress ↗

01 / FROM GENERATED CODE TO VERIFIED CHANGEFROM PROMPT TO PROCESS

Specify. Design.
Test. Review.
Before integrating.

A feature is more than the code that implements it. Its behaviour must be defined, existing interfaces preserved, module dependencies respected and error cases verified.

pi-495 links requirements to the tests and checks that verify them. Agents prepare specifications, design and code; the core runs the checks and applies the criteria for moving between stages.

You can trace what was requested, changed, tested and accepted.

01 — THE AGENTS

Specify, design and code.

Each intervention has a role: refine requirements, prepare tests, design the solution, implement or review. It receives the relevant documents and change boundaries.

02 — THE CORE

Runs checks and decides.

The core runs checks, reads their reports and applies the acceptance rules. An agent claiming success does not replace a test result.

03 — YOU

Make the business decisions.

You answer questions that change expected behaviour, make decisions reserved for you and authorise integration. Your answers remain linked to the requirements.

02 / THE DEVELOPMENT LIFECYCLESPECIFICATION → TESTS → CODE → ACCEPTANCE

From need to Git integration.
Criteria at every stage.

Scoping, specification, qualification, design, implementation and acceptance, followed by integration. Each stage ends with a decision based on its exit criteria, the G0 to G6 quality gates.

pi-495 / a change journeyINTERACTIVE EXAMPLE
›/495 start add three attempts with increasing delay to the upload client for temporary errors
G0 / SCOPING

Scope the need and business decisions.

pi-495 separates the objective, constraints and questions that affect the solution. This scoping feeds the agents’ context: authorised scope, interfaces to preserve and recorded human decisions. For the upload client, this includes defining retryable errors and the total number of attempts.

REFERENCE DOCUMENTVersioned mandate: objective, scope, constraints and business decisions.
scoping / upload client

objective Retry after a temporary error

constraint Preserve the public API

question Three attempts or three additional attempts?

→ Human decision recorded: three attempts in total.

If a check fails, the agent receives the deviations to correct. If a tool is missing, attempts are exhausted or a human decision is required, the change stops with a cause and a recovery action.

03 / QUALIFY TESTS BEFORE IMPLEMENTATIONDISCRIMINATING TESTS · QUALIFIED CHECKS

A test must detect
the defect it targets.

Before relying on a test for acceptance, it must be shown to reach the right assertion and distinguish correct from incorrect behaviour. The planned process extends this qualification to every requirement.

01↗

One means of verification per requirement.

A requirement is linked to a test, a structural check or a human decision. For example, “three attempts in total” must be verified by counting calls, with a faulty case that makes four.

02▣

Tests protected during coding.

Acceptance tests and their criteria are fixed at qualification. The implementing agent cannot change them to make its code pass. A test may fail on the baseline precisely because the feature is missing.

03↻

A procedure for correcting a faulty test.

If a test contradicts the requirement, the agent reports the problem. The planned process requires a separate review, a justified revision and renewed qualification. Results that no longer apply are invalidated.

EXAMPLE / REPORT APPLICABILITY

Can this test result be used to accept the code?

Change the code version or check status. See why acceptance becomes impossible.

EDUCATIONAL SIMULATIONG5
Tested version
revision A
Version to accept
revision A
Required check
PASS
✓ Applicable result

The report covers revision A and the planned checks. Acceptance remains subject to the other required checks, reviews and decisions.

A failed required test blocks acceptance, even if the others pass. Each report identifies the verified code, the check version and the execution environment.

04 / CREATION, EVOLUTION AND MODERNISATIONJOURNEYS DEFINED IN THE SPECIFICATIONS

Create an application,
Or evolve an existing one.

CREATION / FROM FOUNDATION TO ACCEPTANCE

Break the product into verifiable increments.

The specifications support starting from an empty repository: choose the stack and architecture, verify the build and tests, then deliver features incrementally. End-to-end acceptance verifies user journeys and interactions between components.

  1. 01Prepare a foundation that builds, starts and runs its tests.
  2. 02Assign requirements to increments and order their dependencies.
  3. 03Verify APIs and end-to-end journeys at milestones.
Two features tested separately may still be incompatible when assembled. Application acceptance verifies that they work together.
05 / PLANNED ENGINEERING PRACTICESREQUIREMENTS · TESTS · ARCHITECTURE · RISKS

Development practices
expressed as checks.

The specifications call for traceable requirements, qualified tests, architecture rules and risk-based reviews. Each practice must produce an inspectable result.

01
SPECIFICATIONS AND ACCEPTANCE CRITERIA

Link the requirement to the verification result.

Each requirement describes observable behaviour and its acceptance cases. The design and tasks show how to implement it; tests, reports and reviews show how it was verified.

02
TESTS BEFORE CODING AND MUTATION TESTING

Challenge assertions, not just count tests.

The new-behaviour test must fail on the baseline for the expected reason. Coverage measures executed lines; mutation testing checks whether assertions detect code changes. Property-based testing and fuzzing are planned complements.

03
INSTRUCTIONS, CHECKS AND CORRECTIONS

Correct from pinpointed deviations.

The agent receives the requirements, change boundaries and project rules. After verification, it receives failed tests and observed violations. Attempts are limited and stagnation causes a stop.

04
ARCHITECTURE AND INCREMENTAL MIGRATION

Control dependencies between modules.

The assessment compares modules and their dependencies with the adopted architecture. A migration defines stages, coexistence interfaces and rollback. Transition rules prevent new forbidden dependencies.

05
RISK ANALYSIS AND TREATMENT

Choose checks according to change risk.

A data migration calls for integrity and recovery tests. A public API calls for compatibility and security checks. The plan defines the necessary tests, experiments, specialist reviews and human decisions.

06
DEVELOPMENT PROCESS IMPROVEMENT

Measure defects and rework to improve checks.

The review tracks defects found after integration, human rework, lead times and costs. Improvements to instructions or checks are handled as separate changes, evaluated on reference cases.

06 / VERIFY TRANSITIONS AND INVARIANTSTLA+ · fast-check · Lean

Revision, interruption, recovery.
Verify the sequences.

A test result may arrive after the code has changed. Recovery may replay an action already performed. TLA+ explores these sequences; fast-check replays them against the real core to verify process invariants.

TLA+ explores model states; property-based tests exercise the real core; Lean proves targeted properties. These methods are optional and become mandatory only when the protocol requires them.

EXAMPLE / A REPORT COVERS OLD CODE
01

A check starts on revision A.

02

The code moves to revision B.

03

The check for A returns with PASS.

!

The report for A does not verify B. It is necessary to check B.

STALE REPORT → ACCEPTANCE DENIED → REGRESSION TEST
TLA+ / TLC

Verify invariants in a state model.

TLC explores transitions in the TLA+ model within a finite scope. For example, acceptance cannot use a stale report. A violation produces the sequence of actions that caused the defect.

fast-check

Replay sequences against the TypeScript code.

Model traces become tests of the pi-495 core. fast-check also generates action sequences and retains the data needed to reproduce a failure.

Lean

Prove a targeted property of the core.

Lean can prove a property of verdict combination under explicit assumptions. Correspondence tests then compare the TypeScript behaviour with that reference.

TLA+ exploration verifies the declared model; a Lean proof verifies the stated property. TypeScript correspondence tests complement these results without proving that the entire application is bug-free.

07 / PREPARE THE AGENTS’ TECHNICAL CONTEXTROLE-BASED CONTEXT · VERSIONED DOCUMENTATION
MISSION / IMPLEMENTATION AGENT↓
01Objective and acceptance criteriaThe behaviours to implement and error cases.
02Architecture and dependency rulesAuthorised modules and interfaces to preserve.
03Documentation for the versions in useAvailable APIs and relevant official examples.
04Authorised instructions, skills and toolsFiles that may be modified and permitted commands.
05Deviations to correct and expected resultFailed checks and the required report format.
CONTENT PROVIDED TO THE AGENT · RETAINED IN THE RECORD

Role-specific instructions.
Verifiable references.

The implementer receives the requirements and design; the reviewer receives the changes to examine and the applicable rules. pi-495 keeps a manifest of the context provided for each intervention.

Planned developments add resource selection by stage and model capability, along with documentation matching project versions. Important API usage is verified through compilation, executable examples or contract tests.

Permissions depend on the role: produce code, prepare checks or perform a review. The record lets you inspect the instructions and resources received by the agent.

The agent works from project requirements, APIs for the correct version and applicable rules.
08 / CONTROL WORK AND DECISIONSHUMAN REVIEW · RECOVERY · HISTORY

Delegate implementation.
Inspect the changes.

Review differences, answer pending decisions and resume an interrupted change. Time and attempt limits bound the agents’ work.

⌘

Model choice in Pi.

pi-495 is a local, open-source extension. It uses the hosted or compatible local model selected and authenticated in Pi. The provider used is recorded.

▣

Isolated working copies.

The agent modifies a copy of the project with permissions for its stage. You can inspect the files and their differences before locally integrating the accepted candidate.

↻

Pause and resume the change.

Requirements, reports and decisions are retained between sessions. Resumption starts from the recorded state; attempts already consumed remain counted.

≡

Exportable reports and history.

The record contains specifications, code versions, check reports and decisions. The export includes an offline history-integrity verifier.

/495 review/495 decide/495 pause/495 resume/495 export
09 / CHECKS ADAPTED TO YOUR TECHNOLOGYPI EXTENSION · TECHNOLOGY ADAPTERS

Your project’s tools.
One shared process in Pi.

Adapters run the target technology’s tools and translate their reports into a common format. Pi provides agent sessions, model configuration and working interfaces.

Java / Maven

Surefire for tests, JaCoCo for coverage, PIT for mutation testing, and PMD and CPD for quality. Structural checks verify declared Java import boundaries. Checkstyle and SpotBugs are planned.

NATIVE CHECKS

Node / JavaScript / TypeScript

Supported runners: node --test, Vitest, Mocha and Jest. Coverage via LCOV; mutation testing with Stryker under node --test or Vitest. ESLint and jscpd feed the quality baseline; its TypeScript measurements are to be extended.

NATIVE CHECKS

Other technologies

An adapter interface defines project detection, checking capabilities and report parsing. Adding a technology uses its own module, with conformance tests.

EXTENSIBLE BY ADAPTER

Local or hosted

The model selected in Pi must have the required capabilities, including tool calls. OpenAI-compatible local endpoints are supported. pi-495 does not impose an LLM stack.

NO IMPOSED LLM STACK
macOS / Apple SiliconLinux / bubblewrapTUI · RPC · JSON · printApache 2.0
10 / UNDERSTAND THE PROCESS GUARANTEESSCOPE · VERIFICATION · ACCEPTANCE

What is verified.
What you decide.

What is a coding-agent harness?+

A harness organises agent execution: instructions, tools, permissions and sessions. pi-495 adds a development lifecycle: specifications, qualified tests, design, implementation, checks, review and Git integration.

Why is an instruction file not enough?+

An instruction can require preserving an API or respecting a dependency between modules. Those properties must also be verified. pi-495 links instructions to tests, structural checks and reviews whose results determine acceptance.

Must TLA+ and Lean be used for every change?+

No. TLA+ and Lean provide optional formal checks for invariants and interactions that justify them. A routine change can be verified by unit or integration tests, quality checks and code review.

What does “accepted” mean?+

The proposed code version satisfies the mandatory checks, required reviews and human decisions defined by the protocol. A missing check, stale report or tool error does not count as success. The report states what remains unverified.

What happens if the agent cannot complete the work?+

The agent receives failed checks and deviations to correct, within the permitted attempt limit. If the code stops progressing, a capability is missing or a decision is needed, pi-495 preserves the state and explains how to resume.

How does integration into my repository work?+

Local integration is disabled by default. Once authorised in the configuration and the candidate is accepted, /495 integrate applies the change to the local repository and verifies that the integrated tree matches the checked code. Remote publishing and deployment remain part of your delivery pipeline.

11 / START WITH A CONCRETE CHANGEINSTALL · DESCRIBE · VERIFY

Your agents can code.
Give them a method.

Start with a fix or a small feature
on a Maven or Node project whose tests run locally.

01 / INSTALL IN PI
pi install npm:pi-495

Node.js 24+, Pi 1.0.4+, Git. On Linux, bubblewrap must be available.

02 / DESCRIBE THE CHANGE
/495 start add three attempts with increasing delay to the upload client for temporary errors

In Pi, select your model with /model, then start your change.