@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.
Files changed (63) hide show
  1. package/CHANGELOG.md +40 -14
  2. package/README.md +18 -18
  3. package/app/ARCHITECTURE.md +3 -3
  4. package/app/hooks/governance-capture.sh +1 -1
  5. package/app/hooks/pre-compact-save.sh +1 -1
  6. package/app/hooks/session-context.sh +1 -1
  7. package/app/hooks/track-usage.sh +2 -2
  8. package/app/hooks.json +20 -20
  9. package/app/plugins/memory-pack/README.md +1 -1
  10. package/app/plugins/memory-pack/hooks/observation-capture.sh +2 -2
  11. package/app/plugins/memory-pack/hooks/session-summary.sh +1 -1
  12. package/app/plugins/memory-pack/scripts/init_db.py +2 -2
  13. package/app/plugins/memory-pack/skills/mem-search/SKILL.md +3 -3
  14. package/app/skills/hook-creator/SKILL.md +2 -2
  15. package/app/skills/mem-search/SKILL.md +3 -3
  16. package/app/skills/repeat/SKILL.md +1 -1
  17. package/bin/ai-toolkit.js +9 -4
  18. package/kb/history/completed/enterprise-config-inheritance-plan-20260412.md +32 -34
  19. package/kb/history/completed/offline-slm-profile-plan-20260411.md +12 -12
  20. package/kb/planning/cloud-security-pack-plan.md +3 -3
  21. package/kb/procedures/maintenance-sop.md +3 -3
  22. package/kb/reference/architecture-overview.md +5 -5
  23. package/kb/reference/benchmark-config.md +1 -1
  24. package/kb/reference/competitive-features-implementation.md +2 -2
  25. package/kb/reference/enterprise-config-guide.md +9 -9
  26. package/kb/reference/extension-api.md +1 -1
  27. package/kb/reference/global-install-model.md +2 -2
  28. package/kb/reference/hooks-catalog.md +30 -30
  29. package/kb/reference/integrations.md +3 -3
  30. package/kb/reference/manifest-install.md +4 -4
  31. package/kb/reference/plugin-pack-conventions.md +5 -5
  32. package/kb/reference/stats.md +3 -3
  33. package/kb/reference/sync.md +3 -3
  34. package/llms-full.txt +118 -899
  35. package/llms.txt +0 -1
  36. package/manifest.json +3 -3
  37. package/package.json +1 -1
  38. package/scripts/add_rule.py +3 -2
  39. package/scripts/benchmark_config.py +3 -1
  40. package/scripts/compile_slm.py +9 -7
  41. package/scripts/config_cli.py +7 -7
  42. package/scripts/config_lock.py +12 -4
  43. package/scripts/config_merger.py +1 -1
  44. package/scripts/config_resolver.py +20 -7
  45. package/scripts/config_scaffold.py +4 -4
  46. package/scripts/config_validator.py +3 -3
  47. package/scripts/dir_rules_shared.py +1 -1
  48. package/scripts/doctor.py +3 -2
  49. package/scripts/install.py +12 -7
  50. package/scripts/install_git_hooks.py +1 -1
  51. package/scripts/install_steps/ai_tools.py +4 -4
  52. package/scripts/install_steps/hooks.py +1 -1
  53. package/scripts/install_steps/install_state.py +8 -6
  54. package/scripts/install_steps/project_registry.py +5 -5
  55. package/scripts/migrate.py +241 -0
  56. package/scripts/paths.py +50 -0
  57. package/scripts/plugin.py +8 -6
  58. package/scripts/remove_rule.py +5 -4
  59. package/scripts/stats.py +3 -2
  60. package/scripts/sync.py +3 -2
  61. package/scripts/update_projects.py +1 -1
  62. package/scripts/version_check.py +5 -2
  63. package/kb/planning/local-dashboard-plan.md +0 -773
package/llms-full.txt CHANGED
@@ -17,7 +17,6 @@
17
17
  - [Plan: Offline-First SLM Profile — Lightweight Mode for Local Models](kb/history/completed/offline-slm-profile-plan-20260411.md)
18
18
  - [How-To Guides](kb/howto/README.md)
19
19
  - [Plan: Cloud Security Pack — Multi-Cloud Audit](kb/planning/cloud-security-pack-plan.md)
20
- - [Plan: Local Dashboard — `ai-toolkit ui`](kb/planning/local-dashboard-plan.md)
21
20
  - [SOP: Claude Toolkit Maintenance](kb/procedures/maintenance-sop.md)
22
21
  - [SOP: Release Preparation](kb/procedures/release-preparation-sop.md)
23
22
  - [SOP: Release Verification](kb/procedures/release-verification-sop.md)
@@ -313,10 +312,10 @@ Create a configuration inheritance system where projects can extend a shared bas
313
312
  | FR3 | Constitution immutability — Articles I-V cannot be modified | Must | 100% block rate on modification attempts |
314
313
  | FR4 | Override validation with `override: true` + `justification` | Must | Missing justification → error |
315
314
  | FR5 | `enforce` block constraints (minHookProfile, requiredPlugins, forbidOverride, requiredAgents) | Must | All 4 constraint types enforced |
316
- | FR6 | Install/update integration — resolve extends during install | Must | `install --local` detects `.ai-toolkit.json` |
315
+ | FR6 | Install/update integration — resolve extends during install | Must | `install --local` detects `.softspark-toolkit.json` |
317
316
  | FR7 | `config diff` command — show project vs base differences | Must | All merge layers visible |
318
317
  | FR8 | `config validate` command — schema + enforcement validation | Must | Exit 0/1 for pass/fail |
319
- | FR9 | `config init` — interactive project config setup | Should | Guided flow produces valid `.ai-toolkit.json` |
318
+ | FR9 | `config init` — interactive project config setup | Should | Guided flow produces valid `.softspark-toolkit.json` |
320
319
  | FR10 | `config create-base` — scaffold npm base config package | Should | Ready-to-publish package with `package.json` |
321
320
  | FR11 | Lock file for reproducible installs | Should | Identical resolved config across team members |
322
321
  | FR12 | Audit trail in `state.json` | Should | Resolved version + overrides recorded |
@@ -344,7 +343,7 @@ Project Level (per-repository):
344
343
  ══════════════════════════════
345
344
 
346
345
  my-service/
347
- ├── .ai-toolkit.json ← project config with "extends"
346
+ ├── .softspark-toolkit.json ← project config with "extends"
348
347
  ├── .claude/
349
348
  │ ├── CLAUDE.md ← generated (base + project merged)
350
349
  │ └── settings.json ← generated (base hooks + project hooks merged)
@@ -359,7 +358,7 @@ Merge Pipeline:
359
358
  ai-toolkit defaults (manifest.json) ← Layer 1: toolkit defaults
360
359
 
361
360
 
362
- .ai-toolkit.json ← Layer 2: project overrides
361
+ .softspark-toolkit.json ← Layer 2: project overrides
363
362
 
364
363
 
365
364
  Resolved Configuration ← Final: CLAUDE.md, settings.json, etc.
@@ -370,7 +369,7 @@ Merge Pipeline:
370
369
  ```
371
370
  1. Load base config from "extends" (npm package, git URL, or local path)
372
371
  2. Merge with ai-toolkit defaults (manifest.json profiles)
373
- 3. Apply project-level overrides from .ai-toolkit.json
372
+ 3. Apply project-level overrides from .softspark-toolkit.json
374
373
  4. Validate merged config (constitution immutability, schema validation)
375
374
  5. Generate output files (CLAUDE.md, settings.json, agent symlinks, etc.)
376
375
  ```
@@ -381,7 +380,7 @@ Merge Pipeline:
381
380
 
382
381
  | # | Feature | Priority | Status | Est. Time | Notes |
383
382
  |---|---------|----------|--------|-----------|-------|
384
- | 1.1 | `.ai-toolkit.json` schema definition | P0 | **Done** | 1d | `scripts/schemas/ai-toolkit-config.schema.json` |
383
+ | 1.1 | `.softspark-toolkit.json` schema definition | P0 | **Done** | 1d | `scripts/schemas/ai-toolkit-config.schema.json` |
385
384
  | 1.2 | Config resolver (npm, git, local path) | P0 | **Done** | 3d | `scripts/config_resolver.py` (~330 LOC) |
386
385
  | 1.3 | Merge engine (layered merge with override semantics) | P0 | **Done** | 3d | `scripts/config_merger.py` (~340 LOC) |
387
386
  | 1.4 | Constitution immutability guard | P0 | **Done** | 1d | In config_merger.py `_merge_constitution()` |
@@ -390,8 +389,8 @@ Merge Pipeline:
390
389
  | 2.3 | `ai-toolkit config validate` command | P0 | **Done** | 1d | `scripts/config_cli.py` `cmd_validate()` |
391
390
  | 2.4 | `ai-toolkit config init` command | P1 | **Done** | 1.5d | Interactive + flag-driven, validates extends |
392
391
  | 2.5 | `ai-toolkit config create-base` command | P1 | **Done** | 2d | `scripts/config_scaffold.py` — full npm package scaffold |
393
- | 3.1 | Audit trail in state.json | P1 | **Done** | 1d | `install_state.py` extends field + `.ai-toolkit-extends.json` |
394
- | 3.2 | Lock file (`.ai-toolkit.lock.json`) | P1 | **Done** | 1.5d | `scripts/config_lock.py` — generate/consume/staleness check |
392
+ | 3.1 | Audit trail in state.json | P1 | **Done** | 1d | `install_state.py` extends field + `.softspark-toolkit-extends.json` |
393
+ | 3.2 | Lock file (`.softspark-toolkit.lock.json`) | P1 | **Done** | 1.5d | `scripts/config_lock.py` — generate/consume/staleness check |
395
394
  | 3.3 | Base config scaffolder (npm package template) | P1 | **Done** | 1.5d | Part of `config_scaffold.py` `create_base_package()` |
396
395
  | 3.4 | CI enforcement (`ai-toolkit config check`) | P2 | **Done** | 1d | `config_cli.py` `cmd_check()` — JSON output, exit codes |
397
396
  | 4.1 | Tests | P1 | **Done** | 3d | 39 tests: resolver (7), merger (13), CLI (10), install integration (9) |
@@ -449,7 +448,7 @@ Audit trail (3.1) ──┐
449
448
 
450
449
  ### Phase 1: Core Engine (week 1-2)
451
450
 
452
- #### 1.1 Configuration Schema (`.ai-toolkit.json`)
451
+ #### 1.1 Configuration Schema (`.softspark-toolkit.json`)
453
452
 
454
453
  > **v1 scope:** The full schema below shows the target state. v1 implements only: `extends`, `profile`, `agents`, `rules`, `constitution`, and `enforce`. See section 6a for the v1/v2 field breakdown.
455
454
 
@@ -591,9 +590,9 @@ Audit trail (3.1) ──┐
591
590
  | Local path | `"extends": "../shared-config"` | Resolve relative to project root |
592
591
  | ~~Multiple bases~~ | ~~`"extends": ["@mycompany/base", "@mycompany/typescript-extra"]`~~ | Deferred to v2 — multi-base merge ordering is a complexity trap |
593
592
 
594
- **Cache directory:** `~/.ai-toolkit/config-cache/`
593
+ **Cache directory:** `~/.softspark/ai-toolkit/config-cache/`
595
594
  ```
596
- ~/.ai-toolkit/config-cache/
595
+ ~/.softspark/ai-toolkit/config-cache/
597
596
  @mycompany/
598
597
  ai-toolkit-config/
599
598
  2.1.0/
@@ -651,7 +650,7 @@ def resolve_extends(extends_value: str, project_root: str,
651
650
  **Max recursion depth:** 5 levels (prevent circular extends). Circular detection via visited set.
652
651
 
653
652
  **Offline handling:** If the npm/git source is unavailable:
654
- 1. Check cache (`~/.ai-toolkit/config-cache/`)
653
+ 1. Check cache (`~/.softspark/ai-toolkit/config-cache/`)
655
654
  2. If cached version found → use with warning: "Using cached config v2.1.0 (offline)"
656
655
  3. If not cached → error with instructions: "Run `ai-toolkit config update` when online"
657
656
 
@@ -792,7 +791,7 @@ def merge_constitution(base: dict, project: dict) -> dict:
792
791
 
793
792
  ```python
794
793
  # During install --local:
795
- # 1. Check for .ai-toolkit.json in project root
794
+ # 1. Check for .softspark-toolkit.json in project root
796
795
  # 2. If found and has "extends":
797
796
  # a. Resolve base config(s)
798
797
  # b. Merge base → project
@@ -803,7 +802,7 @@ def merge_constitution(base: dict, project: dict) -> dict:
803
802
 
804
803
  **CLI flags:**
805
804
  ```bash
806
- ai-toolkit install --local # auto-detect .ai-toolkit.json
805
+ ai-toolkit install --local # auto-detect .softspark-toolkit.json
807
806
  ai-toolkit install --local --config ./custom.json # explicit config file
808
807
  ai-toolkit update --local # re-resolve extends + update
809
808
  ai-toolkit update --local --refresh-base # force re-fetch base config
@@ -851,7 +850,7 @@ ai-toolkit config diff
851
850
  ai-toolkit config validate
852
851
 
853
852
  # Checks:
854
- # ✓ .ai-toolkit.json schema valid
853
+ # ✓ .softspark-toolkit.json schema valid
855
854
  # ✓ extends: @mycompany/ai-toolkit-config@2.1.0 resolved
856
855
  # ✓ No forbidden overrides
857
856
  # ✓ Required plugins installed: security-pack
@@ -876,12 +875,12 @@ ai-toolkit config init
876
875
  # Flow:
877
876
  # 1. "Does your organization have a shared ai-toolkit config? [y/n]"
878
877
  # → y: "npm package name or git URL:" → resolves + validates
879
- # → n: creates minimal .ai-toolkit.json without extends
878
+ # → n: creates minimal .softspark-toolkit.json without extends
880
879
  # 2. "Which profile? [minimal/standard/strict]" → default from base or standard
881
880
  # 3. "Which persona? [none/backend-lead/frontend-lead/devops-eng/junior-dev]"
882
881
  # 4. Auto-detect languages from project
883
882
  # 5. Auto-detect editors from project files
884
- # 6. Write .ai-toolkit.json
883
+ # 6. Write .softspark-toolkit.json
885
884
  # 7. Run ai-toolkit install --local
886
885
  ```
887
886
 
@@ -945,7 +944,7 @@ ai-toolkit config create-base @mycompany/ai-toolkit-config
945
944
 
946
945
  ---
947
946
 
948
- #### 3.2 Lock File (`.ai-toolkit.lock.json`)
947
+ #### 3.2 Lock File (`.softspark-toolkit.lock.json`)
949
948
 
950
949
  **Purpose:** Pin the exact resolved version of base configs for reproducible installs across team members and CI.
951
950
 
@@ -957,7 +956,7 @@ ai-toolkit config create-base @mycompany/ai-toolkit-config
957
956
  "version": "2.1.0",
958
957
  "resolved": "https://registry.npmjs.org/@mycompany/ai-toolkit-config/-/ai-toolkit-config-2.1.0.tgz",
959
958
  "integrity": "sha512-abc123...",
960
- "cached": "~/.ai-toolkit/config-cache/@mycompany/ai-toolkit-config/2.1.0/"
959
+ "cached": "~/.softspark/ai-toolkit/config-cache/@mycompany/ai-toolkit-config/2.1.0/"
961
960
  }
962
961
  },
963
962
  "generated_at": "2026-04-10T10:30:00Z",
@@ -969,7 +968,7 @@ ai-toolkit config create-base @mycompany/ai-toolkit-config
969
968
  - `ai-toolkit install --local` → uses lock file if present (like `npm ci`)
970
969
  - `ai-toolkit update --local` → re-resolves and updates lock file (like `npm install`)
971
970
  - `ai-toolkit update --local --refresh-base` → force re-fetch ignoring cache
972
- - `.ai-toolkit.lock.json` should be committed to git (team synchronization)
971
+ - `.softspark-toolkit.lock.json` should be committed to git (team synchronization)
973
972
 
974
973
  ---
975
974
 
@@ -983,7 +982,7 @@ ai-toolkit config check
983
982
  # Exit codes:
984
983
  # 0 — project complies with base config
985
984
  # 1 — violations found (missing required plugins, forbidden overrides, etc.)
986
- # 2 — .ai-toolkit.json not found
985
+ # 2 — .softspark-toolkit.json not found
987
986
  ```
988
987
 
989
988
  **GitHub Actions example:**
@@ -1056,7 +1055,7 @@ v1 ships with a minimal schema. Each additional field adds merge logic, validati
1056
1055
  | **Offline** | Cached configs used when registry unavailable, with clear warning. |
1057
1056
  | **Security** | No secret exposure in config files or audit trail. npm auth via `.npmrc` (user-managed). `execFile` for npm CLI (no shell injection). |
1058
1057
  | **Error messages** | Every validation error includes: what failed, which config layer caused it, and what to do (e.g., "Contact your team lead to request an exemption"). |
1059
- | **Backward compatibility** | 100% — projects without `.ai-toolkit.json` work exactly as today. Zero behavioral changes for existing users. |
1058
+ | **Backward compatibility** | 100% — projects without `.softspark-toolkit.json` work exactly as today. Zero behavioral changes for existing users. |
1060
1059
  | **Maintainability** | Each new schema field requires: merge logic, validation, diff output, test. Budget 0.5d per new field. |
1061
1060
  | **Quality gates** | `ruff check scripts/config_*.py` (0 errors), `mypy --strict scripts/config_*.py` (0 errors). Run before every commit. |
1062
1061
  | **Type safety** | 100% public API type hints (all function signatures). >60% internal. Use `TypedDict` for config schemas, `dataclass` for resolved configs. |
@@ -1073,7 +1072,7 @@ v1 ships with a minimal schema. Each additional field adds merge logic, validati
1073
1072
  | Constitution protection | 100% (Articles I-V immutable) |
1074
1073
  | Override justification | Required for all overrides |
1075
1074
  | Enforce constraints | 4 types (minHookProfile, requiredPlugins, forbidOverride, requiredAgents) |
1076
- | Backward compatibility | 100% (projects without .ai-toolkit.json work as today) |
1075
+ | Backward compatibility | 100% (projects without .softspark-toolkit.json work as today) |
1077
1076
  | CI enforcement | Exit code 0/1 for governance compliance |
1078
1077
  | Lock file | Reproducible installs across team members |
1079
1078
  | Scaffold command | Ready-to-publish npm package template |
@@ -1099,7 +1098,7 @@ v1 ships with a minimal schema. Each additional field adds merge logic, validati
1099
1098
 
1100
1099
  ## 9. Pre-Mortem
1101
1100
 
1102
- 1. **"Config file fatigue"** — developers already have `.eslintrc`, `tsconfig.json`, `.prettierrc`. Another `.ai-toolkit.json` may feel like bloat. Mitigation: file is optional, all features work without it. The DX gain (organizational governance without per-repo updates) justifies the file.
1101
+ 1. **"Config file fatigue"** — developers already have `.eslintrc`, `tsconfig.json`, `.prettierrc`. Another `.softspark-toolkit.json` may feel like bloat. Mitigation: file is optional, all features work without it. The DX gain (organizational governance without per-repo updates) justifies the file.
1103
1102
  2. **"Base config never gets updated"** — team lead creates base config, nobody maintains it. Mitigation: `ai-toolkit config check` in CI catches drift; lock file staleness warnings.
1104
1103
  3. **"Override justification is annoying"** — developers will write "needed" as justification. Mitigation: CI check can enforce minimum justification length (>20 chars); code review culture catches low-effort justifications.
1105
1104
  4. **"Merge semantics are confusing"** — "does project override or extend the base agent list?" Mitigation: explicit semantics documented in schema; `ai-toolkit config diff` shows exactly what happened.
@@ -1125,7 +1124,7 @@ v1 ships with a minimal schema. Each additional field adds merge logic, validati
1125
1124
 
1126
1125
  **MVP (ship first, ~3.5 weeks):**
1127
1126
  1. [x] Approve plan
1128
- 2. [x] Define `.ai-toolkit.json` JSON Schema — v1 scope only (1.1)
1127
+ 2. [x] Define `.softspark-toolkit.json` JSON Schema — v1 scope only (1.1)
1129
1128
  3. [x] Implement config resolver (npm, git, local) with caching (1.2)
1130
1129
  4. [x] Implement merge engine with override validation (1.3)
1131
1130
  5. [x] Implement constitution immutability guard (1.4)
@@ -1162,17 +1161,15 @@ v1 ships with a minimal schema. Each additional field adds merge logic, validati
1162
1161
 
1163
1162
  ## 13. Cross-Plan Dependencies
1164
1163
 
1165
- This plan shares modification targets with two other proposed plans:
1164
+ This plan shares modification targets with the Offline SLM plan:
1166
1165
 
1167
- | Shared File | This Plan | Local Dashboard Plan | Offline SLM Plan |
1168
- |-------------|-----------|---------------------|-----------------|
1169
- | `scripts/install.py` | +80 LOC (extends resolution) | — | +30 LOC (offline-slm profile) |
1170
- | `manifest.json` | +10 LOC (schema refs) | — | +5 LOC (offline-slm profile) |
1171
- | `bin/ai-toolkit.js` | +40 LOC (config subcommands) | +15 LOC (ui command) | +10 LOC (compile-slm command) |
1166
+ | Shared File | This Plan | Offline SLM Plan |
1167
+ |-------------|-----------|-----------------|
1168
+ | `scripts/install.py` | +80 LOC (extends resolution) | +30 LOC (offline-slm profile) |
1169
+ | `manifest.json` | +10 LOC (schema refs) | +5 LOC (offline-slm profile) |
1170
+ | `bin/ai-toolkit.js` | +40 LOC (config subcommands) | +10 LOC (compile-slm command) |
1172
1171
 
1173
- **If implementing in parallel:** coordinate merge order for shared files. Recommended sequence: Offline SLM (smallest changes) → Enterprise Config → Dashboard (no install.py changes).
1174
-
1175
- **Dashboard integration note:** If this plan ships before the Dashboard plan, the Dashboard's Config page (2.6) should display `.ai-toolkit.json` / `extends` status and the `config diff` output.
1172
+ **If implementing in parallel:** coordinate merge order for shared files. Recommended sequence: Offline SLM (smallest changes) → Enterprise Config.
1176
1173
 
1177
1174
  ---
1178
1175
 
@@ -1272,8 +1269,8 @@ ai-toolkit compile-slm [--budget 4096] [--persona backend-lead] [--lang typescri
1272
1269
  │ extended (16K) — near-full toolkit (for 32B+ models) │
1273
1270
  │ │
1274
1271
  │ Output Files: │
1275
- │ ~/.ai-toolkit/compiled/slm-system-prompt.md │
1276
- │ ~/.ai-toolkit/compiled/slm-skills-reference.md │
1272
+ │ ~/.softspark/ai-toolkit/compiled/slm-system-prompt.md │
1273
+ │ ~/.softspark/ai-toolkit/compiled/slm-skills-reference.md │
1277
1274
  │ CLAUDE.md (or equivalent) — auto-generated │
1278
1275
  │ │
1279
1276
  │ Integration Targets: │
@@ -1613,7 +1610,7 @@ ai-toolkit install --profile offline-slm
1613
1610
  # What happens:
1614
1611
  # 1. Standard install of core components
1615
1612
  # 2. Runs compile_slm.py with auto-detected settings
1616
- # 3. Writes compiled output to ~/.ai-toolkit/compiled/
1613
+ # 3. Writes compiled output to ~/.softspark/ai-toolkit/compiled/
1617
1614
  # 4. Generates integration instructions for detected local model tools
1618
1615
  # 5. state.json records profile as "offline-slm"
1619
1616
  ```
@@ -1716,7 +1713,7 @@ ollama run my-coder "implement the payment API"
1716
1713
  ```
1717
1714
  1. ai-toolkit compile-slm --model-size 14b
1718
1715
  2. Open LM Studio → Chat → System Prompt
1719
- 3. Paste contents of ~/.ai-toolkit/compiled/slm-system-prompt.md
1716
+ 3. Paste contents of ~/.softspark/ai-toolkit/compiled/slm-system-prompt.md
1720
1717
  ```
1721
1718
 
1722
1719
  **Aider:**
@@ -1787,7 +1784,7 @@ Post-compilation checks:
1787
1784
 
1788
1785
  ## 6b. Cache Invalidation & Recompile Triggers
1789
1786
 
1790
- Compiled output (`~/.ai-toolkit/compiled/slm-system-prompt.md`) is a **derived artifact** — it must be recompiled when inputs change:
1787
+ Compiled output (`~/.softspark/ai-toolkit/compiled/slm-system-prompt.md`) is a **derived artifact** — it must be recompiled when inputs change:
1791
1788
 
1792
1789
  | Trigger | Action |
1793
1790
  |---------|--------|
@@ -1806,7 +1803,7 @@ The offline-slm feature is purely additive — removing it is trivial:
1806
1803
  1. Delete `scripts/compile_slm.py`, `scripts/slm_token_counter.py`, `scripts/slm_compression.py`, `scripts/slm_integration.py`
1807
1804
  2. Remove `"offline-slm"` and `"offline-slm-extended"` from `manifest.json` profiles
1808
1805
  3. Remove `compile-slm` from `SCRIPT_COMMANDS` in `bin/ai-toolkit.js`
1809
- 4. Delete `~/.ai-toolkit/compiled/` directory (user-side)
1806
+ 4. Delete `~/.softspark/ai-toolkit/compiled/` directory (user-side)
1810
1807
  5. No hooks, no state files, no config entries to clean up
1811
1808
 
1812
1809
  ---
@@ -1911,13 +1908,13 @@ For teams needing enforcement, recommend `--profile offline-slm` combined with a
1911
1908
 
1912
1909
  ## 13. Cross-Plan Dependencies
1913
1910
 
1914
- This plan shares modification targets with two other proposed plans:
1911
+ This plan shares modification targets with the Enterprise Config plan:
1915
1912
 
1916
- | Shared File | This Plan | Enterprise Config Plan | Local Dashboard Plan |
1917
- |-------------|-----------|----------------------|---------------------|
1918
- | `scripts/install.py` | +30 LOC (offline-slm profile) | +80 LOC (extends resolution) | — |
1919
- | `manifest.json` | +5 LOC (offline-slm profile) | +10 LOC (schema refs) | — |
1920
- | `bin/ai-toolkit.js` | +10 LOC (compile-slm command) | +40 LOC (config subcommands) | +15 LOC (ui command) |
1913
+ | Shared File | This Plan | Enterprise Config Plan |
1914
+ |-------------|-----------|----------------------|
1915
+ | `scripts/install.py` | +30 LOC (offline-slm profile) | +80 LOC (extends resolution) |
1916
+ | `manifest.json` | +5 LOC (offline-slm profile) | +10 LOC (schema refs) |
1917
+ | `bin/ai-toolkit.js` | +10 LOC (compile-slm command) | +40 LOC (config subcommands) |
1921
1918
 
1922
1919
  **If implementing in parallel:** this plan has the smallest changes to shared files — merge first to minimize conflicts.
1923
1920
 
@@ -1988,7 +1985,7 @@ Create `cloud-security-pack` plugin pack that provides deterministic, read-only
1988
1985
  - **Deterministic** — reproducible results, no LLM-driven regex (same pattern as `hipaa_scan.py`)
1989
1986
  - **False positive aware** — context graph resolves "public endpoint behind gateway/App Check/WAF"
1990
1987
  - **CI-ready** — `--output json` + `--output sarif` (SARIF v2.1.0 for GitHub Advanced Security), exit code 1 on HIGH, 0 otherwise
1991
- - **Credential isolation** — keys stored in `~/.ai-toolkit/credentials/`, accessible only by this pack's scripts
1988
+ - **Credential isolation** — keys stored in `~/.softspark/ai-toolkit/credentials/`, accessible only by this pack's scripts
1992
1989
  - **Static-first** — static mode (no credentials) is the default, live mode is opt-in upgrade
1993
1990
  - **Incremental** — `--changed` flag scans only files modified since last commit (PR workflow)
1994
1991
  - **IaC via `terraform show -json`** — wraps Terraform's own JSON output instead of parsing HCL directly
@@ -2149,7 +2146,7 @@ ai-toolkit credentials test aws
2149
2146
 
2150
2147
  **Storage structure:**
2151
2148
  ```
2152
- ~/.ai-toolkit/
2149
+ ~/.softspark/ai-toolkit/
2153
2150
  credentials/
2154
2151
  gcp.json # SA key file (copied, chmod 0600)
2155
2152
  gcp.meta.json # { project_id, added_at, method: "file"|"gcloud" }
@@ -2174,7 +2171,7 @@ ai-toolkit credentials test aws
2174
2171
  - Connection works (GCP: `gcloud auth list`, AWS: `aws sts get-caller-identity`, Azure: `az account show`)
2175
2172
  - SA/role has **only read permissions** — **REFUSE to store** if write access detected (orchestration-review: warn-only is ignored by users). Override: `--force` flag with explicit acknowledgment
2176
2173
  - Project/subscription exists
2177
- - `.gitignore`-proof — lives in `~/.ai-toolkit/`, never in project directory
2174
+ - `.gitignore`-proof — lives in `~/.softspark/ai-toolkit/`, never in project directory
2178
2175
  - Scripts access credentials via `gcp_auth.py` helper — single entry point, no direct file reads
2179
2176
 
2180
2177
  **Files to create/modify:**
@@ -3116,784 +3113,6 @@ Examples:
3116
3113
 
3117
3114
  ---
3118
3115
 
3119
- ## kb/planning/local-dashboard-plan.md
3120
-
3121
- ---
3122
- title: "Plan: Local Dashboard — ai-toolkit ui"
3123
- category: planning
3124
- service: ai-toolkit
3125
- tags:
3126
- - dashboard
3127
- - developer-experience
3128
- - web-ui
3129
- - tui
3130
- - configuration
3131
- - visualization
3132
- doc_type: plan
3133
- status: proposed
3134
- created: "2026-04-10"
3135
- last_updated: "2026-04-10"
3136
- completion: "0%"
3137
- description: "Ephemeral local web dashboard for ai-toolkit. Provides visual management of agents, skills, hooks, plugins, stats, credentials, and configuration profiles. Zero external dependencies — stdlib Node.js server with embedded HTML/CSS/JS. Launched via `ai-toolkit ui`."
3138
- ---
3139
-
3140
- # Plan: Local Dashboard — `ai-toolkit ui`
3141
-
3142
- **Status:** Proposed
3143
- **Completion:** 0%
3144
- **Created:** 2026-04-10
3145
- **Origin:** DX friction — managing 44 agents, 91 skills, 21 hooks, 11 plugin packs, and multiple profiles via CLI only creates a steep learning curve for new adopters. Visual management lowers the adoption barrier.
3146
- **Estimated Effort:** 6-7 weeks (1 person)
3147
-
3148
- ---
3149
-
3150
- ## 1. Objective
3151
-
3152
- Create an `ai-toolkit ui` command that launches an ephemeral local HTTP server serving a single-page web dashboard. The dashboard provides visual management of all toolkit components — no more memorizing CLI flags.
3153
-
3154
- **Key design principles:**
3155
- - **Zero external dependencies** — stdlib Node.js `http` module, embedded HTML/CSS/JS (same approach as `visual-server.cjs` in `/write-a-prd`). Server lives in `app/dashboard/` (not `scripts/`) — aligns with `visual-server.cjs` precedent and the "scripts/ = Python stdlib only" convention
3156
- - **Ephemeral** — auto-kills after 30 minutes of inactivity (matching existing companion pattern)
3157
- - **Read-write** — reads state from `~/.ai-toolkit/state.json`, `~/.claude/settings.json`, `manifest.json`; writes config changes through existing CLI commands (never mutates files directly)
3158
- - **Dark theme** — premium aesthetic, responsive, glassmorphism accents
3159
- - **Offline** — no CDN dependencies, no external fonts, no analytics
3160
- - **Port discovery** — starts on 3141, auto-increments if busy
3161
-
3162
- ---
3163
-
3164
- ## 1a. Functional Requirements
3165
-
3166
- | ID | Requirement | Priority | Success Metric |
3167
- |----|-------------|----------|----------------|
3168
- | FR1 | HTTP server with auto-kill + port discovery | Must | Starts, auto-kills after 30 min, increments port if busy |
3169
- | FR2 | Read API endpoints (status, agents, skills, hooks, plugins, stats, config, mcp) | Must | All 8 endpoints return valid JSON |
3170
- | FR3 | Action execution via `POST /api/action` with SSE streaming | Must | Command output streamed, exit code returned |
3171
- | FR4 | Overview page with health checks + component counts | Must | Live data, matches `ai-toolkit validate` output |
3172
- | FR5 | Agents page with grid view + category filter | Must | All 44 agents parsed, 10 categories filterable |
3173
- | FR6 | Skills page with type/effort filter + sortable table | Must | All 91 skills, 3 type badges |
3174
- | FR7 | Hooks page with lifecycle diagram + profile toggle | Should | 21 hooks, 3 profiles toggleable |
3175
- | FR8 | Plugins page with install/remove action buttons | Should | Action triggers CLI via POST /api/action |
3176
- | FR9 | Config page with profile/persona management | Should | Reads + writes profiles via CLI |
3177
- | FR10 | Stats page with inline SVG charts | Should | Bar chart + trend line minimum (v1) |
3178
- | FR11 | MCP template browser with add/remove | Could | 25 templates browseable |
3179
- | FR12 | Dark theme + glassmorphism CSS design system | Must | Zero external CSS/font deps |
3180
- | FR13 | Client-side SPA routing (hash-based) | Must | Navigation without page reload |
3181
- | FR14 | Responsive design (desktop, tablet, mobile) | Should | 3 breakpoints, usable on mobile |
3182
- | FR15 | Command allowlist enforcement on /api/action | Must | Non-allowlisted commands → 403 |
3183
-
3184
- ---
3185
-
3186
- ## 2. Architecture Overview
3187
-
3188
- ```
3189
- ai-toolkit ui [--port 3141] [--no-auto-kill]
3190
-
3191
- ┌──────────────────────────────────────────────────────────┐
3192
- │ Local Dashboard │
3193
- │ │
3194
- │ Server: stdlib Node.js http (0 deps) │
3195
- │ Port: 3141 (auto-increment if busy) │
3196
- │ Auto-kill: 30 min idle (configurable) │
3197
- │ │
3198
- │ Pages: │
3199
- │ / Overview + health │
3200
- │ /agents 44 agents — grid view │
3201
- │ /skills 91 skills — filterable table │
3202
- │ /hooks 21 hooks — lifecycle diagram │
3203
- │ /plugins 11 packs — install/remove │
3204
- │ /config Profile / persona / modules │
3205
- │ /stats Usage analytics + charts │
3206
- │ /mcp MCP templates — add/remove │
3207
- │ (credentials page deferred — requires cloud-security-pack CLI) │
3208
- │ │
3209
- │ API (JSON, internal): │
3210
- │ GET /api/status Toolkit state │
3211
- │ GET /api/agents Agent catalog │
3212
- │ GET /api/skills Skill catalog │
3213
- │ GET /api/hooks Hook definitions │
3214
- │ GET /api/plugins Plugin packs + install state │
3215
- │ GET /api/stats Usage statistics │
3216
- │ GET /api/config Current configuration │
3217
- │ GET /api/mcp MCP templates + installed │
3218
- │ (credentials endpoint deferred — see Future section) │
3219
- │ POST /api/action Execute CLI command │
3220
- │ │
3221
- │ Static assets (inlined in server.js): │
3222
- │ HTML template (single page, client-side routing) │
3223
- │ CSS (dark theme, glassmorphism, responsive) │
3224
- │ JS (vanilla, fetch-based, no framework) │
3225
- └──────────────────────────────────────────────────────────┘
3226
- ```
3227
-
3228
- ### Action Execution Model
3229
-
3230
- All write operations go through `POST /api/action`:
3231
-
3232
- ```json
3233
- {
3234
- "command": "plugin",
3235
- "args": ["install", "memory-pack"]
3236
- }
3237
- ```
3238
-
3239
- The server spawns `ai-toolkit <command> <args>` as a child process, streams stdout/stderr back via SSE (Server-Sent Events), and returns exit code. This ensures:
3240
- 1. All existing validation logic in CLI scripts executes
3241
- 2. No file mutation logic duplicated in the dashboard
3242
- 3. Audit trail identical to CLI usage
3243
-
3244
- ---
3245
-
3246
- ## 3. Progress Tracking
3247
-
3248
- | # | Feature | Priority | Status | Est. Time | Notes |
3249
- |---|---------|----------|--------|-----------|-------|
3250
- | 1.1 | HTTP server + auto-kill + port discovery | P0 | Proposed | 1d | stdlib Node.js, ephemeral lifecycle |
3251
- | 1.2 | API layer — read endpoints (status, agents, skills, hooks, plugins, stats, config, mcp) | P0 | Proposed | 2d | Parse frontmatter, state.json, hooks.json |
3252
- | 1.3 | API layer — action execution endpoint | P0 | Proposed | 1d | Spawn CLI + SSE streaming |
3253
- | 2.1 | Overview page (health, component counts, version) | P0 | Proposed | 1.5d | Dashboard landing page |
3254
- | 2.2 | Agents page (grid + detail view + category filter) | P0 | Proposed | 2d | Parse agent .md frontmatter |
3255
- | 2.3 | Skills page (filterable table + type badges + effort) | P0 | Proposed | 2d | Task / hybrid / knowledge taxonomy |
3256
- | 2.4 | Hooks page (lifecycle diagram + profile toggle) | P1 | Proposed | 2d | Visual event → script mapping |
3257
- | 2.5 | Plugins page (install/remove/status cards) | P1 | Proposed | 2d | Action buttons trigger CLI |
3258
- | 2.6 | Config page (profile/persona/modules checkboxes) | P1 | Proposed | 2d | Read/write profiles |
3259
- | 2.7 | Stats page (usage charts, skill invocation heatmap) | P1 | Proposed | 3.5d | Hand-drawn SVG charts (bar, heatmap, trend), no chart library |
3260
- | 2.8 | MCP page (template browser, add/remove) | P2 | Proposed | 1.5d | 25 MCP templates |
3261
- | 2.9 | ~~Credentials page~~ | — | Deferred | — | Requires cloud-security-pack CLI commands (not yet implemented) |
3262
- | 3.1 | CSS design system (dark theme, glassmorphism, responsive) | P0 | Proposed | 2d | Premium aesthetic, zero external deps |
3263
- | 3.2 | Client-side routing + navigation | P0 | Proposed | 1d | Hash-based SPA routing |
3264
- | 4.1 | CLI command registration (`ai-toolkit ui`) | P0 | Proposed | 0.5d | bin/ai-toolkit.js integration |
3265
- | 4.2 | Tests (bats + node:test) | P1 | Proposed | 3d | Server lifecycle (bats) + API endpoints + SSE streaming (node:test) |
3266
- | 4.3 | Documentation | P1 | Proposed | 2.5d | README, CLAUDE.md, ARCHITECTURE.md, package.json, llms.txt, llms-full.txt, AGENTS.md, skills-catalog.md, architecture-overview.md |
3267
-
3268
- **Phasing:**
3269
- - **Phase 1 (week 1-3):** Foundation — server, API, design system, overview page, agents page, skills page
3270
- - **Phase 2 (week 3-5):** Interactive — hooks, plugins, config, action execution, stats
3271
- - **Phase 3 (week 6-7):** Polish — MCP, responsive testing, tests, documentation (2.5d docs — all 9 docs per CLAUDE.md rules)
3272
-
3273
- > **Demand validation gate:** Ship Phase 1 (server + overview + agents + skills) as MVP. Announce, measure adoption (track `ai-toolkit ui` invocations via `stats.json`). Only build Phase 2 interactive pages if usage > 10 sessions/week across early adopters.
3274
-
3275
- ---
3276
-
3277
- ## 4. Dependency Graph
3278
-
3279
- ```
3280
- Phase 1: Foundation (week 1-3)
3281
- ================================
3282
- HTTP server (1.1) ──────┐
3283
- ├──► API read layer (1.2) ──► Overview page (2.1)
3284
- CSS design system (3.1) ┤ ├──► Agents page (2.2)
3285
- Client routing (3.2) ───┘ └──► Skills page (2.3)
3286
-
3287
- Phase 2: Interactive (week 3-5)
3288
- =================================
3289
- API action layer (1.3) ─┐
3290
- ├──► Hooks page (2.4)
3291
- ├──► Plugins page (2.5)
3292
- ├──► Config page (2.6)
3293
- └──► Stats page (2.7)
3294
-
3295
- Phase 3: Polish (week 6-7)
3296
- ===========================
3297
- ├──► MCP page (2.8)
3298
- ├──► CLI registration (4.1)
3299
- └──► Tests + docs (4.2, 4.3)
3300
- ```
3301
-
3302
- ---
3303
-
3304
- ## 5. Detailed Implementation
3305
-
3306
- ### Phase 1: Foundation (week 1-3)
3307
-
3308
- #### 1.1 HTTP Server + Lifecycle
3309
-
3310
- **File:** `app/dashboard/server.js`
3311
-
3312
- ```javascript
3313
- // Key design decisions:
3314
- // 1. stdlib only — require('http'), require('fs'), require('path')
3315
- // 2. Auto-kill timer — 30 min idle, reset on every request
3316
- // 3. Port discovery — try 3141, increment until available
3317
- // 4. Single-file deployment — HTML/CSS/JS embedded as template literals
3318
- // 5. Same pattern as visual-brainstorming companion in /write-a-prd
3319
-
3320
- const AUTO_KILL_MS = 30 * 60 * 1000; // 30 minutes
3321
- const DEFAULT_PORT = 3141;
3322
- const MAX_PORT_ATTEMPTS = 10;
3323
- ```
3324
-
3325
- **CLI interface:**
3326
- ```bash
3327
- ai-toolkit ui # open dashboard on port 3141
3328
- ai-toolkit ui --port 4000 # custom port
3329
- ai-toolkit ui --no-auto-kill # disable 30 min auto-kill
3330
- ai-toolkit ui --open # auto-open browser (default: true)
3331
- ```
3332
-
3333
- **Lifecycle:**
3334
- 1. Start HTTP server on available port
3335
- 2. Open browser via `open` (macOS) / `xdg-open` (Linux)
3336
- 3. Reset idle timer on every request
3337
- 4. After 30 min inactivity → `process.exit(0)` with console message
3338
- 5. `Ctrl+C` → graceful shutdown
3339
-
3340
- **Security:**
3341
- - Bind to `127.0.0.1` only (never `0.0.0.0`)
3342
- - No authentication needed (localhost only, ephemeral)
3343
- - POST `/api/action` validates command against allowlist (same commands as CLI)
3344
- - No file uploads, no eval, no template injection
3345
-
3346
- **Files:**
3347
-
3348
- | File | Action | Description |
3349
- |------|--------|-------------|
3350
- | `app/dashboard/server.js` | CREATE | HTTP server + API + embedded UI |
3351
- | `app/dashboard/api.js` | CREATE | API endpoint handlers |
3352
- | `app/dashboard/assets.js` | CREATE | Embedded HTML/CSS/JS templates |
3353
-
3354
- **Success Criteria:**
3355
- - [ ] Server starts on port 3141 (or next available)
3356
- - [ ] Auto-kills after 30 min idle
3357
- - [ ] Browser auto-opens on launch
3358
- - [ ] Binds to 127.0.0.1 only
3359
- - [ ] `Ctrl+C` graceful shutdown
3360
-
3361
- ---
3362
-
3363
- #### 1.2 API Layer — Read Endpoints
3364
-
3365
- All endpoints return JSON. Data sources:
3366
-
3367
- | Endpoint | Source | Description |
3368
- |----------|--------|-------------|
3369
- | `GET /api/status` | `~/.ai-toolkit/state.json` + `manifest.json` | Version, profile, installed modules |
3370
- | `GET /api/agents` | `app/agents/*.md` frontmatter | Name, description, tools, triggers, category |
3371
- | `GET /api/skills` | `app/skills/*/SKILL.md` frontmatter | Name, type, effort, agent, description |
3372
- | `GET /api/hooks` | `app/hooks.json` | Event, script, description, profile |
3373
- | `GET /api/plugins` | `app/plugins/*/plugin.json` + state | Name, domain, status, installed?, components |
3374
- | `GET /api/stats` | `~/.ai-toolkit/stats.json` | Skill invocation counts, dates |
3375
- | `GET /api/config` | `~/.ai-toolkit/state.json` + settings | Profile, persona, modules, hook profile |
3376
- | `GET /api/mcp` | `app/mcp-templates/*.json` + `.mcp.json` | Available templates, installed servers |
3377
- | ~~`GET /api/credentials`~~ | — | Deferred — requires cloud-security-pack CLI |
3378
-
3379
- **Frontmatter parser:** Reuse the YAML-subset parser pattern from existing `scripts/frontmatter.py` — port to JS (simple `---` delimited key-value extraction, covers all toolkit frontmatter which is flat YAML).
3380
-
3381
- **Response format (example):**
3382
- ```json
3383
- {
3384
- "agents": [
3385
- {
3386
- "name": "backend-specialist",
3387
- "description": "Expert backend architect for Node.js, Python, PHP...",
3388
- "tools": ["Read", "Write", "Edit", "Bash", "Grep", "Glob"],
3389
- "triggers": ["backend", "server", "api", "endpoint"],
3390
- "category": "development",
3391
- "file": "app/agents/backend-specialist.md"
3392
- }
3393
- ],
3394
- "meta": { "count": 44, "categories": 10 }
3395
- }
3396
- ```
3397
-
3398
- **Success Criteria:**
3399
- - [ ] All 8 read endpoints return valid JSON
3400
- - [ ] Agent frontmatter parsed for all 44 agents
3401
- - [ ] Skill frontmatter parsed for all 91 skills
3402
- - [ ] Stats endpoint handles missing stats.json gracefully
3403
-
3404
- ---
3405
-
3406
- #### 1.3 API Layer — Action Execution
3407
-
3408
- **Endpoint:** `POST /api/action`
3409
-
3410
- ```json
3411
- // Request
3412
- {
3413
- "command": "plugin",
3414
- "args": ["install", "memory-pack"]
3415
- }
3416
-
3417
- // Response (SSE stream)
3418
- event: stdout
3419
- data: Installing memory-pack...
3420
-
3421
- event: stdout
3422
- data: ✓ Hooks installed
3423
-
3424
- event: done
3425
- data: {"exitCode": 0, "duration": 1234}
3426
- ```
3427
-
3428
- **Command allowlist:**
3429
- ```javascript
3430
- const ALLOWED_COMMANDS = [
3431
- 'plugin install', 'plugin remove', 'plugin update', 'plugin clean',
3432
- 'mcp add', 'mcp remove',
3433
- 'install --profile', 'install --persona',
3434
- 'update', 'validate', 'doctor', 'doctor --fix',
3435
- 'stats', 'stats --reset',
3436
- // 'credentials add/remove/test' — deferred until cloud-security-pack CLI ships
3437
- ];
3438
- ```
3439
-
3440
- **Security:** Commands not in allowlist → 403. No shell injection — args passed as array to `execFile`, never interpolated into a string.
3441
-
3442
- **Success Criteria:**
3443
- - [ ] SSE streaming of command output
3444
- - [ ] Exit code returned in final event
3445
- - [ ] Command allowlist enforced
3446
- - [ ] No shell injection possible
3447
- - [ ] Concurrent commands rejected (one at a time)
3448
-
3449
- ---
3450
-
3451
- ### Phase 2: UI Pages (week 3-5)
3452
-
3453
- #### 2.1 Overview Page
3454
-
3455
- The landing page — first thing the user sees.
3456
-
3457
- **Layout:**
3458
- ```
3459
- ┌─────────────────────────────────────────────────┐
3460
- │ ai-toolkit v1.5.1 [● running] │
3461
- ├─────────────────────────────────────────────────┤
3462
- │ │
3463
- │ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ │
3464
- │ │ 44 │ │ 91 │ │ 21 │ │ 11 │ │
3465
- │ │agents│ │skills│ │hooks │ │packs │ │
3466
- │ └──────┘ └──────┘ └──────┘ └──────┘ │
3467
- │ │
3468
- │ Profile: standard Persona: (none) │
3469
- │ Hook Profile: standard │
3470
- │ Node: v22.x Python: 3.12 │
3471
- │ │
3472
- │ ┌─ Health ──────────────────────────────────┐ │
3473
- │ │ ✓ Constitution symlinked │ │
3474
- │ │ ✓ Hooks installed (21/21) │ │
3475
- │ │ ✓ Agents symlinked (44/44) │ │
3476
- │ │ ⚠ 2 plugins not installed │ │
3477
- │ │ ✓ MCP servers: 3 configured │ │
3478
- │ └───────────────────────────────────────────┘ │
3479
- │ │
3480
- │ ┌─ Recent Activity ─────────────────────────┐ │
3481
- │ │ /review — 12 invocations (last: 2h ago) │ │
3482
- │ │ /commit — 8 invocations (last: 5h ago) │ │
3483
- │ │ /test — 6 invocations (last: 1d ago) │ │
3484
- │ └───────────────────────────────────────────┘ │
3485
- └─────────────────────────────────────────────────┘
3486
- ```
3487
-
3488
- **Data sources:** `/api/status` + `/api/stats` + `/api/plugins`
3489
-
3490
- **Success Criteria:**
3491
- - [ ] Component counts rendered from live data
3492
- - [ ] Health checks match `ai-toolkit validate` output
3493
- - [ ] Recent activity from stats.json
3494
- - [ ] Responsive on mobile-width screens
3495
-
3496
- ---
3497
-
3498
- #### 2.2 Agents Page
3499
-
3500
- **Layout:** Grid of agent cards, filterable by category (10 categories).
3501
-
3502
- **Card design:**
3503
- ```
3504
- ┌─────────────────────────────────┐
3505
- │ 🔧 backend-specialist │
3506
- │ │
3507
- │ Expert backend architect for │
3508
- │ Node.js, Python, PHP... │
3509
- │ │
3510
- │ Tools: Read, Write, Edit, Bash │
3511
- │ Triggers: backend, server, api │
3512
- │ │
3513
- │ [View Definition] │
3514
- └─────────────────────────────────┘
3515
- ```
3516
-
3517
- **Features:**
3518
- - Category filter pills (development, security, data, infrastructure, etc.)
3519
- - Search by name/description/trigger
3520
- - Click card → modal with full agent definition (rendered markdown)
3521
- - Agent count per category in filter pills
3522
-
3523
- ---
3524
-
3525
- #### 2.3 Skills Page
3526
-
3527
- **Layout:** Filterable table with type badges.
3528
-
3529
- | Skill | Type | Effort | Agent | Description |
3530
- |-------|------|--------|-------|-------------|
3531
- | /commit | task | medium | — | Structured commit with linting |
3532
- | /review | hybrid | high | code-reviewer | Code review: quality, security |
3533
- | clean-code | knowledge | — | — | Auto-loaded code quality patterns |
3534
-
3535
- **Features:**
3536
- - Filter by type (task / hybrid / knowledge)
3537
- - Filter by effort (low / medium / high / max)
3538
- - Search by name/description
3539
- - Sort by any column
3540
- - Badge colors: task=blue, hybrid=purple, knowledge=green
3541
-
3542
- ---
3543
-
3544
- #### 2.4 Hooks Page
3545
-
3546
- **Layout:** Lifecycle diagram with profile toggle (minimal/standard/strict).
3547
-
3548
- **Visualization:**
3549
- ```
3550
- Event Timeline (horizontal flow):
3551
- PreToolUse ──► ToolUse ──► PostToolUse ──► Notification
3552
- │ │ │ │
3553
- guard-path.sh (tool exec) quality-check.sh track-usage.sh
3554
- guard-destructive.sh session-context.sh
3555
- ```
3556
-
3557
- **Features:**
3558
- - Lifecycle event diagram — visual mapping of event → hook script(s)
3559
- - Profile toggle — show/hide hooks per profile (minimal hides most, strict shows all)
3560
- - Hook detail panel — click hook name to see: script path, description, when it fires, which profile includes it
3561
- - Profile diff — highlight which hooks are added/removed between profiles
3562
- - Status indicators — green (installed), red (missing script), yellow (overridden by plugin)
3563
-
3564
- **Data source:** `app/hooks.json` + `~/.ai-toolkit/hooks/` filesystem check
3565
-
3566
- **Success Criteria:**
3567
- - [ ] All 21 hooks rendered with correct lifecycle event
3568
- - [ ] Profile toggle filters hooks correctly
3569
- - [ ] Missing hook scripts shown with warning indicator
3570
- - [ ] Hook detail panel shows script content preview
3571
-
3572
- ---
3573
-
3574
- #### 2.5 Plugins Page
3575
-
3576
- **Layout:** Cards with install/remove buttons.
3577
-
3578
- ```
3579
- ┌─────────────────────────────────┐
3580
- │ 🧩 memory-pack ● installed │
3581
- │ │
3582
- │ SQLite-based persistent memory │
3583
- │ with FTS5 search across sessions│
3584
- │ │
3585
- │ Skills: 1 Hooks: 2 Agents: 0 │
3586
- │ DB size: 2.4 MB Obs: 1,234 │
3587
- │ │
3588
- │ [Update] [Clean] [Remove] │
3589
- └─────────────────────────────────┘
3590
- ```
3591
-
3592
- **Actions:** Install, update, remove, clean — all via `POST /api/action` → `ai-toolkit plugin <action> <name>`. SSE output shown in a slide-out console panel.
3593
-
3594
- ---
3595
-
3596
- #### 2.6 Config Page
3597
-
3598
- **Layout:** Form with current configuration, editable.
3599
-
3600
- **Sections:**
3601
- 1. **Profile selector:** minimal / standard / strict (radio buttons)
3602
- 2. **Persona selector:** none / backend-lead / frontend-lead / devops-eng / junior-dev
3603
- 3. **Hook profile:** minimal / standard / strict
3604
- 4. **Installed modules:** checkboxes for each module from manifest.json
3605
- 5. **Language rules:** detected languages + override checkboxes
3606
- 6. **Editor configs:** which editors are configured (read-only status)
3607
-
3608
- **Save:** Generates and executes the equivalent `ai-toolkit install --profile X --persona Y --modules A,B,C` command.
3609
-
3610
- ---
3611
-
3612
- #### 2.7 Stats Page
3613
-
3614
- **Layout:** Usage analytics with inline SVG charts.
3615
-
3616
- **Charts (SVG, hand-drawn — no chart library):**
3617
- 1. **Skill invocation bar chart** — top 15 most-used skills
3618
- 2. **Invocation heatmap** — 7x24 grid (day of week × hour) showing when skills are used
3619
- 3. **Effort distribution** — pie chart of low/medium/high/max invocations
3620
- 4. **Trend line** — daily invocations over last 30 days
3621
-
3622
- **Data source:** `~/.ai-toolkit/stats.json` (written by `track-usage.sh` hook)
3623
-
3624
- **SVG implementation notes:**
3625
- - All charts rendered as inline SVG strings in `assets.js` — no external chart library
3626
- - Bar chart: `<rect>` elements with calculated heights, axis labels as `<text>`
3627
- - Heatmap: 7x24 grid of `<rect>` with color intensity mapped to invocation count (0=transparent, max=accent-primary)
3628
- - Trend line: `<polyline>` with data points as `<circle>`, area fill via `<polygon>`
3629
- - Pie chart: `<path>` arcs calculated from percentages (use `Math.cos`/`Math.sin` for arc endpoints)
3630
- - All charts use CSS custom properties for colors (respects design system tokens)
3631
-
3632
- **Fallback:** If hand-drawn SVG proves too complex for 4 chart types in 3.5d budget, reduce to 2 charts (bar + trend) for v1 and defer heatmap + pie to v2.
3633
-
3634
- **Success Criteria:**
3635
- - [ ] All 4 chart types render from live stats.json data
3636
- - [ ] Empty state when stats.json missing: "No usage data yet — skills will appear here after first use"
3637
- - [ ] Charts responsive (SVG viewBox scales to container width)
3638
- - [ ] Tooltip on hover showing exact counts
3639
-
3640
- ---
3641
-
3642
- ### Phase 3: Polish (week 6-7)
3643
-
3644
- #### 3.1 CSS Design System
3645
-
3646
- **Design tokens:**
3647
- ```css
3648
- :root {
3649
- /* Dark theme palette */
3650
- --bg-primary: #0f0f14;
3651
- --bg-secondary: #1a1a24;
3652
- --bg-card: rgba(255, 255, 255, 0.04);
3653
- --bg-glass: rgba(255, 255, 255, 0.06);
3654
- --border-glass: rgba(255, 255, 255, 0.08);
3655
-
3656
- /* Accent colors (derived from SoftSpark brand) */
3657
- --accent-primary: #6366f1; /* indigo */
3658
- --accent-secondary: #8b5cf6; /* violet */
3659
- --accent-success: #10b981; /* emerald */
3660
- --accent-warning: #f59e0b; /* amber */
3661
- --accent-danger: #ef4444; /* red */
3662
-
3663
- /* Typography */
3664
- --font-sans: system-ui, -apple-system, sans-serif;
3665
- --font-mono: 'SF Mono', 'Cascadia Code', monospace;
3666
-
3667
- /* Spacing scale */
3668
- --space-xs: 4px;
3669
- --space-sm: 8px;
3670
- --space-md: 16px;
3671
- --space-lg: 24px;
3672
- --space-xl: 32px;
3673
-
3674
- /* Glassmorphism */
3675
- --glass-blur: 12px;
3676
- --glass-bg: rgba(255, 255, 255, 0.05);
3677
- --glass-border: rgba(255, 255, 255, 0.1);
3678
- }
3679
- ```
3680
-
3681
- **Components:**
3682
- - Cards with glassmorphism backdrop-filter
3683
- - Badge pills (type, effort, status)
3684
- - Sidebar navigation with active state
3685
- - Console output panel (slide-out, monospace)
3686
- - Modal overlays for detail views
3687
- - Toast notifications for action results
3688
- - Skeleton loading states
3689
-
3690
- **Responsive breakpoints:**
3691
- - Desktop: 1200px+ (sidebar + content)
3692
- - Tablet: 768px-1199px (collapsed sidebar)
3693
- - Mobile: <768px (hamburger menu, stacked cards)
3694
-
3695
- ---
3696
-
3697
- #### 4.1 CLI Command Registration
3698
-
3699
- **File:** `bin/ai-toolkit.js` — add to `COMMANDS` and `SPECIAL_HANDLERS`:
3700
-
3701
- ```javascript
3702
- // COMMANDS
3703
- 'ui': 'Launch local web dashboard for visual toolkit management',
3704
-
3705
- // SPECIAL_HANDLERS
3706
- 'ui': (args) => {
3707
- const serverPath = path.join(TOOLKIT_DIR, 'app', 'dashboard', 'server.js');
3708
- const child = require('child_process').spawn('node', [serverPath, ...args], {
3709
- stdio: 'inherit',
3710
- env: { ...process.env, TOOLKIT_DIR }
3711
- });
3712
- child.on('exit', (code) => process.exit(code || 0));
3713
- },
3714
- ```
3715
-
3716
- **Files to modify:**
3717
-
3718
- | File | Action | Description |
3719
- |------|--------|-------------|
3720
- | `bin/ai-toolkit.js` | EDIT | Register `ui` command |
3721
- | `app/dashboard/server.js` | CREATE | HTTP server (main) |
3722
- | `app/dashboard/api.js` | CREATE | API handlers |
3723
- | `app/dashboard/assets.js` | CREATE | Embedded HTML/CSS/JS |
3724
- | `app/dashboard/frontmatter.js` | CREATE | JS frontmatter parser |
3725
- | `tests/test_dashboard.bats` | CREATE | Server lifecycle tests |
3726
- | `tests/test_dashboard_api.bats` | CREATE | API endpoint tests |
3727
-
3728
- ---
3729
-
3730
- ## 6. File Summary
3731
-
3732
- | File | Action | LOC (est.) | Description |
3733
- |------|--------|------------|-------------|
3734
- | `app/dashboard/server.js` | CREATE | ~300 | HTTP server, lifecycle, routing |
3735
- | `app/dashboard/api.js` | CREATE | ~400 | All API endpoint handlers |
3736
- | `app/dashboard/assets.js` | CREATE | ~2800 | Embedded HTML + CSS + JS. Split internally: `getOverviewHTML()`, `getAgentsHTML()`, etc. — one exported function per page. Single file, multiple functions (not multiple files — preserves single-`require` deployment). If file exceeds 3000 LOC, extract to `assets/` directory with `index.js` barrel |
3737
- | `app/dashboard/frontmatter.js` | CREATE | ~80 | Frontmatter parser (JS port) |
3738
- | `bin/ai-toolkit.js` | EDIT | +15 | Register `ui` command |
3739
- | `tests/test_dashboard.bats` | CREATE | ~100 | Server lifecycle tests |
3740
- | `tests/test_dashboard_api.bats` | CREATE | ~150 | API endpoint tests |
3741
- | **Total** | | **~3845** | |
3742
-
3743
- ---
3744
-
3745
- ## 7. Success Criteria (Overall)
3746
-
3747
- | Metric | Target |
3748
- |--------|--------|
3749
- | Pages | 8 (overview, agents, skills, hooks, plugins, config, stats, mcp) |
3750
- | API endpoints | 9 (8 read + 1 action) |
3751
- | External dependencies | 0 (stdlib Node.js only) |
3752
- | Server startup time | < 500ms |
3753
- | Auto-kill | 30 min idle (configurable) |
3754
- | Responsive breakpoints | 3 (desktop, tablet, mobile) |
3755
- | Tests | 25+ |
3756
- | Browser support | Chrome, Firefox, Safari (modern, no IE) |
3757
-
3758
- ---
3759
-
3760
- ## 7a. Non-Functional Requirements
3761
-
3762
- | Category | Requirement |
3763
- |----------|-------------|
3764
- | **Performance** | Server startup < 500ms. Page render < 200ms. API responses < 100ms. |
3765
- | **Memory** | Max RSS < 100MB (including embedded assets). No unbounded caching. |
3766
- | **Concurrency** | Max 1 concurrent action execution. Queue or reject additional requests with 429. |
3767
- | **Security** | Bind `127.0.0.1` only. CSP header: `default-src 'self' 'unsafe-inline'`. No CORS headers (same-origin only). Command allowlist enforced server-side. `execFile` with array args (no shell). |
3768
- | **Accessibility** | Keyboard navigation for all interactive elements. Focus management on page transitions. Minimum 4.5:1 contrast ratio (WCAG AA). ARIA labels on icon-only buttons. |
3769
- | **Error handling** | Missing/corrupt data files → graceful empty state with message. Server crash → exit code 1 with stderr diagnostic. API errors → JSON `{ "error": "..." }` with HTTP status. |
3770
- | **Graceful degradation** | If `stats.json` missing → stats page shows "No data yet". If `state.json` missing → overview shows defaults. If agent/skill .md unreadable → skip with warning in console. |
3771
-
3772
- ---
3773
-
3774
- ## 7b. Rollback & Feature Flag
3775
-
3776
- The dashboard is purely additive — removing it is trivial:
3777
- 1. Delete `app/dashboard/` directory
3778
- 2. Remove `ui` from `COMMANDS` and `SPECIAL_HANDLERS` in `bin/ai-toolkit.js`
3779
- 3. No config files, no state files, no hooks to clean up
3780
-
3781
- **Disable without removal:** `ai-toolkit ui --disabled` could print "Dashboard disabled" and exit. Alternatively, skip registering the `ui` command in `bin/ai-toolkit.js` behind a `manifest.json` module flag so users can opt out via `--skip dashboard`.
3782
-
3783
- ---
3784
-
3785
- ## 7c. Testing Strategy
3786
-
3787
- | Layer | Framework | Coverage |
3788
- |-------|-----------|----------|
3789
- | Server lifecycle (start, port discovery, auto-kill, shutdown) | bats | 5+ tests |
3790
- | API endpoints (all 8 read + action) | `node:test` (stdlib) | 15+ tests |
3791
- | SSE streaming (stdout/stderr/done events) | `node:test` | 3+ tests |
3792
- | Command allowlist enforcement | `node:test` | 5+ tests |
3793
- | Frontmatter parser edge cases | `node:test` | 5+ tests |
3794
- | Integration: full pipeline (start → API → action → stop) | `node:test` | 3+ tests |
3795
- | **Total** | | **36+** |
3796
-
3797
- `node:test` is stdlib (Node 18+), zero dependencies. Bats tests are for CLI-level integration (process start/stop). JS tests cover API correctness.
3798
-
3799
- ---
3800
-
3801
- ## 7d. Discoverability
3802
-
3803
- | Touchpoint | Action |
3804
- |------------|--------|
3805
- | `ai-toolkit install` output | Print banner: `Run 'ai-toolkit ui' to explore agents, skills, and plugins visually.` |
3806
- | `ai-toolkit help` | Include `ui` in command list |
3807
- | README.md | Screenshot/GIF of dashboard overview page |
3808
- | First-run detection | If `stats.json` is empty, show a "Try the dashboard" suggestion after `ai-toolkit install` |
3809
-
3810
- ---
3811
-
3812
- ## 8. Risks and Mitigation
3813
-
3814
- | Risk | Probability | Impact | Mitigation |
3815
- |------|-------------|--------|------------|
3816
- | Assets.js file too large (embedded HTML/CSS/JS) | Medium | Low | Split into multiple template modules, lazy-load pages |
3817
- | Port conflict on 3141 | Low | Low | Auto-increment port, show clear message |
3818
- | SSE not supported in old browsers | Low | Low | Fallback to polling for action results |
3819
- | Frontmatter parser edge cases | Low | Medium | Match exact patterns used in existing toolkit metadata |
3820
- | Config writes break installation | Low | High | All writes go through existing CLI commands — never direct file mutation |
3821
- | Stats.json missing or empty | Medium | Low | Graceful empty state with "No usage data yet" message |
3822
-
3823
- ---
3824
-
3825
- ## 9. Pre-Mortem
3826
-
3827
- 1. **"Too many features per page"** — Dashboard tries to show everything. Users may feel overwhelmed. Mitigation: progressive disclosure — overview page shows summary only, detail pages are opt-in.
3828
- 2. **"Asset file becomes unmaintainable"** — ~2800 LOC of embedded HTML/CSS/JS is hard to iterate on. Mitigation: split into `assets/overview.js`, `assets/agents.js`, etc. with a build-free concatenation in server.js.
3829
- 3. **"Nobody uses it"** — CLI users may prefer CLI. Mitigation: dashboard is opt-in, never required. Add `ai-toolkit ui` suggestion to `ai-toolkit install` output for new users.
3830
- 4. **"Action execution feels disconnected"** — SSE console output may confuse users unfamiliar with CLI. Mitigation: rich UI feedback (progress bars, success/error toasts) layered on top of raw output.
3831
- 5. **"Charts look bad without a library"** — Hand-drawn SVG charts may look amateur. Mitigation: keep charts simple (bar + heatmap), use consistent design tokens, test extensively.
3832
-
3833
- ---
3834
-
3835
- ## 10. Next Actions
3836
-
3837
- 1. [ ] Approve plan
3838
- 2. [ ] Create `app/dashboard/server.js` with HTTP server + lifecycle (1.1)
3839
- 3. [ ] Create API layer — read endpoints (1.2)
3840
- 4. [ ] Create CSS design system + client routing (3.1, 3.2)
3841
- 5. [ ] Build Overview page (2.1)
3842
- 6. [ ] Build Agents page (2.2)
3843
- 7. [ ] Build Skills page (2.3)
3844
- 8. [ ] Add action execution API (1.3)
3845
- 9. [ ] Build Hooks, Plugins, Config pages (2.4, 2.5, 2.6)
3846
- 10. [ ] Build Stats page with SVG charts (2.7)
3847
- 11. [ ] Build MCP page (2.8)
3848
- 12. [ ] Register CLI command (4.1)
3849
- 13. [ ] Tests — bats + node:test (4.2)
3850
- 14. [ ] Documentation — all 9 docs per CLAUDE.md rules (4.3)
3851
-
3852
- ---
3853
-
3854
- ## 11. Future (Deferred)
3855
-
3856
- | Feature | Reason for deferral | Prerequisite |
3857
- |---------|-------------------|--------------|
3858
- | Credentials page (2.9) | CLI has no `credentials` commands yet | cloud-security-pack CLI implementation |
3859
- | `ai-toolkit ui --static` | Generate a single standalone HTML file (no server) — covers 80% of catalog value at 20% complexity | Post-v1 evaluation of actual usage patterns |
3860
- | Guided onboarding flow | Interactive wizard for new users | Post-v1, based on user feedback |
3861
- | Light theme toggle | Dark-only for v1 | CSS variable architecture makes this easy later |
3862
-
3863
- ---
3864
-
3865
- ## 10. Market Positioning
3866
-
3867
- **Target users:**
3868
- 1. **New adopters** — developers evaluating ai-toolkit who want to understand what's included before committing to a profile
3869
- 2. **Team leads** — visual overview of which agents, skills, and plugins are active across team setups
3870
- 3. **Plugin explorers** — developers browsing available plugin packs without memorizing CLI commands
3871
- 4. **Onboarding** — new team members getting oriented with the toolkit's capabilities
3872
-
3873
- **Competitive advantage:** No existing AI coding toolkit provides a zero-dependency ephemeral web dashboard for visual management. Backstage is 1000x heavier (requires Kubernetes, PostgreSQL). TUI tools (mise, lazygit) lack visual richness. The ephemeral auto-kill design means zero operational burden.
3874
-
3875
- **Discovery opportunity:** The dashboard serves as a self-documenting catalog — users discover agents and skills they didn't know existed, increasing toolkit utilization.
3876
-
3877
- ---
3878
-
3879
- ## 12. Cross-Plan Dependencies
3880
-
3881
- This plan shares modification targets with two other proposed plans:
3882
-
3883
- | Shared File | This Plan | Enterprise Config Plan | Offline SLM Plan |
3884
- |-------------|-----------|----------------------|-----------------|
3885
- | `bin/ai-toolkit.js` | +15 LOC (ui command) | +40 LOC (config subcommands) | +10 LOC (compile-slm command) |
3886
-
3887
- **If Enterprise Config ships first:** Dashboard Config page (2.6) should display `.ai-toolkit.json` / `extends` status and `config diff` output. Add an API endpoint `GET /api/config/extends` reading resolved extends state from `state.json`.
3888
-
3889
- **If Offline SLM ships first:** Dashboard Overview page (2.1) should display `offline-slm` profile status and link to compiled output. Stats page may show limited data (SLM providers don't emit hook-based stats).
3890
-
3891
- ---
3892
-
3893
- **Last Updated:** 2026-04-10
3894
-
3895
- ---
3896
-
3897
3116
  ## kb/procedures/maintenance-sop.md
3898
3117
 
3899
3118
  ---
@@ -3941,7 +3160,7 @@ ai-toolkit install --local --lang python,typescript
3941
3160
  ai-toolkit install --local --lang python --editors all # language rules propagated to all editors
3942
3161
  ```
3943
3162
 
3944
- When `--editors` is combined with `--lang` (or auto-detected languages), language rules are propagated to all configured editors as `ai-toolkit-lang-<lang>` files — not just Claude's `CLAUDE.md`. Similarly, registered custom rules (`~/.ai-toolkit/rules/`) are propagated to directory-based editor configs as `ai-toolkit-custom-<name>` files.
3163
+ When `--editors` is combined with `--lang` (or auto-detected languages), language rules are propagated to all configured editors as `ai-toolkit-lang-<lang>` files — not just Claude's `CLAUDE.md`. Similarly, registered custom rules (`~/.softspark/ai-toolkit/rules/`) are propagated to directory-based editor configs as `ai-toolkit-custom-<name>` files.
3945
3164
 
3946
3165
  **Note:** Hooks are global-only — merged into `~/.claude/settings.json` by `ai-toolkit install`. Project-local `--local` does not install hooks; any legacy `.claude/hooks.json` is removed automatically.
3947
3166
 
@@ -4019,7 +3238,7 @@ Third-party repos (jira-mcp, rag-mcp, etc.) can register their own rules globall
4019
3238
 
4020
3239
  ```bash
4021
3240
  ai-toolkit add-rule ./my-project-rules.md
4022
- # → copies to ~/.ai-toolkit/rules/my-project-rules.md
3241
+ # → copies to ~/.softspark/ai-toolkit/rules/my-project-rules.md
4023
3242
 
4024
3243
  ai-toolkit update
4025
3244
  # → injects the rule into ~/.claude/CLAUDE.md and all global editor configs
@@ -4107,7 +3326,7 @@ Install copies hooks/scripts, verifies agents+skills are linked, merges hooks in
4107
3326
 
4108
3327
  Memory-pack auto-prunes observations older than 90 days on every session end (configurable via `MEMORY_RETENTION_DAYS`).
4109
3328
 
4110
- State tracked in `~/.ai-toolkit/plugins.json`.
3329
+ State tracked in `~/.softspark/ai-toolkit/plugins.json`.
4111
3330
 
4112
3331
  ## Adding a KB Document
4113
3332
 
@@ -5194,7 +4413,7 @@ ai-toolkit/
5194
4413
  agents/ # Agent definitions (.md + YAML frontmatter)
5195
4414
  skills/ # skills: task, hybrid, knowledge
5196
4415
  rules/ # Rules auto-injected into ~/.claude/CLAUDE.md
5197
- hooks/ # Hook scripts (copied to ~/.ai-toolkit/hooks/)
4416
+ hooks/ # Hook scripts (copied to ~/.softspark/ai-toolkit/hooks/)
5198
4417
  hooks.json # Hook definitions (merged into ~/.claude/settings.json)
5199
4418
  constitution.md # Immutable safety rules, 5 articles (marker-injected)
5200
4419
  ARCHITECTURE.md # System architecture reference (marker-injected)
@@ -5241,7 +4460,7 @@ All components use merge-friendly strategies — user content is never overwritt
5241
4460
  ```
5242
4461
  Machine (global) Project (local)
5243
4462
  ────────────────────────────────────────── ──────────────────────────────────────
5244
- ~/.claude/ ~/.ai-toolkit/
4463
+ ~/.claude/ ~/.softspark/ai-toolkit/
5245
4464
  agents/*.md → per-file symlinks rules/ ← registered rules
5246
4465
  skills/*/ → per-dir symlinks hooks/ ← hook scripts (copied)
5247
4466
  settings.json ← hooks merged here
@@ -5281,8 +4500,8 @@ Each editor gets directory-based format (`.cursor/rules/*.mdc`, `.windsurf/rules
5281
4500
  | `update` | `~/.claude/` | Re-apply after npm update or after add-rule/remove-rule |
5282
4501
  | `update --local` | `./` | Re-apply + refresh project-local configs |
5283
4502
  | `uninstall` | `~/.claude/` | Strips toolkit components (preserves user content) |
5284
- | `add-rule <file>` | `~/.ai-toolkit/rules/` | Register rule — auto-applied on every `update` |
5285
- | `remove-rule <name>` | `~/.ai-toolkit/rules/` + `~/.claude/CLAUDE.md` | Unregister rule and remove its block |
4503
+ | `add-rule <file>` | `~/.softspark/ai-toolkit/rules/` | Register rule — auto-applied on every `update` |
4504
+ | `remove-rule <name>` | `~/.softspark/ai-toolkit/rules/` + `~/.claude/CLAUDE.md` | Unregister rule and remove its block |
5286
4505
  | `validate` | toolkit | Integrity check |
5287
4506
  | `doctor` | toolkit | Install health, hooks, benchmark freshness, and artifact drift diagnostics |
5288
4507
  | `benchmark-ecosystem` | toolkit | Benchmark snapshot for official Claude Code and external ecosystem repos |
@@ -5412,7 +4631,7 @@ Agents (code-reviewer, debugger, devops-implementer, ...)
5412
4631
  | PreCompact | Before compaction | `pre-compact-save.sh` | Timestamped context snapshot to audit trail |
5413
4632
  | SessionEnd | Session end | `session-end.sh` | Persist handoff note for the next session |
5414
4633
 
5415
- Scripts at `~/.ai-toolkit/hooks/`. See [hooks-catalog.md](hooks-catalog.md) for details.
4634
+ Scripts at `~/.softspark/ai-toolkit/hooks/`. See [hooks-catalog.md](hooks-catalog.md) for details.
5416
4635
 
5417
4636
  ## Constitution (5 Articles)
5418
4637
 
@@ -5531,7 +4750,7 @@ affaan-m/everything-claude-code 152 397 2
5531
4750
 
5532
4751
  ## Data Sources
5533
4752
 
5534
- - User config: `~/.claude/agents/`, `~/.claude/skills/`, `~/.ai-toolkit/hooks/`
4753
+ - User config: `~/.claude/agents/`, `~/.claude/skills/`, `~/.softspark/ai-toolkit/hooks/`
5535
4754
  - Toolkit: `app/agents/`, `app/skills/`, `app/hooks/`
5536
4755
  - Ecosystem: `benchmarks/ecosystem-dashboard.json`
5537
4756
 
@@ -6151,7 +5370,7 @@ All entries are tagged with "_source": "<source-name>" for idempotent updates.
6151
5370
  | `remove-rule <name>` | `~/.claude/CLAUDE.md` | Strip markers | Yes |
6152
5371
  | `inject-hook <file.json>` | `~/.claude/settings.json` | JSON `_source` tag | Yes |
6153
5372
  | `remove-hook <name>` | `~/.claude/settings.json` | Strip by `_source` | Yes |
6154
- | `add-rule <file.md>` | `~/.ai-toolkit/rules/` | File copy + re-inject all | Yes |
5373
+ | `add-rule <file.md>` | `~/.softspark/ai-toolkit/rules/` | File copy + re-inject all | Yes |
6155
5374
 
6156
5375
  **Success Criteria:**
6157
5376
  - [x] `inject-hook ./my-hooks.json` merges hooks with auto-derived `_source` tag
@@ -6230,7 +5449,7 @@ All entries are tagged with "_source": "<source-name>" for idempotent updates.
6230
5449
  }
6231
5450
  ```
6232
5451
 
6233
- **State tracking (~/.ai-toolkit/state.json):**
5452
+ **State tracking (~/.softspark/ai-toolkit/state.json):**
6234
5453
  ```json
6235
5454
  {
6236
5455
  "installed_version": "1.2.1",
@@ -6571,7 +5790,7 @@ description: "Comprehensive guide for setting up and using ai-toolkit configurat
6571
5790
 
6572
5791
  ## Overview
6573
5792
 
6574
- Configuration inheritance enables organizations to define a shared base config published as an npm package, Git URL, or local path. Individual projects extend this base via an `extends` field in `.ai-toolkit.json`. Changes to the base propagate automatically on `ai-toolkit update --local`.
5793
+ Configuration inheritance enables organizations to define a shared base config published as an npm package, Git URL, or local path. Individual projects extend this base via an `extends` field in `.softspark-toolkit.json`. Changes to the base propagate automatically on `ai-toolkit update --local`.
6575
5794
 
6576
5795
  **Pattern:** Mirrors ESLint's `extends`, TypeScript's `extends`, and Prettier's shared configs.
6577
5796
 
@@ -6600,7 +5819,7 @@ ai-toolkit config init --extends @mycompany/ai-toolkit-config
6600
5819
  ai-toolkit install --local
6601
5820
  ```
6602
5821
 
6603
- Or manually create `.ai-toolkit.json`:
5822
+ Or manually create `.softspark-toolkit.json`:
6604
5823
 
6605
5824
  ```json
6606
5825
  {
@@ -6624,7 +5843,7 @@ ai-toolkit config check # CI enforcement check
6624
5843
 
6625
5844
  ## Configuration Reference
6626
5845
 
6627
- ### Project config (`.ai-toolkit.json`)
5846
+ ### Project config (`.softspark-toolkit.json`)
6628
5847
 
6629
5848
  | Field | Type | Description |
6630
5849
  |-------|------|-------------|
@@ -6748,7 +5967,7 @@ Requirements:
6748
5967
 
6749
5968
  ### `ai-toolkit config validate [path]`
6750
5969
 
6751
- Validates `.ai-toolkit.json` schema, resolves extends, checks enforcement.
5970
+ Validates `.softspark-toolkit.json` schema, resolves extends, checks enforcement.
6752
5971
 
6753
5972
  ```bash
6754
5973
  ai-toolkit config validate
@@ -6773,7 +5992,7 @@ ai-toolkit config diff
6773
5992
 
6774
5993
  ### `ai-toolkit config init [flags]`
6775
5994
 
6776
- Create `.ai-toolkit.json` interactively or with flags.
5995
+ Create `.softspark-toolkit.json` interactively or with flags.
6777
5996
 
6778
5997
  ```bash
6779
5998
  ai-toolkit config init # interactive
@@ -6814,12 +6033,12 @@ GitHub Actions example:
6814
6033
 
6815
6034
  ## Lock File
6816
6035
 
6817
- `.ai-toolkit.lock.json` pins exact resolved versions for reproducible installs.
6036
+ `.softspark-toolkit.lock.json` pins exact resolved versions for reproducible installs.
6818
6037
 
6819
6038
  - `install --local` → creates/updates lock file
6820
6039
  - `update --local` → re-resolves and updates lock file
6821
6040
  - `update --local --refresh-base` → force re-fetch ignoring cache
6822
- - Commit `.ai-toolkit.lock.json` to git for team synchronization
6041
+ - Commit `.softspark-toolkit.lock.json` to git for team synchronization
6823
6042
 
6824
6043
  ```json
6825
6044
  {
@@ -6828,7 +6047,7 @@ GitHub Actions example:
6828
6047
  "@mycompany/ai-toolkit-config": {
6829
6048
  "version": "2.1.0",
6830
6049
  "integrity": "sha256:abc123...",
6831
- "cached": "~/.ai-toolkit/config-cache/@mycompany/ai-toolkit-config/2.1.0/"
6050
+ "cached": "~/.softspark/ai-toolkit/config-cache/@mycompany/ai-toolkit-config/2.1.0/"
6832
6051
  }
6833
6052
  }
6834
6053
  }
@@ -6840,7 +6059,7 @@ GitHub Actions example:
6840
6059
 
6841
6060
  When npm/git is unavailable:
6842
6061
 
6843
- 1. Checks cache (`~/.ai-toolkit/config-cache/`)
6062
+ 1. Checks cache (`~/.softspark/ai-toolkit/config-cache/`)
6844
6063
  2. If cached version found → uses with warning
6845
6064
  3. If not cached → error with instructions
6846
6065
 
@@ -6912,7 +6131,7 @@ This design is intentional: ai-toolkit is a generic toolkit. Consumers (MCP serv
6912
6131
  | `remove-rule <name>` | `~/.claude/CLAUDE.md` | Strip markers by block name | Yes |
6913
6132
  | `inject-hook <file.json>` | `~/.claude/settings.json` | JSON `_source` tag per entry | Yes |
6914
6133
  | `remove-hook <name>` | `~/.claude/settings.json` | Strip all entries with matching `_source` | Yes |
6915
- | `add-rule <file.md>` | `~/.ai-toolkit/rules/` | File copy + re-inject all rules on next `update` | Yes |
6134
+ | `add-rule <file.md>` | `~/.softspark/ai-toolkit/rules/` | File copy + re-inject all rules on next `update` | Yes |
6916
6135
  | `mcp add <name...>` | `.mcp.json` | Merge `mcpServers` block from template | Yes |
6917
6136
 
6918
6137
  ## inject-rule
@@ -7094,8 +6313,8 @@ That means one machine-level install provides agents, skills, hooks, and rules t
7094
6313
  | `ai-toolkit install --local --lang <lang>` | current project | explicit language selection for rules (e.g. `--lang typescript`, `--lang go,python`); auto-detected when omitted |
7095
6314
  | `ai-toolkit install --modules <list>` | `~/.claude/` | selective module install (e.g. `--modules core,agents,rules-typescript`) |
7096
6315
  | `ai-toolkit update --local` | current project | refresh project configs; auto-detects editors from existing files |
7097
- | `ai-toolkit add-rule` | `~/.ai-toolkit/rules/` | register a global rule |
7098
- | `ai-toolkit remove-rule` | `~/.ai-toolkit/rules/` | unregister a global rule |
6316
+ | `ai-toolkit add-rule` | `~/.softspark/ai-toolkit/rules/` | register a global rule |
6317
+ | `ai-toolkit remove-rule` | `~/.softspark/ai-toolkit/rules/` | unregister a global rule |
7099
6318
 
7100
6319
  ## Why global install is the default
7101
6320
 
@@ -7350,17 +6569,17 @@ description: "Complete reference of all ai-toolkit hooks: events, scripts, insta
7350
6569
 
7351
6570
  ## Overview
7352
6571
 
7353
- ai-toolkit provides 21 global hook entries across 12 lifecycle events that enforce quality, safety, and workflow rules across all Claude Code sessions. Hooks are merged into `~/.claude/settings.json` on install, with logic in standalone scripts at `~/.ai-toolkit/hooks/`.
6572
+ ai-toolkit provides 21 global hook entries across 12 lifecycle events that enforce quality, safety, and workflow rules across all Claude Code sessions. Hooks are merged into `~/.claude/settings.json` on install, with logic in standalone scripts at `~/.softspark/ai-toolkit/hooks/`.
7354
6573
 
7355
6574
  ## Installation
7356
6575
 
7357
6576
  ```bash
7358
- ai-toolkit install # copies scripts to ~/.ai-toolkit/hooks/, merges into settings.json
6577
+ ai-toolkit install # copies scripts to ~/.softspark/ai-toolkit/hooks/, merges into settings.json
7359
6578
  ai-toolkit update # re-copies scripts, re-merges (idempotent)
7360
6579
  ```
7361
6580
 
7362
6581
  **File locations:**
7363
- - Scripts: `~/.ai-toolkit/hooks/*.sh`
6582
+ - Scripts: `~/.softspark/ai-toolkit/hooks/*.sh`
7364
6583
  - Config: `~/.claude/settings.json` → `hooks` key
7365
6584
  - Source: `ai-toolkit/app/hooks/*.sh` + `app/hooks.json`
7366
6585
 
@@ -7372,7 +6591,7 @@ ai-toolkit update # re-copies scripts, re-merges (idempotent)
7372
6591
  |-------|-------|
7373
6592
  | Event | `SessionStart` |
7374
6593
  | Matcher | `startup\|compact` |
7375
- | Script | `~/.ai-toolkit/hooks/session-start.sh` |
6594
+ | Script | `~/.softspark/ai-toolkit/hooks/session-start.sh` |
7376
6595
  | Fires | Session start + after context compaction |
7377
6596
 
7378
6597
  **Actions:**
@@ -7387,7 +6606,7 @@ ai-toolkit update # re-copies scripts, re-merges (idempotent)
7387
6606
  |-------|-------|
7388
6607
  | Event | `Notification` |
7389
6608
  | Matcher | *(all)* |
7390
- | Script | `~/.ai-toolkit/hooks/notify-waiting.sh` |
6609
+ | Script | `~/.softspark/ai-toolkit/hooks/notify-waiting.sh` |
7391
6610
  | Fires | Claude Code waiting for user input |
7392
6611
 
7393
6612
  **Action:** Cross-platform desktop notification ("Claude Code needs your attention"):
@@ -7401,7 +6620,7 @@ ai-toolkit update # re-copies scripts, re-merges (idempotent)
7401
6620
  |-------|-------|
7402
6621
  | Event | `PreToolUse` |
7403
6622
  | Matcher | `Bash` |
7404
- | Script | `~/.ai-toolkit/hooks/guard-destructive.sh` |
6623
+ | Script | `~/.softspark/ai-toolkit/hooks/guard-destructive.sh` |
7405
6624
  | Fires | Before any Bash command |
7406
6625
 
7407
6626
  **Action:** Blocks (exit 2) commands matching destructive patterns:
@@ -7417,7 +6636,7 @@ ai-toolkit update # re-copies scripts, re-merges (idempotent)
7417
6636
  |-------|-------|
7418
6637
  | Event | `PreToolUse` |
7419
6638
  | Matcher | `Bash\|Read\|Edit\|Write\|MultiEdit\|Glob\|Grep\|NotebookEdit\|mcp__filesystem__.*` |
7420
- | Script | `~/.ai-toolkit/hooks/guard-path.sh` |
6639
+ | Script | `~/.softspark/ai-toolkit/hooks/guard-path.sh` |
7421
6640
  | Fires | Before any file access tool (including Bash, MCP filesystem) |
7422
6641
 
7423
6642
  **Action:** Blocks (exit 2) when a path contains `/Users/<wrong>` or `/home/<wrong>` that doesn't match the actual `$HOME`. Prevents Claude from hallucinating or confusing similar usernames (common with non-ASCII names like Polish names).
@@ -7430,7 +6649,7 @@ ai-toolkit update # re-copies scripts, re-merges (idempotent)
7430
6649
  |-------|-------|
7431
6650
  | Event | `UserPromptSubmit` |
7432
6651
  | Matcher | *(all)* |
7433
- | Script | `~/.ai-toolkit/hooks/user-prompt-submit.sh` |
6652
+ | Script | `~/.softspark/ai-toolkit/hooks/user-prompt-submit.sh` |
7434
6653
  | Fires | Before Claude starts working on a submitted prompt |
7435
6654
 
7436
6655
  **Action:** Adds a lightweight governance reminder: plan mode for architectural work, evidence-first debugging, KB-first research, and validation expectations.
@@ -7443,10 +6662,10 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
7443
6662
  |-------|-------|
7444
6663
  | Event | `UserPromptSubmit` |
7445
6664
  | Matcher | *(all)* |
7446
- | Script | `~/.ai-toolkit/hooks/track-usage.sh` |
6665
+ | Script | `~/.softspark/ai-toolkit/hooks/track-usage.sh` |
7447
6666
  | Fires | Before Claude starts working on a submitted prompt |
7448
6667
 
7449
- **Action:** Records skill invocations (slash commands like `/commit`, `/review`) to `~/.ai-toolkit/stats.json` for local usage analytics. Non-slash prompts are ignored.
6668
+ **Action:** Records skill invocations (slash commands like `/commit`, `/review`) to `~/.softspark/ai-toolkit/stats.json` for local usage analytics. Non-slash prompts are ignored.
7450
6669
 
7451
6670
  ### PostToolUse (edit feedback) — `post-tool-use.sh`
7452
6671
 
@@ -7454,7 +6673,7 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
7454
6673
  |-------|-------|
7455
6674
  | Event | `PostToolUse` |
7456
6675
  | Matcher | `Edit\|MultiEdit\|Write` |
7457
- | Script | `~/.ai-toolkit/hooks/post-tool-use.sh` |
6676
+ | Script | `~/.softspark/ai-toolkit/hooks/post-tool-use.sh` |
7458
6677
  | Fires | After file edit/write tool operations |
7459
6678
 
7460
6679
  **Action:** Adds a lightweight reminder to run relevant validation, tests, and documentation updates after edits.
@@ -7467,7 +6686,7 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
7467
6686
  |-------|-------|
7468
6687
  | Event | `Stop` |
7469
6688
  | Matcher | *(all)* |
7470
- | Script | `~/.ai-toolkit/hooks/quality-check.sh` |
6689
+ | Script | `~/.softspark/ai-toolkit/hooks/quality-check.sh` |
7471
6690
  | Fires | After every Claude response |
7472
6691
 
7473
6692
  **Action:** Runs language-appropriate linter:
@@ -7485,7 +6704,7 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
7485
6704
  |-------|-------|
7486
6705
  | Event | `Stop` |
7487
6706
  | Matcher | *(all)* |
7488
- | Script | `~/.ai-toolkit/hooks/save-session.sh` |
6707
+ | Script | `~/.softspark/ai-toolkit/hooks/save-session.sh` |
7489
6708
  | Fires | After every Claude response |
7490
6709
 
7491
6710
  **Action:** Writes enriched session context to `.claude/session-context.md` for cross-session persistence. Captures:
@@ -7501,7 +6720,7 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
7501
6720
  |-------|-------|
7502
6721
  | Event | `TaskCompleted` |
7503
6722
  | Matcher | *(all)* |
7504
- | Script | `~/.ai-toolkit/hooks/quality-gate.sh` |
6723
+ | Script | `~/.softspark/ai-toolkit/hooks/quality-gate.sh` |
7505
6724
  | Fires | When an Agent Teams task is marked complete |
7506
6725
 
7507
6726
  **Action:** Runs lint/typecheck. **Blocks completion (exit 2)** if errors found. Strict profile also runs `mypy --strict`.
@@ -7514,7 +6733,7 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
7514
6733
  |-------|-------|
7515
6734
  | Event | `SubagentStart` |
7516
6735
  | Matcher | *(all)* |
7517
- | Script | `~/.ai-toolkit/hooks/subagent-start.sh` |
6736
+ | Script | `~/.softspark/ai-toolkit/hooks/subagent-start.sh` |
7518
6737
  | Fires | When a subagent is spawned |
7519
6738
 
7520
6739
  **Action:** Reminds subagents to stay narrow in scope, gather evidence first, and return explicit validation notes.
@@ -7527,7 +6746,7 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
7527
6746
  |-------|-------|
7528
6747
  | Event | `SubagentStop` |
7529
6748
  | Matcher | *(all)* |
7530
- | Script | `~/.ai-toolkit/hooks/subagent-stop.sh` |
6749
+ | Script | `~/.softspark/ai-toolkit/hooks/subagent-stop.sh` |
7531
6750
  | Fires | When a subagent completes |
7532
6751
 
7533
6752
  **Action:** Enforces a concise handoff checklist: findings, files touched, tests run, risks, and docs follow-up.
@@ -7540,7 +6759,7 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
7540
6759
  |-------|-------|
7541
6760
  | Event | `PreCompact` |
7542
6761
  | Matcher | *(all)* |
7543
- | Script | `~/.ai-toolkit/hooks/pre-compact.sh` |
6762
+ | Script | `~/.softspark/ai-toolkit/hooks/pre-compact.sh` |
7544
6763
  | Fires | Before context compaction |
7545
6764
 
7546
6765
  **Actions (prioritized — higher priority items survive tighter token budgets):**
@@ -7558,7 +6777,7 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
7558
6777
  |-------|-------|
7559
6778
  | Event | `SessionEnd` |
7560
6779
  | Matcher | *(all)* |
7561
- | Script | `~/.ai-toolkit/hooks/session-end.sh` |
6780
+ | Script | `~/.softspark/ai-toolkit/hooks/session-end.sh` |
7562
6781
  | Fires | When a Claude session ends |
7563
6782
 
7564
6783
  **Action:** Writes `.claude/session-end.md` with a lightweight handoff note for the next session and reminds the next session to review preserved context.
@@ -7585,7 +6804,7 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
7585
6804
  |-------|-------|
7586
6805
  | Event | `PreToolUse` |
7587
6806
  | Matcher | `Edit\|Write\|MultiEdit` |
7588
- | Script | `~/.ai-toolkit/hooks/guard-config.sh` |
6807
+ | Script | `~/.softspark/ai-toolkit/hooks/guard-config.sh` |
7589
6808
  | Fires | Before any file write/edit operation |
7590
6809
 
7591
6810
  **Action:** Blocks (exit 2) edits to linter and formatter config files — `.eslintrc`, `.eslintrc.*`, `eslint.config.*`, `.prettierrc`, `.prettierrc.*`, `prettier.config.*`, `tsconfig.json`, `tsconfig.*.json` — unless the request contains an explicit acknowledgment phrase (e.g. "intentionally editing config"). Returns a human-readable explanation to Claude so it can ask the user for confirmation before retrying.
@@ -7596,7 +6815,7 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
7596
6815
  |-------|-------|
7597
6816
  | Event | `SessionStart` |
7598
6817
  | Matcher | *(all)* |
7599
- | Script | `~/.ai-toolkit/hooks/mcp-health.sh` |
6818
+ | Script | `~/.softspark/ai-toolkit/hooks/mcp-health.sh` |
7600
6819
  | Fires | Session start |
7601
6820
 
7602
6821
  **Action:** Non-blocking (always exits 0). Reads MCP server definitions from `~/.claude/settings.json` and any local `.mcp.json`. For each configured server, checks whether the required runtime command (`npx`, `uvx`, `docker`, etc.) is available in `$PATH`. Emits warnings for any missing runtimes, including install hints (e.g. "npm install -g npx"). Helps surface MCP misconfiguration early without interrupting the session.
@@ -7607,10 +6826,10 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
7607
6826
  |-------|-------|
7608
6827
  | Event | `PostToolUse` |
7609
6828
  | Matcher | *(all)* |
7610
- | Script | `~/.ai-toolkit/hooks/governance-capture.sh` |
6829
+ | Script | `~/.softspark/ai-toolkit/hooks/governance-capture.sh` |
7611
6830
  | Fires | After any tool use |
7612
6831
 
7613
- **Action:** Non-blocking (always exits 0). Logs security-sensitive operations (Bash commands, file writes to sensitive paths, large writes) to `~/.ai-toolkit/governance.log` with ISO timestamp, session ID, tool name, and a content excerpt. Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
6832
+ **Action:** Non-blocking (always exits 0). Logs security-sensitive operations (Bash commands, file writes to sensitive paths, large writes) to `~/.softspark/ai-toolkit/governance.log` with ISO timestamp, session ID, tool name, and a content excerpt. Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
7614
6833
 
7615
6834
  ### PreCompact — `pre-compact-save.sh`
7616
6835
 
@@ -7618,10 +6837,10 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
7618
6837
  |-------|-------|
7619
6838
  | Event | `PreCompact` |
7620
6839
  | Matcher | *(all)* |
7621
- | Script | `~/.ai-toolkit/hooks/pre-compact-save.sh` |
6840
+ | Script | `~/.softspark/ai-toolkit/hooks/pre-compact-save.sh` |
7622
6841
  | Fires | Before context compaction |
7623
6842
 
7624
- **Action:** Saves a timestamped context snapshot to `~/.ai-toolkit/compactions/YYYY-MM-DD_HH-MM-SS.txt`. Captures session ID, working directory, git branch and status, and environment metadata. Provides an audit trail of what was in context at each compaction point. Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
6843
+ **Action:** Saves a timestamped context snapshot to `~/.softspark/ai-toolkit/compactions/YYYY-MM-DD_HH-MM-SS.txt`. Captures session ID, working directory, git branch and status, and environment metadata. Provides an audit trail of what was in context at each compaction point. Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
7625
6844
 
7626
6845
  ### PreToolUse (commit quality) — `commit-quality.sh`
7627
6846
 
@@ -7629,7 +6848,7 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
7629
6848
  |-------|-------|
7630
6849
  | Event | `PreToolUse` |
7631
6850
  | Matcher | `Bash` |
7632
- | Script | `~/.ai-toolkit/hooks/commit-quality.sh` |
6851
+ | Script | `~/.softspark/ai-toolkit/hooks/commit-quality.sh` |
7633
6852
  | Fires | Before any Bash command |
7634
6853
 
7635
6854
  **Action:** Non-blocking (always exits 0). Inspects Bash commands containing `git commit`. Extracts the commit message from the `-m` flag and checks it against Conventional Commits format (`type: description`, where type is one of feat/fix/docs/refactor/test/chore/ci/perf/style/revert). Emits an advisory warning if the message does not match — the commit is not blocked, only nudged. Commands without `git commit` or without a `-m` message (e.g. interactive commits) are ignored.
@@ -7640,10 +6859,10 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
7640
6859
  |-------|-------|
7641
6860
  | Event | `SessionStart` |
7642
6861
  | Matcher | *(all)* |
7643
- | Script | `~/.ai-toolkit/hooks/session-context.sh` |
6862
+ | Script | `~/.softspark/ai-toolkit/hooks/session-context.sh` |
7644
6863
  | Fires | Session start |
7645
6864
 
7646
- **Action:** Captures an environment snapshot to `~/.ai-toolkit/sessions/current-context.json`. Records working directory, git branch, git status summary, Node.js version, Python version, and timestamp. Used by other hooks and tools to access session metadata without re-running discovery commands. Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
6865
+ **Action:** Captures an environment snapshot to `~/.softspark/ai-toolkit/sessions/current-context.json`. Records working directory, git branch, git status summary, Node.js version, Python version, and timestamp. Used by other hooks and tools to access session metadata without re-running discovery commands. Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
7647
6866
 
7648
6867
  ## Runtime Profiles
7649
6868
 
@@ -7662,7 +6881,7 @@ Set in `.claude/settings.local.json`:
7662
6881
  ## Architecture
7663
6882
 
7664
6883
  ```
7665
- ~/.ai-toolkit/
6884
+ ~/.softspark/ai-toolkit/
7666
6885
  ├── rules/ # Registered rules (add-rule.sh)
7667
6886
  └── hooks/ # Hook scripts (copied on install)
7668
6887
  ├── _profile-check.sh # Shared: profile skip logic (sourced by hooks)
@@ -7687,7 +6906,7 @@ Set in `.claude/settings.local.json`:
7687
6906
  └── session-end.sh
7688
6907
 
7689
6908
  ~/.claude/settings.json
7690
- └── hooks: # Hook definitions referencing ~/.ai-toolkit/hooks/
6909
+ └── hooks: # Hook definitions referencing ~/.softspark/ai-toolkit/hooks/
7691
6910
  ├── SessionStart → session-start.sh, mcp-health.sh, session-context.sh
7692
6911
  ├── Notification → osascript (inline)
7693
6912
  ├── PreToolUse → guard-destructive.sh, guard-path.sh, guard-config.sh, commit-quality.sh
@@ -7717,7 +6936,7 @@ Set in `.claude/settings.local.json`:
7717
6936
 
7718
6937
  **Hook script not found:**
7719
6938
  ```bash
7720
- ls ~/.ai-toolkit/hooks/ # should list 21 .sh files (plus _profile-check.sh helper)
6939
+ ls ~/.softspark/ai-toolkit/hooks/ # should list 21 .sh files (plus _profile-check.sh helper)
7721
6940
  ai-toolkit update # re-copies scripts
7722
6941
  ```
7723
6942
 
@@ -7758,9 +6977,9 @@ ai-toolkit add-rule ./jira-rules.md
7758
6977
  ai-toolkit update # inject now
7759
6978
  ```
7760
6979
 
7761
- After registration, `ai-toolkit update` will always re-inject the rule. Registry location: `~/.ai-toolkit/rules/`.
6980
+ After registration, `ai-toolkit update` will always re-inject the rule. Registry location: `~/.softspark/ai-toolkit/rules/`.
7762
6981
 
7763
- To unregister a rule (removes from `~/.ai-toolkit/rules/` and strips the block from `CLAUDE.md`):
6982
+ To unregister a rule (removes from `~/.softspark/ai-toolkit/rules/` and strips the block from `CLAUDE.md`):
7764
6983
 
7765
6984
  ```bash
7766
6985
  ai-toolkit remove-rule jira-rules
@@ -7788,7 +7007,7 @@ Content outside markers is never touched. Re-running updates only the marked blo
7788
7007
 
7789
7008
  1. Create `<name>-rules.md` in your repo with Claude-relevant conventions
7790
7009
  2. Register it: `ai-toolkit add-rule ./<name>-rules.md`
7791
- 3. Verify it appears in: `~/.ai-toolkit/rules/<name>-rules.md`
7010
+ 3. Verify it appears in: `~/.softspark/ai-toolkit/rules/<name>-rules.md`
7792
7011
  4. On next `install` it will be listed in: `Rules injected: ... <name>-rules`
7793
7012
  5. Add an entry below documenting the integration
7794
7013
 
@@ -8075,7 +7294,7 @@ tags: [install, manifest, modules, profiles, auto-detect, state-tracking]
8075
7294
  version: "1.0.0"
8076
7295
  created: "2026-04-07"
8077
7296
  last_updated: "2026-04-07"
8078
- description: "Reference for the manifest-driven install system: 17 modules, 4 profiles, auto-detection, and state tracking in ~/.ai-toolkit/state.json."
7297
+ description: "Reference for the manifest-driven install system: 17 modules, 4 profiles, auto-detection, and state tracking in ~/.softspark/ai-toolkit/state.json."
8079
7298
  ---
8080
7299
 
8081
7300
  # Manifest-Driven Install System
@@ -8176,7 +7395,7 @@ Lists all currently installed modules with version and install timestamp:
8176
7395
 
8177
7396
  ```bash
8178
7397
  ai-toolkit status
8179
- # Installed modules (from ~/.ai-toolkit/state.json):
7398
+ # Installed modules (from ~/.softspark/ai-toolkit/state.json):
8180
7399
  # core v1.3.0 installed 2026-04-07T10:00:00Z
8181
7400
  # agents v1.3.0 installed 2026-04-07T10:00:00Z
8182
7401
  # skills v1.3.0 installed 2026-04-07T10:00:00Z
@@ -8190,7 +7409,7 @@ Re-applies installed modules, skipping files whose content hash has not changed
8190
7409
 
8191
7410
  ## State Tracking
8192
7411
 
8193
- Installed module state is persisted to `~/.ai-toolkit/state.json`:
7412
+ Installed module state is persisted to `~/.softspark/ai-toolkit/state.json`:
8194
7413
 
8195
7414
  ```json
8196
7415
  {
@@ -8214,7 +7433,7 @@ Installed module state is persisted to `~/.ai-toolkit/state.json`:
8214
7433
  |------|---------|
8215
7434
  | `manifest.json` | Module and profile definitions |
8216
7435
  | `scripts/install_steps/detect_language.py` | Auto-detect project language from marker files |
8217
- | `scripts/install_steps/install_state.py` | Read/write `~/.ai-toolkit/state.json` |
7436
+ | `scripts/install_steps/install_state.py` | Read/write `~/.softspark/ai-toolkit/state.json` |
8218
7437
 
8219
7438
  ## Backward Compatibility
8220
7439
 
@@ -8504,11 +7723,11 @@ ai-toolkit plugin status # show installed packs with data stats
8504
7723
  ### What `plugin install` Does
8505
7724
 
8506
7725
  1. **Verifies** referenced agents/skills exist in `~/.claude/` (links them from core if missing)
8507
- 2. **Copies** plugin-specific hooks to `~/.ai-toolkit/hooks/plugin-<pack>-<hook>.sh`
8508
- 3. **Copies** plugin-specific scripts to `~/.ai-toolkit/plugin-scripts/<pack>/`
7726
+ 2. **Copies** plugin-specific hooks to `~/.softspark/ai-toolkit/hooks/plugin-<pack>-<hook>.sh`
7727
+ 3. **Copies** plugin-specific scripts to `~/.softspark/ai-toolkit/plugin-scripts/<pack>/`
8509
7728
  4. **Runs** init scripts if present (e.g. `init_db.py` for memory-pack — safe to re-run, preserves data)
8510
7729
  5. **Merges** plugin hooks into `~/.claude/settings.json` (tagged with `_source: ai-toolkit-plugin-<name>`)
8511
- 6. **Records** installed state to `~/.ai-toolkit/plugins.json`
7730
+ 6. **Records** installed state to `~/.softspark/ai-toolkit/plugins.json`
8512
7731
 
8513
7732
  ### What `plugin update` Does
8514
7733
 
@@ -8525,8 +7744,8 @@ ai-toolkit plugin status # show installed packs with data stats
8525
7744
 
8526
7745
  ### What `plugin remove` Does
8527
7746
 
8528
- 1. **Removes** plugin hooks from `~/.ai-toolkit/hooks/`
8529
- 2. **Removes** plugin scripts from `~/.ai-toolkit/plugin-scripts/`
7747
+ 1. **Removes** plugin hooks from `~/.softspark/ai-toolkit/hooks/`
7748
+ 2. **Removes** plugin scripts from `~/.softspark/ai-toolkit/plugin-scripts/`
8530
7749
  3. **Strips** plugin hook entries from `settings.json` (by `_source` tag)
8531
7750
  4. **Updates** `plugins.json` state
8532
7751
  5. **Leaves** core agents/skills untouched (they belong to the base install)
@@ -9082,7 +8301,7 @@ description: "Local usage tracking for skill invocations. CLI command, JSON form
9082
8301
 
9083
8302
  ## Overview
9084
8303
 
9085
- `ai-toolkit stats` tracks how often each skill is invoked via slash commands. All data is local — stored in `~/.ai-toolkit/stats.json`. No telemetry, no network calls.
8304
+ `ai-toolkit stats` tracks how often each skill is invoked via slash commands. All data is local — stored in `~/.softspark/ai-toolkit/stats.json`. No telemetry, no network calls.
9086
8305
 
9087
8306
  ## CLI Commands
9088
8307
 
@@ -9098,7 +8317,7 @@ A `UserPromptSubmit` hook (`track-usage.sh`) fires on every prompt. When the pro
9098
8317
 
9099
8318
  ### Hook Details
9100
8319
  - **Event**: `UserPromptSubmit`
9101
- - **Script**: `~/.ai-toolkit/hooks/track-usage.sh`
8320
+ - **Script**: `~/.softspark/ai-toolkit/hooks/track-usage.sh`
9102
8321
  - **Detection**: `grep -oE '^/[a-z][a-z0-9-]*'`
9103
8322
  - **Storage**: Atomic write via python3 `os.replace()`
9104
8323
  - **Overhead**: ~50ms (python3 startup + JSON read/write)
@@ -9133,7 +8352,7 @@ debug 8 2026-03-27 16:45:00
9133
8352
  Total invocations: 65
9134
8353
  Unique skills: 3
9135
8354
 
9136
- File: ~/.ai-toolkit/stats.json
8355
+ File: ~/.softspark/ai-toolkit/stats.json
9137
8356
  Reset: ai-toolkit stats --reset
9138
8357
  ```
9139
8358
 
@@ -9171,8 +8390,8 @@ ai-toolkit sync --import <file|url> # Import from file or URL
9171
8390
 
9172
8391
  | Data | Included | Source |
9173
8392
  |------|----------|--------|
9174
- | Custom rules | Yes | `~/.ai-toolkit/rules/*.md` |
9175
- | Usage stats | Yes | `~/.ai-toolkit/stats.json` |
8393
+ | Custom rules | Yes | `~/.softspark/ai-toolkit/rules/*.md` |
8394
+ | Usage stats | Yes | `~/.softspark/ai-toolkit/stats.json` |
9176
8395
  | Toolkit version | Yes (metadata) | `package.json` |
9177
8396
  | Agents/skills | No | Installed via `npm` |
9178
8397
  | Hooks | No | Installed via `ai-toolkit install` |
@@ -9182,7 +8401,7 @@ ai-toolkit sync --import <file|url> # Import from file or URL
9182
8401
  ### First machine (export)
9183
8402
  ```bash
9184
8403
  ai-toolkit sync --push
9185
- # Creates secret Gist, saves ID to ~/.ai-toolkit/.gist-id
8404
+ # Creates secret Gist, saves ID to ~/.softspark/ai-toolkit/.gist-id
9186
8405
  ```
9187
8406
 
9188
8407
  ### Second machine (import)