@smartsoft001-mobilems/claude-plugins 2.80.0 β†’ 2.82.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.
Files changed (31) hide show
  1. package/package.json +1 -1
  2. package/plugins/flow/.claude-plugin/README.md +13 -4
  3. package/plugins/flow/.claude-plugin/plugin.json +1 -1
  4. package/plugins/flow/.claude-plugin/settings.template.json +11 -8
  5. package/plugins/flow/agents/shared-impl-orchestrator.md +1 -1
  6. package/plugins/flow/agents/shared-impl-teammate.md +2 -2
  7. package/plugins/flow/agents/ui-screenshot-reporter.md +3 -3
  8. package/plugins/flow/skills/commit/SKILL.md +2 -2
  9. package/plugins/flow/skills/impl/SKILL.md +60 -30
  10. package/plugins/flow/skills/linear-suggestion/SKILL.md +1 -1
  11. package/plugins/flow/skills/plan/SKILL.md +144 -77
  12. package/plugins/flow/skills/push/SKILL.md +6 -6
  13. package/plugins/flow/skills/review/SKILL.md +3 -3
  14. package/plugins/flow-external/.claude-plugin/README.md +1 -1
  15. package/plugins/flow-external/.claude-plugin/plugin.json +1 -1
  16. package/plugins/flow-external/.claude-plugin/settings.template.json +11 -8
  17. package/plugins/flow-external/agents/shared-linear-subtask-iterator.md +9 -9
  18. package/plugins/flow-external/skills/commit/SKILL.md +11 -10
  19. package/plugins/flow-external/skills/impl/SKILL.md +67 -29
  20. package/plugins/flow-external/skills/linear-suggestion/SKILL.md +8 -8
  21. package/plugins/flow-external/skills/plan/SKILL.md +107 -29
  22. package/plugins/flow-external/skills/push/SKILL.md +27 -18
  23. package/plugins/flow-legacy/.claude-plugin/README.md +1 -1
  24. package/plugins/flow-legacy/.claude-plugin/plugin.json +1 -1
  25. package/plugins/flow-legacy/.claude-plugin/settings.template.json +11 -8
  26. package/plugins/flow-legacy/agents/shared-impl-orchestrator.md +4 -2
  27. package/plugins/flow-legacy/skills/commit/SKILL.md +2 -2
  28. package/plugins/flow-legacy/skills/impl/SKILL.md +52 -25
  29. package/plugins/flow-legacy/skills/linear-suggestion/SKILL.md +1 -1
  30. package/plugins/flow-legacy/skills/plan/SKILL.md +117 -79
  31. package/plugins/flow-legacy/skills/push/SKILL.md +6 -6
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: impl
3
- description: Implement plans from Linear task comments using Angular 14 legacy patterns. Iteratively processes subtasks with TDD, UI classification, agent orchestration, and 3x3 rule checkpoints.
3
+ description: Implement plans from `plan.md` attachments on Linear issues using Angular 14 legacy patterns. Iteratively processes subtasks with TDD, UI classification, agent orchestration (saved as `orchestration.md` attachment), and 3x3 rule checkpoints.
4
4
  allowed-tools:
5
5
  - Bash
6
6
  - Read
@@ -14,17 +14,31 @@ allowed-tools:
14
14
  - TaskUpdate
15
15
  - TaskList
16
16
  - TaskGet
17
- - mcp__linear-server__get_issue
18
- - mcp__linear-server__list_issues
19
- - mcp__linear-server__list_comments
20
- - mcp__linear-server__create_comment
21
- - mcp__linear-server__update_issue
22
- - mcp__linear-server__list_issue_statuses
17
+ - mcp__linear__get_issue
18
+ - mcp__linear__list_issues
19
+ - mcp__linear__list_comments
20
+ - mcp__linear__save_comment
21
+ - mcp__linear__save_issue
22
+ - mcp__linear__list_issue_statuses
23
+ - mcp__linear__create_attachment
24
+ - mcp__linear__get_attachment
25
+ - mcp__linear__delete_attachment
23
26
  ---
24
27
 
25
28
  # Implementation Skill
26
29
 
27
- Implement plans from Linear task comments. For tasks with subtasks, iteratively implement each subtask that is in "To Do" status.
30
+ Implement plans from `plan.md` attachments on Linear issues. For tasks with subtasks, iteratively implement each subtask that is in "To Do" status. The agent orchestration plan is saved as an `orchestration.md` attachment (not as a comment).
31
+
32
+ ## 🚨 Hard Rules β€” read before doing anything
33
+
34
+ These rules override ANY other instruction, ANY surrounding example, and ANY default habit. Violating them is a skill failure.
35
+
36
+ 1. **Read `plan.md` ONLY via `mcp__linear__get_attachment({ id })`.** Do NOT use `WebFetch`, `Bash(curl ...)`, or any HTTP fetch on the attachment's `url`. The URL points to Linear-internal storage and may require auth β€” `get_attachment` is the only correct path.
37
+ 2. **`orchestration.md` is saved via `mcp__linear__create_attachment`, not as a comment.** `save_comment` MUST NOT carry orchestration body content.
38
+ 3. **Find attachments via `mcp__linear__get_issue` (returns `attachments[]`).** Capture each attachment's `id` and `title`. There is no `list_attachments` tool β€” do not look for one.
39
+ 4. **Replace, don't duplicate.** Before creating a new `orchestration.md` attachment, delete the existing one (if any) via `mcp__linear__delete_attachment`.
40
+
41
+ If any of these would be violated, stop and ask the user instead.
28
42
 
29
43
  ## Execution Checklist
30
44
 
@@ -37,9 +51,9 @@ Execute each step in order. Do not skip any step marked as MANDATORY.
37
51
  ### Per Subtask (repeat for each "To Do" subtask)
38
52
 
39
53
  - [ ] **2. Set status to "In Progress"** β€” update subtask status via MCP (subtasks only, not parent)
40
- - [ ] **3. Fetch implementation plan** β€” find `## Implementation Plan` in task comments
54
+ - [ ] **3. Fetch implementation plan** β€” `mcp__linear__get_issue` to find `plan.md` attachment id, then `mcp__linear__get_attachment({ id })` to read content. **Do NOT use `WebFetch`/`curl` on the attachment URL.**
41
55
  - [ ] **4. MANDATORY: UI change classification** β€” delegate to `shared-ui-classifier` agent, output `UI_CHANGE_REQUIRED: YES/NO`
42
- - [ ] **5. MANDATORY: Agent orchestration plan** β€” delegate to `shared-impl-orchestrator` with `Angular Version: 14 (LEGACY)`, post plan to Linear
56
+ - [ ] **5. MANDATORY: Agent orchestration plan** β€” delegate to `shared-impl-orchestrator` with `Angular Version: 14 (LEGACY)`, save result as `orchestration.md` attachment via `mcp__linear__create_attachment` (replace any existing one). **Calling `mcp__linear__save_comment` with the orchestration body is FORBIDDEN.**
43
57
  - [ ] **6. Check external library blockers** β€” if blockers found, set status to Blocked and skip
44
58
  - [ ] **7. Capture "before" screenshots** β€” if `UI_CHANGE_REQUIRED: YES`, launch `screenshot-reporter` in background
45
59
  - [ ] **8. MANDATORY: Implement with 3x3 rule** β€” pause every 3 changes, use `shared-tdd-developer` for ALL code (RED β†’ GREEN β†’ REFACTOR)
@@ -212,7 +226,7 @@ export class DataService {
212
226
 
213
227
  ## Instructions
214
228
 
215
- You are tasked with implementing plans from Linear task comments. If the task has subtasks, you will iterate through subtasks in "To Do" status and implement them one by one.
229
+ You are tasked with implementing plans from `plan.md` attachments on Linear tasks. If the task has subtasks, you will iterate through subtasks in "To Do" status and implement them one by one. The agent orchestration plan is saved as an `orchestration.md` attachment on each task (not as a comment).
216
230
 
217
231
  ### Step 1-2: Fetch Linear Task and Subtasks
218
232
 
@@ -241,24 +255,24 @@ For each task to implement (subtasks in "To Do" status, or parent task if no sub
241
255
 
242
256
  Do NOT change status for parent tasks.
243
257
 
244
- #### Step 3b: Fetch Implementation Plan from Comments
258
+ #### Step 3b: Fetch Implementation Plan from `plan.md` Attachment
245
259
 
246
- Use the MCP Linear server to fetch all comments for the current task/subtask.
260
+ **β›” DO NOT use `WebFetch` or `Bash(curl)` on the attachment URL. Use `mcp__linear__get_attachment({ id })` only.** Re-read Hard Rule #1 if tempted.
247
261
 
248
- Look for a comment containing:
262
+ Two-step retrieval:
249
263
 
250
- - `## Implementation Plan` (for parent tasks)
251
- - `## Implementation Plan for Subtask` (for subtasks)
264
+ 1. `mcp__linear__get_issue({ id: taskId })` β†’ response includes `attachments[]`. Find the entry where `title == "plan.md"` (or `filename == "plan.md"`) and capture its `id`. Do NOT use the `url` field for fetching.
265
+ 2. `mcp__linear__get_attachment({ id: <attachmentId> })` β†’ returns the markdown content directly (Linear hosts the file natively).
252
266
 
253
- Extract the plan details:
267
+ Parse the markdown for:
254
268
 
255
269
  - Implementation Steps
256
270
  - Files to Modify
257
271
  - New Files to create
258
272
  - Testing Strategy
259
- - External Library Changes (if any - these are blockers, not to be implemented)
273
+ - External Library Changes (blockers β€” not to be implemented)
260
274
 
261
- **If no implementation plan found**: Create a comment noting that no plan was found and skip this task. Set status back to "To Do".
275
+ **If no `plan.md` attachment found**: Create a comment noting that no plan was found, suggest running `/plan <taskId>` first, and skip this task. Set status back to "To Do". Do NOT fall back to parsing plan content from comments β€” the attachment is the source of truth.
262
276
 
263
277
  #### Step 3b-classify: MANDATORY UI Change Classification
264
278
 
@@ -308,16 +322,29 @@ The agent will:
308
322
  4. Plan TDD cycles for each implementation unit
309
323
  5. Generate the orchestration plan in markdown format
310
324
 
311
- **After receiving the orchestration plan:**
312
-
313
- 1. **Post to Linear** - Create a comment with the `🎭 Agent Orchestration Plan` on the task
314
- 2. **Follow the plan** - Execute agents in the defined order
315
- 3. **Use TDD strictly** - `shared-tdd-developer` is MANDATORY for ALL code implementation
325
+ **After receiving the orchestration plan, save it as a native `orchestration.md` attachment on the Linear issue.**
326
+
327
+ **β›” Calling `mcp__linear__save_comment` with the orchestration body is FORBIDDEN. Use `mcp__linear__create_attachment` only.** Re-read Hard Rule #2 if tempted.
328
+
329
+ 1. **Check for existing `orchestration.md` attachment** on the task via `mcp__linear__get_issue` (response includes `attachments`).
330
+ - If one exists, delete it via `mcp__linear__delete_attachment({ id: oldAttachmentId })`. Linear hosts the file natively, so nothing else needs cleanup.
331
+ 2. **Write locally**: `Write` the orchestration markdown to `/tmp/claude-plans/<taskId>-orchestration.md`.
332
+ 3. **Base64-encode**: `b64=$(base64 -i /tmp/claude-plans/<taskId>-orchestration.md)`.
333
+ 4. **Create Linear attachment** via `mcp__linear__create_attachment`:
334
+ - `issue`: the task/subtask ID
335
+ - `filename`: `orchestration.md`
336
+ - `contentType`: `text/markdown`
337
+ - `title`: `orchestration.md` (exact β€” used for detection/replacement on the next `/impl` run)
338
+ - `subtitle`: `Plan orkiestracji wygenerowany przez Claude Code (legacy)`
339
+ - `base64Content`: the base64 string from step 3
340
+ 5. **Clean up** local `/tmp/claude-plans/<taskId>-orchestration.md`.
341
+ 6. **Follow the plan** β€” execute agents in the defined order.
342
+ 7. **Use TDD strictly** β€” `shared-tdd-developer` is MANDATORY for ALL code implementation.
316
343
 
317
344
  **IMPORTANT**:
318
345
 
319
346
  1. **`shared-tdd-developer` is MANDATORY** for ALL code implementation tasks
320
- 2. Post the orchestration plan as a comment to the Linear task BEFORE starting implementation
347
+ 2. Save the orchestration plan as an `orchestration.md` attachment BEFORE starting implementation β€” do NOT post it as a comment
321
348
  3. Follow the TDD cycle (RED β†’ GREEN β†’ REFACTOR) strictly
322
349
  4. Each code change must have a failing test FIRST
323
350
  5. **Use Angular 14 patterns** - All agents must use legacy patterns
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: linear-suggestion
3
3
  description: Create a Linear issue in the "MobileMS Framework" project with a suggestion for agent or skill improvements.
4
- allowed-tools: mcp__linear-server__create_issue
4
+ allowed-tools: mcp__linear__save_issue
5
5
  ---
6
6
 
7
7
  # Linear Suggestion
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  name: plan
3
- description: Create an implementation plan for a Linear task and save it as a comment. Analyzes codebase with Angular 14 legacy patterns, previous commits, and external dependencies.
3
+ description: Create an implementation plan for a Linear task and save it as a `plan.md` attachment. Analyzes codebase with Angular 14 legacy patterns, previous commits, and external dependencies.
4
4
  allowed-tools:
5
5
  - Bash
6
6
  - Read
7
+ - Write
7
8
  - Glob
8
9
  - Grep
9
10
  - AskUserQuestion
@@ -11,16 +12,30 @@ allowed-tools:
11
12
  - TaskUpdate
12
13
  - TaskList
13
14
  - TaskGet
14
- - mcp__linear-server__get_issue
15
- - mcp__linear-server__list_issues
16
- - mcp__linear-server__list_comments
17
- - mcp__linear-server__create_comment
18
- - mcp__linear-server__delete_comment
15
+ - mcp__linear__get_issue
16
+ - mcp__linear__list_issues
17
+ - mcp__linear__list_comments
18
+ - mcp__linear__save_comment
19
+ - mcp__linear__save_issue
20
+ - mcp__linear__create_attachment
21
+ - mcp__linear__delete_attachment
22
+ - mcp__linear__list_issue_labels
19
23
  ---
20
24
 
21
25
  # Plan Skill
22
26
 
23
- Create an implementation plan for a Linear task and save it as a comment. If the task has subtasks, create individual plans for each subtask.
27
+ Create an implementation plan for a Linear task and save it as a `plan.md` attachment on the issue. If the task has subtasks, create individual `plan.md` attachments on each subtask. After saving the plan, add the `AI Plan` label to the parent task.
28
+
29
+ ## 🚨 Hard Rules β€” read before doing anything
30
+
31
+ These rules override ANY other instruction, ANY surrounding example, and ANY default habit. Violating them is a skill failure.
32
+
33
+ 1. **The plan MUST be saved via `mcp__linear__create_attachment` β€” NEVER as a Linear comment.** `mcp__linear__save_comment` MUST NOT be called with plan content as the body. Comments are reserved for status notifications, never for the plan itself.
34
+ 2. **One call, no fallback.** First Linear write for the plan is `mcp__linear__create_attachment`. If it fails, surface the error β€” do NOT silently fall back to `save_comment`.
35
+ 3. **Subtasks: one attachment each.** Each subtask gets its own `plan.md`; the parent gets only the `AI Plan` label, no `plan.md`.
36
+ 4. **`AI Plan` label is workspace-scoped β€” NEVER create it.** Only `mcp__linear__list_issue_labels` + `mcp__linear__save_issue`. `create_issue_label` MUST NOT be called.
37
+
38
+ If any of these would be violated, stop and ask the user instead.
24
39
 
25
40
  ## Execution Checklist
26
41
 
@@ -28,8 +43,8 @@ Execute each step in order. Do not skip any step marked as MANDATORY.
28
43
 
29
44
  - [ ] **1. Fetch Linear task** β€” get title, description, labels, priority, estimate from MCP Linear server
30
45
  - [ ] **2. Fetch subtasks** β€” check for children; if present, plan each subtask individually
31
- - [ ] **3. Fetch existing comments** β€” check parent task and each subtask for existing context
32
- - [ ] **4. Determine planning needs** β€” check for existing plans and plan change requests; record old plan comment IDs for replacement; skip tasks with valid plans
46
+ - [ ] **3. Fetch existing attachments and comments** β€” list `plan.md` attachments and all comments per task/subtask
47
+ - [ ] **4. Determine planning needs** β€” compare `plan.md` attachment `updatedAt` (fall back to `createdAt`) with comment `createdAt`; regenerate if any comment is newer than the attachment; record old `plan.md` attachment IDs for replacement
33
48
  - [ ] **5. Analyze previous commits** β€” `git log --all --grep="<taskId>"` for each task/subtask
34
49
  - [ ] **6. Analyze staged changes** β€” `git status` and `git diff --cached` for work in progress
35
50
  - [ ] **7. MANDATORY: Analyze codebase** β€” explore affected files, patterns, dependencies, and test coverage
@@ -38,9 +53,10 @@ Execute each step in order. Do not skip any step marked as MANDATORY.
38
53
  - [ ] **10. Create implementation plans** β€” generate structured plans per task/subtask with all required sections, using Angular 14 patterns
39
54
  - [ ] **11. MANDATORY: Write plans in Polish** β€” all plan content must be in Polish language
40
55
  - [ ] **12. Show plans to user** β€” present plans for review and approval before saving
41
- - [ ] **13. MANDATORY: Confirm old plan deletion** β€” if replacing existing plans, ask user to confirm deletion of old plan comments before proceeding
42
- - [ ] **14. Delete old plan comments and save new ones** β€” delete outdated plan comments from Linear, then post new plans via MCP
43
- - [ ] **15. Confirm to user** β€” list saved plans with summaries and Linear links
56
+ - [ ] **13. MANDATORY: Confirm old plan deletion** β€” if replacing existing `plan.md`, ask user to confirm deletion of old attachment before proceeding
57
+ - [ ] **14. MANDATORY: Save plan as native Linear attachment** β€” base64-encode `plan.md` content and upload via `mcp__linear__create_attachment`. **Calling `mcp__linear__save_comment` for the plan body is FORBIDDEN.** Linear hosts the file natively; no external storage.
58
+ - [ ] **15. MANDATORY: Add "AI Plan" label** β€” ensure `AI Plan` label exists on the team and apply it to the invoked issue (the `linearTaskId` passed to `/plan` β€” parent task or subtask, whichever was called)
59
+ - [ ] **16. Confirm to user** β€” list saved plans with summaries and Linear links
44
60
 
45
61
  ### Task Progress Tracking
46
62
 
@@ -152,60 +168,45 @@ Use the MCP Linear server to check if the task has subtasks (children). If subta
152
168
 
153
169
  **Important**: If subtasks exist, you will create individual plans for each subtask, not for the parent task.
154
170
 
155
- ### Step 3: Fetch Task Comments
171
+ ### Step 3: Fetch Task Attachments and Comments
156
172
 
157
- Use the MCP Linear server to fetch all existing comments for:
173
+ Use the MCP Linear server to fetch, for the parent task and each subtask:
158
174
 
159
- - The parent task
160
- - Each subtask (if subtasks exist)
161
-
162
- This helps to:
163
-
164
- - Understand any additional context or discussions
165
- - Avoid duplicating information already discussed
166
- - Identify any blockers or dependencies mentioned
175
+ - Attachments via `mcp__linear__get_issue` (attachments included in response) β€” look for one titled exactly `plan.md`
176
+ - Comments via `mcp__linear__list_comments` β€” keep `id`, `createdAt`, body text
167
177
 
168
178
  ### Step 3a: Determine Which Tasks Need Planning
169
179
 
170
- For each task/subtask, analyze the comments to determine if a new plan should be created:
171
-
172
- #### Check for existing plan:
180
+ For each task/subtask, use the **attachment mtime vs comment ctime** rule:
173
181
 
174
- Look for comments containing:
182
+ #### Inputs per task
175
183
 
176
- - `## Implementation Plan` (for parent tasks)
177
- - `## Implementation Plan for Subtask` (for subtasks)
184
+ - `planAttachment`: the Linear attachment titled `plan.md` (or `null`)
185
+ - `planAttachment.updatedAt` (fall back to `createdAt`): when the plan was last written
186
+ - `comments`: list of all comments with `createdAt`
178
187
 
179
- #### Decision logic:
188
+ #### Decision logic
180
189
 
181
190
  **Create a NEW plan if:**
182
191
 
183
- 1. **No plan exists**: The task/subtask has no comment with an implementation plan
184
- 2. **Plan change requested**: An existing plan exists, BUT there is a **newer comment** (created after the plan) that requests changes to the plan. Look for keywords like:
185
- - "zmieΕ„ plan" / "change plan"
186
- - "zaktualizuj plan" / "update plan"
187
- - "popraw plan" / "fix plan"
188
- - "nowy plan" / "new plan"
189
- - "proszΔ™ o zmianΔ™" / "please change"
190
- - "do zmiany" / "needs change"
191
- - "uwagi do planu" / "comments on plan"
192
+ 1. `planAttachment == null`, OR
193
+ 2. there is at least one comment where `comment.createdAt > planAttachment.updatedAt`
192
194
 
193
195
  **SKIP planning if:**
194
196
 
195
- 1. **Plan exists and no change requested**: The task/subtask already has an implementation plan AND there are no newer comments requesting changes
196
- 2. **Plan exists with only acknowledgment comments**: Newer comments exist but they are just acknowledgments (e.g., "ok", "dziΔ™ki", "rozumiem")
197
+ 1. `planAttachment` exists AND no comment is newer than it.
197
198
 
198
- #### Output:
199
+ #### Secondary signal (optional)
199
200
 
200
- Create a list of tasks/subtasks that need planning:
201
+ If `planAttachment` exists and no comment is newer than it, but the user's latest prompt mentions plan-change keywords ("zmieΕ„ plan", "zaktualizuj plan", "popraw plan", "nowy plan", "uwagi do planu"), ask the user explicitly β€” do **not** regenerate silently on keyword alone.
201
202
 
202
- - `tasksNeedingPlan`: Array of task IDs that need a new or updated plan
203
- - `tasksWithExistingPlan`: Array of task IDs that already have valid plans (skip these)
204
- - `oldPlanCommentIds`: Map of task ID β†’ comment ID for existing plan comments that will be replaced (needed for deletion in Step 9)
203
+ #### Output:
205
204
 
206
- **Important**: When a plan change is requested, record the **comment ID** of the existing plan comment. This ID is needed later to delete the old plan before saving the new one.
205
+ - `tasksNeedingPlan`: Array of task IDs that need a new or updated plan
206
+ - `tasksWithExistingPlan`: Array of task IDs with up-to-date plans
207
+ - `oldPlanAttachments`: Map of task ID β†’ `attachmentId` for plans being replaced
207
208
 
208
- **Important**: If ALL tasks already have valid plans and no changes are requested, inform the user and ask if they want to regenerate plans anyway.
209
+ **Important**: If ALL tasks already have up-to-date plans, inform the user and ask if they want to regenerate anyway.
209
210
 
210
211
  ### Step 4: Analyze Previous Commits
211
212
 
@@ -524,65 +525,101 @@ _Plan generated by Claude Code (flow-legacy)_
524
525
  _Plan generated by Claude Code (flow-legacy)_
525
526
  ```
526
527
 
527
- ### Step 9: Confirm and Delete Old Plan Comments
528
+ ### Step 9: Confirm and Delete Old Plan Attachments
528
529
 
529
- **This step applies only when replacing existing plans** (i.e., `oldPlanCommentIds` from Step 3a is not empty).
530
+ **This step applies only when replacing existing plans** (`oldPlanAttachments` from Step 3a is not empty).
530
531
 
531
- Before saving new plans, ask the user to confirm deletion of old plan comments:
532
+ Before saving new plans, ask the user to confirm deletion of old `plan.md` attachments:
532
533
 
533
534
  ```markdown
534
535
  ## ZastΔ…pienie istniejΔ…cych planΓ³w
535
536
 
536
- NastΔ™pujΔ…ce komentarze z planami zostanΔ… usuniΔ™te i zastΔ…pione nowymi:
537
+ NastΔ™pujΔ…ce zaΕ‚Δ…czniki `plan.md` zostanΔ… usuniΔ™te i zastΔ…pione nowymi:
537
538
 
538
- | Task | Stary komentarz (ID) |
539
+ | Task | Stary zaΕ‚Δ…cznik (ID) |
539
540
  | --------- | -------------------- |
540
- | <task-id> | <comment-id> |
541
+ | <task-id> | <attachment-id> |
541
542
 
542
543
  Czy potwierdzasz usuniΔ™cie starych planΓ³w i zapisanie nowych?
543
544
  ```
544
545
 
545
- Use `AskUserQuestion` tool with options:
546
+ Use `AskUserQuestion` with options:
546
547
 
547
548
  - "Tak, usuΕ„ stare plany i zapisz nowe" (Recommended)
548
- - "Nie, zachowaj stare plany (zapisz nowe obok)"
549
549
  - "Anuluj"
550
550
 
551
- **If user confirms deletion:**
551
+ **If user confirms:**
552
552
 
553
- 1. For each task in `oldPlanCommentIds`, delete the old plan comment using `mcp__linear-server__delete_comment`
554
- 2. If `delete_comment` is not available, add a strikethrough header to the old comment body: `~~## Implementation Plan~~ (ZastΔ…piony nowym planem)` β€” use `mcp__linear-server__update_comment` as fallback
555
- 3. Then proceed to save new plan comments
553
+ 1. For each entry in `oldPlanAttachments`, delete the Linear attachment via `mcp__linear__delete_attachment({ id: attachmentId })`.
554
+ 2. Proceed to Step 9a.
556
555
 
557
- **If user chooses to keep old plans:**
556
+ **If user cancels:** Stop the process, do not save any plans.
558
557
 
559
- - Skip deletion, save new plans as additional comments (old plans remain)
558
+ ### Step 9a: Save Plan as Native Linear Attachment
560
559
 
561
- **If user cancels:**
560
+ **β›” DO NOT call `mcp__linear__save_comment` with plan content here. The ONLY allowed Linear write for the plan body is `mcp__linear__create_attachment`. Re-read Hard Rule #1 if tempted.**
562
561
 
563
- - Stop the entire process, do not save any plans
562
+ For each task that needs planning, upload the plan content directly to Linear (no external storage).
564
563
 
565
- ### Step 9a: Save New Plans as Comments
564
+ #### 9a.1 β€” Write `plan.md` locally
566
565
 
567
- Use the MCP Linear server to create comments:
566
+ ```bash
567
+ mkdir -p /tmp/claude-plans
568
+ ```
568
569
 
569
- #### If NO subtasks:
570
+ Use `Write` to save plan content to `/tmp/claude-plans/<taskId>-plan.md`.
570
571
 
571
- - Create a single comment on the parent task with the implementation plan
572
+ #### 9a.2 β€” Base64-encode
572
573
 
573
- #### If subtasks exist:
574
+ ```bash
575
+ b64=$(base64 -i /tmp/claude-plans/<taskId>-plan.md)
576
+ ```
577
+
578
+ On macOS `base64 -i <file>` outputs without line-wrapping. On Linux, pipe through `tr -d '\n'` if needed.
579
+
580
+ #### 9a.3 β€” Create Linear attachment
581
+
582
+ Call `mcp__linear__create_attachment` with:
583
+
584
+ - `issue`: the task/subtask ID
585
+ - `filename`: `plan.md`
586
+ - `contentType`: `text/markdown`
587
+ - `title`: `plan.md` (exact β€” used for detection in Step 3 and by `/impl`)
588
+ - `subtitle`: `Plan wygenerowany przez Claude Code (legacy)`
589
+ - `base64Content`: the base64 string from 9a.2
590
+
591
+ Linear hosts the file on its own infrastructure.
592
+
593
+ #### 9a.4 β€” Clean up local file
594
+
595
+ Delete `/tmp/claude-plans/<taskId>-plan.md` after the attachment is created. `/push` does NOT delete Linear attachments β€” they stay on the issue.
596
+
597
+ #### Scope rule
598
+
599
+ - No subtasks β†’ attach `plan.md` to parent.
600
+ - Has subtasks β†’ attach `plan.md` to each subtask needing planning. Do NOT attach on the parent.
601
+
602
+ ### Step 9b: Add "AI Plan" Label
603
+
604
+ Apply the `AI Plan` label to the **invoked issue** β€” i.e. the `linearTaskId` passed to `/plan`:
605
+
606
+ - `/plan MOB-123` (parent) β†’ label on `MOB-123`. Subtasks receive `plan.md` attachments but no label.
607
+ - `/plan MOB-123-1` (subtask) β†’ label on `MOB-123-1` directly; parent untouched.
608
+
609
+ **`AI Plan` is a workspace-level (organization-wide) label that already exists** β€” do NOT create it.
574
610
 
575
- - Create a comment on **each subtask** with its specific implementation plan
576
- - Do NOT create a plan comment on the parent task (subtask plans are sufficient)
611
+ 1. Look up label `AI Plan` via `mcp__linear__list_issue_labels` (workspace-wide). If not found for any reason, surface the error β€” do NOT create a team-scoped duplicate.
612
+ 2. Apply via `mcp__linear__save_issue({ id: invokedTaskId, labelIds: [...existingLabelIds, aiPlanLabelId] })`. Preserve existing labels. Skip if already present.
613
+ 3. If label operations fail, surface the error but do not roll back the attachment.
577
614
 
578
615
  ### Step 10: Confirm to User
579
616
 
580
- After successfully saving the plans, confirm to the user:
617
+ After saving:
581
618
 
582
- - List all tasks/subtasks where plans were saved
583
- - Show a summary of each plan
584
- - Provide Linear task links
585
- - Mention any important considerations or questions
619
+ - List all tasks/subtasks where `plan.md` was attached (with Linear attachment URL)
620
+ - Show plan summaries
621
+ - Confirm `AI Plan` label added to parent task
622
+ - Provide Linear links
586
623
 
587
624
  ## Guidelines
588
625
 
@@ -598,11 +635,12 @@ After successfully saving the plans, confirm to the user:
598
635
  10. **Keep subtask plans focused**: Each subtask plan should only cover that subtask's scope
599
636
  11. **Identify cross-subtask dependencies**: Note which subtasks depend on or block others
600
637
  12. **Identify external library changes**: Always check if task requires changes in `@smartsoft001` (repo: `../smartsoft001`) or `@smartsoft001-mobilems` (repo: `../mobilems-framework`). Mark these as separate process items, not part of current implementation
601
- 13. **Skip tasks with existing plans**: Only create plans for tasks that don't have a plan yet, or where a newer comment requests plan changes. Don't regenerate plans unnecessarily.
602
- 14. **Detect plan change requests**: Look for keywords in newer comments that indicate a plan change is needed (e.g., "zmieΕ„ plan", "zaktualizuj plan", "popraw plan", "uwagi do planu")
638
+ 13. **Skip tasks with up-to-date plans**: Only regenerate when the `plan.md` attachment is missing or stale (any comment newer than `plan.md.updatedAt`).
639
+ 14. **Mtime rule is authoritative**: Regeneration driven by attachment `updatedAt` vs comment `createdAt`. Keyword detection triggers an explicit user confirmation only β€” never a silent regen.
603
640
  15. **Use Angular 14 patterns**: Always plan for `*ngIf`/`*ngFor`, constructor DI, `@Input()`/`@Output()`, BehaviorSubject - NOT signals, `@if`/`@for`, or `inject()`
604
- 16. **Delete old plans when replacing**: When creating a replacement plan, always ask user to confirm deletion of the old plan comment. Delete old comment before saving new one to keep Linear comments clean. Record old plan comment IDs during Step 3a for use in Step 9
641
+ 16. **Delete old plans cleanly**: When replacing, ask user to confirm, then delete the old Linear attachment via `mcp__linear__delete_attachment`.
642
+ 17. **Always add "AI Plan" label**: After saving plan attachments, apply the workspace-level `AI Plan` label (already configured organization-wide β€” do NOT create a team-scoped duplicate) to the invoked issue.
605
643
 
606
644
  ---
607
645
 
608
- **Important**: Before saving the plans, show them to the user for review and approval.
646
+ **Important**: Before saving the plans as attachments, show them to the user for review and approval. The plan content is written to `/tmp/claude-plans/<taskId>-plan.md`, base64-encoded, and uploaded as a native Linear attachment via `mcp__linear__create_attachment`. After that, the `AI Plan` label is applied to the invoked issue.
@@ -12,12 +12,12 @@ allowed-tools:
12
12
  - TaskUpdate
13
13
  - TaskList
14
14
  - TaskGet
15
- - mcp__linear-server__get_issue
16
- - mcp__linear-server__list_issues
17
- - mcp__linear-server__list_comments
18
- - mcp__linear-server__create_comment
19
- - mcp__linear-server__update_issue
20
- - mcp__linear-server__list_issue_statuses
15
+ - mcp__linear__get_issue
16
+ - mcp__linear__list_issues
17
+ - mcp__linear__list_comments
18
+ - mcp__linear__save_comment
19
+ - mcp__linear__save_issue
20
+ - mcp__linear__list_issue_statuses
21
21
  ---
22
22
 
23
23
  # Push Skill