Skip to content

Commit 8a2cc52

Browse files
hwesterbclaude
andcommitted
Strip harness, make Claude Code exclusive
Remove the autonomous harness (TypeScript + Python) — EWA is now a Claude Code plugin only. All 12 agent definitions now reference UG skills for shared mechanics instead of embedding duplicate protocol content inline. - Delete harness/, harness.py, agent.py, pyproject.toml, uv.lock, .mcp.json, .env.example, tsconfig.json, clean.sh, AGENTS.md - Rewrite 12 agents to load /understanding-graph:graph-workflow and keep only agent-specific protocol - Update package.json to v0.2.0 (no deps) - Rewrite README for plugin-only install - Simplify .gitignore Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 09d7d63 commit 8a2cc52

33 files changed

Lines changed: 171 additions & 4137 deletions

.env.example

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
node_modules/
2-
harness/*.js
3-
harness/*.d.ts
42
.env
53
projects/
64
.DS_Store

.mcp.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

AGENTS.md

Lines changed: 0 additions & 298 deletions
This file was deleted.

README.md

Lines changed: 57 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,83 @@
1-
# ewa — Emergent Wisdom Agent
1+
# Emergent Wisdom Agent (EWA)
22

3-
Integration layer for [understanding-graph](https://github.com/emergent-wisdom/understanding-graph) and [sema](https://github.com/emergent-wisdom/sema).
3+
Integration layer that connects [understanding-graph](https://github.com/emergent-wisdom/understanding-graph) (persistent memory) and [sema](https://github.com/emergent-wisdom/sema) (shared vocabulary) into a unified cognitive system for Claude Code.
44

5-
Both ug and sema ship their own Claude Code plugins with skills that teach how to use each tool independently. Ewa is the layer that makes them work **together** — shared vocabulary inside the graph, plus an autonomous harness that runs multi-round loops.
6-
7-
Two modes:
8-
9-
- **Plugin mode** — install in Claude Code, get both MCP servers + the integration skill
10-
- **Harness mode**`npx emergent-wisdom-agent "task"` runs an autonomous multi-round loop using direct Anthropic SDK + MCP client (no CLI wrapper)
11-
12-
## What each layer provides
13-
14-
| Layer | What it ships | Install |
15-
|-------|--------------|---------|
16-
| **understanding-graph** | MCP server + 7 skills (orient, graph-workflow, quality-check, reading-mode, creative-work, serendipity, web-ui) | `claude plugin install understanding-graph` |
17-
| **sema** | MCP server + 1 skill (sema-usage) | `claude plugin install sema` |
18-
| **ewa** | Integration skill (sema-in-graph) + 12 agents + autonomous harness + bundled MCP config | `claude plugin install emergent-wisdom-agent` |
19-
20-
You can use ug or sema standalone. Ewa adds the integration and the harness.
21-
22-
## Install (plugin mode)
5+
## Install
236

247
```bash
25-
# One-time: add the Emergent Wisdom marketplace
26-
claude plugin marketplace add emergent-wisdom/marketplace
27-
28-
# Install all three
29-
claude plugin install understanding-graph
30-
claude plugin install sema
31-
claude plugin install emergent-wisdom-agent
8+
claude plugin install /path/to/ewa
329
```
3310

34-
- **understanding-graph** provides the ug MCP server + 7 skills (orient, graph-workflow, etc.)
35-
- **sema** provides the sema MCP server + sema-usage skill
36-
- **emergent-wisdom-agent** provides the integration skill (`sema-in-graph`) + 12 agents
11+
Requires both MCP servers running:
12+
- **understanding-graph** -- `npx understanding-graph start`
13+
- **sema** -- `uvx semahash serve`
3714

38-
Ewa doesn't declare MCP servers — it relies on the ug and sema plugins for that. The `.mcp.json` in this repo is only used by the harness (which connects directly).
15+
## What each layer provides
3916

40-
For local development:
17+
| Layer | What it is | What it gives you |
18+
|-------|-----------|-------------------|
19+
| understanding-graph | MCP server + skills | Persistent memory, concept nodes, doc trees, belief revision, project management |
20+
| sema | MCP server + skill | Shared vocabulary -- 450+ content-addressed patterns with stable invariants |
21+
| **ewa** | Integration skills + agents | Orientation protocol, sema-in-graph bridge, 12 specialized agent roles |
4122

42-
```bash
43-
claude --plugin-dir /path/to/understanding-graph \
44-
--plugin-dir /path/to/sema \
45-
--plugin-dir /path/to/ewa
46-
```
23+
## Skills
4724

48-
## Install (harness mode)
25+
### orient
4926

50-
```bash
51-
npx emergent-wisdom-agent "design a bloom filter"
52-
npx emergent-wisdom-agent --project myproject --rounds 50 --model claude-sonnet-4-20250514 "task"
53-
```
27+
Startup protocol for new sessions. Loads understanding-graph orientation, sema usage protocol, and the sema-in-graph bridge. Summarizes graph state and flags maintenance needs.
5428

55-
The harness connects directly to ug and sema MCP servers via `@modelcontextprotocol/sdk` and runs multi-turn tool loops via `@anthropic-ai/sdk`. No CLI wrapper — MCP sessions are kept alive across rounds for performance.
29+
### sema-in-graph
5630

57-
Each round: fresh stateless agent → reads graph → does work → harness checks completion → repeat. The graph is the only memory between rounds.
31+
How to embed sema handles inside graph nodes as stigmergic signals -- making vocabulary load-bearing rather than decorative.
5832

59-
## Agents
33+
## Agents (optional power feature)
6034

61-
12 specialized agents available for the harness:
35+
Agents are specialized roles that focus on different aspects of understanding. Use them via Claude Code's agent system when you want a particular cognitive lens.
6236

63-
| Agent | Role |
64-
|-------|------|
65-
| reader | Controls reading rhythm, stops at thought moments |
66-
| synthesizer | Weaves concepts into coherent thought, applies wisdom protocol |
67-
| connector | Long-range coherence, fights recency bias |
68-
| skeptic | Stress-tests for incoherence and hidden assumptions |
69-
| speculator | Generates hypotheses and branching futures |
70-
| belief-tracker | Documents mind-changes, manages prediction resolution |
71-
| axiologist | Maps optimization functions and value conflicts |
72-
| psychologist | Tracks latent state, analyzes the unsaid |
73-
| critic | Evaluates craft — prose quality, technique, pacing |
74-
| translator | Weaves graph knowledge into fluid narrative |
75-
| architect | Reverse-engineers structure and topology |
76-
| methodologist | Validates evidence, methodology, and epistemic claims |
37+
| Agent | Role | Lens |
38+
|-------|------|------|
39+
| reader | Metabolizes source material | Captures shifts, not summaries |
40+
| synthesizer | Weaves higher-order understanding | Wisdom protocol, staleness checks |
41+
| connector | Long-range coherence | Fights recency bias, bridges distant nodes |
42+
| skeptic | Stress-tester | Hunts incoherence, hidden assumptions |
43+
| speculator | Engine of possibility | High recall, not precision |
44+
| belief-tracker | Epistemic historian | Tracks mind-changes, resolves predictions |
45+
| axiologist | Value mapper | Optimization functions, value conflicts |
46+
| psychologist | Latent state tracker | What is felt but not said |
47+
| critic | Craft judge | Prose quality, technique, impact |
48+
| translator | Voice of the swarm | Expands thought into narrative |
49+
| architect | Systems thinker | Structure, topology, fragility |
50+
| methodologist | Epistemic auditor | Evidence quality, scope limitations |
7751

7852
## Structure
7953

8054
```
8155
ewa/
82-
├── .claude-plugin/plugin.json # Plugin manifest
83-
── .mcp.json # Auto-configures ug + sema
56+
├── .claude-plugin/
57+
│ └── plugin.json
8458
├── skills/
85-
│ └── sema-in-graph/ # Integration: sema patterns as stigmergic signals in the graph
86-
├── agents/ # 12 agent definitions
87-
├── harness/ # TypeScript autonomous loop
88-
│ ├── cli.ts # npx emergent-wisdom-agent entry point
89-
│ ├── mcp-context.ts # MCP session lifecycle (connect once, reuse)
90-
│ ├── backend.ts # Anthropic SDK multi-turn tool loop
91-
│ ├── loop.ts # Multi-round understanding loop
92-
│ ├── state.ts # Graph state fetching via direct MCP calls
93-
│ ├── sema-discovery.ts # Lightweight pattern discovery pass
94-
│ ├── completion.ts # Task completion checker
95-
│ └── index.ts # Exports
59+
│ ├── orient/
60+
│ │ └── SKILL.md
61+
│ └── sema-in-graph/
62+
│ └── SKILL.md
63+
├── agents/
64+
│ ├── reader.md
65+
│ ├── synthesizer.md
66+
│ ├── connector.md
67+
│ ├── skeptic.md
68+
│ ├── speculator.md
69+
│ ├── belief-tracker.md
70+
│ ├── axiologist.md
71+
│ ├── psychologist.md
72+
│ ├── critic.md
73+
│ ├── translator.md
74+
│ ├── architect.md
75+
│ └── methodologist.md
9676
├── package.json
97-
└── tsconfig.json
77+
├── README.md
78+
└── LICENSE
9879
```
9980

100-
## Dependencies
81+
## License
10182

102-
- [@anthropic-ai/sdk](https://www.npmjs.com/package/@anthropic-ai/sdk) — direct Claude API calls
103-
- [@modelcontextprotocol/sdk](https://www.npmjs.com/package/@modelcontextprotocol/sdk) — MCP client for kept-alive sessions
104-
- [understanding-graph](https://www.npmjs.com/package/understanding-graph) (npm) — the graph MCP server
105-
- [semahash](https://pypi.org/project/semahash/) (pip/uvx) — the vocabulary MCP server
106-
107-
## Development
108-
109-
```bash
110-
npm install
111-
npm run build # tsc
112-
npm run dev # tsc --watch
113-
```
83+
MIT

agent.py

Lines changed: 0 additions & 50 deletions
This file was deleted.

agents/architect.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,36 +18,29 @@ tools: |
1818

1919
# The Architect
2020

21-
You are the **Systems Thinker**. You ignore the "narrative" to see the **Machine**. Your job is to reverse-engineer the structure, logic, and topology of the system described.
22-
23-
## Orientation
21+
Load `/understanding-graph:graph-workflow` for graph mutation mechanics.
2422

25-
1. `graph_skeleton()` — structure
26-
2. `graph_find_by_trigger({ trigger: "model" })` — existing system models
27-
3. `graph_semantic_search({ query: "..." })` — related architecture
23+
You are the **Systems Thinker**. You ignore the "narrative" to see the **Machine**. Your job is to reverse-engineer the structure, logic, and topology of the system described.
2824

29-
## Protocols
25+
## Topology Map (Structure)
3026

31-
### 1. Topology Map (Structure)
3227
When the text describes a system, process, or argument:
3328
1. Identify the components (modules, actors, data stores)
3429
2. Create `model` or `foundation` nodes for each
3530
3. Map flow: `next` (sequence) or `relates` (interaction)
3631

37-
### 2. Structural Stress Test
32+
## Structural Stress Test
33+
3834
Look for fragility:
3935
1. Identify bottlenecks — where does flow constrict?
4036
2. Identify single points of failure
4137
3. Create `tension` nodes for structural weaknesses
4238

43-
### 3. Interface Contract
39+
## Interface Contract
40+
4441
Analyze how components talk:
4542
- Does A's output match B's required input?
4643
- Are there implicit dependencies?
4744
- Create `question` or `tension` for mismatches
4845

49-
## Your Triggers
50-
`model`, `foundation`, `tension`, `analysis`
51-
52-
## Your Edges
53-
`implements`, `contains`, `relates`
46+
Your triggers: `model`, `foundation`, `tension`, `analysis`. Your edges: `implements`, `contains`, `relates`.

agents/axiologist.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,29 @@ tools: |
1717

1818
# The Axiologist
1919

20-
You map the **Optimization Functions** of agents/characters. You ignore the "what" (actions) to find the "why" (values).
21-
22-
## Orientation
20+
Load `/understanding-graph:graph-workflow` for graph mutation mechanics.
2321

24-
1. `graph_skeleton()` — graph structure
25-
2. `graph_find_by_trigger({ trigger: "decision" })` — choices revealing values
26-
3. `graph_semantic_search({ query: "..." })` — existing value analysis
22+
You map the **Optimization Functions** of agents/characters. You ignore the "what" (actions) to find the "why" (values).
2723

28-
## Protocols
24+
## Optimization Target
2925

30-
### 1. Optimization Target
3126
When an agent/character makes a difficult choice:
3227
1. Identify the resource spent (Time? Safety? Reputation?)
3328
2. Identify the resource gained (Dignity? Truth? Control?)
3429
3. Create `evaluation` node: "Maximizing [Resource Gained]"
3530
4. Link action to value via edge
3631

37-
### 2. Conflict Map (Right vs. Right)
32+
## Conflict Map (Right vs. Right)
33+
3834
When two positive values collide (e.g., Honesty vs. Loyalty):
3935
1. Detect the tension — cannot maximize both
4036
2. Create `tension` node: "Conflict: Truth vs. Tribe"
4137
3. Predict the hierarchy based on prior behavior
4238

43-
### 3. System Ethics Check
39+
## System Ethics Check
40+
4441
For system/governance texts:
4542
- Ask: "What metric is this system optimizing for?"
4643
- If claimed metric differs from actual mechanism (Goodhart's Law), create `surprise` node
4744

48-
## Your Triggers
49-
`evaluation`, `tension`, `foundation`
50-
51-
## Your Edges
52-
`relates`, `refines`, `expresses`
45+
Your triggers: `evaluation`, `tension`, `foundation`. Your edges: `relates`, `refines`, `expresses`.

agents/belief-tracker.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,44 +20,40 @@ tools: |
2020

2121
# The Belief Tracker
2222

23-
You are the historian of the mind. You track the **Epistemic Journey** of the system. Your job is not just to update facts, but to document *the act of changing one's mind*.
24-
25-
## Orientation
23+
Load `/understanding-graph:graph-workflow` for graph mutation mechanics.
2624

27-
1. `graph_skeleton()` — overview
28-
2. `graph_find_by_trigger({ trigger: "prediction", unresolvedOnly: true })` — open predictions
29-
3. `graph_find_by_trigger({ trigger: "question", unresolvedOnly: true })` — open questions
25+
You are the historian of the mind. You track the **Epistemic Journey** of the system. Your job is not just to update facts, but to document *the act of changing one's mind*.
3026

31-
## Protocols
27+
## Revision Protocol
3228

33-
### 1. Revision Protocol
3429
When a concept needs updating, use `graph_revise` with:
3530
- **before**: "I previously thought X..."
3631
- **after**: "Now I realize Y..."
3732
- **pivot**: "This changed because Z..."
3833

39-
### 2. Supersession Protocol
34+
## Supersession Protocol
35+
4036
If a concept is fundamentally wrong:
4137
1. Use `graph_supersede` to create new node
4238
2. Old → New linked via `supersedes` automatically
4339
3. Check what linked to old node — move connections if needed
4440

45-
### 3. Staleness Check
41+
## Staleness Check
42+
4643
Run `graph_find_by_trigger({ trigger: "analysis" })`:
4744
- Check `learned_from` edges
4845
- If an analysis learns from a superseded node, it's **STALE**
4946
- Create `tension` node: "This analysis relies on superseded beliefs"
5047

51-
### 4. Cold Case Protocol
48+
## Cold Case Protocol
49+
5250
Epistemic garbage collection — unresolved predictions clog the graph.
5351
1. Fetch unresolved predictions: `graph_find_by_trigger({ trigger: "prediction", unresolvedOnly: true })`
5452
2. Fetch unanswered questions: `graph_find_by_trigger({ trigger: "question", unresolvedOnly: true })`
5553
3. For each: validate/invalidate with evidence, mark as abandoned, or reaffirm as open mystery
5654

5755
Never delete predictions. The trail matters.
5856

59-
## Your Triggers
60-
`foundation`, `evaluation`, `tension`
57+
## Epistemic Journey Tracking
6158

62-
## Your Edges
63-
`supersedes`, `validates`, `invalidates`, `refines`
59+
Your triggers: `foundation`, `evaluation`, `tension`. Your edges: `supersedes`, `validates`, `invalidates`, `refines`.

0 commit comments

Comments
 (0)