11# agentic-stack
22
3- Follow me on : [ @AV1DLIVE ] ( https://twitter.com/AV1DLIVE ) for updates/collabs on projects
3+ Follow me on [ @AV1DLIVE ] ( https://twitter.com/AV1DLIVE ) for updates/collabs on projects.
44
55[ ![ GitHub release] ( https://img.shields.io/github/v/release/codejunkie99/agentic-stack )] ( https://github.com/codejunkie99/agentic-stack/releases )
66[ ![ License: MIT] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( LICENSE )
77
88> ** One brain, many harnesses.** A portable ` .agent/ ` folder (memory + skills
99> + protocols) that plugs into Claude Code, Cursor, Windsurf, OpenCode,
10- > OpenClient, Hermes, or a DIY Python loop — and keeps its knowledge when
10+ > OpenClient, Hermes, or a DIY Python loop, and keeps its knowledge when
1111> you switch.
1212
1313<p align =" center " >
@@ -27,21 +27,47 @@ Based on the article:
2727## What this is
2828
2929Every guide shows the folder structure. This repo gives you the folder
30- structure ** plus the files that actually go inside** — a working portable
30+ structure ** plus the files that actually go inside** : a working portable
3131brain with five seed skills, four memory layers, enforced permissions, a
32- nightly dream cycle, and adapters for seven harnesses.
32+ nightly staging cycle, host-agent review tools, and adapters for seven
33+ harnesses.
3334
3435- ** Memory** — ` working/ ` , ` episodic/ ` , ` semantic/ ` , ` personal/ ` . Each
35- layer has its own retention policy. Salience-scored retrieval; nightly
36- compression.
37- - ** Skills** — progressive disclosure. A lightweight manifest always loads;
38- full ` SKILL.md ` files only load when triggers match the task. Every
39- skill ships with a self-rewrite hook.
36+ layer has its own retention policy. Query-aware retrieval (salience ×
37+ relevance); nightly compression into reviewable candidates.
38+ - ** Review protocol** — ` auto_dream.py ` stages candidate lessons
39+ mechanically. Your host agent reviews them via CLI tools
40+ (` graduate.py ` , ` reject.py ` , ` reopen.py ` ) and commits decisions with
41+ a required rationale. No unattended reasoning, no provider coupling.
42+ - ** Skills** — progressive disclosure. A lightweight manifest always
43+ loads; full ` SKILL.md ` files only load when triggers match the task.
44+ Every skill ships with a self-rewrite hook.
4045- ** Protocols** — typed tool schemas, a ` permissions.md ` that the
4146 pre-tool-call hook enforces, and a delegation contract for sub-agents.
4247
48+ ## What's new in v0.5.0
49+
50+ - ** Host-agent review protocol.** Python handles filing (cluster, stage,
51+ heuristic prefilter, decay). The host agent handles reasoning via
52+ ` list_candidates.py ` / ` graduate.py ` / ` reject.py ` / ` reopen.py ` .
53+ Graduation requires ` --rationale ` so rubber-stamping is structurally
54+ impossible.
55+ - ** Structured ` lessons.jsonl ` as source of truth.** ` LESSONS.md ` is
56+ rendered from it. Hand-curated content above the sentinel is
57+ preserved across renders; legacy bullets auto-migrate on first run.
58+ - ** Content clustering.** Proper single-linkage Jaccard with bridge
59+ merging. Pattern IDs derived from canonical claim + conditions, stable
60+ across cluster-membership changes.
61+ - ** [ BETA] FTS5 memory search.** Opt-in full-text search over all
62+ ` .md ` / ` .jsonl ` memory documents. Default ** off** ; enable during
63+ onboarding or edit ` .agent/memory/.features.json ` directly.
64+ - ** Windows-native installer.** ` install.ps1 ` runs natively in
65+ PowerShell; ` install.sh ` continues to work under Git Bash / WSL.
66+
4367## Quickstart
4468
69+ ### macOS / Linux
70+
4571``` bash
4672# tap + install (one-time — both lines required)
4773brew tap codejunkie99/agentic-stack https://github.com/codejunkie99/agentic-stack
@@ -53,24 +79,37 @@ agentic-stack claude-code
5379# or: cursor | windsurf | opencode | openclient | hermes | standalone-python
5480```
5581
56- > ** Already installed? Update to the latest version:**
57- > ``` bash
58- > brew update && brew upgrade agentic-stack
59- > ` ` `
82+ ### Windows (PowerShell)
83+
84+ ``` powershell
85+ # clone + run the native installer
86+ git clone https://github.com/codejunkie99/agentic-stack.git
87+ cd agentic-stack
88+ .\install.ps1 claude-code C:\path\to\your-project
89+ ```
90+
91+ ### Already installed?
92+
93+ ``` bash
94+ brew update && brew upgrade agentic-stack
95+ ```
96+
97+ ### Clone instead?
6098
61- > ** Clone instead ?**
62- > ` ` ` bash
63- > git clone https://github.com/codejunkie99/agentic-stack. git
64- > cd agentic-stack && ./ install.sh claude-code
65- > ` ` `
99+ ``` bash
100+ git clone https://github.com/codejunkie99/agentic-stack.git
101+ cd agentic-stack && ./install.sh claude-code # mac / linux / git-bash
102+ # or on Windows PowerShell: .\ install.ps1 claude-code
103+ ```
66104
67105## Onboarding wizard
68106
69- After the adapter is installed, a colorful terminal wizard runs automatically
70- and populates ` .agent/memory/personal/PREFERENCES.md` — the ** first file your
71- AI reads at the start of every session** .
107+ After the adapter is installed, a terminal wizard populates
108+ ` .agent/memory/personal/PREFERENCES.md ` — the ** first file your AI reads
109+ at the start of every session** — and writes a feature-toggle file at
110+ ` .agent/memory/.features.json ` .
72111
73- It asks six questions with arrow-key selection, each skippable with Enter:
112+ Six preference questions ( each skippable with Enter) :
74113
75114| Question | Default |
76115| ---| ---|
@@ -81,40 +120,99 @@ It asks six questions with arrow-key selection, each skippable with Enter:
81120| Commit message style? | ` conventional commits ` |
82121| Code review depth? | ` critical issues only ` |
83122
123+ Plus one ** Optional features** step (opt-in, off by default):
124+
125+ | Feature | Default |
126+ | ---| ---|
127+ | Enable FTS memory search ` [BETA] ` | ` no ` |
128+
84129** Flags:**
85130
86131``` bash
87- agentic-stack claude-code --yes # accept all defaults silently (CI / scripted)
132+ agentic-stack claude-code --yes # accept all defaults, beta off (CI/ scripted)
88133agentic-stack claude-code --reconfigure # re-run the wizard on an existing project
89134```
90135
91- Edit ` .agent/memory/personal/PREFERENCES.md ` any time to add or refine your
92- conventions — the agent re-reads it fresh every session.
136+ Edit ` .agent/memory/personal/PREFERENCES.md ` any time to refine your
137+ conventions, or ` .agent/memory/.features.json ` to flip feature toggles.
138+
139+ ## Review protocol (host-agent CLI)
140+
141+ The nightly ` auto_dream.py ` cycle only ** stages** candidate lessons. It
142+ does not mark anything accepted or modify semantic memory. Your host
143+ agent does the review in-session:
144+
145+ ``` bash
146+ # list pending candidates, sorted by priority
147+ python3 .agent/tools/list_candidates.py
148+
149+ # accept with rationale (required)
150+ python3 .agent/tools/graduate.py < id> --rationale " evidence holds, matches PREFERENCES"
151+
152+ # reject with reason (required); preserves decision history
153+ python3 .agent/tools/reject.py < id> --reason " too specific to generalize"
154+
155+ # requeue a previously-rejected candidate
156+ python3 .agent/tools/reopen.py < id>
157+ ```
158+
159+ Graduated lessons land in ` semantic/lessons.jsonl ` (source of truth) and
160+ are rendered to ` semantic/LESSONS.md ` . Rejected candidates retain full
161+ decision history so recurring churn is visible, not fresh.
162+
163+ See [ ` docs/architecture.md ` ] ( docs/architecture.md ) for the full lifecycle.
164+
165+ ## Memory search ` [BETA] `
166+
167+ Opt-in FTS5 keyword search over all memory documents:
168+
169+ ``` bash
170+ # enable during onboarding (or set manually in .agent/memory/.features.json)
171+ python3 .agent/memory/memory_search.py " deploy failure"
172+ python3 .agent/memory/memory_search.py --status
173+ python3 .agent/memory/memory_search.py --rebuild
174+ ```
175+
176+ Falls back to ` grep ` (restricted to ` .md ` / ` .jsonl ` ) when SQLite FTS5
177+ isn't available. The index is stored at ` .agent/memory/.index/ ` and
178+ gitignored.
93179
94180## Repo layout
95181
96182```
97- .agent/ # the portable brain (same across all harnesses)
183+ .agent/ # the portable brain (same across harnesses)
98184├── AGENTS.md # the map
99- ├── harness/ # dumb conductor + hooks (standalone path)
185+ ├── harness/ # conductor + hooks (standalone path)
100186├── memory/ # working / episodic / semantic / personal
187+ │ ├── auto_dream.py # staging-only dream cycle
188+ │ ├── cluster.py # content clustering + pattern extraction
189+ │ ├── promote.py # stage candidates
190+ │ ├── validate.py # heuristic prefilter (length + exact duplicate)
191+ │ ├── review_state.py # candidate lifecycle + decision log
192+ │ ├── render_lessons.py # lessons.jsonl → LESSONS.md
193+ │ └── memory_search.py # [BETA] FTS5 search (opt-in)
101194├── skills/ # _index.md + _manifest.jsonl + SKILL.md files
102195├── protocols/ # permissions + tool schemas + delegation
103- └── tools/ # skill loader, memory reflect, budget tracker
196+ └── tools/ # host-agent CLI + memory_reflect + skill_loader
197+ ├── list_candidates.py
198+ ├── graduate.py
199+ ├── reject.py
200+ └── reopen.py
104201
105202adapters/ # one small shim per harness
106203├── claude-code/ (CLAUDE.md + settings.json hooks)
107204├── cursor/ (.cursor/rules/*.mdc)
108205├── windsurf/ (.windsurfrules)
109206├── opencode/ (AGENTS.md + opencode.json)
110207├── openclient/ (system-prompt include)
111- ├── hermes/ (AGENTS.md)
208+ ├── hermes/ (AGENTS.md)
112209└── standalone-python/ (DIY conductor entrypoint)
113210
114211docs/ # architecture, getting-started, per-harness
115- examples/ # minimal first_run.py
116- install.sh # one-command adapter install + wizard trigger
212+ install.sh # mac / linux / git-bash installer
213+ install.ps1 # Windows PowerShell installer
117214onboard.py # onboarding wizard entry point
215+ onboard_features.py # .features.json read/write
118216onboard_ui.py # ANSI palette, banner, clack-style layout
119217onboard_widgets.py # arrow-key prompts (text, select, confirm)
120218onboard_render.py # answers → PREFERENCES.md content
@@ -136,29 +234,31 @@ onboard_write.py # atomic file write with backup
136234## Seed skills
137235
138236- ** skillforge** — creates new skills from recurring patterns
139- - ** memory-manager** — runs reflection cycles, promotes lessons
237+ - ** memory-manager** — runs reflection cycles, surfaces candidate lessons
140238- ** git-proxy** — all git ops, with safety constraints
141239- ** debug-investigator** — reproduce → isolate → hypothesize → verify
142240- ** deploy-checklist** — the fence between staging and production
143241
144242## How it compounds
145243
1462441 . Skills log every action to episodic memory.
147- 2 . ` memory-manager ` detects recurring patterns, promotes them to semantic .
148- 3 . ` on_failure ` flags skills that fail 3+ times in 14 days for rewrite .
149- 4 . Self-rewrite hooks on each skill update ` KNOWLEDGE .md` conservatively .
150- 5 . ` git log .agent/memory/ ` becomes the agent's autobiography .
151-
152- See [ ` docs/architecture.md ` ] ( docs/architecture.md ) for the full picture .
245+ 2 . ` auto_dream.py ` clusters recurring patterns into candidate lessons .
246+ 3 . The host agent reviews candidates with ` graduate.py ` / ` reject.py ` .
247+ 4 . Graduated lessons append to ` lessons.jsonl ` ; ` LESSONS .md` re-renders .
248+ 5 . Future sessions load query-relevant accepted lessons automatically .
249+ 6 . ` on_failure ` flags skills that fail 3+ times in 14 days for rewrite.
250+ 7 . ` git log .agent/memory/ ` becomes the agent's autobiography .
153251
154- ## Run the dream cycle nightly
252+ ## Run the staging cycle nightly
155253
156254``` bash
157255crontab -e
1582560 3 * * * python3 /path/to/project/.agent/memory/auto_dream.py >> /path/to/project/.agent/memory/dream.log 2>&1
159257```
160258
161- ` auto_dream.py ` resolves its own paths absolutely, so no ` cd ` is needed — cron runs it correctly regardless of working directory.
259+ ` auto_dream.py ` resolves its paths absolutely and performs only mechanical
260+ file operations (cluster, stage, prefilter, decay). No git commits, no
261+ network, no reasoning — safe to run unattended.
162262
163263## License
164264
0 commit comments