xtrm-tools 0.5.30 → 0.5.32

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xtrm-tools",
3
- "version": "0.5.30",
3
+ "version": "0.5.32",
4
4
  "description": "xtrm-tools: dual-runtime workflow enforcement (Claude Code + Pi) — hooks, extensions, skills, and MCP servers",
5
5
  "author": {
6
6
  "name": "jaggers"
package/README.md CHANGED
@@ -1,8 +1,52 @@
1
1
  # XTRM-Tools
2
2
 
3
- > **Dual-runtime workflow system** Claude Code plugin + Pi extension suite for workflow enforcement, code quality gates, issue tracking, and development automation.
3
+ **xtrm** (`xt`) is an agentic workflow system that turns Claude Code and Pi into disciplined, self-managing development agents. Every session is structured, every change is tracked, and every agent knows exactly what to do next.
4
4
 
5
- **Version 0.5.29** | [Complete Guide](XTRM-GUIDE.md) | [Changelog](CHANGELOG.md)
5
+ ### Beads issue tracking built for agents
6
+
7
+ [Beads](https://github.com/Jaggerxtrm/beads) is a Dolt-backed issue tracker designed for agentic workflows. Issues are first-class citizens: agents claim them before editing, close them before committing, and carry context forward across sessions and machines via persistent memory. The full `bd` CLI is available inside every session — `bd ready`, `bd update <id> --claim`, `bd close <id>`, `bd remember`.
8
+
9
+ ### Hooks — enforcement gates that run automatically
10
+
11
+ A policy compiler produces hooks for both Claude Code and Pi from a single source. These gates enforce the workflow without relying on the agent to remember: the **Edit gate** blocks writes without an active claim, the **Commit gate** blocks `git commit` until the issue is closed, the **Stop gate** checks for unclosed work at session end, and the **Memory gate** prompts the agent to persist insights before exiting. Quality gates run ESLint, tsc, ruff, and mypy automatically on every file save.
12
+
13
+ ### Skills — reusable agent behaviors
14
+
15
+ A library of composable skills covers the full development lifecycle: session management (`using-xtrm`), structured planning (`planning`), test coverage strategy (`test-planning`), autonomous session close (`xt-end`), PR queue management (`xt-merge`), documentation maintenance (`documenting`), and domain expertise (backend, devops, security, data science). Skills are injected into the agent context on demand and work identically in Claude Code and Pi.
16
+
17
+ ### Planning mode
18
+
19
+ The `planning` skill generates a structured issue board from any spec or idea — epics, tasks, dependencies, test coverage annotations — using `bd create` in parallel. Agents can pick up and continue planned work across sessions with full context. GitNexus impact analysis and Serena code intelligence are integrated into the planning flow so blast radius is assessed before a single line is written.
20
+
21
+ ### Statusline
22
+
23
+ A live statusline renders in every Claude Code session: active claim, open issue count, model, context window health (color-coded truecolor gradient), and token usage — all in a single line below the prompt. No configuration required after `xtrm install`.
24
+
25
+ ### Specialists *(upcoming)*
26
+
27
+ Native integration with the [specialists](https://github.com/Jaggerxtrm/specialists) framework — spawning purpose-built sub-agents for parallel workloads, code review, and long-running background tasks directly from within a session.
28
+
29
+ ---
30
+
31
+ **Version 0.5.30** | [Complete Guide](XTRM-GUIDE.md) | [Changelog](CHANGELOG.md)
32
+
33
+ ---
34
+
35
+ ## Documentation
36
+
37
+ | Doc | Contents |
38
+ |-----|----------|
39
+ | [XTRM-GUIDE.md](XTRM-GUIDE.md) | Complete reference — architecture, concepts, full workflow |
40
+ | [docs/hooks.md](docs/hooks.md) | All hooks — event wiring, gate logic, order, authoring |
41
+ | [docs/policies.md](docs/policies.md) | Policy system — compiler, schema, Claude/Pi parity |
42
+ | [docs/skills.md](docs/skills.md) | Skills catalog — all skills, categories, how they load |
43
+ | [docs/pi-extensions.md](docs/pi-extensions.md) | Pi extensions — managed sync, authoring, parity notes |
44
+ | [docs/worktrees.md](docs/worktrees.md) | xt worktrees — `xt claude/pi`, `xt end`, isolation model |
45
+ | [docs/mcp-servers.md](docs/mcp-servers.md) | MCP servers — gitnexus, github-grep, deepwiki, official plugins |
46
+ | [docs/cli-architecture.md](docs/cli-architecture.md) | CLI internals — install flow, diff/sync engine, config merge |
47
+ | [docs/project-skills.md](docs/project-skills.md) | Project-scoped skills — install, layout, Pi/Claude symlinks |
48
+ | [docs/testing.md](docs/testing.md) | Live testing checklist — integration, gates, worktree flows |
49
+ | [CHANGELOG.md](CHANGELOG.md) | Full version history |
6
50
 
7
51
  ---
8
52
 
@@ -17,7 +61,7 @@ xtrm install
17
61
 
18
62
  # Verify
19
63
  claude plugin list
20
- # → xtrm-tools@xtrm-tools Version: 0.5.10 Status: enabled
64
+ # → xtrm-tools@xtrm-tools Version: 0.5.30 Status: enabled
21
65
  ```
22
66
 
23
67
  **One-line run:**
@@ -41,52 +85,78 @@ npx -y github:Jaggerxtrm/xtrm-tools install
41
85
 
42
86
  ### Skills
43
87
 
44
- Core: `using-xtrm` (session manual), `documenting` (SSOT docs), `delegating` (task routing), `orchestrating-agents` (multi-model).
45
-
46
- Workflow: `xt-end` (close session), `xt-merge` (PR queue), `planning` (issue boards), `test-planning` (test coverage).
47
-
48
- Service: `using-quality-gates`, `using-service-skills`, `creating-service-skills`, `scoping-service-skills`, `updating-service-skills`.
49
-
50
- ---
51
-
52
- ## Plugin Structure
53
-
54
- ```
55
- plugins/xtrm-tools/
56
- ├── .claude-plugin/plugin.json # Manifest
57
- ├── hooks ../../hooks # All hook scripts + hooks.json
58
- ├── skills ../../skills # Auto-discovered skills
59
- └── .mcp.json ../../.mcp.json # MCP servers
60
- ```
61
-
62
- All hook paths use `${CLAUDE_PLUGIN_ROOT}` works from any installation location.
88
+ Skills are organized into two categories: **xtrm workflow** skills built specifically for the xtrm stack, and **general-purpose** expert skills that work in any project.
89
+
90
+ #### xtrm Workflow Skills
91
+
92
+ These skills implement the xtrm-specific development workflow — session management, issue tracking, planning, quality, and documentation patterns.
93
+
94
+ | Skill | Purpose |
95
+ |-------|---------|
96
+ | `using-xtrm` | Session operating manual — when to use which tool |
97
+ | `using-quality-gates` | Quality gate workflow — TDD guard, lint/typecheck cycle |
98
+ | `using-serena-lsp` | Code exploration and surgical edits via Serena LSP |
99
+ | `using-tdd` | Test-driven development with 80%+ coverage enforcement |
100
+ | `using-service-skills` | Service catalog discovery and expert persona activation |
101
+ | `xt-end` | Autonomous session close rebase, push, PR, cleanup |
102
+ | `xt-merge` | FIFO PR merge queue for xt worktree sessions |
103
+ | `planning` | Structured issue board from any spec, with phases and deps |
104
+ | `test-planning` | Test coverage planning alongside implementation work |
105
+ | `delegating` | Cost-optimized task delegation to background agents |
106
+ | `orchestrating-agents` | Multi-model orchestration (Gemini, Qwen handshake) |
107
+ | `documenting` | SSOT doc maintenance with drift detection |
108
+ | `sync-docs` | Doc audit and structural sync across a sprint |
109
+ | `skill-creator` | Create, improve, and evaluate skills |
110
+ | `find-skills` | Discover and install skills on demand |
111
+ | `creating-service-skills` | Generate operational service skill packages |
112
+ | `scoping-service-skills` | Task intake and service routing |
113
+ | `updating-service-skills` | Detect drift and sync expert persona docs |
114
+ | `prompt-improving` | Apply Claude XML best practices to prompts |
115
+
116
+ #### General-Purpose Expert Skills
117
+
118
+ Domain expert skills that can be used in any project, independent of the xtrm workflow.
119
+
120
+ | Skill | Purpose |
121
+ |-------|---------|
122
+ | `senior-backend` | NodeJS, Express, Go, Python, Postgres, REST/GraphQL |
123
+ | `senior-devops` | CI/CD, infrastructure as code, cloud platforms |
124
+ | `senior-security` | AppSec, pen testing, threat modeling, crypto |
125
+ | `senior-data-scientist` | Statistics, ML, A/B testing, causal inference |
126
+ | `docker-expert` | Multi-stage builds, Compose, container security |
127
+ | `python-testing` | pytest, TDD, fixtures, mocking, coverage |
128
+ | `hook-development` | PreToolUse/PostToolUse hook authoring |
129
+ | `clean-code` | Pragmatic coding standards, no over-engineering |
130
+ | `gitnexus-exploring` | Navigate unfamiliar code via knowledge graph |
131
+ | `gitnexus-impact-analysis` | Blast radius before making code changes |
132
+ | `gitnexus-debugging` | Trace bugs through call chains |
133
+ | `gitnexus-refactoring` | Plan safe refactors via dependency mapping |
134
+ | `obsidian-cli` | Interact with Obsidian vaults via CLI |
63
135
 
64
136
  ---
65
137
 
66
138
  ## Policy System
67
139
 
68
- Policies are the **single source of truth** for all enforcement rules. Located in `policies/`, they compile to both Claude hooks and Pi extensions.
69
-
70
- ### Policy Files
140
+ Policies in `policies/` are the single source of truth for all enforcement rules. They compile to both Claude hooks and Pi extensions.
71
141
 
72
142
  | Policy | Runtime | Purpose |
73
143
  |--------|---------|---------|
74
- | `session-flow.json` | both | Claim sync, stop gate, `xt end` reminder |
75
144
  | `beads.json` | both | Issue tracking gates |
76
- | `quality-gates.json` | both | Linting/typechecking |
145
+ | `session-flow.json` | both | Claim sync, stop gate, `xt end` reminder |
146
+ | `quality-gates.json` | both | Linting/typechecking on file edits |
77
147
  | `quality-gates-env.json` | both | Warns if tsc/ruff/eslint missing at session start |
78
- | `using-xtrm.json` | claude | Injects using-xtrm session manual at SessionStart |
79
148
  | `gitnexus.json` | claude | Knowledge graph enrichment |
80
- | `worktree-boundary.json` | claude | Blocks edits outside worktree when in `.xtrm/worktrees` |
149
+ | `using-xtrm.json` | claude | Injects session manual at SessionStart |
150
+ | `worktree-boundary.json` | claude | Blocks edits outside active worktree |
81
151
  | `service-skills.json` | pi | Territory-based skill activation |
82
152
 
83
- ### Compiler
84
-
85
153
  ```bash
86
154
  node scripts/compile-policies.mjs # Generate hooks.json
87
155
  node scripts/compile-policies.mjs --check # CI drift detection
88
156
  ```
89
157
 
158
+ See [docs/policies.md](docs/policies.md) for full schema and authoring reference.
159
+
90
160
  ---
91
161
 
92
162
  ## CLI Commands
@@ -98,75 +168,46 @@ xtrm <command> [options]
98
168
  | Command | Description |
99
169
  |---------|-------------|
100
170
  | `install` | Install plugin + beads + gitnexus (interactive target selection) |
101
- | `init` | Initialize project data (bd, gitnexus, service-registry) |
171
+ | `init` | Initialize project (bd, gitnexus, service-registry) |
102
172
  | `status` | Read-only diff view |
103
173
  | `clean` | Remove orphaned hooks |
104
174
  | `end` | Close worktree session: rebase, push, PR, cleanup |
105
175
  | `worktree list` | List all active `xt/*` worktrees |
106
- | `worktree clean` | Remove worktrees whose branch has been merged |
176
+ | `worktree clean` | Remove merged worktrees |
107
177
  | `claude` | Launch Claude Code in a sandboxed worktree |
108
- | `pi` | Launch Pi in a sandboxed worktree; includes `install/setup/status/doctor/reload` runtime management |
178
+ | `pi` | Launch Pi in a sandboxed worktree |
109
179
  | `docs show` | Display frontmatter for README, CHANGELOG, docs/*.md |
110
- | `debug` | Watch xtrm hook and bd lifecycle events in real time |
180
+ | `debug` | Watch hook and bd lifecycle events in real time |
111
181
 
112
- ### Pi Extension Loading
182
+ **Flags:** `--yes / -y` (non-interactive), `--dry-run` (preview), `--prune` (force-replace hooks)
113
183
 
114
- - `xt pi setup`, `xt pi install`, and `xt pi reload` share the same managed extension sync behavior.
115
- - Extensions from `config/pi/extensions/<name>/` are synced to `~/.pi/agent/extensions/<name>/` and loaded by Pi auto-discovery.
116
- - Managed extensions are not re-registered with `pi install -l` (prevents duplicate command/flag/shortcut registration conflicts).
117
- - `custom-footer` now mirrors Claude statusline information density with a two-line parity layout (session metadata + claim/open issue row), while remaining compatible with `pi-dex` footer refresh behavior.
118
-
119
- ### Flags
120
-
121
- | Flag | Description |
122
- |------|-------------|
123
- | `--yes`, `-y` | Non-interactive mode |
124
- | `--dry-run` | Preview only |
125
- | `--prune` | Force-replace hooks |
126
-
127
- ---
128
-
129
- ## Hooks Reference
130
-
131
- Beads gates: **Edit** (claim required), **Commit** (close issue first), **Stop** (unclosed check), **Memory** (persist insights).
132
-
133
- See [docs/hooks.md](docs/hooks.md) for full reference.
184
+ See [docs/cli-architecture.md](docs/cli-architecture.md) for internals.
134
185
 
135
186
  ---
136
187
 
137
188
  ## MCP Servers
138
189
 
139
- Configured in `.mcp.json` (xtrm-managed only):
140
-
141
190
  | Server | Purpose |
142
191
  |--------|---------|
143
192
  | `gitnexus` | Knowledge graph |
144
193
  | `github-grep` | Code search |
145
- | `deepwiki` | DeepWiki docs search |
194
+ | `deepwiki` | Repository documentation |
195
+
196
+ Official Claude plugins installed by `xtrm install`: `serena`, `context7`, `github`, `ralph-loop`.
146
197
 
147
- Official Claude plugins are installed during `xtrm install`:
148
- - `serena@claude-plugins-official`
149
- - `context7@claude-plugins-official`
150
- - `github@claude-plugins-official`
151
- - `ralph-loop@claude-plugins-official`
198
+ See [docs/mcp-servers.md](docs/mcp-servers.md) for configuration details.
152
199
 
153
200
  ---
154
201
 
155
202
  ## Issue Tracking (Beads)
156
203
 
157
204
  ```bash
158
- bd ready # Find unblocked work
159
- bd update <id> --claim # Claim an issue
160
- bd close <id> --reason "Done" # Close when done
205
+ bd ready # Find unblocked work
206
+ bd update <id> --claim # Claim an issue
207
+ bd close <id> --reason "Done" # Close when done
161
208
  ```
162
209
 
163
- ---
164
-
165
- ## Documentation
166
-
167
- - **[XTRM-GUIDE.md](XTRM-GUIDE.md)** — Complete reference guide
168
- - **[CHANGELOG.md](CHANGELOG.md)** — Full version history
169
- - **[ROADMAP.md](ROADMAP.md)** — Planned features
210
+ See [XTRM-GUIDE.md](XTRM-GUIDE.md) for the full `bd` command reference.
170
211
 
171
212
  ---
172
213
 
@@ -174,15 +215,13 @@ bd close <id> --reason "Done" # Close when done
174
215
 
175
216
  | Version | Date | Highlights |
176
217
  |---------|------|------------|
218
+ | 0.5.30 | 2026-03-22 | Fix statusline on fresh installs; `xt end --dry-run` |
177
219
  | 0.5.29 | 2026-03-22 | Statusline truecolor gradient; `--no-verify` autocommit; xt-merge skill |
178
220
  | 0.5.24 | 2026-03-21 | Hash-based docs drift detection; CLI docs cleanup |
179
- | 0.5.20 | 2026-03-21 | `xtrm docs show` command; worktree-boundary hook; statusline injection |
180
- | 0.5.10 | 2026-03-21 | Install cleanup; Qwen/Gemini dead code removed |
221
+ | 0.5.20 | 2026-03-21 | `xtrm docs show`; worktree-boundary hook; statusline injection |
181
222
 
182
223
  See [CHANGELOG.md](CHANGELOG.md) for full history.
183
224
 
184
225
  ---
185
226
 
186
- ## License
187
-
188
227
  MIT License
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xtrm-cli",
3
- "version": "0.5.30",
3
+ "version": "0.5.32",
4
4
  "description": "Claude Code tools installer (skills, hooks, MCP servers)",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",
@@ -0,0 +1,134 @@
1
+ import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
2
+ import { spawnSync, execSync } from "node:child_process";
3
+ import * as fs from "node:fs";
4
+ import * as path from "node:path";
5
+
6
+ type InstallMethod =
7
+ | { type: "npm"; packages: string[] }
8
+ | { type: "go"; module: string }
9
+ | { type: "rustup"; component: string }
10
+ | { type: "brew"; formula: string }
11
+ | { type: "system"; hint: string };
12
+
13
+ interface LspTarget {
14
+ label: string;
15
+ markers: string[];
16
+ bin: string;
17
+ install: InstallMethod;
18
+ }
19
+
20
+ const TARGETS: LspTarget[] = [
21
+ {
22
+ label: "TypeScript/JavaScript",
23
+ markers: ["tsconfig.json", "package.json"],
24
+ bin: "typescript-language-server",
25
+ install: { type: "npm", packages: ["typescript-language-server", "typescript"] },
26
+ },
27
+ {
28
+ label: "Python",
29
+ markers: ["pyproject.toml", "requirements.txt", "setup.py"],
30
+ bin: "pyright-langserver",
31
+ install: { type: "npm", packages: ["pyright"] },
32
+ },
33
+ {
34
+ label: "Vue",
35
+ markers: ["vue.config.js", "vite.config.ts", "vite.config.js"],
36
+ bin: "vue-language-server",
37
+ install: { type: "npm", packages: ["@vue/language-server"] },
38
+ },
39
+ {
40
+ label: "Svelte",
41
+ markers: ["svelte.config.js", "svelte.config.ts"],
42
+ bin: "svelteserver",
43
+ install: { type: "npm", packages: ["svelte-language-server"] },
44
+ },
45
+ {
46
+ label: "Go",
47
+ markers: ["go.mod"],
48
+ bin: "gopls",
49
+ install: { type: "go", module: "golang.org/x/tools/gopls@latest" },
50
+ },
51
+ {
52
+ label: "Rust",
53
+ markers: ["Cargo.toml"],
54
+ bin: "rust-analyzer",
55
+ install: { type: "rustup", component: "rust-analyzer" },
56
+ },
57
+ {
58
+ label: "Kotlin",
59
+ markers: ["build.gradle", "build.gradle.kts", "settings.gradle", "settings.gradle.kts", "pom.xml"],
60
+ bin: "kotlin-language-server",
61
+ install: { type: "brew", formula: "JetBrains/utils/kotlin-lsp" },
62
+ },
63
+ {
64
+ label: "Swift",
65
+ markers: ["Package.swift"],
66
+ bin: "sourcekit-lsp",
67
+ install: { type: "system", hint: "sourcekit-lsp is bundled with Xcode — install Xcode or Command Line Tools: xcode-select --install" },
68
+ },
69
+ ];
70
+
71
+ function isInPath(bin: string): boolean {
72
+ try {
73
+ execSync(`which ${bin}`, { stdio: "pipe" });
74
+ return true;
75
+ } catch {
76
+ return false;
77
+ }
78
+ }
79
+
80
+ function detectTargets(cwd: string): LspTarget[] {
81
+ return TARGETS.filter(target =>
82
+ target.markers.some(marker => fs.existsSync(path.join(cwd, marker)))
83
+ );
84
+ }
85
+
86
+ function runInstall(target: LspTarget, ctx: any): void {
87
+ const { install } = target;
88
+ let cmd: string[];
89
+ let fallback: string;
90
+
91
+ if (install.type === "npm") {
92
+ cmd = ["npm", "install", "-g", ...install.packages];
93
+ fallback = `npm install -g ${install.packages.join(" ")}`;
94
+ } else if (install.type === "go") {
95
+ cmd = ["go", "install", install.module];
96
+ fallback = `go install ${install.module}`;
97
+ } else if (install.type === "rustup") {
98
+ cmd = ["rustup", "component", "add", install.component];
99
+ fallback = `rustup component add ${install.component}`;
100
+ } else if (install.type === "brew") {
101
+ cmd = ["brew", "install", install.formula];
102
+ fallback = `brew install ${install.formula}`;
103
+ } else {
104
+ // system — cannot auto-install, just warn
105
+ ctx.ui.notify(`lsp-bootstrap: ${target.label} LSP not found — ${install.hint}`, "warning");
106
+ return;
107
+ }
108
+
109
+ ctx.ui.notify(`lsp-bootstrap: installing ${target.label} language server…`, "info");
110
+ const r = spawnSync(cmd[0], cmd.slice(1), { encoding: "utf8", stdio: "pipe" });
111
+ if (r.status !== 0) {
112
+ ctx.ui.notify(`lsp-bootstrap: failed to install ${target.label} — run manually: ${fallback}`, "warning");
113
+ }
114
+ }
115
+
116
+ export default function register(api: ExtensionAPI) {
117
+ api.on("session_start", async (ctx: any) => {
118
+ const cwd = process.cwd();
119
+ const detected = detectTargets(cwd);
120
+ if (detected.length === 0) return;
121
+
122
+ const missing = detected.filter(t => !isInPath(t.bin));
123
+ if (missing.length === 0) return;
124
+
125
+ for (const target of missing) {
126
+ runInstall(target, ctx);
127
+ }
128
+
129
+ const nowReady = missing.filter(t => isInPath(t.bin)).map(t => t.label);
130
+ if (nowReady.length > 0) {
131
+ ctx.ui.notify(`lsp-bootstrap: ready — ${nowReady.join(", ")}`, "info");
132
+ }
133
+ });
134
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@xtrm/pi-lsp-bootstrap",
3
+ "version": "1.0.0",
4
+ "description": "xtrm Pi extension: auto-install LSP server binaries based on detected project type",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": "./index.ts"
8
+ },
9
+ "keywords": [
10
+ "pi",
11
+ "extension",
12
+ "xtrm",
13
+ "lsp"
14
+ ],
15
+ "author": "xtrm",
16
+ "license": "MIT"
17
+ }
@@ -37,6 +37,7 @@
37
37
  "npm:pi-dex",
38
38
  "npm:pi-gitnexus",
39
39
  "npm:pi-serena-tools",
40
+ "npm:lsp-pi",
40
41
  "npm:@zenobius/pi-worktrees",
41
42
  "npm:@robhowley/pi-structured-return",
42
43
  "npm:@aliou/pi-guardrails"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xtrm-tools",
3
- "version": "0.5.30",
3
+ "version": "0.5.32",
4
4
  "description": "Claude Code tools installer (skills, hooks, MCP servers)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xtrm-tools",
3
- "version": "0.5.30",
3
+ "version": "0.5.32",
4
4
  "description": "xtrm-tools: dual-runtime workflow enforcement (Claude Code + Pi) — hooks, extensions, skills, and MCP servers",
5
5
  "author": {
6
6
  "name": "jaggers"
File without changes