Skip to main content

A cognitive operating layer for AI models: bounded loops, observable-defect inspection, targeted repair, and layered verification.

Project description

PIÉNSALO

Give any AI a better way to think.

The open artificial cortex for AI.

PIÉNSALO is a model-independent cognitive operating system that helps AI models and agents understand the real objective, structure difficult work, inspect their output, repair specific failures, verify the result, know when not to intervene, preserve evidence, and continue across sessions.

Created by Rafael “Ralph” Peña. Piénsalo — "think it through." Pronounced: pee-EN-sa-lo.

Status: public alpha. The runtime, portable skills, packaging, evaluation harness, and core verification workflows are tested. Current live experimental evidence is primarily from the Claude model family; cross-model validation, independent reproduction, and real-world case studies are expanding in public.

The wedge, in one sentence: give PIÉNSALO a task and an AI's draft — it finds what was actually missed, leaves correct work alone, emits the smallest justified repair when one is warranted, verifies what can honestly be verified, and says NO REPAIR NEEDED when intervention would only cause harm.

60 seconds, for real

Every line below is real output from the shipped CLI — the transcript is committed at examples/flagship/TRANSCRIPT.md and a CI test re-runs the demo and fails if this ever drifts.

A quote task applies two sequential discounts (20%, then 15%). The AI draft added them (35% off → $221.00) instead of compounding (→ $231.20):

$ piensalo inspect --task examples/flagship/task.md \
    --draft examples/flagship/draft-broken.md \
    --contract examples/flagship/contract.json
selected repair(s): rederive-the-numbers
  evidence: asserts a figure with no visible derivation on a multi-rate task

$ piensalo verify --task examples/flagship/task.md \
    --draft examples/flagship/draft-broken.md \
    --contract examples/flagship/contract.json
FAILED
  QUOTE_USD: 221.00 != expected 231.20
[exit: 1]

piensalo repair then emits a repair packet — the complete, ready-to-run prompt for your model, honestly labeled: "instructions for a model; nothing has been applied." (With --adapter, it runs the packet through a model you explicitly choose, writes the repaired draft to a new file with a provenance sidecar, and re-inspects the result — it never claims success just because a model returned text.)

And on a draft that is already right:

$ piensalo inspect --task examples/flagship/task.md \
    --draft examples/flagship/draft-correct.md \
    --contract examples/flagship/contract.json
NO REPAIR NEEDED — no observable defect cleared the activation threshold.

$ piensalo verify --task examples/flagship/task.md \
    --draft examples/flagship/draft-correct.md \
    --contract examples/flagship/contract.json
DETERMINISTICALLY VERIFIED
  QUOTE_USD: 231.20 == expected
CONTRACT VERIFIED
UNMEASURED
  cognition: UNMEASURED (no verifier configured — this is not a pass)

Run the whole thing yourself: bash examples/flagship/demo.sh

Install

# From PyPI
uvx piensalo doctor
pipx install piensalo

# Directly from GitHub
uvx --from git+https://github.com/ralfyishere/piensalo piensalo doctor

# From a clone (development)
git clone https://github.com/ralfyishere/piensalo.git && cd piensalo
uv sync && uv run piensalo doctor

# Portable Agent Skills only (no runtime needed)
npx skills add ralfyishere/piensalo

doctor verifies your environment and confirms the core runs fully offline — no telemetry, no network, nothing leaves your machine. Python ≥ 3.10; tested in CI on Linux and macOS, Python 3.10–3.13 (Windows unsupported for now).

How the workflow behaves

TASK → DRAFT → INSPECT → ABSTAIN or TARGETED REPAIR → VERIFY → FINAL ARTIFACT
  • inspect detects observable defects with evidence lines — never vibes.
  • repair has two honest modes: offline (emit the packet) or adapter-backed (--adapter claude-cli|openai|ollama|manual, --model, --output) — original draft preserved, provenance recorded, result re-inspected.
  • verify reports in five strict buckets — DETERMINISTICALLY VERIFIED, CONTRACT VERIFIED, MODEL-ASSISTED CHECK, UNMEASURED, FAILED — and UNMEASURED never counts as a pass.
  • think compiles a task (file or inline text) into a bounded cognitive program; loop keeps long-running work resumable with model provenance; skill manages the portable skill packages.
  • Silent model fallback is prohibited by design: adapters record requested and resolved model and stop on mismatch.

Why trust it

Every capability ships with receipts. Two pre-registered 120-cell controlled runs sit behind the defaults — including the finding that forced repair on already-correct drafts damages delivery ~29% of the time while never corrupting cognition. That is why abstention is the default posture.

  • EVIDENCE.md — mechanism records with maturity levels (DESIGNED → … → PROMOTED, with NARROW and REJECTED as honest terminal states; nothing is PROMOTED yet)
  • BENCHMARKS.md — run designs and numbers, confounds attached
  • NEGATIVE-RESULTS.md — the eight failures we keep public on purpose
  • Reproduce: make benchmark (no API key needed) · full harness in evals/
  • Current limits, honestly: one model family live-tested (Claude); n = 8 tasks per run; OpenAI-compatible/Ollama adapters are unit-tested with live validation pending; no independent reproduction yet. Help change that: docs/alpha/SUBMIT-RESULTS.md.

Going deeper

  • 27 portable skill packages: skills/ (8 domain) + micro-skills/ (19 focused repairs) — each with triggers, counterindications, an evidence level, and a near-miss example; installable into any agent that speaks Agent Skills.
  • The cognitive core (11 operations, human- and machine-readable): src/piensalo/core/
  • Architecture, methodology, evidence levels: docs/ · export provenance and hash manifest: docs/provenance/

Security

Offline by default; no telemetry; no shell execution from untrusted skill text; skill packages scannable with piensalo skill scan. Threat model: docs/THREAT-MODEL.md. Sensitive reports: GitHub Private Vulnerability Reporting (SECURITY.md).

Contributing

Real-task results are the most valuable contribution — all five outcomes, including "it correctly did nothing" and "it invented a problem": docs/alpha/SUBMIT-RESULTS.md. Code, skills, verifiers, adapters: CONTRIBUTING.md — every contribution meets the same evidence and security bar. Principles: MANIFESTO.md.

Creator

PIÉNSALO was created by Rafael “Ralph” Peña.

It began as an attempt to preserve and transfer powerful AI problem-solving behavior. The experiments showed that larger prompts alone were not enough: some interventions helped, while others overloaded weaker models, damaged correct delivery, routed incorrectly, or created false confidence.

PIÉNSALO was built from the mechanisms that survived the evidence — the full story is in docs/origin-story.md.

Think through hard work. Verify what matters. Know when to stop.

Piénsalo is an independent open-source project. It is not affiliated with or endorsed by Anthropic.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

piensalo-0.1.0a2.tar.gz (405.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

piensalo-0.1.0a2-py3-none-any.whl (69.6 kB view details)

Uploaded Python 3

File details

Details for the file piensalo-0.1.0a2.tar.gz.

File metadata

  • Download URL: piensalo-0.1.0a2.tar.gz
  • Upload date:
  • Size: 405.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for piensalo-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 36e513f9f588834cf73cfcdd1fbc9a13e018570148b3f919bd9f1fa214215a4f
MD5 5dc2ae0c5ae1b8795f32292e5f2d3ade
BLAKE2b-256 be8632b058d63ce939b7336edba80e81cc13b27a684114f0e3ac208bbdb1f4af

See more details on using hashes here.

Provenance

The following attestation bundles were made for piensalo-0.1.0a2.tar.gz:

Publisher: publish.yml on ralfyishere/piensalo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file piensalo-0.1.0a2-py3-none-any.whl.

File metadata

  • Download URL: piensalo-0.1.0a2-py3-none-any.whl
  • Upload date:
  • Size: 69.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for piensalo-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 d194663e51781989fefb464324d6746ebc95ef9fe603614b1ec40fd28c5e0dd5
MD5 662ca810e53b5e2827b10477f89a8e50
BLAKE2b-256 682bd73c21751101ba2aca81f477a101803fec8eda7abf4d6bf2241cc1d10f9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for piensalo-0.1.0a2-py3-none-any.whl:

Publisher: publish.yml on ralfyishere/piensalo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page