@softspark/ai-toolkit 2.1.2 → 2.2.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
@@ -386,28 +386,291 @@ Testing expert. Use for writing tests (unit, integration, e2e), TDD workflow, te
386
386
 
387
387
  ---
388
388
 
389
- <!-- TOOLKIT:jira-rules START -->
389
+ <!-- TOOLKIT:ai-toolkit START -->
390
+ <!-- Auto-generated by ai-toolkit. Re-run to update. -->
391
+
392
+ # AI Toolkit — Codex CLI Configuration
393
+
394
+ Shared AI development toolkit with specialized agents, Codex-compatible skills, quality hooks, and a safety constitution.
395
+
396
+ ## Available Agents
397
+
398
+ Specialized agent personas — apply their expertise for relevant tasks:
399
+
400
+ - **ai-engineer**: AI/ML integration specialist. Use for LLM integration, vector databases, RAG pipelines, embeddings, AI agent orchestration, document indexing, semantic search, hybrid retrieval, and answer generation. Triggers: ai, ml, llm, embedding, vector, rag, agent, openai, anthropic, search, retrieval, indexing, chunking, reranking.
401
+ - **backend-specialist**: Expert backend architect for Node.js, Python, PHP, and modern serverless systems. Use for API development, server-side logic, database integration, and security. Triggers: backend, server, api, endpoint, database, auth, fastapi, express, laravel.
402
+ - **business-intelligence**: Opportunity Discovery agent. Scans data models and code to identify missing business metrics, KPIs, and opportunities for value creation.
403
+ - **chaos-monkey**: Resilience testing agent. Use to inject faults, latency, and failures into the system to verify robustness and recovery mechanisms.
404
+ - **chief-of-staff**: Executive Summary agent. Aggregates reports from all other agents to reduce noise and present a single, actionable daily briefing to the user.
405
+ - **code-archaeologist**: Legacy code investigation and understanding specialist. Trigger words: legacy code, code archaeology, dead code, technical debt, dependency analysis, refactoring, code history
406
+ - **code-reviewer**: 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.
407
+ - **command-expert**: CLI commands and shell scripting specialist. Trigger words: bash, shell, CLI, script, automation, command line, build script, deployment script
408
+ - **data-analyst**: Data analysis and visualization expert. Use for SQL queries, data exploration, analytics, reporting, and insights. Triggers: data, analysis, sql, query, visualization, metrics, dashboard, pandas, report.
409
+ - **data-scientist**: Statistical analysis and data insights specialist. Use for statistical analysis, data visualization, EDA, A/B testing, and predictive modeling. Triggers: statistics, visualization, eda, analysis, hypothesis testing, ab test.
410
+ - **database-architect**: Database design, optimization, and operations expert. Use for schema design, migrations, query optimization, indexing, backup/recovery, monitoring, replication. Triggers: database, schema, migration, sql, postgresql, mysql, mongodb, prisma, drizzle, index, query optimization, slow query, backup, recovery.
411
+ - **debugger**: Root cause analysis expert. Use for cryptic errors, stack traces, intermittent failures, silent bugs, and systematic debugging. Triggers: debug, error, exception, traceback, bug, failure, root cause.
412
+ - **devops-implementer**: Infrastructure implementation expert. Use for writing Terraform, Ansible, Docker, and shell scripts based on approved architecture notes and implementation summaries. Triggers: terraform, ansible, docker, kubernetes, shell, infrastructure, deployment, configuration.
413
+ - **documenter**: Documentation and KB expert. Use for architecture notes, runbooks, changelogs, KB updates, how-to guides, API docs, READMEs, tutorials, SOP creation, KB organization, content quality review. Triggers: document, documentation, architecture-note, runbook, changelog, howto, readme, kb, sop, technical writing.
414
+ - **explorer-agent**: Codebase exploration and discovery agent. Use for mapping project structure, finding dependencies, understanding architecture, and research. Does NOT write code - only reads and analyzes.
415
+ - **fact-checker**: Claim verification expert. Use for verifying facts, source validation, RAG result accuracy checking. Triggers: fact check, verify, accuracy, claim, source validation.
416
+ - **frontend-specialist**: Senior Frontend Architect for React, Next.js, Vue, and modern web systems. Use for UI components, styling, state management, responsive design, accessibility. Triggers: component, react, vue, ui, ux, css, tailwind, responsive, nextjs.
417
+ - **game-developer**: Game development across all platforms (PC, Web, Mobile, VR/AR). Use for Unity, Godot, Unreal, Phaser, Three.js. Covers game mechanics, multiplayer, optimization, 2D/3D graphics.
418
+ - **incident-responder**: Production incident response expert. Use for P1-P4 incidents, outages, emergency fixes, and postmortem documentation. Triggers: incident, outage, production down, emergency, P1, alert, monitoring.
419
+ - **infrastructure-architect**: System design expert. Use for architectural decisions, architecture notes, trade-off analysis, technology selection. Triggers: architecture, design, decision, trade-off, scalability, infrastructure planning.
420
+ - **infrastructure-validator**: Deployment validation expert. Use for deployment verification, health checks, testing, rollback procedures. Triggers: validate, deploy, deployment, health check, smoke test, rollback.
421
+ - **llm-ops-engineer**: LLM operations expert. Use for LLM caching, fallback strategies, cost optimization, observability, and reliability. Triggers: llm, language model, openai, ollama, caching, fallback, token, cost.
422
+ - **mcp-specialist**: MCP server design, implementation, client configuration, and integration troubleshooting. Triggers: mcp, model context protocol, json-rpc, sse, stdio, mcp server, mcp config, mcp integration, mcp connection, claude desktop, mcp client.
423
+ - **mcp-testing-engineer**: MCP protocol testing expert. Use for MCP server testing, protocol compliance, transport validation, integration testing. Triggers: mcp test, protocol compliance, mcp validation, transport testing.
424
+ - **meta-architect**: Self-Optimization agent. Analyzes system performance and mistakes to update agent definitions and instructions. The only agent allowed to modify .claude/agents/*.
425
+ - **ml-engineer**: Machine learning systems specialist. Use for model training, data pipelines, MLOps, and model deployment. Triggers: ml, machine learning, model training, mlops, tensorflow, pytorch, scikit-learn.
426
+ - **mobile-developer**: Expert in React Native, Flutter, and native mobile development. Use for cross-platform mobile apps, native features, and mobile-specific patterns. Triggers: mobile, react native, flutter, ios, android, app store, expo, swift, kotlin.
427
+ - **night-watchman**: Autonomous maintenance agent. Use for automated dependency updates, dead code removal, refactoring, and project hygiene tasks. Typically scheduled to run off-hours.
428
+ - **nlp-engineer**: Natural Language Processing specialist. Use for text processing, NER, text classification, information extraction, and language model fine-tuning. Triggers: nlp, ner, tokenization, text classification, sentiment, spacy, transformers.
429
+ - **orchestrator**: Multi-agent coordination and task orchestration. Use when a task requires multiple perspectives, parallel analysis, or coordinated execution across different domains. Invoke for complex tasks benefiting from security, backend, frontend, testing, and DevOps expertise combined.
430
+ - **performance-optimizer**: Performance optimization expert. Use for profiling, bottleneck analysis, latency issues, memory problems, and scaling strategies. Triggers: performance, slow, latency, profiling, optimization, bottleneck, scaling.
431
+ - **predictive-analyst**: Precognition agent. Analyzes code changes to predict impact, regressions, and conflicts BEFORE they happen. Uses dependency graphs and historical data.
432
+ - **product-manager**: Product management and value maximization expert. Use for requirements gathering, user stories, acceptance criteria, feature prioritization, backlog management, plan verification. Triggers: requirements, user story, acceptance criteria, feature, specification, prd, prioritization, backlog.
433
+ - **project-planner**: Smart project planning agent. Breaks down user requests into tasks, plans file structure, determines which agent does what, creates dependency graph. Use when starting new projects or planning major features.
434
+ - **prompt-engineer**: LLM prompt design and optimization specialist. Trigger words: prompt, LLM, chain-of-thought, few-shot, system prompt, prompt engineering, token optimization
435
+ - **qa-automation-engineer**: Test automation and QA specialist. Use for E2E testing, API testing, performance testing, and CI/CD test integration. Triggers: e2e, playwright, cypress, selenium, api test, performance test, automation.
436
+ - **search-specialist**: Information retrieval and search optimization specialist. Trigger words: search, query, semantic search, information retrieval, relevance, ranking, search optimization
437
+ - **security-architect**: Proactive security design expert. Use for Threat Modeling, architecture security reviews, and designing secure systems (AuthN/AuthZ, Crypto).
438
+ - **security-auditor**: Security expert. Use for OWASP Top 10, CVE analysis, security audits, penetration testing, vulnerability assessment, hardening. Triggers: security, owasp, cve, vulnerability, audit, hardening, penetration, pentest, injection test, api security.
439
+ - **seo-specialist**: Search engine optimization specialist. Trigger words: SEO, search engine, meta tags, structured data, Core Web Vitals, sitemap, robots.txt, schema.org
440
+ - **system-governor**: The Guardian of the Constitution. Validates all evolutionary changes and enforces immutable rules. Has VETO power.
441
+ - **tech-lead**: Technical authority for code quality, architecture patterns, and stack decisions. Use for code reviews, technological disputes, and standards enforcement.
442
+ - **technical-researcher**: Deep technical investigation and multi-source research synthesis specialist. Trigger words: technical research, feasibility study, root cause analysis, API investigation, compatibility research, comparison matrix, synthesize, aggregate, report, executive summary, gap analysis, findings, multi-source, cross-reference
443
+ - **test-engineer**: Testing expert. Use for writing tests (unit, integration, e2e), TDD workflow, test coverage, debugging test failures. Triggers: test, pytest, unittest, coverage, tdd, testing, mock, fixture.
444
+
445
+ ## Available Skills
446
+
447
+ Skills are invocable commands or auto-loaded knowledge sources:
448
+
449
+ - **agent-creator**: Creates new specialized agents with frontmatter, tool selection, and delegation guidance
450
+ - **analyze**: Analyze code quality, complexity, and patterns
451
+ - **api-patterns**: Loaded when user asks about REST API design or GraphQL patterns
452
+ - **app-builder**: Loaded when user asks to scaffold or build a full-stack app
453
+ - **architecture-audit**: Explore codebase organically for architectural friction, discover shallow modules, and propose module-deepening refactors as GitHub issue RFCs using parallel sub-agent interface designs. Use when user wants to improve architecture, find shallow modules, deepen modules, or reduce coupling. Codex-adapted: uses native subagents and plan tracking.
454
+ - **architecture-decision**: Loaded when user asks about architecture decisions or architecture note writing
455
+ - **biz-scan**: Scan codebase for business opportunities and KPIs
456
+ - **brand-voice**: Loaded when writing documentation, content, README, or user-facing text. Prevents generic LLM rhetoric and enforces direct, technical voice.
457
+ - **briefing**: Generate executive daily briefing across all agents
458
+ - **build**: Build the project with auto-detected toolchain
459
+ - **chaos**: Inject controlled faults for resilience testing
460
+ - **ci**: Detect and run CI pipeline with status reporting
461
+ - **ci-cd-patterns**: Loaded when user asks about CI/CD pipelines or deployment automation
462
+ - **clean-code**: Loaded when user asks about clean code, naming, or code quality
463
+ - **command-creator**: Creates new Claude Code slash commands with frontmatter, workflow guidance, and validation
464
+ - **commit**: Create Conventional Commits with pre-commit validation
465
+ - **council**: 4-perspective decision evaluation for architecture choices. Use when user wants multi-angle analysis, needs to decide between alternatives, or mentions 'council', 'evaluate decision', 'pros cons'. Codex-adapted: uses native subagents and plan tracking.
466
+ - **csharp-patterns**: Loaded when user asks about C# or .NET development patterns
467
+ - **cve-scan**: Scan project dependencies for known CVEs using native audit tools (npm, pip, composer, cargo, go, bundler, dart)
468
+ - **database-patterns**: Loaded when user asks about database schema or query optimization
469
+ - **debug**: Debug errors and trace root causes systematically
470
+ - **debugging-tactics**: Loaded when user is debugging an issue or needs root cause analysis
471
+ - **deploy**: Deploy with pre-flight checks and health verification
472
+ - **design-an-interface**: Generate multiple radically different interface designs using parallel sub-agents, then compare on simplicity, depth, and correctness. Based on 'Design It Twice' from Ousterhout. Use when user wants to design an API, explore interface options, compare module shapes, or mentions 'design it twice'. Codex-adapted: uses native subagents and plan tracking.
473
+ - **design-engineering**: Loaded when user asks about UI animations or CSS design craft
474
+ - **docker-devops**: Loaded when user asks about Docker, containers, or DevOps patterns
475
+ - **docs**: Generate and update README, API docs, and architecture notes
476
+ - **documentation-standards**: Loaded when creating or updating KB documents, architecture notes, SOPs, or any file in kb/ directory
477
+ - **ecommerce-patterns**: Loaded when user asks about e-commerce or shopping cart features
478
+ - **evaluate**: Evaluate skill quality and RAG retrieval accuracy
479
+ - **evolve**: Evolve agent definitions via meta-architect
480
+ - **explain**: Explain code, architecture, or concepts with diagrams
481
+ - **explore**: Explore codebase structure, stack, and architecture
482
+ - **fix**: Auto-fix lint errors, type issues, and simple bugs
483
+ - **flutter-patterns**: Loaded when user asks about Flutter or Dart development patterns
484
+ - **git-mastery**: Loaded when user asks about advanced Git workflows or history rewriting
485
+ - **grill-me**: Stress-test a plan or design through relentless Socratic questioning, walking down each decision branch until reaching shared understanding. Use when user wants to stress-test a plan, get grilled, validate assumptions, or mentions 'grill me'. Codex-adapted: uses native subagents and plan tracking.
486
+ - **health**: Report service and infrastructure health status
487
+ - **hipaa-validate**: Validate code against HIPAA policy: PHI exposure, missing audit logging, unencrypted transmission/storage, access control gaps, temp file exposure, and missing BAA references
488
+ - **hive-mind**: Loaded when orchestrating multi-agent swarms or consensus workflows
489
+ - **hook-creator**: Creates new Claude Code hooks with guided workflow, strict conventions, and validation
490
+ - **index**: Index codebase into the knowledge base
491
+ - **instinct-review**: Review and manage learned instincts from past sessions
492
+ - **introspect**: Agent self-debugging and recovery. Use when stuck in loops, making repeated errors, or quality degrades. Triggers: introspect, self-debug, stuck, loop, why failing.
493
+ - **java-patterns**: Loaded when user asks about Java development patterns
494
+ - **kotlin-patterns**: Loaded when user asks about Kotlin development patterns
495
+ - **lint**: Lint code with auto-detected tools and fix suggestions
496
+ - **mcp-patterns**: Loaded when user asks about MCP servers or tool protocol design
497
+ - **mem-search**: Search past coding sessions using natural language. Finds relevant observations, decisions, and context from previous work.
498
+ - **migrate**: Run database migrations with backup verification
499
+ - **migration-patterns**: Loaded when user asks about database migrations or zero-downtime deploys
500
+ - **night-watch**: Run autonomous maintenance and dependency updates
501
+ - **observability-patterns**: Loaded when user asks about logging, metrics, or tracing patterns
502
+ - **onboard**: Generate project onboarding materials
503
+ - **orchestrate**: Coordinate multiple specialized agents in parallel Codex-adapted: uses native subagents and plan tracking.
504
+ - **panic**: Emergency stabilization via system-governor agent
505
+ - **performance-profiling**: Loaded when user asks about performance profiling or optimization
506
+ - **persona**: Switch engineering persona at runtime: backend-lead, frontend-lead, devops-eng, junior-dev
507
+ - **plan**: Plan implementation with tasks and success criteria
508
+ - **plan-writing**: Loaded when user asks to write an implementation plan or pre-mortem
509
+ - **plugin-creator**: Creates experimental opt-in plugin packs with manifests, conventions, and optional module scaffolding for Claude and Codex runtimes
510
+ - **pr**: Create pull requests with pre-flight validation
511
+ - **prd-to-issues**: Break a PRD into independently-grabbable GitHub issues using vertical slices with HITL/AFK tagging and dependency ordering. Use when user wants to convert a PRD to issues, create tickets, or break down a PRD into work items.
512
+ - **prd-to-plan**: Convert a PRD into a phased implementation plan using tracer-bullet vertical slices. Use when user wants to break down a PRD, create an implementation plan, plan phases from a PRD, or mentions tracer bullets. Codex-adapted: uses native subagents and plan tracking.
513
+ - **predict**: Predict regressions and impact before changes land
514
+ - **qa-session**: Interactive QA session where user reports bugs conversationally and agent files GitHub issues with domain language. Explores codebase in background for context. Use when user wants to report bugs, do QA, file issues conversationally, or mentions QA session. Codex-adapted: uses native subagents and plan tracking.
515
+ - **rag-patterns**: Loaded when user asks about RAG systems, embeddings, or vector search
516
+ - **refactor**: Refactor code for quality and maintainability
517
+ - **refactor-plan**: Create a detailed refactor plan with tiny commits via user interview, then file as a GitHub issue RFC. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps. Codex-adapted: uses native subagents and plan tracking.
518
+ - **repeat**: Run a prompt or slash command on a recurring interval until task complete or limits reached. Use when user wants to set up a recurring task, poll for status, or run something repeatedly on an interval. Codex-adapted: uses native subagents and plan tracking.
519
+ - **research-mastery**: Loaded when user asks to research, verify, or synthesize information
520
+ - **review**: Review code for quality, security, and correctness
521
+ - **rollback**: Roll back a deployment safely with verification
522
+ - **ruby-patterns**: Loaded when user asks about Ruby development patterns
523
+ - **rust-patterns**: Loaded when user asks about Rust development patterns
524
+ - **search**: Search the knowledge base with semantic and hybrid modes
525
+ - **security-patterns**: Loaded when user asks about security, OWASP, or auth patterns
526
+ - **skill-audit**: Scan skills and agents for security risks: dangerous patterns, secrets, excessive permissions
527
+ - **skill-creator**: Create new skills from templates with guided workflow
528
+ - **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.
529
+ - **swarm**: Execute tasks via Map-Reduce, Consensus, or Relay swarms Codex-adapted: uses native subagents and plan tracking.
530
+ - **swift-patterns**: Loaded when user asks about Swift or iOS development patterns
531
+ - **tdd**: Test-driven development with red-green-refactor loop and vertical slices. Use when user wants TDD, test-first development, red-green-refactor, or building features with tests driving the implementation. Codex-adapted: uses native subagents and plan tracking.
532
+ - **teams**: Launch pre-configured Agent Teams for common workflows Codex-adapted: uses native subagents and plan tracking.
533
+ - **test**: Run tests with coverage analysis and reporting
534
+ - **testing-patterns**: Loaded when user asks about testing strategy, fixtures, or mocking
535
+ - **triage-issue**: Triage a bug by deeply exploring the codebase for root cause, then create a GitHub issue with a TDD-based fix plan. Mostly hands-off — minimal user interaction. Use when user reports a bug, wants to investigate an issue, mentions triage, or wants a fix plan. Codex-adapted: uses native subagents and plan tracking.
536
+ - **typescript-patterns**: Loaded when user asks about TypeScript patterns or type safety
537
+ - **ubiquitous-language**: Extract a DDD-style ubiquitous language glossary from the conversation, flagging ambiguities and proposing canonical terms. Saves to UBIQUITOUS_LANGUAGE.md. Use when user wants to define domain terms, build a glossary, harden terminology, or mentions DDD or domain model.
538
+ - **verification-before-completion**: Loaded when agent is about to claim work is complete, fixed, or passing — requires running verification commands and confirming output before making any success claims. Evidence before assertions, always.
539
+ - **workflow**: Start and manage autonomous agent workflows Codex-adapted: uses native subagents and plan tracking.
540
+ - **write-a-prd**: Create a Product Requirements Document through interactive interview, codebase exploration, and deep module design. Use when user wants to write a PRD, create product requirements, or plan a new feature from scratch. Codex-adapted: uses native subagents and plan tracking.
541
+
542
+ ## Quality Standards
543
+
544
+ Derived from the immutable safety constitution (5 articles):
545
+
546
+ **Article I — Safety First**
547
+ - No data loss: never delete files without backup verification or using reversible operations
548
+ - No blind execution: never run LLM-generated code without static analysis or review
549
+ - No infinite loops: all autonomous loops must have a maximum iteration count (max 3)
550
+
551
+ **Article II — Hierarchy of Truth**
552
+ - The Knowledge Base (`kb/`) is the source of truth; if code contradicts KB, check KB freshness
553
+ - Use the research-mastery skill before any major decision; guessing is forbidden
554
+
555
+ **Article III — Operational Integrity**
556
+ - "Green Tests" is the only definition of Done; forced merges on red tests are unacceptable
557
+ - Never delete audit logs or KB archives without explicit user approval and backup verification
558
+ - Agents cannot change their own model or tool permissions without user approval
559
+
560
+ **Article IV — Self-Preservation**
561
+ - The constitution file is read-only for all agents except the user
562
+ - If a constitutional violation is detected, halt the offending operation immediately
563
+
564
+ **Article V — Resource Governance**
565
+ - Commands like `rm -rf`, `DROP TABLE`, `FORMAT` require explicit user confirmation
566
+ - Operate within assigned model tiers; model tier changes require user approval
567
+
568
+ ## Workflow Guidelines
569
+
570
+ - **Plan First**: Tasks longer than 1 hour require a plan, success criteria, and pre-mortem
571
+ - **Multi-Agent**: Use minimum 3 agents for complex tasks; single-agent for simple tasks
572
+ - **2-Phase Execution**: Plan → User Approval → Implement (never skip the approval checkpoint)
573
+ - **KB-First Research**: Search the knowledge base before writing code or answering questions
574
+ - **Structured Commits**: Use `feat/fix/docs/refactor/test/chore` prefixes (Conventional Commits)
575
+ - **Quality Gates**: Run `ruff check .` (Python), `tsc` (TypeScript), `go vet` (Go) before marking done
576
+ - **Cite Sources**: Always reference `[PATH: ...]` when making decisions based on existing knowledge
577
+ - **Read-Only Exploration**: Discovery agents never write; writing agents never explore blindly
578
+ - **No Secrets in Code**: Never commit credentials, API keys, or sensitive configuration values
579
+ <!-- TOOLKIT:ai-toolkit END -->
580
+
581
+ <!-- TOOLKIT:jira-mcp START -->
390
582
  <!-- Auto-injected by ai-toolkit. Re-run to update. -->
391
583
 
392
584
  # Jira MCP Server
393
585
 
394
- Tools: `sync_tasks`, `read_cached_tasks`, `update_task_status`, `add_task_comment`, `reassign_task`, `get_task_statuses`, `get_task_details`, `log_task_time`, `get_task_time_tracking`
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`
395
587
 
396
588
  ## Key Rules
397
589
 
398
- - **Always `sync_tasks` first** before reading cache may be stale.
399
- - **Time format:** `"2h 30m"` hours and minutes only, never days.
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.
400
593
  - **Status changes:** call `get_task_statuses` first to check valid transitions.
401
594
  - **Multi-instance:** project key determines which Jira instance is used (mapped in config.json).
595
+ - **Comments are ADF:** `add_task_comment` converts markdown to ADF (Atlassian Document Format) automatically.
596
+ - **Templates:** use `list_comment_templates` to discover available templates, then `add_templated_comment` with `template_id` + `variables`.
402
597
 
403
598
  ## Workflow
404
599
 
405
- 1. `sync_tasks(jql="assignee=currentUser() AND status!=Done")` fetch fresh
406
- 2. `read_cached_tasks()` work offline
407
- 3. `get_task_details(task_key="PROJ-123")` deep dive
408
- 4. `update_task_status(...)` / `add_task_comment(...)` / `log_task_time(...)` mutate
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
604
+
605
+ ## Comment Templates (8 built-in)
606
+
607
+ | ID | Use for |
608
+ |----|---------|
609
+ | `status-update` | Progress report with completed/next/blockers |
610
+ | `blocker-notification` | Escalate blocking issue |
611
+ | `handoff-transition` | Task handoff between people |
612
+ | `review-request` | Request code review |
613
+ | `sprint-update` | Sprint progress report |
614
+ | `bug-report` | Structured bug report |
615
+ | `deployment-note` | Deployment documentation |
616
+ | `time-log-summary` | Time logging with description |
617
+
618
+ ## CLI Commands
619
+
620
+ | Command | Description |
621
+ |---------|-------------|
622
+ | `jira-mcp config init` | Initialize global config (~/.softspark/jira-mcp/) |
623
+ | `jira-mcp config add-project <key> <url>` | Add Jira project mapping |
624
+ | `jira-mcp config remove-project <key>` | Remove a project |
625
+ | `jira-mcp config list-projects` | Show configured projects with language |
626
+ | `jira-mcp config set-default <key>` | Set default project |
627
+ | `jira-mcp config set-credentials` | Set API credentials |
628
+ | `jira-mcp config set-language <lang>` | Set global default language |
629
+ | `jira-mcp config set-project-language <key> <lang>` | Set language for a specific project |
630
+ | `jira-mcp create <path>` | Create tasks from template (dry-run default) |
631
+ | `jira-mcp create-monthly` | Create monthly admin tasks |
632
+ | `jira-mcp cache sync-users` | Cache user list for reassignment |
633
+ | `jira-mcp cache sync-workflows` | Cache status transitions |
634
+ | `jira-mcp cache list-users` | Show cached users |
635
+ | `jira-mcp cache list-workflows` | Show cached workflows |
636
+
637
+ ## Architecture
638
+
639
+ Four layers -- each depends only on layers below:
640
+
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
645
+
646
+ ## Coding Conventions
647
+
648
+ - **Strict TypeScript**: `strict: true`, NO `any`, `readonly` interfaces, `import type`, `.js` imports
649
+ - **Zod schemas** for all external data: `type Foo = z.infer<typeof FooSchema>`
650
+ - **Error classes**: extend `JiraMcpError` with `code` property
651
+ - **ADF round-trip**: `markdownToAdf()` for writes, `adfToMarkdown()` for reads -- NEVER throw
652
+ - **InstancePool**: singleton, lazy connectors, dedup by URL
653
+ - **Dual-write**: after Jira mutation, update local cache, return API result
654
+ - **Dry-run default**: `--execute` required for destructive operations
655
+ - **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`
658
+
659
+ ## Testing
660
+
661
+ - **Vitest**: 70% coverage threshold, `vi.fn()` for mocks
662
+ - **No real Jira API calls** in tests, use `tests/fixtures/mocks.ts`
663
+ - **Filesystem tests**: `os.tmpdir()` + `mkdtemp()`, NEVER write to `~/.softspark/`
664
+ - Quick pre-commit: `npm run typecheck && npm run lint && npm test && npm run build`
665
+
666
+ ## KB & SOPs
667
+
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
671
+
672
+ <!-- TOOLKIT:jira-mcp END -->
409
673
 
410
- <!-- TOOLKIT:jira-rules END -->
411
674
  <!-- TOOLKIT:rag-mcp-rules START -->
412
675
  <!-- Auto-injected by ai-toolkit. Re-run to update. -->
413
676
 
@@ -432,4 +695,3 @@ Default tool: `smart_query()`. Use `hybrid_search_kb()` for speed, `crag_search(
432
695
  ALWAYS check `kb/procedures/` first: `smart_query("SOP for <task>")`.
433
696
 
434
697
  <!-- TOOLKIT:rag-mcp-rules END -->
435
-
package/CHANGELOG.md CHANGED
@@ -7,10 +7,25 @@ Versioning follows [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ---
9
9
 
10
- ## v2.1.2Idempotent Update Fix (2026-04-13)
10
+ ## v2.2.0URL Rules & Registry Safety (2026-04-14)
11
+
12
+ ### Added
13
+ - **URL rule registration** — `ai-toolkit add-rule https://...` registers rules from HTTPS URLs. URL-sourced rules are tracked in `rules/sources.json` and auto-refreshed on every `ai-toolkit update`. Falls back to cached local copy on network failure.
14
+ - **Version consistency validation** — `validate.py --strict` now cross-checks `package.json`, `manifest.json`, and `plugin.json` versions match
15
+
16
+ ### Fixed
17
+ - **Project registry race condition** — parallel `install --local` during `ai-toolkit update` could silently drop registry entries. Fixed with `fcntl.flock` exclusive lock, atomic writes (tempfile + rename), and deferred sequential registration after parallel phase.
18
+ - **Version drift** — `manifest.json` and `plugin.json` were stuck at 1.9.0 since v2.0.0, now synced
19
+ - **Language rules count** — ARCHITECTURE.md claimed 70 files, actual is 68
20
+ - **Skills catalog tiers** — added missing Tier 1.5 (planning pipeline + design/architecture)
21
+
22
+ ---
23
+
24
+ ## v2.1.3 — Idempotent Update Fix (2026-04-13)
11
25
 
12
26
  ### Fixed
13
- - **`ai-toolkit update` no longer dirties git** — generators now skip custom rule emission when called by `inject_with_rules()` (which handles injection separately). Previously, `update` caused AGENTS.md and other generated files to gain extra blank lines on every run.
27
+ - **`ai-toolkit update` no longer dirties git** — `inject_with_rules()` now strips all existing TOOLKIT sections before re-injecting, and `generate_agents_md.py` includes the Codex block for format consistency. Running `update` on a clean repo leaves zero uncommitted changes.
28
+ - **Custom rules always present** — all generators (standalone and via `inject_with_rules`) emit registered custom rules in every output format
14
29
 
15
30
  ---
16
31
 
package/README.md CHANGED
@@ -6,11 +6,11 @@
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
7
  [![Skills](https://img.shields.io/badge/skills-92-brightgreen)](app/skills/)
8
8
  [![Agents](https://img.shields.io/badge/agents-44-blue)](app/agents/)
9
- [![Tests](https://img.shields.io/badge/tests-598%20passing-success)](tests/)
9
+ [![Tests](https://img.shields.io/badge/tests-604%20passing-success)](tests/)
10
10
 
11
11
  ---
12
12
 
13
- ## What's New in v2.1.2
13
+ ## What's New in v2.1.3
14
14
 
15
15
  - **Idempotent update** — `ai-toolkit update` no longer dirties git with extra blank lines in generated files
16
16
  - **Custom rules in generators** — `generate:all` preserves registered rules from other repos across all platforms
@@ -142,7 +142,7 @@ ai-toolkit/
142
142
  │ └── ARCHITECTURE.md # Full system design
143
143
  ├── kb/ # Reference docs, procedures, plans
144
144
  ├── scripts/ # Validation, install, evaluation scripts
145
- ├── tests/ # Bats test suite (598 tests)
145
+ ├── tests/ # Bats test suite (604 tests)
146
146
  └── CHANGELOG.md
147
147
  ```
148
148
 
@@ -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.9.0",
4
+ "version": "2.2.0",
5
5
  "author": {
6
6
  "name": "SoftSpark",
7
7
  "url": "https://github.com/softspark"
@@ -304,7 +304,7 @@ Lead Session (You)
304
304
  ### MCP Templates (25)
305
305
  `app/plugins/mcp-templates/` ships 25 ready-to-use MCP server config templates (filesystems, databases, GitHub, Slack, etc.). Opt-in via `ai-toolkit install --modules mcp-templates` or activated automatically with `--profile strict|full`.
306
306
 
307
- ### Language Rules (70 files, 13 languages)
307
+ ### Language Rules (68 files, 13 languages)
308
308
  `app/rules/` contains per-language coding rules. Supported languages: TypeScript, Python, Go, Rust, Java, Kotlin, Swift, Dart, C#, PHP, C++, Ruby, and common (shared). Auto-detected from project files via `--auto-detect` or selected with `--modules rules-<lang>`.
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()`.
package/bin/ai-toolkit.js CHANGED
@@ -63,7 +63,7 @@ const COMMANDS = {
63
63
  status: 'Show installed modules, version, and profile from state.json',
64
64
  reset: 'Wipe and recreate project-local configs from scratch (requires --local)',
65
65
  uninstall: 'Remove ai-toolkit from ~/.claude/',
66
- 'add-rule': 'Register a rule file in ~/.softspark/ai-toolkit/rules/ (applied on every install/update)',
66
+ 'add-rule': 'Register a rule file or URL in ~/.softspark/ai-toolkit/rules/ (URL rules auto-refresh on update)',
67
67
  'remove-rule': 'Unregister a rule from ~/.softspark/ai-toolkit/rules/ and remove its block from CLAUDE.md',
68
68
  'inject-hook': 'Inject external hooks into ~/.claude/settings.json (tagged with _source for idempotent updates)',
69
69
  'remove-hook': 'Remove injected hooks by source name from ~/.claude/settings.json',
@@ -232,8 +232,8 @@ function showHelp() {
232
232
  console.log(' <source-name> Source tag to remove (derived from hooks filename stem)');
233
233
  console.log(' [target-dir] Target dir containing .claude/settings.json (default: $HOME)');
234
234
  console.log('\nOptions for add-rule:');
235
- console.log(' <rule-file> Path to .md rule file to register globally');
236
- console.log(' [rule-name] Override rule name (default: filename without .md)');
235
+ console.log(' <rule-file> Path to .md rule file or HTTPS URL to register globally');
236
+ console.log(' [rule-name] Override rule name (default: filename/URL stem without .md)');
237
237
  console.log('\nOptions for plugin:');
238
238
  console.log(' install <name> Install a plugin pack (--editor claude|codex|all)');
239
239
  console.log(' install --all Install all available plugin packs for selected editor(s)');
@@ -333,16 +333,18 @@ function handleRemoveRule(args) {
333
333
  }
334
334
 
335
335
  /**
336
- * Handle `ai-toolkit add-rule` -- validates rule file, resolves absolute path.
336
+ * Handle `ai-toolkit add-rule` -- validates rule file/URL, resolves absolute path.
337
337
  * @param {string[]} args
338
338
  */
339
339
  function handleAddRule(args) {
340
340
  const ruleFile = args[0];
341
341
  if (!ruleFile) {
342
- console.error('Usage: ai-toolkit add-rule <rule-file> [rule-name]');
342
+ console.error('Usage: ai-toolkit add-rule <rule-file-or-url> [rule-name]');
343
343
  process.exit(1);
344
344
  }
345
- const absRuleFile = path.resolve(CWD, ruleFile);
345
+ // Pass URLs through directly (don't resolve as filesystem path)
346
+ const isUrl = ruleFile.startsWith('https://') || ruleFile.startsWith('http://');
347
+ const absRuleFile = isUrl ? ruleFile : path.resolve(CWD, ruleFile);
346
348
  const ruleName = args[1];
347
349
  run(scriptPath('add_rule.py'), ruleName ? [absRuleFile, ruleName] : [absRuleFile]);
348
350
  }
@@ -319,6 +319,7 @@ Follow this sequence before every `npm publish` / `git tag`:
319
319
 
320
320
  ```bash
321
321
  # Edit package.json version field (semver: X.Y.Z)
322
+ # Sync package-lock.json: npm install --package-lock-only
322
323
  # Add entry to CHANGELOG.md
323
324
  ```
324
325
 
@@ -108,8 +108,9 @@ The canonical version lives in `package.json`. These files **must** match:
108
108
  | `README.md` | Badge counts, "What You Get" table |
109
109
  | `app/ARCHITECTURE.md` | Section headings with counts |
110
110
 
111
- > **Tip:** `validate.py --strict` and `npm test` (metadata contract tests) catch
112
- > count drift automatically. If tests pass, counts are correct.
111
+ > **Tip:** `validate.py --strict` catches count drift AND version mismatches
112
+ > (package.json vs manifest.json vs plugin.json) automatically.
113
+ > If validation passes, counts and versions are correct.
113
114
 
114
115
  ### Verification command
115
116
 
@@ -17,7 +17,9 @@ All functionality is unified under skills. Task and hybrid skills are user-invoc
17
17
 
18
18
  | Tier | Skills | When |
19
19
  |------|--------|------|
20
- | **1 — Quick single-agent** | `/debug`, `/review`, `/refactor`, `/analyze`, `/docs`, `/plan`, `/explain` | One concern, fast |
20
+ | **1 — Quick single-agent** | `/debug`, `/review`, `/refactor`, `/analyze`, `/docs`, `/plan`, `/explain`, `/tdd`, `/grill-me`, `/triage-issue` | One concern, fast |
21
+ | **1.5 — Product planning** | `/write-a-prd` → `/prd-to-plan` → `/prd-to-issues` | Interview-driven PRD → vertical-slice plan → GitHub issues |
22
+ | **1.5 — Design & architecture** | `/design-an-interface`, `/architecture-audit`, `/refactor-plan`, `/ubiquitous-language`, `/qa-session` | Parallel sub-agent exploration |
21
23
  | **2 — Multi-agent workflow** | `/workflow <type>` | Cross-cutting task with known pattern |
22
24
  | **3 — Custom parallelism** | `/orchestrate`, `/swarm` | No predefined workflow matches |
23
25
 
package/llms-full.txt CHANGED
@@ -3441,6 +3441,7 @@ Follow this sequence before every `npm publish` / `git tag`:
3441
3441
 
3442
3442
  ```bash
3443
3443
  # Edit package.json version field (semver: X.Y.Z)
3444
+ # Sync package-lock.json: npm install --package-lock-only
3444
3445
  # Add entry to CHANGELOG.md
3445
3446
  ```
3446
3447
 
@@ -3619,8 +3620,9 @@ The canonical version lives in `package.json`. These files **must** match:
3619
3620
  | `README.md` | Badge counts, "What You Get" table |
3620
3621
  | `app/ARCHITECTURE.md` | Section headings with counts |
3621
3622
 
3622
- > **Tip:** `validate.py --strict` and `npm test` (metadata contract tests) catch
3623
- > count drift automatically. If tests pass, counts are correct.
3623
+ > **Tip:** `validate.py --strict` catches count drift AND version mismatches
3624
+ > (package.json vs manifest.json vs plugin.json) automatically.
3625
+ > If validation passes, counts and versions are correct.
3624
3626
 
3625
3627
  ### Verification command
3626
3628
 
@@ -8518,7 +8520,9 @@ All functionality is unified under skills. Task and hybrid skills are user-invoc
8518
8520
 
8519
8521
  | Tier | Skills | When |
8520
8522
  |------|--------|------|
8521
- | **1 — Quick single-agent** | `/debug`, `/review`, `/refactor`, `/analyze`, `/docs`, `/plan`, `/explain` | One concern, fast |
8523
+ | **1 — Quick single-agent** | `/debug`, `/review`, `/refactor`, `/analyze`, `/docs`, `/plan`, `/explain`, `/tdd`, `/grill-me`, `/triage-issue` | One concern, fast |
8524
+ | **1.5 — Product planning** | `/write-a-prd` → `/prd-to-plan` → `/prd-to-issues` | Interview-driven PRD → vertical-slice plan → GitHub issues |
8525
+ | **1.5 — Design & architecture** | `/design-an-interface`, `/architecture-audit`, `/refactor-plan`, `/ubiquitous-language`, `/qa-session` | Parallel sub-agent exploration |
8522
8526
  | **2 — Multi-agent workflow** | `/workflow <type>` | Cross-cutting task with known pattern |
8523
8527
  | **3 — Custom parallelism** | `/orchestrate`, `/swarm` | No predefined workflow matches |
8524
8528
 
package/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.9.0",
2
+ "version": "2.2.0",
3
3
  "components": {
4
4
  "agents": {
5
5
  "description": "44 specialized agents (orchestrator, backend, frontend, security, devops, etc.)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softspark/ai-toolkit",
3
- "version": "2.1.2",
3
+ "version": "2.2.0",
4
4
  "description": "Professional-grade AI coding toolkit: 92 skills, 44 agents, multi-platform support (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, Google Antigravity, Codex CLI), machine-enforced safety constitution, persona presets, skill security auditor, expanded lifecycle hooks, 11 plugin packs, and benchmark tooling.",
5
5
  "keywords": [
6
6
  "claude",