Skip to content

Commit 186989e

Browse files
authored
Merge pull request #22 from codejunkie99/feat/harness-manager-v0.9.0
feat(harness-manager): v0.9.0 manifest-driven adapter system + closes #18
2 parents 5113298 + 4c595b1 commit 186989e

30 files changed

Lines changed: 3865 additions & 516 deletions

CHANGELOG.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,77 @@ All notable changes to this project.
55
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.9.0] — 2026-04-23
9+
10+
### Added
11+
- **Harness manager: manifest-driven adapter system.** Each adapter now
12+
ships an `adapters/<name>/adapter.json` declaring its files,
13+
collision policy, optional skills directory mirror, and named
14+
post-install actions. Adding a new adapter is now a JSON-only PR —
15+
no Python code, no test wiring, no class registration. Lives in the
16+
new `harness_manager/` Python package.
17+
- **`./install.sh add <adapter>`** — append an adapter to an existing
18+
project without re-running the onboarding wizard.
19+
- **`./install.sh remove <adapter>`** — confirmation prompt lists every
20+
file before deletion. Hard delete (no quarantine, no undo — git is
21+
the safety net). Reverses post-install actions automatically (e.g.,
22+
`openclaw agents remove`).
23+
- **`./install.sh doctor`** — read-only audit of installed adapters.
24+
Verifies tracked files exist, post-install state is valid, `.agent/`
25+
brain is intact. Exits 0 on green, 1 on red. First run on a
26+
pre-v0.9.0 project asks before synthesizing `install.json` — never
27+
silently mutates.
28+
- **`./install.sh status`** — one-screen view of installed adapters,
29+
brain stats (skills/episodic/lessons), last-updated timestamp.
30+
- **`.agent/install.json`** — authoritative record of what's installed.
31+
Schema-versioned. Atomic write via tempfile + rename, fcntl-locked
32+
on POSIX.
33+
- **PowerShell parity from day one.** `install.ps1` is now a 70-line
34+
thin dispatcher to the same Python backend `install.sh` uses. The
35+
new `add`/`remove`/`doctor`/`status` verbs behave identically across
36+
mac/Linux/Windows. Was 270+ lines of duplicated bash-shaped logic.
37+
- `docs/per-harness/standalone-python.md` — gap-fill for the only
38+
harness that didn't have a per-harness doc.
39+
40+
### Fixed
41+
- **#18** — Claude Code hook commands break when cwd is not the
42+
project root. `adapters/claude-code/settings.json` template now uses
43+
`{{BRAIN_ROOT}}` placeholder, which the manifest backend substitutes
44+
with `$CLAUDE_PROJECT_DIR` at install time. Hook commands resolve
45+
correctly regardless of which directory Claude Code's cwd points at.
46+
Thanks to @palamp for the report and the proposal that shaped the
47+
larger feature.
48+
49+
### Changed
50+
- `install.sh` shrinks from 175 lines of bash case-statements to 35
51+
lines of dispatcher. All install logic moved to `harness_manager/`.
52+
Existing CLI surface preserved: `./install.sh <adapter> [target]
53+
[--yes|--reconfigure|--force]` works identically.
54+
- `install.ps1` shrinks from 270+ lines to 70.
55+
56+
### Migration
57+
Existing v0.8.x users: `brew upgrade agentic-stack`, then run
58+
`./install.sh doctor` in your project. Doctor detects existing
59+
adapters from filesystem signals and asks before writing `install.json`.
60+
Subsequent doctor runs are read-only.
61+
62+
### Release checklist (post-merge, pre-`brew upgrade`)
63+
The Homebrew Formula (`Formula/agentic-stack.rb`) intentionally still
64+
points at the v0.8.0 tarball in this PR. The v0.9.0 release flow is:
65+
66+
1. Merge this PR to master.
67+
2. Tag `v0.9.0` on master and create the GitHub release.
68+
3. Run `curl -L https://github.com/codejunkie99/agentic-stack/archive/refs/tags/v0.9.0.tar.gz | shasum -a 256` to compute the new sha256.
69+
4. Open a follow-up PR that updates `url`, `sha256`, `version` together,
70+
and adds `harness_manager` + `install.ps1` to the `pkgshare.install` line.
71+
This is the same pattern as commit `abaa352` (the v0.8.0 sha256 bump).
72+
73+
Reason for the split: a Formula change that adds `harness_manager/` to
74+
`pkgshare.install` while still pointing at the v0.8.0 tarball would fail
75+
brew install (file-not-found in the staged tarball). Bumping all four
76+
fields together as a follow-up after the tag exists keeps the formula
77+
always pointing at a real, installable artifact.
78+
879
## [0.8.0] — 2026-04-21
980

1081
### Added

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,22 @@ cd agentic-stack && ./install.sh claude-code # mac / linux / git-bash
5555
# adapters: claude-code | cursor | windsurf | opencode | openclaw | hermes | pi | codex | standalone-python | antigravity
5656
```
5757

58+
### Once installed: manage what's wired
59+
60+
After the first `./install.sh <adapter>`, manage your project with
61+
verb-style subcommands (works with both `install.sh` and `install.ps1`):
62+
63+
```bash
64+
./install.sh add cursor # add a second adapter (Claude Code + Cursor in same repo)
65+
./install.sh status # one-screen view: which adapters, brain stats
66+
./install.sh doctor # read-only audit; green / yellow / red per adapter
67+
./install.sh remove cursor # confirm prompt + delete; no quarantine, no undo
68+
```
69+
70+
Bare `./install.sh` (no arguments) prints the available adapters, or
71+
— on a project that already has an install.json — lists what's still
72+
installable.
73+
5874
## Onboarding wizard
5975

6076
After the adapter is installed, a terminal wizard populates

adapters/antigravity/adapter.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "antigravity",
3+
"description": "Antigravity — ANTIGRAVITY.md system context.",
4+
"files": [
5+
{
6+
"src": "ANTIGRAVITY.md",
7+
"dst": "ANTIGRAVITY.md",
8+
"merge_policy": "overwrite"
9+
}
10+
]
11+
}

adapters/claude-code/adapter.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "claude-code",
3+
"description": "Claude Code (Anthropic) — CLAUDE.md instructions + .claude/settings.json PostToolUse + Stop hooks. Hook commands use $CLAUDE_PROJECT_DIR for cwd-stable resolution (closes #18).",
4+
"brain_root_primitive": "$CLAUDE_PROJECT_DIR",
5+
"files": [
6+
{
7+
"src": "CLAUDE.md",
8+
"dst": "CLAUDE.md",
9+
"merge_policy": "overwrite"
10+
},
11+
{
12+
"src": "settings.json",
13+
"dst": ".claude/settings.json",
14+
"merge_policy": "overwrite",
15+
"substitute": true
16+
}
17+
]
18+
}

adapters/claude-code/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"hooks": [
88
{
99
"type": "command",
10-
"command": "python3 .agent/harness/hooks/claude_code_post_tool.py"
10+
"command": "python3 \"$CLAUDE_PROJECT_DIR/.agent/harness/hooks/claude_code_post_tool.py\""
1111
}
1212
]
1313
}
@@ -18,7 +18,7 @@
1818
"hooks": [
1919
{
2020
"type": "command",
21-
"command": "python3 .agent/memory/auto_dream.py"
21+
"command": "python3 \"$CLAUDE_PROJECT_DIR/.agent/memory/auto_dream.py\""
2222
}
2323
]
2424
}

adapters/codex/adapter.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "codex",
3+
"description": "OpenAI Codex CLI — AGENTS.md + .agents/skills mirror (Codex's documented skills directory per https://developers.openai.com/codex/skills).",
4+
"files": [
5+
{
6+
"src": "AGENTS.md",
7+
"dst": "AGENTS.md",
8+
"merge_policy": "merge_or_alert"
9+
}
10+
],
11+
"skills_link": {
12+
"target": ".agent/skills",
13+
"dst": ".agents/skills",
14+
"fallback": "rsync_with_delete"
15+
}
16+
}

adapters/cursor/adapter.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "cursor",
3+
"description": "Cursor — .cursor/rules instruction text. No executable hooks; AI runs commands from project root cwd.",
4+
"files": [
5+
{
6+
"src": ".cursor/rules/agentic-stack.mdc",
7+
"dst": ".cursor/rules/agentic-stack.mdc",
8+
"merge_policy": "overwrite"
9+
}
10+
]
11+
}

adapters/hermes/adapter.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "hermes",
3+
"description": "Hermes Agent (Nous Research) — AGENTS.md workspace context. agentskills.io-compatible.",
4+
"files": [
5+
{
6+
"src": "AGENTS.md",
7+
"dst": "AGENTS.md",
8+
"merge_policy": "merge_or_alert"
9+
}
10+
]
11+
}

adapters/openclaw/adapter.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "openclaw",
3+
"description": "OpenClaw — AGENTS.md auto-injection + per-project agent registration via `openclaw agents add --workspace`. Falls back to system-prompt include on forks without `agents add`.",
4+
"files": [
5+
{
6+
"src": "AGENTS.md",
7+
"dst": "AGENTS.md",
8+
"merge_policy": "merge_or_alert"
9+
},
10+
{
11+
"src": "config.md",
12+
"dst": ".openclaw-system.md",
13+
"merge_policy": "overwrite"
14+
}
15+
],
16+
"post_install": ["openclaw_register_workspace"]
17+
}

adapters/opencode/adapter.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "opencode",
3+
"description": "OpenCode — AGENTS.md (with collision protection) + opencode.json permission rules.",
4+
"files": [
5+
{
6+
"src": "AGENTS.md",
7+
"dst": "AGENTS.md",
8+
"merge_policy": "merge_or_alert"
9+
},
10+
{
11+
"src": "opencode.json",
12+
"dst": "opencode.json",
13+
"merge_policy": "overwrite"
14+
}
15+
]
16+
}

0 commit comments

Comments
 (0)