@codyswann/lisa 1.95.0 → 1.96.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/jira/build-intake.md +7 -0
- package/plugins/lisa/commands/jira/source-artifacts.md +6 -0
- package/plugins/lisa/commands/jira/validate-ticket.md +7 -0
- package/plugins/lisa/commands/notion-prd-intake.md +7 -0
- package/plugins/lisa/commands/prd-ticket-coverage.md +7 -0
- package/plugins/lisa/commands/product-walkthrough.md +7 -0
- 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-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/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/jira/build-intake.md +7 -0
- package/plugins/src/base/commands/jira/source-artifacts.md +6 -0
- package/plugins/src/base/commands/jira/validate-ticket.md +7 -0
- package/plugins/src/base/commands/notion-prd-intake.md +7 -0
- package/plugins/src/base/commands/prd-ticket-coverage.md +7 -0
- package/plugins/src/base/commands/product-walkthrough.md +7 -0
- 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/expo/skills/jira-create/SKILL.md +60 -28
- package/plugins/src/expo/skills/jira-verify/SKILL.md +14 -34
- package/plugins/src/rails/skills/jira-create/SKILL.md +59 -28
- package/plugins/src/rails/skills/jira-verify/SKILL.md +13 -16
|
@@ -1,104 +1,28 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: jira-verify
|
|
3
|
-
description: This skill should be used when verifying that a JIRA ticket meets organizational standards for epic relationships and description quality. It
|
|
4
|
-
allowed-tools: ["
|
|
3
|
+
description: This skill should be used when verifying that a JIRA ticket meets organizational standards for epic relationships and description quality. It fetches the live ticket and delegates the gate checks to jira-validate-ticket so the bar matches what jira-write-ticket enforces pre-write.
|
|
4
|
+
allowed-tools: ["Skill", "mcp__atlassian__getJiraIssue", "mcp__atlassian__getAccessibleAtlassianResources"]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Verify JIRA Ticket: $ARGUMENTS
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Verify that the existing JIRA ticket `$ARGUMENTS` meets organizational standards. This skill is a thin post-write wrapper around `jira-validate-ticket`: it fetches the live ticket and asks `jira-validate-ticket` to run the gates against the fetched state.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
This indirection exists so the gate definitions live in exactly one place (`jira-validate-ticket`). When the bar changes, change it there — `jira-verify`, `jira-write-ticket` (Phase 5.5 pre-write), and `notion-to-jira` (PRD dry-run) all pick it up.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## Process
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
1. Resolve cloud ID via `mcp__atlassian__getAccessibleAtlassianResources`.
|
|
16
|
+
2. Fetch the ticket via `mcp__atlassian__getJiraIssue` for `$ARGUMENTS`. Pull issue type, summary, description, parent, links, labels, components, and any custom fields needed.
|
|
17
|
+
3. Invoke `jira-validate-ticket` and pass the ticket key. The validator fetches its own copy if needed and runs every gate (Specification + Feasibility) against the live state.
|
|
18
|
+
4. Surface the validator's report verbatim to the caller.
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
## Output
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
Pass through `jira-validate-ticket`'s structured output unchanged. Do not summarize or paraphrase — downstream callers (e.g. `jira-agent`'s pre-flight gate) parse the gate lines.
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
## Notes
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
### 3. Validation Journey
|
|
28
|
-
|
|
29
|
-
**Rule**: Tickets that change runtime behavior MUST include a Validation Journey section.
|
|
30
|
-
|
|
31
|
-
Check by running:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
python3 .claude/skills/jira-journey/scripts/parse-plan.py <TICKET_ID> 2>&1
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
- If the parser returns steps: PASS
|
|
38
|
-
- If the parser fails with "No 'Validation Journey' section found": FAIL — recommend using `/jira-add-journey <TICKET_ID>` to add one
|
|
39
|
-
|
|
40
|
-
This check is skipped for:
|
|
41
|
-
- Documentation-only tickets
|
|
42
|
-
- Config-only tickets (env vars, CI/CD, feature flags)
|
|
43
|
-
- Type-definition-only tickets (no runtime effect)
|
|
44
|
-
- Epic-level tickets (journeys belong on child stories/tasks)
|
|
45
|
-
|
|
46
|
-
### 4. Target Backend Environment
|
|
47
|
-
|
|
48
|
-
**Rule**: Tickets that change runtime behavior MUST name a target backend environment in the description.
|
|
49
|
-
|
|
50
|
-
Look for an `h2. Target Backend Environment` section (or equivalent named callout) containing one of `dev`, `staging`, or `prod`. The check is skipped for the same exclusions as the Validation Journey (doc-only, config-only, type-only, Epic).
|
|
51
|
-
|
|
52
|
-
- If present and valid: PASS
|
|
53
|
-
- If missing or unparseable: FAIL — recommend adding the section. QA/product report against a deployed env; the implementer needs to know which backend to point local at before CI/CD.
|
|
54
|
-
|
|
55
|
-
### 5. Sign-in Credentials (Conditional)
|
|
56
|
-
|
|
57
|
-
**Rule**: If the ticket touches an authenticated surface, the description MUST name the account/role to sign in as and where to get credentials.
|
|
58
|
-
|
|
59
|
-
A surface is "authenticated" if any of these signals are present in the description, acceptance criteria, or Validation Journey:
|
|
60
|
-
- Verbs like "log in", "sign in", "as a {role} user", "authenticated"
|
|
61
|
-
- Routes/screens that require auth in this product
|
|
62
|
-
- Roles named (admin, customer, partner, etc.)
|
|
63
|
-
|
|
64
|
-
If those signals are present, look for an `h2. Sign-in Required` section naming an account or credential source.
|
|
65
|
-
|
|
66
|
-
- If signals absent: PASS (sign-in not required)
|
|
67
|
-
- If signals present and section present: PASS
|
|
68
|
-
- If signals present and section missing: FAIL — recommend adding it. Implementers must not have to guess which account to use.
|
|
69
|
-
|
|
70
|
-
### 6. Single-Repo Scope (Bug / Task / Sub-task)
|
|
71
|
-
|
|
72
|
-
**Rule**: Bug, Task, and Sub-task tickets MUST cover one repo. Epic, Spike, and Story may span multiple repos.
|
|
73
|
-
|
|
74
|
-
Check by inspecting the description's `h2. Repository` section (or equivalent) and any explicit cross-repo references in the description / acceptance criteria.
|
|
75
|
-
|
|
76
|
-
- Bug / Task / Sub-task that names exactly one repo: PASS
|
|
77
|
-
- Bug / Task / Sub-task that names multiple repos OR has acceptance criteria spanning repos: FAIL — recommend splitting into per-repo tickets under a parent Story/Epic.
|
|
78
|
-
- Other types: skipped.
|
|
79
|
-
|
|
80
|
-
### 7. Relationship Discovery
|
|
81
|
-
|
|
82
|
-
**Rule**: Every ticket MUST have either at least one issue link OR a documented relationship search showing none was found.
|
|
83
|
-
|
|
84
|
-
- If the ticket has any issue link (`blocks`, `is blocked by`, `relates to`, `duplicates`, `clones`): PASS
|
|
85
|
-
- If no links but the description (or a comment) contains a `## Relationship Search` block listing the git and JQL queries that were run with their outcomes: PASS
|
|
86
|
-
- If no links and no documented search: FAIL — recommend running `/jira-write-ticket` (or its discovery phase) to capture the search.
|
|
87
|
-
|
|
88
|
-
## Execute Verification
|
|
89
|
-
|
|
90
|
-
Retrieve ticket details, run all checks, and produce a single output block. For each FAIL include the specific remediation. The caller (typically `jira-agent`) uses the FAIL list to decide whether to gate work — see the agent's pre-flight gate.
|
|
91
|
-
|
|
92
|
-
```text
|
|
93
|
-
## jira-verify: <TICKET-KEY>
|
|
94
|
-
- Epic parent: PASS | FAIL — <reason>
|
|
95
|
-
- Description quality: PASS | FAIL — <reason>
|
|
96
|
-
- Validation Journey: PASS | FAIL | N/A — <reason>
|
|
97
|
-
- Target backend environment: PASS | FAIL | N/A — <reason>
|
|
98
|
-
- Sign-in credentials: PASS | FAIL | N/A — <reason>
|
|
99
|
-
- Single-repo scope: PASS | FAIL | N/A — <reason>
|
|
100
|
-
- Relationship discovery: PASS | FAIL — <reason>
|
|
101
|
-
|
|
102
|
-
## Verdict: PASS | FAIL
|
|
103
|
-
## Missing requirements: [list of FAILed checks, or "none"]
|
|
104
|
-
```
|
|
26
|
+
- This skill is read-only. It never edits the ticket, posts comments, or changes status.
|
|
27
|
+
- If a gate fails, the recommendation is part of the validator's report; surface it as-is.
|
|
28
|
+
- Validation Journey checks (S11) historically required a parser script (`parse-plan.py`); the parser logic now lives inside `jira-validate-ticket` so this skill no longer shells out to it.
|
|
@@ -170,28 +170,19 @@ Identify and attach:
|
|
|
170
170
|
- Confluence pages (design docs, RFCs, runbooks)
|
|
171
171
|
- Dashboards (Grafana, Datadog, Sentry issue)
|
|
172
172
|
- Incident tickets (PagerDuty, Statuspage)
|
|
173
|
-
- **Source artifacts from the originating PRD / parent epic**:
|
|
174
|
-
|
|
175
|
-
Domain disambiguation (applied on inheritance):
|
|
176
|
-
- Figma URL with `/proto/` in path or `starting-point-node-id=` in query → `ux-flow`; otherwise `ui-design`.
|
|
177
|
-
- Lovable output → always `ux-flow`; its code/styling is not authoritative.
|
|
178
|
-
- Loom / annotated screenshot → `ux-flow`.
|
|
179
|
-
- Bare screenshot → `ui-design`.
|
|
173
|
+
- **Source artifacts from the originating PRD / parent epic**: classify and inherit per the rules in `jira-source-artifacts` (invoke that skill if you haven't loaded the rules in this session). The short version: enumerate the parent epic's remote links and inherit the ones whose domain matches this ticket's scope (UI → `ui-design` + `ux-flow`; backend → `data`; infra → `ops`; always inherit `reference`). Never assume a developer will walk up to the epic to find design context — attach it here.
|
|
180
174
|
|
|
181
175
|
If the ticket was generated from a PRD (by `notion-to-jira` or similar) and the parent epic has no source artifacts, surface that as a smell and ask whether artifacts were missed during extraction before proceeding.
|
|
182
176
|
|
|
183
177
|
### 4d. Source Precedence (must appear on the ticket)
|
|
184
178
|
|
|
185
|
-
When a ticket carries both design artifacts and a description,
|
|
179
|
+
Source precedence rules and cross-axis conflict handling are defined in `jira-source-artifacts` §3 and §4. When a ticket carries both design artifacts and a description, record the precedence explicitly in the ticket description (under Technical Approach or a dedicated `## Source Precedence` subsection) so the implementer doesn't silently reconcile conflicts. Cross-axis conflicts go under `## Open Questions` as BLOCKER items.
|
|
186
180
|
|
|
187
|
-
-
|
|
188
|
-
- **Visual treatment** (layout, spacing, typography, color, iconography) → **mocks (`ui-design`)** win.
|
|
189
|
-
- **Flow and interaction** (navigation, transitions, state changes, timing, empty/error/loading states) → **prototypes (`ux-flow`)** win.
|
|
190
|
-
- **API / data shape** → **`data` artifacts** win.
|
|
181
|
+
For UI-touching tickets, include the existing-component reuse expectation per `jira-source-artifacts` §7.
|
|
191
182
|
|
|
192
|
-
|
|
183
|
+
### 4e. Live Product Walkthrough Findings (UI-touching tickets)
|
|
193
184
|
|
|
194
|
-
|
|
185
|
+
If the ticket modifies an existing user-facing surface, a `product-walkthrough` should already have been run upstream (by `notion-to-jira` Phase 2b or `jira-create`). Inherit its findings under a `## Current Product` subsection in the ticket description so the implementer sees what's shipped today before changing it. If the upstream skill skipped the walkthrough but this ticket clearly modifies an existing surface, invoke `product-walkthrough` here before proceeding.
|
|
195
186
|
|
|
196
187
|
Use Jira's web UI or `mcp__atlassian__editJiraIssue` to set the `Development` field / remote links where supported.
|
|
197
188
|
|
|
@@ -207,6 +198,19 @@ Before create/update, verify each field is populated where applicable:
|
|
|
207
198
|
- Sprint: only if actively sprinting this work
|
|
208
199
|
- Assignee: leave unset if unknown rather than auto-assigning
|
|
209
200
|
|
|
201
|
+
## Phase 5.5 — Validate (Pre-write Gate)
|
|
202
|
+
|
|
203
|
+
Before any write, invoke `jira-validate-ticket` with the full proposed spec assembled from Phases 2 / 3 / 4 / 5. Pass it as a YAML block per the `jira-validate-ticket` schema, including `runtime_behavior_change`, `authenticated_surface`, and `artifacts_attached` flags so the right gates run.
|
|
204
|
+
|
|
205
|
+
The validator is the **single source of truth** for what makes a valid ticket. The same gates are used by `notion-to-jira` dry-run, by `jira-verify` post-write, and here. Do not re-implement gate logic in this skill — if a gate needs to change, change `jira-validate-ticket` so every caller benefits.
|
|
206
|
+
|
|
207
|
+
If the validator reports `FAIL`:
|
|
208
|
+
- Surface the failure list and the per-gate remediation to the user.
|
|
209
|
+
- Do NOT proceed to Phase 6. Fix the spec (or stop and ask the human) and re-run validation.
|
|
210
|
+
- Never call `mcp__atlassian__createJiraIssue` or `mcp__atlassian__editJiraIssue` while the validator's verdict is FAIL.
|
|
211
|
+
|
|
212
|
+
If the validator reports `PASS`, continue to Phase 6.
|
|
213
|
+
|
|
210
214
|
## Phase 6 — Create or Update
|
|
211
215
|
|
|
212
216
|
### CREATE
|
|
@@ -225,7 +229,7 @@ Before create/update, verify each field is populated where applicable:
|
|
|
225
229
|
|
|
226
230
|
## Phase 7 — Verify
|
|
227
231
|
|
|
228
|
-
Call the `jira-verify` skill on the resulting ticket. If it reports failures, fix them before returning. Do not report success on a ticket that fails verify.
|
|
232
|
+
Call the `jira-verify` skill on the resulting ticket. `jira-verify` fetches the live ticket and runs `jira-validate-ticket` against it — same gates as Phase 5.5, but applied to what JIRA actually stored (catches anything dropped or reformatted on write). If it reports failures, fix them before returning. Do not report success on a ticket that fails verify.
|
|
229
233
|
|
|
230
234
|
## Phase 8 — Announce
|
|
231
235
|
|
|
@@ -246,3 +250,4 @@ Skip this step only on UPDATE when no material change was made.
|
|
|
246
250
|
- Never invent custom field values. If the project requires a field you don't have, stop and ask.
|
|
247
251
|
- Never overwrite a description without reading the current version first.
|
|
248
252
|
- All writes go through this skill so best practices are enforced uniformly. Downstream skills (e.g. `jira-create`) should delegate here rather than calling the MCP write tools directly.
|
|
253
|
+
- The gate logic (what makes a valid ticket) lives in `jira-validate-ticket`, NOT in this skill. This skill calls the validator at Phase 5.5 (pre-write) and Phase 7 (via `jira-verify` post-write). When a gate needs to change, change it in `jira-validate-ticket` — every caller (write path, dry-run path, post-write verify) picks it up automatically.
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: notion-prd-intake
|
|
3
|
+
description: "Scans a Notion PRD database for pages with Status=Ready and runs each one through the dry-run validation pipeline. PRDs that pass every gate get tickets written and Status=Ticketed; PRDs that fail get clarifying-question comments and Status=Blocked. The skill is the runtime for the Ready → In Review → Blocked|Ticketed lifecycle. Composes existing skills (notion-to-jira, jira-validate-ticket, jira-source-artifacts, product-walkthrough); does not reimplement their logic."
|
|
4
|
+
allowed-tools: ["Skill", "Bash", "mcp__claude_ai_Notion__notion-fetch", "mcp__claude_ai_Notion__notion-search", "mcp__claude_ai_Notion__notion-update-page", "mcp__claude_ai_Notion__notion-create-comment", "mcp__atlassian__getAccessibleAtlassianResources"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Notion PRD Intake: $ARGUMENTS
|
|
8
|
+
|
|
9
|
+
`$ARGUMENTS` is a Notion database URL (or bare database ID) — for example:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
https://www.notion.so/geminisports/28fd00244d7d47c5866876f7de48c0fe?v=34eba63a2800815891a3000c643f0ea8
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Run one intake cycle against that database. Each PRD with `Status = Ready` is claimed, validated, and routed to either `Blocked` (with clarifying comments) or `Ticketed` (with JIRA tickets created).
|
|
16
|
+
|
|
17
|
+
## Lifecycle assumed
|
|
18
|
+
|
|
19
|
+
The PRD database has a `Status` property whose value drives this skill:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
Draft → Ready → In Review → Blocked | Ticketed → Shipped
|
|
23
|
+
(product) (us) (us) (product)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
This skill ONLY transitions `Ready → In Review`, then `In Review → Blocked` or `In Review → Ticketed`. Never touches `Draft` or `Shipped`.
|
|
27
|
+
|
|
28
|
+
## Phases
|
|
29
|
+
|
|
30
|
+
### Phase 1 — Resolve the database
|
|
31
|
+
|
|
32
|
+
1. Parse `$ARGUMENTS`:
|
|
33
|
+
- Full URL: extract the database ID from the path segment (the 32-hex-char ID after the last `/`, before `?`). Strip dashes if present. Ignore the `?v=...` view ID — we query the data source directly.
|
|
34
|
+
- Bare ID: use as-is.
|
|
35
|
+
2. Call `mcp__claude_ai_Notion__notion-fetch` on the database ID. Capture:
|
|
36
|
+
- The data source ID from `<data-source url="collection://...">` — needed for queries.
|
|
37
|
+
- Confirm the schema includes a `Status` property of type `select` (or `status`) with the expected option names (`Ready`, `In Review`, `Blocked`, `Ticketed` at minimum). If any are missing, stop and report — the database is misconfigured.
|
|
38
|
+
3. Resolve Atlassian cloud ID via `mcp__atlassian__getAccessibleAtlassianResources` (downstream skills need it).
|
|
39
|
+
|
|
40
|
+
### Phase 2 — Find Ready PRDs
|
|
41
|
+
|
|
42
|
+
Query the data source for pages where `Status = Ready`. Use `mcp__claude_ai_Notion__notion-search` with `data_source_url: collection://<data-source-id>` and a query that scopes to that collection. The search supports semantic queries; for an exact-status filter, scan the returned page list and keep only those whose `Status` property equals `Ready` (re-fetch each page if the search results don't expose properties).
|
|
43
|
+
|
|
44
|
+
If the result set is empty, stop and report `"No PRDs with Status=Ready. Nothing to do."` Exit cleanly — this is the common idle case for a scheduled run.
|
|
45
|
+
|
|
46
|
+
### Phase 3 — Process each Ready PRD
|
|
47
|
+
|
|
48
|
+
For each PRD page (process serially to keep status transitions auditable):
|
|
49
|
+
|
|
50
|
+
#### 3a. Claim
|
|
51
|
+
|
|
52
|
+
Set `Status = In Review` via `mcp__claude_ai_Notion__notion-update-page` with `command: update_properties`, `properties: { "Status": "In Review" }`. This is the idempotency lock — if a second cycle starts while this one is mid-flight, the second skip-filter (`Status = Ready`) won't see this PRD.
|
|
53
|
+
|
|
54
|
+
If the update fails (permission error, race), log it and skip this PRD. Do not proceed to validation on a PRD you didn't successfully claim.
|
|
55
|
+
|
|
56
|
+
#### 3b. Dry-run validation
|
|
57
|
+
|
|
58
|
+
Invoke the `notion-to-jira` skill with `dry_run: true` and the PRD's URL. The skill returns a structured report containing:
|
|
59
|
+
- The planned ticket hierarchy
|
|
60
|
+
- Per-ticket validation verdicts and remediation
|
|
61
|
+
- An overall PASS / FAIL verdict
|
|
62
|
+
- A failure count
|
|
63
|
+
|
|
64
|
+
This call also indirectly invokes `jira-source-artifacts` (artifact extraction + classification) and `product-walkthrough` (when the PRD touches existing user-facing surfaces). All gate logic lives in `jira-validate-ticket`, which `notion-to-jira` calls per ticket.
|
|
65
|
+
|
|
66
|
+
#### 3c. Branch on the verdict
|
|
67
|
+
|
|
68
|
+
**If `PASS`** (every planned ticket passed every applicable gate):
|
|
69
|
+
|
|
70
|
+
1. Re-invoke `notion-to-jira` with `dry_run: false` to actually write the tickets. This re-runs Phases 1-5 and runs the preservation gate (Phase 5.5).
|
|
71
|
+
2. Capture the created ticket keys from the skill's output.
|
|
72
|
+
3. Post a Notion comment on the PRD via `mcp__claude_ai_Notion__notion-create-comment` listing the created tickets (epic, stories, sub-tasks) with their JIRA URLs. Lead with: `"Ticketed by Claude. Created N JIRA issues — see below. Move Status to Shipped after the work is delivered."`
|
|
73
|
+
4. Set `Status = Ticketed` via `notion-update-page`.
|
|
74
|
+
5. **Run Phase 3e (coverage audit)** before considering this PRD done.
|
|
75
|
+
|
|
76
|
+
#### 3e. Coverage audit (mandatory after Ticketed)
|
|
77
|
+
|
|
78
|
+
Per-ticket gates prove each ticket is well-formed; they do NOT prove the *set* of created tickets covers the *whole* PRD. Silent drops happen — invoke the `prd-ticket-coverage` skill to catch them.
|
|
79
|
+
|
|
80
|
+
1. Invoke `prd-ticket-coverage` with `<PRD URL> tickets=[<created ticket keys from step 2 above>]`.
|
|
81
|
+
2. Read the verdict:
|
|
82
|
+
|
|
83
|
+
| Verdict | Action |
|
|
84
|
+
|---------|--------|
|
|
85
|
+
| `COMPLETE` | Done. Leave `Status = Ticketed`. Move to next PRD. |
|
|
86
|
+
| `COMPLETE_WITH_SCOPE_CREEP` | Post an advisory Notion comment naming the scope-creep tickets (so product can decide whether to close them as out-of-scope). Leave `Status = Ticketed`. |
|
|
87
|
+
| `GAPS_FOUND` | The created ticket set is incomplete. (a) For each gap, post a Notion comment naming the missing PRD item and where it appears in the PRD, with the suggested fix from the audit report. (b) Post one summary comment listing the tickets that *were* successfully created (so product knows what to keep vs. what to extend). (c) Transition `Status` from `Ticketed` back to `Blocked` via `notion-update-page`. |
|
|
88
|
+
| `NO_TICKETS_FOUND` | Should not happen if step 2 succeeded. If it does, log it as an Error in the cycle summary and leave `Status = Ticketed` with a comment flagging the audit failure for human review. |
|
|
89
|
+
|
|
90
|
+
3. The created tickets remain in JIRA regardless of the verdict — they are valid in their own right (they passed `jira-validate-ticket`). The audit only tells us whether *more* are needed.
|
|
91
|
+
|
|
92
|
+
The audit's report should be summarized in the cycle summary alongside the per-PRD outcome (e.g., `Ticketed (coverage: COMPLETE)` or `Blocked (coverage gaps: 3)`).
|
|
93
|
+
|
|
94
|
+
**If `FAIL`** (one or more planned tickets failed one or more gates):
|
|
95
|
+
|
|
96
|
+
1. Group the failures by planned ticket.
|
|
97
|
+
2. For each failed ticket, post a Notion comment via `notion-create-comment` with this format:
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
**Blocker — planned ticket: <ticket-summary>**
|
|
101
|
+
|
|
102
|
+
The PRD as written can't produce a valid JIRA ticket for this scope. Specifically:
|
|
103
|
+
|
|
104
|
+
- **<gate-id> (<gate-name>)**: <reason>. *Fix:* <concrete remediation>.
|
|
105
|
+
- **<gate-id> (<gate-name>)**: <reason>. *Fix:* <concrete remediation>.
|
|
106
|
+
|
|
107
|
+
Once these are addressed in the PRD, set Status back to `Ready` and Claude will re-run intake.
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
3. Set `Status = Blocked` via `notion-update-page`.
|
|
111
|
+
4. Do NOT write any JIRA tickets.
|
|
112
|
+
|
|
113
|
+
Each comment must name the specific planned ticket and the specific gate — vague guidance is useless to product. The remediation field on the validator's report is already concrete; pass it through.
|
|
114
|
+
|
|
115
|
+
#### 3d. Continue
|
|
116
|
+
|
|
117
|
+
Move to the next Ready PRD. One PRD failing does not affect others.
|
|
118
|
+
|
|
119
|
+
### Phase 4 — Summary report
|
|
120
|
+
|
|
121
|
+
After processing every Ready PRD, emit a summary:
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
## notion-prd-intake summary
|
|
125
|
+
|
|
126
|
+
Database: <name> (<URL>)
|
|
127
|
+
Cycle started: <ISO timestamp>
|
|
128
|
+
Cycle completed: <ISO timestamp>
|
|
129
|
+
|
|
130
|
+
PRDs processed: <n>
|
|
131
|
+
- Ticketed: <n>
|
|
132
|
+
- <PRD title> → <epic-key> + <story-count> stories + <subtask-count> sub-tasks (coverage: COMPLETE | COMPLETE_WITH_SCOPE_CREEP)
|
|
133
|
+
- Blocked: <n>
|
|
134
|
+
- <PRD title> → <gate-failure-count> gate failures (pre-write) OR <gap-count> coverage gaps (post-write)
|
|
135
|
+
- Errors (claim failed, etc): <n>
|
|
136
|
+
- <PRD title> — <reason>
|
|
137
|
+
|
|
138
|
+
Total JIRA tickets created: <n>
|
|
139
|
+
Coverage audit summary: <n> COMPLETE / <n> COMPLETE_WITH_SCOPE_CREEP / <n> GAPS_FOUND
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Print to the agent's output. Do not write this summary to Notion or JIRA — it's an operational record for the human.
|
|
143
|
+
|
|
144
|
+
## Idempotency & safety
|
|
145
|
+
|
|
146
|
+
- **Single-cycle scope**: this skill processes the Ready set as it exists at the start of Phase 2. New `Ready` PRDs added mid-cycle are picked up next run.
|
|
147
|
+
- **No writes outside the lifecycle**: this skill only ever writes to JIRA via `notion-to-jira` (which delegates to `jira-write-ticket`), and only ever changes Notion `Status` to `In Review`, `Blocked`, or `Ticketed`. It never edits PRD content, never touches `Draft` or `Shipped`, never deletes pages.
|
|
148
|
+
- **Claim-first ordering**: `Status = In Review` is set BEFORE validation runs, so a re-entrant call won't double-process.
|
|
149
|
+
- **Failure isolation**: an exception processing one PRD must not stop the cycle. Catch, record under "Errors" in the summary, continue to the next PRD. The PRD that errored is left in `In Review` — the human investigates from there.
|
|
150
|
+
|
|
151
|
+
## Configuration
|
|
152
|
+
|
|
153
|
+
This skill reads project configuration from environment variables (or `$ARGUMENTS` overrides). If any required value is missing, ask the user before proceeding — never invent values.
|
|
154
|
+
|
|
155
|
+
| Variable | Purpose |
|
|
156
|
+
|----------|---------|
|
|
157
|
+
| `JIRA_PROJECT` | JIRA project key for ticket creation (passed to `notion-to-jira`) |
|
|
158
|
+
| `JIRA_SERVER` | Atlassian instance host |
|
|
159
|
+
| `E2E_BASE_URL` | Frontend URL for `product-walkthrough` |
|
|
160
|
+
| `E2E_TEST_PHONE` / `E2E_TEST_OTP` / `E2E_TEST_ORG` | Test user creds for walkthrough + verification plans |
|
|
161
|
+
| `E2E_GRAPHQL_URL` | API URL for verification plans |
|
|
162
|
+
|
|
163
|
+
## Rules
|
|
164
|
+
|
|
165
|
+
- Never write to JIRA outside of `notion-to-jira` → `jira-write-ticket`. The validator's verdict gates progress; bypassing it produces broken tickets.
|
|
166
|
+
- Never set Notion `Status` to a value this skill doesn't own (`In Review`, `Blocked`, `Ticketed`). Product owns `Draft`, `Ready`, `Shipped`.
|
|
167
|
+
- Never edit the PRD's body. Communication with product happens only through Notion comments.
|
|
168
|
+
- Never run more than one intake cycle concurrently against the same database. This skill assumes serial execution. (Scheduling is a separate concern; the runtime should not start a new cycle if a previous one is still in flight.)
|
|
169
|
+
- If `notion-to-jira` returns errors (e.g. unreachable artifact, malformed PRD structure), treat them as gate failures: comment + Blocked. Don't silently fail.
|