@softspark/ai-toolkit 1.3.10 → 1.3.12
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 +28 -0
- package/README.md +5 -2
- package/app/.claude-plugin/plugin.json +1 -1
- package/app/constitution.md +7 -0
- package/app/hooks/notify-waiting.sh +18 -0
- package/app/hooks/save-session.sh +22 -0
- package/app/hooks/session-start.sh +10 -1
- package/app/hooks.json +1 -1
- package/bin/ai-toolkit.js +3 -1
- package/kb/reference/architecture-overview.md +1 -1
- package/kb/reference/competitive-features-implementation.md +2 -2
- package/kb/reference/hooks-catalog.md +10 -3
- package/kb/reference/language-rules.md +2 -2
- package/llms-full.txt +15 -8
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/scripts/install_steps/install_state.py +1 -1
- package/scripts/version_check.py +17 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,34 @@ Versioning follows [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## v1.3.12 — Cross-platform notifications + version check fix (2026-04-08)
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Version check**: `ai-toolkit status` and session-start hook now read installed version from `state.json` instead of `package.json`, fixing false "up to date" when npm package was upgraded but `ai-toolkit update` not yet run.
|
|
14
|
+
- **Version check**: `status` forces a fresh npm check (no 24h cache) so user always sees real state.
|
|
15
|
+
- **Session-start hook**: `TOOLKIT_DIR` resolved via `npm root -g` instead of broken `../../` relative path from `~/.ai-toolkit/hooks/`.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- **Notification hook**: replaced inline macOS-only `osascript` with cross-platform `notify-waiting.sh` script (macOS/Linux/Windows WSL).
|
|
19
|
+
- **Update notification**: session-start hook now shows desktop notification (macOS/Linux/Windows) when a new version is available.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## v1.3.11 — Proactive Context Checkpointing + Augment CLI (2026-04-08)
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
- **Constitution Art. I §5: Proactive Context Checkpointing** — agents must checkpoint `.claude/session-context.md` during multi-step tasks (objective, completed/pending steps, files modified, key decisions).
|
|
27
|
+
- **`augment-rules` CLI command** — wired `generate_augment.py` into `bin/ai-toolkit.js` GENERATORS + COMMANDS + `generate-all`. Generates `.augment/rules/ai-toolkit.md`.
|
|
28
|
+
- **Augment in Platform Support** — added to README table with project scope.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
- **`save-session.sh`** — enriched with git branch, dirty count, diff stat, and agent-written checkpoint preservation.
|
|
32
|
+
- **Language rules count** — corrected 70→68 in README.md (13 dirs × 5 + 3 standalone).
|
|
33
|
+
- **Secondary docs** — removed hardcoded rule counts from `language-rules.md`, `architecture-overview.md`, `competitive-features-implementation.md`; reference README for canonical count.
|
|
34
|
+
- **README architecture tree** — added missing `track-usage.sh`.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
10
38
|
## v1.3.10 — Patch (2026-04-07)
|
|
11
39
|
|
|
12
40
|
### Fixed
|
package/README.md
CHANGED
|
@@ -122,6 +122,7 @@ Replaces all symlinks with real files, inlines rules into CLAUDE.md, copies cons
|
|
|
122
122
|
| Cline | `.clinerules` | `ai-toolkit install --local` | project |
|
|
123
123
|
| Roo Code | `.roomodes` | `ai-toolkit install --local` | project |
|
|
124
124
|
| Aider | `.aider.conf.yml` | `ai-toolkit install --local` | project |
|
|
125
|
+
| Augment | `.augment/rules/ai-toolkit.md` | `ai-toolkit install --local` | project |
|
|
125
126
|
| Codex / OpenCode | `AGENTS.md` | `ai-toolkit agents-md` | project |
|
|
126
127
|
|
|
127
128
|
> **Note:** Claude Code remains the primary platform with full feature support (agents, lifecycle hooks, safety constitution). Other platforms receive a distilled ruleset generated from the same source. For editors lacking native bash lifecycle hooks, `--local` installs a Git hooks fallback (`.git/hooks/pre-commit`) to enforce quality gates pre-commit.
|
|
@@ -179,7 +180,9 @@ ai-toolkit/
|
|
|
179
180
|
│ │ ├── mcp-health.sh # MCP server availability check
|
|
180
181
|
│ │ ├── governance-capture.sh # Security-sensitive op logging
|
|
181
182
|
│ │ ├── commit-quality.sh # Conventional commit advisory
|
|
182
|
-
│ │
|
|
183
|
+
│ │ ├── session-context.sh # Environment snapshot on start
|
|
184
|
+
│ │ ├── track-usage.sh # Skill invocation tracking
|
|
185
|
+
│ │ └── notify-waiting.sh # Cross-platform "Claude waiting" notification
|
|
183
186
|
│ ├── hooks.json # Hook definitions (merged into settings.json)
|
|
184
187
|
│ ├── plugins/ # Experimental plugin packs (opt-in, not part of default install)
|
|
185
188
|
│ ├── output-styles/ # System prompt output style overrides
|
|
@@ -471,7 +474,7 @@ Templates include: GitHub, PostgreSQL, Slack, Sentry, Context7, Brave Search, Su
|
|
|
471
474
|
|
|
472
475
|
## Language Rules
|
|
473
476
|
|
|
474
|
-
|
|
477
|
+
68 language-specific coding rules across 13 languages: TypeScript, Python, Go, Rust, Java, Kotlin, Swift, Dart, C#, PHP, C++, Ruby, plus common rules. Each language has 5 rule categories: coding-style, testing, patterns, frameworks, security.
|
|
475
478
|
|
|
476
479
|
```bash
|
|
477
480
|
ai-toolkit install --local # auto-detects project language, installs matching rules
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-toolkit",
|
|
3
3
|
"description": "Professional-grade Claude Code toolkit with persona presets, skill security auditor, expanded lifecycle hooks, experimental opt-in plugin packs, benchmark harvesting, and multi-tool support.",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.12",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SoftSpark",
|
|
7
7
|
"url": "https://github.com/softspark"
|
package/app/constitution.md
CHANGED
|
@@ -20,6 +20,13 @@ status: IMMUTABLE
|
|
|
20
20
|
- All iterations MUST be logged to stats for audit
|
|
21
21
|
- Exceeding limits requires explicit user override
|
|
22
22
|
|
|
23
|
+
### Section 5: Proactive Context Checkpointing
|
|
24
|
+
- During multi-step tasks (>5 tool calls), update `.claude/session-context.md` after each major milestone
|
|
25
|
+
- Checkpoint MUST include: current objective, completed steps, pending steps, files modified, key decisions
|
|
26
|
+
- Minimum frequency: after every completed task phase, workflow stage, or subagent handoff
|
|
27
|
+
- Agent SHOULD checkpoint before any risky or destructive operation
|
|
28
|
+
- Format: append `## Checkpoint <timestamp>` sections, do not overwrite previous checkpoints within the same session
|
|
29
|
+
|
|
23
30
|
## Article II: The Hierarchy of Truth
|
|
24
31
|
1. **KB Supremacy**: The Knowledge Base (`kb/`) is the source of truth. If code contradicts KB, check KB freshness.
|
|
25
32
|
2. **Research Protocol**: Use `research-mastery` skill before any major decision. Guessing is forbidden.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# notify-waiting.sh — Cross-platform desktop notification when Claude is waiting.
|
|
3
|
+
#
|
|
4
|
+
# Fires on: Notification
|
|
5
|
+
# Non-blocking (always exits 0).
|
|
6
|
+
|
|
7
|
+
MSG="Claude Code needs your attention"
|
|
8
|
+
TITLE="Claude Code"
|
|
9
|
+
|
|
10
|
+
if command -v osascript >/dev/null 2>&1; then
|
|
11
|
+
osascript -e "display notification \"$MSG\" with title \"$TITLE\"" 2>/dev/null &
|
|
12
|
+
elif command -v notify-send >/dev/null 2>&1; then
|
|
13
|
+
notify-send "$TITLE" "$MSG" 2>/dev/null &
|
|
14
|
+
elif command -v powershell.exe >/dev/null 2>&1; then
|
|
15
|
+
powershell.exe -Command "[void](New-Object -ComObject WScript.Shell).Popup('$MSG',5,'$TITLE',64)" 2>/dev/null &
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
exit 0
|
|
@@ -16,6 +16,17 @@ SESSION_FILE=".claude/session-context.md"
|
|
|
16
16
|
|
|
17
17
|
if [ -n "$SESSION_ID" ]; then
|
|
18
18
|
mkdir -p .claude
|
|
19
|
+
|
|
20
|
+
# Gather git state for richer context
|
|
21
|
+
GIT_BRANCH=""
|
|
22
|
+
GIT_DIRTY="0"
|
|
23
|
+
GIT_DIFF_STAT=""
|
|
24
|
+
if command -v git >/dev/null 2>&1 && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
|
25
|
+
GIT_BRANCH=$(git branch --show-current 2>/dev/null || echo "detached")
|
|
26
|
+
GIT_DIRTY=$(git status --porcelain 2>/dev/null | wc -l | tr -d ' ')
|
|
27
|
+
GIT_DIFF_STAT=$(git diff --stat HEAD 2>/dev/null | tail -5)
|
|
28
|
+
fi
|
|
29
|
+
|
|
19
30
|
cat > "$SESSION_FILE" << EOF
|
|
20
31
|
# Session Context
|
|
21
32
|
Updated: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
@@ -23,7 +34,18 @@ Session: ${SESSION_ID}
|
|
|
23
34
|
|
|
24
35
|
## Last Assistant Message
|
|
25
36
|
${LAST_MSG}
|
|
37
|
+
|
|
38
|
+
## Git State
|
|
39
|
+
Branch: ${GIT_BRANCH:-N/A}
|
|
40
|
+
Uncommitted changes: ${GIT_DIRTY}
|
|
41
|
+
${GIT_DIFF_STAT:+${GIT_DIFF_STAT}}
|
|
26
42
|
EOF
|
|
43
|
+
|
|
44
|
+
# Preserve any agent-written checkpoints (appended by proactive checkpointing)
|
|
45
|
+
if [ -f "${SESSION_FILE}.checkpoints" ]; then
|
|
46
|
+
echo "" >> "$SESSION_FILE"
|
|
47
|
+
cat "${SESSION_FILE}.checkpoints" >> "$SESSION_FILE"
|
|
48
|
+
fi
|
|
27
49
|
fi
|
|
28
50
|
|
|
29
51
|
exit 0
|
|
@@ -9,10 +9,19 @@ echo "MANDATORY: Before answering ANY technical question, apply ALL rules from y
|
|
|
9
9
|
echo "REMINDER: When writing features or fixing bugs, ensure tests cover the changes. When modifying API, config, or setup, update relevant documentation. Propose these steps to the user — do not silently skip them."
|
|
10
10
|
|
|
11
11
|
# 2. Check for updates (cached, max once per 24h, non-blocking)
|
|
12
|
-
TOOLKIT_DIR="$(
|
|
12
|
+
TOOLKIT_DIR="$(npm root -g 2>/dev/null)/@softspark/ai-toolkit"
|
|
13
|
+
[ ! -d "$TOOLKIT_DIR" ] && TOOLKIT_DIR="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
13
14
|
VERSION_MSG=$(python3 "$TOOLKIT_DIR/scripts/version_check.py" 2>/dev/null)
|
|
14
15
|
if [ -n "$VERSION_MSG" ]; then
|
|
15
16
|
echo "$VERSION_MSG"
|
|
17
|
+
# Desktop notification so user sees update before typing
|
|
18
|
+
if command -v osascript >/dev/null 2>&1; then
|
|
19
|
+
osascript -e "display notification \"$VERSION_MSG\" with title \"ai-toolkit\"" 2>/dev/null &
|
|
20
|
+
elif command -v notify-send >/dev/null 2>&1; then
|
|
21
|
+
notify-send "ai-toolkit" "$VERSION_MSG" 2>/dev/null &
|
|
22
|
+
elif command -v powershell.exe >/dev/null 2>&1; then
|
|
23
|
+
powershell.exe -Command "[void](New-Object -ComObject WScript.Shell).Popup('$VERSION_MSG',5,'ai-toolkit',64)" 2>/dev/null &
|
|
24
|
+
fi
|
|
16
25
|
fi
|
|
17
26
|
|
|
18
27
|
# 3. Load session context (if available)
|
package/app/hooks.json
CHANGED
package/bin/ai-toolkit.js
CHANGED
|
@@ -27,6 +27,7 @@ const GENERATORS = {
|
|
|
27
27
|
'cline-rules': { script: 'generate_cline.py', dest: '.clinerules' },
|
|
28
28
|
'roo-modes': { script: 'generate_roo_modes.py', dest: '.roomodes' },
|
|
29
29
|
'aider-conf': { script: 'generate_aider_conf.py', dest: '.aider.conf.yml' },
|
|
30
|
+
'augment-rules': { script: 'generate_augment.py', dest: path.join('.augment', 'rules', 'ai-toolkit.md'), mkdir: '.augment/rules' },
|
|
30
31
|
'agents-md': { script: 'generate_agents_md.py', dest: 'AGENTS.md' },
|
|
31
32
|
};
|
|
32
33
|
|
|
@@ -82,9 +83,10 @@ const COMMANDS = {
|
|
|
82
83
|
'cline-rules': 'Generate .clinerules for Cline',
|
|
83
84
|
'roo-modes': 'Generate .roomodes for Roo Code',
|
|
84
85
|
'aider-conf': 'Generate .aider.conf.yml for Aider',
|
|
86
|
+
'augment-rules': 'Generate .augment/rules/ai-toolkit.md for Augment',
|
|
85
87
|
'agents-md': 'Regenerate AGENTS.md from agent definitions',
|
|
86
88
|
'llms-txt': 'Generate llms.txt and llms-full.txt',
|
|
87
|
-
'generate-all': 'Generate all platform configs at once (agents, cursor, windsurf, copilot, gemini, cline, roo, aider, llms)',
|
|
89
|
+
'generate-all': 'Generate all platform configs at once (agents, cursor, windsurf, copilot, gemini, cline, roo, aider, augment, llms)',
|
|
88
90
|
help: 'Show this help message',
|
|
89
91
|
};
|
|
90
92
|
|
|
@@ -269,7 +269,7 @@ Severity levels: HIGH (blocks deployment), WARN (should fix), INFO (best practic
|
|
|
269
269
|
`app/plugins/mcp-templates/` contains 25 ready-to-use MCP server config templates. Opt-in via `ai-toolkit install --modules mcp-templates` or activated automatically with `--profile strict|full`.
|
|
270
270
|
|
|
271
271
|
### Language Rules
|
|
272
|
-
`app/rules/` provides
|
|
272
|
+
`app/rules/` provides language-specific rule files covering 13 languages (TypeScript, Python, Go, Rust, Java, Kotlin, Swift, Dart, C#, PHP, C++, Ruby, common). Auto-detected from project files via `--auto-detect` or selectable with `--modules rules-<lang>`. See README.md for current count.
|
|
273
273
|
|
|
274
274
|
### Extension API (`inject-hook`)
|
|
275
275
|
`inject_section_cli.py` provides a stable marker-based API for injecting content into `CLAUDE.md`, `constitution.md`, or `ARCHITECTURE.md` without overwriting user content.
|
|
@@ -35,7 +35,7 @@ Strengthen ai-toolkit's competitive position by implementing 10 features from co
|
|
|
35
35
|
**Key design principle:** ai-toolkit is a **generic toolkit** — it does NOT know about rag-mcp or any specific consumer. Consumers (like rag-mcp) use ai-toolkit's public API (`inject-rule`, `inject-hook`, `merge-hooks`) to add their own rules and hooks.
|
|
36
36
|
|
|
37
37
|
**State before plan:** 88 skills, 47 agents, 14 hooks, 9 editor integrations
|
|
38
|
-
**State after plan:** See manifest.json for current counts. Target: skills, agents, hooks,
|
|
38
|
+
**State after plan:** See manifest.json and README.md for current counts. Target: skills, agents, hooks, language rules, MCP templates, extension API
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
@@ -641,7 +641,7 @@ npx @softspark/ai-toolkit inject-hook ./rag-mcp-hooks.json # NEW
|
|
|
641
641
|
|
|
642
642
|
| Risk | Probability | Impact | Mitigation |
|
|
643
643
|
|------|-------------|--------|------------|
|
|
644
|
-
|
|
|
644
|
+
| Rule files = maintenance burden | Medium | Medium | Auto-generate from ECC (port script), validate.py checks |
|
|
645
645
|
| inject-hook misuse by consumers | Low | Medium | Validate JSON schema, reject malformed hooks |
|
|
646
646
|
| Manifest install breaks existing | Low | High | Backward compatible, existing CLI preserved |
|
|
647
647
|
| Documentation site drift | Medium | Medium | Generate from source (CLAUDE.md → site), CI check |
|
|
@@ -44,15 +44,19 @@ ai-toolkit update # re-copies scripts, re-merges (idempotent)
|
|
|
44
44
|
3. Loads session context from `.claude/session-context.md` (if exists)
|
|
45
45
|
4. Loads active instincts from `.claude/instincts/*.md` (if any)
|
|
46
46
|
|
|
47
|
-
### Notification —
|
|
47
|
+
### Notification — `notify-waiting.sh`
|
|
48
48
|
|
|
49
49
|
| Field | Value |
|
|
50
50
|
|-------|-------|
|
|
51
51
|
| Event | `Notification` |
|
|
52
52
|
| Matcher | *(all)* |
|
|
53
|
+
| Script | `~/.ai-toolkit/hooks/notify-waiting.sh` |
|
|
53
54
|
| Fires | Claude Code waiting for user input |
|
|
54
55
|
|
|
55
|
-
**Action:**
|
|
56
|
+
**Action:** Cross-platform desktop notification ("Claude Code needs your attention"):
|
|
57
|
+
- macOS: `osascript` (native)
|
|
58
|
+
- Linux: `notify-send` (libnotify)
|
|
59
|
+
- Windows/WSL: `powershell.exe` WScript popup (5s auto-close)
|
|
56
60
|
|
|
57
61
|
### PreToolUse (Bash) — `guard-destructive.sh`
|
|
58
62
|
|
|
@@ -147,7 +151,10 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
|
|
|
147
151
|
| Script | `~/.ai-toolkit/hooks/save-session.sh` |
|
|
148
152
|
| Fires | After every Claude response |
|
|
149
153
|
|
|
150
|
-
**Action:** Writes session context to `.claude/session-context.md` for cross-session persistence.
|
|
154
|
+
**Action:** Writes enriched session context to `.claude/session-context.md` for cross-session persistence. Captures:
|
|
155
|
+
- Session ID and last assistant message (first 5 lines)
|
|
156
|
+
- Git branch, uncommitted change count, and diff stat (last 5 lines)
|
|
157
|
+
- Agent-written checkpoints from `.claude/session-context.md.checkpoints` (if present — written by proactive checkpointing per Constitution Art. I §5)
|
|
151
158
|
|
|
152
159
|
Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
|
|
153
160
|
|
|
@@ -13,7 +13,7 @@ description: "Reference for the language-specific rules system: 13 languages, 5
|
|
|
13
13
|
|
|
14
14
|
## Overview
|
|
15
15
|
|
|
16
|
-
ai-toolkit ships
|
|
16
|
+
ai-toolkit ships language-specific rule files covering 13 programming languages plus a common set (see README.md for current count). Rules are plain Markdown files injected into `CLAUDE.md` via `ai-toolkit install --local`. They provide coding-style, testing, patterns, frameworks, and security guidance specific to each language.
|
|
17
17
|
|
|
18
18
|
Rules are distinct from skills: rules are injected as static text into `CLAUDE.md` and are always visible to Claude, whereas skills are loaded contextually by agents.
|
|
19
19
|
|
|
@@ -51,7 +51,7 @@ app/rules/
|
|
|
51
51
|
└── ruby/
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
**Total: 13
|
|
54
|
+
**Total: 13 directories × 5 files each + 3 standalone = 68 rule files** (see README.md for canonical count)
|
|
55
55
|
|
|
56
56
|
## Supported Languages
|
|
57
57
|
|
package/llms-full.txt
CHANGED
|
@@ -1199,7 +1199,7 @@ Severity levels: HIGH (blocks deployment), WARN (should fix), INFO (best practic
|
|
|
1199
1199
|
`app/plugins/mcp-templates/` contains 25 ready-to-use MCP server config templates. Opt-in via `ai-toolkit install --modules mcp-templates` or activated automatically with `--profile strict|full`.
|
|
1200
1200
|
|
|
1201
1201
|
### Language Rules
|
|
1202
|
-
`app/rules/` provides
|
|
1202
|
+
`app/rules/` provides language-specific rule files covering 13 languages (TypeScript, Python, Go, Rust, Java, Kotlin, Swift, Dart, C#, PHP, C++, Ruby, common). Auto-detected from project files via `--auto-detect` or selectable with `--modules rules-<lang>`. See README.md for current count.
|
|
1203
1203
|
|
|
1204
1204
|
### Extension API (`inject-hook`)
|
|
1205
1205
|
`inject_section_cli.py` provides a stable marker-based API for injecting content into `CLAUDE.md`, `constitution.md`, or `ARCHITECTURE.md` without overwriting user content.
|
|
@@ -1578,7 +1578,7 @@ Strengthen ai-toolkit's competitive position by implementing 10 features from co
|
|
|
1578
1578
|
**Key design principle:** ai-toolkit is a **generic toolkit** — it does NOT know about rag-mcp or any specific consumer. Consumers (like rag-mcp) use ai-toolkit's public API (`inject-rule`, `inject-hook`, `merge-hooks`) to add their own rules and hooks.
|
|
1579
1579
|
|
|
1580
1580
|
**State before plan:** 88 skills, 47 agents, 14 hooks, 9 editor integrations
|
|
1581
|
-
**State after plan:** See manifest.json for current counts. Target: skills, agents, hooks,
|
|
1581
|
+
**State after plan:** See manifest.json and README.md for current counts. Target: skills, agents, hooks, language rules, MCP templates, extension API
|
|
1582
1582
|
|
|
1583
1583
|
---
|
|
1584
1584
|
|
|
@@ -2184,7 +2184,7 @@ npx @softspark/ai-toolkit inject-hook ./rag-mcp-hooks.json # NEW
|
|
|
2184
2184
|
|
|
2185
2185
|
| Risk | Probability | Impact | Mitigation |
|
|
2186
2186
|
|------|-------------|--------|------------|
|
|
2187
|
-
|
|
|
2187
|
+
| Rule files = maintenance burden | Medium | Medium | Auto-generate from ECC (port script), validate.py checks |
|
|
2188
2188
|
| inject-hook misuse by consumers | Low | Medium | Validate JSON schema, reject malformed hooks |
|
|
2189
2189
|
| Manifest install breaks existing | Low | High | Backward compatible, existing CLI preserved |
|
|
2190
2190
|
| Documentation site drift | Medium | Medium | Generate from source (CLAUDE.md → site), CI check |
|
|
@@ -2783,15 +2783,19 @@ ai-toolkit update # re-copies scripts, re-merges (idempotent)
|
|
|
2783
2783
|
3. Loads session context from `.claude/session-context.md` (if exists)
|
|
2784
2784
|
4. Loads active instincts from `.claude/instincts/*.md` (if any)
|
|
2785
2785
|
|
|
2786
|
-
### Notification —
|
|
2786
|
+
### Notification — `notify-waiting.sh`
|
|
2787
2787
|
|
|
2788
2788
|
| Field | Value |
|
|
2789
2789
|
|-------|-------|
|
|
2790
2790
|
| Event | `Notification` |
|
|
2791
2791
|
| Matcher | *(all)* |
|
|
2792
|
+
| Script | `~/.ai-toolkit/hooks/notify-waiting.sh` |
|
|
2792
2793
|
| Fires | Claude Code waiting for user input |
|
|
2793
2794
|
|
|
2794
|
-
**Action:**
|
|
2795
|
+
**Action:** Cross-platform desktop notification ("Claude Code needs your attention"):
|
|
2796
|
+
- macOS: `osascript` (native)
|
|
2797
|
+
- Linux: `notify-send` (libnotify)
|
|
2798
|
+
- Windows/WSL: `powershell.exe` WScript popup (5s auto-close)
|
|
2795
2799
|
|
|
2796
2800
|
### PreToolUse (Bash) — `guard-destructive.sh`
|
|
2797
2801
|
|
|
@@ -2886,7 +2890,10 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
|
|
|
2886
2890
|
| Script | `~/.ai-toolkit/hooks/save-session.sh` |
|
|
2887
2891
|
| Fires | After every Claude response |
|
|
2888
2892
|
|
|
2889
|
-
**Action:** Writes session context to `.claude/session-context.md` for cross-session persistence.
|
|
2893
|
+
**Action:** Writes enriched session context to `.claude/session-context.md` for cross-session persistence. Captures:
|
|
2894
|
+
- Session ID and last assistant message (first 5 lines)
|
|
2895
|
+
- Git branch, uncommitted change count, and diff stat (last 5 lines)
|
|
2896
|
+
- Agent-written checkpoints from `.claude/session-context.md.checkpoints` (if present — written by proactive checkpointing per Constitution Art. I §5)
|
|
2890
2897
|
|
|
2891
2898
|
Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
|
|
2892
2899
|
|
|
@@ -3291,7 +3298,7 @@ description: "Reference for the language-specific rules system: 13 languages, 5
|
|
|
3291
3298
|
|
|
3292
3299
|
## Overview
|
|
3293
3300
|
|
|
3294
|
-
ai-toolkit ships
|
|
3301
|
+
ai-toolkit ships language-specific rule files covering 13 programming languages plus a common set (see README.md for current count). Rules are plain Markdown files injected into `CLAUDE.md` via `ai-toolkit install --local`. They provide coding-style, testing, patterns, frameworks, and security guidance specific to each language.
|
|
3295
3302
|
|
|
3296
3303
|
Rules are distinct from skills: rules are injected as static text into `CLAUDE.md` and are always visible to Claude, whereas skills are loaded contextually by agents.
|
|
3297
3304
|
|
|
@@ -3329,7 +3336,7 @@ app/rules/
|
|
|
3329
3336
|
└── ruby/
|
|
3330
3337
|
```
|
|
3331
3338
|
|
|
3332
|
-
**Total: 13
|
|
3339
|
+
**Total: 13 directories × 5 files each + 3 standalone = 68 rule files** (see README.md for canonical count)
|
|
3333
3340
|
|
|
3334
3341
|
## Supported Languages
|
|
3335
3342
|
|
package/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softspark/ai-toolkit",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.12",
|
|
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",
|
|
@@ -126,7 +126,7 @@ def print_status() -> None:
|
|
|
126
126
|
import sys as _sys
|
|
127
127
|
_sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
|
128
128
|
from version_check import check
|
|
129
|
-
result = check()
|
|
129
|
+
result = check(force=True)
|
|
130
130
|
if result["update_available"]:
|
|
131
131
|
print()
|
|
132
132
|
print(f" Update available: {result['installed']} -> {result['latest']}")
|
package/scripts/version_check.py
CHANGED
|
@@ -27,7 +27,23 @@ PACKAGE_NAME = "@softspark/ai-toolkit"
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
def _get_installed_version() -> str:
|
|
30
|
-
"""Read version from
|
|
30
|
+
"""Read version from state.json (what user actually has configured).
|
|
31
|
+
|
|
32
|
+
Falls back to package.json if state.json is missing (e.g. fresh install).
|
|
33
|
+
state.json is the source of truth because it reflects what was last
|
|
34
|
+
installed/updated, while package.json may be newer if the npm package
|
|
35
|
+
was upgraded but `ai-toolkit update` was not run yet.
|
|
36
|
+
"""
|
|
37
|
+
state_file = Path.home() / ".ai-toolkit" / "state.json"
|
|
38
|
+
if state_file.is_file():
|
|
39
|
+
try:
|
|
40
|
+
with open(state_file, encoding="utf-8") as f:
|
|
41
|
+
version = json.load(f).get("installed_version")
|
|
42
|
+
if version:
|
|
43
|
+
return version
|
|
44
|
+
except (json.JSONDecodeError, OSError):
|
|
45
|
+
pass
|
|
46
|
+
# Fallback: package.json
|
|
31
47
|
pkg = Path(__file__).resolve().parent.parent / "package.json"
|
|
32
48
|
if pkg.is_file():
|
|
33
49
|
with open(pkg, encoding="utf-8") as f:
|