Turing Pyramid
Prioritized action selection for AI agents. 10 needs with tension scoring, execution-gate tracking, optional continuity scripts, and an opt-in watchdog. Use... Skill: Turing Pyramid Owner: tensusds Summary: Prioritized action selection for AI agents. 10 needs with tension scoring, execution-gate tracking, optional continuity scripts, and an opt-in watchdog. Use... Tags: latest:1.34.10 Version history: v1.34.10 | 2026-05-10T04:55:43.328Z | user Test timeout calibration, version metadata sync, and deliberation test robustness. Full suite: 35/35 passed, 0 skipped. v1.34.9 | 20
Rank
62
Safety
84
Downloads
3.0k
Updated
Oct 9, 2026
Version
1.34.10
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 3K downloads reported by the source. Last updated 10/9/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 9, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 9, 2026
- Adoption signal
- 3K downloadsadoption · observed Oct 9, 2026
- Latest release
- 1.34.10release · observed May 10, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s179gnbng0bt8pcqdafa5emhn583fj5e:turing-pyramid- Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-tensusds-turing-pyramid/snapshot"
Documentation
CLAWHUB
160,000 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: turing-pyramid
description: Prioritized action selection for AI agents. 10 needs with tension scoring, execution-gate tracking, optional continuity scripts, and an opt-in watchdog. Use when an agent needs local stateful action prioritization inside an isolated WORKSPACE. Read the deployment tiers and security warnings before enabling cron, watchdog kill/cleanup, or optional external-model scanning.
metadata:
clawdbot:
emoji: "🔺"
requires:
env:
- WORKSPACE
optional_env:
- MINDSTATE_ASSETS_DIR
- SKIP_SCANS
- SKIP_SPONTANEITY
- TURING_CALLER
- SKIP_GATE
bins:
- bash
- jq
- bc
- grep
- find
- flock
- pgrep
- df
- kill
- gzip
---
# 🔺 Turing Pyramid
**What it does:** Gives your agent a motivation system. 10 needs (security, connection, expression...) build tension over time via decay. Each heartbeat, the pyramid evaluates tensions, selects actions, and tells the agent what to do — from "check system health" to "write something creative."
**What it is NOT:** A chatbot framework, an executor, or a system management tool.
**Three layers with different scopes:**
⚠️ **Safety summary**
- This skill is **not stateless**. It writes its own state and audit files (`needs-state.json`, `audit.log`, `followups.jsonl`, `MINDSTATE.md`, watchdog logs).
- This skill reads files under `WORKSPACE`. If `WORKSPACE` points at a sensitive directory, the skill can scan sensitive files there.
- `allow_kill` and `allow_cleanup` are **off by default** and should be treated as elevated, opt-in features.
- `external-model` scanning is **off by default** and should only be enabled after explicitly documenting the credential source and intended API.
**Three layers with different scopes:**
| Layer | Scripts | Scope | System effects |
|-------|---------|-------|----------------|
| **Motivation** | `run-cycle.sh`, `mark-satisfied.sh`, `init.sh` | Read workspace files, write own state JSON | None — pure suggestion engine |
| **Continuity** | `mindstate-daemon.sh`, `mindstate-freeze.sh`, `mindstate-boot.sh` | Read workspace + own state, write MINDSTATE.md | Read-only system checks: `pgrep` (gateway alive?), `df` (disk usage). No writes outside workspace. |
| **Resilience** | `mindstate-watchdog.sh` | Monitor continuity scripts | **Default: detect + log only.** With `allow_kill: true`: terminates hung `mindstate-*.sh` processes (path-anchored, never other PIDs). With `allow_cleanup: true`: deletes orphan `.tmp` files in workspace + assets dir. Auto-freeze is always safe. |
Core motivation scripts make **no network calls by default**. Some actions in needs-config.json are tagged `"external": true` (e.g., web search, check for updates) — these are text suggestions to the agent, not executed by the scripts themselves. The optional `external-model` scan method (disabled by default) can call an inference API if explicitl_meta.json
{
"ownerId": "kn78gved9wvv1egbx53rr9exb981pawp",
"slug": "turing-pyramid",
"version": "1.34.10",
"publishedAt": 1778388943328
}references/architecture.md
# Turing Pyramid — Architecture Reference
## Overview
The Turing Pyramid is a needs-based motivation system for AI agents, inspired by:
- **Priority hierarchy** — base needs → growth needs
- **Self-Determination Theory** — autonomy, competence, relatedness
- Adapted for discrete, session-based agent operation
## Core Concepts
### Need
A tracked requirement that, when unsatisfied, creates tension driving action.
```
Need {
importance: 1-10 // position in hierarchy
decay_rate_hours: number // how fast satisfaction drops
satisfaction: 0-3 // current level
actions: Action[] // ways to satisfy
}
```
### Satisfaction Levels
```
3 = full — no pressure, need met
2 = ok — slight awareness, no urgency
1 = low — noticeable pull, should address
0 = empty — critical, demands attention
```
### Deprivation
Inverse of satisfaction: `deprivation = 3 - satisfaction`
### Tension
Priority score: `tension = importance × deprivation`
Higher tension = addressed first.
## The Algorithm
### Phase 1: Evaluate
For each need:
```python
# Time-based decay
hours_since = (now - last_satisfied) / 3600
decay_steps = floor(hours_since / decay_rate_hours)
time_satisfaction = max(0, 3 - decay_steps)
# Event-based scan (can only worsen)
event_satisfaction = run_scan(need)
# Merge: take worst
if event_satisfaction is not None:
satisfaction = min(time_satisfaction, event_satisfaction)
else:
satisfaction = time_satisfaction
# Calculate tension
deprivation = 3 - satisfaction
tension = importance × deprivation
```
### Phase 2: Rank & Select
```python
ranked = sort(needs, key=lambda n: n.tension, reverse=True)
selected = ranked[:max_actions_per_cycle] # top 3
if all(n.tension == 0 for n in needs):
return "SATISFIED" # nothing to do
```
### Phase 3: Output Suggestions
The skill **outputs text suggestions** — it does NOT execute actions.
```python
for need in selected_needs:
action = weighted_random_select(need.actions, satisfaction)
# OUTPUT to stdout — agent reads this
print(f"▶ ACTION: {need.name} (tension={tension})")
print(f" Suggested: {action.name} (impact: {action.impact})")
print(f" Then: mark-satisfied.sh {need.name} {action.impact}")
```
**What happens next is up to the AGENT:**
1. Agent reads the suggestion text
2. Agent decides: execute? skip? ask human?
3. If agent acts, agent uses its own tools (web_search, APIs, etc.)
4. Agent calls `mark-satisfied.sh` to update state
The skill has no knowledge of whether the action was performed.
### Phase 4: State Update (Agent-Initiated)
When the **agent** completes an action, it calls:
```bash
./scripts/mark-satisfied.sh <need> [impact]
```
This updates `needs-state.json` with new satisfaction and timestamp.
**The skill never verifies execution** — it trusts the agent's call to mark-satisfied.
### Logging (Optional)
Agent may append to `memory/YYYY-MM-DD.md`:
```markdown
## HH:MM — Turing Pyramid Cycle
| Need | Tension | Actreferences/TUNING.md
# Tuning Guide for Agents
This guide explains what you can customize and when to consult your human.
---
## 🎚️ Decay Rates
**Location**: `assets/needs-config.json` → `needs.<name>.decay_rate_hours`
| Need | Default | Why this default | When to change |
|------|---------|------------------|----------------|
| security | 168h (7 days) | Backups don't need daily checks | Lower if you're paranoid, higher if stable setup |
| integrity | 72h (3 days) | Values drift slowly | Lower if you're in rapid change, higher if stable |
| coherence | 24h | Memory gets messy daily | Lower if very active, higher if minimal notes |
| closure | 8h | Open threads create anxiety | Lower if you hate loose ends, higher if relaxed |
| autonomy | 24h | Need regular self-direction | Lower if you feel passive, higher if very autonomous |
| connection | 4h | Social bonds need maintenance | Lower if very social, higher if introverted |
| competence | 48h | Skills need regular exercise | Lower if learning fast, higher if in maintenance mode |
| understanding | 12h | Curiosity builds up | Lower if intellectually hungry, higher if saturated |
| recognition | 72h | Feedback isn't constant | Lower if you need validation, higher if self-assured |
| expression | 6h | Thoughts need outlet | Lower if very creative, higher if reflective |
**Rule of thumb**: If you're always seeing a need at sat=0, decay is too fast. If never triggered, too slow.
---
## ⚖️ Action Weights
**Location**: `assets/needs-config.json` → `needs.<name>.actions[].weight`
Weights control probability within an impact level. Example:
```json
"actions": [
{"name": "action A", "impact": 2, "weight": 70},
{"name": "action B", "impact": 2, "weight": 30}
]
```
If impact 2 is rolled, there's 70% chance of A, 30% chance of B.
**Tuning tips**:
- Set weight=0 to disable an action entirely
- Higher weight = more likely to be suggested
- Weights are relative (70/30 = same as 7/3)
**Common adjustments**:
- No social platform? Set all social platform action weights to 0
- No steward interaction? Reduce "ask steward" weights
- Prefer journaling over posting? Boost memory actions, reduce social
---
## 📊 Impact Distribution
**Location**: `assets/needs-config.json` → `impact_matrix_default`
```json
"impact_matrix_default": {
"sat_0": {"1": 5, "2": 15, "3": 80}, // Critical → big actions
"sat_1": {"1": 15, "2": 50, "3": 35}, // Low → medium actions
"sat_2": {"1": 70, "2": 25, "3": 5} // OK → small maintenance
}
```
This controls what size action is suggested based on satisfaction level.
**Reading it**:
- sat_0 (critical): 80% chance of impact-3 (major action)
- sat_2 (OK): 70% chance of impact-1 (minor action)
**When to tune**:
- Always getting big actions? Shift probabilities toward impact-1
- Want more intensity? Shift toward impact-3
---
## 🔍 Scan Scripts
**Location**: `scripts/scan_<need>.sh`
Each need has a scan that checks workspace for events. Scans return 0-3:
- 3 = strong positive siscripts/CLAUDE.md
<claude-mem-context> # Recent Activity <!-- This section is auto-generated by claude-mem. Edit content outside the tags. --> ### Mar 25, 2026 | ID | Time | T | Title | Read | |----|------|---|-------|------| | #4956 | 1:50 AM | 🔵 | Execution gate proposal system examined for action registration and evidence tracking | ~678 | | #4950 | 1:48 AM | 🔵 | Competence scanner demonstrates configurable scan methods with positive-context-wins logic | ~732 | | #4948 | 1:47 AM | 🔵 | Scan helper library examined revealing shared scanning infrastructure and negation detection | ~711 | | #4946 | " | 🔵 | Recognition need scanner implementation examined for event-sensitive feedback detection | ~633 | | #4943 | 1:46 AM | 🔵 | Turing Pyramid initialization and operational setup process examined | ~699 | </claude-mem-context>
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/tensusds/skills/turing-pyramid",
"sourceUrl": "https://clawhub.ai/tensusds/skills/turing-pyramid",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T10:34:56.712Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-tensusds-turing-pyramid/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-tensusds-turing-pyramid/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-09T10:34:56.712Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "3K downloads",
"href": "https://clawhub.ai/tensusds/turing-pyramid",
"sourceUrl": "https://clawhub.ai/tensusds/turing-pyramid",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T10:34:56.712Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.34.10",
"href": "https://clawhub.ai/tensusds/turing-pyramid",
"sourceUrl": "https://clawhub.ai/tensusds/turing-pyramid",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-05-10T04:55:43.328Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-tensusds-turing-pyramid/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-tensusds-turing-pyramid/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.34.10",
"description": "Test timeout calibration, version metadata sync, and deliberation test robustness. Full suite: 35/35 passed, 0 skipped.",
"href": "https://clawhub.ai/tensusds/turing-pyramid",
"sourceUrl": "https://clawhub.ai/tensusds/turing-pyramid",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-05-10T04:55:43.328Z",
"isPublic": true
}
]
}Record generated Oct 10, 2026.
