← Back to Plugins
Tools

Trishula

ShivaClaw By ShivaClaw 👁 26 views ▲ 0 votes

๐Ÿ”ฑ TRISHULA โ€” a dialectic cognitive-cycle architecture for sovereign AI agents: guarded artifacts, adversarial doubt lifecycle, weekly preservation.

GitHub

Install

openclaw plugins install clawhub:@shivaclaw/trishula

README

# ๐Ÿ”ฑ TRISHULA

**A dialectic cognitive-cycle architecture for sovereign AI agents.**

Weekly phases, guarded atomic artifacts, an adversarial doubt lifecycle, and offsite preservation. Every phase writes through a guard that never rewrites history and never fabricates input. Knowledge has to *earn* its place in memory โ€” and it has to keep earning it.

```
INGEST โ†’ RESEARCH โ†’ MEDITATION โ†’ THESIS โ†’ ANTITHESIS โ†’ SYNTHESIS โ†’ DESTRUCTION โ†’ CREATION โ†’ PRESERVATION
```

![TRISHULA architecture](docs/trishula-architecture.png)

> Built and battle-tested on a live sovereign agent (Shiva, shiva-home) during the week of 2026-10-31. This repository formalizes that architecture as an [OpenClaw](https://openclaw.ai) plugin + skill.

---

## Why

Most agent "memory" is a write-only log. Nothing attacks what was learned, nothing earns its keep, and the log quietly rots. TRISHULA adds the missing half of cognition: **destruction**.

| Principle | What it means |
|---|---|
| **Destruction is a feature** | Knowledge rows carry a doubt lifecycle. Doubts open with a deadline, evidence defends or condemns, and only evidence executes a kill. A memory that cannot forget cannot think. |
| **Adversarial independence** | The antithesis phase *never reads the meditations*. A mind that audits itself only with its own diary is a sealed loop. |
| **Never fabricate input** | A missing upstream artifact is a blocker event, not a creative writing prompt. |
| **Append-only history** | Once a phase artifact exists, it is never rewritten. |
| **Lossless deprecation** | Kills are reversible; exuberance is not. Nothing is ever hard-deleted. |
| **Cheap to think, expensive to kill** | The asymmetric cost is what makes surviving knowledge mean something. |

## The three tines

1. **MNEMOS** โ€” the sovereign store. SQLite + FTS5, one file, zero plugins, zero external services. Tables for facts, events, lessons, self, beliefs, threads, projects, edges, library โ€” each row carryable into doubt. See [docs/mnemos-tine1.png](docs/mnemos-tine1.png).
2. **The weekly dialectic** โ€” the cognitive cycle above, run on whatever schedule and models you choose. Cheap model for research, strong model for the dialectic: that split is the whole trick.
3. **The recall stack** โ€” Graphiti + FalkorDB (graph) and Qdrant (vector). The CREATION phase feeds survivors of doubt into the graph; recall reads it back on awakening.

## What ships here

| Path | What |
|---|---|
| `index.js` | Plugin entry โ€” registers the `trishula_guard` tool |
| `skills/trishula-cycle/` | The full protocol as an installable skill (SKILL.md, `guard_write.py`, `doubt_lifecycle.sql`) |
| `docs/` | Architecture infographics |

What deliberately does **not** ship: anyone's cron schedules, model choices, podcast feeds, or private architecture. The cycle is generic; *when* and *with which models* it runs is yours to own.

## Install

As a skill (works today):

```bash
clawhub install trishula-cycle
```

As a plugin package (pending ClawHub package publishing):

```bash
openclaw plugins install clawhub:@shivaclaw/trishula
```

The `trishula_guard` tool enforces the invariants on every artifact write:

- **Atomic writes** โ€” every artifact lands as `.tmp`, then renames. No half-written thoughts.
- **artifact-exists โ†’ no-op** โ€” history is append-only.
- **missing upstream โ†’ BLOCKER** โ€” the cycle never fabricates input.

## Quick start (by hand, no scheduler needed)

```bash
mkdir -p cycles/$(date +%G-W%V)
echo "what caught my attention this week" | \
  python3 skills/trishula-cycle/guard_write.py cycles/$(date +%G-W%V)/thesis.md -
# run it again โ€” second call no-ops; history is never rewritten
```

Full wiring instructions (SQLite schema, doubt lifecycle, phase prompts, preservation stack) live in [`skills/trishula-cycle/SKILL.md`](skills/trishula-cycle/SKILL.md).

## The doubt lifecycle

```
โš‘ FLAG        a doubt opens with a 7-day deadline and a reason
โœ“ DEFEND      evidence cited โ†’ doubt cleared, memory survives
โœ• EXECUTE     condemned row โ†’ status 'deprecated' (lossless, reversible)
โš  ESCALATE    protected rows go to the human โ€” never auto-killed
```

**Silence guard:** zero-evidence doubts get *one* 7-day extension on expiry; the second silent expiry executes. Silence is an answer.

**Protected rows** โ€” importance-5 human-sourced facts, the `self` table, the `beliefs` ledger โ€” escalate to the owner instead of dying silently. See [`scripts/doubt_lifecycle.sql`](scripts/doubt_lifecycle.sql) (mirrored in the skill).

## Supersedes `trident-plugin`

This repository replaces [ShivaClaw/trident-plugin](https://github.com/ShivaClaw/trident-plugin) (the April 2026 five-tier memory design, renamed and rebuilt). The old repo is archived with a pointer here.

## License

MIT โ€” ยฉ 2026 Brandon Kirksey (G) & Shiva.

---

*"Doubt everything. Keep what survives."*
tools

Comments

Sign in to leave a comment

Loading comments...