xtrm-tools 0.7.11 → 0.7.13

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 (26) hide show
  1. package/.xtrm/hooks/specialists/specialists-memory-cache-sync.mjs +57 -0
  2. package/.xtrm/registry.json +477 -389
  3. package/.xtrm/skills/default/premortem/SKILL.md +218 -0
  4. package/.xtrm/skills/default/releasing/SKILL.md +90 -0
  5. package/.xtrm/skills/default/sync-docs/SKILL.md +88 -208
  6. package/.xtrm/skills/default/sync-docs/scripts/pre-context.sh +17 -0
  7. package/.xtrm/skills/default/update-specialists/SKILL.md +448 -0
  8. package/.xtrm/skills/default/update-xt/SKILL.md +34 -0
  9. package/.xtrm/skills/default/using-kpi/SKILL.md +150 -0
  10. package/.xtrm/skills/default/using-specialists-v2/SKILL.md +683 -0
  11. package/cli/dist/index.cjs +839 -429
  12. package/cli/dist/index.cjs.map +1 -1
  13. package/cli/package.json +1 -1
  14. package/package.json +2 -2
  15. package/packages/pi-extensions/.serena/project.yml +119 -0
  16. package/packages/pi-extensions/extensions/pi-serena-compact/index.ts +4 -12
  17. package/packages/pi-extensions/extensions/xtrm-loader/index.ts +0 -1
  18. package/packages/pi-extensions/extensions/xtrm-ui/index.ts +201 -36
  19. package/packages/pi-extensions/extensions/xtrm-ui/themes/pidex-dark-flattools.json +79 -0
  20. package/packages/pi-extensions/extensions/xtrm-ui/themes/pidex-dark.json +85 -0
  21. package/packages/pi-extensions/extensions/xtrm-ui/themes/pidex-light-flattools.json +79 -0
  22. package/packages/pi-extensions/extensions/xtrm-ui/themes/pidex-light.json +85 -0
  23. package/packages/pi-extensions/package.json +1 -1
  24. package/packages/pi-extensions/themes/xtrm-ui/pidex-dark-flattools.json +79 -0
  25. package/packages/pi-extensions/themes/xtrm-ui/pidex-dark.json +3 -3
  26. package/packages/pi-extensions/themes/xtrm-ui/pidex-light-flattools.json +79 -0
@@ -0,0 +1,57 @@
1
+ #!/usr/bin/env node
2
+ // specialists-memory-cache-sync — PostToolUse hook
3
+ // Keeps local memories FTS cache fresh after memory writes and git commits.
4
+
5
+ import { spawnSync } from 'node:child_process';
6
+ import { readFileSync } from 'node:fs';
7
+
8
+ function readInput() {
9
+ try {
10
+ return JSON.parse(readFileSync(0, 'utf-8'));
11
+ } catch {
12
+ return null;
13
+ }
14
+ }
15
+
16
+ function shouldSync(command) {
17
+ if (!command || typeof command !== 'string') return false;
18
+ const normalized = command.trim();
19
+ if (normalized.length === 0) return false;
20
+
21
+ return (
22
+ /(^|\s)git\s+commit(\s|$)/.test(normalized)
23
+ || /(^|\s)git\s+merge(\s|$)/.test(normalized)
24
+ || /(^|\s)xt\s+memory\s+update(\s|$)/.test(normalized)
25
+ || /(^|\s)bd\s+remember(\s|$)/.test(normalized)
26
+ );
27
+ }
28
+
29
+ function runSync(cwd, forceRefresh) {
30
+ const commandArgs = forceRefresh
31
+ ? ['memory', 'refresh', '--json']
32
+ : ['memory', 'sync', '--force', '--json'];
33
+
34
+ spawnSync('specialists', commandArgs, {
35
+ cwd,
36
+ stdio: 'ignore',
37
+ timeout: 10000,
38
+ env: process.env,
39
+ });
40
+ }
41
+
42
+ function main() {
43
+ const input = readInput();
44
+ if (!input || input.hook_event_name !== 'PostToolUse') return;
45
+
46
+ const toolName = input.tool_name;
47
+ if (toolName !== 'Bash' && toolName !== 'bash' && toolName !== 'execute_shell_command') return;
48
+
49
+ const command = input.tool_input?.command;
50
+ if (!shouldSync(command)) return;
51
+
52
+ const cwd = input.cwd ?? process.cwd();
53
+ const forceRefresh = /(^|\s)xt\s+memory\s+update(\s|$)/.test(command);
54
+ runSync(cwd, forceRefresh);
55
+ }
56
+
57
+ main();