conductor-harness 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,7 +8,7 @@ A Claude Code harness for [Conductor](https://conductor.build) projects. Install
8
8
 
9
9
  - **SessionStart hook** — injects branch, recent commits, last session progress, and `WORKFLOW.md` context before every Claude Code session
10
10
  - **Linear integration** — reads attached issues directly from Conductor's `+` button; falls back to Linear MCP for comments and history
11
- - **Graphiti memory** — searches past decisions before starting work; writes episodes after `/done`
11
+ - **Hindsight memory** — searches past decisions before starting work; writes memories after `/done`
12
12
  - **Context7 docs** — fetches up-to-date framework and package documentation before planning or implementing
13
13
  - **`/start`, `/done`, `/status`** — task kickoff and closeout rituals that keep progress state and memory in sync
14
14
  - **`/setup`** — analyzes your project and auto-generates `WORKFLOW.md`
@@ -16,91 +16,74 @@ A Claude Code harness for [Conductor](https://conductor.build) projects. Install
16
16
 
17
17
  ---
18
18
 
19
- ## Requirements
19
+ ## Setup
20
20
 
21
- - [Claude Code](https://claude.ai/code)
22
- - [Conductor](https://conductor.build)
23
- - Node.js 18+
24
- - A git repository
21
+ ### 1. Install MCP servers (once per machine)
25
22
 
26
- **Recommended MCP servers** (register once per machine):
23
+ **Hindsight** persistent cross-session memory for decisions, gotchas, and patterns:
24
+ 1. Get an API key at [ui.hindsight.vectorize.io/connect](https://ui.hindsight.vectorize.io/connect)
25
+ 2. Add to your `.env`: `HINDSIGHT_API_KEY=your_key_here`
26
+ 3. The installer creates `.mcp.json` with the Hindsight config automatically — no CLI command needed.
27
27
 
28
+ **Linear** — read and update issues from Claude Code:
28
29
  ```bash
29
- # Graphiti memory (Zep Cloud)
30
- claude mcp add graphiti-memory \
31
- --transport sse \
32
- --url https://mcp.getzep.com/sse \
33
- --header "Authorization: Api-Key $ZEP_API_KEY"
34
-
35
- # Linear
36
30
  claude mcp add linear -s user -- npx -y @linear/mcp-server
31
+ ```
37
32
 
38
- # Context7 (up-to-date docs)
33
+ **Context7** — fetch up-to-date framework and package docs:
34
+ ```bash
39
35
  claude mcp add context7 -s user -- npx -y @upstash/context7-mcp
40
36
  ```
41
37
 
42
- ---
43
-
44
- ## Install
45
-
46
- Run from your project root:
38
+ ### 2. Install the harness into a project
47
39
 
40
+ From your project root (must be a git repo):
48
41
  ```bash
49
42
  npx conductor-harness
50
43
  ```
51
44
 
52
- The installer will:
53
-
54
- 1. Detect your package manager (pnpm / yarn / bun / npm)
55
- 2. Ask if the project uses Railway
56
- 3. Copy hooks, commands, skills, and agents into `.claude/`
57
- 4. Merge harness hooks and permissions into `.claude/settings.local.json`
58
- 5. Write `CLAUDE.md` with orchestration principles and harness configuration
59
- 6. Write `conductor.json` with setup, run, and archive commands
60
- 7. Create `WORKFLOW.md` for project context
61
- 8. Create `.harness/progress.md` for session state
62
-
63
- Re-running is safe — `settings.local.json` is always merged, never overwritten.
64
-
65
- ---
66
-
67
- ## Railway projects
45
+ The installer will ask two questions:
46
+ - **Package manager** — auto-detected from your lockfile
47
+ - **Railway?** adds `railway link` to the Conductor setup command
68
48
 
69
- If your project uses Railway, add these to your `.env`:
49
+ ### 3. Configure Railway (if applicable)
70
50
 
51
+ Add to your `.env`:
71
52
  ```env
72
53
  RAILWAY_PROJECT_ID=your-project-id
73
54
  RAILWAY_ENVIRONMENT_ID=your-environment-id
74
55
  RAILWAY_SERVICE_ID=your-service-id
75
56
  ```
76
57
 
77
- The generated `conductor.json` setup command will pick them up automatically via `source .env`.
78
-
79
- ---
80
-
81
- ## After install
82
-
83
- **Fill in `WORKFLOW.md`** — or let Claude generate it:
58
+ ### 4. Fill in WORKFLOW.md
84
59
 
60
+ Either edit it manually or let Claude generate it:
85
61
  ```
86
62
  /setup
87
63
  ```
88
64
 
89
- **Start a task:**
65
+ ### 5. Start working
66
+
67
+ Open the project in Claude Code via Conductor. The SessionStart hook fires automatically and injects your project context.
90
68
 
91
69
  ```
92
- /start LIN-123
70
+ /start LIN-123 ← kick off a task
71
+ /done ← close it out, write memory
72
+ /status ← check current state
93
73
  ```
94
74
 
95
- Or attach a Linear issue via Conductor's `+` button and type `/start` — the harness reads it directly without an MCP fetch.
75
+ ---
76
+
77
+ ## Requirements
96
78
 
97
- **End a task:**
79
+ - [Claude Code](https://claude.ai/code)
80
+ - [Conductor](https://conductor.build)
81
+ - Node.js 18+
82
+ - A git repository
98
83
 
99
- ```
100
- /done
101
- ```
84
+ Or attach a Linear issue via Conductor's `+` button and type `/start` — the harness reads it directly without an MCP fetch.
102
85
 
103
- Closes the Linear issue, writes a Graphiti memory episode, and resets progress state.
86
+ `/done` closes the Linear issue, writes a Graphiti memory episode, and resets progress state.
104
87
 
105
88
  ---
106
89
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-harness",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Claude Code harness for Conductor projects — hooks, memory, Linear, and workflow context",
5
5
  "bin": {
6
6
  "conductor-harness": "./bin/conductor-harness.js"
@@ -16,7 +16,7 @@
16
16
 
17
17
  **Verify before done**: Never mark complete without proving it works. Ask: "Would a staff engineer approve this?" Run tests, check logs, demonstrate correctness.
18
18
 
19
- **Memory over lessons**: After /done, a Graphiti episode is written. Before non-trivial work, search memory for past decisions. This is the self-improvement loop.
19
+ **Memory over lessons**: After /done, a memory is written to Hindsight. Before non-trivial work, recall past decisions. This is the self-improvement loop.
20
20
 
21
21
  **Docs over assumptions**: AI knowledge has a cutoff. Before using any framework, library, or package API — fetch current docs via Context7 (`mcp__claude_ai_Context7__resolve-library-id` then `mcp__claude_ai_Context7__query-docs`). Never assume an API is current. This applies in plan mode too.
22
22
 
@@ -1,19 +1,19 @@
1
1
  ---
2
2
  name: memory-writer
3
- description: Writes a structured memory episode to Graphiti for the current session. Called by /done and by the Stop hook when task is marked complete.
4
- tools: [mcp__graphiti-memory__add_episode]
3
+ description: Writes a structured memory to Hindsight for the current session. Called by /done and by the Stop hook when task is marked complete.
4
+ tools: [mcp__hindsight__retain]
5
5
  ---
6
6
 
7
- You are a memory writer. Your only job is to write a structured episode to Graphiti.
7
+ You are a memory writer. Your only job is to write a structured memory to Hindsight.
8
8
 
9
- Write one episode using the add_episode tool. The episode should contain:
9
+ Write one memory using the retain tool. The memory should contain:
10
10
  - What was built or changed (concrete, specific)
11
11
  - Key decisions made and why
12
12
  - Gotchas, edge cases, or surprising discoveries
13
13
  - Patterns or utilities that could be reused in other contexts
14
14
 
15
- Group ID: use the project name from the current directory (lowercase, hyphens for spaces).
15
+ Tag with the project name (lowercase, hyphens for spaces) derived from the current directory.
16
16
 
17
- Episode name format: "[DATE] [Branch/Feature]: [One-line summary]"
17
+ Format: "[DATE] [Branch/Feature]: [One-line summary]\n\n[Body]"
18
18
 
19
- Be specific and brief. This episode will be recalled in future sessions — write for your future self.
19
+ Be specific and brief. This memory will be recalled in future sessions — write for your future self.
@@ -5,7 +5,7 @@ description: "End-of-task ritual — writes memory, updates Linear, confirms PR-
5
5
  Task completion for the current Linear issue:
6
6
 
7
7
  1. Run the type checker and any available tests. Fix any failures before continuing.
8
- 2. Write a memory episode to Graphiti via the memory skill: include what was built, key decisions made, gotchas discovered, patterns worth reusing.
8
+ 2. Write a memory to Hindsight via the memory skill: include what was built, key decisions made, gotchas discovered, patterns worth reusing. Tag with the project name.
9
9
  3. Update `.harness/progress.md`: status: done, completed: [date], PR: [branch].
10
10
  4. Update the Linear issue status to "In Review" using the Linear MCP tool. Add a comment with a one-sentence summary of what was done.
11
11
  5. Confirm: "Ready for PR. Run ⌘⇧P in Conductor to create the PR."
@@ -64,6 +64,6 @@ if workflow:
64
64
  lines.append("**Project context (WORKFLOW.md):**")
65
65
  lines.append(workflow)
66
66
  lines.append("")
67
- lines.append("**Action:** Search Graphiti memory for context relevant to this branch/task before responding to the user. Use the `memory` skill if needed.")
67
+ lines.append("**Action:** Search Hindsight memory for context relevant to this branch/task before responding to the user. Use the `memory` skill if needed.")
68
68
 
69
69
  print(json.dumps({"promptText": "\n".join(lines)}))
@@ -1,21 +1,17 @@
1
1
  ---
2
2
  name: memory
3
- description: "Search and write to Graphiti cross-session memory for this project"
3
+ description: "Search and write to Hindsight cross-session memory for this project"
4
4
  ---
5
5
 
6
6
  # Memory Skill
7
7
 
8
- Uses Graphiti MCP (Zep Cloud) for persistent cross-session memory.
8
+ Uses Hindsight MCP for persistent cross-session memory.
9
9
 
10
10
  ## MCP tool reference
11
- - `search_facts(query, group_id)` — semantic search for facts/edges
12
- - `search_nodes(query, group_id)` — semantic search for entities
13
- - `add_episode(name, episode_body, group_id, source_description)` — write new memory
14
- - `get_episodes(group_id, last_n)` — get recent episodes
15
-
16
- ## group_id convention
17
- Use the project name: `nerdic-next`, `monomos`, `openfang`, `data-agent`, etc.
18
- Derive from the git remote URL or project root directory name.
11
+ - `recall(query)` — semantic search across stored memories
12
+ - `retain(content, tags)` — write a new memory (decisions, gotchas, patterns)
13
+ - `reflect(question)` — get an AI answer using your memories as context
14
+ - `create_mental_model(name, description)` — create a living summary document
19
15
 
20
16
  ## When to search memory
21
17
  - At session start (automatically via SessionStart hook)
@@ -28,7 +24,10 @@ Derive from the git remote URL or project root directory name.
28
24
  - After discovering a non-obvious gotcha
29
25
  - After making an architectural decision with lasting implications
30
26
 
27
+ ## Tagging convention
28
+ Always tag memories with the project name derived from the git remote URL or project root directory name (e.g. `my-project`, `api-service`).
29
+
31
30
  ## Gotchas
32
- - If MCP is not connected, instruct: `claude mcp add graphiti-memory --transport sse --url https://mcp.getzep.com/sse --header "Authorization: Api-Key $ZEP_API_KEY"`
33
- - Keep episodes specific and brief — Graphiti retrieves by semantic similarity, verbose episodes dilute signal
31
+ - If MCP is not connected, add `HINDSIGHT_API_KEY` to `.env` and ensure `.mcp.json` is present
32
+ - Keep memories specific and brief — recall uses semantic search, verbose entries dilute signal
34
33
  - Do not write memory for obvious facts, boilerplate decisions, or things already in CLAUDE.md
@@ -32,7 +32,7 @@ echo "Detected package manager: $PKG_MANAGER"
32
32
 
33
33
  # ── 3. Railway prompt ────────────────────────────────────────────────────────
34
34
  read -r -p "Does this project use Railway? [y/N] " USE_RAILWAY
35
- USE_RAILWAY="${USE_RAILWAY,,}"
35
+ USE_RAILWAY="$(echo "$USE_RAILWAY" | tr '[:upper:]' '[:lower:]')"
36
36
 
37
37
  # ── 4. Create .claude subdirs ────────────────────────────────────────────────
38
38
  mkdir -p \
@@ -224,7 +224,41 @@ else
224
224
  echo "✓ WORKFLOW.md already exists (skipped)"
225
225
  fi
226
226
 
227
- # ── 15. Next steps ────────────────────────────────────────────────────────────
227
+ # ── 15. .mcp.json create or append Hindsight MCP entry ─────────────────────
228
+ MCP_JSON="$TARGET_DIR/.mcp.json"
229
+
230
+ python3 - "$MCP_JSON" <<'PYEOF'
231
+ import sys, json, os
232
+
233
+ mcp_path = sys.argv[1]
234
+
235
+ hindsight_entry = {
236
+ "type": "http",
237
+ "url": "https://api.hindsight.vectorize.io/mcp/Claude/",
238
+ "headers": {
239
+ "Authorization": "Bearer ${HINDSIGHT_API_KEY}"
240
+ }
241
+ }
242
+
243
+ if os.path.exists(mcp_path):
244
+ with open(mcp_path) as f:
245
+ data = json.load(f)
246
+ if "mcpServers" not in data:
247
+ data["mcpServers"] = {}
248
+ if "hindsight" not in data["mcpServers"]:
249
+ data["mcpServers"]["hindsight"] = hindsight_entry
250
+ print("✓ Hindsight MCP added to existing .mcp.json")
251
+ else:
252
+ print("✓ .mcp.json already has hindsight entry (skipped)")
253
+ else:
254
+ data = {"mcpServers": {"hindsight": hindsight_entry}}
255
+ print("✓ .mcp.json created with Hindsight MCP")
256
+
257
+ with open(mcp_path, "w") as f:
258
+ json.dump(data, f, indent=2)
259
+ PYEOF
260
+
261
+ # ── 16. Next steps ────────────────────────────────────────────────────────────
228
262
  echo ""
229
263
  echo "══════════════════════════════════════════════════"
230
264
  echo " Harness installed successfully!"
@@ -232,12 +266,9 @@ echo "════════════════════════
232
266
  echo ""
233
267
  echo "Next steps:"
234
268
  echo ""
235
- echo "1. Register Zep Cloud memory MCP (once per machine):"
236
- echo " export ZEP_API_KEY=your_zep_api_key_here"
237
- echo " claude mcp add graphiti-memory \\"
238
- echo " --transport sse \\"
239
- echo " --url https://mcp.getzep.com/sse \\"
240
- echo " --header \"Authorization: Api-Key \$ZEP_API_KEY\""
269
+ echo "1. Add your Hindsight API key to .env:"
270
+ echo " HINDSIGHT_API_KEY=your_key_here"
271
+ echo " Get a key at: https://ui.hindsight.vectorize.io/connect"
241
272
  echo ""
242
273
  echo "2. Register Linear MCP (once per machine, if not already):"
243
274
  echo " claude mcp add linear -s user -- npx -y @linear/mcp-server"