xtrm-tools 0.5.29 → 0.5.31

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.
Files changed (36) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +19 -3
  3. package/README.md +121 -106
  4. package/cli/dist/index.cjs +311 -161
  5. package/cli/dist/index.cjs.map +1 -1
  6. package/cli/package.json +1 -1
  7. package/config/instructions/agents-top.md +1 -1
  8. package/config/instructions/claude-top.md +1 -1
  9. package/config/pi/extensions/beads/index.ts +68 -7
  10. package/config/pi/extensions/core/guard-rules.ts +0 -2
  11. package/config/pi/extensions/custom-footer/index.ts +5 -6
  12. package/config/pi/extensions/lsp-bootstrap/index.ts +88 -0
  13. package/config/pi/extensions/lsp-bootstrap/package.json +17 -0
  14. package/config/pi/install-schema.json +1 -0
  15. package/hooks/beads-claim-sync.mjs +18 -6
  16. package/hooks/beads-gate-messages.mjs +5 -2
  17. package/hooks/beads-memory-gate.mjs +20 -7
  18. package/hooks/statusline.mjs +44 -8
  19. package/package.json +3 -2
  20. package/plugins/xtrm-tools/.claude-plugin/plugin.json +1 -1
  21. package/plugins/xtrm-tools/hooks/beads-claim-sync.mjs +18 -6
  22. package/plugins/xtrm-tools/hooks/beads-gate-messages.mjs +5 -2
  23. package/plugins/xtrm-tools/hooks/beads-memory-gate.mjs +20 -7
  24. package/plugins/xtrm-tools/hooks/statusline.mjs +44 -8
  25. package/plugins/xtrm-tools/skills/sync-docs/SKILL.md +57 -2
  26. package/plugins/xtrm-tools/skills/sync-docs/scripts/drift_detector.py +1 -1
  27. package/plugins/xtrm-tools/skills/sync-docs/scripts/validate_metadata.py +1 -1
  28. package/plugins/xtrm-tools/skills/xt-end/SKILL.md +4 -4
  29. package/plugins/xtrm-tools/skills/xt-merge/SKILL.md +190 -0
  30. package/skills/sync-docs/SKILL.md +57 -2
  31. package/skills/sync-docs/scripts/drift_detector.py +1 -1
  32. package/skills/sync-docs/scripts/validate_metadata.py +1 -1
  33. package/skills/xt-end/SKILL.md +4 -4
  34. package/skills/xt-merge/SKILL.md +190 -0
  35. /package/plugins/xtrm-tools/skills/{using-TDD → using-tdd}/SKILL.md +0 -0
  36. /package/skills/{using-TDD → using-tdd}/SKILL.md +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xtrm-tools",
3
- "version": "0.5.29",
3
+ "version": "0.5.31",
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/CHANGELOG.md CHANGED
@@ -12,13 +12,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
12
12
  ### Added
13
13
  - gitnexus hook now fires on Grep/Read/Glob tools (parity with Pi); quality-check covers .cjs/.mjs files; quality gate env pre-check at SessionStart; policies.md rewritten from scaffold; using-xtrm SKILL.md rewritten; worktree-session migrated to bd worktree; branch state + xt end reminders in gate messages
14
14
 
15
- ---
16
-
17
-
18
15
  ### Changed
19
16
  - v0.5.26 docs sync and Pi parity updates: quality gates, beads/session-flow lifecycle, using-xtrm loader parity, and policy-path normalization
20
17
  - Pi installer parity: `xt pi setup` now matches `xt pi install/reload` for extension deployment; managed extensions use sync + auto-discovery and no longer use duplicate `pi install -l` registration
21
18
  - Pi custom-footer now tracks Claude statusline parity with richer runtime/git snapshots and a two-line footer layout (metadata + issue row), including pi-dex-safe reapply behavior.
19
+
20
+ ---
21
+
22
+ ## [0.5.29] - 2026-03-22
23
+
24
+ ### Added
25
+ - `skills/merge-prs/SKILL.md` and `specialists/merge-prs.specialist.yaml` for PR merge workflow
26
+ - Release script now encodes `--tag latest` for npm publish
27
+
28
+ ### Changed
29
+ - Detect default branch via `symbolic-ref` + master fallback, replaced 9 hardcoded `origin/main` references
30
+ - Optimized Pi installer with pre-check and diff-based sync
31
+ - Statusline improvements: fixed sessionId fallback, fixed hardcoded icons, added statusline-claim to .gitignore
32
+
33
+ ### Fixed
34
+ - **Autocommit now uses `--no-verify`**: both Claude hook (`beads-claim-sync.mjs`) and Pi extension (`beads/index.ts`) skip pre-commit hooks on automated `bd close` commits
35
+
36
+ ---
37
+
22
38
  ## [0.5.20] - 2026-03-21
23
39
 
24
40
  ### Added
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.24** | [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,58 +85,78 @@ npx -y github:Jaggerxtrm/xtrm-tools install
41
85
 
42
86
  ### Skills
43
87
 
44
- | Skill | Type | Purpose |
45
- |-------|------|---------|
46
- | `using-xtrm` | Global | Session operating manual |
47
- | `documenting` | Global | SSOT documentation with drift detection |
48
- | `delegating` | Global | Task delegation to cost-optimized agents |
49
- | `orchestrating-agents` | Global | Multi-model collaboration |
50
- | `using-quality-gates` | Global | Quality gate configuration and usage guide |
51
- | `using-service-skills` | Global | Territory-based service skill activation |
52
- | `creating-service-skills` | Global | Scaffold new service skills via Serena LSP deep dive |
53
- | `scoping-service-skills` | Global | Define territory globs for service skill routing |
54
- | `updating-service-skills` | Global | Drift detection and sync for service skill definitions |
55
-
56
- ---
57
-
58
- ## Plugin Structure
59
-
60
- ```
61
- plugins/xtrm-tools/
62
- ├── .claude-plugin/plugin.json # Manifest
63
- ├── hooks ../../hooks # All hook scripts + hooks.json
64
- ├── skills ../../skills # Auto-discovered skills
65
- └── .mcp.json ../../.mcp.json # MCP servers
66
- ```
67
-
68
- 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 |
69
135
 
70
136
  ---
71
137
 
72
138
  ## Policy System
73
139
 
74
- Policies are the **single source of truth** for all enforcement rules. Located in `policies/`, they compile to both Claude hooks and Pi extensions.
75
-
76
- ### 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.
77
141
 
78
142
  | Policy | Runtime | Purpose |
79
143
  |--------|---------|---------|
80
- | `session-flow.json` | both | Claim sync, stop gate, `xt end` reminder |
81
144
  | `beads.json` | both | Issue tracking gates |
82
- | `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 |
83
147
  | `quality-gates-env.json` | both | Warns if tsc/ruff/eslint missing at session start |
84
- | `using-xtrm.json` | claude | Injects using-xtrm session manual at SessionStart |
85
148
  | `gitnexus.json` | claude | Knowledge graph enrichment |
86
- | `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 |
87
151
  | `service-skills.json` | pi | Territory-based skill activation |
88
152
 
89
- ### Compiler
90
-
91
153
  ```bash
92
154
  node scripts/compile-policies.mjs # Generate hooks.json
93
155
  node scripts/compile-policies.mjs --check # CI drift detection
94
156
  ```
95
157
 
158
+ See [docs/policies.md](docs/policies.md) for full schema and authoring reference.
159
+
96
160
  ---
97
161
 
98
162
  ## CLI Commands
@@ -104,91 +168,46 @@ xtrm <command> [options]
104
168
  | Command | Description |
105
169
  |---------|-------------|
106
170
  | `install` | Install plugin + beads + gitnexus (interactive target selection) |
107
- | `init` | Initialize project data (bd, gitnexus, service-registry) |
171
+ | `init` | Initialize project (bd, gitnexus, service-registry) |
108
172
  | `status` | Read-only diff view |
109
173
  | `clean` | Remove orphaned hooks |
110
174
  | `end` | Close worktree session: rebase, push, PR, cleanup |
111
175
  | `worktree list` | List all active `xt/*` worktrees |
112
- | `worktree clean` | Remove worktrees whose branch has been merged |
176
+ | `worktree clean` | Remove merged worktrees |
113
177
  | `claude` | Launch Claude Code in a sandboxed worktree |
114
- | `pi` | Launch Pi in a sandboxed worktree; includes `install/setup/status/doctor/reload` runtime management |
178
+ | `pi` | Launch Pi in a sandboxed worktree |
115
179
  | `docs show` | Display frontmatter for README, CHANGELOG, docs/*.md |
116
- | `debug` | Watch xtrm hook and bd lifecycle events in real time |
117
-
118
- ### Pi Extension Loading
119
-
120
- - `xt pi setup`, `xt pi install`, and `xt pi reload` share the same managed extension sync behavior.
121
- - Extensions from `config/pi/extensions/<name>/` are synced to `~/.pi/agent/extensions/<name>/` and loaded by Pi auto-discovery.
122
- - Managed extensions are not re-registered with `pi install -l` (prevents duplicate command/flag/shortcut registration conflicts).
123
- - `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.
124
-
125
- ### Flags
126
-
127
- | Flag | Description |
128
- |------|-------------|
129
- | `--yes`, `-y` | Non-interactive mode |
130
- | `--dry-run` | Preview only |
131
- | `--prune` | Force-replace hooks |
132
-
133
- ---
134
-
135
- ## Hooks Reference
136
-
137
- ### Event Types
180
+ | `debug` | Watch hook and bd lifecycle events in real time |
138
181
 
139
- | Event | When |
140
- |-------|------|
141
- | `SessionStart` | Session begins |
142
- | `UserPromptSubmit` | After user submits prompt |
143
- | `PreToolUse` | Before tool invocation |
144
- | `PostToolUse` | After tool completes |
145
- | `Stop` | Session ends |
146
- | `PreCompact` | Before compaction |
182
+ **Flags:** `--yes / -y` (non-interactive), `--dry-run` (preview), `--prune` (force-replace hooks)
147
183
 
148
- ### Beads Gates
149
-
150
- | Hook | Behavior |
151
- |------|----------|
152
- | Edit Gate | Requires claimed issue to edit files |
153
- | Commit Gate | Prompts to close issue before commit |
154
- | Stop Gate | Blocks session end with unclosed issues |
155
- | Memory Gate | Prompts to persist insights when closing |
184
+ See [docs/cli-architecture.md](docs/cli-architecture.md) for internals.
156
185
 
157
186
  ---
158
187
 
159
188
  ## MCP Servers
160
189
 
161
- Configured in `.mcp.json` (xtrm-managed only):
162
-
163
190
  | Server | Purpose |
164
191
  |--------|---------|
165
192
  | `gitnexus` | Knowledge graph |
166
193
  | `github-grep` | Code search |
167
- | `deepwiki` | DeepWiki docs search |
194
+ | `deepwiki` | Repository documentation |
195
+
196
+ Official Claude plugins installed by `xtrm install`: `serena`, `context7`, `github`, `ralph-loop`.
168
197
 
169
- Official Claude plugins are installed during `xtrm install`:
170
- - `serena@claude-plugins-official`
171
- - `context7@claude-plugins-official`
172
- - `github@claude-plugins-official`
173
- - `ralph-loop@claude-plugins-official`
198
+ See [docs/mcp-servers.md](docs/mcp-servers.md) for configuration details.
174
199
 
175
200
  ---
176
201
 
177
202
  ## Issue Tracking (Beads)
178
203
 
179
204
  ```bash
180
- bd ready # Find unblocked work
181
- bd update <id> --claim # Claim an issue
182
- 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
183
208
  ```
184
209
 
185
- ---
186
-
187
- ## Documentation
188
-
189
- - **[XTRM-GUIDE.md](XTRM-GUIDE.md)** — Complete reference guide
190
- - **[CHANGELOG.md](CHANGELOG.md)** — Full version history
191
- - **[ROADMAP.md](ROADMAP.md)** — Planned features
210
+ See [XTRM-GUIDE.md](XTRM-GUIDE.md) for the full `bd` command reference.
192
211
 
193
212
  ---
194
213
 
@@ -196,17 +215,13 @@ bd close <id> --reason "Done" # Close when done
196
215
 
197
216
  | Version | Date | Highlights |
198
217
  |---------|------|------------|
199
- | 0.5.24 | 2026-03-21 | Hash-based docs drift detection; CLI docs cleanup; `docs` and `debug` commands documented |
200
- | 0.5.23 | 2026-03-21 | `xtrm debug` command for real-time event monitoring |
201
- | 0.5.20 | 2026-03-21 | `xtrm docs show` command; worktree-boundary hook; statusline injection |
202
- | 0.5.10 | 2026-03-21 | Install cleanup: removes stale `~/.claude/hooks/` + `~/.claude/skills/`; Qwen/Gemini dead code removed |
203
- | 0.5.9 | 2026-03-20 | Worktrees moved inside repo under `.xtrm/worktrees/` |
204
- | 0.5.8 | 2026-03-20 | session-flow rewrite: claim sync, stop gate, `xt end` reminder |
205
- | 0.5.7 | 2026-03-20 | Dead hooks removed; dead CLI removed (`finish.ts`, `session-state.ts`) |
206
- | 0.5.6 | 2026-03-20 | `xt` CLI commands; plugin-only delivery for Claude; deprecated `xtrm finish` |
218
+ | 0.5.30 | 2026-03-22 | Fix statusline on fresh installs; `xt end --dry-run` |
219
+ | 0.5.29 | 2026-03-22 | Statusline truecolor gradient; `--no-verify` autocommit; xt-merge skill |
220
+ | 0.5.24 | 2026-03-21 | Hash-based docs drift detection; CLI docs cleanup |
221
+ | 0.5.20 | 2026-03-21 | `xtrm docs show`; worktree-boundary hook; statusline injection |
207
222
 
208
- ---
223
+ See [CHANGELOG.md](CHANGELOG.md) for full history.
209
224
 
210
- ## License
225
+ ---
211
226
 
212
227
  MIT License