@codyswann/lisa 1.95.0 → 2.0.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/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +41 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/codex/agent-installer.d.ts +56 -0
- package/dist/codex/agent-installer.d.ts.map +1 -0
- package/dist/codex/agent-installer.js +201 -0
- package/dist/codex/agent-installer.js.map +1 -0
- package/dist/codex/agent-transformer.d.ts +53 -0
- package/dist/codex/agent-transformer.d.ts.map +1 -0
- package/dist/codex/agent-transformer.js +181 -0
- package/dist/codex/agent-transformer.js.map +1 -0
- package/dist/codex/agents-md-installer.d.ts +24 -0
- package/dist/codex/agents-md-installer.d.ts.map +1 -0
- package/dist/codex/agents-md-installer.js +63 -0
- package/dist/codex/agents-md-installer.js.map +1 -0
- package/dist/codex/hooks-installer.d.ts +24 -0
- package/dist/codex/hooks-installer.d.ts.map +1 -0
- package/dist/codex/hooks-installer.js +206 -0
- package/dist/codex/hooks-installer.js.map +1 -0
- package/dist/codex/hooks-merger.d.ts +82 -0
- package/dist/codex/hooks-merger.d.ts.map +1 -0
- package/dist/codex/hooks-merger.js +127 -0
- package/dist/codex/hooks-merger.js.map +1 -0
- package/dist/codex/manifest.d.ts +32 -0
- package/dist/codex/manifest.d.ts.map +1 -0
- package/dist/codex/manifest.js +86 -0
- package/dist/codex/manifest.js.map +1 -0
- package/dist/codex/settings-installer.d.ts +48 -0
- package/dist/codex/settings-installer.d.ts.map +1 -0
- package/dist/codex/settings-installer.js +276 -0
- package/dist/codex/settings-installer.js.map +1 -0
- package/dist/codex/skills-installer.d.ts +46 -0
- package/dist/codex/skills-installer.d.ts.map +1 -0
- package/dist/codex/skills-installer.js +344 -0
- package/dist/codex/skills-installer.js.map +1 -0
- package/dist/core/config.d.ts +19 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +13 -0
- package/dist/core/config.js.map +1 -1
- package/dist/core/lisa.d.ts +12 -0
- package/dist/core/lisa.d.ts.map +1 -1
- package/dist/core/lisa.js +48 -0
- package/dist/core/lisa.js.map +1 -1
- package/dist/core/project-config.d.ts +49 -0
- package/dist/core/project-config.d.ts.map +1 -0
- package/dist/core/project-config.js +119 -0
- package/dist/core/project-config.js.map +1 -0
- package/package.json +3 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/agents/jira-build-intake.md +58 -0
- package/plugins/lisa/agents/notion-prd-intake.md +57 -0
- package/plugins/lisa/commands/{plan/fix-linter-error.md → fix/linter-error.md} +1 -1
- package/plugins/lisa/commands/implement.md +6 -0
- package/plugins/{src/base/commands/plan/lower-code-complexity.md → lisa/commands/improve/code-complexity.md} +1 -1
- package/plugins/lisa/commands/{plan/reduce-max-lines-per-function.md → improve/max-lines-per-function.md} +1 -1
- package/plugins/lisa/commands/{plan/add-test-coverage.md → improve/test-coverage.md} +1 -1
- package/plugins/lisa/commands/{plan/improve-tests.md → improve/tests.md} +1 -1
- package/plugins/lisa/commands/plan.md +15 -3
- package/plugins/lisa/commands/product-walkthrough.md +7 -0
- package/plugins/{src/base/commands/plan/local-code-review.md → lisa/commands/review/local.md} +1 -1
- package/plugins/{src/base/skills/plan-fix-linter-error → lisa/skills/fix-linter-error}/SKILL.md +2 -2
- package/plugins/lisa/skills/{plan-execute → implement}/SKILL.md +1 -1
- package/plugins/lisa/skills/{plan-lower-code-complexity → improve-code-complexity}/SKILL.md +2 -2
- package/plugins/lisa/skills/{plan-reduce-max-lines → improve-max-lines}/SKILL.md +2 -2
- package/plugins/{src/base/skills/plan-reduce-max-lines-per-function → lisa/skills/improve-max-lines-per-function}/SKILL.md +2 -2
- package/plugins/lisa/skills/{plan-add-test-coverage → improve-test-coverage}/SKILL.md +2 -2
- package/plugins/{src/base/skills/plan-improve-tests → lisa/skills/improve-tests}/SKILL.md +2 -2
- package/plugins/lisa/skills/jira-build-intake/SKILL.md +134 -0
- package/plugins/lisa/skills/jira-create/SKILL.md +53 -30
- package/plugins/lisa/skills/jira-source-artifacts/SKILL.md +107 -0
- package/plugins/lisa/skills/jira-validate-ticket/SKILL.md +224 -0
- package/plugins/lisa/skills/jira-verify/SKILL.md +15 -91
- package/plugins/lisa/skills/jira-write-ticket/SKILL.md +20 -15
- package/plugins/lisa/skills/notion-prd-intake/SKILL.md +169 -0
- package/plugins/lisa/skills/notion-to-jira/SKILL.md +137 -95
- package/plugins/lisa/skills/prd-ticket-coverage/SKILL.md +137 -0
- package/plugins/lisa/skills/product-walkthrough/SKILL.md +129 -0
- package/plugins/lisa/skills/{plan-local-code-review → review-local}/SKILL.md +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/skills/jira-create/SKILL.md +60 -28
- package/plugins/lisa-expo/skills/jira-verify/SKILL.md +14 -34
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/skills/{plan-fix-linter-error → fix-linter-error}/SKILL.md +2 -2
- package/plugins/lisa-rails/skills/{plan-lower-code-complexity → improve-code-complexity}/SKILL.md +2 -2
- package/plugins/{src/rails/skills/plan-reduce-max-lines → lisa-rails/skills/improve-max-lines}/SKILL.md +2 -2
- package/plugins/{src/rails/skills/plan-reduce-max-lines-per-function → lisa-rails/skills/improve-max-lines-per-function}/SKILL.md +2 -2
- package/plugins/lisa-rails/skills/{plan-add-test-coverage → improve-test-coverage}/SKILL.md +2 -2
- package/plugins/lisa-rails/skills/jira-create/SKILL.md +59 -28
- package/plugins/lisa-rails/skills/jira-verify/SKILL.md +13 -16
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/src/base/agents/jira-build-intake.md +58 -0
- package/plugins/src/base/agents/notion-prd-intake.md +57 -0
- package/plugins/src/base/commands/{plan/fix-linter-error.md → fix/linter-error.md} +1 -1
- package/plugins/src/base/commands/implement.md +6 -0
- package/plugins/{lisa/commands/plan/lower-code-complexity.md → src/base/commands/improve/code-complexity.md} +1 -1
- package/plugins/src/base/commands/{plan/reduce-max-lines-per-function.md → improve/max-lines-per-function.md} +1 -1
- package/plugins/src/base/commands/{plan/add-test-coverage.md → improve/test-coverage.md} +1 -1
- package/plugins/src/base/commands/{plan/improve-tests.md → improve/tests.md} +1 -1
- package/plugins/src/base/commands/plan.md +15 -3
- package/plugins/src/base/commands/product-walkthrough.md +7 -0
- package/plugins/{lisa/commands/plan/local-code-review.md → src/base/commands/review/local.md} +1 -1
- package/plugins/{lisa/skills/plan-fix-linter-error → src/base/skills/fix-linter-error}/SKILL.md +2 -2
- package/plugins/src/base/skills/{plan-execute → implement}/SKILL.md +1 -1
- package/plugins/src/base/skills/{plan-lower-code-complexity → improve-code-complexity}/SKILL.md +2 -2
- package/plugins/src/base/skills/{plan-reduce-max-lines → improve-max-lines}/SKILL.md +2 -2
- package/plugins/{lisa/skills/plan-reduce-max-lines-per-function → src/base/skills/improve-max-lines-per-function}/SKILL.md +2 -2
- package/plugins/src/base/skills/{plan-add-test-coverage → improve-test-coverage}/SKILL.md +2 -2
- package/plugins/{lisa/skills/plan-improve-tests → src/base/skills/improve-tests}/SKILL.md +2 -2
- package/plugins/src/base/skills/jira-build-intake/SKILL.md +134 -0
- package/plugins/src/base/skills/jira-create/SKILL.md +53 -30
- package/plugins/src/base/skills/jira-source-artifacts/SKILL.md +107 -0
- package/plugins/src/base/skills/jira-validate-ticket/SKILL.md +224 -0
- package/plugins/src/base/skills/jira-verify/SKILL.md +15 -91
- package/plugins/src/base/skills/jira-write-ticket/SKILL.md +20 -15
- package/plugins/src/base/skills/notion-prd-intake/SKILL.md +169 -0
- package/plugins/src/base/skills/notion-to-jira/SKILL.md +137 -95
- package/plugins/src/base/skills/prd-ticket-coverage/SKILL.md +137 -0
- package/plugins/src/base/skills/product-walkthrough/SKILL.md +129 -0
- package/plugins/src/base/skills/{plan-local-code-review → review-local}/SKILL.md +1 -1
- package/plugins/src/expo/skills/jira-create/SKILL.md +60 -28
- package/plugins/src/expo/skills/jira-verify/SKILL.md +14 -34
- package/plugins/src/rails/skills/{plan-fix-linter-error → fix-linter-error}/SKILL.md +2 -2
- package/plugins/src/rails/skills/{plan-lower-code-complexity → improve-code-complexity}/SKILL.md +2 -2
- package/plugins/{lisa-rails/skills/plan-reduce-max-lines → src/rails/skills/improve-max-lines}/SKILL.md +2 -2
- package/plugins/{lisa-rails/skills/plan-reduce-max-lines-per-function → src/rails/skills/improve-max-lines-per-function}/SKILL.md +2 -2
- package/plugins/src/rails/skills/{plan-add-test-coverage → improve-test-coverage}/SKILL.md +2 -2
- package/plugins/src/rails/skills/jira-create/SKILL.md +59 -28
- package/plugins/src/rails/skills/jira-verify/SKILL.md +13 -16
- package/plugins/lisa/commands/build.md +0 -12
- package/plugins/lisa/commands/fix.md +0 -12
- package/plugins/lisa/commands/improve.md +0 -18
- package/plugins/lisa/commands/investigate.md +0 -10
- package/plugins/lisa/commands/jira/add-journey.md +0 -7
- package/plugins/lisa/commands/jira/create.md +0 -7
- package/plugins/lisa/commands/jira/evidence.md +0 -7
- package/plugins/lisa/commands/jira/journey.md +0 -7
- package/plugins/lisa/commands/jira/read-ticket.md +0 -7
- package/plugins/lisa/commands/jira/sync.md +0 -7
- package/plugins/lisa/commands/jira/triage.md +0 -7
- package/plugins/lisa/commands/jira/verify.md +0 -7
- package/plugins/lisa/commands/jira/write-ticket.md +0 -7
- package/plugins/lisa/commands/plan/create.md +0 -8
- package/plugins/lisa/commands/plan/execute.md +0 -6
- package/plugins/lisa/commands/review/implementation.md +0 -7
- package/plugins/lisa/commands/review.md +0 -10
- package/plugins/lisa/commands/ship.md +0 -8
- package/plugins/lisa/commands/spec-conformance.md +0 -7
- package/plugins/lisa-expo/commands/jira/add-journey.md +0 -7
- package/plugins/lisa-expo/commands/jira/create.md +0 -7
- package/plugins/lisa-expo/commands/jira/evidence.md +0 -7
- package/plugins/lisa-expo/commands/jira/journey.md +0 -7
- package/plugins/lisa-expo/commands/jira/verify.md +0 -7
- package/plugins/lisa-rails/commands/jira/add-journey.md +0 -7
- package/plugins/lisa-rails/commands/jira/create.md +0 -7
- package/plugins/lisa-rails/commands/jira/evidence.md +0 -7
- package/plugins/lisa-rails/commands/jira/journey.md +0 -7
- package/plugins/lisa-rails/commands/jira/verify.md +0 -7
- package/plugins/src/base/commands/build.md +0 -12
- package/plugins/src/base/commands/fix.md +0 -12
- package/plugins/src/base/commands/improve.md +0 -18
- package/plugins/src/base/commands/investigate.md +0 -10
- package/plugins/src/base/commands/jira/add-journey.md +0 -7
- package/plugins/src/base/commands/jira/create.md +0 -7
- package/plugins/src/base/commands/jira/evidence.md +0 -7
- package/plugins/src/base/commands/jira/journey.md +0 -7
- package/plugins/src/base/commands/jira/read-ticket.md +0 -7
- package/plugins/src/base/commands/jira/sync.md +0 -7
- package/plugins/src/base/commands/jira/triage.md +0 -7
- package/plugins/src/base/commands/jira/verify.md +0 -7
- package/plugins/src/base/commands/jira/write-ticket.md +0 -7
- package/plugins/src/base/commands/plan/create.md +0 -8
- package/plugins/src/base/commands/plan/execute.md +0 -6
- package/plugins/src/base/commands/review/implementation.md +0 -7
- package/plugins/src/base/commands/review.md +0 -10
- package/plugins/src/base/commands/ship.md +0 -8
- package/plugins/src/base/commands/spec-conformance.md +0 -7
- package/plugins/src/expo/commands/jira/add-journey.md +0 -7
- package/plugins/src/expo/commands/jira/create.md +0 -7
- package/plugins/src/expo/commands/jira/evidence.md +0 -7
- package/plugins/src/expo/commands/jira/journey.md +0 -7
- package/plugins/src/expo/commands/jira/verify.md +0 -7
- package/plugins/src/rails/commands/jira/add-journey.md +0 -7
- package/plugins/src/rails/commands/jira/create.md +0 -7
- package/plugins/src/rails/commands/jira/evidence.md +0 -7
- package/plugins/src/rails/commands/jira/journey.md +0 -7
- package/plugins/src/rails/commands/jira/verify.md +0 -7
- /package/plugins/lisa/commands/{plan/reduce-max-lines.md → improve/max-lines.md} +0 -0
- /package/plugins/lisa-rails/commands/{plan/fix-linter-error.md → fix/linter-error.md} +0 -0
- /package/plugins/lisa-rails/commands/{plan/lower-code-complexity.md → improve/code-complexity.md} +0 -0
- /package/plugins/lisa-rails/commands/{plan/reduce-max-lines-per-function.md → improve/max-lines-per-function.md} +0 -0
- /package/plugins/lisa-rails/commands/{plan/reduce-max-lines.md → improve/max-lines.md} +0 -0
- /package/plugins/lisa-rails/commands/{plan/add-test-coverage.md → improve/test-coverage.md} +0 -0
- /package/plugins/src/base/commands/{plan/reduce-max-lines.md → improve/max-lines.md} +0 -0
- /package/plugins/src/rails/commands/{plan/fix-linter-error.md → fix/linter-error.md} +0 -0
- /package/plugins/src/rails/commands/{plan/lower-code-complexity.md → improve/code-complexity.md} +0 -0
- /package/plugins/src/rails/commands/{plan/reduce-max-lines-per-function.md → improve/max-lines-per-function.md} +0 -0
- /package/plugins/src/rails/commands/{plan/reduce-max-lines.md → improve/max-lines.md} +0 -0
- /package/plugins/src/rails/commands/{plan/add-test-coverage.md → improve/test-coverage.md} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: improve-tests
|
|
3
3
|
description: This skill should be used when improving test quality. It scans the test suite for weak, brittle, or poorly-written tests, generates a brief with improvement opportunities, and creates a plan with tasks to strengthen the tests.
|
|
4
4
|
allowed-tools: ["Read", "Bash", "Glob", "Grep"]
|
|
5
5
|
---
|
|
@@ -44,4 +44,4 @@ Test files needing improvement (ordered by impact):
|
|
|
44
44
|
Verification: `bun run test` -> Expected: All tests pass, improved assertions and coverage
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
Invoke `/
|
|
47
|
+
Invoke `/implement` with this brief to create the implementation plan.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jira-build-intake
|
|
3
|
+
description: "Symmetric counterpart to notion-prd-intake on the JIRA side. Scans a JIRA project (or JQL filter) for tickets in Status=Ready, claims each by transitioning to In Progress, runs the implementation/build flow via jira-agent, and transitions to On Dev on completion. The Ready status is the human-flipped signal that a TODO ticket is truly ready for development — mirroring how Notion PRDs work product Draft → Ready → (us) In Review → Blocked|Ticketed."
|
|
4
|
+
allowed-tools: ["Skill", "Bash", "mcp__atlassian__getAccessibleAtlassianResources", "mcp__atlassian__searchJiraIssuesUsingJql", "mcp__atlassian__getJiraIssue", "mcp__atlassian__getTransitionsForJiraIssue", "mcp__atlassian__transitionJiraIssue", "mcp__atlassian__addCommentToJiraIssue"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# JIRA Build Intake: $ARGUMENTS
|
|
8
|
+
|
|
9
|
+
`$ARGUMENTS` is one of:
|
|
10
|
+
|
|
11
|
+
1. A JIRA project key (e.g. `SE`) — scans that project for `Status = Ready` tickets.
|
|
12
|
+
2. A full JQL filter (e.g. `project = SE AND component = "frontend" AND Status = Ready`) — used as-is. The skill will not append a `Status = Ready` clause if the JQL already names a status, so callers can intentionally widen.
|
|
13
|
+
|
|
14
|
+
Run one build-intake cycle. Each Ready ticket is claimed, built via the `jira-agent` flow, and transitioned to `On Dev` (or the equivalent next-status for that project). The cycle is the symmetric mirror of `notion-prd-intake`: humans flip `Ready`, agents pick up and progress.
|
|
15
|
+
|
|
16
|
+
## Lifecycle assumed
|
|
17
|
+
|
|
18
|
+
The JIRA workflow has these statuses (or equivalents — see Configuration for renaming):
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
TODO → Ready → In Progress → On Dev → On QA → Done
|
|
22
|
+
(PM/ (us claim) (us done; (downstream)
|
|
23
|
+
human) PR ready)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
This skill ONLY transitions `Ready → In Progress` on claim, and `In Progress → On Dev` on completion. It never touches `TODO`, `On QA`, `Done`, or any blocked/closed states.
|
|
27
|
+
|
|
28
|
+
**Pre-flight check**: at start of each cycle, call `getTransitionsForJiraIssue` against a sample Ready ticket to confirm `In Progress` and `On Dev` are reachable transitions. If not, stop and report the workflow misconfiguration to the caller — do not invent transitions.
|
|
29
|
+
|
|
30
|
+
## Phases
|
|
31
|
+
|
|
32
|
+
### Phase 1 — Resolve the query
|
|
33
|
+
|
|
34
|
+
1. Parse `$ARGUMENTS`:
|
|
35
|
+
- Project key: build JQL `project = <KEY> AND Status = "Ready" ORDER BY priority DESC, created ASC`.
|
|
36
|
+
- Full JQL: use as-is. If it does not include a `Status` clause, append `AND Status = "Ready"`.
|
|
37
|
+
2. Resolve Atlassian cloud ID via `getAccessibleAtlassianResources`.
|
|
38
|
+
|
|
39
|
+
### Phase 2 — Find Ready tickets
|
|
40
|
+
|
|
41
|
+
Run the JQL via `searchJiraIssuesUsingJql`. Capture each ticket's: key, summary, issue type, priority, assignee, parent (epic), labels, components.
|
|
42
|
+
|
|
43
|
+
If empty, report `"No tickets with Status=Ready. Nothing to do."` and exit. This is the common idle case.
|
|
44
|
+
|
|
45
|
+
### Phase 3 — Process each Ready ticket (serial)
|
|
46
|
+
|
|
47
|
+
#### 3a. Claim
|
|
48
|
+
|
|
49
|
+
Transition the ticket from `Ready` to `In Progress` via `transitionJiraIssue`.
|
|
50
|
+
- Use `getTransitionsForJiraIssue` to find the transition ID for `In Progress`.
|
|
51
|
+
- Post a `[claude-build-intake]` comment via `addCommentToJiraIssue`: `"Claimed by Claude. Starting build."`
|
|
52
|
+
- This is the idempotency lock — a re-entrant cycle's `Status = Ready` filter will not see this ticket again.
|
|
53
|
+
|
|
54
|
+
If the transition fails (permission, missing transition, race), log under "Errors" in the cycle summary and skip this ticket. **Do not invoke the build flow on a ticket you didn't successfully claim.**
|
|
55
|
+
|
|
56
|
+
#### 3b. Run the build flow
|
|
57
|
+
|
|
58
|
+
Invoke the `jira-agent` (existing per-ticket lifecycle agent) with the ticket key. `jira-agent` owns:
|
|
59
|
+
- Reading the full ticket graph (`jira-read-ticket`)
|
|
60
|
+
- Running its own pre-flight quality gate (`jira-verify`)
|
|
61
|
+
- Running ticket triage (`ticket-triage`)
|
|
62
|
+
- Routing to the appropriate flow (Build / Fix / Investigate / Improve based on type)
|
|
63
|
+
- Posting progress comments via `jira-sync`
|
|
64
|
+
- Posting evidence via `jira-evidence`
|
|
65
|
+
|
|
66
|
+
Wait for `jira-agent` to return. Capture its outcome:
|
|
67
|
+
- **Success** — PR is ready (open or merged); evidence posted; ready for next status.
|
|
68
|
+
- **Blocked by jira-verify pre-flight gate** — `jira-agent` itself transitions the ticket to `Blocked` and reassigns to Reporter. This is correct and expected — let it stand. Record the outcome and move on.
|
|
69
|
+
- **Blocked by ticket-triage ambiguities** — `jira-agent` posts findings and stops. The ticket stays in `In Progress`. Surface to human; do not auto-transition. Record under "Errors" with reason `"Triage found ambiguities — see comments on <ticket-key>"`.
|
|
70
|
+
- **Errored** — exception, missing config, etc. Leave the ticket in `In Progress` for human investigation. Record under "Errors" with the exception summary.
|
|
71
|
+
|
|
72
|
+
#### 3c. Transition to On Dev (only on Success)
|
|
73
|
+
|
|
74
|
+
If `jira-agent` returned Success:
|
|
75
|
+
1. Use `getTransitionsForJiraIssue` to find the transition ID for `On Dev` (or the configured next-after-build status).
|
|
76
|
+
2. Transition via `transitionJiraIssue`.
|
|
77
|
+
3. Post a `[claude-build-intake]` comment: `"Build complete. PR <URL>. Transitioned to On Dev."`
|
|
78
|
+
|
|
79
|
+
For any non-Success outcome, do NOT transition. The ticket sits in `In Progress` (or wherever `jira-agent` left it for the Blocked case) — the cycle's job is done; humans take it from there.
|
|
80
|
+
|
|
81
|
+
#### 3d. Continue
|
|
82
|
+
|
|
83
|
+
Move to the next Ready ticket. One ticket failing does not stop others.
|
|
84
|
+
|
|
85
|
+
### Phase 4 — Summary report
|
|
86
|
+
|
|
87
|
+
```text
|
|
88
|
+
## jira-build-intake summary
|
|
89
|
+
|
|
90
|
+
Query: <JQL or project key>
|
|
91
|
+
Cycle started: <ISO timestamp>
|
|
92
|
+
Cycle completed: <ISO timestamp>
|
|
93
|
+
|
|
94
|
+
Tickets processed: <n>
|
|
95
|
+
- On Dev (build complete, PR ready): <n>
|
|
96
|
+
- <ticket-key> <summary> → PR <URL>
|
|
97
|
+
- Blocked (pre-flight verify failed): <n>
|
|
98
|
+
- <ticket-key> <summary> — see ticket comments
|
|
99
|
+
- Held (triage found ambiguities): <n>
|
|
100
|
+
- <ticket-key> <summary> — see ticket comments
|
|
101
|
+
- Errors: <n>
|
|
102
|
+
- <ticket-key> <summary> — <reason>
|
|
103
|
+
|
|
104
|
+
Total PRs opened: <n>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Idempotency & safety
|
|
108
|
+
|
|
109
|
+
- **Claim-first ordering**: `In Progress` set BEFORE `jira-agent` invocation — no double-pickup.
|
|
110
|
+
- **No writes outside the lifecycle**: this skill only transitions `Ready → In Progress` and `In Progress → On Dev`. Every other status change is owned by `jira-agent` (which suggests transitions but only auto-transitions on the verify-FAIL path).
|
|
111
|
+
- **Failure isolation**: per-ticket exceptions caught and recorded; the cycle continues.
|
|
112
|
+
- **Single cycle per query**: do not run two `jira-build-intake` cycles in parallel against overlapping queries — concurrent claims could race. The scheduling layer (when added) is responsible for serialization.
|
|
113
|
+
- **Never invent a transition**: if `In Progress` or `On Dev` aren't valid transitions in the project's workflow, stop and report rather than guessing alternative names.
|
|
114
|
+
|
|
115
|
+
## Configuration
|
|
116
|
+
|
|
117
|
+
Status names default to `Ready`, `In Progress`, `On Dev`. If a project uses different names (`Open` instead of `TODO`, `In Development` instead of `In Progress`, `Code Review` instead of `On Dev`), pass overrides in `$ARGUMENTS` as `claim_status="In Development" done_status="Code Review"`.
|
|
118
|
+
|
|
119
|
+
If a `Ready` status does not exist in the JIRA project's workflow, this skill cannot run. The remediation is to add `Ready` to the project workflow scheme — JIRA admin task, not something this skill can do.
|
|
120
|
+
|
|
121
|
+
| Variable | Default | Purpose |
|
|
122
|
+
|----------|---------|---------|
|
|
123
|
+
| `JIRA_PROJECT` | (from `$ARGUMENTS`) | Project key for the default JQL |
|
|
124
|
+
| Status: queue | `Ready` | The status that signals "human says this is buildable" |
|
|
125
|
+
| Status: claim | `In Progress` | The intermediate status the agent sets on pickup |
|
|
126
|
+
| Status: done | `On Dev` | The status set after a successful build |
|
|
127
|
+
|
|
128
|
+
## Rules
|
|
129
|
+
|
|
130
|
+
- Never transition a ticket the cycle didn't claim. The `In Progress` transition is the signature of cycle ownership.
|
|
131
|
+
- Never bypass `jira-agent` to do build work directly. `jira-agent` owns the per-ticket lifecycle (read, verify, triage, route, sync, evidence). This skill is the dispatcher, not the builder.
|
|
132
|
+
- Never auto-transition past `On Dev`. Downstream statuses (`On QA`, `Done`) are owned by QA / product / a future verification-intake skill — not this one.
|
|
133
|
+
- If the ticket has no Validation Journey or no sign-in credentials in its description, `jira-agent`'s pre-flight verify will catch it and transition to `Blocked` — **don't try to fix the ticket from here**. Pre-flight gating is `jira-agent`'s job; running build work on a thin ticket produces broken work.
|
|
134
|
+
- On any unexpected response from `jira-agent` (status it doesn't claim, missing PR URL on success, etc.), record as Error and surface — never assume.
|
|
@@ -6,18 +6,22 @@ allowed-tools: ["Read", "Glob", "LS", "Skill", "mcp__atlassian__getVisibleJiraPr
|
|
|
6
6
|
|
|
7
7
|
# Create JIRA Issues from $ARGUMENTS
|
|
8
8
|
|
|
9
|
-
Analyze the provided file(s) and
|
|
9
|
+
Analyze the provided file(s) and plan a JIRA hierarchy. **This skill plans structure only — every individual ticket write is delegated to `jira-write-ticket`.** Do not call `mcp__atlassian__createJiraIssue` from this skill; the necessary write tools are intentionally not in `allowed-tools`.
|
|
10
10
|
|
|
11
11
|
## Process
|
|
12
12
|
|
|
13
|
-
1. **Analyze**: Read $ARGUMENTS to understand scope
|
|
14
|
-
2. **
|
|
13
|
+
1. **Analyze**: Read $ARGUMENTS to understand scope.
|
|
14
|
+
2. **Extract source artifacts**: invoke the `jira-source-artifacts` skill, then enumerate every external URL, embed, attachment, or example payload in the input and classify each by domain per its rules. Build the `artifacts` map (one entry per artifact: url, title, domain, source page, classification reason). See "Source Artifacts" below.
|
|
15
|
+
3. **Walk the live product** (when applicable): if the work touches existing user-facing surfaces, invoke the `product-walkthrough` skill to capture current behavior, design-vs-product divergence, and reuse candidates. Skip when the work is purely backend or affects a screen that does not yet exist. See "Live Product Walkthrough" below.
|
|
16
|
+
4. **Determine structure**:
|
|
15
17
|
- Epic needed if: multiple features, major changes, >3 related files
|
|
16
18
|
- Direct tasks if: bug fix, single file, minor change
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
+
5. **Plan hierarchy**:
|
|
20
|
+
```text
|
|
19
21
|
Epic → User Story → Tasks (test, implement, document, cleanup)
|
|
20
22
|
```
|
|
23
|
+
6. **Delegate every write to `jira-write-ticket`** in dependency order (epic first, then stories with the epic as parent, then sub-tasks with their story as parent). Pass the artifacts (filtered by domain per `jira-source-artifacts` inheritance rules) and the walkthrough findings (under `## Current Product`). See "Delegation to jira-write-ticket" below.
|
|
24
|
+
7. **Run the artifact preservation gate** (`jira-source-artifacts` §8): after all writes complete, build the preservation matrix and verify every extracted artifact is reachable from the created tickets. Fail loudly if anything was dropped.
|
|
21
25
|
|
|
22
26
|
## Mandatory for Every Code Issue
|
|
23
27
|
|
|
@@ -81,33 +85,17 @@ h3. Assertions
|
|
|
81
85
|
4. **Assertions are testable statements** — "Health check returns 200 with status ok" not "API works"
|
|
82
86
|
5. **Prerequisites include environment setup** — Database connection, env vars, running services
|
|
83
87
|
|
|
84
|
-
## Source
|
|
85
|
-
|
|
86
|
-
If $ARGUMENTS includes a PRD, design doc, Figma URL, Lovable prototype, or similar external artifact — or if a referenced file links out to one — those references MUST be preserved as remote links on the created tickets. Dropping source artifacts during ticket creation is the single most common quality failure in this pipeline, because developers picking up a ticket then lose the design/UX source of truth.
|
|
88
|
+
## Source Artifacts
|
|
87
89
|
|
|
88
|
-
|
|
90
|
+
If $ARGUMENTS includes (or references) any external artifact — PRD, design doc, Figma URL, Lovable prototype, Loom walkthrough, screenshot, example payload — those references MUST be preserved as remote links on the created tickets. Silent artifact loss is the single most common quality failure in this pipeline.
|
|
89
91
|
|
|
90
|
-
|
|
91
|
-
2. **Epic gets everything**: attach all extracted artifacts as remote links on the epic, regardless of domain.
|
|
92
|
-
3. **Stories inherit by domain**: frontend stories get `ui-design` + `ux-flow` + `reference`; backend gets `data` + `reference`; infra gets `ops` + `reference`. When ambiguous, err on the side of inclusion.
|
|
93
|
-
4. **Sub-tasks inherit via parent**: do not re-attach on every sub-task unless a specific artifact applies only to that sub-task.
|
|
94
|
-
5. **Verify before reporting**: before declaring done, confirm every extracted artifact is reachable from the tickets. If any are missing, fail loudly and surface the dropped list to the human — do not silently drop.
|
|
92
|
+
**Invoke the `jira-source-artifacts` skill** for the canonical rules: domains, per-tool classification (Figma `/proto/` vs design, Lovable, Loom, screenshots), source precedence, conflict handling under `## Open Questions`, inheritance from epic → story → sub-task, and the existing-component reuse expectation. Do not restate the rules here — invoke the skill so any rule change propagates uniformly.
|
|
95
93
|
|
|
96
94
|
When delegating actual writes to `jira-write-ticket`, pass the extracted artifact list so its Phase 4c (Remote Links) step can attach them.
|
|
97
95
|
|
|
98
|
-
|
|
99
|
-
- Figma URL with `/proto/` or `starting-point-node-id=` → `ux-flow`; plain design frame URL → `ui-design`.
|
|
100
|
-
- Lovable output → always `ux-flow` (its code/styling/logic is NOT authoritative).
|
|
101
|
-
- Loom / annotated screenshot with flow arrows → `ux-flow`; bare screenshot → `ui-design`.
|
|
102
|
-
|
|
103
|
-
**Source precedence** (must be recorded on every ticket carrying design artifacts):
|
|
104
|
-
- Business rules (fields, validation, permissions, constraints) come from the **description / PRD body**.
|
|
105
|
-
- Visual treatment (layout, spacing, typography, color) comes from **mocks** (`ui-design`).
|
|
106
|
-
- Flow and interaction (navigation, transitions, state changes) come from **prototypes** (`ux-flow`).
|
|
107
|
-
- API / data shape comes from **`data` artifacts**.
|
|
108
|
-
- Cross-axis conflicts are surfaced as `## Open Questions` BLOCKERs, never silently reconciled.
|
|
96
|
+
## Live Product Walkthrough
|
|
109
97
|
|
|
110
|
-
|
|
98
|
+
When the work touches existing user-facing surfaces, invoke the `product-walkthrough` skill before drafting tickets. The walkthrough findings (current behavior, design-vs-product divergence, reuse candidates, behavioral surprises) become inputs to the ticket plan and surface under `## Current Product` on the resulting tickets. Skip only when the work is purely backend or affects a screen that does not yet exist.
|
|
111
99
|
|
|
112
100
|
## Issue Requirements
|
|
113
101
|
|
|
@@ -120,10 +108,45 @@ Each issue must clearly communicate to:
|
|
|
120
108
|
Default project: from jira-cli config (override via arguments)
|
|
121
109
|
Exclude unless requested: migration plans, performance tests
|
|
122
110
|
|
|
123
|
-
Execute the analysis and create the complete JIRA structure with proper parent-child relationships.
|
|
124
|
-
|
|
125
111
|
## Delegation to jira-write-ticket
|
|
126
112
|
|
|
127
|
-
|
|
113
|
+
**Mandatory.** Every ticket created by this skill MUST go through `jira-write-ticket`. This skill never calls `mcp__atlassian__createJiraIssue` itself — that tool is intentionally excluded from `allowed-tools` so the gate cannot be bypassed.
|
|
114
|
+
|
|
115
|
+
`jira-write-ticket` enforces things this skill does not, and which determine ticket quality:
|
|
116
|
+
- 3-audience description (Context / Technical Approach / Acceptance Criteria)
|
|
117
|
+
- Gherkin acceptance criteria
|
|
118
|
+
- Epic parent validation (non-bug, non-epic types)
|
|
119
|
+
- Explicit link discovery (`blocks` / `is blocked by` / `relates to` / `duplicates` / `clones`)
|
|
120
|
+
- Remote links (PRs, Confluence, dashboards)
|
|
121
|
+
- Single-repo scope check for Bug / Task / Sub-task
|
|
122
|
+
- Sign-in account and target environment recorded in description
|
|
123
|
+
- Post-create verification
|
|
124
|
+
|
|
125
|
+
### Invocation order
|
|
126
|
+
|
|
127
|
+
Tickets must be created in parent-before-child order so each child can be passed its parent key:
|
|
128
|
+
|
|
129
|
+
1. Invoke `jira-write-ticket` for the epic. Capture the returned key.
|
|
130
|
+
2. For each story, invoke `jira-write-ticket` with the epic key as the epic parent. Capture each story key.
|
|
131
|
+
3. For each sub-task, invoke `jira-write-ticket` with the parent story key.
|
|
132
|
+
|
|
133
|
+
### What to pass to each invocation
|
|
134
|
+
|
|
135
|
+
For every delegated write, pass:
|
|
136
|
+
- The summary, issue type, project key, and priority you decided
|
|
137
|
+
- The 3-section description body you drafted (Context / Technical Approach / Acceptance Criteria)
|
|
138
|
+
- Gherkin acceptance criteria
|
|
139
|
+
- Parent key (epic key for stories; story key for sub-tasks)
|
|
140
|
+
- The artifact list extracted in "Source Artifacts", filtered by domain per the inheritance rules — `jira-write-ticket` Phase 4c attaches them as remote links
|
|
141
|
+
- For tickets that change runtime behavior: the Validation Journey draft (or instruct it to call `jira-add-journey` after create)
|
|
142
|
+
|
|
143
|
+
### What this skill is responsible for
|
|
144
|
+
|
|
145
|
+
This skill owns:
|
|
146
|
+
- Deciding the *shape* of the hierarchy (what's an epic vs. story vs. sub-task)
|
|
147
|
+
- Drafting the description body and acceptance criteria from the input
|
|
148
|
+
- Extracting and classifying source artifacts
|
|
149
|
+
- Threading parent keys through subsequent writes
|
|
150
|
+
- Running the Phase 5.5-style preservation check after all writes complete
|
|
128
151
|
|
|
129
|
-
|
|
152
|
+
It does not own the actual JIRA write — that's `jira-write-ticket`'s job.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jira-source-artifacts
|
|
3
|
+
description: "Canonical taxonomy and rules for handling source artifacts (Figma, Lovable, Loom, screenshots, design docs, data samples) when generating or evaluating JIRA tickets. Defines: (1) artifact domains, (2) classification rules per tool, (3) source precedence (which artifact is authoritative for which question), (4) inheritance from epic to story to sub-task, (5) cross-axis conflict handling. Invoke this skill from any flow that extracts, attaches, or reasons about external design/UX/data artifacts so the rules don't drift across skills."
|
|
4
|
+
allowed-tools: []
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# JIRA Source Artifact Taxonomy and Rules
|
|
8
|
+
|
|
9
|
+
This skill is doctrine, not action — it defines the rules. Skills that need to extract, classify, attach, or reason about external artifacts (design files, prototypes, recordings, data samples) invoke this skill to load the taxonomy and apply it.
|
|
10
|
+
|
|
11
|
+
The reason this lives in one place: silent drift across skills is the failure mode this body of rules exists to prevent. If the rules differ between `notion-to-jira`, `jira-create`, and `jira-write-ticket`, agents will silently route artifacts wrong and developers will lose source of truth. Edit here, propagate everywhere.
|
|
12
|
+
|
|
13
|
+
## 1. Domains
|
|
14
|
+
|
|
15
|
+
Every artifact is classified into exactly one domain. The domain determines what the artifact is the source of truth for, and which tickets inherit it.
|
|
16
|
+
|
|
17
|
+
| Domain | What it defines | Examples |
|
|
18
|
+
|--------|-----------------|----------|
|
|
19
|
+
| `ui-design` (mocks) | **Visual treatment only** — layout, spacing, typography, color, iconography | Figma design frames, Framer static frames, bare screenshots, mockup PNGs |
|
|
20
|
+
| `ux-flow` (prototypes) | **Interaction and flow only** — navigation, transitions, state changes, timing, empty/error/loading states | Lovable output, Loom walkthroughs, Figma prototype links, annotated screenshots, Miro/Mural flow diagrams, user journey maps |
|
|
21
|
+
| `data` | Request/response shape, schema constraints, contracts | Example JSON, SQL schemas, GraphQL snippets, API contracts, sample payloads |
|
|
22
|
+
| `ops` | Deployment / runtime context | Runbooks, dashboards, Terraform refs, deployment diagrams |
|
|
23
|
+
| `reference` | Cross-cutting context | Confluence, Notion peer pages, Google Docs, related PRDs, RFCs |
|
|
24
|
+
|
|
25
|
+
## 2. Classification rules per tool
|
|
26
|
+
|
|
27
|
+
These rules exist because agents consistently misclassify Figma and Lovable artifacts, which are the two most common sources of dropped or misrouted context.
|
|
28
|
+
|
|
29
|
+
- **Figma**: classify as `ux-flow` if the URL is a prototype share link — it contains `/proto/`, has `starting-point-node-id=` in the query, or the sharing context labels it "prototype" / "play mode". Otherwise classify as `ui-design`. Never assume; inspect the URL.
|
|
30
|
+
- **Figma file with both design frames and a prototype**: emit two entries — one `ui-design` for the file, one `ux-flow` for the prototype URL — so both propagate correctly.
|
|
31
|
+
- **Lovable output**: always `ux-flow`. Lovable ships working code, but its code, styling, and any embedded business rules are NOT authoritative. Treat strictly as a UX/flow reference. Implementation uses existing project components; business rules come from the PRD body, not from Lovable.
|
|
32
|
+
- **Loom / video walkthrough**: `ux-flow` in the vast majority of cases. The rare exception — a video that's purely a static-frame design review with no interaction — is still `ux-flow` for routing purposes (both UX and UI stories benefit).
|
|
33
|
+
- **Screenshot**: bare unannotated screenshot → `ui-design`. Screenshot with arrows between frames, flow labels, or numbered steps → `ux-flow`. Side-by-side gallery of state variants (empty/error/loading) → `ui-design` with the state variants noted.
|
|
34
|
+
- **Confluence / Notion peer / Google Doc**: `reference` unless it is specifically a runbook (`ops`) or contains canonical API contracts (`data`).
|
|
35
|
+
- **Grafana / Datadog / Sentry**: `ops`.
|
|
36
|
+
- **Code blocks with example payloads** (JSON, SQL, GraphQL, cURL): `data`.
|
|
37
|
+
|
|
38
|
+
When an artifact could plausibly fit multiple domains and the rules above don't disambiguate, err on the side of inclusion — emit it under both, or use the broader domain. Misclassification is caught downstream by the preservation gate; underclassification is silent drop.
|
|
39
|
+
|
|
40
|
+
## 3. Source precedence
|
|
41
|
+
|
|
42
|
+
When artifacts disagree, silent reconciliation is a known failure mode. The rules below define which source wins which question. **Record this precedence on every ticket that carries design artifacts** (under Technical Approach or a dedicated `## Source Precedence` subsection) so the implementer doesn't reconcile silently.
|
|
43
|
+
|
|
44
|
+
| Question | Authoritative source |
|
|
45
|
+
|----------|---------------------|
|
|
46
|
+
| Does this field exist? Is it required? Who can see/edit it? What validation applies? Permission rules, edge cases, data constraints? | **Description / PRD body** (business rules) |
|
|
47
|
+
| What does it look like — layout, spacing, typography, color, iconography? | **Mocks (`ui-design`)** |
|
|
48
|
+
| How does it flow — navigation, transitions, state changes, timing, empty/error/loading states? | **Prototypes (`ux-flow`)** |
|
|
49
|
+
| Where does the data come from, what shape is it, what are the API contracts? | **`data` artifacts** |
|
|
50
|
+
| Where does it run, who's on call, what's the dashboard? | **`ops` artifacts** |
|
|
51
|
+
|
|
52
|
+
## 4. Cross-axis conflict handling
|
|
53
|
+
|
|
54
|
+
Conflicts MUST be surfaced under `## Open Questions` on the affected ticket — never silently reconciled.
|
|
55
|
+
|
|
56
|
+
- Mock shows a field the description doesn't mention → BLOCKER: "Figma shows field `X` not in PRD; confirm it exists, and if so add business rules (required/optional, validation, permissions)."
|
|
57
|
+
- Description mandates behavior the prototype contradicts → BLOCKER: "PRD says Y, prototype shows Z; which is correct?"
|
|
58
|
+
- Prototype shows a flow the mocks don't cover (e.g., an error state) → Note: "Error state flow from prototype; no mock exists. Use existing error component or request mock."
|
|
59
|
+
- Multiple artifacts of the same domain disagree (two Figma links showing different layouts) → BLOCKER: list both, ask which is current.
|
|
60
|
+
- Lovable output without a description covering business rules → BLOCKER: "Business rules missing. Lovable's embedded logic is not authoritative; PRD must explicitly state required fields, validation, permissions, and edge cases."
|
|
61
|
+
|
|
62
|
+
## 5. Coverage smells
|
|
63
|
+
|
|
64
|
+
Incomplete artifact sets are a common root cause of implementation drift. Surface these on the epic when extracting:
|
|
65
|
+
|
|
66
|
+
- **Zero artifacts on a non-trivial PRD**: almost always an extraction bug, not a design decision. Say so explicitly.
|
|
67
|
+
- **`ux-flow` present, `ui-design` absent**: flag "missing UI mocks". UI will be inferred from prototype frames — note that prototype styling is typically placeholder and must NOT be treated as visual source of truth.
|
|
68
|
+
- **`ui-design` present, `ux-flow` absent**: flag "missing UX prototype". UX will be inferred from static mock states (empty/error/loading/hover) — any flow not explicitly depicted must be raised as a BLOCKER with recommendation + alternatives, not silently invented.
|
|
69
|
+
|
|
70
|
+
## 6. Inheritance: epic → story → sub-task
|
|
71
|
+
|
|
72
|
+
Artifacts attach as Jira remote links and propagate down the hierarchy.
|
|
73
|
+
|
|
74
|
+
- **Epic**: gets EVERY artifact, regardless of domain. The epic is the canonical hub — anyone working on the epic or its descendants must reach the full set from one place. No filtering.
|
|
75
|
+
- **Story**: inherits the artifacts whose domain matches its scope:
|
|
76
|
+
|
|
77
|
+
| Story type | Inherits domains |
|
|
78
|
+
|------------|------------------|
|
|
79
|
+
| Frontend / UI | `ui-design`, `ux-flow`, `reference` |
|
|
80
|
+
| Backend / API / data model | `data`, `reference` |
|
|
81
|
+
| Infrastructure | `ops`, `reference` |
|
|
82
|
+
| Mixed / setup ("X.0") | All domains |
|
|
83
|
+
|
|
84
|
+
When classification is ambiguous, err on the side of inclusion — a developer can ignore an extra link, but they can't follow one that wasn't attached.
|
|
85
|
+
|
|
86
|
+
- **Sub-task**: inherits via the parent story link. Do NOT re-attach the same artifacts on every sub-task — that creates noise. Only attach an artifact directly on a sub-task when the sub-task depends on something the parent story doesn't (e.g., a sub-task spec'd from a specific Figma frame the broader story doesn't cite).
|
|
87
|
+
|
|
88
|
+
## 7. Existing-component reuse (UI-touching tickets)
|
|
89
|
+
|
|
90
|
+
Mocks define visual *intent*, not implementation shortcut. Every UI-touching ticket description must include:
|
|
91
|
+
|
|
92
|
+
> Before implementing, identify the closest existing component in the codebase. Prefer reuse even if the mock specifies different styling — flag the design-vs-code divergence as a discussion item on this ticket rather than pixel-matching from scratch.
|
|
93
|
+
|
|
94
|
+
If no existing component fits, building a new one is an explicit decision that must be recorded in the ticket (with rationale) before implementation. Lovable-generated components are never the reuse target — always use the project's own components.
|
|
95
|
+
|
|
96
|
+
## 8. Preservation gate (run after creating tickets)
|
|
97
|
+
|
|
98
|
+
Before declaring done, verify every extracted artifact is reachable from the created tickets.
|
|
99
|
+
|
|
100
|
+
1. Build a preservation matrix: `artifact URL → [ticket keys that reference it]`.
|
|
101
|
+
2. For every artifact:
|
|
102
|
+
- It MUST appear on the epic it belongs to (no exceptions).
|
|
103
|
+
- It SHOULD appear on at least one story whose scope matches its domain (except `reference`-domain artifacts, which may be epic-only if no story is domain-matched).
|
|
104
|
+
3. Any artifact with zero references anywhere, or missing from its epic: FAIL LOUDLY — list the dropped artifacts with domain, title, and source page; surface to the human; re-attach before continuing.
|
|
105
|
+
4. If classification looks misrouted (e.g., a Figma link landed on a backend story and nowhere else), surface the misroute and offer to re-propagate.
|
|
106
|
+
|
|
107
|
+
Skipping this gate is the most common cause of silent artifact loss. Do not skip it.
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jira-validate-ticket
|
|
3
|
+
description: "Validates a proposed JIRA ticket spec (or an existing ticket) against the organizational quality gates without writing anything. Returns a structured PASS/FAIL report per gate with concrete remediation. This is the single source of truth for what makes a valid ticket — both the write path (jira-write-ticket runs it pre-write) and the dry-run path (notion-to-jira runs it during PRD intake) call this skill so the bar can never drift."
|
|
4
|
+
allowed-tools: ["Bash", "mcp__atlassian__getJiraIssue", "mcp__atlassian__searchJiraIssuesUsingJql", "mcp__atlassian__getIssueLinkTypes", "mcp__atlassian__getJiraProjectIssueTypesMetadata", "mcp__atlassian__getVisibleJiraProjects", "mcp__atlassian__getAccessibleAtlassianResources"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Validate JIRA Ticket: $ARGUMENTS
|
|
8
|
+
|
|
9
|
+
Run all organizational quality gates against a ticket spec OR an existing ticket. **This skill is read-only — it never writes to JIRA.** The output is a structured report consumed by callers (`jira-write-ticket` for pre-write gating, `notion-to-jira` for PRD dry-run, `jira-verify` for post-write checks).
|
|
10
|
+
|
|
11
|
+
## Input
|
|
12
|
+
|
|
13
|
+
`$ARGUMENTS` is one of:
|
|
14
|
+
|
|
15
|
+
1. **An existing ticket key** (e.g. `PROJ-1234`): fetch it and validate the live state. Use this for post-write checks.
|
|
16
|
+
2. **A proposed ticket spec** (YAML block, see schema below): validate as-is without touching JIRA. Use this for pre-write and dry-run checks.
|
|
17
|
+
|
|
18
|
+
### Spec schema
|
|
19
|
+
|
|
20
|
+
Specs are passed as a fenced YAML block. Required keys depend on `issue_type`.
|
|
21
|
+
|
|
22
|
+
```yaml
|
|
23
|
+
issue_type: Story # Story | Task | Bug | Epic | Spike | Sub-task | Improvement
|
|
24
|
+
project_key: SE
|
|
25
|
+
summary: "[CU-1.2] Upload contract PDF from settings"
|
|
26
|
+
priority: Medium
|
|
27
|
+
parent_key: SE-1234 # Epic key for non-Bug/non-Epic; Story key for Sub-task
|
|
28
|
+
description: | # Full description text — every required section
|
|
29
|
+
h2. Context / Business Value
|
|
30
|
+
...
|
|
31
|
+
|
|
32
|
+
h2. Technical Approach
|
|
33
|
+
...
|
|
34
|
+
|
|
35
|
+
h2. Acceptance Criteria
|
|
36
|
+
# Given <precondition>
|
|
37
|
+
When <action>
|
|
38
|
+
Then <observable outcome>
|
|
39
|
+
|
|
40
|
+
h2. Out of Scope
|
|
41
|
+
...
|
|
42
|
+
|
|
43
|
+
h2. Target Backend Environment
|
|
44
|
+
dev
|
|
45
|
+
|
|
46
|
+
h2. Sign-in Required
|
|
47
|
+
Account: ...
|
|
48
|
+
|
|
49
|
+
h2. Repository
|
|
50
|
+
backend-api
|
|
51
|
+
|
|
52
|
+
h2. Validation Journey
|
|
53
|
+
...
|
|
54
|
+
|
|
55
|
+
# Behavioral flags — caller asserts these so the validator can pick the right gates
|
|
56
|
+
runtime_behavior_change: true # → requires Target Backend Environment + Validation Journey
|
|
57
|
+
authenticated_surface: true # → requires Sign-in Required
|
|
58
|
+
artifacts_attached: true # → requires Source Precedence section
|
|
59
|
+
links: [{ key: "PROJ-99", type: "is blocked by" }] # known issue links (may be empty)
|
|
60
|
+
remote_links: [{ url: "https://github.com/...", title: "PR #42" }]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
If the caller passes only a ticket key, fetch the ticket via `mcp__atlassian__getJiraIssue`, derive the same fields from the fetched data, then run gates.
|
|
64
|
+
|
|
65
|
+
## Gates
|
|
66
|
+
|
|
67
|
+
Gates are grouped into **Specification** (spec-only checks, no JIRA lookups) and **Feasibility** (requires JIRA lookups). The dry-run path may opt to run Specification gates only; the write path runs both.
|
|
68
|
+
|
|
69
|
+
### Specification Gates
|
|
70
|
+
|
|
71
|
+
#### S1 — Required core fields
|
|
72
|
+
|
|
73
|
+
`project_key`, `issue_type`, `summary`, `priority`, `description` must all be present and non-empty.
|
|
74
|
+
|
|
75
|
+
#### S2 — Summary format
|
|
76
|
+
|
|
77
|
+
- Single line, ≤ 100 characters
|
|
78
|
+
- Imperative voice ("Add X", "Fix Y", not "Adding X" or "X is broken")
|
|
79
|
+
- Bug / Task / Sub-task summaries SHOULD start with a `[repo-name]` prefix when the project convention uses one
|
|
80
|
+
|
|
81
|
+
#### S3 — Description has all three audiences
|
|
82
|
+
|
|
83
|
+
Description text must include all of these sections (case-insensitive `h2.` headings):
|
|
84
|
+
- `Context / Business Value` — stakeholder-facing
|
|
85
|
+
- `Technical Approach` — developer-facing
|
|
86
|
+
- `Acceptance Criteria` — coding-assistant-facing
|
|
87
|
+
- `Out of Scope` — explicit non-coverage list
|
|
88
|
+
|
|
89
|
+
Missing any → FAIL with name of missing section.
|
|
90
|
+
|
|
91
|
+
#### S4 — Acceptance criteria in Gherkin
|
|
92
|
+
|
|
93
|
+
Applies when `issue_type ∈ {Story, Task, Bug, Sub-task, Improvement}`.
|
|
94
|
+
|
|
95
|
+
The `Acceptance Criteria` section must contain at least one criterion in `Given / When / Then` form. Reject prose-only criteria, "should work" language, or numbered lists without Given/When/Then verbs.
|
|
96
|
+
|
|
97
|
+
#### S5 — Bug-specific content
|
|
98
|
+
|
|
99
|
+
When `issue_type = Bug`, description must additionally include:
|
|
100
|
+
- Reproduction steps
|
|
101
|
+
- Expected vs. actual behavior
|
|
102
|
+
- Environment where reproduced
|
|
103
|
+
|
|
104
|
+
#### S6 — Spike-specific content
|
|
105
|
+
|
|
106
|
+
When `issue_type = Spike`, description must include:
|
|
107
|
+
- The question being answered
|
|
108
|
+
- Definition of done (decision doc / prototype / findings deliverable)
|
|
109
|
+
|
|
110
|
+
#### S7 — Epic parent declared
|
|
111
|
+
|
|
112
|
+
When `issue_type ∉ {Bug, Epic}`, `parent_key` must be set. (Validity of the key is checked in feasibility gates.)
|
|
113
|
+
|
|
114
|
+
#### S8 — Target Backend Environment
|
|
115
|
+
|
|
116
|
+
When `runtime_behavior_change = true`, description must contain `h2. Target Backend Environment` with one of `dev`, `staging`, `prod`. Skipped for doc-only / config-only / type-only / Epic.
|
|
117
|
+
|
|
118
|
+
#### S9 — Sign-in Required
|
|
119
|
+
|
|
120
|
+
When `authenticated_surface = true`, description must contain `h2. Sign-in Required` naming the account/role and credential source (1Password item, env var, seeded fixture).
|
|
121
|
+
|
|
122
|
+
If the spec doesn't set `authenticated_surface`, infer it: scan the description and AC for sign-in / login / "as a {role} user" / authenticated route signals. If signals present and no `Sign-in Required` section: FAIL.
|
|
123
|
+
|
|
124
|
+
#### S10 — Repository section, single-repo scope
|
|
125
|
+
|
|
126
|
+
When `issue_type ∈ {Bug, Task, Sub-task}`, description must contain `h2. Repository` naming exactly one repo. Multiple repos OR cross-repo references in AC: FAIL with recommendation to split.
|
|
127
|
+
|
|
128
|
+
Story / Epic / Spike / Improvement: skipped (may span repos).
|
|
129
|
+
|
|
130
|
+
#### S11 — Validation Journey present
|
|
131
|
+
|
|
132
|
+
When `runtime_behavior_change = true`, description must contain `h2. Validation Journey`. Skipped for doc-only / config-only / type-only / Epic.
|
|
133
|
+
|
|
134
|
+
The caller controls the strictness by passing `journey_followup: "auto"` or `journey_followup: "none"` in the spec:
|
|
135
|
+
- `auto` (default): if the section is absent, return `FAIL` with remediation `"Invoke jira-add-journey to append the section after create"`. Callers like `jira-write-ticket` know to chain `jira-add-journey` automatically, so this counts as a fixable failure they can resolve in-line — they re-run validation after appending.
|
|
136
|
+
- `none`: missing section is a `FAIL` that the caller will not auto-fix, so the verdict gates progress (used by dry-run paths like `notion-to-jira` PRD intake, where there's no agent standing by to add the journey).
|
|
137
|
+
|
|
138
|
+
Either way the gate emits `FAIL`, not a third state. Strictness is the caller's policy, not the validator's.
|
|
139
|
+
|
|
140
|
+
#### S12 — Source Precedence (when artifacts attached)
|
|
141
|
+
|
|
142
|
+
When `artifacts_attached = true`, description must include source-precedence guidance covering: business rules → PRD body, visual treatment → mocks, flow → prototypes, API/data → data artifacts. Cross-axis conflicts surfaced under `## Open Questions`.
|
|
143
|
+
|
|
144
|
+
Accept either placement — both are valid per `jira-source-artifacts`:
|
|
145
|
+
- A dedicated `## Source Precedence` (or `h2. Source Precedence`) subsection, OR
|
|
146
|
+
- A "Source Precedence" / "source precedence" / "authoritative source" paragraph under `Technical Approach` that covers the four axes above.
|
|
147
|
+
|
|
148
|
+
Detect by scanning for the phrase `Source Precedence` (case-insensitive) anywhere in the description, AND verifying the four axes (business rules, visual, flow, data) are each named. Missing the phrase OR missing one or more axes: FAIL with a remediation that names the missing axes.
|
|
149
|
+
|
|
150
|
+
#### S13 — Relationship Search documented
|
|
151
|
+
|
|
152
|
+
The ticket must EITHER have at least one issue link in `links`, OR the description / a comment must contain a `## Relationship Search` block listing the git history queries and JQL queries that were run with their outcomes ("Searched git history for `<keywords>` and JQL for component=`X`; no related work found.").
|
|
153
|
+
|
|
154
|
+
A ticket with zero links and no documented search: FAIL.
|
|
155
|
+
|
|
156
|
+
### Feasibility Gates (require JIRA lookups; skip in dry-run if requested)
|
|
157
|
+
|
|
158
|
+
#### F1 — Issue type valid in project
|
|
159
|
+
|
|
160
|
+
Call `mcp__atlassian__getJiraProjectIssueTypesMetadata` and confirm `issue_type` exists in `project_key`.
|
|
161
|
+
|
|
162
|
+
#### F2 — Epic parent exists and is an Epic
|
|
163
|
+
|
|
164
|
+
When `parent_key` is set for non-Sub-task: fetch via `mcp__atlassian__getJiraIssue`, confirm the issue type is `Epic`. For Sub-task, confirm the parent is a non-Sub-task in the same project.
|
|
165
|
+
|
|
166
|
+
#### F3 — Linked tickets exist
|
|
167
|
+
|
|
168
|
+
For each entry in `links`, call `mcp__atlassian__getJiraIssue` to confirm the key resolves. Flag broken keys.
|
|
169
|
+
|
|
170
|
+
#### F4 — Required custom fields populated
|
|
171
|
+
|
|
172
|
+
`mcp__atlassian__getJiraProjectIssueTypesMetadata` returns required custom fields for the issue type. Any required custom field not provided in the spec: FAIL.
|
|
173
|
+
|
|
174
|
+
## Execution
|
|
175
|
+
|
|
176
|
+
1. Parse `$ARGUMENTS`. If it's a ticket key, fetch the ticket and derive the spec from the fetched fields. Otherwise parse the YAML spec.
|
|
177
|
+
2. Resolve cloud ID via `mcp__atlassian__getAccessibleAtlassianResources` if any feasibility gate will run.
|
|
178
|
+
3. Run every Specification gate in order. Collect PASS / FAIL / N/A with a one-line reason.
|
|
179
|
+
4. Unless the caller passed `--spec-only` (dry-run), run every Feasibility gate. Collect results.
|
|
180
|
+
5. Emit the report below.
|
|
181
|
+
|
|
182
|
+
## Output
|
|
183
|
+
|
|
184
|
+
Output is a single fenced text block. Callers parse it; do not add free-form prose around it.
|
|
185
|
+
|
|
186
|
+
```text
|
|
187
|
+
## jira-validate-ticket: <TICKET-KEY-or-SUMMARY>
|
|
188
|
+
|
|
189
|
+
### Specification Gates
|
|
190
|
+
- [PASS|FAIL|N/A] S1 Required core fields — <one-line reason>
|
|
191
|
+
- [PASS|FAIL|N/A] S2 Summary format — <one-line reason>
|
|
192
|
+
- [PASS|FAIL|N/A] S3 Description three audiences — <one-line reason>
|
|
193
|
+
- [PASS|FAIL|N/A] S4 Acceptance criteria in Gherkin — <one-line reason>
|
|
194
|
+
- [PASS|FAIL|N/A] S5 Bug-specific content — <one-line reason>
|
|
195
|
+
- [PASS|FAIL|N/A] S6 Spike-specific content — <one-line reason>
|
|
196
|
+
- [PASS|FAIL|N/A] S7 Epic parent declared — <one-line reason>
|
|
197
|
+
- [PASS|FAIL|N/A] S8 Target Backend Environment — <one-line reason>
|
|
198
|
+
- [PASS|FAIL|N/A] S9 Sign-in Required — <one-line reason>
|
|
199
|
+
- [PASS|FAIL|N/A] S10 Single-repo scope — <one-line reason>
|
|
200
|
+
- [PASS|FAIL|N/A] S11 Validation Journey — <one-line reason>
|
|
201
|
+
- [PASS|FAIL|N/A] S12 Source Precedence — <one-line reason>
|
|
202
|
+
- [PASS|FAIL|N/A] S13 Relationship Search — <one-line reason>
|
|
203
|
+
|
|
204
|
+
### Feasibility Gates (omit this section when --spec-only)
|
|
205
|
+
- [PASS|FAIL|N/A] F1 Issue type valid in project — <one-line reason>
|
|
206
|
+
- [PASS|FAIL|N/A] F2 Epic parent exists and is an Epic — <one-line reason>
|
|
207
|
+
- [PASS|FAIL|N/A] F3 Linked tickets exist — <one-line reason>
|
|
208
|
+
- [PASS|FAIL|N/A] F4 Required custom fields populated — <one-line reason>
|
|
209
|
+
|
|
210
|
+
### Verdict: PASS | FAIL
|
|
211
|
+
### Failures: <count>
|
|
212
|
+
### Remediation
|
|
213
|
+
- <gate-id>: <concrete fix the caller can apply or surface to the user>
|
|
214
|
+
- <gate-id>: <concrete fix>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
The verdict is `PASS` if and only if every applicable gate is `PASS`. Any `FAIL` makes the verdict `FAIL`. `N/A` does not affect the verdict.
|
|
218
|
+
|
|
219
|
+
## Rules
|
|
220
|
+
|
|
221
|
+
- Never write to JIRA. The `allowed-tools` list intentionally excludes `createJiraIssue`, `editJiraIssue`, `createIssueLink`, `addCommentToJiraIssue`.
|
|
222
|
+
- Never auto-fix the spec. This skill reports gaps; callers decide what to do (block, ask the human, regenerate the spec).
|
|
223
|
+
- Never silently skip a gate. If a gate genuinely doesn't apply, return `N/A` with the reason; never omit it.
|
|
224
|
+
- The remediation lines must be concrete and actionable — the dry-run path turns each one into a Notion comment, so vague guidance is useless.
|