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.0a3.tar.gz (405.6 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.0a3-py3-none-any.whl (69.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: piensalo-0.1.0a3.tar.gz
  • Upload date:
  • Size: 405.6 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.0a3.tar.gz
Algorithm Hash digest
SHA256 5ae67338be193f1c4c3fe430dfe1a981f463a727092b931fb999616e47fec756
MD5 a991ca7bf05686e2b836de04f6e5ee79
BLAKE2b-256 cacee48657f97359cedbc2029660fb24df982d55d269a794a756c40d325e9c3c

See more details on using hashes here.

Provenance

The following attestation bundles were made for piensalo-0.1.0a3.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.0a3-py3-none-any.whl.

File metadata

  • Download URL: piensalo-0.1.0a3-py3-none-any.whl
  • Upload date:
  • Size: 69.8 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.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 27bfc61ac15445e9305c76faedabf51adac845ab34aea568f55c13ea0b102292
MD5 5644361d5ec87e64ca9499b9f1df360f
BLAKE2b-256 fb5174afc41e612de78a3dfdd71687bdc9cf23620274d1b94b3b06d854d43324

See more details on using hashes here.

Provenance

The following attestation bundles were made for piensalo-0.1.0a3-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