Skip to content

safal207/LS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,177 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LS — Cooperative Precision Layer for AI Co-work

English | Русский


LS — Cooperative Precision Layer for AI Co-work

CI status Council Safety Gate Cognitive Trail Contract Landing Pages Python 3.9+ Ollama License: Apache-2.0 Rust Powered

Live site: GitHub Pages Community: Roadmap · Task board · Cognitive Trail tasks · Contributing Reviewer ecosystem: Ecosystem Reviewer Index Cooperative precision: Evidence Snapshot · Reviewer Quickstart · Contributor Tasks · Benchmark Note · Metrics · Precision Stack · Network Precision Gain · Stability Probe · Stability Sample · Stability Contract · Stability Evidence Map · Roadmap · Cognitive Trail Network · PR Role Market Benchmark Contributor calls: Network Precision Contributor Call · IDE Testing Entrypoints · Route Stability Contributor Runs · Issue #563 contributor matrix Meta-interaction: Depth Economy Layer · Amygdala Layer Map · Model Roster Depth Probe MCP bridge: LS Trail MCP Server v0.2 Positioning: Project Positioning New here? Start with: Why Star LS · Architecture map · Roadmap · 2-minute route-stability demo

LS is a local-first cooperative precision layer for human-plus-model work. It does not make models magically smarter. It makes repeated cooperation more precise by checking continuity, evidence, consent, routes, and contributions before outputs become actions, memory, or reputation.

LS in 3 minutes

What LS is

LS is an architecture for continuity-aware, identity-aware AI work.

It sits above raw model outputs and turns them into governed artifacts:

  • reviewed route decisions;
  • evidence-bearing trail records;
  • durable memory candidates;
  • governed identity updates;
  • human-reviewable current state.

In short:

raw AI work -> evidence -> governance -> durable memory / identity state

Why LS exists

Most AI systems can produce answers, but they usually do not separate:

  • a single event from a repeated pattern,
  • a repeated pattern from a proposed identity change,
  • a proposed identity change from an approved one,
  • an approved change from the current reconstructed identity state,
  • and all of that from human review.

LS exists to make those boundaries explicit and auditable.

LS Conformance Catalog

LS also acts as a conformance and continuity framework for agent runtimes, memory systems, governance layers, and external clients.

The goal of the conformance catalog is not to require adoption of LS as a whole. The goal is to provide small, portable fixture families that capture recurring failure modes and invariants across real agent ecosystems.

What the catalog covers

The current conformance work focuses on failures such as:

  • missed terminal events and bounded client reconciliation;
  • durable memory being mistaken for spendable authority;
  • constrained tool calls reaching upstream without a valid credential;
  • pending approval being collapsed into missing approval;
  • incomplete record sets being treated as complete authority.

Read these first

The current flagship fixture families live in ls-conformance/:

  1. missed_terminal_event_reconciliation
  2. durable_memory_not_authority
  3. credential_bound_tool_authority

Each fixture family includes:

  • a short problem statement;
  • the core invariant;
  • accept vectors;
  • reject vectors;
  • a minimal machine-readable schema.

Canonical vocabulary for the conformance layer

Term Meaning
Authority spendable permission to act
Memory durable recallable context, not permission
Receipt audit evidence
Credential spendable enforcement material
Phase lifecycle-bound validity window
Seal proof that a record set is terminally complete
Reconciliation bounded recovery after missed or partial observation

Canonical pack issue: LS Conformance Pack v0.1 #757

The current LS identity chain

The repo now contains a full continuity / identity / review path:

VerifiedEpisode
  -> TrackAggregationRecord
  -> IdentityProposalCandidate
  -> GovernanceDecision
  -> IdentityUpdateRecord
  -> RollbackLedger
  -> IdentitySnapshot
  -> Identity Dashboard
  -> IdentityReviewAction

This means LS can model:

  1. what happened (VerifiedEpisode)
  2. what repeated enough to become a pattern (TrackAggregationRecord)
  3. what may change identity (IdentityProposalCandidate)
  4. what governance approved or rejected (GovernanceDecision)
  5. what identity change actually became durable (IdentityUpdateRecord)
  6. what was later rolled back or superseded (RollbackLedger)
  7. who the agent is right now (IdentitySnapshot)
  8. how a human can inspect and challenge that state (Identity Dashboard / IdentityReviewAction)

Where to start reading

If you want the shortest path through the architecture, read in this order:

  1. docs/architecture-map.md
  2. docs/identity-snapshot.md
  3. docs/snapshot-reconstruction.md
  4. docs/identity-dashboard.md
  5. docs/human-review-workflow.md
  6. docs/roadmap.md
  7. ls-conformance/README.md

Current status of the identity architecture

Completed blocks:

  • #710 — continuity coordinator / aggregation / thresholds
  • #717 — identity proposal candidate / governance handoff
  • #721 — identity update record / rollback ledger
  • #727 — identity snapshot reconstruction
  • #742 — identity dashboard / human review surface

The repo also contains parallel LS directions around cooperative precision, PR review trails, route stability, and the personal cognitive garden. The new architecture map and roadmap make it easier to see how those threads connect.

First 10 seconds

LS is for people who use AI heavily and do not want useful sessions to vanish inside chat history.

It turns an AI session into a reviewed update: a goal, skill, decision, evidence item, or growth path. Nothing becomes durable personal memory until a human accepts it.

The core loop:

task -> route -> evidence -> contribution -> decision -> reusable artifact

Skills vs LS Network

Skills are useful instructions for one agent. LS Network is the accumulated experience of routes: memory, metrics, evidence, and contributor signals.

Skills LS Network
static instruction accumulated experience
helps one agent act helps the network choose a route
says how to do the task measures what actually worked
usually does not know who contributed scores role and actor contribution
may skip result verification requires evidence, trace, and route score
lives inside an agent connects Codex, OpenCode, Cursor, and models through MCP

Short version:

skill = instruction
LS Network = verified route experience

First wedge: AI Code Review / PR Review Trail Network. A real git diff can be routed through draft review, risk critique, evidence verification, and final summary, then saved as a reusable trail artifact.

LS also contains a Personal Cognitive Garden direction: useful AI sessions can become human-owned development memory, but only with evidence and human review. The system must grow skill capital without becoming surveillance.

2-minute route-stability demo

python -m pip install jsonschema pytest
PYTHONPATH=.:python:python/modules python -m pytest python/tests/test_nash_route_stability.py
python scripts/run_nash_route_stability_demo.py --json

This checks the current route-stability evidence chain:

schema
-> checked-in sample
-> negative fixtures
-> deterministic probe
-> regression test
-> explicit non-claims

Want to help? Try the network precision contributor call: run the same bounded probe on your OS, model runtime, and hardware. You can also join the route-stability contributor matrix.

Fastest IDE path: in VS Code or Cursor, run Terminal -> Run Task... -> LS: Prepare Contributor Report and paste the generated Markdown report into the contributor issue. In OpenCode, run /ls-precision-report your-github-handle from the repository.

Run the PR-review trail demo:

python3 scripts/run_pr_review_trail_demo.py

PR review trail demo screenshot

Example output from the PR review trail demo command.

PR review trail demo

Build a real PR-review trail artifact from the latest git commit:

python3 scripts/run_pr_review_trail_artifact.py

Build a free-only PR-review route packet for Codex, local models, or human review:

python3 scripts/run_free_pr_review_route.py

Run the Cooperative Role Market demo:

python3 scripts/run_role_market_demo.py

Score cooperative roles over a real PR-style git diff:

python3 scripts/run_pr_role_market_demo.py
python3 scripts/run_pr_role_market_demo.py --role-outputs docs/examples/pr_role_outputs.sample.json
python3 scripts/run_pr_role_market_batch.py --last 10

Run the Nash-style route stability probe:

python3 scripts/run_nash_route_stability_demo.py

Checked-in stability sample:

examples/route-stability/nash_route_stability_sample.json

Boundary: this is a route-stability proxy, not a formal proof of Nash equilibrium.

Reviewer quickstart for Cognitive Trail validation:

python3 scripts/validate_cognitive_trail_runs.py
python3 scripts/generate_pr_review_trail_run.py --last 10 --validate

See: docs/COGNITIVE_TRAIL_EVIDENCE_SNAPSHOT.md Reviewer quickstart: docs/COGNITIVE_TRAIL_REVIEWER_QUICKSTART.md Benchmark note: docs/COGNITIVE_TRAIL_PR_REVIEW_BENCHMARK_NOTE.md Cooperative metrics: docs/COOPERATIVE_PRECISION_METRICS.md Stability sample: examples/route-stability/nash_route_stability_sample.json Stability contract: docs/ROUTE_STABILITY_SAMPLE_CONTRACT.md Stability evidence map: docs/ROUTE_STABILITY_EVIDENCE_MAP.md Contributor tasks: docs/COGNITIVE_TRAIL_CONTRIBUTOR_TASKS.md


Personal AI Operating Layer

LS can be used as a layer above agents, not just as another agent:

  • connect different agents while keeping one center of memory, tone, and quality;
  • shape, repair, hold, or escalate raw outputs before they become action;
  • preserve personal context across models, tools, and sessions;
  • use coordination, relational, and harmonic diagnostics to catch weak or misaligned output early.

Short version:

do not use agents as-is; run them through your own system so they work in your logic, your rhythm, and your quality.

Personal growth direction:

Every AI session should compound into human development.

Run the local Personal Cognitive Garden demo:

python3 scripts/run_personal_cognitive_garden_demo.py
python3 scripts/run_personal_cognitive_garden_demo.py --json

New contributors can use the focused PCG quick start:

See a compact before/after example:

Run the Codex plugin demo:

Safety boundary:

LS must grow human-owned skill capital without becoming a corporate surveillance layer.

See the red-team scenario:

Architecture map

The fastest overview of the current LS architecture lives here:

It shows how the main LS surfaces connect:

  • cognitive trail / review / evidence pipeline
  • personal cognitive garden
  • identity continuity stack
  • MCP bridge and plugin surface
  • route stability and cooperative precision metrics
  • near-term roadmap blocks

If you are new to the repo, start there first.

Quick start

Requirements:

  • Python 3.9+
  • optional local LLM runtime (for some demos)

Install dependencies:

python3 -m pip install -r requirements.txt

Run the demo:

python3 scripts/run_demo.py

This will:

  1. create a small task,
  2. run it through LS,
  3. produce a reusable trail artifact.

How LS differs from a memory wrapper

LS is not just “save conversations and retrieve them later”.

LS adds:

  • route-level evidence and review;
  • contributor and role scoring;
  • explicit approval / rejection / rollback structures;
  • governed durable memory;
  • continuity-aware identity updates;
  • reusable trail artifacts.

Core architecture summary

LS is currently organized around several connected layers:

  • Trail / review layer — capture work, critiques, evidence, and outputs.
  • Governance layer — decide what becomes durable or blocked.
  • Identity layer — accumulate durable changes into a coherent current state.
  • Precision / metrics layer — score route quality and cooperative performance.
  • Personal layer — turn sessions into human-owned growth memory.

Roadmap

See:

Contributing

See:


LS — Кооперативный слой точности для совместной работы человека и ИИ

Русская секция репозитория будет постепенно синхронизироваться с английской по мере стабилизации архитектуры.

Сейчас лучший вход в проект:

Коротко:

LS — это слой над агентами и моделями, который помогает превращать сырые ответы в проверяемые, управляемые и накапливаемые артефакты: следы работы, решения, память, обновления идентичности и личный рост.

Он нужен, чтобы разделять:

  • событие и устойчивый паттерн,
  • память и разрешение действовать,
  • предложение об изменении и одобренное изменение,
  • текущую идентичность и историю её формирования,
  • полезную автоматизацию и потерю человеческого контроля.

About

LS — Cooperative Precision Layer for AI Co-work

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors