@softspark/ai-toolkit 1.9.0 → 2.0.1
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/CHANGELOG.md +40 -14
- package/README.md +18 -18
- package/app/ARCHITECTURE.md +3 -3
- package/app/hooks/governance-capture.sh +1 -1
- package/app/hooks/pre-compact-save.sh +1 -1
- package/app/hooks/session-context.sh +1 -1
- package/app/hooks/track-usage.sh +2 -2
- package/app/hooks.json +20 -20
- package/app/plugins/memory-pack/README.md +1 -1
- package/app/plugins/memory-pack/hooks/observation-capture.sh +2 -2
- package/app/plugins/memory-pack/hooks/session-summary.sh +1 -1
- package/app/plugins/memory-pack/scripts/init_db.py +2 -2
- package/app/plugins/memory-pack/skills/mem-search/SKILL.md +3 -3
- package/app/skills/hook-creator/SKILL.md +2 -2
- package/app/skills/mem-search/SKILL.md +3 -3
- package/app/skills/repeat/SKILL.md +1 -1
- package/bin/ai-toolkit.js +9 -4
- package/kb/history/completed/enterprise-config-inheritance-plan-20260412.md +32 -34
- package/kb/history/completed/offline-slm-profile-plan-20260411.md +12 -12
- package/kb/planning/cloud-security-pack-plan.md +3 -3
- package/kb/procedures/maintenance-sop.md +3 -3
- package/kb/reference/architecture-overview.md +5 -5
- package/kb/reference/benchmark-config.md +1 -1
- package/kb/reference/competitive-features-implementation.md +2 -2
- package/kb/reference/enterprise-config-guide.md +9 -9
- package/kb/reference/extension-api.md +1 -1
- package/kb/reference/global-install-model.md +2 -2
- package/kb/reference/hooks-catalog.md +30 -30
- package/kb/reference/integrations.md +3 -3
- package/kb/reference/manifest-install.md +4 -4
- package/kb/reference/plugin-pack-conventions.md +5 -5
- package/kb/reference/stats.md +3 -3
- package/kb/reference/sync.md +3 -3
- package/llms-full.txt +118 -899
- package/llms.txt +0 -1
- package/manifest.json +3 -3
- package/package.json +1 -1
- package/scripts/add_rule.py +3 -2
- package/scripts/benchmark_config.py +3 -1
- package/scripts/compile_slm.py +9 -7
- package/scripts/config_cli.py +7 -7
- package/scripts/config_lock.py +12 -4
- package/scripts/config_merger.py +1 -1
- package/scripts/config_resolver.py +20 -7
- package/scripts/config_scaffold.py +4 -4
- package/scripts/config_validator.py +3 -3
- package/scripts/dir_rules_shared.py +1 -1
- package/scripts/doctor.py +3 -2
- package/scripts/install.py +12 -7
- package/scripts/install_git_hooks.py +1 -1
- package/scripts/install_steps/ai_tools.py +4 -4
- package/scripts/install_steps/hooks.py +1 -1
- package/scripts/install_steps/install_state.py +8 -6
- package/scripts/install_steps/project_registry.py +5 -5
- package/scripts/migrate.py +241 -0
- package/scripts/paths.py +50 -0
- package/scripts/plugin.py +8 -6
- package/scripts/remove_rule.py +5 -4
- package/scripts/stats.py +3 -2
- package/scripts/sync.py +3 -2
- package/scripts/update_projects.py +1 -1
- package/scripts/version_check.py +5 -2
- package/kb/planning/local-dashboard-plan.md +0 -773
package/CHANGELOG.md
CHANGED
|
@@ -7,10 +7,37 @@ Versioning follows [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## v2.0.1 — Migration Hook Path Fix (2026-04-12)
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **settings.json hook paths** — migration now rewrites ALL hook commands (including plugin hooks with non-toolkit `_source` tags like `memory-pack`, `enterprise-pack`) from `~/.ai-toolkit/hooks/` to `~/.softspark/ai-toolkit/hooks/`
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## v2.0.0 — SoftSpark Namespace Migration (2026-04-12)
|
|
18
|
+
|
|
19
|
+
### BREAKING CHANGES
|
|
20
|
+
- **Home directory moved** — `~/.ai-toolkit/` → `~/.softspark/ai-toolkit/`. Prepares the namespace for sibling tools (`jira-mcp`, etc.) under `~/.softspark/`
|
|
21
|
+
- **Per-project config renamed** — `.ai-toolkit.json` → `.softspark-toolkit.json`
|
|
22
|
+
- **Per-project lock file renamed** — `.ai-toolkit.lock.json` → `.softspark-toolkit.lock.json`
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- **Auto-migration** — on first `install`/`update` after upgrade, data is automatically migrated from legacy path. A `.migrated` marker is left in `~/.ai-toolkit/` pointing to the new location
|
|
26
|
+
- **`scripts/paths.py`** — centralized path constants module; all scripts import from here instead of hardcoding paths
|
|
27
|
+
- **`scripts/migrate.py`** — standalone migration script (`python3 scripts/migrate.py [--dry-run]`)
|
|
28
|
+
- **Legacy fallback** — `config_resolver` and `config_lock` transparently read old filenames (`.ai-toolkit.json`, `.ai-toolkit.lock.json`) if new ones don't exist
|
|
29
|
+
- **JS CLI fallback** — `ai-toolkit update` checks legacy `state.json` location for seamless first upgrade
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
- All Python scripts, Bash hooks, JS CLI, hooks.json, manifest.json, tests, and documentation updated to use `~/.softspark/ai-toolkit/` paths
|
|
33
|
+
- `AI_TOOLKIT_HOME` env var still supported as override
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
10
37
|
## v1.9.0 — Project Registry & Doc Sync (2026-04-12)
|
|
11
38
|
|
|
12
39
|
### Added
|
|
13
|
-
- **Project registry** — `install --local` automatically registers project path in `~/.ai-toolkit/projects.json`. `ai-toolkit update` propagates updates to all registered projects in parallel via `ThreadPoolExecutor`
|
|
40
|
+
- **Project registry** — `install --local` automatically registers project path in `~/.softspark/ai-toolkit/projects.json`. `ai-toolkit update` propagates updates to all registered projects in parallel via `ThreadPoolExecutor`
|
|
14
41
|
- **`ai-toolkit projects`** — list registered projects, `--prune` to remove stale (deleted directories), `remove <path>` to unregister specific project
|
|
15
42
|
- **Parallel update propagation** — `ai-toolkit update` (global) now auto-updates all registered local projects concurrently (max 8 workers)
|
|
16
43
|
|
|
@@ -25,21 +52,21 @@ Versioning follows [Semantic Versioning](https://semver.org/).
|
|
|
25
52
|
## v1.8.0 — Enterprise Config Inheritance (2026-04-12)
|
|
26
53
|
|
|
27
54
|
### Added
|
|
28
|
-
- **Configuration inheritance system** — `extends` pattern (like ESLint/TypeScript) for multi-repo AI governance. Organizations define a shared base config published as npm package, git URL, or local path; projects inherit via `.
|
|
55
|
+
- **Configuration inheritance system** — `extends` pattern (like ESLint/TypeScript) for multi-repo AI governance. Organizations define a shared base config published as npm package, git URL, or local path; projects inherit via `.softspark-toolkit.json`
|
|
29
56
|
- **`ai-toolkit config validate`** — schema validation + extends resolution + enforcement check
|
|
30
57
|
- **`ai-toolkit config diff`** — visual diff of project vs base config (profile, agents, rules, constitution, overrides)
|
|
31
|
-
- **`ai-toolkit config init`** — interactive or flag-driven `.
|
|
58
|
+
- **`ai-toolkit config init`** — interactive or flag-driven `.softspark-toolkit.json` creation with extends validation
|
|
32
59
|
- **`ai-toolkit config create-base`** — scaffolds ready-to-publish npm base config package (package.json, ai-toolkit.config.json, rules/, agents/, README)
|
|
33
60
|
- **`ai-toolkit config check`** — CI enforcement gate with JSON output and exit codes (0=pass, 1=fail, 2=no config)
|
|
34
61
|
- **Merge engine** — layered deep merge (base → project) with special handling for agents (requiredAgents enforcement), rules (union), constitution (immutability), enforce blocks (cannot weaken)
|
|
35
62
|
- **Constitution immutability guard** — Articles I-V absolutely immutable; base config articles immutable; projects can only ADD new articles (6+)
|
|
36
63
|
- **Override validation** — `override: true` + justification (min 20 chars) required; `forbidOverride` enforcement
|
|
37
64
|
- **Enforce constraints** — 4 types: `minHookProfile`, `requiredPlugins`, `forbidOverride`, `requiredAgents`
|
|
38
|
-
- **Lock file** (`.
|
|
39
|
-
- **Audit trail** — extends metadata recorded in `state.json` and `.
|
|
40
|
-
- **Offline fallback** — uses cached configs from `~/.ai-toolkit/config-cache/` when registry unavailable
|
|
65
|
+
- **Lock file** (`.softspark-toolkit.lock.json`) — pins resolved base config versions for reproducible installs across team; generated on `install --local`, updated on `update --local`
|
|
66
|
+
- **Audit trail** — extends metadata recorded in `state.json` and `.softspark-toolkit-extends.json`
|
|
67
|
+
- **Offline fallback** — uses cached configs from `~/.softspark/ai-toolkit/config-cache/` when registry unavailable
|
|
41
68
|
- **Cycle detection** — max 5-level extends chain with circular reference detection
|
|
42
|
-
- **Install integration** — `install --local` and `update --local` auto-detect `.
|
|
69
|
+
- **Install integration** — `install --local` and `update --local` auto-detect `.softspark-toolkit.json`, resolve extends, merge, validate, inject rules + constitution amendments into generated files
|
|
43
70
|
- **New CLI flags** — `--config <path>` (explicit config file), `--refresh-base` (force re-fetch)
|
|
44
71
|
- **JSON Schema** — `scripts/schemas/ai-toolkit-config.schema.json` for editor autocompletion
|
|
45
72
|
- **Enterprise config guide** — `kb/reference/enterprise-config-guide.md` comprehensive documentation
|
|
@@ -82,7 +109,6 @@ Versioning follows [Semantic Versioning](https://semver.org/).
|
|
|
82
109
|
|
|
83
110
|
### Added
|
|
84
111
|
- **Language rules propagation to all IDE editors** — shared `dir_rules_shared.py` module now injects language-specific and registered rules into Cursor, Windsurf, Cline, Roo Code, Augment, Antigravity, and Copilot generators. All platforms receive identical rule content from a single source of truth.
|
|
85
|
-
- **Local Dashboard Plan** — planning doc (`kb/planning/local-dashboard-plan.md`) for ai-toolkit UI with visual skill/agent management features
|
|
86
112
|
- **Enterprise Config Inheritance Plan** — planning doc (`kb/planning/enterprise-config-inheritance-plan.md`) for hierarchical config system
|
|
87
113
|
- **Offline SLM Profile Plan** — planning doc (`kb/planning/offline-slm-profile-plan.md`) for offline small language model profiles
|
|
88
114
|
- **Cloud Security Pack Plan** — planning doc (`kb/planning/cloud-security-pack-plan.md`) for multi-cloud audit (GCP/AWS/Azure)
|
|
@@ -215,7 +241,7 @@ Versioning follows [Semantic Versioning](https://semver.org/).
|
|
|
215
241
|
### Fixed
|
|
216
242
|
- **Version check**: `ai-toolkit status` and session-start hook now read installed version from `state.json` instead of `package.json`, fixing false "up to date" when npm package was upgraded but `ai-toolkit update` not yet run.
|
|
217
243
|
- **Version check**: `status` forces a fresh npm check (no 24h cache) so user always sees real state.
|
|
218
|
-
- **Session-start hook**: `TOOLKIT_DIR` resolved via `npm root -g` instead of broken `../../` relative path from `~/.ai-toolkit/hooks/`.
|
|
244
|
+
- **Session-start hook**: `TOOLKIT_DIR` resolved via `npm root -g` instead of broken `../../` relative path from `~/.softspark/ai-toolkit/hooks/`.
|
|
219
245
|
|
|
220
246
|
### Changed
|
|
221
247
|
- **Notification hook**: replaced inline macOS-only `osascript` with cross-platform `notify-waiting.sh` script (macOS/Linux/Windows WSL).
|
|
@@ -241,7 +267,7 @@ Versioning follows [Semantic Versioning](https://semver.org/).
|
|
|
241
267
|
## v1.3.10 — Patch (2026-04-07)
|
|
242
268
|
|
|
243
269
|
### Fixed
|
|
244
|
-
- **Version cache**: `install` and `update` now clear `~/.ai-toolkit/version-check.json` so `status` shows correct "Latest" immediately after upgrade.
|
|
270
|
+
- **Version cache**: `install` and `update` now clear `~/.softspark/ai-toolkit/version-check.json` so `status` shows correct "Latest" immediately after upgrade.
|
|
245
271
|
|
|
246
272
|
---
|
|
247
273
|
|
|
@@ -285,7 +311,7 @@ Versioning follows [Semantic Versioning](https://semver.org/).
|
|
|
285
311
|
## v1.3.5 — Patch (2026-04-07)
|
|
286
312
|
|
|
287
313
|
### Fixed
|
|
288
|
-
- **Stats not counting**: `track-usage.sh` and `user-prompt-submit.sh` now read prompt from stdin JSON (`.prompt` field) instead of non-existent `CLAUDE_USER_PROMPT` env var. Skill invocations are now properly tracked in `~/.ai-toolkit/stats.json`.
|
|
314
|
+
- **Stats not counting**: `track-usage.sh` and `user-prompt-submit.sh` now read prompt from stdin JSON (`.prompt` field) instead of non-existent `CLAUDE_USER_PROMPT` env var. Skill invocations are now properly tracked in `~/.softspark/ai-toolkit/stats.json`.
|
|
289
315
|
|
|
290
316
|
---
|
|
291
317
|
|
|
@@ -320,7 +346,7 @@ Versioning follows [Semantic Versioning](https://semver.org/).
|
|
|
320
346
|
- **Language Rules System**: 70 language-specific coding rules across 13 languages (TypeScript, Python, Go, Rust, Java, Kotlin, Swift, Dart, C#, PHP, C++, Ruby) + 5 common rules. 5 categories per language: coding-style, testing, patterns, frameworks, security.
|
|
321
347
|
- **MCP Templates**: 25 ready-to-use MCP server configuration templates (GitHub, PostgreSQL, Slack, Sentry, Context7, etc.) with CLI management (`ai-toolkit mcp add/list/show/remove`).
|
|
322
348
|
- **Extension API**: `inject-hook` / `remove-hook` commands for external tools to inject hooks into settings.json with unique `_source` tags. Parallels existing `inject-rule` / `remove-rule`.
|
|
323
|
-
- **Manifest-Driven Install**: Module-level install granularity (`--modules`), language auto-detection (`--auto-detect`), install state tracking (`~/.ai-toolkit/state.json`), `status` and `update` commands.
|
|
349
|
+
- **Manifest-Driven Install**: Module-level install granularity (`--modules`), language auto-detection (`--auto-detect`), install state tracking (`~/.softspark/ai-toolkit/state.json`), `status` and `update` commands.
|
|
324
350
|
- **6 new hooks**: `guard-config.sh` (config file protection), `mcp-health.sh` (MCP server health check), `governance-capture.sh` (security audit logging), `commit-quality.sh` (conventional commits advisory), `session-context.sh` (environment snapshot), `pre-compact-save.sh` (pre-compaction backup).
|
|
325
351
|
- **`/council` skill**: 4-perspective decision evaluation (Advocate, Critic, Pragmatist, User-Proxy) for architectural decisions.
|
|
326
352
|
- **`/introspect` skill**: Agent self-debugging with 7 failure pattern classification and recovery actions.
|
|
@@ -420,7 +446,7 @@ Versioning follows [Semantic Versioning](https://semver.org/).
|
|
|
420
446
|
- **`npx @softspark/ai-toolkit install`** — zero-friction trial without global install
|
|
421
447
|
- `--dry-run` flag as alias for `--list` in install/update
|
|
422
448
|
- MIT license — full open source, use/modify/distribute freely
|
|
423
|
-
- Global install into `~/.claude/` with merge-friendly propagation; hooks merged into `settings.json`, scripts copied into `~/.ai-toolkit/hooks/`
|
|
449
|
+
- Global install into `~/.claude/` with merge-friendly propagation; hooks merged into `settings.json`, scripts copied into `~/.softspark/ai-toolkit/hooks/`
|
|
424
450
|
- Idempotent generators with `<!-- TOOLKIT:ai-toolkit START/END -->` markers
|
|
425
451
|
- CI: auto-regenerate `AGENTS.md` and `llms.txt` on push to main; publish on tags
|
|
426
452
|
- **DRY refactoring**: `scripts/_common.py` shared library for all generators and CLI scripts; `app/hooks/_profile-check.sh` for 9 hooks; CLI uses data-driven `GENERATORS` map
|
|
@@ -433,7 +459,7 @@ Versioning follows [Semantic Versioning](https://semver.org/).
|
|
|
433
459
|
- **Visual companion** for `/write-a-prd` and `/design-an-interface` — ephemeral local HTTP server renders mockups, diagrams, and comparisons in browser during brainstorming
|
|
434
460
|
- **Memory plugin pack** (`app/plugins/memory-pack/`) — SQLite-based persistent memory across sessions with FTS5 full-text search, PostToolUse observation capture, Stop session summary, `<private>` tag privacy controls, and progressive disclosure (summary → details → full)
|
|
435
461
|
- **`validate.py --strict`** — CI-grade validation treating warnings as errors, plus content quality checks (name=directory, non-empty body)
|
|
436
|
-
- **`doctor.py` stale rules detection** (Check 8) — detects rules in CLAUDE.md whose source files no longer exist in `~/.ai-toolkit/rules/`
|
|
462
|
+
- **`doctor.py` stale rules detection** (Check 8) — detects rules in CLAUDE.md whose source files no longer exist in `~/.softspark/ai-toolkit/rules/`
|
|
437
463
|
- **Reasoning engine template** (`app/skills/skill-creator/templates/reasoning-engine/`) — generic Python stdlib search for domain skills with >50 categorized items, anti-pattern filtering, JSON stdout
|
|
438
464
|
- **Dashboard template** (`app/skills/skill-creator/templates/dashboard/index.html`) — single-file HTML dashboard parsing `stats.json` with skill usage charts
|
|
439
465
|
- **Anti-pattern registry format** documented at `kb/reference/anti-pattern-registry-format.md` — structured JSON schema with severity, auto-fixability, and conflict rules
|
package/README.md
CHANGED
|
@@ -178,7 +178,7 @@ ai-toolkit/
|
|
|
178
178
|
│ │ ├── clean-code/ # knowledge skill (auto-loaded)
|
|
179
179
|
│ │ └── ... (87 more)
|
|
180
180
|
│ ├── rules/ # Auto-injected into your CLAUDE.md
|
|
181
|
-
│ ├── hooks/ # Hook scripts (copied to ~/.ai-toolkit/hooks/)
|
|
181
|
+
│ ├── hooks/ # Hook scripts (copied to ~/.softspark/ai-toolkit/hooks/)
|
|
182
182
|
│ │ ├── session-start.sh # MANDATORY reminder + session context
|
|
183
183
|
│ │ ├── guard-destructive.sh # Block rm -rf, DROP TABLE, etc.
|
|
184
184
|
│ │ ├── guard-path.sh # Block wrong-user path hallucination
|
|
@@ -210,7 +210,7 @@ ai-toolkit/
|
|
|
210
210
|
└── CHANGELOG.md
|
|
211
211
|
```
|
|
212
212
|
|
|
213
|
-
**Distribution model:** Symlink-based for agents/skills, copy-based for hooks. `~/.claude/agents/` and `~/.claude/skills/` contain per-file symlinks into the npm package. Hook scripts are copied to `~/.ai-toolkit/hooks/` and referenced from `~/.claude/settings.json`. Run `ai-toolkit update` after `npm install` — all projects pick up changes instantly. (See [Distribution Model](kb/reference/distribution-model.md))
|
|
213
|
+
**Distribution model:** Symlink-based for agents/skills, copy-based for hooks. `~/.claude/agents/` and `~/.claude/skills/` contain per-file symlinks into the npm package. Hook scripts are copied to `~/.softspark/ai-toolkit/hooks/` and referenced from `~/.claude/settings.json`. Run `ai-toolkit update` after `npm install` — all projects pick up changes instantly. (See [Distribution Model](kb/reference/distribution-model.md))
|
|
214
214
|
|
|
215
215
|
---
|
|
216
216
|
|
|
@@ -309,7 +309,7 @@ Unlike other toolkits that put safety rules in documentation only, ai-toolkit en
|
|
|
309
309
|
|
|
310
310
|
### 2. Hooks as Executable Scripts
|
|
311
311
|
|
|
312
|
-
Hook logic lives in `app/hooks/*.sh` — not inline JSON one-liners. Scripts are copied to `~/.ai-toolkit/hooks/` on install and referenced from `~/.claude/settings.json`. Easy to read, debug, and extend.
|
|
312
|
+
Hook logic lives in `app/hooks/*.sh` — not inline JSON one-liners. Scripts are copied to `~/.softspark/ai-toolkit/hooks/` on install and referenced from `~/.claude/settings.json`. Easy to read, debug, and extend.
|
|
313
313
|
|
|
314
314
|
**12 lifecycle events / 21 global hook entries:**
|
|
315
315
|
|
|
@@ -317,7 +317,7 @@ Hook logic lives in `app/hooks/*.sh` — not inline JSON one-liners. Scripts are
|
|
|
317
317
|
|-------|--------|--------|
|
|
318
318
|
| SessionStart | `session-start.sh` | MANDATORY rules reminder + session context + instincts |
|
|
319
319
|
| SessionStart | `mcp-health.sh` | Check MCP server command availability (non-blocking warning) |
|
|
320
|
-
| SessionStart | `session-context.sh` | Capture environment snapshot (pwd, git branch, versions) to `~/.ai-toolkit/sessions/current-context.json` |
|
|
320
|
+
| SessionStart | `session-context.sh` | Capture environment snapshot (pwd, git branch, versions) to `~/.softspark/ai-toolkit/sessions/current-context.json` |
|
|
321
321
|
| Notification | `notify-waiting.sh` | Cross-platform desktop notification |
|
|
322
322
|
| PreToolUse | `guard-destructive.sh` | Block `rm -rf`, `DROP TABLE`, etc. |
|
|
323
323
|
| PreToolUse | `guard-path.sh` | Block wrong-user path hallucination |
|
|
@@ -326,14 +326,14 @@ Hook logic lives in `app/hooks/*.sh` — not inline JSON one-liners. Scripts are
|
|
|
326
326
|
| UserPromptSubmit | `user-prompt-submit.sh` | Prompt governance reminder for planning, research, and safe execution |
|
|
327
327
|
| UserPromptSubmit | `track-usage.sh` | Record skill invocations to local stats |
|
|
328
328
|
| PostToolUse | `post-tool-use.sh` | Lightweight validation reminders after edits |
|
|
329
|
-
| PostToolUse | `governance-capture.sh` | Log security-sensitive operations to `~/.ai-toolkit/governance.log` (JSONL) |
|
|
329
|
+
| PostToolUse | `governance-capture.sh` | Log security-sensitive operations to `~/.softspark/ai-toolkit/governance.log` (JSONL) |
|
|
330
330
|
| Stop | `quality-check.sh` | Multi-language lint (ruff/tsc/phpstan/dart/go) |
|
|
331
331
|
| Stop | `save-session.sh` | Persist session context for cross-session continuity |
|
|
332
332
|
| TaskCompleted | `quality-gate.sh` | Block task completion on lint/type errors |
|
|
333
333
|
| SubagentStart | `subagent-start.sh` | Narrow-scope reminder for spawned subagents |
|
|
334
334
|
| SubagentStop | `subagent-stop.sh` | Completion checklist for subagent handoff |
|
|
335
335
|
| PreCompact | `pre-compact.sh` | Smart compaction: prioritized context (instincts > tasks > git state > decisions) |
|
|
336
|
-
| PreCompact | `pre-compact-save.sh` | Save timestamped context backup before compaction to `~/.ai-toolkit/compactions/` |
|
|
336
|
+
| PreCompact | `pre-compact-save.sh` | Save timestamped context backup before compaction to `~/.softspark/ai-toolkit/compactions/` |
|
|
337
337
|
| SessionEnd | `session-end.sh` | Persist a session-end handoff note |
|
|
338
338
|
| TeammateIdle | *(inline)* | Completeness reminder |
|
|
339
339
|
|
|
@@ -586,7 +586,7 @@ ai-toolkit status # show installed modules and versions
|
|
|
586
586
|
ai-toolkit update # incremental re-install (only changed modules)
|
|
587
587
|
```
|
|
588
588
|
|
|
589
|
-
Install state is tracked in `~/.ai-toolkit/state.json`. See [`kb/reference/manifest-install.md`](kb/reference/manifest-install.md).
|
|
589
|
+
Install state is tracked in `~/.softspark/ai-toolkit/state.json`. See [`kb/reference/manifest-install.md`](kb/reference/manifest-install.md).
|
|
590
590
|
|
|
591
591
|
---
|
|
592
592
|
|
|
@@ -614,7 +614,7 @@ All packs have `status: experimental`. Each has a `plugin.json` manifest and `RE
|
|
|
614
614
|
|
|
615
615
|
## Config Inheritance (`extends`)
|
|
616
616
|
|
|
617
|
-
Enterprise-grade configuration inheritance for multi-repo AI governance. Organizations define a shared base config published as an npm package, Git URL, or local path. Projects inherit via `.
|
|
617
|
+
Enterprise-grade configuration inheritance for multi-repo AI governance. Organizations define a shared base config published as an npm package, Git URL, or local path. Projects inherit via `.softspark-toolkit.json`:
|
|
618
618
|
|
|
619
619
|
```json
|
|
620
620
|
{
|
|
@@ -628,8 +628,8 @@ Enterprise-grade configuration inheritance for multi-repo AI governance. Organiz
|
|
|
628
628
|
- **Constitution immutability** — Articles I-V and base articles cannot be modified; projects can only ADD new articles (6+)
|
|
629
629
|
- **Enforce constraints** — `requiredAgents`, `forbidOverride`, `minHookProfile`, `requiredPlugins`
|
|
630
630
|
- **Override validation** — requires explicit `override: true` + justification (min 20 chars)
|
|
631
|
-
- **Lock file** — `.
|
|
632
|
-
- **Offline fallback** — uses cached configs from `~/.ai-toolkit/config-cache/` when registry unavailable
|
|
631
|
+
- **Lock file** — `.softspark-toolkit.lock.json` pins resolved versions for reproducible installs
|
|
632
|
+
- **Offline fallback** — uses cached configs from `~/.softspark/ai-toolkit/config-cache/` when registry unavailable
|
|
633
633
|
|
|
634
634
|
```bash
|
|
635
635
|
ai-toolkit config create-base @mycompany/ai-toolkit-config # scaffold base package
|
|
@@ -645,7 +645,7 @@ See [Enterprise Config Guide](kb/reference/enterprise-config-guide.md) for full
|
|
|
645
645
|
|
|
646
646
|
## Project Registry
|
|
647
647
|
|
|
648
|
-
All projects installed with `--local` are automatically registered in `~/.ai-toolkit/projects.json`. Running `ai-toolkit update` propagates updates to all registered projects in parallel.
|
|
648
|
+
All projects installed with `--local` are automatically registered in `~/.softspark/ai-toolkit/projects.json`. Running `ai-toolkit update` propagates updates to all registered projects in parallel.
|
|
649
649
|
|
|
650
650
|
```bash
|
|
651
651
|
ai-toolkit projects # list registered projects
|
|
@@ -802,17 +802,17 @@ Usage: ai-toolkit <command> [options]
|
|
|
802
802
|
| `update` | Re-apply toolkit after `npm install -g @softspark/ai-toolkit@latest` |
|
|
803
803
|
| `update --local` | Re-apply + auto-detect editors from existing project files |
|
|
804
804
|
| `reset --local` | Wipe all project-local configs and recreate from scratch (clean slate) |
|
|
805
|
-
| `add-rule <rule.md> [name]` | Register rule in `~/.ai-toolkit/rules/` — auto-applied on every `update` |
|
|
806
|
-
| `remove-rule <name> [dir]` | Unregister rule from `~/.ai-toolkit/rules/` and remove its block from `CLAUDE.md` |
|
|
805
|
+
| `add-rule <rule.md> [name]` | Register rule in `~/.softspark/ai-toolkit/rules/` — auto-applied on every `update` |
|
|
806
|
+
| `remove-rule <name> [dir]` | Unregister rule from `~/.softspark/ai-toolkit/rules/` and remove its block from `CLAUDE.md` |
|
|
807
807
|
| `inject-hook <file.json>` | Inject external hooks into settings.json (idempotent, `_source` tagged) |
|
|
808
808
|
| `remove-hook <name>` | Remove injected hooks by source name |
|
|
809
809
|
| `mcp list` | List available MCP server templates (25 templates) |
|
|
810
810
|
| `mcp add <name> [names...]` | Add MCP server template(s) to `.mcp.json` |
|
|
811
811
|
| `mcp show <name>` | Show MCP template config details |
|
|
812
812
|
| `mcp remove <name>` | Remove MCP server from `.mcp.json` |
|
|
813
|
-
| `config validate [path]` | Validate `.
|
|
813
|
+
| `config validate [path]` | Validate `.softspark-toolkit.json` schema + extends + enforcement |
|
|
814
814
|
| `config diff [path]` | Show project vs base config differences |
|
|
815
|
-
| `config init [flags]` | Create `.
|
|
815
|
+
| `config init [flags]` | Create `.softspark-toolkit.json` (`--extends`, `--profile`, `--no-extends`) |
|
|
816
816
|
| `config create-base <name>` | Scaffold base config npm package |
|
|
817
817
|
| `config check [path]` | CI enforcement gate (exit 0=pass, 1=fail, 2=no config; `--json`) |
|
|
818
818
|
| `projects` | List registered projects (`--prune` to clean stale, `remove <path>`) |
|
|
@@ -882,19 +882,19 @@ Any repo can register its rules so they are automatically injected into all AI t
|
|
|
882
882
|
```bash
|
|
883
883
|
cd /path/to/your-repo
|
|
884
884
|
ai-toolkit add-rule ./jira-rules.md
|
|
885
|
-
# Registered: 'jira-rules' → ~/.ai-toolkit/rules/jira-rules.md
|
|
885
|
+
# Registered: 'jira-rules' → ~/.softspark/ai-toolkit/rules/jira-rules.md
|
|
886
886
|
|
|
887
887
|
ai-toolkit update
|
|
888
888
|
# → injects jira-rules into ~/.claude/CLAUDE.md, ~/.cursor/rules, Windsurf, Gemini
|
|
889
889
|
```
|
|
890
890
|
|
|
891
|
-
Rules are stored in `~/.ai-toolkit/rules/` and re-applied on every `update`. Injection is **idempotent** — re-running updates only the marked block, never touching content outside it.
|
|
891
|
+
Rules are stored in `~/.softspark/ai-toolkit/rules/` and re-applied on every `update`. Injection is **idempotent** — re-running updates only the marked block, never touching content outside it.
|
|
892
892
|
|
|
893
893
|
To unregister:
|
|
894
894
|
|
|
895
895
|
```bash
|
|
896
896
|
ai-toolkit remove-rule jira-rules
|
|
897
|
-
# Removes from ~/.ai-toolkit/rules/ and strips the block from ~/.claude/CLAUDE.md
|
|
897
|
+
# Removes from ~/.softspark/ai-toolkit/rules/ and strips the block from ~/.claude/CLAUDE.md
|
|
898
898
|
```
|
|
899
899
|
|
|
900
900
|
See [`kb/reference/integrations.md`](kb/reference/integrations.md) for known integrations.
|
package/app/ARCHITECTURE.md
CHANGED
|
@@ -307,7 +307,7 @@ Lead Session (You)
|
|
|
307
307
|
### Language Rules (70 files, 13 languages)
|
|
308
308
|
`app/rules/` contains per-language coding rules. Supported languages: TypeScript, Python, Go, Rust, Java, Kotlin, Swift, Dart, C#, PHP, C++, Ruby, and common (shared). Auto-detected from project files via `--auto-detect` or selected with `--modules rules-<lang>`.
|
|
309
309
|
|
|
310
|
-
Language rules are propagated to **all configured editors** — not just Claude. `dir_rules_shared.build_language_rules()` reads `app/rules/<lang>/*.md`, strips frontmatter, and returns combined content per language. Each directory-based generator (Cursor, Windsurf, Cline, Roo, Augment, Antigravity) emits `ai-toolkit-lang-<lang>` files in its native format. Registered custom rules (`~/.ai-toolkit/rules/`) are similarly propagated as `ai-toolkit-custom-<name>` files via `build_registered_rules()`.
|
|
310
|
+
Language rules are propagated to **all configured editors** — not just Claude. `dir_rules_shared.build_language_rules()` reads `app/rules/<lang>/*.md`, strips frontmatter, and returns combined content per language. Each directory-based generator (Cursor, Windsurf, Cline, Roo, Augment, Antigravity) emits `ai-toolkit-lang-<lang>` files in its native format. Registered custom rules (`~/.softspark/ai-toolkit/rules/`) are similarly propagated as `ai-toolkit-custom-<name>` files via `build_registered_rules()`.
|
|
311
311
|
|
|
312
312
|
### Extension API (`inject-hook`)
|
|
313
313
|
The `inject_section_cli.py` script provides a stable marker-based injection API. Any tool can add sections to `CLAUDE.md`, `constitution.md`, or `ARCHITECTURE.md` without overwriting user content, using `<!-- TOOLKIT:START:<id> -->` / `<!-- TOOLKIT:END:<id> -->` markers.
|
|
@@ -316,10 +316,10 @@ The `inject_section_cli.py` script provides a stable marker-based injection API.
|
|
|
316
316
|
`scripts/compile_slm.py` compiles the full toolkit (20K+ tokens) into a minimal system prompt for Small Language Models (2K-16K tokens). Pipeline: Parse → Score → Compress → Pack → Emit. Supports 4 compression levels (ultra-light, light, standard, extended), 4 output formats (raw, ollama, json-string, aider), persona-aware scoring, and language-aware rule filtering. Profile `offline-slm` in `manifest.json`. Constitution is always included (non-negotiable).
|
|
317
317
|
|
|
318
318
|
### Config Inheritance (`extends`)
|
|
319
|
-
`scripts/config_resolver.py`, `config_merger.py`, `config_validator.py`, `config_cli.py`, `config_scaffold.py`, `config_lock.py`. Enterprise configuration inheritance via `.
|
|
319
|
+
`scripts/config_resolver.py`, `config_merger.py`, `config_validator.py`, `config_cli.py`, `config_scaffold.py`, `config_lock.py`. Enterprise configuration inheritance via `.softspark-toolkit.json` `extends` field. Resolves base configs from npm packages, Git URLs, or local paths. Layered deep merge with constitution immutability (Articles I-V absolute), enforce constraints (`requiredAgents`, `forbidOverride`, `minHookProfile`), override validation (`override: true` + justification), and lock file (`.softspark-toolkit.lock.json`). CLI: `config validate`, `config diff`, `config init`, `config create-base`, `config check`. Integrated into `install --local` and `update --local` flows.
|
|
320
320
|
|
|
321
321
|
### Project Registry
|
|
322
|
-
`scripts/install_steps/project_registry.py`, `scripts/update_projects.py`, `scripts/projects_cli.py`. Tracks all `--local` installed projects in `~/.ai-toolkit/projects.json`. `ai-toolkit update` propagates to all registered projects in parallel via `ThreadPoolExecutor`. CLI: `ai-toolkit projects`, `--prune`, `remove <path>`.
|
|
322
|
+
`scripts/install_steps/project_registry.py`, `scripts/update_projects.py`, `scripts/projects_cli.py`. Tracks all `--local` installed projects in `~/.softspark/ai-toolkit/projects.json`. `ai-toolkit update` propagates to all registered projects in parallel via `ThreadPoolExecutor`. CLI: `ai-toolkit projects`, `--prune`, `remove <path>`.
|
|
323
323
|
|
|
324
324
|
### Manifest Install (`--modules`, `--auto-detect`)
|
|
325
325
|
`manifest.json` defines all installable components as named modules. Install individual modules with `ai-toolkit install --modules <name>` or let the installer detect which language rules to add based on project files (e.g. `package.json` → `rules-typescript`, `go.mod` → `rules-golang`).
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
# shellcheck source=_profile-check.sh
|
|
9
9
|
source "$(dirname "$0")/_profile-check.sh"
|
|
10
10
|
|
|
11
|
-
LOG_DIR="$HOME/.ai-toolkit"
|
|
11
|
+
LOG_DIR="$HOME/.softspark/ai-toolkit"
|
|
12
12
|
LOG_FILE="$LOG_DIR/governance.log"
|
|
13
13
|
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
14
14
|
SESSION="${CLAUDE_SESSION_ID:-unknown}"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
# shellcheck source=_profile-check.sh
|
|
9
9
|
source "$(dirname "$0")/_profile-check.sh"
|
|
10
10
|
|
|
11
|
-
SAVE_DIR="$HOME/.ai-toolkit/compactions"
|
|
11
|
+
SAVE_DIR="$HOME/.softspark/ai-toolkit/compactions"
|
|
12
12
|
mkdir -p "$SAVE_DIR"
|
|
13
13
|
|
|
14
14
|
# Read from stdin (Claude Code passes JSON with .session_id)
|
|
@@ -12,7 +12,7 @@ source "$(dirname "$0")/_profile-check.sh"
|
|
|
12
12
|
INPUT=$(cat)
|
|
13
13
|
SESSION=$(echo "$INPUT" | jq -r '.session_id // empty' 2>/dev/null)
|
|
14
14
|
[ -z "$SESSION" ] && SESSION="$$"
|
|
15
|
-
SESSIONS_DIR="$HOME/.ai-toolkit/sessions"
|
|
15
|
+
SESSIONS_DIR="$HOME/.softspark/ai-toolkit/sessions"
|
|
16
16
|
mkdir -p "$SESSIONS_DIR"
|
|
17
17
|
|
|
18
18
|
CONTEXT_FILE="$SESSIONS_DIR/${SESSION}.json"
|
package/app/hooks/track-usage.sh
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
# track-usage.sh — Track skill invocations for usage stats.
|
|
3
3
|
#
|
|
4
4
|
# Fires on: UserPromptSubmit
|
|
5
|
-
# Writes to: ~/.ai-toolkit/stats.json
|
|
5
|
+
# Writes to: ~/.softspark/ai-toolkit/stats.json
|
|
6
6
|
#
|
|
7
7
|
# Detects /skill-name pattern from user prompt and increments counter.
|
|
8
8
|
# Uses atomic write via python3 os.replace() to prevent corruption.
|
|
9
9
|
|
|
10
|
-
STATS_FILE="${HOME}/.ai-toolkit/stats.json"
|
|
10
|
+
STATS_FILE="${HOME}/.softspark/ai-toolkit/stats.json"
|
|
11
11
|
|
|
12
12
|
# Read prompt from stdin (Claude Code passes JSON with .prompt field)
|
|
13
13
|
INPUT=$(cat)
|
package/app/hooks.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"hooks": [
|
|
8
8
|
{
|
|
9
9
|
"type": "command",
|
|
10
|
-
"command": "\"$HOME/.ai-toolkit/hooks/session-start.sh\""
|
|
10
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/session-start.sh\""
|
|
11
11
|
}
|
|
12
12
|
]
|
|
13
13
|
},
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"hooks": [
|
|
18
18
|
{
|
|
19
19
|
"type": "command",
|
|
20
|
-
"command": "\"$HOME/.ai-toolkit/hooks/mcp-health.sh\""
|
|
20
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/mcp-health.sh\""
|
|
21
21
|
}
|
|
22
22
|
]
|
|
23
23
|
},
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"hooks": [
|
|
28
28
|
{
|
|
29
29
|
"type": "command",
|
|
30
|
-
"command": "\"$HOME/.ai-toolkit/hooks/session-context.sh\""
|
|
30
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/session-context.sh\""
|
|
31
31
|
}
|
|
32
32
|
]
|
|
33
33
|
}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"hooks": [
|
|
40
40
|
{
|
|
41
41
|
"type": "command",
|
|
42
|
-
"command": "bash ~/.ai-toolkit/hooks/notify-waiting.sh"
|
|
42
|
+
"command": "bash ~/.softspark/ai-toolkit/hooks/notify-waiting.sh"
|
|
43
43
|
}
|
|
44
44
|
]
|
|
45
45
|
}
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"hooks": [
|
|
52
52
|
{
|
|
53
53
|
"type": "command",
|
|
54
|
-
"command": "\"$HOME/.ai-toolkit/hooks/guard-destructive.sh\""
|
|
54
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/guard-destructive.sh\""
|
|
55
55
|
}
|
|
56
56
|
]
|
|
57
57
|
},
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"hooks": [
|
|
62
62
|
{
|
|
63
63
|
"type": "command",
|
|
64
|
-
"command": "\"$HOME/.ai-toolkit/hooks/guard-path.sh\""
|
|
64
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/guard-path.sh\""
|
|
65
65
|
}
|
|
66
66
|
]
|
|
67
67
|
},
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"hooks": [
|
|
72
72
|
{
|
|
73
73
|
"type": "command",
|
|
74
|
-
"command": "\"$HOME/.ai-toolkit/hooks/guard-config.sh\""
|
|
74
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/guard-config.sh\""
|
|
75
75
|
}
|
|
76
76
|
]
|
|
77
77
|
},
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"hooks": [
|
|
82
82
|
{
|
|
83
83
|
"type": "command",
|
|
84
|
-
"command": "\"$HOME/.ai-toolkit/hooks/commit-quality.sh\""
|
|
84
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/commit-quality.sh\""
|
|
85
85
|
}
|
|
86
86
|
]
|
|
87
87
|
}
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"hooks": [
|
|
94
94
|
{
|
|
95
95
|
"type": "command",
|
|
96
|
-
"command": "\"$HOME/.ai-toolkit/hooks/user-prompt-submit.sh\""
|
|
96
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/user-prompt-submit.sh\""
|
|
97
97
|
}
|
|
98
98
|
]
|
|
99
99
|
},
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"hooks": [
|
|
104
104
|
{
|
|
105
105
|
"type": "command",
|
|
106
|
-
"command": "\"$HOME/.ai-toolkit/hooks/track-usage.sh\""
|
|
106
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/track-usage.sh\""
|
|
107
107
|
}
|
|
108
108
|
]
|
|
109
109
|
}
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"hooks": [
|
|
116
116
|
{
|
|
117
117
|
"type": "command",
|
|
118
|
-
"command": "\"$HOME/.ai-toolkit/hooks/post-tool-use.sh\""
|
|
118
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/post-tool-use.sh\""
|
|
119
119
|
}
|
|
120
120
|
]
|
|
121
121
|
},
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"hooks": [
|
|
126
126
|
{
|
|
127
127
|
"type": "command",
|
|
128
|
-
"command": "\"$HOME/.ai-toolkit/hooks/governance-capture.sh\""
|
|
128
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/governance-capture.sh\""
|
|
129
129
|
}
|
|
130
130
|
]
|
|
131
131
|
}
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"hooks": [
|
|
138
138
|
{
|
|
139
139
|
"type": "command",
|
|
140
|
-
"command": "\"$HOME/.ai-toolkit/hooks/quality-check.sh\""
|
|
140
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/quality-check.sh\""
|
|
141
141
|
}
|
|
142
142
|
]
|
|
143
143
|
},
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"hooks": [
|
|
148
148
|
{
|
|
149
149
|
"type": "command",
|
|
150
|
-
"command": "\"$HOME/.ai-toolkit/hooks/save-session.sh\""
|
|
150
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/save-session.sh\""
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
}
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"hooks": [
|
|
160
160
|
{
|
|
161
161
|
"type": "command",
|
|
162
|
-
"command": "\"$HOME/.ai-toolkit/hooks/quality-gate.sh\""
|
|
162
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/quality-gate.sh\""
|
|
163
163
|
}
|
|
164
164
|
]
|
|
165
165
|
}
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
"hooks": [
|
|
184
184
|
{
|
|
185
185
|
"type": "command",
|
|
186
|
-
"command": "\"$HOME/.ai-toolkit/hooks/subagent-start.sh\""
|
|
186
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/subagent-start.sh\""
|
|
187
187
|
}
|
|
188
188
|
]
|
|
189
189
|
}
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
"hooks": [
|
|
196
196
|
{
|
|
197
197
|
"type": "command",
|
|
198
|
-
"command": "\"$HOME/.ai-toolkit/hooks/subagent-stop.sh\""
|
|
198
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/subagent-stop.sh\""
|
|
199
199
|
}
|
|
200
200
|
]
|
|
201
201
|
}
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
"hooks": [
|
|
208
208
|
{
|
|
209
209
|
"type": "command",
|
|
210
|
-
"command": "\"$HOME/.ai-toolkit/hooks/pre-compact.sh\""
|
|
210
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/pre-compact.sh\""
|
|
211
211
|
}
|
|
212
212
|
]
|
|
213
213
|
},
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
"hooks": [
|
|
218
218
|
{
|
|
219
219
|
"type": "command",
|
|
220
|
-
"command": "\"$HOME/.ai-toolkit/hooks/pre-compact-save.sh\""
|
|
220
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/pre-compact-save.sh\""
|
|
221
221
|
}
|
|
222
222
|
]
|
|
223
223
|
}
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
"hooks": [
|
|
230
230
|
{
|
|
231
231
|
"type": "command",
|
|
232
|
-
"command": "\"$HOME/.ai-toolkit/hooks/session-end.sh\""
|
|
232
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/session-end.sh\""
|
|
233
233
|
}
|
|
234
234
|
]
|
|
235
235
|
}
|
|
@@ -8,7 +8,7 @@ Persistent session memory with SQLite storage and full-text search.
|
|
|
8
8
|
- Scripts: `init_db.py` (database setup), `strip_private.py` (privacy filter)
|
|
9
9
|
|
|
10
10
|
## How It Works
|
|
11
|
-
1. **Capture**: Every tool use is recorded to `~/.ai-toolkit/memory.db` (PostToolUse hook)
|
|
11
|
+
1. **Capture**: Every tool use is recorded to `~/.softspark/ai-toolkit/memory.db` (PostToolUse hook)
|
|
12
12
|
2. **Summarize**: Session summary generated on each Stop hook (tools used, observation count, time range)
|
|
13
13
|
3. **Search**: `/mem-search <query>` runs FTS5 full-text search with progressive disclosure
|
|
14
14
|
4. **Privacy**: Content between `<private>...</private>` tags is stripped before storage
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
# Strips private tags, truncates to 2000 chars, inserts into observations table.
|
|
7
7
|
# Never blocks the user — always exits 0.
|
|
8
8
|
|
|
9
|
-
DB_PATH="${HOME}/.ai-toolkit/memory.db"
|
|
10
|
-
STRIP_PRIVATE="${HOME}/.ai-toolkit/plugin-scripts/memory-pack/strip_private.py"
|
|
9
|
+
DB_PATH="${HOME}/.softspark/ai-toolkit/memory.db"
|
|
10
|
+
STRIP_PRIVATE="${HOME}/.softspark/ai-toolkit/plugin-scripts/memory-pack/strip_private.py"
|
|
11
11
|
MAX_CONTENT_LENGTH=2000
|
|
12
12
|
|
|
13
13
|
# Bail silently if database does not exist
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# Auto-prunes observations older than RETENTION_DAYS (default 90).
|
|
8
8
|
# Never blocks the user — always exits 0.
|
|
9
9
|
|
|
10
|
-
DB_PATH="${HOME}/.ai-toolkit/memory.db"
|
|
10
|
+
DB_PATH="${HOME}/.softspark/ai-toolkit/memory.db"
|
|
11
11
|
RETENTION_DAYS="${MEMORY_RETENTION_DAYS:-90}"
|
|
12
12
|
|
|
13
13
|
# Read JSON input from stdin (Claude Code hook protocol)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""Initialize SQLite memory database for ai-toolkit memory-pack.
|
|
3
3
|
|
|
4
|
-
Creates ~/.ai-toolkit/memory.db with sessions, observations, and FTS5 tables.
|
|
4
|
+
Creates ~/.softspark/ai-toolkit/memory.db with sessions, observations, and FTS5 tables.
|
|
5
5
|
Safe to run multiple times (uses IF NOT EXISTS).
|
|
6
6
|
|
|
7
7
|
Usage: python3 app/plugins/memory-pack/scripts/init_db.py
|
|
@@ -11,7 +11,7 @@ from __future__ import annotations
|
|
|
11
11
|
import sqlite3
|
|
12
12
|
from pathlib import Path
|
|
13
13
|
|
|
14
|
-
DB_DIR = Path.home() / ".ai-toolkit"
|
|
14
|
+
DB_DIR = Path.home() / ".softspark" / "ai-toolkit"
|
|
15
15
|
DB_PATH = DB_DIR / "memory.db"
|
|
16
16
|
|
|
17
17
|
SCHEMA = """
|
|
@@ -15,7 +15,7 @@ $ARGUMENTS
|
|
|
15
15
|
|
|
16
16
|
## How It Works
|
|
17
17
|
|
|
18
|
-
This skill queries the SQLite FTS5 full-text search index at `~/.ai-toolkit/memory.db` to find relevant observations from past sessions.
|
|
18
|
+
This skill queries the SQLite FTS5 full-text search index at `~/.softspark/ai-toolkit/memory.db` to find relevant observations from past sessions.
|
|
19
19
|
|
|
20
20
|
## Instructions
|
|
21
21
|
|
|
@@ -23,12 +23,12 @@ This skill queries the SQLite FTS5 full-text search index at `~/.ai-toolkit/memo
|
|
|
23
23
|
|
|
24
24
|
2. **Initialize the database** if it does not exist:
|
|
25
25
|
```bash
|
|
26
|
-
python3 "$HOME/.ai-toolkit/hooks/../plugins/memory-pack/scripts/init_db.py" 2>/dev/null || true
|
|
26
|
+
python3 "$HOME/.softspark/ai-toolkit/hooks/../plugins/memory-pack/scripts/init_db.py" 2>/dev/null || true
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
3. **Run the FTS5 search** against the observations table:
|
|
30
30
|
```bash
|
|
31
|
-
sqlite3 ~/.ai-toolkit/memory.db "
|
|
31
|
+
sqlite3 ~/.softspark/ai-toolkit/memory.db "
|
|
32
32
|
SELECT o.id, o.session_id, o.tool_name, o.content, o.created_at,
|
|
33
33
|
s.project_dir, s.summary
|
|
34
34
|
FROM observations_fts fts
|
|
@@ -57,7 +57,7 @@ Create a new Claude Code hook following ai-toolkit conventions.
|
|
|
57
57
|
"hooks": [
|
|
58
58
|
{
|
|
59
59
|
"type": "command",
|
|
60
|
-
"command": "\"$HOME/.ai-toolkit/hooks/{script-name}.sh\""
|
|
60
|
+
"command": "\"$HOME/.softspark/ai-toolkit/hooks/{script-name}.sh\""
|
|
61
61
|
}
|
|
62
62
|
]
|
|
63
63
|
}
|
|
@@ -67,7 +67,7 @@ Required fields:
|
|
|
67
67
|
- `_source`: always `"ai-toolkit"` (used by merge/strip logic)
|
|
68
68
|
- `matcher`: tool name or regex for Pre/PostToolUse, empty string for global events
|
|
69
69
|
- `hooks[].type`: always `"command"`
|
|
70
|
-
- `hooks[].command`: path to script using `$HOME/.ai-toolkit/hooks/` prefix
|
|
70
|
+
- `hooks[].command`: path to script using `$HOME/.softspark/ai-toolkit/hooks/` prefix
|
|
71
71
|
|
|
72
72
|
## Script Template
|
|
73
73
|
|