PSP: Perspt Specification ProposalsΒΆ
PSP (Perspt Specification Proposals) is the process by which Perspt designs and implements new features in a structured, reviewable manner.
OverviewΒΆ
PSPs are design documents that describe proposed features, architectural changes, or process improvements for Perspt. They are inspired by PEPs (Python Enhancement Proposals) and RFCs (Request for Comments).
![digraph psp {
rankdir=LR;
node [shape=box, style="rounded,filled", fontname="Helvetica", fontsize=10];
draft [label="Draft", fillcolor="#E3F2FD"];
review [label="Under Review", fillcolor="#FFF3E0"];
accepted [label="Accepted", fillcolor="#E8F5E9"];
implemented [label="Implemented", fillcolor="#C8E6C9"];
rejected [label="Rejected", fillcolor="#FFCDD2"];
draft -> review;
review -> accepted;
review -> rejected;
accepted -> implemented;
}](../_images/graphviz-683a6927a0df9ee47a582eb9ffaecfbb51607e0f.png)
PSP LifecycleΒΆ
PSP FormatΒΆ
Each PSP follows a standard format in reStructuredText:
:PSP: 000N
:Title: Feature Name
:Author: Name <email@example.com>
:Status: Draft | Under Review | Accepted | Implemented | Rejected
:Created: YYYY-MM-DD
:Updated: YYYY-MM-DD
Abstract
--------
One-paragraph summary.
Motivation
----------
Why is this needed?
Specification
-------------
Technical details.
Implementation
--------------
How will it be implemented?
Rationale
---------
Why this approach?
Reference Implementation
------------------------
Links to code.
Current PSPsΒΆ
PSP |
Title |
Status |
Description |
|---|---|---|---|
PSP-0001 |
PSP Process |
Implemented |
This document |
PSP-0002 |
Multi-Provider Architecture |
Implemented |
GenAI-based unified provider |
PSP-0003 |
Configuration System |
Implemented |
JSON config with env vars |
PSP-0004 |
SRBN Agent Mode |
Implemented |
Stabilized Recursive Barrier Network |
PSP-0004: SRBN Agent ModeΒΆ
The most significant PSP, introducing autonomous coding capabilities.
Key Components:
Orchestrator β SRBN control loop
Lyapunov Energy β Stability measurement (V_syn, V_str, V_log)
Model Tiers β Architect, Actuator, Verifier, Speculator
Retry Policy β Bounded retries with escalation
Merkle Ledger β Change tracking with rollback
State Machine:
![digraph psp4 {
rankdir=TB;
node [shape=box, style="rounded,filled", fontname="Helvetica", fontsize=10];
idle [label="Idle", fillcolor="#E3F2FD"];
sheaf [label="Sheafifying", fillcolor="#FFF3E0"];
spec [label="Speculating", fillcolor="#E8F5E9"];
verify [label="Verifying", fillcolor="#F3E5F5"];
review [label="Awaiting Review", fillcolor="#FFECB3"];
commit [label="Committing", fillcolor="#C8E6C9"];
failed [label="Failed", fillcolor="#FFCDD2"];
idle -> sheaf [label="task received"];
sheaf -> spec [label="plan ready"];
sheaf -> failed [label="sheaf fail (3x)"];
spec -> verify [label="code generated"];
verify -> spec [label="V(x) > Ξ΅"];
verify -> review [label="manual approval"];
review -> commit [label="approved"];
review -> spec [label="rejected, retry"];
review -> failed [label="rejected (3x)"];
verify -> commit [label="V(x) β€ Ξ΅"];
commit -> idle [label="done"];
}](../_images/graphviz-17164926a0aa96d1beaebb99d2f98ee2e00d8728.png)
Creating a PSPΒΆ
Assign Number: Get the next PSP number from the maintainers
Create File:
docs/psps/source/psp-00000N.rstWrite Draft: Follow the template format
Submit PR: Open a pull request with the PSP
Review: Gather feedback and iterate
Accept/Reject: Maintainers decide on the proposal
PSP RepositoryΒΆ
All PSPs are stored in the docs/psps/ directory:
docs/psps/
βββ source/
β βββ psp-000001.rst # PSP Process
β βββ psp-000002.rst # Multi-Provider
β βββ psp-000003.rst # Configuration
β βββ psp-000004.rst # SRBN Agent Mode
βββ Makefile
See AlsoΒΆ
SRBN Architecture - Technical details of SRBN
Contributing - How to contribute