Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,11 @@ jobs:
- name: install sqlite3
run: sudo apt-get install -y sqlite3

- name: install MCP server deps
working-directory: mcp/trajectory-server
- name: install workspace deps
run: bun install --frozen-lockfile

- name: build MCP server
working-directory: mcp/trajectory-server
- name: build all workspaces
run: bun run build

- name: run MCP tests
working-directory: mcp/trajectory-server
run: node --test dist/test/*.test.js

- name: run hook tests
run: bash tests/hooks/run.sh
- name: run full test suite
run: bash tests/run-all.sh
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Claude Code runtime artifacts (worktrees, session state)
.claude/

# Dogfood-generated artifacts when running CC inside this repo.
# The plugin's own contributor docs live at docs/architecture/ — so
# docs/trustmybot/ is never legitimate here; if it shows up, it came
# from architect/SWE writing into this project as if it were a user
# project. Ignore it so it never lands in a commit.
docs/trustmybot/

# Ephemeral local SQLite DBs (developer-only)
*.trajectory.db
*.db-shm
Expand Down
17 changes: 16 additions & 1 deletion mcp/trajectory-server/bun.lock → bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 12 additions & 10 deletions docs/local-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ How to stand up a scratch project and exercise the TMB plugin end-to-end. This i
- **bun** — used to build the MCP server. `curl -fsSL https://bun.sh/install | bash`.
- **sqlite3** — for inspecting the trajectory DB. Usually preinstalled; `brew install sqlite3` if not.

Verify the MCP server builds cleanly before doing anything else:
Verify the MCP server builds cleanly before doing anything else. **Run from the plugin repo root** (i.e. `cd` into your clone first):

```bash
cd plugin/mcp/trajectory-server
bun install
bun run build
bun install # installs every workspace (mcp/trajectory-server + monitors)
bun run build # builds every workspace that has a build script
```

If that fails, fix it first — the plugin won't load a broken MCP server.
Expand All @@ -27,11 +26,12 @@ Pick one. Mode A is tighter for iteration; Mode B matches the release path end u

### Mode A — dev mode with hot reload (recommended for contributor iteration)

Launch Claude Code against the plugin source directly:
Launch Claude Code against the plugin source directly. **Run these from the plugin repo root** (same directory you ran `bun install` in) so `$(pwd)` resolves correctly:

```bash
# Set PLUGIN_PATH to wherever you cloned this repo.
export PLUGIN_PATH=/absolute/path/to/trustmybot-plugin
# Capture the plugin repo path from the current directory — no placeholder to edit.
export PLUGIN_PATH="$(pwd)"
echo "$PLUGIN_PATH" # sanity-check: should point at your plugin clone

# Use any disposable directory for the scratch project.
mkdir -p /tmp/tmb-scratch && cd /tmp/tmb-scratch
Expand All @@ -40,6 +40,8 @@ git init && git commit --allow-empty -m "init"
claude --plugin-dir "$PLUGIN_PATH"
```

If you prefer to set `PLUGIN_PATH` from somewhere else, substitute your clone path — e.g. `export PLUGIN_PATH=~/code/trustmybot-plugin`. The literal string `/absolute/path/to/...` is not a real path.

Edits to agent prompts, skills, or hook scripts are picked up after `/reload-plugins` inside the session. TypeScript edits under `mcp/trajectory-server/src/` require a rebuild (`bun run build`) then `/reload-plugins`.

No install, no cache, no marketplace.
Expand Down Expand Up @@ -102,10 +104,10 @@ Picks up edits to:
- Hook scripts (`plugin/scripts/hooks/*.sh`)
- Template content (`plugin/templates/**/*`)

Does **not** pick up TypeScript edits in the MCP server. Rebuild first:
Does **not** pick up TypeScript edits in the MCP server. Rebuild first, from the plugin repo root:

```bash
cd plugin/mcp/trajectory-server && bun run build
bun run build
```

Then `/reload-plugins`.
Expand Down Expand Up @@ -149,7 +151,7 @@ Any failure here is a bug a downstream user will hit identically — file an iss

## Common pitfalls

- **"MCP server not connected"** — almost always a build failure. Run `cd plugin/mcp/trajectory-server && bun run build` and check for errors.
- **"MCP server not connected"** — almost always a build failure. From the plugin repo root: `bun run build` and check for errors.
- **"Onboarding didn't fire"** — stale DB. Delete `.claude/tmb/` in your project root and relaunch.
- **"Agent changes didn't take effect"** — forgot `/reload-plugins`, or CC cached a previous install (Mode B). Try Mode A for cleaner iteration.
- **"Hook didn't block"** — hook path mismatch. Check `plugin/hooks/hooks.json` points at the script you edited and that the script is executable (`chmod +x`).
Expand Down
89 changes: 0 additions & 89 deletions monitors/bun.lock

This file was deleted.

17 changes: 17 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "tmb-plugin",
"version": "0.3.2",
"description": "TMB multi-agent Claude Code plugin — workspace root. Shipped content is declared in .claude-plugin/plugin.json; this file exists only to wire the two Node subpackages together.",
"private": true,
"workspaces": [
"mcp/trajectory-server",
"monitors"
],
"scripts": {
"build": "bun --filter='*' run build",
"test": "bash tests/run-all.sh"
},
"engines": {
"node": ">=20"
}
}
Loading