@softspark/ai-toolkit 2.4.1 → 2.6.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 (48) hide show
  1. package/AGENTS.md +33 -20
  2. package/CHANGELOG.md +57 -0
  3. package/README.md +29 -13
  4. package/app/.claude-plugin/plugin.json +3 -2
  5. package/app/ARCHITECTURE.md +11 -0
  6. package/app/agents/code-reviewer.md +6 -7
  7. package/app/agents/frontend-specialist.md +33 -2
  8. package/app/agents/seo-specialist.md +1 -1
  9. package/app/personas/frontend-lead.md +48 -5
  10. package/app/skills/a11y-validate/SKILL.md +377 -0
  11. package/app/skills/a11y-validate/reference/aria-patterns.md +259 -0
  12. package/app/skills/a11y-validate/reference/eaa-compliance.md +252 -0
  13. package/app/skills/a11y-validate/reference/mobile-eaa.md +329 -0
  14. package/app/skills/a11y-validate/reference/wcag-2-1-aa.md +285 -0
  15. package/app/skills/a11y-validate/reference/wcag-2-2-aa.md +221 -0
  16. package/app/skills/a11y-validate/scripts/a11y-scanner.py +639 -0
  17. package/app/skills/clean-code/reference/python.md +3 -3
  18. package/app/skills/design-engineering/SKILL.md +2 -5
  19. package/app/skills/hipaa-validate/SKILL.md +39 -23
  20. package/app/skills/hipaa-validate/scripts/hipaa_scan.py +64 -7
  21. package/app/skills/review/SKILL.md +30 -6
  22. package/app/skills/seo-validate/SKILL.md +460 -0
  23. package/app/skills/seo-validate/reference/core-web-vitals.md +445 -0
  24. package/app/skills/seo-validate/reference/geo-aeo-patterns.md +259 -0
  25. package/app/skills/seo-validate/reference/geo-guidelines.md +248 -0
  26. package/app/skills/seo-validate/reference/schema-types.md +465 -0
  27. package/app/skills/seo-validate/reference/spa-ssg-patterns.md +351 -0
  28. package/app/skills/seo-validate/reference/w3c-guidelines.md +289 -0
  29. package/app/skills/seo-validate/scripts/seo-scanner.py +549 -0
  30. package/bin/ai-toolkit.js +24 -9
  31. package/kb/reference/architecture-overview.md +1 -1
  32. package/kb/reference/comparison.md +1 -1
  33. package/kb/reference/opencode-compatibility.md +161 -0
  34. package/kb/reference/skills-catalog.md +3 -1
  35. package/llms-full.txt +177 -6
  36. package/llms.txt +1 -0
  37. package/manifest.json +3 -3
  38. package/package.json +6 -3
  39. package/scripts/config_cli.py +4 -10
  40. package/scripts/doctor.py +3 -3
  41. package/scripts/generate_opencode.py +117 -0
  42. package/scripts/generate_opencode_agents.py +126 -0
  43. package/scripts/generate_opencode_commands.py +158 -0
  44. package/scripts/generate_opencode_json.py +133 -0
  45. package/scripts/generate_opencode_plugin.py +169 -0
  46. package/scripts/install_steps/ai_tools.py +117 -1
  47. package/scripts/install_steps/install_state.py +1 -1
  48. package/scripts/plugin.py +1 -1
package/AGENTS.md CHANGED
@@ -86,7 +86,7 @@ Legacy code investigation and understanding specialist. Trigger words: legacy co
86
86
 
87
87
  Code review and security audit expert. Use for security reviews, Devil's Advocate analysis, quality audits, best practices validation. Triggers: review, security, audit, quality, best practices, vulnerability.
88
88
 
89
- **Tools:** `Read, Edit`
89
+ **Tools:** `Read, Edit, Grep, Glob`
90
90
 
91
91
  ---
92
92
 
@@ -446,6 +446,7 @@ Specialized agent personas — apply their expertise for relevant tasks:
446
446
 
447
447
  Skills are invocable commands or auto-loaded knowledge sources:
448
448
 
449
+ - **a11y-validate**: Validate code against accessibility standards: WCAG 2.1 Level AA, EN 301 549, and the European Accessibility Act (EAA / Directive EU 2019/882). Covers semantics, text alternatives, keyboard/focus, color/contrast, forms, media, ARIA, motion, mobile, and EAA documentation requirements. Framework-aware (React/Next/Nuxt/Astro/Gatsby/SvelteKit/Remix/Angular/Vue/React Native/Flutter/static HTML).
449
450
  - **agent-creator**: Creates new specialized agents with frontmatter, tool selection, and delegation guidance
450
451
  - **analyze**: Analyze code quality, complexity, and patterns
451
452
  - **api-patterns**: Loaded when user asks about REST API design or GraphQL patterns
@@ -523,6 +524,7 @@ Skills are invocable commands or auto-loaded knowledge sources:
523
524
  - **rust-patterns**: Loaded when user asks about Rust development patterns
524
525
  - **search**: Search the knowledge base with semantic and hybrid modes
525
526
  - **security-patterns**: Loaded when user asks about security, OWASP, or auth patterns
527
+ - **seo-validate**: Validate code against SEO best practices: W3C semantics, meta/OG tags, Schema.org, hreflang, Core Web Vitals (LCP/INP/CLS), resource hints, GEO, SPA/SSG/CSR crawlability, technical SEO, accessibility-for-SEO. Supports React/Next/Nuxt/Astro/Gatsby/SvelteKit/Remix/Angular/Vue/static HTML.
526
528
  - **skill-audit**: Scan skills and agents for security risks: dangerous patterns, secrets, excessive permissions
527
529
  - **skill-creator**: Create new skills from templates with guided workflow
528
530
  - **subagent-development**: Execute implementation plans using fresh subagents per task with two-stage review: spec compliance first, then code quality. Use when executing plans with independent tasks. Codex-adapted: uses native subagents and plan tracking.
@@ -583,24 +585,35 @@ Derived from the immutable safety constitution (5 articles):
583
585
 
584
586
  # Jira MCP Server
585
587
 
586
- Tools: `sync_tasks`, `read_cached_tasks`, `update_task_status`, `update_task`, `add_task_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`, `create_task`, `search_tasks`
588
+ 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`, `create_task`, `search_tasks`
587
589
 
588
590
  ## Key Rules
589
591
 
590
- - **Always `sync_tasks` first** before reading -- cache may be stale.
591
- - **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.
592
- - **Time format:** `"2h 30m"` -- hours and minutes only, never days.
592
+ - **Always `sync_tasks` first** before reading, because the cache may be stale.
593
+ - **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.
594
+ - **Time format:** `"2h 30m"`, using hours and minutes only, never days.
593
595
  - **Status changes:** call `get_task_statuses` first to check valid transitions.
594
596
  - **Multi-instance:** project key determines which Jira instance is used (mapped in config.json).
595
597
  - **Comments are ADF:** `add_task_comment` converts markdown to ADF (Atlassian Document Format) automatically.
598
+ - **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`.
596
599
  - **Templates:** use `list_comment_templates` to discover available templates, then `add_templated_comment` with `template_id` + `variables`.
597
600
 
601
+ ## Writing Style
602
+
603
+ - **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.
604
+ - **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.
605
+ - **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.
606
+ - **Prefer concrete wording:** use specific facts, actions, examples, and decisions instead of abstract claims or padded qualifiers.
607
+ - **Avoid repetitive rhythm:** do not make every sentence or bullet sound structurally identical. Vary sentence length and openings when writing longer text.
608
+ - **Keep summaries short:** do not add forced wrap-up paragraphs unless the user explicitly asks for a summary.
609
+ - **Use a workmanlike tone:** prefer a slightly rough, practical style over text that sounds overly smooth, symmetrical, or "LLM-clean".
610
+
598
611
  ## Workflow
599
612
 
600
- 1. `sync_tasks(jql="assignee=currentUser() AND status!=Done")` -- fetch fresh
601
- 2. `read_cached_tasks()` -- work offline
602
- 3. `get_task_details(task_key="PROJ-123")` -- deep dive (description + comments as markdown)
603
- 4. `update_task_status(...)` / `add_task_comment(...)` / `log_task_time(...)` -- mutate
613
+ 1. `sync_tasks(jql="assignee=currentUser() AND status!=Done")` to fetch fresh data
614
+ 2. `read_cached_tasks()` to work offline
615
+ 3. `get_task_details(task_key="PROJ-123")` for a deep dive into description and comments as markdown
616
+ 4. `update_task_status(...)` / `add_task_comment(...)` / `log_task_time(...)` to mutate data
604
617
 
605
618
  ## Comment Templates (built-in)
606
619
 
@@ -636,25 +649,25 @@ Tools: `sync_tasks`, `read_cached_tasks`, `update_task_status`, `update_task`, `
636
649
 
637
650
  ## Architecture
638
651
 
639
- Four layers -- each depends only on layers below:
652
+ Four layers. Each depends only on layers below.
640
653
 
641
- 1. **Types & Config** (`config/`, `errors/`, `*/types.ts`) -- pure data, zero runtime deps
642
- 2. **Infrastructure** (`connector/`, `cache/`, `adf/`, `templates/`) -- I/O and external APIs
643
- 3. **Business Logic** (`operations/`, `bulk/`) -- orchestrates infrastructure
644
- 4. **Entry Points** (`tools/`, `cli/`, `server.ts`) -- thin dispatchers
654
+ 1. **Types & Config** (`config/`, `errors/`, `*/types.ts`), pure data with zero runtime deps
655
+ 2. **Infrastructure** (`connector/`, `cache/`, `adf/`, `templates/`), I/O and external APIs
656
+ 3. **Business Logic** (`operations/`, `bulk/`), orchestrating infrastructure
657
+ 4. **Entry Points** (`tools/`, `cli/`, `server.ts`), thin dispatchers
645
658
 
646
659
  ## Coding Conventions
647
660
 
648
661
  - **Strict TypeScript**: `strict: true`, NO `any`, `readonly` interfaces, `import type`, `.js` imports
649
662
  - **Zod schemas** for all external data: `type Foo = z.infer<typeof FooSchema>`
650
663
  - **Error classes**: extend `JiraMcpError` with `code` property
651
- - **ADF round-trip**: `markdownToAdf()` for writes, `adfToMarkdown()` for reads -- NEVER throw
664
+ - **ADF round-trip**: `markdownToAdf()` for writes and `adfToMarkdown()` for reads. NEVER throw.
652
665
  - **InstancePool**: singleton, lazy connectors, dedup by URL
653
666
  - **Dual-write**: after Jira mutation, update local cache, return API result
654
667
  - **Dry-run default**: `--execute` required for destructive operations
655
668
  - **DI pattern**: handlers accept `deps?` parameter for testing
656
- - **Config path**: ALWAYS `~/.softspark/jira-mcp/` via `GLOBAL_CONFIG_DIR` -- no manual config, no env vars in MCP client setup
657
- - **SoftSpark standard**: all open-source tools use `~/.softspark/<tool-name>/` -- see SOP in rag-mcp `kb/procedures/softspark-config-standard.md`
669
+ - **Config path**: ALWAYS `~/.softspark/jira-mcp/` via `GLOBAL_CONFIG_DIR`, with no manual config and no env vars in MCP client setup
670
+ - **SoftSpark standard**: all open-source tools use `~/.softspark/<tool-name>/`. See SOP in rag-mcp `kb/procedures/softspark-config-standard.md`
658
671
 
659
672
  ## Testing
660
673
 
@@ -665,9 +678,9 @@ Four layers -- each depends only on layers below:
665
678
 
666
679
  ## KB & SOPs
667
680
 
668
- - `kb/reference/` -- architecture, api, configuration, adf, caching, templates
669
- - `kb/howto/` -- setup, multi-instance, cli-usage
670
- - `kb/procedures/` -- sop-pre-commit, sop-release, sop-post-release-testing
681
+ - `kb/reference/` for architecture, API, configuration, ADF, caching, and templates
682
+ - `kb/howto/` for setup, multi-instance usage, and CLI usage
683
+ - `kb/procedures/` for `sop-pre-commit`, `sop-release`, and `sop-post-release-testing`
671
684
 
672
685
  <!-- TOOLKIT:jira-mcp END -->
673
686
 
package/CHANGELOG.md CHANGED
@@ -7,6 +7,63 @@ Versioning follows [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ---
9
9
 
10
+ ## v2.6.1 — HIPAA Scanner Precision (2026-04-17)
11
+
12
+ ### Changed
13
+ - **`hipaa-validate` Cat 3 regexes tightened to cut false positives** — `CERT_NONE` → `ssl\.CERT_NONE` (module-anchored, no longer matches constants like `USE_CERT_NONE_MODE`); `ssl\s*=\s*False` → `[,(]\s*ssl\s*=\s*False\b` (argument-position anchored, no longer matches feature flags like `is_ssl_enabled = False`).
14
+ - **`SECURE_SSL_REDIRECT = False` severity HIGH → WARN** — commonly `False` in dev/local Django settings; compliance reviewer must confirm production config.
15
+ - **Cat 1 Python logger patterns merged** — three overlapping regexes (`logging.*`, `logger.*`, `pprint.*`) collapsed into one `(logging|logger|pprint)\.\w+\(...` pattern; eliminates duplicate findings on the same line.
16
+ - **SQLAlchemy session data-op regexes word-anchored** in Cat 2 and Cat 5 (`\bsession.(query|add|execute|delete|merge)\b`) — prevents false matches on unrelated identifiers.
17
+
18
+ ### Added
19
+ - **`LANG_EXTENSIONS` file-extension filter** in `scripts/hipaa_scan.py` — language-tagged patterns now fire only when the file's extension matches the tag. Eliminates cross-language double-flagging (e.g. Python `logger.\w+` regex no longer triggers on `.java` files in mixed projects).
20
+ - **`tests/test_hipaa_scan.bats`** — 11 fixture-driven tests covering Python positive/negative cases for the new patterns and the cross-language isolation guarantee. Test count: 647 → 658.
21
+
22
+ ---
23
+
24
+ ## v2.6.0 — opencode Integration (2026-04-15)
25
+
26
+ ### Added
27
+ - **opencode editor support** — `ai-toolkit install --editors opencode` generates a full native integration: `AGENTS.md` (shared with Codex via distinct marker sections), `.opencode/agents/ai-toolkit-*.md` (44 subagents), `.opencode/commands/ai-toolkit-*.md` (62 slash commands), `.opencode/plugins/ai-toolkit-hooks.js` (JS plugin bridging Bash hooks to opencode lifecycle events), and `opencode.json` with MCP servers merged from `.mcp.json`.
28
+ - **Global opencode configs** — `ai-toolkit install --editors opencode` (without `--local`) installs the **complete surface** to `~/.config/opencode/{AGENTS.md, agents/, commands/, plugins/ai-toolkit-hooks.js, opencode.json}`. Tracked in `state.json`, auto-refreshed on `update`. (Earlier pre-release iteration shipped only AGENTS.md/agents/commands globally; plugin and opencode.json are now also installed globally so hooks and MCP work without `--local`.)
29
+ - **Expanded hook coverage** — plugin now bridges `session.compacted` → `pre-compact.sh` + `pre-compact-save.sh`, `permission.asked` → `guard-destructive.sh`, and `command.executed` → `post-tool-use.sh` on top of the original session/tool/message events. Maximises opencode lifecycle coverage without introducing new Bash hooks.
30
+ - **Auto-detection** — projects with `opencode.json` or `.opencode/` are detected by `ai-toolkit install --local` (no explicit `--editors` needed).
31
+ - **MCP translation** — `generate_opencode_json.py` translates Claude-style `.mcp.json` into opencode's `mcp` shape (local `command` + args flattened, remote `url` + headers preserved, `enabled: true` default). User-authored keys in `opencode.json` are preserved; re-runs are idempotent.
32
+ - **New CLI commands** — `ai-toolkit opencode-md`, `opencode-agents`, `opencode-commands`, `opencode-plugin`, `opencode-json`. Included in `generate-all`.
33
+ - **Skill reuse** — opencode reuses the Codex skill adapter (`codex_skill_adapter.py`) for Claude-only orchestration primitives since both lack `Agent`/`TeamCreate`/`TaskCreate` — no duplication.
34
+
35
+ ### Changed
36
+ - README `What's New`, package.json description, manifest.json, and `app/.claude-plugin/plugin.json` all list opencode as a supported editor.
37
+ - **Plugin exports** — `.opencode/plugins/ai-toolkit-hooks.js` now uses a single named export (`AiToolkitHooks`) per opencode spec. The prior redundant `export default` was removed.
38
+ - **Agent frontmatter** — `model` field and source-model-hint comment are no longer emitted because opencode requires `provider/model-id` format, which ai-toolkit does not store. opencode falls back to the user's configured default model.
39
+ - **Global install layout fix** — global generators now write directly under `~/.config/opencode/{agents,commands,plugins}/` instead of the incorrect `~/.config/opencode/.opencode/…` nesting. Generators accept a `config_root` parameter to distinguish project vs global layout.
40
+ - **Test suite** — grew from 641 to 647 tests covering new event bridges, named-export invariant, missing-source-model-hint regression, and global-layout contract.
41
+
42
+ ---
43
+
44
+ ## v2.5.0 — Community Skills, Automated Scanners & Design Craft (2026-04-15)
45
+
46
+ ### Added
47
+ - **`/seo-validate` skill** (community PR #2) — 9-category SEO scanner: W3C semantics, meta/OG tags, Schema.org, hreflang, Core Web Vitals, GEO, SPA/SSG crawlability. Framework-aware (React/Next/Nuxt/Astro/Gatsby/SvelteKit/Remix/Angular/Vue).
48
+ - **`/a11y-validate` skill** (community PR #3) — 10-category accessibility scanner: WCAG 2.1 AA, WCAG 2.2 AA, EN 301 549, European Accessibility Act (EAA). Mobile-aware (React Native/Flutter).
49
+ - **`seo-scanner.py`** — automated stdlib-only SEO scanner script (9 checks, JSON output, CI exit codes).
50
+ - **`a11y-scanner.py`** — automated stdlib-only accessibility scanner script (10 checks, WCAG criterion mapping, contrast calculation, CI exit codes).
51
+ - **`wcag-2-2-aa.md`** reference — all 9 new WCAG 2.2 success criteria with failure patterns, grep patterns, and framework notes.
52
+ - **`geo-aeo-patterns.md`** reference — Answer Engine Optimization: AI answer engines, llms.txt, robots.txt AI bot directives, E-E-A-T signals.
53
+ - **Design Craft vocabulary** (community PR #4) — 7-domain impeccable design guidance in `frontend-specialist` agent and `frontend-lead` persona: typography, OKLCH color, spatial scale, motion, interaction, responsive, UX writing. AI-Native UI patterns section.
54
+
55
+ ### Changed
56
+ - **`code-reviewer` agent** — added Grep/Glob tools, rewrote Mandatory Protocol to use actual tools. Expanded review checklist: full OWASP Top 10, API/contract, concurrency/async, migration/schema.
57
+ - **`clean-code` python reference** — fixed invalid `any` type hint, modernized to PEP 604 syntax.
58
+ - **`design-engineering` skill** — fixed CSS hold-to-delete example (duplicate selector → proper `:active` override).
59
+ - **`review` skill** — fixed script path to use `CLAUDE_SKILL_DIR`.
60
+ - **`.gitattributes`** — added `merge=ours` for generated files to prevent contributor PR conflicts.
61
+ - **Misleading CLI outputs** fixed — plugin.py Codex status glob, --only help examples, install/update --local descriptions, doctor stale rules dr.warn(), config_cli phantom check.
62
+ - **`gemini` added to ALL_EDITORS** — `--editors gemini` no longer rejected by CLI validation.
63
+ - Skill count: 92 → 94 (31 task + 31 hybrid + 32 knowledge).
64
+
65
+ ---
66
+
10
67
  ## v2.4.1 — Codex Global Install, Security Hardening & Editor Tracking (2026-04-15)
11
68
 
12
69
  ### Added
package/README.md CHANGED
@@ -1,22 +1,36 @@
1
1
  # ai-toolkit
2
2
 
3
- > Professional-grade AI coding toolkit with multi-platform support. Machine-enforced safety, 92 skills, 44 agents, expanded lifecycle hooks, persona presets, experimental opt-in plugin packs, and benchmark tooling — works with Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, Google Antigravity, and Codex CLI, ready in 60 seconds.
3
+ > Professional-grade AI coding toolkit with multi-platform support. Machine-enforced safety, 94 skills, 44 agents, expanded lifecycle hooks, persona presets, experimental opt-in plugin packs, and benchmark tooling — works with Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, Google Antigravity, Codex CLI, and opencode, ready in 60 seconds.
4
4
 
5
5
  [![CI](https://github.com/softspark/ai-toolkit/actions/workflows/ci.yml/badge.svg)](https://github.com/softspark/ai-toolkit/actions/workflows/ci.yml)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
- [![Skills](https://img.shields.io/badge/skills-92-brightgreen)](app/skills/)
7
+ [![Skills](https://img.shields.io/badge/skills-94-brightgreen)](app/skills/)
8
8
  [![Agents](https://img.shields.io/badge/agents-44-blue)](app/agents/)
9
- [![Tests](https://img.shields.io/badge/tests-618%20passing-success)](tests/)
9
+ [![Tests](https://img.shields.io/badge/tests-658%20passing-success)](tests/)
10
10
 
11
11
  ---
12
12
 
13
- ## What's New in v2.4.1
13
+ ## What's New in v2.6.1
14
14
 
15
- - **Global editor tracking** — `ai-toolkit install --editors codex` installs Codex globally, tracked in `state.json`, auto-refreshed on `update`
16
- - **Codex hook propagation** — `inject-hook` auto-propagates to `~/.codex/hooks.json` for Codex-compatible events
17
- - **Auto-propagation**`add-rule`, `remove-rule`, `mcp add` auto-propagate to all globally installed editors
18
- - **Security hardening** — tarball path traversal fix, git URL scheme validation, defense-in-depth name validation
19
- - **Doctor Check 9** — URL hook sources health check with `--fix` re-fetch support
15
+ - **HIPAA scanner precision** — Cat 3 TLS regexes anchored (`ssl.CERT_NONE`, `[,(] ssl=False`) to eliminate false positives on feature flags and constant names
16
+ - **Cross-language isolation** — new `LANG_EXTENSIONS` filter ensures Python regexes don't match `.java` files in mixed projects, and vice versa
17
+ - **`SECURE_SSL_REDIRECT = False` HIGH → WARN** — commonly False in dev settings; reviewer confirms prod config instead of flooding every Django project with HIGH findings
18
+ - **11 new bats tests** (`tests/test_hipaa_scan.bats`) fixture-driven positive/negative cases covering the Python pattern expansion and isolation guarantee. Test count: 647 → 658
19
+
20
+ ## What's New in v2.6.0
21
+
22
+ - **opencode integration** — `ai-toolkit install --editors opencode` generates `AGENTS.md`, `.opencode/agents/`, `.opencode/commands/`, plus a JS plugin bridging our Bash hooks to opencode's lifecycle events
23
+ - **opencode MCP merge** — `.mcp.json` servers are translated into `opencode.json` under the `mcp` key, preserving user-authored entries
24
+ - **Global opencode configs** — `~/.config/opencode/{AGENTS.md,agents/,commands/}` managed from `state.json`, auto-refreshed on `update`
25
+ - **Shared AGENTS.md** — opencode and Codex CLI both read the same `AGENTS.md` via distinct marker sections; installing both does not clobber either
26
+
27
+ ## What's New in v2.5.0
28
+
29
+ - **`/seo-validate`** — 9-category SEO scanner with automated `seo-scanner.py` script (community contribution)
30
+ - **`/a11y-validate`** — WCAG 2.1/2.2 + EAA accessibility scanner with `a11y-scanner.py` script (community contribution)
31
+ - **Design Craft** — 7-domain impeccable design vocabulary in `frontend-specialist` + `frontend-lead` persona
32
+ - **GEO/AEO reference** — Answer Engine Optimization patterns for AI answer engines
33
+ - **94 skills** — 31 task + 31 hybrid + 32 knowledge
20
34
 
21
35
  See [CHANGELOG.md](CHANGELOG.md) for full history.
22
36
 
@@ -47,7 +61,7 @@ ai-toolkit install
47
61
  npx @softspark/ai-toolkit install
48
62
  ```
49
63
 
50
- **That's it.** Claude Code picks up 92 skills, 44 agents, quality hooks, and the safety constitution automatically.
64
+ **That's it.** Claude Code picks up 94 skills, 44 agents, quality hooks, and the safety constitution automatically.
51
65
 
52
66
  ### Update
53
67
 
@@ -107,6 +121,7 @@ See [CLI Reference](kb/reference/cli-reference.md) for all commands and options.
107
121
  | Augment | `.augment/rules/ai-toolkit-*.md` | project |
108
122
  | Google Antigravity | `.agent/rules/*.md` + `.agent/workflows/*.md` | project |
109
123
  | Codex CLI | `AGENTS.md` + `.agents/rules/*.md` + `.agents/skills/*` + `.codex/hooks.json` | project + global plugin |
124
+ | opencode | `AGENTS.md` + `.opencode/{agents,commands,plugins}/*` + `opencode.json` | project + global (`~/.config/opencode/`) |
110
125
 
111
126
  > Claude Code is always installed (primary platform). Other editors on demand with `--editors`. All platforms receive the same agent/skill catalog, guidelines, and registered custom rules.
112
127
 
@@ -116,7 +131,7 @@ See [CLI Reference](kb/reference/cli-reference.md) for all commands and options.
116
131
 
117
132
  | Component | Count | Description |
118
133
  |-----------|-------|-------------|
119
- | `skills/` (task) | 29 | Slash commands: `/commit`, `/build`, `/deploy`, `/test`, `/skill-audit`, ... |
134
+ | `skills/` (task) | 31 | Slash commands: `/commit`, `/build`, `/deploy`, `/test`, `/skill-audit`, ... |
120
135
  | `skills/` (hybrid) | 31 | Slash commands with agent knowledge base |
121
136
  | `skills/` (knowledge) | 32 | Domain knowledge auto-loaded by agents |
122
137
  | `agents/` | 44 | Specialized agents across 10 categories |
@@ -134,7 +149,7 @@ See [CLI Reference](kb/reference/cli-reference.md) for all commands and options.
134
149
  ai-toolkit/
135
150
  ├── app/
136
151
  │ ├── agents/ # 44 agent definitions
137
- │ ├── skills/ # 92 skills (task / hybrid / knowledge)
152
+ │ ├── skills/ # 94 skills (task / hybrid / knowledge)
138
153
  │ ├── rules/ # Auto-injected into your CLAUDE.md
139
154
  │ ├── hooks/ # Hook scripts (21 entries, 12 lifecycle events)
140
155
  │ ├── plugins/ # 11 experimental plugin packs (opt-in)
@@ -143,7 +158,7 @@ ai-toolkit/
143
158
  │ └── ARCHITECTURE.md # Full system design
144
159
  ├── kb/ # Reference docs, procedures, plans
145
160
  ├── scripts/ # Validation, install, evaluation scripts
146
- ├── tests/ # Bats test suite (618 tests)
161
+ ├── tests/ # Bats test suite (658 tests)
147
162
  └── CHANGELOG.md
148
163
  ```
149
164
 
@@ -267,6 +282,7 @@ Need multi-agent coordination?
267
282
  | Distribution Model | [kb/reference/distribution-model.md](kb/reference/distribution-model.md) |
268
283
  | Ecosystem Comparison | [kb/reference/comparison.md](kb/reference/comparison.md) |
269
284
  | Codex CLI Compatibility | [kb/reference/codex-cli-compatibility.md](kb/reference/codex-cli-compatibility.md) |
285
+ | opencode Compatibility | [kb/reference/opencode-compatibility.md](kb/reference/opencode-compatibility.md) |
270
286
  | Maintenance SOP | [kb/procedures/maintenance-sop.md](kb/procedures/maintenance-sop.md) |
271
287
 
272
288
  ---
@@ -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": "2.4.1",
4
+ "version": "2.6.1",
5
5
  "author": {
6
6
  "name": "SoftSpark",
7
7
  "url": "https://github.com/softspark"
@@ -30,7 +30,8 @@
30
30
  "skills",
31
31
  "agents",
32
32
  "cursor",
33
- "codex"
33
+ "codex",
34
+ "opencode"
34
35
  ],
35
36
  "marketplace": {
36
37
  "category": "developer-tools",
@@ -309,6 +309,17 @@ Lead Session (You)
309
309
 
310
310
  Language rules are propagated to **all configured editors** — not just Claude. `dir_rules_shared.build_language_rules()` reads `app/rules/<lang>/*.md`, strips frontmatter, and returns combined content per language. Each directory-based generator (Cursor, Windsurf, Cline, Roo, Augment, Antigravity, Codex) emits `ai-toolkit-lang-<lang>` files in its native format. Registered custom rules (`~/.softspark/ai-toolkit/rules/`) are similarly propagated as `ai-toolkit-custom-<name>` files via `build_registered_rules()`.
311
311
 
312
+ ### opencode Integration (v2.5.0+)
313
+ opencode is the 11th supported editor. Five generators handle its integration surface:
314
+
315
+ - `generate_opencode.py` → `AGENTS.md` body (shared with Codex; separate marker section prevents clobbering).
316
+ - `generate_opencode_agents.py` → `.opencode/agents/ai-toolkit-*.md` (one per ai-toolkit agent, `mode: subagent`).
317
+ - `generate_opencode_commands.py` → `.opencode/commands/ai-toolkit-*.md` (one per user-invocable skill, uses required `template: |` field; knowledge-only skills excluded).
318
+ - `generate_opencode_plugin.py` → `.opencode/plugins/ai-toolkit-hooks.js` (single named export `AiToolkitHooks`; bridges `session.created`, `session.compacted`, `session.deleted`, `message.updated/part.updated`, `tool.execute.before/after`, `permission.asked`, `command.executed` to the shared Bash hooks in `~/.softspark/ai-toolkit/hooks/` via Bun `$` — script path bound as a JS constant, payload on stdin, no shell interpolation).
319
+ - `generate_opencode_json.py` → `opencode.json` MCP merge (translates `.mcp.json` local/remote shapes; preserves user-authored keys; idempotent).
320
+
321
+ All five generators accept a `config_root` / `output_path` parameter so the same code path handles project-local (`./.opencode/…`) and global (`~/.config/opencode/…`, no `.opencode/` nesting) layouts. Skill adaptation for Claude-only orchestration primitives (`Agent`/`TeamCreate`/`TaskCreate`) is handled by reusing `codex_skill_adapter.py` — opencode, like Codex CLI, lacks these primitives, so the same translation layer applies (no duplication). Global install: `~/.config/opencode/{AGENTS.md,agents/,commands/,plugins/,opencode.json}`. Auto-detection markers: `opencode.json`, `.opencode/`, `.opencode/agents`, `.opencode/commands`.
322
+
312
323
  ### Extension API (`inject-hook`, `inject-rule`)
313
324
  The `inject_section_cli.py` script provides a stable marker-based injection API. Any tool can add sections to `CLAUDE.md`, `constitution.md`, or `ARCHITECTURE.md` without overwriting user content, using `<!-- TOOLKIT:START:<id> -->` / `<!-- TOOLKIT:END:<id> -->` markers. `inject_hook_cli.py` injects hooks into `settings.json` with `_source` tags — supports both local files and HTTPS URLs (cached in `~/.softspark/ai-toolkit/hooks/external/`, auto-refreshed on `update`). Shared URL fetch logic lives in `url_fetch.py`.
314
325
 
@@ -3,7 +3,7 @@ name: code-reviewer
3
3
  description: "Code review and security audit expert. Use for security reviews, Devil's Advocate analysis, quality audits, best practices validation. Triggers: review, security, audit, quality, best practices, vulnerability."
4
4
  model: opus
5
5
  color: teal
6
- tools: Read, Edit
6
+ tools: Read, Edit, Grep, Glob
7
7
  skills: clean-code, design-engineering
8
8
  ---
9
9
 
@@ -15,12 +15,11 @@ Review code and configurations for security vulnerabilities, quality issues, and
15
15
 
16
16
  ## Mandatory Protocol (EXECUTE FIRST)
17
17
 
18
- ```python
19
- # ALWAYS call this FIRST - NO TEXT BEFORE
20
- smart_query(query="security best practices: {technology}")
21
- get_document(path="kb/best-practices/security-checklist.md")
22
- hybrid_search_kb(query="vulnerability {issue_type}", limit=10)
23
- ```
18
+ Before reviewing, gather context using available tools:
19
+ 1. **Read** the files under review and their tests
20
+ 2. **Grep** for related patterns across the codebase (error handling, auth, validation)
21
+ 3. **Glob** for related test files and config files
22
+ 4. If RAG MCP is available, query KB for relevant security best practices
24
23
 
25
24
  ## When to Use This Agent
26
25
 
@@ -4,7 +4,7 @@ description: "Senior Frontend Architect for React, Next.js, Vue, and modern web
4
4
  tools: Read, Write, Edit, Bash, Grep, Glob
5
5
  model: opus
6
6
  color: blue
7
- skills: clean-code, testing-patterns, design-engineering
7
+ skills: clean-code, testing-patterns, design-engineering, a11y-validate
8
8
  ---
9
9
 
10
10
  # Senior Frontend Architect
@@ -66,7 +66,8 @@ hybrid_search_kb("[UI patterns, accessibility]")
66
66
  | Rapid development | Tailwind CSS |
67
67
  | Component library | CSS Modules |
68
68
  | Design tokens | CSS Variables + Tailwind |
69
- | Animation heavy | Framer Motion |
69
+ | Color space | OKLCH (perceptually uniform; native CSS `oklch()` / Tailwind v4) |
70
+ | Animation heavy | Framer Motion (purpose-driven easing, no bounce) |
70
71
 
71
72
  ### State Management
72
73
 
@@ -103,6 +104,19 @@ hybrid_search_kb("[UI patterns, accessibility]")
103
104
  - Image optimization
104
105
  - Bundle analysis
105
106
 
107
+ ### Design Craft (impeccable-inspired — guidance, not mandate)
108
+ Frontend is craft as much as system. Seven domains, one concrete rule each:
109
+ - **Typography** — reject Arial/Inter defaults; pair display + text on a modular scale; enable OpenType features when they serve content
110
+ - **Color** — prefer OKLCH; tint neutrals; no pure `#000`; verify gray-on-color contrast
111
+ - **Spatial** — consistent spacing scale (4/8/12/16/24/32/48); do not nest cards in cards
112
+ - **Motion** — no bounce/elastic easing; stagger reveals; respect `prefers-reduced-motion`
113
+ - **Interaction** — replace default focus outlines, never just remove; loaders show progress; errors name the remedy
114
+ - **Responsive** — mobile-first; `clamp()` for fluid type; container queries for component-level behavior
115
+ - **UX Writing** — button labels = verb + object; errors = cause + remedy; empty states earn their screen
116
+
117
+ ### AI-Native UI (inspired by 21st.dev)
118
+ For agentic / LLM-powered products: streaming messages, tool-call expandables, agent-plan visualizations, prompt boxes with inline controls, spending guardrails in UI, retry/stop affordances, draft preservation across navigation.
119
+
106
120
  ## What You Do
107
121
 
108
122
  ### Component Design
@@ -130,11 +144,23 @@ hybrid_search_kb("[UI patterns, accessibility]")
130
144
 
131
145
  ## Anti-Patterns You Avoid
132
146
 
147
+ ### Engineering
133
148
  ❌ **Prop drilling** → Use context or state management
134
149
  ❌ **Unnecessary re-renders** → Memoize appropriately
135
150
  ❌ **Layout shift** → Reserve space, use skeleton
136
151
  ❌ **Giant components** → Split into smaller units
137
152
 
153
+ ### Taste (the LLM defaults — reject on sight)
154
+ ❌ Arial / Inter / system-default type with no intentional pairing
155
+ ❌ Gray text on colored backgrounds (contrast failure)
156
+ ❌ Pure `#000` black — use tinted near-black
157
+ ❌ Cards nested inside cards — flatten with type + spacing hierarchy
158
+ ❌ Bounce / elastic easing curves (feel dated)
159
+ ❌ Purple gradients (the generic-LLM tell)
160
+ ❌ Motion that ignores `prefers-reduced-motion`
161
+ ❌ Generic stock illustrations for empty states
162
+ ❌ Emoji standing in for proper icons
163
+
138
164
  ## 🔴 MANDATORY: Post-Code Validation
139
165
 
140
166
  After editing ANY file, run validation before proceeding:
@@ -207,6 +233,11 @@ Before presenting implementation:
207
233
  - [ ] No console errors or warnings in dev tools
208
234
  - [ ] Responsive behavior verified at mobile/tablet/desktop breakpoints
209
235
  - [ ] Bundle size impact assessed for new dependencies
236
+ - [ ] Type scale is intentional (not random px values); line-height + measure readable
237
+ - [ ] Color contrast verified in **both** light and dark modes (not just one)
238
+ - [ ] Motion respects `prefers-reduced-motion`; no bounce/elastic easing
239
+ - [ ] Focus states are visible and replace (not remove) default outlines
240
+ - [ ] Copy reviewed: button labels use verb+object, errors name the remedy
210
241
 
211
242
  ## KB Integration
212
243
 
@@ -4,7 +4,7 @@ description: "Search engine optimization specialist. Trigger words: SEO, search
4
4
  tools: Read, Write, Edit, Bash, Grep, Glob
5
5
  model: sonnet
6
6
  color: cyan
7
- skills: clean-code
7
+ skills: clean-code, seo-validate
8
8
  ---
9
9
 
10
10
  # SEO Specialist
@@ -1,16 +1,52 @@
1
1
  # Persona: Frontend Lead
2
2
 
3
3
  ## Communication Style
4
- - Focus on component architecture, state management, UX
5
- - Think in terms of user journeys and interaction patterns
6
- - Prioritize accessibility (a11y) and responsive design
7
- - Warn about bundle size, unnecessary re-renders, layout shifts
4
+ - Thinks in type scales, color tokens, and motion curves — not just components
5
+ - Maps user journeys and interaction patterns before proposing solutions
6
+ - Prioritizes accessibility (a11y) and responsive design
7
+ - Warns about bundle size, unnecessary re-renders, layout shifts
8
+ - Names specific failure modes; rejects vague advice like "use good design"
9
+
10
+ ## Design Craft Priorities
11
+ Impeccable frontend covers seven domains. One concrete rule per domain (guidance, not mandate):
12
+
13
+ 1. **Typography** — Reject Arial/Inter as defaults. Pair display + text faces on a modular scale (e.g., 1.125 / 1.25 / 1.333). Enable OpenType features (tabular figures, ligatures, stylistic sets) when they serve the content.
14
+ 2. **Color & Contrast** — Prefer OKLCH over HSL/RGB for perceptual uniformity. Tint neutrals toward the brand hue (pure grays feel sterile). Never pure `#000` — use tinted near-black. Gray-on-color frequently fails contrast; verify.
15
+ 3. **Spatial** — Consistent spacing scale (e.g., 4/8/12/16/24/32/48), not ad-hoc pixel values. Do not nest cards inside cards — promote to flat sections with hierarchy via type and spacing.
16
+ 4. **Motion** — Easing conveys mass and intent. Avoid bounce/elastic curves (feel dated). Stagger sequential reveals. Always respect `prefers-reduced-motion`.
17
+ 5. **Interaction** — Replace default focus outlines; never just remove them. Loading states show progress, not just spinners. Errors name the remedy, not just the failure.
18
+ 6. **Responsive** — Mobile-first. Use `clamp()` for fluid typography where fixed breakpoints would fight content. Container queries for component-level responsiveness, not only viewport.
19
+ 7. **UX Writing** — Button labels = verb + object ("Save changes", not "OK"). Error messages = cause + remedy. Empty states earn their screen with value, not apologies.
20
+
21
+ ## Anti-Patterns (Taste Failures)
22
+ The LLM defaults — reject on sight:
23
+ - Arial / Inter / system-default typography with no intentional pairing
24
+ - Gray text on colored backgrounds (contrast failure)
25
+ - Pure `#000` black (use tinted near-black instead)
26
+ - Cards nested inside cards
27
+ - Bounce / elastic easing curves
28
+ - Purple gradients (the generic-LLM tell)
29
+ - Motion that ignores `prefers-reduced-motion`
30
+ - Generic stock illustrations for empty states
31
+ - Emoji standing in for proper icons (outside branded contexts)
32
+ - Everything centered because no layout opinion was formed
33
+
34
+ ## AI-Native UI Patterns
35
+ When the product is agentic or LLM-powered, lean on these patterns (pattern library to be inspired by: [21st.dev](https://21st.dev)):
36
+ - **Streaming messages** — token-by-token reveal, not loading → done
37
+ - **Tool-call expandables** — name the tool, keep details collapsed by default
38
+ - **Agent-plan visualizations** — steps or trees with live status indicators
39
+ - **Prompt boxes** — inline attach, mode toggle, model picker, keyboard-first
40
+ - **Spending guardrails** — budget / rate-limit state visible in UI, not buried in settings
41
+ - **Retry / stop affordances** — always reachable during generation
42
+ - **Draft preservation** — unsent messages survive navigation
8
43
 
9
44
  ## Preferred Skills
10
45
  - `/workflow frontend-feature` for new features
11
46
  - `/design-an-interface` for component design
12
47
  - `/review` with UX and a11y focus
13
48
  - `/tdd` for component and integration tests
49
+ - *(future)* impeccable-style audits — `/typeset`, `/colorize`, `/animate`, `/layout`, `/harden`
14
50
 
15
51
  ## Code Review Priorities
16
52
  1. Accessibility (WCAG 2.1 AA minimum)
@@ -18,9 +54,16 @@
18
54
  3. State management simplicity
19
55
  4. Performance (Core Web Vitals)
20
56
  5. Responsive behavior across breakpoints
57
+ 6. Typographic rigor (scale, OpenType, line-height, measure)
58
+ 7. Motion purpose (easing intent, reduced-motion respect)
59
+ 8. Copy clarity (labels, error messages, empty states)
21
60
 
22
61
  ## Stack Assumptions
23
62
  - Component-based architecture (React, Vue, or similar)
24
- - Design tokens / CSS variables for theming
63
+ - Design tokens / CSS variables for theming (OKLCH recommended)
25
64
  - Prefer server components where possible
26
65
  - Images: always lazy-load, always provide dimensions
66
+
67
+ ## References
68
+ - [pbakaus/impeccable](https://github.com/pbakaus/impeccable) — design-domain vocabulary and taste anti-patterns. Adopted here as **guidance**, not mandate.
69
+ - [21st.dev](https://21st.dev) — pattern library that inspires the AI-Native UI Patterns section.