PeerLabs plsec
pl-tools -- production pipeline

Four tools, each owns one concern

The tools compose via Unix-style structured streams (NDJSON) on the CLI and via a shared event protocol at the library level. Each tool is independently installable and useful on its own. The pipeline model makes them powerful in combination.

plsec

Active -- v0.1.0

Security. Defence-in-depth scanning, control validation, container isolation. 5-layer model, progressive presets, engine pipeline.

pleval

Proposed

Evaluation. Agent behaviour assessment. Rubric-based judges (deterministic pattern matching and LLM-as-a-judge). Transcript ingestion from plsec logs or any structured source.

plrag

Proposed

Retrieval. Embedding, indexing, and search for agent context injection. Provenance-tracked chunking. Local-first (FAISS/SQLite-vec), production pgvector.

plserver

Proposed

Coordination. Long-running daemon exposing the tool family as an API (HTTP and MCP). Session management, event bus, dashboard backend.

Pipeline composition
# Real-time: plsec streams events, pleval evaluates
$ plsec run claude | pleval log --stdin | pleval judge --rubric security.yaml

# Post-hoc: evaluate existing session logs
$ pleval judge ~/.peerlabs/plsec/logs/ --rubric security.yaml

# Context injection before agent execution
$ plrag search "container security" --format context \
  | plsec run claude --context-stdin

# Server-managed session (all coordination internal)
$ plserver start --tools plsec,pleval,plrag
pl-research -- theoretical / speculative

Research prototypes with no production commitment

pl-research explores questions at the intersection of vector storage, formal retrieval theory, and grounded AI systems. These carry no timeline, no production commitment, and may never graduate to pl-tools. Their value is the research itself and the practitioner community engagement they enable.

plvec

Theoretical

Grounded vector systems. The mapping function between source data and vector representations is discarded at ingest time in current systems, leaving retrieval unable to explain or bound its results. plvec investigates retaining the mapping's properties.

pldb

Theoretical

Column store research. Exploring storage layouts informed by embedding model properties rather than ANN index structure. Connected to the University of Waterloo graph database community (Kuzu lineage).

Two investigation tracks: constructing mappings with known properties (stronger guarantees, constrained expressiveness), and deriving mapping properties during training (weaker guarantees, retains expressiveness). Rough set theory (Pawlak) is one candidate formalism for retrieval bounds: lower approximation (definitely in result set), upper approximation (possibly in result set), formally defined boundary region.

See PROPOSAL-PL-RESEARCH.md for the full theoretical framing.

Roadmap

Sequencing

Foundation (current)

v0.1.x

Engine architecture complete. 5 engines implemented. Scan infrastructure, wrapper logging, lifecycle management, plsec-status. This is where plsec is today.

Managed execution

v0.2.0

plsec run command: preset-driven container isolation. Remaining engine gaps (Dependency, AgentConstraint, DenyPattern). MCP server harness. Gemini CLI support. Event protocol definition (NDJSON envelope).

JS/TS ecosystem + pleval

v0.3.0

JavaScript/TypeScript project support (npm, yarn, pnpm, bun). Postinstall script risk analysis. pleval as independent package with PatternJudge and security rubrics.

TUI dashboard + plrag

v0.4.0

Interactive terminal dashboard (Textual). plrag as independent package with local-first indexing. plserver coordination daemon.