Updated on 2026-08-14
This commit is contained in:
parent
696c958901
commit
9f0cbc5660
4 changed files with 77 additions and 18 deletions
|
|
@ -53,11 +53,8 @@ option **id** (preferred); if the API rejects `{ "id": ... }` for a field, retry
|
||||||
| Value | id | When |
|
| Value | id | When |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `Core` | `15117` | default for most bugs (the common Core stream) |
|
| `Core` | `15117` | default for most bugs (the common Core stream) |
|
||||||
| `Blockchain` | `15120` | blockchain-specific bugs only |
|
|
||||||
| `Grow` | `15116` | Grow stream |
|
| `Grow` | `15116` | Grow stream |
|
||||||
| `Visa` | `15981` | Visa stream |
|
| `Visa` | `15981` | Visa stream |
|
||||||
| `Engagement` | `15118` | Engagement stream |
|
|
||||||
| `App store` | `15119` | App store stream |
|
|
||||||
|
|
||||||
**Detected by** (`customfield_10870`) — who found the bug:
|
**Detected by** (`customfield_10870`) — who found the bug:
|
||||||
|
|
||||||
|
|
@ -112,8 +109,7 @@ Ask the user **only for what is still missing**, grouped into as few questions a
|
||||||
result in the Phase 3 preview so the developer can approve or edit it before creation.
|
result in the Phase 3 preview so the developer can approve or edit it before creation.
|
||||||
- **Stream** (required) — **always ask** via `AskUserQuestion`. Offer the options from the **Stream**
|
- **Stream** (required) — **always ask** via `AskUserQuestion`. Offer the options from the **Stream**
|
||||||
table above (label = value). Per the metrics guidance, **Core** is the common default for most
|
table above (label = value). Per the metrics guidance, **Core** is the common default for most
|
||||||
bugs; **Blockchain** only for blockchain-specific bugs; **Grow** / **Visa** / **Engagement** /
|
bugs; use **Grow** / **Visa** for those streams. Map the chosen value to its option id.
|
||||||
**App store** for those streams. Map the chosen value to its option id.
|
|
||||||
- **Detected by** (required) — ask via `AskUserQuestion`, **default `Team`**. Offer `Team` (default —
|
- **Detected by** (required) — ask via `AskUserQuestion`, **default `Team`**. Offer `Team` (default —
|
||||||
anyone in Tangem except QA, e.g. the developer filing this), `QA`, `User` (non-Tangem / Support).
|
anyone in Tangem except QA, e.g. the developer filing this), `QA`, `User` (non-Tangem / Support).
|
||||||
Map to its option id.
|
Map to its option id.
|
||||||
|
|
|
||||||
|
|
@ -45,11 +45,11 @@ Jira** — skip the confirmation gate and the `createJiraIssue` call. See Phase
|
||||||
If the user picks a Stream, map the chosen value to its option **id** (preferred); on a `{ "id": ... }`
|
If the user picks a Stream, map the chosen value to its option **id** (preferred); on a `{ "id": ... }`
|
||||||
rejection retry that field with `{ "value": "<value>" }`.
|
rejection retry that field with `{ "value": "<value>" }`.
|
||||||
|
|
||||||
| Value | id | | Value | id |
|
| Value | id |
|
||||||
|---|---|---|---|---|
|
|---|---|
|
||||||
| `Core` | `15117` | | `Visa` | `15981` |
|
| `Core` | `15117` |
|
||||||
| `Blockchain` | `15120` | | `Engagement` | `15118` |
|
| `Grow` | `15116` |
|
||||||
| `Grow` | `15116` | | `App store` | `15119` |
|
| `Visa` | `15981` |
|
||||||
|
|
||||||
> **Tool names:** the phases below reference MCP tools by short name (e.g. `createJiraIssue`,
|
> **Tool names:** the phases below reference MCP tools by short name (e.g. `createJiraIssue`,
|
||||||
> `getAccessibleAtlassianResources`) for readability. These map to the fully-qualified Atlassian Rovo
|
> `getAccessibleAtlassianResources`) for readability. These map to the fully-qualified Atlassian Rovo
|
||||||
|
|
|
||||||
|
|
@ -45,11 +45,11 @@ Jira** — skip the confirmation gate and the `createJiraIssue` call. See Phase
|
||||||
If the user picks a Stream, map the chosen value to its option **id** (preferred); on a `{ "id": ... }`
|
If the user picks a Stream, map the chosen value to its option **id** (preferred); on a `{ "id": ... }`
|
||||||
rejection retry that field with `{ "value": "<value>" }`.
|
rejection retry that field with `{ "value": "<value>" }`.
|
||||||
|
|
||||||
| Value | id | | Value | id |
|
| Value | id |
|
||||||
|---|---|---|---|---|
|
|---|---|
|
||||||
| `Core` | `15117` | | `Visa` | `15981` |
|
| `Core` | `15117` |
|
||||||
| `Blockchain` | `15120` | | `Engagement` | `15118` |
|
| `Grow` | `15116` |
|
||||||
| `Grow` | `15116` | | `App store` | `15119` |
|
| `Visa` | `15981` |
|
||||||
|
|
||||||
> **Tool names:** the phases below reference MCP tools by short name (e.g. `createJiraIssue`,
|
> **Tool names:** the phases below reference MCP tools by short name (e.g. `createJiraIssue`,
|
||||||
> `getAccessibleAtlassianResources`) for readability. These map to the fully-qualified Atlassian Rovo
|
> `getAccessibleAtlassianResources`) for readability. These map to the fully-qualified Atlassian Rovo
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
name: create-pr
|
name: create-pr
|
||||||
description: Open a GitHub pull request for the current work via the GitHub CLI (gh), following Tangem repo conventions — branch naming (feature/bugfix/AND-xxx), commit format (AND-xxx Description), base develop, required trailers. Picks which changes to include, creates a feature branch off a protected branch, commits, and — only after explicit confirmation — pushes and opens the PR. Use when the user asks to "open/create a PR", "создай ПР / пул-реквест", "open a pull request", "залей в PR".
|
description: Open a GitHub pull request for the current work via the GitHub CLI (gh), following Tangem repo conventions — branch naming (feature/bugfix/AND-xxx), commit format (AND-xxx Description), base develop, required trailers. Picks which changes to include, creates a feature branch off a protected branch, commits, and — only after explicit confirmation — pushes and opens the PR. For a task-tied PR, then offers to fill the Jira task's QA Notes from the local changes (after review & confirmation). Use when the user asks to "open/create a PR", "создай ПР / пул-реквест", "open a pull request", "залей в PR".
|
||||||
allowed-tools: Read, Bash, AskUserQuestion, Monitor, TaskStop
|
allowed-tools: Read, Bash, AskUserQuestion, Monitor, TaskStop, mcp__claude_ai_Atlassian_Rovo__getJiraIssue, mcp__claude_ai_Atlassian_Rovo__editJiraIssue
|
||||||
argument-hint: [AND-xxxxx] [title...] [--base develop] [--dry-run]
|
argument-hint: [AND-xxxxx] [title...] [--base develop] [--dry-run]
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -10,6 +10,10 @@ Open a GitHub pull request for the current changes via `gh`, following this repo
|
||||||
This skill is **interactive** and runs locally. **Pushing and opening the PR happen ONLY after an
|
This skill is **interactive** and runs locally. **Pushing and opening the PR happen ONLY after an
|
||||||
explicit confirmation gate (Phase 4)** — never push or create the PR before the user confirms.
|
explicit confirmation gate (Phase 4)** — never push or create the PR before the user confirms.
|
||||||
|
|
||||||
|
For a PR tied to a specific Jira task (i.e. **not** a Technical PR), after the PR is open the skill
|
||||||
|
offers to fill the task's **QA Notes** field from the local changes — **only after the user reviews
|
||||||
|
and confirms the exact text** (Phase 6b). Never write to Jira before that confirmation.
|
||||||
|
|
||||||
## Conventions
|
## Conventions
|
||||||
|
|
||||||
**Source of truth: [`.claude/rules/git-rules.md`](../../rules/git-rules.md)** — read it for branch
|
**Source of truth: [`.claude/rules/git-rules.md`](../../rules/git-rules.md)** — read it for branch
|
||||||
|
|
@ -243,7 +247,66 @@ If a step fails, stop and surface the exact error and the command that failed; d
|
||||||
## Phase 6 — Report
|
## Phase 6 — Report
|
||||||
|
|
||||||
Output the PR URL, branch, base, the files included, and the labels. Do **not** offer to comment the
|
Output the PR URL, branch, base, the files included, and the labels. Do **not** offer to comment the
|
||||||
PR link on Jira or to change the Jira task status — those are out of scope for this skill.
|
PR link on Jira or to change the Jira task status — those are out of scope for this skill. (Filling
|
||||||
|
the task's **QA Notes** is in scope — see Phase 6b.)
|
||||||
|
|
||||||
|
## Phase 6b — QA Notes on the Jira task
|
||||||
|
|
||||||
|
**Runs only for a PR tied to a Jira task** — skip entirely for a **Technical PR** (no task id), and
|
||||||
|
skip in **`--dry-run`** (note in the dry-run output that QA Notes would be offered, but make no Jira
|
||||||
|
read/write). This is the only Jira write this skill performs, and it happens **after** the PR is open.
|
||||||
|
|
||||||
|
QA Notes is a testing note for QA, **written strictly in Russian**, describing user-facing behaviour
|
||||||
|
to verify **without any code-level names** (no class / component / function / file names). It is the
|
||||||
|
same field and conventions as the `create-jira-task` skill: field **`customfield_11232`**, **ADF
|
||||||
|
document only** (a plain string is rejected).
|
||||||
|
|
||||||
|
> **Tool names:** the steps below reference the Jira MCP tools by short name (`getJiraIssue`,
|
||||||
|
> `editJiraIssue`) for readability. These map to the fully-qualified Atlassian Rovo tools declared in
|
||||||
|
> `allowed-tools` (`mcp__claude_ai_Atlassian_Rovo__getJiraIssue` /
|
||||||
|
> `mcp__claude_ai_Atlassian_Rovo__editJiraIssue`) — invoke them by their fully-qualified names.
|
||||||
|
|
||||||
|
1. **Read the current value.** `getJiraIssue` for the resolved `AND-xxxxx` with
|
||||||
|
`fields: ["summary","customfield_11232"]` and `responseContentFormat: "markdown"` so the field
|
||||||
|
comes back as readable plain text rather than raw ADF JSON. (The field is stored as an ADF
|
||||||
|
document — if you fetch it as ADF, extract the plain text from the `content` paragraphs before
|
||||||
|
showing it; never paste raw ADF into the preview.)
|
||||||
|
- **Already filled** (non-empty `customfield_11232`) → **warn the user**, show the existing QA
|
||||||
|
Notes as plain text, and ask via `AskUserQuestion` how to proceed: **Keep existing** (default —
|
||||||
|
make no change, skip the rest of this phase) / **Overwrite** / **Append**. Do not silently
|
||||||
|
clobber an existing value.
|
||||||
|
- **Empty** → offer to fill it (**Generate & fill** / **Skip**). If the user skips, end the phase.
|
||||||
|
|
||||||
|
2. **Generate the QA Notes from the changes in this PR** (in Russian, for testers): describe in plain
|
||||||
|
language what to verify — you may include concrete test cases (step → expected result). Base it on
|
||||||
|
the PR's actual diff, not a bare `git diff` (which is empty after the commit/push): use
|
||||||
|
`git diff origin/<base>...HEAD` (the branch's changes against the base), or `git show HEAD` for a
|
||||||
|
single-commit PR. If the functionality is gated behind a feature toggle (detect a toggle name from
|
||||||
|
the diff — e.g. a new entry in `feature_toggles_config.json` or an `XxxFeatureToggles` usage),
|
||||||
|
append `Закрыто тогглом "<название>"`. When appending to an existing value, produce the combined
|
||||||
|
final text.
|
||||||
|
|
||||||
|
3. **Show the full proposed QA Notes text and get explicit confirmation** (`AskUserQuestion`:
|
||||||
|
**Write to Jira** / **Edit** / **Cancel**). The user must review the exact text before anything is
|
||||||
|
written. On **Edit**, let them adjust the text and re-preview. Never call `editJiraIssue` before
|
||||||
|
the user selects **Write to Jira**.
|
||||||
|
|
||||||
|
4. **Write.** `editJiraIssue` for `AND-xxxxx` with the QA Notes wrapped as an ADF document. Each line
|
||||||
|
of text is its **own `paragraph`** in the `content` array — a single-line note is one paragraph, a
|
||||||
|
multi-line note is several. Do **not** put line breaks inside one paragraph's text.
|
||||||
|
```
|
||||||
|
# single line → one paragraph:
|
||||||
|
"customfield_11232": {"type":"doc","version":1,"content":[
|
||||||
|
{"type":"paragraph","content":[{"type":"text","text":"<line 1>"}]}
|
||||||
|
]}
|
||||||
|
|
||||||
|
# multiple lines → one paragraph per line:
|
||||||
|
"customfield_11232": {"type":"doc","version":1,"content":[
|
||||||
|
{"type":"paragraph","content":[{"type":"text","text":"<line 1>"}]},
|
||||||
|
{"type":"paragraph","content":[{"type":"text","text":"<line 2>"}]}
|
||||||
|
]}
|
||||||
|
```
|
||||||
|
Report success (or surface the exact error and stop — do not retry blindly).
|
||||||
|
|
||||||
## Phase 7 — Optional PR monitor
|
## Phase 7 — Optional PR monitor
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue