@softspark/ai-toolkit 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,17 @@ Versioning follows [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ---
9
9
 
10
+ ## v1.3.2 — Patch (2026-04-07)
11
+
12
+ ### Fixed
13
+ - **Orphaned symlinks**: `install` and `update` now auto-clean broken agent/skill symlinks when components are removed or merged. Previously required manual `doctor --fix`.
14
+ - **`--auto-detect` without `--local`**: Now auto-adds `--local` with warning instead of scanning `$HOME` for language markers.
15
+ - **Session hooks concurrency**: `session-context.sh` writes per-session file (`${SESSION_ID}.json`) instead of single `current-context.json`. `pre-compact-save.sh` includes session ID in filename to avoid collisions.
16
+ - **Language rules injection**: `install --local` now actually injects detected language rules into project `.claude/CLAUDE.md` via `<!-- TOOLKIT:language-rules -->` markers.
17
+ - **`--local` implies `--auto-detect`**: No need to pass both flags — `install --local` automatically detects project language and installs matching rules.
18
+
19
+ ---
20
+
10
21
  ## v1.3.0 — Competitive Features Release (2026-04-07)
11
22
 
12
23
  ### Added
package/README.md CHANGED
@@ -474,12 +474,12 @@ Templates include: GitHub, PostgreSQL, Slack, Sentry, Context7, Brave Search, Su
474
474
  70 language-specific coding rules across 13 languages: TypeScript, Python, Go, Rust, Java, Kotlin, Swift, Dart, C#, PHP, C++, Ruby, plus 5 common rules. Each language has 5 rule categories: coding-style, testing, patterns, frameworks, security.
475
475
 
476
476
  ```bash
477
- ai-toolkit install --local --auto-detect # detect project language, install matching rules
477
+ ai-toolkit install --local # auto-detects project language, installs matching rules
478
478
  ai-toolkit install --local --lang typescript # explicit language selection
479
479
  ai-toolkit install --local --lang go,python # multiple languages
480
480
  ```
481
481
 
482
- Rules are injected into `CLAUDE.md` and auto-updated on `ai-toolkit update`.
482
+ `--local` automatically detects languages (via package.json, go.mod, Cargo.toml, etc.) — no need for `--auto-detect`. Rules are injected into `CLAUDE.md` and auto-updated on `ai-toolkit update --local`.
483
483
 
484
484
  ---
485
485
 
@@ -507,7 +507,7 @@ Module-level install granularity. Install only what you need:
507
507
 
508
508
  ```bash
509
509
  ai-toolkit install --modules core,agents,rules-typescript
510
- ai-toolkit install --auto-detect # detect project language and pick modules
510
+ ai-toolkit install --local # auto-detects language, installs matching rules
511
511
  ai-toolkit status # show installed modules and versions
512
512
  ai-toolkit update # incremental re-install (only changed modules)
513
513
  ```
@@ -732,7 +732,7 @@ ai-toolkit install --local # also set up project-local configs (CL
732
732
  ai-toolkit update --local # re-apply + refresh project-local configs
733
733
  ai-toolkit install --list # dry-run: show what would be applied
734
734
  ai-toolkit install --modules core,agents,rules-typescript # selective module install
735
- ai-toolkit install --auto-detect # detect project language and install matching rules
735
+ ai-toolkit install --local # auto-detects language, installs matching rules
736
736
  ai-toolkit install --lang typescript # explicit language for rules install
737
737
  ```
738
738
 
@@ -85,10 +85,10 @@ The `common/` directory uses the same structure except `frameworks.md` is replac
85
85
 
86
86
  ## Auto-Detection
87
87
 
88
- When `--auto-detect` is passed, `scripts/install_steps/detect_language.py` scans the current directory for known marker files and selects the matching language module:
88
+ `--local` automatically enables language auto-detection. `scripts/install_steps/detect_language.py` scans the current directory for known marker files and selects matching language modules:
89
89
 
90
90
  ```bash
91
- ai-toolkit install --local --auto-detect
91
+ ai-toolkit install --local # auto-detects language (--auto-detect is implied)
92
92
  ```
93
93
 
94
94
  Detection logic (first match wins when multiple markers are present):
@@ -110,14 +110,14 @@ Common rules are always injected regardless of detected language.
110
110
  ## Installation
111
111
 
112
112
  ```bash
113
- # Auto-detect language from project files
114
- ai-toolkit install --local --auto-detect
113
+ # Auto-detect language from project files (default with --local)
114
+ ai-toolkit install --local
115
115
 
116
116
  # Explicitly select a language
117
117
  ai-toolkit install --local --lang typescript
118
118
 
119
- # Install without language rules
120
- ai-toolkit install --local
119
+ # Skip auto-detect, install specific modules only
120
+ ai-toolkit install --local --modules core,agents
121
121
  ```
122
122
 
123
123
  Language rules are injected into the project `CLAUDE.md` between named markers:
@@ -61,8 +61,8 @@ ai-toolkit install --profile standard
61
61
  # Module-based install (new)
62
62
  ai-toolkit install --modules core,agents,rules-typescript
63
63
 
64
- # Auto-detect project language and install matching rules
65
- ai-toolkit install --local --auto-detect
64
+ # --local implies --auto-detect (language rules auto-detected)
65
+ ai-toolkit install --local
66
66
 
67
67
  # Show currently installed modules and their state
68
68
  ai-toolkit status
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softspark/ai-toolkit",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Professional-grade AI coding toolkit: 90 skills, 44 agents, multi-platform support (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment), machine-enforced safety constitution, persona presets, skill security auditor, expanded lifecycle hooks, 11 plugin packs, and benchmark tooling.",
5
5
  "keywords": [
6
6
  "claude",
@@ -409,11 +409,15 @@ def main() -> None:
409
409
  rules_dir = Path.home() / ".ai-toolkit" / "rules"
410
410
  hooks_scripts_dir = Path.home() / ".ai-toolkit" / "hooks"
411
411
 
412
- # Resolve modules if module-level flags are present
412
+ # --local always implies --auto-detect (why install locally without language rules?)
413
+ if local and not auto_detect and not modules_arg:
414
+ auto_detect = True
415
+
413
416
  # --auto-detect only makes sense with --local (language rules are project-specific)
414
417
  if auto_detect and not local:
415
418
  print("Warning: --auto-detect requires --local (language rules are project-specific). Adding --local.")
416
419
  local = True
420
+
417
421
  project_dir = Path.cwd() if local else target_dir
418
422
  resolved_modules = resolve_requested_modules(
419
423
  modules_arg, profile, auto_detect, project_dir,
@@ -36,7 +36,17 @@ def install_agents(claude_dir: Path, only: str, skip: str, dry_run: bool) -> Non
36
36
  continue
37
37
  target.symlink_to(agent_file)
38
38
  linked += 1
39
+
40
+ # Clean orphaned symlinks (agents removed from toolkit)
41
+ orphaned = 0
42
+ for target in sorted(agents_dst.glob("*.md")):
43
+ if target.is_symlink() and not target.resolve().exists():
44
+ target.unlink()
45
+ orphaned += 1
46
+
39
47
  print(f" Linked: .claude/agents/ ({linked} files)")
48
+ if orphaned > 0:
49
+ print(f" Cleaned: {orphaned} orphaned agent symlink(s)")
40
50
  if skipped > 0:
41
51
  print(f" Kept: {skipped} user agent(s) (name conflict)")
42
52
 
@@ -73,7 +83,17 @@ def install_skills(claude_dir: Path, only: str, skip: str, dry_run: bool) -> Non
73
83
  continue
74
84
  target.symlink_to(skill_dir)
75
85
  linked += 1
86
+
87
+ # Clean orphaned symlinks (skills removed from toolkit)
88
+ orphaned = 0
89
+ for target in sorted(skills_dst.iterdir()):
90
+ if target.is_symlink() and not target.resolve().exists():
91
+ target.unlink()
92
+ orphaned += 1
93
+
76
94
  print(f" Linked: .claude/skills/ ({linked} directories)")
95
+ if orphaned > 0:
96
+ print(f" Cleaned: {orphaned} orphaned skill symlink(s)")
77
97
  if skipped > 0:
78
98
  print(f" Kept: {skipped} user skill(s) (name conflict)")
79
99