@softspark/jira-mcp 1.1.0 → 1.3.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/CHANGELOG.md CHANGED
@@ -7,6 +7,39 @@ Versioning follows [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ---
9
9
 
10
+ ## v1.3.0 -- File-Backed Templates & Approval Hooks (2026-04-15)
11
+
12
+ ### Added
13
+ - **File-backed template catalog** -- ship built-in comment and single-task templates as physical markdown files under `templates-system/`.
14
+ - **Template management CLI** -- add `jira-mcp template add/list/show/remove` for global user overrides in `~/.softspark/jira-mcp/templates/`.
15
+ - **Task templates for `create_task`** -- add `list_task_templates` and template-based issue creation with variable rendering.
16
+ - **Comment approval hook manifest** -- ship `hooks/jira-mcp-hooks.json` for ai-toolkit `inject-hook` flows that preview and gate Jira comment writes.
17
+
18
+ ### Changed
19
+ - **Template loading model** -- resolve active templates from system files plus global user overrides, with user files winning on `id` collisions.
20
+ - **Configuration init** -- create dedicated template directories for comments, single-task templates, and bulk task configs.
21
+ - **README validation** -- exclude internal tool helpers from MCP tool counts and refresh counts to match the current source tree.
22
+
23
+ ### Fixed
24
+ - **Comment write safety** -- require explicit `user_approved=true` before `add_task_comment` and `add_templated_comment` can mutate Jira.
25
+ - **Comment preview flow** -- render templated comment previews before execution so approval can target the exact outgoing markdown.
26
+
27
+ ## v1.2.0 -- Per-Instance Credentials & Jira API Migration (2026-04-14)
28
+
29
+ ### Added
30
+ - **Per-instance credentials** -- `set-credentials --url` flag allows different API tokens per Jira instance. Auto-migrates legacy Format A to Format B on first use.
31
+ - **Live Jira API smoke tests** -- post-release SOP now includes Phase 4 with 15 steps testing all MCP tools against the KAN sandbox project.
32
+ - **`validate_counts.py` in pre-commit SOP** -- added as Step 5 to catch README count drift before commit.
33
+
34
+ ### Changed
35
+ - **Search endpoint migrated** -- `/rest/api/3/search` → `/rest/api/3/search/jql` (Jira Cloud deprecated the old endpoint with HTTP 410).
36
+ - **`set-credentials` CLI** -- read-modify-write instead of overwrite. Preserves existing credentials when adding instance overrides.
37
+
38
+ ### Fixed
39
+ - **Jira Cloud 410 on sync/search** -- `sync_tasks` and `search_tasks` failed on instances where Jira had removed the legacy search endpoint.
40
+
41
+ ---
42
+
10
43
  ## v1.1.0 -- Hardening & Market Readiness (2026-04-14)
11
44
 
12
45
  ### Added
package/README.md CHANGED
@@ -4,19 +4,18 @@
4
4
 
5
5
  [![CI](https://github.com/softspark/jira-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/softspark/jira-mcp/actions/workflows/ci.yml)
6
6
  [![npm](https://img.shields.io/npm/v/@softspark/jira-mcp)](https://www.npmjs.com/package/@softspark/jira-mcp)
7
- [![version](https://img.shields.io/badge/version-1.1.0-blue)](CHANGELOG.md)
7
+ [![version](https://img.shields.io/badge/version-1.3.0-blue)](CHANGELOG.md)
8
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
9
9
 
10
10
  ---
11
11
 
12
- ## What's New in v1.1.0
12
+ ## What's New in v1.3.0
13
13
 
14
- - **Hardening & market readiness** -- boundary tests, retry/backoff, security fixes, server refactor.
15
- - **509 tests** across 51 test files -- boundary tests for `server.ts`, CLI bootstrap, and `JiraConnector` (96 new tests).
16
- - **Retry/backoff** -- transient Jira API failures (429, 503) retried up to 3x with exponential backoff.
17
- - **server.ts refactored** -- 719 324 lines. Tool definitions and argument helpers extracted to dedicated modules.
18
- - **Major dep upgrades** -- TypeScript 6, ESLint 10, zod 4, vitest 4.
19
- - **Security hardened** -- cache 0o600, CWD config warning, error truncation, count validation in CI.
14
+ - **File-backed templates** -- built-in comment and task templates now live as physical markdown files and support global user overrides.
15
+ - **Template CLI + `create_task` templates** -- add install/list/show/remove flows and first-class task template rendering.
16
+ - **Comment approval hooks** -- ship a repo-owned ai-toolkit hook manifest that previews Jira comments before the write executes.
17
+ - **Runtime approval enforcement** -- block comment mutations unless the retry includes `user_approved=true`.
18
+ - **541 tests** across 56 test files.
20
19
 
21
20
  See [CHANGELOG.md](CHANGELOG.md) for full details.
22
21
 
@@ -76,6 +75,10 @@ All configuration lives in `~/.softspark/jira-mcp/` (created by `jira-mcp config
76
75
  | `jira-mcp serve` | Start MCP server (explicit) |
77
76
  | `jira-mcp create <path>` | Create tasks from config file (dry-run by default) |
78
77
  | `jira-mcp create-monthly` | Create monthly admin tasks from built-in templates |
78
+ | `jira-mcp template add <type> <path>` | Install a template override from a local markdown file |
79
+ | `jira-mcp template list [type]` | List active comment/task templates |
80
+ | `jira-mcp template show <type> <id>` | Show the active template file content |
81
+ | `jira-mcp template remove <type> <id>` | Remove a user-installed template override |
79
82
  | `jira-mcp config init` | Initialize global config at `~/.softspark/jira-mcp/` |
80
83
  | `jira-mcp config add-project <key> <url>` | Add a Jira project to config |
81
84
  | `jira-mcp config remove-project <key>` | Remove a project from config |
@@ -97,7 +100,7 @@ All configuration lives in `~/.softspark/jira-mcp/` (created by `jira-mcp config
97
100
  | `read_cached_tasks` | Read tasks from cache without hitting Jira | `task_key?` |
98
101
  | `update_task_status` | Change task status via workflow transition | `task_key`, `status` |
99
102
  | `update_task` | Update existing issue fields (markdown → ADF) | `task_key`, `summary?`, `description?`, `priority?`, `labels?` |
100
- | `add_task_comment` | Add a markdown comment (auto-converted to ADF) | `task_key`, `comment` |
103
+ | `add_task_comment` | Add a markdown comment (auto-converted to ADF) | `task_key`, `comment`, `user_approved` |
101
104
  | `reassign_task` | Reassign or unassign a task | `task_key`, `assignee_email?` |
102
105
  | `get_task_statuses` | Get valid workflow transitions for a task | `task_key` |
103
106
  | `get_task_details` | Get full details with description, comments, and language | `task_key` |
@@ -105,8 +108,9 @@ All configuration lives in `~/.softspark/jira-mcp/` (created by `jira-mcp config
105
108
  | `log_task_time` | Log work time (`"2h 30m"` format, no days) | `task_key`, `time_spent`, `comment?` |
106
109
  | `get_task_time_tracking` | Get time tracking info (estimate, spent, remaining) | `task_key` |
107
110
  | `list_comment_templates` | List available comment templates | `category?` |
108
- | `add_templated_comment` | Add comment using a template or raw markdown | `task_key`, `template_id?`, `variables?`, `markdown?` |
109
- | `create_task` | Create a new Jira issue with ADF description | `project_key`, `summary`, `description?`, `assignee_email?`, `labels?`, `epic_key?` |
111
+ | `list_task_templates` | List available task templates for `create_task` | |
112
+ | `add_templated_comment` | Add comment using a template or raw markdown | `task_key`, `template_id?`, `variables?`, `markdown?`, `user_approved` |
113
+ | `create_task` | Create a new Jira issue with explicit fields or a task template | `project_key`, `summary?`, `template_id?`, `variables?`, `description?`, `assignee_email?`, `labels?`, `epic_key?` |
110
114
  | `search_tasks` | Search Jira issues with JQL (no caching) | `jql`, `max_results?`, `project_key?` |
111
115
 
112
116
  ## Comment Templates
@@ -132,6 +136,23 @@ Example with Claude Code:
132
136
 
133
137
  The AI will use `add_templated_comment` with `template_id: "status-update"` automatically.
134
138
 
139
+ ### File-Backed Overrides
140
+
141
+ System templates are shipped as markdown files. User overrides are loaded from:
142
+
143
+ ```text
144
+ ~/.softspark/jira-mcp/templates/comments/
145
+ ~/.softspark/jira-mcp/templates/task-templates/
146
+ ```
147
+
148
+ If a user file has the same `id` as a system template, the user file wins globally for all projects.
149
+
150
+ ```bash
151
+ jira-mcp template add comment ./my-status-update.md
152
+ jira-mcp template add task ./my-bug-task.md
153
+ jira-mcp template list
154
+ ```
155
+
135
156
  ## Usage with Claude Code
136
157
 
137
158
  Add to your Claude Code MCP configuration (`~/.claude/claude_desktop_config.json` or project-level):
@@ -162,7 +183,19 @@ Or copy `rules/jira-mcp.md` to your ai-toolkit rules directory manually. The rul
162
183
  - **Sync before read** -- cache may be stale
163
184
  - **Status transitions** -- check valid transitions before changing status
164
185
  - **Time format** -- `"2h 30m"`, never days
165
- - **All 15 MCP tools** and **16 CLI commands** reference
186
+ - **All 16 MCP tools** and **20 CLI commands** reference
187
+
188
+ ### AI Toolkit Hooks
189
+
190
+ To require explicit user approval before Jira comment writes, inject the repo-owned hook manifest:
191
+
192
+ ```bash
193
+ ai-toolkit inject-hook https://raw.githubusercontent.com/softspark/jira-mcp/main/hooks/jira-mcp-hooks.json
194
+ ```
195
+
196
+ This installs a `PreToolUse` guard for `add_task_comment` and `add_templated_comment`. The hook blocks the tool call, shows the exact comment preview, and tells the agent to retry only after the user approves it with `user_approved=true`.
197
+
198
+ The MCP server still enforces `user_approved=true` at runtime, so the hook is UX guidance plus an extra safety layer rather than the only check.
166
199
 
167
200
  ## Usage with Other MCP Clients
168
201
 
@@ -189,14 +222,15 @@ src/
189
222
  commands/
190
223
  cache/ Cache management subcommands
191
224
  config/ Config management subcommands
225
+ template/ File-backed template management subcommands
192
226
  create.ts Bulk task creation command
193
227
  create-monthly.ts Monthly admin task automation
194
228
  config/ Configuration loading and Zod validation
195
229
  connector/ Jira API client (built-in fetch, instance pool)
196
230
  errors/ Typed error hierarchy
197
231
  operations/ Business logic (status, comments, time tracking)
198
- templates/ Comment template system (registry + built-in templates)
199
- tools/ MCP tool handlers (15 tools, one file per tool)
232
+ templates/ File-backed comment/task template loading and registries
233
+ tools/ MCP tool handlers (16 tools, one file per tool)
200
234
  types/ Shared TypeScript types
201
235
  server.ts MCP server setup and tool registration
202
236
  cli.ts CLI entry point
@@ -210,7 +244,7 @@ src/
210
244
 
211
245
  **Local caching** -- tasks synced to `~/.softspark/jira-mcp/cache/` with atomic writes (tmp + rename). Work offline with `read_cached_tasks`, sync on demand. Workflow and user caches for status validation and assignee resolution.
212
246
 
213
- **Comment templates** -- 8 built-in templates with `{{variable}}` interpolation and `{{#var}}...{{/var}}` conditional blocks. Status updates, blockers, handoffs, reviews. See [Templates Reference](kb/reference/templates.md).
247
+ **File-backed templates** -- 8 built-in comment templates and built-in task templates are stored as markdown files, with global user overrides loaded from `~/.softspark/jira-mcp/templates/`. Both support `{{variable}}` interpolation and `{{#var}}...{{/var}}` conditional blocks. See [Templates Reference](kb/reference/templates.md).
214
248
 
215
249
  **Language configuration** -- global `default_language` with per-project override. Supports: pl, en, de, es, fr, pt, it, nl. `get_project_language` tool and `language` field in `get_task_details` let AI assistants write content in the correct language. See [Configuration](kb/reference/configuration.md).
216
250
 
@@ -220,16 +254,16 @@ src/
220
254
 
221
255
  **Supply chain protection** -- `ignore-scripts=true`, no axios, no dynamic requires. Self-contained 520KB bundle, 1 runtime dep (commander).
222
256
 
223
- **Typed error hierarchy** -- 15 error classes with machine-readable codes. Every tool returns structured `{ success, error, code }` responses. No stack traces leak to MCP clients.
257
+ **Typed error hierarchy** -- 17 error classes with machine-readable codes. Every tool returns structured `{ success, error, code }` responses. No stack traces leak to MCP clients.
224
258
 
225
- **Strict TypeScript** -- `strict: true`, no `any`, `readonly` interfaces, Zod validation at all boundaries, 509 tests across 51 test files. Self-contained 520KB package.
259
+ **Strict TypeScript** -- `strict: true`, no `any`, `readonly` interfaces, Zod validation at all boundaries, 541 tests across 56 test files. Self-contained 520KB package.
226
260
 
227
261
  ## Documentation
228
262
 
229
263
  | Document | Description |
230
264
  |----------|-------------|
231
265
  | [Architecture](kb/reference/architecture.md) | System design and module overview |
232
- | [API Reference](kb/reference/api.md) | All 15 MCP tools with schemas |
266
+ | [API Reference](kb/reference/api.md) | All 16 MCP tools with schemas |
233
267
  | [Configuration](kb/reference/configuration.md) | Config files, env vars, multi-instance |
234
268
  | [ADF Format](kb/reference/adf.md) | Atlassian Document Format conversion |
235
269
  | [Caching](kb/reference/caching.md) | Task, workflow, and user caching |