@mohammadhprp/system-prompt 0.12.0 → 0.12.2
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/framework/agents/README.md +0 -1
- package/framework/commands/mr.md +8 -9
- package/framework/mcps/README.md +0 -3
- package/framework/skills/README.md +5 -4
- package/framework/skills/effective-html/SKILL.md +63 -0
- package/framework/skills/effective-html/examples.md +19 -0
- package/framework/skills/effective-html/references/charts-and-data.md +32 -0
- package/framework/skills/effective-html/references/creative-direction.md +48 -0
- package/framework/skills/effective-html/references/design-artifact.md +78 -0
- package/framework/skills/effective-html/references/diagrams.md +68 -0
- package/framework/skills/effective-html/references/documents-and-presentations.md +28 -0
- package/framework/skills/effective-html/references/html-diagram.md +43 -0
- package/framework/skills/effective-html/references/html-plan.md +40 -0
- package/framework/skills/effective-html/references/html-prototype.md +97 -0
- package/framework/skills/effective-html/references/html-wireframe.md +81 -0
- package/framework/skills/effective-html/references/html.md +72 -0
- package/framework/skills/effective-html/references/interfaces.md +17 -0
- package/framework/skills/glab/SKILL.md +222 -0
- package/framework/skills/glab/references/commands-detailed.md +616 -0
- package/framework/skills/glab/references/quick-reference.md +145 -0
- package/framework/skills/glab/references/troubleshooting.md +669 -0
- package/framework/skills/great-interface/SKILL.md +43 -0
- package/framework/skills/great-interface/references/animations.md +205 -0
- package/framework/skills/great-interface/references/better-accessibility.md +106 -0
- package/framework/skills/great-interface/references/better-colors.md +100 -0
- package/framework/skills/great-interface/references/better-interface.md +132 -0
- package/framework/skills/great-interface/references/better-layout.md +76 -0
- package/framework/skills/great-interface/references/better-typography.md +157 -0
- package/framework/skills/great-interface/references/better-ui.md +107 -0
- package/framework/skills/great-interface/references/better-writing.md +109 -0
- package/framework/skills/great-interface/references/choosing-fonts.md +64 -0
- package/framework/skills/great-interface/references/color-formats.md +90 -0
- package/framework/skills/great-interface/references/color-usage.md +118 -0
- package/framework/skills/great-interface/references/contrast.md +79 -0
- package/framework/skills/great-interface/references/css-cheat-sheet.md +65 -0
- package/framework/skills/great-interface/references/details-and-accessibility.md +119 -0
- package/framework/skills/great-interface/references/enter-exit.md +147 -0
- package/framework/skills/great-interface/references/explain-interface.md +126 -0
- package/framework/skills/great-interface/references/find-the-effect.md +94 -0
- package/framework/skills/great-interface/references/focus-and-keyboard.md +131 -0
- package/framework/skills/great-interface/references/forms.md +84 -0
- package/framework/skills/great-interface/references/from-an-image.md +55 -0
- package/framework/skills/great-interface/references/grouping-and-alignment.md +123 -0
- package/framework/skills/great-interface/references/hit-areas.md +94 -0
- package/framework/skills/great-interface/references/icon-transitions.md +102 -0
- package/framework/skills/great-interface/references/icons.md +110 -0
- package/framework/skills/great-interface/references/interface-review.md +148 -0
- package/framework/skills/great-interface/references/motion-and-zoom.md +79 -0
- package/framework/skills/great-interface/references/no-browser.md +73 -0
- package/framework/skills/great-interface/references/palette-generation.md +104 -0
- package/framework/skills/great-interface/references/palette-structure.md +76 -0
- package/framework/skills/great-interface/references/performance.md +88 -0
- package/framework/skills/great-interface/references/picker.md +76 -0
- package/framework/skills/great-interface/references/read-the-system.md +178 -0
- package/framework/skills/great-interface/references/removed-signals.md +38 -0
- package/framework/skills/great-interface/references/review-format.md +46 -0
- package/framework/skills/great-interface/references/scope-resolution.md +88 -0
- package/framework/skills/great-interface/references/screen-readers.md +101 -0
- package/framework/skills/great-interface/references/semantics-and-aria.md +84 -0
- package/framework/skills/great-interface/references/spacing-and-adaptivity.md +159 -0
- package/framework/skills/great-interface/references/spacing-and-sizing.md +121 -0
- package/framework/skills/great-interface/references/surfaces.md +219 -0
- package/framework/skills/great-interface/references/token-naming.md +97 -0
- package/framework/skills/great-interface/references/variable-fonts-and-opentype.md +105 -0
- package/framework/skills/great-interface/references/variant.md +104 -0
- package/framework/skills/great-interface/references/wrapping-and-punctuation.md +55 -0
- package/framework/skills/improve/SKILL.md +137 -0
- package/framework/skills/improve/examples.md +19 -0
- package/framework/skills/improve/references/audit-playbook.md +130 -0
- package/framework/skills/improve/references/closing-the-loop.md +96 -0
- package/framework/skills/improve/references/plan-template.md +197 -0
- package/framework/skills/jira-cli/SKILL.md +260 -0
- package/framework/skills/jira-cli/references/commands-detailed.md +268 -0
- package/framework/skills/jira-cli/references/quick-reference.md +111 -0
- package/framework/skills/jira-cli/references/troubleshooting.md +114 -0
- package/framework/styles/README.md +9 -4
- package/framework/styles/factory/DESIGN.md +360 -0
- package/framework/styles/factory/README.md +32 -0
- package/framework/styles/factory/assets/preview.jpg +0 -0
- package/framework/styles/huly/DESIGN.md +449 -0
- package/framework/styles/huly/README.md +32 -0
- package/framework/styles/huly/assets/preview.jpg +0 -0
- package/framework/styles/notion/DESIGN.md +423 -0
- package/framework/styles/notion/README.md +32 -0
- package/framework/styles/notion/assets/preview.jpg +0 -0
- package/package.json +1 -1
- package/src/catalog.js +8 -8
- package/framework/agents/backend-architect.md +0 -146
- package/framework/mcps/github-mcp/README.md +0 -51
- package/framework/mcps/github-mcp/capabilities.md +0 -83
- package/framework/mcps/github-mcp/configs/.env.example +0 -1
- package/framework/mcps/github-mcp/configs/opencode.json +0 -13
- package/framework/mcps/github-mcp/install.md +0 -60
- package/framework/mcps/github-mcp/troubleshooting.md +0 -79
- package/framework/mcps/gitlab-mcp/README.md +0 -53
- package/framework/mcps/gitlab-mcp/capabilities.md +0 -216
- package/framework/mcps/gitlab-mcp/configs/.env.example +0 -2
- package/framework/mcps/gitlab-mcp/configs/opencode.json +0 -13
- package/framework/mcps/gitlab-mcp/install.md +0 -99
- package/framework/mcps/gitlab-mcp/troubleshooting.md +0 -116
- package/framework/mcps/jira-mcp/README.md +0 -52
- package/framework/mcps/jira-mcp/capabilities.md +0 -79
- package/framework/mcps/jira-mcp/configs/.env.example +0 -2
- package/framework/mcps/jira-mcp/configs/opencode.json +0 -13
- package/framework/mcps/jira-mcp/install.md +0 -94
- package/framework/mcps/jira-mcp/troubleshooting.md +0 -113
- package/framework/skills/brand-guidelines/LICENSE.txt +0 -202
- package/framework/skills/brand-guidelines/SKILL.md +0 -73
- package/framework/skills/gitlab-mcp/SKILL.md +0 -83
- package/framework/skills/gitlab-mcp/examples.md +0 -31
- package/framework/skills/gitlab-mcp/references/code-review.md +0 -110
- package/framework/skills/gitlab-mcp/references/issues.md +0 -141
- package/framework/skills/gitlab-mcp/references/merge-requests.md +0 -120
- package/framework/skills/gitlab-mcp/references/pipelines.md +0 -67
- package/framework/skills/gitlab-mcp/references/search.md +0 -17
- package/framework/skills/gitlab-mcp/references/webhooks.md +0 -32
- package/framework/skills/gitlab-mcp/references/work-items.md +0 -50
- package/framework/skills/jira-mcp/SKILL.md +0 -57
- package/framework/skills/jira-mcp/examples.md +0 -31
- package/framework/skills/jira-mcp/references/comments.md +0 -27
- package/framework/skills/jira-mcp/references/issues.md +0 -97
- package/framework/skills/jira-mcp/references/projects.md +0 -39
- package/framework/skills/lavish/SKILL.md +0 -67
- package/framework/skills/lavish/examples.md +0 -31
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Closing the Loop — execute, reconcile, issues
|
|
2
|
+
|
|
3
|
+
The advisor's job doesn't end at the plan. This file covers the three follow-through flows: dispatching an executor and reviewing its work (`execute`), keeping the plan backlog alive (`reconcile`), and publishing plans where work gets picked up (`--issues`).
|
|
4
|
+
|
|
5
|
+
The founding rule survives unchanged: **the advisor never edits source code.** In `execute`, a *separate executor subagent* edits code in an isolated git worktree; the advisor dispatches, reviews, and renders a verdict — like a tech lead who doesn't push commits to your branch.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## `execute <plan>` — dispatch and review
|
|
10
|
+
|
|
11
|
+
### Preconditions (check all before dispatching)
|
|
12
|
+
|
|
13
|
+
- The repo is a git repository (worktree isolation requires it). If not: stop and say so.
|
|
14
|
+
- The plan file exists and its dependencies show DONE in `plans/README.md`. If not: stop, name the missing dependency.
|
|
15
|
+
- Run the plan's drift check yourself. If in-scope files changed since `Planned at`, reconcile the plan first (see below) — don't hand a stale plan to an executor.
|
|
16
|
+
|
|
17
|
+
### Dispatch
|
|
18
|
+
|
|
19
|
+
Spawn **one** `general-purpose` subagent with `isolation: "worktree"`. Executor model: default `sonnet`; use what the user named if they named one (`execute 003 haiku`).
|
|
20
|
+
|
|
21
|
+
The subagent prompt must contain:
|
|
22
|
+
|
|
23
|
+
1. **The full plan file text, inlined.** The worktree contains only committed files — if `plans/` is uncommitted, the executor can't read it. Never assume; always inline.
|
|
24
|
+
2. The executor preamble:
|
|
25
|
+
|
|
26
|
+
> You are the executor for the implementation plan below. Follow it step by
|
|
27
|
+
> step. Run every verification command and confirm the expected result before
|
|
28
|
+
> moving on. Touch only the files listed as in scope. If any STOP condition
|
|
29
|
+
> occurs, stop immediately and report. Do not improvise around obstacles.
|
|
30
|
+
> Commit your work in the worktree following the plan's git workflow section.
|
|
31
|
+
> One override: SKIP the plan's instruction to update `plans/README.md` —
|
|
32
|
+
> your reviewer maintains the index. Before reporting, audit every claim in
|
|
33
|
+
> your report against an actual tool result from this session — only report
|
|
34
|
+
> what you can point to evidence for; if a verification failed or was
|
|
35
|
+
> skipped, say so plainly. When finished, reply with exactly the report
|
|
36
|
+
> format below.
|
|
37
|
+
|
|
38
|
+
3. The report format:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
STATUS: COMPLETE | STOPPED
|
|
42
|
+
STEPS: per step — done/skipped + verification command result
|
|
43
|
+
STOPPED BECAUSE: (only if STOPPED) which STOP condition, what was observed
|
|
44
|
+
FILES CHANGED: list
|
|
45
|
+
NOTES: anything the reviewer should know (deviations, surprises, judgment calls)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Review (the advisor's real job here)
|
|
49
|
+
|
|
50
|
+
Note on fresh worktrees: they share git history but not `node_modules` or build artifacts — the executor must install dependencies first, and check tooling that resolves from `dist/` may need one build even though the plan's command table (recon'd in the main tree) didn't mention it. Expect this; it isn't a deviation.
|
|
51
|
+
|
|
52
|
+
Review like a tech lead reviewing a PR against the spec — never fix anything yourself:
|
|
53
|
+
|
|
54
|
+
1. **Re-run every done criterion** in the worktree. Don't trust the executor's report — verify.
|
|
55
|
+
2. **Scope compliance**: `git -C <worktree> diff --stat` against the plan's in-scope list. Any file outside scope fails review, full stop.
|
|
56
|
+
3. **Read the full diff.** Judge it against "Why this matters" (does it solve the actual problem?) and the repo conventions named in the plan (does it look like the rest of the codebase?).
|
|
57
|
+
4. **Audit the new tests.** Executors game criteria — a test that asserts nothing meaningful passes `pnpm test` and proves nothing. Read what the tests assert.
|
|
58
|
+
|
|
59
|
+
### Verdict
|
|
60
|
+
|
|
61
|
+
**Documented deviations are judged on merit, not reflex-blocked.** "Do not improvise" exists to stop silent drift; an executor that hits a real obstacle (e.g. the plan's approach breaks existing test mocks), adapts minimally, and explains it in NOTES has done the right thing. Approve it if the adaptation serves the plan's intent and stays in scope; treat *undocumented* deviations as review failures.
|
|
62
|
+
|
|
63
|
+
| Verdict | When | Action |
|
|
64
|
+
|---|---|---|
|
|
65
|
+
| **APPROVE** | Criteria pass, scope clean, quality holds | Update index status to DONE. Present to the user: diff summary, worktree path and branch, anything from NOTES. **Merging is the user's decision — never merge, push, or commit to their branch.** |
|
|
66
|
+
| **REVISE** | Fixable gaps | SendMessage to the same executor with specific, actionable feedback ("criterion 3 fails: X; the error handling in `api.ts:90` swallows the error — use the Result pattern per the plan"). **Max 2 revision rounds**, then BLOCK. |
|
|
67
|
+
| **BLOCK** | STOP condition hit, scope violated unrecoverably, or revisions exhausted | Mark BLOCKED in the index with the reason. Refine or rewrite the plan with what was learned. Tell the user what happened and what changed in the plan. |
|
|
68
|
+
|
|
69
|
+
Running verification commands inside the executor's worktree is fine — it's isolated and disposable. The no-mutating-commands rule protects the user's working tree, not the worktree.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## `reconcile` — keep `plans/` alive
|
|
74
|
+
|
|
75
|
+
Process what happened since the last session. Read `plans/README.md` and every plan file, then per status:
|
|
76
|
+
|
|
77
|
+
- **DONE** — spot-check that the done criteria still hold on the current HEAD (cheap ones only). Mark verified in the index. Don't delete plan files — they're the record.
|
|
78
|
+
- **BLOCKED** — read the reason. Investigate the underlying obstacle in the codebase. Either rewrite the plan around it (new number if the approach changed fundamentally, in-place refresh otherwise) or mark REJECTED with one line of rationale.
|
|
79
|
+
- **IN PROGRESS** (stale) — flag it to the user; an executor probably died mid-run. Check the worktree if one exists.
|
|
80
|
+
- **TODO** — run the drift check. If drifted: re-verify the finding still exists (it may have been fixed in passing), then refresh the "Current state" excerpts and `Planned at` SHA. If the finding is gone, mark REJECTED ("fixed independently").
|
|
81
|
+
|
|
82
|
+
Finish with a short report: what's verified done, what was refreshed, what's rejected, and what's executable right now.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## `--issues` — publish plans as GitHub issues
|
|
87
|
+
|
|
88
|
+
Modifier on any planning invocation (`/improve --issues`, `/improve security --issues`). The flag is the user's authorization to create issues — never create them without it.
|
|
89
|
+
|
|
90
|
+
1. Preflight: `gh auth status` succeeds and the repo has a GitHub remote. If either fails, write the plan files as normal and say why issues were skipped.
|
|
91
|
+
2. Visibility check: `gh repo view --json visibility`. If the repo is **public**, warn the user that issues are publicly visible and get explicit confirmation before publishing any plan that describes a security vulnerability, credential location, or other sensitive finding.
|
|
92
|
+
3. Show the list of titles about to become issues; confirm once if interactive.
|
|
93
|
+
4. Per plan: `gh issue create --title "<plan title>" --body-file <plan file>`. Labels: `improve` plus the category — apply only if the labels exist or can be created without erroring; skip labels rather than fail.
|
|
94
|
+
5. Record each issue URL in the plan's Status block (`- **Issue**: <url>`) and the index.
|
|
95
|
+
|
|
96
|
+
The plan file remains the source of truth; the issue is distribution. The self-containment rule pays off here — the issue body needs no edits to make sense to whoever (or whatever) picks it up.
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Handoff Plan Template
|
|
2
|
+
|
|
3
|
+
Every plan is written for an executor model that has **zero context**: it has not seen the advisor session, the audit, the other plans, or any prior conversation. It may be a smaller/cheaper model. Assume it is competent at following explicit instructions and weak at filling gaps, recovering from ambiguity, or knowing when to stop.
|
|
4
|
+
|
|
5
|
+
Three properties make a plan executable by a weaker model:
|
|
6
|
+
|
|
7
|
+
1. **Self-contained context** — everything needed is in the file: paths, code excerpts, conventions, commands.
|
|
8
|
+
2. **Verification gates** — every step ends with a command and its expected result. The executor never has to *judge* whether it succeeded.
|
|
9
|
+
3. **Hard boundaries and escape hatches** — explicit out-of-scope list, and "STOP and report" conditions instead of letting the model improvise when reality doesn't match the plan.
|
|
10
|
+
|
|
11
|
+
File naming: `plans/NNN-short-slug.md`, numbered in recommended execution order.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Template
|
|
16
|
+
|
|
17
|
+
```markdown
|
|
18
|
+
# Plan NNN: <Imperative title — what will be true after this plan>
|
|
19
|
+
|
|
20
|
+
> **Executor instructions**: Follow this plan step by step. Run every
|
|
21
|
+
> verification command and confirm the expected result before moving to the
|
|
22
|
+
> next step. If anything in the "STOP conditions" section occurs, stop and
|
|
23
|
+
> report — do not improvise. When done, update the status row for this plan
|
|
24
|
+
> in `plans/README.md` — unless a reviewer dispatched you and told you they
|
|
25
|
+
> maintain the index.
|
|
26
|
+
>
|
|
27
|
+
> **Drift check (run first)**: `git diff --stat <planned-at SHA>..HEAD -- <in-scope paths>`
|
|
28
|
+
> If any in-scope file changed since this plan was written, compare the
|
|
29
|
+
> "Current state" excerpts against the live code before proceeding; on a
|
|
30
|
+
> mismatch, treat it as a STOP condition.
|
|
31
|
+
|
|
32
|
+
## Status
|
|
33
|
+
|
|
34
|
+
- **Priority**: P1 | P2 | P3
|
|
35
|
+
- **Effort**: S | M | L
|
|
36
|
+
- **Risk**: LOW | MED | HIGH
|
|
37
|
+
- **Depends on**: plans/NNN-*.md (or "none")
|
|
38
|
+
- **Category**: bug | security | perf | tests | tech-debt | migration | dx | docs | direction
|
|
39
|
+
- **Planned at**: commit `<short SHA>`, <YYYY-MM-DD>
|
|
40
|
+
- **Issue**: <GitHub issue URL — only when published via `--issues`; omit otherwise>
|
|
41
|
+
|
|
42
|
+
## Why this matters
|
|
43
|
+
|
|
44
|
+
2–5 sentences. The problem, its concrete cost, and what improves when this
|
|
45
|
+
lands. Written so the executor (and a human reviewer) understands the intent —
|
|
46
|
+
intent is what lets a correct judgment call happen when a detail is off.
|
|
47
|
+
|
|
48
|
+
## Current state
|
|
49
|
+
|
|
50
|
+
The facts the executor needs, inlined — never "as discussed" or "see audit":
|
|
51
|
+
|
|
52
|
+
- The relevant files, each with one line on its role:
|
|
53
|
+
- `src/orders/api.ts` — order-list endpoint; contains the N+1 (lines 130–160)
|
|
54
|
+
- Excerpts of the code as it exists today (short, with `file:line` markers),
|
|
55
|
+
enough that the executor can confirm it's looking at the right thing.
|
|
56
|
+
- The repo conventions that apply here, with a pointer to one exemplar file:
|
|
57
|
+
"Error handling follows the Result pattern — see `src/lib/result.ts` and its
|
|
58
|
+
use in `src/users/api.ts:40-60`. Match it."
|
|
59
|
+
- Any documented vocabulary or design constraints the plan must honor, inlined
|
|
60
|
+
from the intent/design docs found in recon: the relevant `CONTEXT.md` terms
|
|
61
|
+
the executor should use in names and comments, the `DESIGN.md` tokens/components
|
|
62
|
+
to reuse, or the ADR whose decision this work must stay consistent with. Quote
|
|
63
|
+
the specific lines — the executor has not read those docs.
|
|
64
|
+
|
|
65
|
+
## Commands you will need
|
|
66
|
+
|
|
67
|
+
| Purpose | Command | Expected on success |
|
|
68
|
+
|-----------|--------------------------|---------------------|
|
|
69
|
+
| Install | `pnpm install` | exit 0 |
|
|
70
|
+
| Typecheck | `pnpm typecheck` | exit 0, no errors |
|
|
71
|
+
| Tests | `pnpm test -- <filter>` | all pass |
|
|
72
|
+
| Lint | `pnpm lint` | exit 0 |
|
|
73
|
+
|
|
74
|
+
(Exact commands from this repo — verified during recon, not guessed.)
|
|
75
|
+
|
|
76
|
+
## Suggested executor toolkit
|
|
77
|
+
|
|
78
|
+
(Optional — include only when relevant skills/tools plausibly exist in the
|
|
79
|
+
executor's environment. Skip the section otherwise.)
|
|
80
|
+
|
|
81
|
+
- Skills the executor should invoke if available, and for what:
|
|
82
|
+
"use `vercel-react-best-practices` when writing the memoization in step 3".
|
|
83
|
+
- Reference docs worth reading before starting, by path or URL.
|
|
84
|
+
|
|
85
|
+
## Scope
|
|
86
|
+
|
|
87
|
+
**In scope** (the only files you should modify):
|
|
88
|
+
- `src/orders/api.ts`
|
|
89
|
+
- `src/orders/api.test.ts` (create)
|
|
90
|
+
|
|
91
|
+
**Out of scope** (do NOT touch, even though they look related):
|
|
92
|
+
- `src/orders/legacy-api.ts` — deprecated path, scheduled for deletion;
|
|
93
|
+
changing it wastes effort and risks the v1 clients still pinned to it.
|
|
94
|
+
- Any change to the public response shape — clients depend on it.
|
|
95
|
+
|
|
96
|
+
## Git workflow
|
|
97
|
+
|
|
98
|
+
(Filled from recon — match the repo's observed conventions.)
|
|
99
|
+
|
|
100
|
+
- Branch: `advisor/NNN-<slug>` (or the repo's branch-naming convention if one is evident)
|
|
101
|
+
- Commit per step or per logical unit; message style: <match repo, e.g. conventional commits — include an example from `git log`>
|
|
102
|
+
- Do NOT push or open a PR unless the operator instructed it.
|
|
103
|
+
|
|
104
|
+
## Steps
|
|
105
|
+
|
|
106
|
+
### Step 1: <imperative title>
|
|
107
|
+
|
|
108
|
+
What to do, precisely. Reference exact files/symbols. Include the target code
|
|
109
|
+
shape when it's load-bearing (the pattern to produce, not necessarily every
|
|
110
|
+
line).
|
|
111
|
+
|
|
112
|
+
**Verify**: `<command>` → <expected output>
|
|
113
|
+
|
|
114
|
+
### Step 2: ...
|
|
115
|
+
|
|
116
|
+
(Each step small enough to verify independently. Order steps so the codebase
|
|
117
|
+
is never broken between steps when possible — e.g. add new path, switch
|
|
118
|
+
callers, then remove old path.)
|
|
119
|
+
|
|
120
|
+
## Test plan
|
|
121
|
+
|
|
122
|
+
- New tests to write, in which file, covering which cases (list them:
|
|
123
|
+
happy path, the specific bug/regression this plan fixes, named edge cases).
|
|
124
|
+
- Which existing test to use as the structural pattern:
|
|
125
|
+
"model after `src/users/api.test.ts`".
|
|
126
|
+
- Verification: `<test command>` → all pass, including N new tests.
|
|
127
|
+
|
|
128
|
+
## Done criteria
|
|
129
|
+
|
|
130
|
+
Machine-checkable. ALL must hold:
|
|
131
|
+
|
|
132
|
+
- [ ] `pnpm typecheck` exits 0
|
|
133
|
+
- [ ] `pnpm test` exits 0; new tests for <X> exist and pass
|
|
134
|
+
- [ ] `grep -rn "<old pattern>" src/` returns no matches
|
|
135
|
+
- [ ] No files outside the in-scope list are modified (`git status`)
|
|
136
|
+
- [ ] `plans/README.md` status row updated
|
|
137
|
+
|
|
138
|
+
## STOP conditions
|
|
139
|
+
|
|
140
|
+
Stop and report back (do not improvise) if:
|
|
141
|
+
|
|
142
|
+
- The code at the locations in "Current state" doesn't match the excerpts
|
|
143
|
+
(the codebase has drifted since this plan was written).
|
|
144
|
+
- A step's verification fails twice after a reasonable fix attempt.
|
|
145
|
+
- The fix appears to require touching an out-of-scope file.
|
|
146
|
+
- You discover the assumption "<key assumption>" is false.
|
|
147
|
+
|
|
148
|
+
## Maintenance notes
|
|
149
|
+
|
|
150
|
+
For the human/agent who owns this code after the change lands:
|
|
151
|
+
|
|
152
|
+
- What future changes will interact with this (e.g. "if pagination is added
|
|
153
|
+
to this endpoint, the batching in step 2 must be revisited").
|
|
154
|
+
- What a reviewer should scrutinize in the PR.
|
|
155
|
+
- Any follow-up explicitly deferred out of this plan (and why).
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Index file: `plans/README.md`
|
|
161
|
+
|
|
162
|
+
Written once by the advisor after all plans, updated by executors:
|
|
163
|
+
|
|
164
|
+
```markdown
|
|
165
|
+
# Implementation Plans
|
|
166
|
+
|
|
167
|
+
Generated by the improve skill on <date>. Execute in the order below unless
|
|
168
|
+
dependencies say otherwise. Each executor: read the plan fully before starting,
|
|
169
|
+
honor its STOP conditions, and update your row when done.
|
|
170
|
+
|
|
171
|
+
## Execution order & status
|
|
172
|
+
|
|
173
|
+
| Plan | Title | Priority | Effort | Depends on | Status |
|
|
174
|
+
|------|-------|----------|--------|------------|--------|
|
|
175
|
+
| 001 | ... | P1 | S | — | TODO |
|
|
176
|
+
| 002 | ... | P1 | M | 001 | TODO |
|
|
177
|
+
|
|
178
|
+
Status values: TODO | IN PROGRESS | DONE | BLOCKED (with one-line reason) | REJECTED (with one-line rationale — finding fixed independently or approach abandoned)
|
|
179
|
+
|
|
180
|
+
## Dependency notes
|
|
181
|
+
|
|
182
|
+
- 002 requires 001 because <reason>.
|
|
183
|
+
|
|
184
|
+
## Findings considered and rejected
|
|
185
|
+
|
|
186
|
+
- <finding>: not worth doing because <one line>. (So nobody re-audits it.)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Quality bar — check before finishing each plan
|
|
190
|
+
|
|
191
|
+
- Could a model that has never seen this repo execute this with only the plan file and the repo? If any step requires knowledge from the advisor session, inline that knowledge.
|
|
192
|
+
- Is every verification a command with an expected result, not a judgment ("make sure it works")?
|
|
193
|
+
- Does every step name exact files and symbols, not "the relevant module"?
|
|
194
|
+
- Are the STOP conditions specific to this plan's actual risks, not boilerplate?
|
|
195
|
+
- Would a reviewer reading only "Why this matters" + "Done criteria" understand what they're approving?
|
|
196
|
+
- No secret values anywhere in the file — locations and credential types only.
|
|
197
|
+
- "Planned at" SHA is filled in and the in-scope paths in the drift check match the Scope section.
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jira-cli
|
|
3
|
+
description: Expert guidance for using the Jira CLI (jira) to manage Jira issues, sprints, epics, comments, transitions, and worklogs from the command line. Use this skill when the user needs to interact with Jira resources or perform Jira workflows — listing, creating, editing, or transitioning issues, running JQL queries, or scripting against Jira data — even if they don't explicitly mention the jira CLI.
|
|
4
|
+
allowed-tools: Bash, Read, Grep, Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Jira CLI (jira) Skill
|
|
8
|
+
|
|
9
|
+
Provides guidance for using `jira`, the feature-rich interactive Jira command line, to perform Jira operations from the terminal.
|
|
10
|
+
|
|
11
|
+
## When to Use This Skill
|
|
12
|
+
|
|
13
|
+
Invoke when the user needs to:
|
|
14
|
+
- Search, list, or view Jira issues
|
|
15
|
+
- Create, edit, assign, clone, or transition issues
|
|
16
|
+
- Add comments, links, or worklogs to issues
|
|
17
|
+
- Work with epics, sprints, releases, or project boards
|
|
18
|
+
- Run JQL queries or script against Jira data
|
|
19
|
+
|
|
20
|
+
## Prerequisites
|
|
21
|
+
|
|
22
|
+
Verify jira installation before executing commands:
|
|
23
|
+
```bash
|
|
24
|
+
jira --version
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
If not installed, inform the user and provide platform-specific installation guidance.
|
|
28
|
+
|
|
29
|
+
## Setup Quick Start
|
|
30
|
+
|
|
31
|
+
`jira` requires one-time initialization before first use:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Interactive setup wizard: installation type (Cloud/Local), auth type, project, board
|
|
35
|
+
jira init
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Authentication via environment variables:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Jira Cloud: API token from https://id.atlassian.com/manage-profile/security/api-tokens
|
|
42
|
+
export JIRA_API_TOKEN=your-token
|
|
43
|
+
|
|
44
|
+
# On-premises with a Personal Access Token
|
|
45
|
+
export JIRA_API_TOKEN=your-token
|
|
46
|
+
export JIRA_AUTH_TYPE=bearer
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
- Use `jira issue list -c /path/to/config.yaml` or `export JIRA_CONFIG_FILE=/path/to/config.yaml` to work with multiple projects or instances
|
|
50
|
+
- Check authentication and current user: `jira me`
|
|
51
|
+
|
|
52
|
+
## Core Workflows
|
|
53
|
+
|
|
54
|
+
### Searching and Viewing Issues
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# 1. List issues assigned to you (sorted by created, descending)
|
|
58
|
+
jira issue list -a$(jira me) --plain
|
|
59
|
+
|
|
60
|
+
# 2. Combine filters: high priority, open, created this month, label backend
|
|
61
|
+
jira issue list -yHigh -s"To Do" --created month -lbackend -a$(jira me) --plain
|
|
62
|
+
|
|
63
|
+
# 3. View issue details with recent comments
|
|
64
|
+
jira issue view ISSUE-1 --comments 5
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Filter flags: `-a` assignee, `-r` reporter, `-s` status (prefix `~` for "not"), `-y` priority, `-l` label (repeatable), `-t` type, `-w` watching, `-R` resolution, `--created`/`--updated` with values like `-7d`, `week`, `month`.
|
|
68
|
+
|
|
69
|
+
> **IMPORTANT:** list commands open an interactive TUI by default. Always pass `--plain` (or `--table`, `--raw`, `--csv`) when running non-interactively, or the command will hang waiting for keyboard input.
|
|
70
|
+
|
|
71
|
+
### Creating an Issue
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# 1. Non-interactive creation with all required fields
|
|
75
|
+
jira issue create -tBug -s"New Bug" -yHigh -lbug -b"Bug description" --no-input
|
|
76
|
+
|
|
77
|
+
# 2. Attach to an epic on creation
|
|
78
|
+
jira issue create -tStory -s"Summary" -PEPIC-42 --no-input
|
|
79
|
+
|
|
80
|
+
# 3. Body from stdin or template
|
|
81
|
+
echo "Description from stdin" | jira issue create -s"Summary" -tTask --no-input
|
|
82
|
+
jira issue create --template /path/to/template.tmpl -s"Summary" -tTask --no-input
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Supports GitHub-flavored and Jira-flavored Markdown in descriptions and comments. Use `--custom "key=value"` for custom fields.
|
|
86
|
+
|
|
87
|
+
### Editing and Assigning
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# Edit summary, priority, labels
|
|
91
|
+
jira issue edit ISSUE-1 -s"Updated summary" -yHigh -lbug --no-input
|
|
92
|
+
|
|
93
|
+
# Prefix minus (-) removes labels, components, or fix versions
|
|
94
|
+
jira issue edit ISSUE-1 --label -p2 --label p1 --fix-version -v1.0 --fix-version v2.0 --no-input
|
|
95
|
+
|
|
96
|
+
# Assign to a user, to self, to default, or unassign
|
|
97
|
+
jira issue assign ISSUE-1 "Jon Doe"
|
|
98
|
+
jira issue assign ISSUE-1 $(jira me)
|
|
99
|
+
jira issue assign ISSUE-1 default
|
|
100
|
+
jira issue assign ISSUE-1 x
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Transitioning Issues
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Move an issue to a new status (name must match the workflow exactly)
|
|
107
|
+
jira issue move ISSUE-1 "In Progress"
|
|
108
|
+
|
|
109
|
+
# Move with comment, resolution, and assignee
|
|
110
|
+
jira issue move ISSUE-1 Done -RFixed -a$(jira me) --comment "Completed"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Comments, Links, and Worklogs
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Add a comment (positional body, template, or stdin)
|
|
117
|
+
jira issue comment add ISSUE-1 "My comment body"
|
|
118
|
+
|
|
119
|
+
# Internal (restricted) comment
|
|
120
|
+
jira issue comment add ISSUE-1 "Internal note" --internal
|
|
121
|
+
|
|
122
|
+
# Link two issues with a link type such as Blocks, Relates, Duplicates
|
|
123
|
+
jira issue link ISSUE-1 ISSUE-2 Blocks
|
|
124
|
+
|
|
125
|
+
# Add a remote web link
|
|
126
|
+
jira issue link remote ISSUE-1 https://example.com "Example text"
|
|
127
|
+
|
|
128
|
+
# Log work: time is positional, e.g. "2d 3h 30m"
|
|
129
|
+
jira issue worklog add ISSUE-1 "2d 3h 30m" --comment "Implementation" --no-input
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Sprints and Epics
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# List issues in the current active sprint
|
|
136
|
+
jira sprint list --current -a$(jira me) --table --plain
|
|
137
|
+
|
|
138
|
+
# List issues in a specific sprint (get the ID from `jira sprint list`)
|
|
139
|
+
jira sprint list SPRINT_ID -yHigh --table --plain
|
|
140
|
+
|
|
141
|
+
# Add up to 50 issues to a sprint
|
|
142
|
+
jira sprint add SPRINT_ID ISSUE-1 ISSUE-2
|
|
143
|
+
|
|
144
|
+
# List issues in an epic
|
|
145
|
+
jira epic list EPIC-1 --table --plain
|
|
146
|
+
|
|
147
|
+
# Create an epic (epic name via -n is required)
|
|
148
|
+
jira epic create -n"Epic epic" -s"Everything" -b"Epic description" --no-input
|
|
149
|
+
|
|
150
|
+
# Add or remove issues in an epic (up to 50 at once)
|
|
151
|
+
jira epic add EPIC-1 ISSUE-1 ISSUE-2
|
|
152
|
+
jira epic remove ISSUE-1 ISSUE-2
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Common Patterns
|
|
156
|
+
|
|
157
|
+
### Scripting and Automation
|
|
158
|
+
|
|
159
|
+
The default view is an interactive UI. For shell pipelines, use machine-friendly output:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Tab-separated plain output with selected columns, no headers
|
|
163
|
+
jira issue list -a$(jira me) --plain --columns key,summary,status --no-headers
|
|
164
|
+
|
|
165
|
+
# Raw JSON or CSV for parsing
|
|
166
|
+
jira issue list --raw
|
|
167
|
+
jira issue list --csv
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### JQL Queries
|
|
171
|
+
|
|
172
|
+
Execute raw JQL within the configured project context using `-q/--jql`:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
jira issue list -q "summary ~ cli AND status != Done"
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Working With a Different Project
|
|
179
|
+
|
|
180
|
+
Use `-p KEY` to target a project other than the one in the config:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
jira issue list -pXYZ -a$(jira me) --plain
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Navigation Shortcuts (Interactive Mode Only)
|
|
187
|
+
|
|
188
|
+
In the default TUI: `v` view issue, `m` transition, `ENTER` open in browser, `c` copy URL, `q` quit. Not usable in scripts — use `--plain` instead.
|
|
189
|
+
|
|
190
|
+
## Best Practices
|
|
191
|
+
|
|
192
|
+
1. **Verify setup first**: `jira me` confirms auth and config are working
|
|
193
|
+
2. **Always pass `--no-input` with explicit flags** in scripts; interactive prompts will hang
|
|
194
|
+
3. **Use `$(jira me)`** for self-assignment and self-filtering
|
|
195
|
+
4. **Use `--plain --columns ... --no-headers`** for any output you intend to parse
|
|
196
|
+
5. **Match transition names exactly** to the Jira workflow; list interactively first if unsure
|
|
197
|
+
|
|
198
|
+
## Common Commands Quick Reference
|
|
199
|
+
|
|
200
|
+
**Issues:**
|
|
201
|
+
- `jira issue list -a$(jira me) --plain` - Your assigned issues
|
|
202
|
+
- `jira issue list -w` - Issues you are watching
|
|
203
|
+
- `jira issue list --history` - Issues you recently interacted with
|
|
204
|
+
- `jira issue create -tBug -s"Summary" -b"Body" --no-input` - Create issue
|
|
205
|
+
- `jira issue view ISSUE-1 --comments 5` - View details
|
|
206
|
+
- `jira issue move ISSUE-1 "In Progress"` - Transition issue
|
|
207
|
+
- `jira issue clone ISSUE-1 -s"New summary"` - Clone with modifications
|
|
208
|
+
- `jira issue delete ISSUE-1 --cascade` - Delete with subtasks
|
|
209
|
+
|
|
210
|
+
**Epics:**
|
|
211
|
+
- `jira epic list` - List epics
|
|
212
|
+
- `jira epic list EPIC-1` - List issues in an epic
|
|
213
|
+
- `jira epic create -n"Name" -s"Summary" --no-input` - Create epic
|
|
214
|
+
|
|
215
|
+
**Sprints:**
|
|
216
|
+
- `jira sprint list --current --table --plain` - Current sprint issues
|
|
217
|
+
- `jira sprint list --prev --table --plain` - Previous sprint issues
|
|
218
|
+
- `jira sprint add SPRINT_ID ISSUE-1 ISSUE-2` - Add issues to sprint
|
|
219
|
+
|
|
220
|
+
**Projects and Boards:**
|
|
221
|
+
- `jira project list` - List accessible projects
|
|
222
|
+
- `jira board list` - List boards in the configured project
|
|
223
|
+
- `jira open ISSUE-1` - Open issue in browser
|
|
224
|
+
- `jira me` - Show current user
|
|
225
|
+
|
|
226
|
+
## Progressive Disclosure
|
|
227
|
+
|
|
228
|
+
For detailed command documentation, refer to:
|
|
229
|
+
- **references/commands-detailed.md** - Comprehensive command reference with all flags and options
|
|
230
|
+
- **references/quick-reference.md** - Condensed command cheat sheet
|
|
231
|
+
- **references/troubleshooting.md** - Detailed error scenarios and solutions
|
|
232
|
+
|
|
233
|
+
Load these references when:
|
|
234
|
+
- User needs specific flag or option details
|
|
235
|
+
- Troubleshooting authentication, config, or permission issues
|
|
236
|
+
- Working with advanced features (JQL, custom fields, multiple configs)
|
|
237
|
+
|
|
238
|
+
## Common Issues Quick Fixes
|
|
239
|
+
|
|
240
|
+
**"command not found: jira"** - Install jira-cli or verify PATH
|
|
241
|
+
|
|
242
|
+
**Auth errors (401/403)** - Check `JIRA_API_TOKEN` is exported; for on-premises PAT auth set `JIRA_AUTH_TYPE=bearer`
|
|
243
|
+
|
|
244
|
+
**"Please select installation type" / config missing** - Run `jira init` to generate the config
|
|
245
|
+
|
|
246
|
+
**List command hangs in a script** - The default output is an interactive TUI; add `--plain`
|
|
247
|
+
|
|
248
|
+
**"Transition not found" or move fails** - Status name must match the workflow exactly; run `jira issue move` without arguments to see valid transitions
|
|
249
|
+
|
|
250
|
+
**Empty issue lists** - Verify the project/board chosen during `jira init`; try `-p PROJECT_KEY`
|
|
251
|
+
|
|
252
|
+
For detailed troubleshooting, load **references/troubleshooting.md**.
|
|
253
|
+
|
|
254
|
+
## Notes
|
|
255
|
+
|
|
256
|
+
- Works with both Jira Cloud and on-premises (Server/Data Center) installations
|
|
257
|
+
- Supports `basic`, `bearer` (PAT), and `mtls` (client certificates) auth types
|
|
258
|
+
- Sprint lists show only the 25 most recent sprints
|
|
259
|
+
- Descriptions and comments accept GitHub-flavored and Jira-flavored Markdown
|
|
260
|
+
- Shell completion is available via `jira completion --help`
|