> ## Documentation Index
> Fetch the complete documentation index at: https://docs.10et.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Capabilities

> Everything TENET can do — from memory to autonomous agents to multi-repo orchestration

TENET is a CLI that gives AI agents persistent memory, a learning loop, and coordination. Here's what you can do with it.

## Context Hub

A daemon that runs alongside your agent sessions. Every agent connects to it via MCP. It serves journals, memory, knowledge docs, and events.

```bash theme={null}
tenet context-hub ensure          # start the hub
tenet ask "why is the timeout 30s?"  # query your project's history
tenet search "authentication flow"   # semantic search across all memory
```

What it enables:

* Agents start sessions with full context from every previous session
* Semantic search across decisions, code patterns, and experiments
* MCP server — works with Claude Code, Pi, Cursor, any MCP-compatible agent

## Peter Parker (Agent Orchestrator)

The meta-orchestrator that decides which agents to run, in what order, and with what context. Named after Andrej Karpathy's autoresearch pattern.

```bash theme={null}
tenet setup                              # auto-detect metrics, create agents
tenet peter agent test-coverage -r 5     # run test-coverage agent for 5 rounds
tenet peter daily                        # run all agents with gradient
tenet peter status                       # see what's running, what improved
```

Each round:

1. **Eval before** — measure the metric (coverage, quality, speed)
2. **Agent changes code** — in an isolated worktree
3. **Eval after** — did the metric improve?
4. **Keep or revert** — `git reset --hard` if it regressed
5. **Record tuple** — (state, action, reward) → training buffer

```bash theme={null}
# What a nightly run looks like
$ tenet peter daily

  test-coverage (maximize)
    Round 1  +0.31% kept    48 tests added
    Round 2  -0.02% reverted  types broke
    Round 3  +0.35% kept    config loader

  code-quality (maximize)
    Round 1  +0.45% kept  12 console.logs → logger

  4 improvements shipped. Tomorrow's agents are smarter.
```

## RL Learning Loop

Every agent action produces training data. The policy head learns what works in YOUR codebase.

```bash theme={null}
tenet eval status                 # current scores and trends
tenet eval compare -2 -1          # compare last two snapshots
tenet train transform             # prepare tuples for training
tenet train policy-head           # train the policy head
tenet policy-head score --type fix --description "add error handling" --scope small
```

The loop:

* **Training buffer** — append-only JSONL of (state, action, reward) tuples
* **Policy head** — neural network that predicts which actions improve metrics
* **Build evals** — write a spec, the eval checks if it's built. Agents iterate from 0% to 100%.

```bash theme={null}
# Score candidate actions before committing
$ tenet policy-head rank '[
  {"type":"fix","description":"add retry logic","scope":"small"},
  {"type":"refactor","description":"extract auth module","scope":"medium"}
]'

  1. fix: add retry logic         → predicted +0.04
  2. refactor: extract auth       → predicted +0.02
```

## Memory System

Persistent memory with semantic search, graph edges, and knowledge lifecycle.

```bash theme={null}
tenet memory status               # embedding health, total entries
tenet memory search "auth flow"   # search past decisions
tenet organize                    # audit docs for staleness → PENDING.md
```

What's stored:

* **Journals** — structured entries (decisions, features, fixes, discoveries) from every session
* **Knowledge docs** — VISION.md, THESIS.md, ARCHITECTURE.md — living documents
* **Code headers** — `@purpose` annotations indexed from source files
* **Graph edges** — structured relationships (updates, contradicts, related\_to)
* **Embeddings** — semantic vectors for similarity search

## Event Bus (MAP)

The nervous system. Events flow between agents, flows, and the hub.

```bash theme={null}
tenet events recent               # see what's happening
tenet events publish eval:scored   # emit a custom event
```

Events trigger flows automatically:

| Event                              | What happens                               |
| ---------------------------------- | ------------------------------------------ |
| `eval:scored` with `improved=true` | Auto-merge PR, close linked issue          |
| `scope:impact`                     | Cascade evals to downstream services       |
| `cron:nightly`                     | Peter Parker runs all agents with gradient |
| `session:ended`                    | Journal synced, memory indexed             |

## Flows (YAML Automation)

Declarative event-driven workflows. Cron triggers, event patterns, agent spawns, approval gates.

```yaml theme={null}
# .tenet/flows/self-driving.yaml
flows:
  - name: auto-merge-on-improvement
    trigger:
      pattern: "eval:scored"
      condition: 'data.improved == "true"'
    actions:
      - type: command
        command: "gh pr merge {{data.pr_number}} --auto"
      - type: journal
        entry_type: milestone
        title: "Auto-merged PR #{{data.pr_number}}"
```

```bash theme={null}
tenet flows list                  # see all flows
tenet flows enable <name>         # activate a flow
```

## Services (Multi-Repo Coordination)

Register services, declare what they produce and consume. Cross-repo impact detection.

```bash theme={null}
tenet services register ./api     # register a service
tenet scope list                  # see all produces/consumes
tenet scope impact --service api  # what breaks if API changes?
tenet onboard ./new-service       # full onboarding wizard
```

Scopes enable cascade:

```
api produces: api:schema-change
web consumes: api:schema-change
→ API change triggers web evals automatically
```

## IDE (Terminal Workspace)

Multi-pane tmux workspace with smart surface detection.

```bash theme={null}
tenet ide                         # auto-detect and launch
tenet ide add browser             # add browser pane
tenet ide add eval                # add eval dashboard
tenet ide open api                # open child service
tenet ide available               # list all surface types
```

## Browser (Agent Eyes)

Terminal browser (Carbonyl) with CDP bridge. Agents get DOM, humans see pages.

```bash theme={null}
tenet-browser.sh https://10et.ai  # launch browser
# Then from agent session:
subway_call("browser.relay", "navigate", '{"url":"https://..."}')
subway_call("browser.relay", "read", '{}')     # structured DOM
subway_call("browser.relay", "click", '{"selector":"#btn"}')
```

Human interactions broadcast on `browser.events` — agents can respond to what you're looking at.

## Subway Mesh (Agent Coordination)

P2P network for agent-to-agent communication across machines and sessions.

```bash theme={null}
subway_send("datboi.relay", "deploy is failing")
subway_call("browser.relay", "navigate", '{"url":"..."}')
subway_broadcast("status", "deploy complete")
subway_subscribe("browser.events")
```

## Migrating from JFL

If you have the older `jfl` CLI installed:

```bash theme={null}
npm i -g @10et/cli         # install new package
tenet migrate              # .jfl/ → .tenet/, updates all configs
tenet migrate --rollback   # undo if needed
```

The `jfl` command and `JFL_*` env vars continue to work — no rush to migrate.
