@smartsoft001-mobilems/claude-plugins 2.80.0 → 2.81.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 +41 -32
  10. package/plugins/flow/skills/linear-suggestion/SKILL.md +1 -1
  11. package/plugins/flow/skills/plan/SKILL.md +128 -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 +52 -29
  20. package/plugins/flow-external/skills/linear-suggestion/SKILL.md +8 -8
  21. package/plugins/flow-external/skills/plan/SKILL.md +95 -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 +36 -27
  29. package/plugins/flow-legacy/skills/linear-suggestion/SKILL.md +1 -1
  30. package/plugins/flow-legacy/skills/plan/SKILL.md +104 -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,20 @@ 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).
28
31
 
29
32
  ## Execution Checklist
30
33
 
@@ -37,9 +40,9 @@ Execute each step in order. Do not skip any step marked as MANDATORY.
37
40
  ### Per Subtask (repeat for each "To Do" subtask)
38
41
 
39
42
  - [ ] **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
43
+ - [ ] **3. Fetch implementation plan** — download `plan.md` attachment from task, parse content
41
44
  - [ ] **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
45
+ - [ ] **5. MANDATORY: Agent orchestration plan** — delegate to `shared-impl-orchestrator` with `Angular Version: 14 (LEGACY)`, save result as `orchestration.md` attachment on the task (replacing any existing one)
43
46
  - [ ] **6. Check external library blockers** — if blockers found, set status to Blocked and skip
44
47
  - [ ] **7. Capture "before" screenshots** — if `UI_CHANGE_REQUIRED: YES`, launch `screenshot-reporter` in background
45
48
  - [ ] **8. MANDATORY: Implement with 3x3 rule** — pause every 3 changes, use `shared-tdd-developer` for ALL code (RED → GREEN → REFACTOR)
@@ -212,7 +215,7 @@ export class DataService {
212
215
 
213
216
  ## Instructions
214
217
 
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.
218
+ 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
219
 
217
220
  ### Step 1-2: Fetch Linear Task and Subtasks
218
221
 
@@ -241,24 +244,19 @@ For each task to implement (subtasks in "To Do" status, or parent task if no sub
241
244
 
242
245
  Do NOT change status for parent tasks.
243
246
 
244
- #### Step 3b: Fetch Implementation Plan from Comments
247
+ #### Step 3b: Fetch Implementation Plan from `plan.md` Attachment
245
248
 
246
- Use the MCP Linear server to fetch all comments for the current task/subtask.
249
+ Use `mcp__linear__get_issue({ id: taskId })` on the current task/subtask — the response includes an `attachments` array. Find the attachment where `title == "plan.md"` (or `filename == "plan.md"`) and capture its `id`.
247
250
 
248
- Look for a comment containing:
249
-
250
- - `## Implementation Plan` (for parent tasks)
251
- - `## Implementation Plan for Subtask` (for subtasks)
252
-
253
- Extract the plan details:
251
+ If found, fetch its content via `mcp__linear__get_attachment({ id: <attachmentId> })` (Linear hosts the file natively). Parse the markdown for:
254
252
 
255
253
  - Implementation Steps
256
254
  - Files to Modify
257
255
  - New Files to create
258
256
  - Testing Strategy
259
- - External Library Changes (if any - these are blockers, not to be implemented)
257
+ - External Library Changes (blockers — not to be implemented)
260
258
 
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".
259
+ **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
260
 
263
261
  #### Step 3b-classify: MANDATORY UI Change Classification
264
262
 
@@ -308,16 +306,27 @@ The agent will:
308
306
  4. Plan TDD cycles for each implementation unit
309
307
  5. Generate the orchestration plan in markdown format
310
308
 
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
309
+ **After receiving the orchestration plan, save it as a native `orchestration.md` attachment on the Linear issue (NOT as a comment):**
310
+
311
+ 1. **Check for existing `orchestration.md` attachment** on the task via `mcp__linear__get_issue` (response includes `attachments`).
312
+ - If one exists, delete it via `mcp__linear__delete_attachment({ id: oldAttachmentId })`. Linear hosts the file natively, so nothing else needs cleanup.
313
+ 2. **Write locally**: `Write` the orchestration markdown to `/tmp/claude-plans/<taskId>-orchestration.md`.
314
+ 3. **Base64-encode**: `b64=$(base64 -i /tmp/claude-plans/<taskId>-orchestration.md)`.
315
+ 4. **Create Linear attachment** via `mcp__linear__create_attachment`:
316
+ - `issue`: the task/subtask ID
317
+ - `filename`: `orchestration.md`
318
+ - `contentType`: `text/markdown`
319
+ - `title`: `orchestration.md` (exact — used for detection/replacement on the next `/impl` run)
320
+ - `subtitle`: `Plan orkiestracji wygenerowany przez Claude Code (legacy)`
321
+ - `base64Content`: the base64 string from step 3
322
+ 5. **Clean up** local `/tmp/claude-plans/<taskId>-orchestration.md`.
323
+ 6. **Follow the plan** — execute agents in the defined order.
324
+ 7. **Use TDD strictly** — `shared-tdd-developer` is MANDATORY for ALL code implementation.
316
325
 
317
326
  **IMPORTANT**:
318
327
 
319
328
  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
329
+ 2. Save the orchestration plan as an `orchestration.md` attachment BEFORE starting implementation — do NOT post it as a comment
321
330
  3. Follow the TDD cycle (RED → GREEN → REFACTOR) strictly
322
331
  4. Each code change must have a failing test FIRST
323
332
  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,19 @@ 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.
24
28
 
25
29
  ## Execution Checklist
26
30
 
@@ -28,8 +32,8 @@ Execute each step in order. Do not skip any step marked as MANDATORY.
28
32
 
29
33
  - [ ] **1. Fetch Linear task** — get title, description, labels, priority, estimate from MCP Linear server
30
34
  - [ ] **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
35
+ - [ ] **3. Fetch existing attachments and comments** — list `plan.md` attachments and all comments per task/subtask
36
+ - [ ] **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
37
  - [ ] **5. Analyze previous commits** — `git log --all --grep="<taskId>"` for each task/subtask
34
38
  - [ ] **6. Analyze staged changes** — `git status` and `git diff --cached` for work in progress
35
39
  - [ ] **7. MANDATORY: Analyze codebase** — explore affected files, patterns, dependencies, and test coverage
@@ -38,9 +42,10 @@ Execute each step in order. Do not skip any step marked as MANDATORY.
38
42
  - [ ] **10. Create implementation plans** — generate structured plans per task/subtask with all required sections, using Angular 14 patterns
39
43
  - [ ] **11. MANDATORY: Write plans in Polish** — all plan content must be in Polish language
40
44
  - [ ] **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
45
+ - [ ] **13. MANDATORY: Confirm old plan deletion** — if replacing existing `plan.md`, ask user to confirm deletion of old attachment before proceeding
46
+ - [ ] **14. Save plan as native Linear attachment** — base64-encode `plan.md` content and upload via `mcp__linear__create_attachment` (Linear hosts the file; no external storage)
47
+ - [ ] **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)
48
+ - [ ] **16. Confirm to user** — list saved plans with summaries and Linear links
44
49
 
45
50
  ### Task Progress Tracking
46
51
 
@@ -152,60 +157,45 @@ Use the MCP Linear server to check if the task has subtasks (children). If subta
152
157
 
153
158
  **Important**: If subtasks exist, you will create individual plans for each subtask, not for the parent task.
154
159
 
155
- ### Step 3: Fetch Task Comments
160
+ ### Step 3: Fetch Task Attachments and Comments
156
161
 
157
- Use the MCP Linear server to fetch all existing comments for:
162
+ Use the MCP Linear server to fetch, for the parent task and each subtask:
158
163
 
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
164
+ - Attachments via `mcp__linear__get_issue` (attachments included in response) — look for one titled exactly `plan.md`
165
+ - Comments via `mcp__linear__list_comments` — keep `id`, `createdAt`, body text
167
166
 
168
167
  ### Step 3a: Determine Which Tasks Need Planning
169
168
 
170
- For each task/subtask, analyze the comments to determine if a new plan should be created:
171
-
172
- #### Check for existing plan:
169
+ For each task/subtask, use the **attachment mtime vs comment ctime** rule:
173
170
 
174
- Look for comments containing:
171
+ #### Inputs per task
175
172
 
176
- - `## Implementation Plan` (for parent tasks)
177
- - `## Implementation Plan for Subtask` (for subtasks)
173
+ - `planAttachment`: the Linear attachment titled `plan.md` (or `null`)
174
+ - `planAttachment.updatedAt` (fall back to `createdAt`): when the plan was last written
175
+ - `comments`: list of all comments with `createdAt`
178
176
 
179
- #### Decision logic:
177
+ #### Decision logic
180
178
 
181
179
  **Create a NEW plan if:**
182
180
 
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"
181
+ 1. `planAttachment == null`, OR
182
+ 2. there is at least one comment where `comment.createdAt > planAttachment.updatedAt`
192
183
 
193
184
  **SKIP planning if:**
194
185
 
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")
186
+ 1. `planAttachment` exists AND no comment is newer than it.
197
187
 
198
- #### Output:
188
+ #### Secondary signal (optional)
199
189
 
200
- Create a list of tasks/subtasks that need planning:
190
+ 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
191
 
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)
192
+ #### Output:
205
193
 
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.
194
+ - `tasksNeedingPlan`: Array of task IDs that need a new or updated plan
195
+ - `tasksWithExistingPlan`: Array of task IDs with up-to-date plans
196
+ - `oldPlanAttachments`: Map of task ID → `attachmentId` for plans being replaced
207
197
 
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.
198
+ **Important**: If ALL tasks already have up-to-date plans, inform the user and ask if they want to regenerate anyway.
209
199
 
210
200
  ### Step 4: Analyze Previous Commits
211
201
 
@@ -524,65 +514,99 @@ _Plan generated by Claude Code (flow-legacy)_
524
514
  _Plan generated by Claude Code (flow-legacy)_
525
515
  ```
526
516
 
527
- ### Step 9: Confirm and Delete Old Plan Comments
517
+ ### Step 9: Confirm and Delete Old Plan Attachments
528
518
 
529
- **This step applies only when replacing existing plans** (i.e., `oldPlanCommentIds` from Step 3a is not empty).
519
+ **This step applies only when replacing existing plans** (`oldPlanAttachments` from Step 3a is not empty).
530
520
 
531
- Before saving new plans, ask the user to confirm deletion of old plan comments:
521
+ Before saving new plans, ask the user to confirm deletion of old `plan.md` attachments:
532
522
 
533
523
  ```markdown
534
524
  ## Zastąpienie istniejących planów
535
525
 
536
- Następujące komentarze z planami zostaną usunięte i zastąpione nowymi:
526
+ Następujące załączniki `plan.md` zostaną usunięte i zastąpione nowymi:
537
527
 
538
- | Task | Stary komentarz (ID) |
528
+ | Task | Stary załącznik (ID) |
539
529
  | --------- | -------------------- |
540
- | <task-id> | <comment-id> |
530
+ | <task-id> | <attachment-id> |
541
531
 
542
532
  Czy potwierdzasz usunięcie starych planów i zapisanie nowych?
543
533
  ```
544
534
 
545
- Use `AskUserQuestion` tool with options:
535
+ Use `AskUserQuestion` with options:
546
536
 
547
537
  - "Tak, usuń stare plany i zapisz nowe" (Recommended)
548
- - "Nie, zachowaj stare plany (zapisz nowe obok)"
549
538
  - "Anuluj"
550
539
 
551
- **If user confirms deletion:**
540
+ **If user confirms:**
552
541
 
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
542
+ 1. For each entry in `oldPlanAttachments`, delete the Linear attachment via `mcp__linear__delete_attachment({ id: attachmentId })`.
543
+ 2. Proceed to Step 9a.
556
544
 
557
- **If user chooses to keep old plans:**
545
+ **If user cancels:** Stop the process, do not save any plans.
558
546
 
559
- - Skip deletion, save new plans as additional comments (old plans remain)
547
+ ### Step 9a: Save Plan as Native Linear Attachment
560
548
 
561
- **If user cancels:**
549
+ For each task that needs planning, upload the plan content directly to Linear (no external storage).
562
550
 
563
- - Stop the entire process, do not save any plans
551
+ #### 9a.1 — Write `plan.md` locally
564
552
 
565
- ### Step 9a: Save New Plans as Comments
553
+ ```bash
554
+ mkdir -p /tmp/claude-plans
555
+ ```
566
556
 
567
- Use the MCP Linear server to create comments:
557
+ Use `Write` to save plan content to `/tmp/claude-plans/<taskId>-plan.md`.
568
558
 
569
- #### If NO subtasks:
559
+ #### 9a.2 — Base64-encode
570
560
 
571
- - Create a single comment on the parent task with the implementation plan
561
+ ```bash
562
+ b64=$(base64 -i /tmp/claude-plans/<taskId>-plan.md)
563
+ ```
572
564
 
573
- #### If subtasks exist:
565
+ On macOS `base64 -i <file>` outputs without line-wrapping. On Linux, pipe through `tr -d '\n'` if needed.
566
+
567
+ #### 9a.3 — Create Linear attachment
568
+
569
+ Call `mcp__linear__create_attachment` with:
570
+
571
+ - `issue`: the task/subtask ID
572
+ - `filename`: `plan.md`
573
+ - `contentType`: `text/markdown`
574
+ - `title`: `plan.md` (exact — used for detection in Step 3 and by `/impl`)
575
+ - `subtitle`: `Plan wygenerowany przez Claude Code (legacy)`
576
+ - `base64Content`: the base64 string from 9a.2
577
+
578
+ Linear hosts the file on its own infrastructure.
579
+
580
+ #### 9a.4 — Clean up local file
581
+
582
+ Delete `/tmp/claude-plans/<taskId>-plan.md` after the attachment is created. `/push` does NOT delete Linear attachments — they stay on the issue.
583
+
584
+ #### Scope rule
585
+
586
+ - No subtasks → attach `plan.md` to parent.
587
+ - Has subtasks → attach `plan.md` to each subtask needing planning. Do NOT attach on the parent.
588
+
589
+ ### Step 9b: Add "AI Plan" Label
590
+
591
+ Apply the `AI Plan` label to the **invoked issue** — i.e. the `linearTaskId` passed to `/plan`:
592
+
593
+ - `/plan MOB-123` (parent) → label on `MOB-123`. Subtasks receive `plan.md` attachments but no label.
594
+ - `/plan MOB-123-1` (subtask) → label on `MOB-123-1` directly; parent untouched.
595
+
596
+ **`AI Plan` is a workspace-level (organization-wide) label that already exists** — do NOT create it.
574
597
 
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)
598
+ 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.
599
+ 2. Apply via `mcp__linear__save_issue({ id: invokedTaskId, labelIds: [...existingLabelIds, aiPlanLabelId] })`. Preserve existing labels. Skip if already present.
600
+ 3. If label operations fail, surface the error but do not roll back the attachment.
577
601
 
578
602
  ### Step 10: Confirm to User
579
603
 
580
- After successfully saving the plans, confirm to the user:
604
+ After saving:
581
605
 
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
606
+ - List all tasks/subtasks where `plan.md` was attached (with Linear attachment URL)
607
+ - Show plan summaries
608
+ - Confirm `AI Plan` label added to parent task
609
+ - Provide Linear links
586
610
 
587
611
  ## Guidelines
588
612
 
@@ -598,11 +622,12 @@ After successfully saving the plans, confirm to the user:
598
622
  10. **Keep subtask plans focused**: Each subtask plan should only cover that subtask's scope
599
623
  11. **Identify cross-subtask dependencies**: Note which subtasks depend on or block others
600
624
  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")
625
+ 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`).
626
+ 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
627
  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
628
+ 16. **Delete old plans cleanly**: When replacing, ask user to confirm, then delete the old Linear attachment via `mcp__linear__delete_attachment`.
629
+ 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
630
 
606
631
  ---
607
632
 
608
- **Important**: Before saving the plans, show them to the user for review and approval.
633
+ **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