xtrm-tools 0.5.6 → 0.5.7

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/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xtrm-cli",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "description": "Claude Code tools installer (skills, hooks, MCP servers)",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",
package/hooks/README.md CHANGED
@@ -10,6 +10,20 @@ Hooks intercept specific events in the Claude Code lifecycle. Following architec
10
10
 
11
11
  ## Project Hooks
12
12
 
13
+ ### main-guard.mjs
14
+
15
+ **Purpose**: Enforces PR-only merge workflow with full git protection. Blocks direct commits and dangerous `git checkout`, `git reset`, and file writes via Bash on protected branches (`main`/`master`).
16
+
17
+ **Trigger**: PreToolUse (Write|Edit|MultiEdit|Serena edit tools|Bash)
18
+
19
+ **Configuration**: Installed automatically to protect the main branch from unreviewed changes.
20
+
21
+ ### main-guard-post-push.mjs
22
+
23
+ **Purpose**: Workflow enforcement. After pushing a feature branch, reminds to open a PR, merge using `gh pr merge --squash`, and sync local via `git reset --hard origin/main`.
24
+
25
+ **Trigger**: PostToolUse (Bash: git push)
26
+
13
27
  ### gitnexus-hook.cjs
14
28
 
15
29
  **Purpose**: Enriches tool calls with knowledge graph context via `gitnexus augment`. Now supports Serena tools and uses a deduplication cache for efficiency.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xtrm-tools",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "description": "Claude Code tools installer (skills, hooks, MCP servers)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -26,7 +26,7 @@ within this stack. Read it at session start and refer back when uncertain about
26
26
  | **Hooks** | Automated lifecycle enforcement (gates, suggestions, reminders) |
27
27
  | **Project Data (`xtrm init`)** | Per-repo bootstrap data (`.beads/`, `service-registry.json`, GitNexus index) |
28
28
  | **MCP Servers** | Semantic tools: Serena (code), gitnexus (graph), context7 (docs), deepwiki |
29
- | **CLI** | `xtrm install / status / finish / reset / help` — sync and closure tooling |
29
+ | **CLI** | `xtrm install / status / reset / help` + `xt claude / pi / worktree / end` — sync and closure tooling |
30
30
  | **beads (bd)** | Git-backed issue tracker with session gate enforcement |
31
31
 
32
32
  ---
@@ -79,24 +79,23 @@ You cannot edit files without a claim, and you cannot safely end a closure-in-pr
79
79
  # 1. Claim before editing
80
80
  bd list --status=open
81
81
  bd update <id> --claim
82
- # hook auto-sets session claim + auto-creates worktree + writes .xtrm-session-state.json
82
+ # hook auto-sets session claim
83
83
 
84
84
  # 2. Work in the claimed branch/worktree
85
85
 
86
86
  # 3. Close issue when implementation is done
87
87
  bd close <id>
88
88
 
89
- # 4. Session close protocol (single command)
90
- xtrm finish
89
+ # 4. Session close protocol (single command, run from within the worktree)
90
+ xt end
91
91
  # blocking: commit/push/pr-create/auto-merge poll/worktree cleanup
92
92
  ```
93
93
 
94
94
  **Key rules:**
95
95
  - One active claim per session
96
96
  - Always work on a **feature branch**, never directly on `main`/`master`
97
- - `main-guard.mjs` blocks edits on protected branches
98
- - `beads-stop-gate.mjs` blocks stop for closure phases: `waiting-merge`, `conflicting`, `pending-cleanup`
99
- - If blocked on stop: resolve state then re-run `xtrm finish`
97
+ - `beads-stop-gate.mjs` blocks stop when active in_progress claim exists
98
+ - If blocked on stop: close the claim then re-run `xt end`
100
99
 
101
100
  ---
102
101
 
@@ -211,11 +210,10 @@ These hooks run automatically — you cannot disable them mid-session:
211
210
 
212
211
  | Hook | Trigger | Effect |
213
212
  |---|---|---|
214
- | `main-guard.mjs` | PreToolUse (Edit/Write/Serena/Bash) | Blocks edits and unsafe Bash on protected branches |
215
213
  | `beads-edit-gate.mjs` | PreToolUse (Edit/Write/Serena) | Blocks edits without active claim |
216
214
  | `beads-commit-gate.mjs` | PreToolUse (Bash: git commit) | Blocks commit with unclosed claim |
217
- | `beads-claim-sync.mjs` | PostToolUse (Bash claim command) | Syncs claim + creates worktree + writes session state |
218
- | `beads-stop-gate.mjs` | Stop | Blocks stop for unresolved session-flow phases |
215
+ | `beads-claim-sync.mjs` | PostToolUse (Bash claim command) | Runs auto-commit on bd close (feature branches only) |
216
+ | `beads-stop-gate.mjs` | Stop | Blocks stop when active in_progress claim exists |
219
217
  | `beads-memory-gate.mjs` | Stop | Prompts for persistent insights after closure |
220
218
  | `beads-compact-save/restore.mjs` | PreCompact / SessionStart | Preserves claim + session state across compact |
221
219
  | `serena-workflow-reminder.py` | SessionStart | Reminds semantic editing workflow |
@@ -241,5 +239,4 @@ These hooks run automatically — you cannot disable them mid-session:
241
239
  2. All d=1 dependents updated (if any signal from impact analysis)
242
240
  3. Tests pass (targeted + relevant integration)
243
241
  4. Beads issue closed: `bd close <id>`
244
- 5. Run `xtrm finish` for blocking closure lifecycle
245
- 6. Verify session state reached `cleanup-done` (or intentional re-entry state)
242
+ 5. Run `xt end` from within the worktree for blocking closure lifecycle