@softspark/ai-toolkit 4.10.0 → 4.11.0

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/AGENTS.md CHANGED
@@ -653,3 +653,138 @@ Default response mode is **concise**. The `brand-voice` skill (when present) aut
653
653
  * Cite as `path:line` — instead of paragraphs describing where things live.
654
654
  * Escalate to verbose only for: architecture / RFC / ADR / trade-off documents, or when the user asks for detail.
655
655
  <!-- TOOLKIT:ai-toolkit END -->
656
+
657
+ <!-- TOOLKIT:jira-mcp START -->
658
+ <!-- Auto-injected by ai-toolkit. Re-run to update. -->
659
+
660
+ # Jira MCP Server
661
+
662
+ Tools: `sync_tasks`, `read_cached_tasks`, `update_task_status`, `update_task`, `add_task_comment`, `delete_task`, `delete_comment`, `reassign_task`, `get_task_statuses`, `get_task_details`, `get_project_language`, `log_task_time`, `get_task_time_tracking`, `list_comment_templates`, `add_templated_comment`, `list_task_templates`, `create_task`, `create_monthly_tasks`, `search_tasks`
663
+
664
+ ## Key Rules
665
+
666
+ - **Always `sync_tasks` first** before reading, because the cache may be stale.
667
+ - **Language first:** before writing ANY comment, description, or task content, call `get_project_language(project_key)` or check the `language` field in `get_task_details` response. Write ALL content in the project's configured language. Never assume Polish or English. Always check first.
668
+ - **Time format:** `"2h 30m"`, using hours and minutes only, never days.
669
+ - **Status changes:** call `get_task_statuses` first to check valid transitions.
670
+ - **Multi-instance:** project key determines which Jira instance is used (mapped in config.json).
671
+ - **Comments are ADF:** `add_task_comment` converts markdown to ADF (Atlassian Document Format) automatically.
672
+ - **Delete guard:** `delete_task` is allowed only for the task creator, and `delete_comment` is allowed only for the comment author. Both require explicit `user_approved=true`.
673
+ - **Templates:** use `list_comment_templates` to discover available templates, then `add_templated_comment` with `template_id` + `variables`.
674
+
675
+ ## Writing Style
676
+
677
+ - **Write like a real team member:** use plain, direct language that sounds like an engineer writing to another human, not like polished AI copy or marketing text.
678
+ - **No em dash and no double-hyphen separator in prose:** do not use those punctuation patterns in generated comments, descriptions, docs, or summaries. Use commas, periods, or parentheses instead.
679
+ - **Avoid stock AI phrases:** do not use phrases like "worth noting", "it is important to understand", "in today's dynamic environment", "overall", "in conclusion", or similar generic filler.
680
+ - **Prefer concrete wording:** use specific facts, actions, examples, and decisions instead of abstract claims or padded qualifiers.
681
+ - **Avoid repetitive rhythm:** do not make every sentence or bullet sound structurally identical. Vary sentence length and openings when writing longer text.
682
+ - **Keep summaries short:** do not add forced wrap-up paragraphs unless the user explicitly asks for a summary.
683
+ - **Use a workmanlike tone:** prefer a slightly rough, practical style over text that sounds overly smooth, symmetrical, or "LLM-clean".
684
+
685
+ ## Workflow
686
+
687
+ 1. `sync_tasks(jql="assignee=currentUser() AND status!=Done")` to fetch fresh data
688
+ 2. `read_cached_tasks()` to work offline
689
+ 3. `get_task_details(task_key="PROJ-123")` for a deep dive into description and comments as markdown
690
+ 4. `update_task_status(...)` / `add_task_comment(...)` / `log_task_time(...)` to mutate data
691
+
692
+ ## Comment Templates (built-in)
693
+
694
+ | ID | Use for |
695
+ |----|---------|
696
+ | `status-update` | Progress report with completed/next/blockers |
697
+ | `blocker-notification` | Escalate blocking issue |
698
+ | `handoff-transition` | Task handoff between people |
699
+ | `review-request` | Request code review |
700
+ | `sprint-update` | Sprint progress report |
701
+ | `bug-report` | Structured bug report |
702
+ | `deployment-note` | Deployment documentation |
703
+ | `time-log-summary` | Time logging with description |
704
+
705
+ ## CLI Commands
706
+
707
+ | Command | Description |
708
+ |---------|-------------|
709
+ | `jira-mcp` | Start MCP server (default) |
710
+ | `jira-mcp serve` | Start MCP server (explicit) |
711
+ | `jira-mcp create <path>` | Create tasks from config file (dry-run by default) |
712
+ | `jira-mcp create-monthly` | Create monthly admin tasks from built-in templates |
713
+ | `jira-mcp template add <type> <path>` | Install a template override from a local markdown file |
714
+ | `jira-mcp template list [type]` | List active comment/task templates |
715
+ | `jira-mcp template show <type> <id>` | Show the active template file content |
716
+ | `jira-mcp template remove <type> <id>` | Remove a user-installed template override |
717
+ | `jira-mcp config init` | Initialize global config (~/.softspark/jira-mcp/) |
718
+ | `jira-mcp config add-project <key> <url>` | Add Jira project mapping |
719
+ | `jira-mcp config remove-project <key>` | Remove a project |
720
+ | `jira-mcp config list-projects` | Show configured projects with language |
721
+ | `jira-mcp config set-credentials` | Set API credentials |
722
+ | `jira-mcp config set-default <key>` | Set default project |
723
+ | `jira-mcp config set-language <lang>` | Set global default language |
724
+ | `jira-mcp config set-project-language <key> <lang>` | Set language for a specific project |
725
+ | `jira-mcp cache sync-workflows` | Cache status transitions |
726
+ | `jira-mcp cache sync-users` | Cache user list for reassignment |
727
+ | `jira-mcp cache list-workflows` | Show cached workflows |
728
+ | `jira-mcp cache list-users` | Show cached users |
729
+
730
+ ## Architecture
731
+
732
+ Four layers. Each depends only on layers below.
733
+
734
+ 1. **Types & Config** (`config/`, `errors/`, `*/types.ts`), pure data with zero runtime deps
735
+ 2. **Infrastructure** (`connector/`, `cache/`, `adf/`, `templates/`), I/O and external APIs
736
+ 3. **Business Logic** (`operations/`, `bulk/`), orchestrating infrastructure
737
+ 4. **Entry Points** (`tools/`, `cli/`, `server.ts`), thin dispatchers
738
+
739
+ ## Coding Conventions
740
+
741
+ - **Strict TypeScript**: `strict: true`, NO `any`, `readonly` interfaces, `import type`, `.js` imports
742
+ - **Zod schemas** for all external data: `type Foo = z.infer<typeof FooSchema>`
743
+ - **Error classes**: extend `JiraMcpError` with `code` property
744
+ - **ADF round-trip**: `markdownToAdf()` for writes and `adfToMarkdown()` for reads. NEVER throw.
745
+ - **InstancePool**: singleton, lazy connectors, dedup by URL
746
+ - **Dual-write**: after Jira mutation, update local cache, return API result
747
+ - **Dry-run default**: `--execute` required for destructive operations
748
+ - **DI pattern**: handlers accept `deps?` parameter for testing
749
+ - **Config path**: ALWAYS `~/.softspark/jira-mcp/` via `GLOBAL_CONFIG_DIR`, with no manual config and no env vars in MCP client setup
750
+ - **SoftSpark standard**: all open-source tools use `~/.softspark/<tool-name>/`. See SOP in rag-mcp `kb/procedures/softspark-config-standard.md`
751
+
752
+ ## Testing
753
+
754
+ - **Vitest**: 70% coverage threshold, `vi.fn()` for mocks
755
+ - **No real Jira API calls** in tests, use `tests/fixtures/mocks.ts`
756
+ - **Filesystem tests**: `os.tmpdir()` + `mkdtemp()`, NEVER write to `~/.softspark/`
757
+ - Quick pre-commit: `npm run typecheck && npm run lint && npm test && npm run build`
758
+
759
+ ## KB & SOPs
760
+
761
+ - `kb/reference/` for architecture, API, configuration, ADF, caching, and templates
762
+ - `kb/howto/` for setup, multi-instance usage, and CLI usage
763
+ - `kb/procedures/` for `sop-pre-commit`, `sop-release`, and `sop-post-release-testing`
764
+
765
+ <!-- TOOLKIT:jira-mcp END -->
766
+
767
+ <!-- TOOLKIT:rag-mcp-rules START -->
768
+ <!-- Auto-injected by ai-toolkit. Re-run to update. -->
769
+
770
+ ## INSTANT ACTION RULE (GOLDEN RULE)
771
+
772
+ **ANY technical question? -> INSTANTLY call `smart_query()` OR `hybrid_search_kb()` BEFORE outputting text!**
773
+
774
+ 1. **Search First:** `smart_query()` or `hybrid_search_kb()` (NEVER skip, even if you "know").
775
+ 2. **Cite Sources:** always include `[PATH: kb/...]`.
776
+ 3. **Strict Order:** Semantic Search -> Files -> External Docs -> General Knowledge.
777
+
778
+ Default tool: `smart_query()`. Use `hybrid_search_kb()` for speed, `crag_search()` for vague queries, `multi_hop_search()` for complex reasoning.
779
+
780
+ ## kb_id vs file_path
781
+
782
+ - `get_document(path=...)` takes `kb_id` from search results (e.g., `local/softspark/project/reference/api.md`)
783
+ - `Read`/`Edit` take filesystem `file_path` (e.g., `./reference/api.md`)
784
+ - **DO NOT CONFUSE** these fields.
785
+
786
+ ## SOPs
787
+
788
+ ALWAYS check `kb/procedures/` first: `smart_query("SOP for <task>")`.
789
+
790
+ <!-- TOOLKIT:rag-mcp-rules END -->
package/CHANGELOG.md CHANGED
@@ -7,6 +7,34 @@ Versioning follows [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ---
9
9
 
10
+ ## v4.11.0 — Claude rules-space fix + editor registry parity (2026-06-30)
11
+
12
+ Minor release. Reduces Claude Code startup context pressure by moving ai-toolkit rules out of global/project `CLAUDE.md` inline blocks and into Claude Code rule files. Also finishes the editor registry sync by recording all Gemini generators in the canonical ecosystem registry. Test count: 1198 → 1203.
13
+
14
+ ### Changed
15
+ - **Claude Code global rules now use `~/.claude/rules/ai-toolkit-*.md`.** `ai-toolkit install/update` writes toolkit rules from `app/rules/*.md` and registered rules from `~/.softspark/ai-toolkit/rules/*.md` into Claude Code user-level rule files, keeps `~/.claude/CLAUDE.md` as a compact index, and removes legacy inline rule markers during migration. The `ai-toolkit-*` prefix is installer-managed.
16
+ - **Claude Code common rules now use `.claude/rules/ai-toolkit-*.md`.** `install --local` writes `ai-toolkit-coding-style.md`, `ai-toolkit-git-workflow.md`, `ai-toolkit-performance.md`, `ai-toolkit-security.md`, and `ai-toolkit-testing.md` under `.claude/rules/` with `paths: ["**/*"]` frontmatter, while `.claude/CLAUDE.md` stays a compact index. This follows Claude Code's current guidance to keep `CLAUDE.md` concise and move larger instruction sets into scoped rules.
17
+ - **Language rules reference updated.** `kb/reference/language-rules.md` now documents the Claude-specific split: common rules as project-local Claude rules, per-language rules as knowledge skills, and other editors still receiving native rule files from their generators.
18
+ - **Ecosystem registry reflects Gemini native surfaces.** `scripts/ecosystem_tools.json` now includes `generate_gemini_hooks.py`, `generate_gemini_commands.py`, and `generate_gemini_skills.py` alongside `generate_gemini.py`, matching the installer and supported-tools registry.
19
+ - **Ecosystem doctor baseline refreshed.** Snapshot updated after class A/C upstream documentation drift review; no additional generator contract changes were required.
20
+
21
+ ### Fixed
22
+ - **Claude rules-space regression.** Global Claude installs no longer inline toolkit/registered rules into `~/.claude/CLAUDE.md`, and project-local Claude installs no longer inflate `.claude/CLAUDE.md` with the full common-rule corpus. Regression tests now assert compact CLAUDE.md indexes, generated rule files, legacy marker cleanup, and managed `.claude/rules/ai-toolkit-*.md` refresh behavior.
23
+
24
+ ## v4.10.1 — Copilot AGENTS.md install + Claude KB-first rule (2026-06-23)
25
+
26
+ Patch release. Fixes two governance regressions found in the editor-update audit: Copilot installs now emit the root `AGENTS.md` surface documented in the registry, and Claude Code receives the KB-first rule in `CLAUDE.md`, which it actually reads. Test count: 1195 → 1198.
27
+
28
+ ### Fixed
29
+ - **GitHub Copilot local install now emits root `AGENTS.md`.** `ai-toolkit install --local --editors copilot` writes the generated agent catalog into a `TOOLKIT:copilot-agents` section without clobbering existing Codex/opencode `TOOLKIT:ai-toolkit` sections or user-authored content. Dry-run output and tests now cover the `.github/copilot-instructions.md + AGENTS.md` contract.
30
+ - **Claude Code KB-first rule restored in the right instruction file.** `CLAUDE.md` now explicitly requires `smart_query()` or `hybrid_search_kb()` before technical/project answers; the prior generated `AGENTS.md` placement was not sufficient for Claude Code runtime enforcement.
31
+ - **Codex PostToolUse no longer emits unsupported `suppressOutput`.** `loop-guard.sh` no longer forces `AI_TOOLKIT_HOOK_FORMAT=json`; under Codex it stays quiet/plain unless the generator explicitly opts into a supported JSON schema.
32
+ - **Npm package excludes local Claude session artifacts.** `package.json` now excludes `app/**/.claude/**` so ignored maintainer-local session files cannot leak into `npm pack`.
33
+
34
+ ### Changed
35
+ - **Editor registry/docs aligned with implementation.** README, architecture overview, and the supported-tools registry now describe Copilot's root `AGENTS.md` emission consistently.
36
+ - **Ecosystem doctor baseline refreshed.** Snapshot updated for upstream Claude Code and Gemini CLI documentation content hash drift; no generator changes were required.
37
+
10
38
  ## v4.10.0 — Per-repo session storage outside the repo + drop dead session-context hook (2026-06-17)
11
39
 
12
40
  Minor release. Session lifecycle hooks stop writing auto-generated files into each project's `.claude/` directory and store them per-repo under `~/.softspark/ai-toolkit/`. The dead `session-context.sh` hook (write-only, no consumer) is removed across all editor generators. Test count: 1197 → 1195.
package/README.md CHANGED
@@ -6,16 +6,17 @@
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
7
  [![Skills](https://img.shields.io/badge/skills-108-brightgreen)](app/skills/)
8
8
  [![Agents](https://img.shields.io/badge/agents-44-blue)](app/agents/)
9
- [![Tests](https://img.shields.io/badge/tests-1195%20passing-success)](tests/)
9
+ [![Tests](https://img.shields.io/badge/tests-1203%20passing-success)](tests/)
10
10
 
11
- ## What's New in v4.10.0
11
+ ## What's New in v4.11.0
12
12
 
13
- v4.10.0 gets auto-generated session files out of your repositories and removes a dead lifecycle hook.
13
+ v4.11.0 reduces Claude Code startup/global rule pressure and refreshes the editor registry.
14
14
 
15
- - **Per-repo session storage outside the repo**: `save-session.sh`, `session-end.sh`, `session-start.sh`, and `pre-compact.sh` now keep `session-context.md`, `session-end.md`, checkpoints, and `decisions.md` under `~/.softspark/ai-toolkit/sessions/<repo-key>/` instead of each project's `.claude/` no more generated files piling up in every repo. Keyed per repo (git root with `/` `-`) so projects stay isolated.
16
- - **No silent migration**: the new store starts fresh; pre-existing in-repo `.claude/session-*.md` are left for you to delete.
17
- - **Dropped the dead `session-context.sh` hook**: it wrote a `${SESSION}.json` environment snapshot nobody ever read (Constitution Art. VI.1). Removed across `app/hooks.json` and all 7 editor hook generators (cursor, windsurf, codex, devin, augment, gemini, opencode).
18
- - **Test count**: 1197 1195.
15
+ - **Claude rules-space fix**: global `ai-toolkit install/update` now writes toolkit and registered rules to `~/.claude/rules/ai-toolkit-*.md`, while `install --local` writes common project rules to `.claude/rules/ai-toolkit-*.md` with Claude Code `paths` frontmatter.
16
+ - **Language/global rules docs refreshed**: the KB now documents the split between Claude global user rules, project rules, language-rule skills, and other editors' native rule files.
17
+ - **Gemini registry parity restored**: `scripts/ecosystem_tools.json` now lists the Gemini hooks, commands, and skills generators already used by installer profiles.
18
+ - **Ecosystem snapshot refreshed**: the doctor baseline is updated after class A/C upstream documentation drift review.
19
+ - **Test count**: 1198 → 1203.
19
20
 
20
21
  See [CHANGELOG.md](CHANGELOG.md) for full history.
21
22
 
@@ -100,11 +101,11 @@ See [CLI Reference](kb/reference/cli-reference.md) for all commands and options.
100
101
 
101
102
  | Platform | Config Files | Hooks | Scope |
102
103
  |----------|-------------|:-----:|-------|
103
- | Claude Code | `~/.claude/` | ✅ | global |
104
+ | Claude Code | `~/.claude/agents`, `~/.claude/skills`, `~/.claude/rules/*.md`, `~/.claude/settings.json` | ✅ | global |
104
105
  | Cursor | `.cursor/rules/*.mdc` + `.cursor/mcp.json` + `.cursor/skills/*` | ✅ | project (`~/.cursor/mcp.json` for MCP only) |
105
106
  | Windsurf (Devin Desktop) | `~/.codeium/.../global_rules.md` + `~/.codeium/windsurf/skills/*` + `.devin/rules/*.md` + `.windsurf/rules/*.md` (legacy) | ✅ | global + project |
106
107
  | Gemini CLI | `~/.gemini/GEMINI.md` | ✅ | global |
107
- | GitHub Copilot | `.github/copilot-instructions.md` | — | project |
108
+ | GitHub Copilot | `.github/copilot-instructions.md` + `.github/instructions/*` + `.github/prompts/*` + `AGENTS.md` | — | project |
108
109
  | Cline | `~/Documents/Cline/Rules/*.md` + `~/.cline/skills/*` + `.clinerules/*.md` | — | global + project |
109
110
  | Roo Code | `~/.roo/rules/*.md` + `.roomodes` + `.roo/rules/*.md` | — | global rules + project |
110
111
  | Aider | `~/.aider.conf.yml` + `.aider.conf.yml` + `CONVENTIONS.md` | — | global + project |
@@ -128,7 +129,7 @@ See [CLI Reference](kb/reference/cli-reference.md) for all commands and options.
128
129
  | `hooks/` | 29 entries / 14 events | Quality gates, path safety, prompt governance, loop guard, session lifecycle |
129
130
  | `plugins/` | 11 packs | Opt-in domain bundles (security, research, frontend, enterprise, 6 language packs) |
130
131
  | `constitution.md` | 7 articles | Machine-enforced safety rules |
131
- | `rules/` | auto-injected | Language-specific and custom rules injected into your configs |
132
+ | `rules/` | auto-synced | Global/project rule files for Claude and other editors |
132
133
  | `kb/` | reference docs | Architecture, procedures, and best practices |
133
134
 
134
135
  ---
@@ -140,7 +141,7 @@ ai-toolkit/
140
141
  ├── app/
141
142
  │ ├── agents/ # 44 agent definitions
142
143
  │ ├── skills/ # 108 skills (task / hybrid / knowledge)
143
- │ ├── rules/ # Auto-injected into your CLAUDE.md
144
+ │ ├── rules/ # Source rules synced into Claude/editor rule files
144
145
  │ ├── hooks/ # Hook scripts (29 entries, 14 lifecycle events)
145
146
  │ ├── plugins/ # 11 experimental plugin packs (opt-in)
146
147
  │ ├── output-styles/ # System prompt output style overrides
@@ -148,7 +149,7 @@ ai-toolkit/
148
149
  │ └── ARCHITECTURE.md # Full system design
149
150
  ├── kb/ # Reference docs, procedures, plans
150
151
  ├── scripts/ # Validation, install, evaluation scripts
151
- ├── tests/ # Bats test suite (1195 tests)
152
+ ├── tests/ # Bats test suite (1203 tests)
152
153
  └── CHANGELOG.md
153
154
  ```
154
155
 
@@ -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": "4.10.0",
4
+ "version": "4.11.0",
5
5
  "author": {
6
6
  "name": "SoftSpark",
7
7
  "url": "https://github.com/softspark"
@@ -53,7 +53,6 @@ fi
53
53
  COUNT=$(grep -cxF "$HASH" "$LOG" 2>/dev/null | tr -d ' ')
54
54
  [ -z "$COUNT" ] && COUNT=0
55
55
  if [ "$COUNT" -ge "$THRESHOLD" ]; then
56
- export AI_TOOLKIT_HOOK_FORMAT=json
57
56
  hook_emit_context "PostToolUse" \
58
57
  "Loop guard: the same ${TOOL_NAME} action has repeated ${COUNT}x within the last ${WINDOW} steps. If you are not making progress, stop and reassess — try a different approach or ask the user — instead of retrying the identical action."
59
58
  fi
@@ -1,5 +1,5 @@
1
1
  {
2
- "last_run": "2026-06-09T22:04:06Z",
2
+ "last_run": "2026-06-30T16:52:43Z",
3
3
  "schema_version": 1,
4
4
  "tools": {
5
5
  "aider": {
@@ -24,7 +24,7 @@
24
24
  }
25
25
  },
26
26
  "augment": {
27
- "docs_hash": "f4c5995e8333a4d5",
27
+ "docs_hash": "1140b2d05814d7fd",
28
28
  "headings": [
29
29
  "Admin",
30
30
  "Auggie CLI",
@@ -66,7 +66,7 @@
66
66
  }
67
67
  },
68
68
  "claude-code": {
69
- "docs_hash": "e6f6b4d9d4057cb0",
69
+ "docs_hash": "3101b3cd58375aec",
70
70
  "headings": [
71
71
  "Core concepts",
72
72
  "Documentation Index",
@@ -122,15 +122,18 @@
122
122
  "slash command": true,
123
123
  "sub-agent": true
124
124
  },
125
- "version": "2.1.170 (Claude Code)"
125
+ "version": "2.1.196 (Claude Code)"
126
126
  },
127
127
  "cline": {
128
- "docs_hash": "806fa530c90e227d",
128
+ "docs_hash": "a934200d22b48f17",
129
129
  "headings": [
130
130
  "API Reference",
131
131
  "Best Practices",
132
+ "Bring Your Own Key",
132
133
  "CLI",
134
+ "Cline (usage-billing)",
133
135
  "Cline Overview",
136
+ "ClinePass",
134
137
  "Configurations",
135
138
  "Documentation Index",
136
139
  "Features",
@@ -149,6 +152,7 @@
149
152
  "\u200bAgent Core (SDK)",
150
153
  "\u200bApplications",
151
154
  "\u200bEnterprise Solutions",
155
+ "\u200bModel access",
152
156
  "\u200bOther IDE Supports",
153
157
  "\u200bWhat is Cline?"
154
158
  ],
@@ -168,7 +172,7 @@
168
172
  }
169
173
  },
170
174
  "codex-cli": {
171
- "docs_hash": "1b4a56a8e918d721",
175
+ "docs_hash": "36f437b3356b4706",
172
176
  "headings": [
173
177
  "API",
174
178
  "API Reference",
@@ -208,6 +212,7 @@
208
212
  "Resources",
209
213
  "Run and scale",
210
214
  "Search the Codex docs",
215
+ "Spaces",
211
216
  "Specialized models",
212
217
  "Suggested",
213
218
  "Tools",
@@ -235,10 +240,10 @@
235
240
  "mcp_servers": false,
236
241
  "sandbox": true
237
242
  },
238
- "version": "codex-cli 0.138.0"
243
+ "version": "codex-cli 0.142.0"
239
244
  },
240
245
  "cursor": {
241
- "docs_hash": "b68e4adf6e21f543",
246
+ "docs_hash": "d8aed06363805889",
242
247
  "headings": [],
243
248
  "markers": {
244
249
  ".cursor/rules": false,
@@ -254,7 +259,7 @@
254
259
  }
255
260
  },
256
261
  "gemini-cli": {
257
- "docs_hash": "a0e9a213229063c8",
262
+ "docs_hash": "85e8f47e8ef0acda",
258
263
  "headings": [
259
264
  "Breadcrumbs",
260
265
  "Directory actions",
@@ -269,6 +274,7 @@
269
274
  "Provide feedback",
270
275
  "Saved searches",
271
276
  "Search code, repositories, users, issues, pull requests...",
277
+ "Uh oh!",
272
278
  "Use saved searches to filter your results more quickly",
273
279
  "docs",
274
280
  "parent directory"
@@ -296,7 +302,7 @@
296
302
  }
297
303
  },
298
304
  "github-copilot": {
299
- "docs_hash": "ead818d74ead1f2e",
305
+ "docs_hash": "df772638c69033d7",
300
306
  "headings": [
301
307
  "About Copilot auto model selection",
302
308
  "About Copilot automations",
@@ -317,6 +323,7 @@
317
323
  "Still need help?"
318
324
  ],
319
325
  "markers": {
326
+ "AGENTS.md": false,
320
327
  "Copilot Chat": true,
321
328
  "Copilot Workspace": false,
322
329
  "Copilot cloud agent": true,
@@ -329,7 +336,7 @@
329
336
  }
330
337
  },
331
338
  "google-antigravity": {
332
- "docs_hash": "5ea5426c4445e746",
339
+ "docs_hash": "4d2e384b2c2add18",
333
340
  "headings": [],
334
341
  "markers": {
335
342
  "AGENTS.md": false,
@@ -346,7 +353,7 @@
346
353
  }
347
354
  },
348
355
  "opencode": {
349
- "docs_hash": "f546c8b741790cb8",
356
+ "docs_hash": "791633f4156abbe8",
350
357
  "headings": [
351
358
  "Add features",
352
359
  "Ask questions",
@@ -406,8 +413,9 @@
406
413
  }
407
414
  },
408
415
  "windsurf": {
409
- "docs_hash": "91034c064d9f8290",
416
+ "docs_hash": "bb6e6119f2c068d6",
410
417
  "headings": [
418
+ "Accounts",
411
419
  "Advanced",
412
420
  "Agent Command Center",
413
421
  "App Deploys",
@@ -420,15 +428,15 @@
420
428
  "On this page",
421
429
  "Recommended Plugins",
422
430
  "Releases",
431
+ "Security",
423
432
  "Terminal",
424
433
  "Usage",
425
434
  "Welcome to Devin Desktop",
426
435
  "Windsurf Plugins",
427
436
  "Workflows",
428
- "\u200b1. Select setup flow",
429
- "\u200b2. Choose editor theme",
430
- "\u200b3. Sign up / Log in",
431
- "\u200b4. Let\u2019s Surf!",
437
+ "\u200b1. Select your preferred theme",
438
+ "\u200b2. Log In / Sign Up",
439
+ "\u200b3. Start Building with Devin!",
432
440
  "\u200bCustom App Icons (beta)",
433
441
  "\u200bDevin Desktop Next",
434
442
  "\u200bForgot to Import VS Code Configurations?",
@@ -436,8 +444,7 @@
436
444
  "\u200bOnboarding",
437
445
  "\u200bSet Up",
438
446
  "\u200bThings to Try",
439
- "\u200bUninstall Devin Desktop",
440
- "\u200bUpdate Devin Desktop"
447
+ "\u200bUninstall Devin Desktop"
441
448
  ],
442
449
  "markers": {
443
450
  "AGENTS.md": true,
package/bin/ai-toolkit.js CHANGED
@@ -66,7 +66,7 @@ const COMMANDS = {
66
66
  reset: 'Wipe and recreate project-local configs from scratch (requires --local)',
67
67
  uninstall: 'Remove ai-toolkit from ~/.claude/',
68
68
  'add-rule': 'Register a rule file or URL in ~/.softspark/ai-toolkit/rules/ (URL rules auto-refresh on update)',
69
- 'remove-rule': 'Unregister a rule from ~/.softspark/ai-toolkit/rules/ and remove its block from CLAUDE.md',
69
+ 'remove-rule': 'Unregister a rule and remove its generated Claude rule file',
70
70
  'inject-hook': 'Inject external hooks (file or URL) into ~/.claude/settings.json (URL hooks auto-refresh on update)',
71
71
  'remove-hook': 'Remove injected hooks by source name from ~/.claude/settings.json (also unregisters URL source)',
72
72
  'inject-mcp': 'Inject external MCP template (file or URL) into ~/.mcp.json + all editor MCP configs (URL templates auto-refresh on update)',
@@ -87,7 +87,8 @@ What `install` and `update` do (merge-friendly — user content never overwritte
87
87
  | `settings.json` hooks | JSON merge via `merge-hooks.py` | User hooks + settings preserved, toolkit entries tagged `_source: ai-toolkit` |
88
88
  | `constitution.md` | Marker injection via `inject_section_cli.py` | User content outside `<!-- TOOLKIT:* -->` markers untouched |
89
89
  | `ARCHITECTURE.md` | Marker injection via `inject_section_cli.py` | Same as above |
90
- | `CLAUDE.md` | Marker injection of `app/rules/*.md` via `inject_rule_cli.py` | User content outside markers untouched |
90
+ | `CLAUDE.md` | Compact index for managed global rules | User content outside toolkit markers untouched |
91
+ | `rules/ai-toolkit-*.md` | File-based Claude Code user-level rules from `app/rules/*.md` and registered rules | `ai-toolkit-*` prefix reserved for installer-managed files |
91
92
 
92
93
  Re-running updates only toolkit content. Old whole-directory symlinks are auto-upgraded to per-file on next run.
93
94
 
@@ -135,7 +136,7 @@ ai-toolkit add-rule ./my-project-rules.md
135
136
  # → copies to ~/.softspark/ai-toolkit/rules/my-project-rules.md
136
137
 
137
138
  ai-toolkit update
138
- # → injects the rule into ~/.claude/CLAUDE.md and all global editor configs
139
+ # → syncs the rule into ~/.claude/rules/ai-toolkit-registered-*.md and all global editor configs
139
140
 
140
141
  ai-toolkit update --local
141
142
  # → also propagates as ai-toolkit-custom-<name> to directory-based editors (Cursor, Windsurf, Cline, Roo, Augment, Antigravity)
@@ -430,5 +431,6 @@ What `uninstall` does:
430
431
  - Removes per-directory skill symlinks (user skills preserved)
431
432
  - Strips toolkit hook entries from `settings.json` (user hooks + settings preserved)
432
433
  - Strips toolkit markers from `constitution.md` and `ARCHITECTURE.md` (user content preserved; empty files removed)
433
- - `~/.claude/CLAUDE.md` preserved (contains your custom rules + toolkit rule markers)
434
+ - `~/.claude/CLAUDE.md` preserved (contains your custom content + compact toolkit index)
435
+ - `~/.claude/rules/` preserved unless explicitly removed
434
436
  - Empty `agents/` and `skills/` directories cleaned up
@@ -32,7 +32,7 @@ ai-toolkit/
32
32
  app/ # All toolkit components
33
33
  agents/ # Agent definitions (.md + YAML frontmatter)
34
34
  skills/ # skills: task, hybrid, knowledge
35
- rules/ # Rules auto-injected into ~/.claude/CLAUDE.md
35
+ rules/ # Source rules synced into Claude/editor rule files
36
36
  hooks/ # Hook scripts (copied to ~/.softspark/ai-toolkit/hooks/)
37
37
  hooks.json # Hook definitions (merged into ~/.claude/settings.json)
38
38
  constitution.md # Immutable safety rules, 7 articles (marker-injected)
@@ -54,7 +54,7 @@ ai-toolkit/
54
54
  generate_agents_md.py # Regenerates AGENTS.md
55
55
  generate_cursor_rules.py # Generates .cursorrules (sources _common.py)
56
56
  generate_windsurf.py # Generates .windsurfrules (sources _common.py)
57
- generate_copilot.py # Generates .github/copilot-instructions.md (sources _common.py)
57
+ generate_copilot.py # Generates Copilot .github/* surfaces; install also injects AGENTS.md
58
58
  generate_gemini.py # Generates GEMINI.md (sources _common.py)
59
59
  generate_cline.py # Generates .clinerules (sources _common.py)
60
60
  generate_roo_modes.py # Generates .roomodes
@@ -85,8 +85,9 @@ Machine (global) Project (local)
85
85
  skills/*/ → per-dir symlinks hooks/ ← hook scripts (copied)
86
86
  settings.json ← hooks merged here
87
87
  constitution.md ← marker injection my-project/
88
- ARCHITECTURE.md ← marker injection CLAUDE.md ← project rules
89
- CLAUDE.md ← marker injection (rules) .claude/
88
+ ARCHITECTURE.md ← marker injection CLAUDE.md ← project index
89
+ CLAUDE.md ← compact rule index .claude/
90
+ rules/*.md ← Claude user-level rules
90
91
  settings.local.json ← MCP, perms
91
92
  constitution.md ← marker injection
92
93
  ```
@@ -109,7 +110,7 @@ Machine (global) Project (local)
109
110
  - `--editors cursor,aider` — install only selected editors
110
111
  - (no flag) — auto-detect from existing project files; `update --local` picks up whatever editors already have configs
111
112
 
112
- Each editor gets directory-based format (`.cursor/rules/*.mdc`, `.devin/rules/*.md` + `.windsurf/rules/*.md` (dual-emit since the Devin Desktop rebrand), `.clinerules/*.md`, `.roo/rules/*.md`, `.augment/rules/ai-toolkit-*.md`, `.agents/rules/*.md`, `CONVENTIONS.md`). Full-profile installs also emit native skill pointer catalogues for Cursor, Windsurf, and Cline. Codex local install additionally generates `AGENTS.md` (universal coding rules inlined — Codex reads only AGENTS.md, not `.agents/rules/`), `.agents/skills/*`, and `.codex/hooks.json`. Hooks are global-only — not merged into project settings except for editor-native local hook files such as Codex `.codex/hooks.json`. Experimental plugin packs can also layer a global Codex target in `HOME` (`~/AGENTS.md`, `~/.agents/`, `~/.codex/hooks.json`) when installed with `ai-toolkit plugin install --editor codex`.
113
+ Each editor gets directory-based format (`.cursor/rules/*.mdc`, `.devin/rules/*.md` + `.windsurf/rules/*.md` (dual-emit since the Devin Desktop rebrand), `.github/instructions/*.instructions.md` + `.github/prompts/*.prompt.md` + root `AGENTS.md` for Copilot agent instructions, `.clinerules/*.md`, `.roo/rules/*.md`, `.augment/rules/ai-toolkit-*.md`, `.agents/rules/*.md`, `CONVENTIONS.md`). Full-profile installs also emit native skill pointer catalogues for Cursor, Windsurf, and Cline. Codex local install additionally generates `AGENTS.md` (universal coding rules inlined — Codex reads only AGENTS.md, not `.agents/rules/`), `.agents/skills/*`, and `.codex/hooks.json`. Hooks are global-only — not merged into project settings except for editor-native local hook files such as Codex `.codex/hooks.json`. Experimental plugin packs can also layer a global Codex target in `HOME` (`~/AGENTS.md`, `~/.agents/`, `~/.codex/hooks.json`) when installed with `ai-toolkit plugin install --editor codex`.
113
114
 
114
115
  If a project already has `.mcp.json`, local install mirrors its `mcpServers` entries into `.claude/settings.local.json` plus any selected editors with project-scoped native MCP files (`.cursor/mcp.json`, `.github/mcp.json`).
115
116
 
@@ -123,7 +124,7 @@ If a project already has `.mcp.json`, local install mirrors its `mcpServers` ent
123
124
  | `update --local` | `./` | Re-apply + refresh project-local configs |
124
125
  | `uninstall` | `~/.claude/` | Strips toolkit components (preserves user content) |
125
126
  | `add-rule <file>` | `~/.softspark/ai-toolkit/rules/` | Register rule — auto-applied on every `update` |
126
- | `remove-rule <name>` | `~/.softspark/ai-toolkit/rules/` + `~/.claude/CLAUDE.md` | Unregister rule and remove its block |
127
+ | `remove-rule <name>` | `~/.softspark/ai-toolkit/rules/` + `~/.claude/rules/` | Unregister rule and remove generated Claude rule file |
127
128
  | `mcp add <name...>` | `./.mcp.json` | Merge canonical MCP template(s) into project config |
128
129
  | `mcp install --editor <name...>` | native editor config | Render MCP template(s) into editor-native config files |
129
130
  | `validate` | toolkit | Integrity check |
@@ -116,16 +116,22 @@ by default because Codex currently renders `additionalContext` as visible hook
116
116
  context in the TUI. This keeps prompt-submit output quiet while preserving hook
117
117
  side effects and blocking decisions such as search-first Stop enforcement.
118
118
 
119
- Codex `UserPromptSubmit` JSON output is event-specific. When emitting context,
120
- the hook must include the event name alongside the context:
119
+ Codex hooks must not force Claude-only JSON output fields such as
120
+ `suppressOutput`. In particular, advisory `PostToolUse` hooks like
121
+ `loop-guard.sh` run in quiet/plain mode under Codex; they keep side effects but
122
+ do not emit hidden Claude-style context unless a future Codex runtime explicitly
123
+ supports that schema.
124
+
125
+ If a future Codex runtime enables JSON context output for `UserPromptSubmit`,
126
+ the output must be event-specific and include the event name alongside the
127
+ context:
121
128
 
122
129
  ```json
123
130
  {
124
131
  "hookSpecificOutput": {
125
132
  "hookEventName": "UserPromptSubmit",
126
133
  "additionalContext": "..."
127
- },
128
- "suppressOutput": true
134
+ }
129
135
  }
130
136
  ```
131
137
 
@@ -21,19 +21,19 @@ This design is intentional: ai-toolkit is a generic toolkit. Consumers (MCP serv
21
21
 
22
22
  | Command | Target File | Mechanism | Idempotent |
23
23
  |---------|-------------|-----------|------------|
24
- | `inject-rule <file.md>` | `~/.claude/CLAUDE.md` | HTML comment markers (`<!-- TOOLKIT:name -->`) | Yes |
25
- | `remove-rule <name>` | `~/.claude/CLAUDE.md` | Strip markers by block name | Yes |
24
+ | `inject-rule <file.md>` | `~/.claude/CLAUDE.md` | Legacy HTML comment markers (`<!-- TOOLKIT:name -->`) | Yes |
25
+ | `remove-rule <name>` | `~/.softspark/ai-toolkit/rules/` + `~/.claude/rules/` | Unregister and remove generated Claude rule file | Yes |
26
26
  | `inject-hook <file.json\|url> [name]` | `~/.claude/settings.json` | JSON `_source` tag per entry, URL cached + registered | Yes |
27
27
  | `remove-hook <name>` | `~/.claude/settings.json` | Strip all entries with matching `_source`, unregister URL source | Yes |
28
28
  | `inject-mcp <file.json\|url> [name] [--force]` | `~/.mcp.json` + every editor with `global_path` | JSON `_source` tag per server, URL cached + registered, full editor propagation | Yes |
29
29
  | `remove-mcp <name>` | `~/.mcp.json` + every editor with `global_path` | Strip all servers with matching `_source`, clean editor configs, unregister URL | Yes |
30
- | `add-rule <file.md\|url>` | `~/.softspark/ai-toolkit/rules/` | File copy + re-inject all rules on next `update` | Yes |
30
+ | `add-rule <file.md\|url>` | `~/.softspark/ai-toolkit/rules/` | File copy + sync to `~/.claude/rules/ai-toolkit-registered-*.md` on next `update` | Yes |
31
31
  | `mcp add <name...>` | `.mcp.json` | Merge `mcpServers` block from built-in template | Yes |
32
32
  | `mcp install --editor <name...>` | Native editor MCP config | Render canonical template into editor format | Yes |
33
33
 
34
34
  ## inject-rule
35
35
 
36
- Injects a Markdown rules file into `~/.claude/CLAUDE.md` between named HTML comment markers.
36
+ Legacy direct injection: injects a Markdown rules file into `~/.claude/CLAUDE.md` between named HTML comment markers. Prefer `add-rule` for persistent global rules; `ai-toolkit update` syncs those into Claude Code user-level rule files under `~/.claude/rules/`.
37
37
 
38
38
  ```bash
39
39
  npx @softspark/ai-toolkit inject-rule ./my-tool-rules.md
@@ -52,7 +52,7 @@ The block name is derived from the file stem (`my-tool-rules.md` → `my-tool-ru
52
52
 
53
53
  ## remove-rule
54
54
 
55
- Strips a previously injected rule block from `~/.claude/CLAUDE.md`.
55
+ Unregisters a persistent rule, removes `~/.claude/rules/ai-toolkit-registered-<name>.md`, and strips any legacy injected rule block from `~/.claude/CLAUDE.md`.
56
56
 
57
57
  ```bash
58
58
  npx @softspark/ai-toolkit remove-rule my-tool-rules
@@ -3,9 +3,9 @@ title: "Global Install Model"
3
3
  category: reference
4
4
  service: ai-toolkit
5
5
  tags: [install, global, claude, codex, plugins, local-setup]
6
- version: "3.0.1"
6
+ version: "3.1.0"
7
7
  created: "2026-03-26"
8
- last_updated: "2026-04-28"
8
+ last_updated: "2026-06-30"
9
9
  description: "Reference description of the global install target, project-local editor setup, global Codex plugin layering, and command responsibilities in ai-toolkit."
10
10
  ---
11
11
 
@@ -15,7 +15,7 @@ description: "Reference description of the global install target, project-local
15
15
 
16
16
  `ai-toolkit` installs globally into `~/.claude/` by default.
17
17
 
18
- That means one machine-level install provides agents, skills, hooks, and rules to every project without committing toolkit boilerplate into each repository.
18
+ That means one machine-level install provides agents, skills, hooks, constitution, and rule files to every project without committing toolkit boilerplate into each repository.
19
19
 
20
20
  Other editor targets are opt-in and only use documented file surfaces. Cursor
21
21
  rules stay project-local because Cursor's global user rules are managed through
@@ -57,6 +57,19 @@ The `--profile` flag controls how much of each editor's native surface is activa
57
57
 
58
58
  ## Global Editor Targets
59
59
 
60
+ Claude Code's default global install writes these managed surfaces:
61
+
62
+ - `~/.claude/agents/*.md` — per-file symlinks to toolkit agents.
63
+ - `~/.claude/skills/*/` — per-directory symlinks to toolkit skills.
64
+ - `~/.claude/settings.json` — merged hook configuration and global settings.
65
+ - `~/.claude/constitution.md` — marker-injected safety constitution.
66
+ - `~/.claude/ARCHITECTURE.md` — marker-injected architecture reference.
67
+ - `~/.claude/rules/ai-toolkit-*.md` — toolkit rules from `app/rules/*.md`.
68
+ - `~/.claude/rules/ai-toolkit-registered-*.md` — rules registered with `ai-toolkit add-rule`.
69
+ - `~/.claude/CLAUDE.md` — compact index pointing at the managed rule files.
70
+
71
+ The `ai-toolkit-*` prefix in `~/.claude/rules/` is reserved for installer-managed files. User-authored Claude rules should use another filename prefix, or be registered through `ai-toolkit add-rule` so they are emitted as `ai-toolkit-registered-*.md`.
72
+
60
73
  `ai-toolkit install --editors <name>` can write global files only for editors
61
74
  with documented, file-based config surfaces:
62
75
 
@@ -103,6 +116,8 @@ These files still stay local to a repository as part of the core install model:
103
116
  - `.git/hooks/pre-commit` (fallback)
104
117
  - project-specific documentation or safety overlays
105
118
 
119
+ Project-local Claude Code language rules live in `.claude/rules/ai-toolkit-*.md` with `paths` frontmatter. They are separate from the global user-level `~/.claude/rules/ai-toolkit-*.md` files above.
120
+
106
121
  Hooks do **not** live in project-local settings. They are merged only into global `~/.claude/settings.json`.
107
122
 
108
123
  Codex is the exception in terms of file location, not hook ownership: its local