mirror of
https://github.com/lukaszraczylo/claude-adam.git
synced 2026-07-15 04:30:09 +00:00
docs: replace ASCII pipeline diagram with mermaid flowchart
GitHub renders mermaid natively. Diagram now shows three subgraphs (Observation → Analysis → Review + apply) with a nested Pre-processors subgraph inside Analysis. Includes: - Dotted edge labeled 'user runs /reflect' marking the observe→analyze boundary. - Diamond gate node for auto-apply decision (conf≥4 · low blast · cooldown cool) with explicit yes/no branches. - Feedback loop: applied/ entries measure back into adam-ab-measure.mjs on subsequent reflects. - Color-coded classDef for stores (blue), processes (orange), and the clustering trace artifact (purple). ASCII art retired — diagram now legible at any zoom on github.com.
This commit is contained in:
@@ -66,39 +66,49 @@ curl -fsSL https://raw.githubusercontent.com/lukaszraczylo/claude-adam/v0.3.3/in
|
|||||||
|
|
||||||
## How it works
|
## How it works
|
||||||
|
|
||||||
```
|
```mermaid
|
||||||
┌─────────────────────────────────────────────────────────────────────┐
|
flowchart TB
|
||||||
│ Observation (deterministic) │
|
subgraph OBS["Observation (deterministic, in-hook, zero LLM cost)"]
|
||||||
│ │
|
direction LR
|
||||||
│ Tool event / user prompt ──▶ adam-observe.mjs ──▶ journal.jsonl│
|
EV["Tool event /<br/>user prompt"] --> OBSERVE["adam-observe.mjs<br/><sub>regex · counters · ring buffers</sub>"]
|
||||||
│ (regex, counters, │
|
OBSERVE --> JOURNAL[("journal.jsonl<br/><sub>append-only signal log</sub>")]
|
||||||
│ ring buffers) │
|
end
|
||||||
└─────────────────────────────────────────────────────────────────────┘
|
|
||||||
│
|
JOURNAL -. user runs <code>/reflect</code> .-> ANALYSIS
|
||||||
▼ user runs /reflect
|
|
||||||
┌─────────────────────────────────────────────────────────────────────┐
|
subgraph ANALYSIS["Analysis (LLM, only on demand)"]
|
||||||
│ Analysis (LLM, only on demand) │
|
direction TB
|
||||||
│ │
|
subgraph PRE["Pre-processors (deterministic)"]
|
||||||
│ adam-window.mjs ─▶ per-signal sliding window filter │
|
direction LR
|
||||||
│ adam-score.mjs ─▶ task_completed dampener + reinforcement │
|
W["adam-window.mjs<br/><sub>per-signal sliding window</sub>"]
|
||||||
│ adam-ab-measure.mjs─▶ 7d pre/post deltas on prior auto-applies │
|
S["adam-score.mjs<br/><sub>task_completed dampener<br/>+ reinforcement candidates</sub>"]
|
||||||
│ │
|
AB["adam-ab-measure.mjs<br/><sub>7d pre/post deltas<br/>on prior auto-applies</sub>"]
|
||||||
│ ┌──────────────────┐ │
|
end
|
||||||
│ filtered ────▶ │ adam (subagent) │ ──▶ proposals/ + trace │
|
AGENT["adam subagent<br/><sub>cluster · score · diagnose</sub>"]
|
||||||
│ inputs │ cluster + score │ adam-explain.mjs renders │
|
PRE --> AGENT
|
||||||
│ └──────────────────┘ │
|
AGENT --> PROPOSALS[("proposals/")]
|
||||||
└─────────────────────────────────────────────────────────────────────┘
|
AGENT --> TRACE[["clustering trace<br/><sub>adam-explain.mjs renders</sub>"]]
|
||||||
│
|
end
|
||||||
▼
|
|
||||||
┌─────────────────────────────────────────────────────────────────────┐
|
PROPOSALS --> REVIEW
|
||||||
│ Review + apply │
|
|
||||||
│ │
|
subgraph REVIEW["Review + apply"]
|
||||||
│ auto-apply gates ──▶ applied/ + ab-tracking.jsonl │
|
direction TB
|
||||||
│ (low-blast only, │
|
GATE{"auto-apply<br/>gates pass?<br/><sub>conf≥4 · low blast<br/>· cooldown cool</sub>"}
|
||||||
│ conf ≥ 4, etc.) │
|
GATE -->|yes| APPLIED[("applied/<br/>+ ab-tracking.jsonl")]
|
||||||
│ │
|
GATE -->|no| QUEUE["walk-the-queue<br/><sub>approve · reject · edit</sub>"]
|
||||||
│ everything else ──▶ walk-the-queue: approve / reject / edit │
|
QUEUE -->|approve| APPLIED
|
||||||
└─────────────────────────────────────────────────────────────────────┘
|
QUEUE -->|reject| REJECTED[("rejected/")]
|
||||||
|
end
|
||||||
|
|
||||||
|
APPLIED -. measures back into .-> AB
|
||||||
|
|
||||||
|
classDef store fill:#e8f4fd,stroke:#5b9bd5,stroke-width:2px,color:#1f3a5f
|
||||||
|
classDef proc fill:#fff4e6,stroke:#e8a33d,stroke-width:1px,color:#5a3d0f
|
||||||
|
classDef trace fill:#f0e8fd,stroke:#7e5dc0,stroke-width:1px,color:#2f1e60
|
||||||
|
class JOURNAL,PROPOSALS,APPLIED,REJECTED store
|
||||||
|
class EV,OBSERVE,W,S,AB,AGENT,QUEUE proc
|
||||||
|
class TRACE trace
|
||||||
```
|
```
|
||||||
|
|
||||||
The observation layer is a 350-line Node hook. Pure regex, counters, ring buffers — no LLM in the hot path. Signals append one JSONL line per detection to `~/.claude/adam/journal.jsonl`.
|
The observation layer is a 350-line Node hook. Pure regex, counters, ring buffers — no LLM in the hot path. Signals append one JSONL line per detection to `~/.claude/adam/journal.jsonl`.
|
||||||
|
|||||||
Reference in New Issue
Block a user