@smartsoft001-mobilems/claude-plugins 2.71.0 → 2.73.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.
@@ -1,6 +1,6 @@
1
1
  # Flow-Legacy Plugin for Claude Code
2
2
 
3
- Development flow commands for **legacy Angular 14 projects** with Linear-driven workflow.
3
+ Development flow skills for **legacy Angular 14 projects** with Linear-driven workflow.
4
4
 
5
5
  ## Target Projects
6
6
 
@@ -22,10 +22,10 @@ This plugin is designed for older MobileMS projects using:
22
22
  | Components | NgModules | Standalone |
23
23
  | Nx packages | `@nrwl/*` | `@nx/*` |
24
24
 
25
- ## Commands
25
+ ## Workflow Skills
26
26
 
27
- | Command | Description |
28
- |---------|-------------|
27
+ | Skill | Description |
28
+ |-------|-------------|
29
29
  | `/commit` | Create conventional commit based on Linear task |
30
30
  | `/impl` | Implement plans from Linear task comments |
31
31
  | `/plan` | Create implementation plan and save to Linear |
@@ -67,15 +67,15 @@ Configure these in your `.mcp.json`:
67
67
  - Nx commands (test, lint, build)
68
68
  - Linear API (read/write issues, comments)
69
69
  - Playwright (screenshots)
70
- - Internal skills
70
+ - Utility skills
71
71
 
72
72
  ### Requires Confirmation (ask)
73
- - Flow commands (/commit, /impl, /plan, /push)
73
+ - Workflow skills (/commit, /impl, /plan, /push)
74
74
  - `git commit` - creating commits
75
75
  - `git push` - pushing to remote
76
76
  - `gh pr create` - creating pull requests
77
77
 
78
- ## Skills
78
+ ## Utility Skills
79
79
 
80
80
  | Skill | Description |
81
81
  |-------|-------------|
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "flow-legacy",
3
- "description": "Development flow commands for legacy Angular 14 projects with Linear-driven workflow",
4
- "version": "2.71.0"
3
+ "description": "Development flow skills for legacy Angular 14 projects with Linear-driven workflow",
4
+ "version": "2.73.0"
5
5
  }
@@ -38,6 +38,7 @@
38
38
  "mcp__linear-server__list_issues",
39
39
  "mcp__linear-server__list_comments",
40
40
  "mcp__linear-server__create_comment",
41
+ "mcp__linear-server__delete_comment",
41
42
  "mcp__linear-server__update_issue",
42
43
  "mcp__linear-server__list_issue_statuses",
43
44
  "mcp__linear-server__create_issue",
@@ -72,4 +73,4 @@
72
73
  "enabledPlugins": {
73
74
  "flow-legacy@mobilems": true
74
75
  }
75
- }
76
+ }
@@ -1,4 +1,21 @@
1
- # Commit Command
1
+ ---
2
+ name: commit
3
+ description: Create a conventional commit message based on Linear task and staged changes. Fetches task details, analyzes changes, generates commit message, and optionally runs parallelization analysis.
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ - Glob
8
+ - Grep
9
+ - AskUserQuestion
10
+ - TaskCreate
11
+ - TaskUpdate
12
+ - TaskList
13
+ - TaskGet
14
+ - mcp__linear-server__get_issue
15
+ - mcp__linear-server__list_comments
16
+ ---
17
+
18
+ # Commit Skill
2
19
 
3
20
  Create a conventional commit message based on Linear task and staged changes.
4
21
 
@@ -12,6 +29,41 @@ Create a conventional commit message based on Linear task and staged changes.
12
29
 
13
30
  - `linearTaskId` - Linear task ID (e.g., ENG-123)
14
31
 
32
+ ## Execution Checklist
33
+
34
+ Execute each step in order. Do not skip any step marked as MANDATORY.
35
+
36
+ - [ ] **1. Fetch Linear task** — get title, description, labels/type from MCP Linear server
37
+ - [ ] **2. Analyze staged changes** — run `git diff --cached` to understand scope
38
+ - [ ] **3. Verify completeness** — compare task requirements with staged changes; if incomplete, ask user whether to continue or stop
39
+ - [ ] **4. Read commitlint config** — read `commitlint.config.js` for valid scopes and format
40
+ - [ ] **5. Generate commit message** — draft `<type>(<scope>): <subject>` with body and `Refs: <linearTaskId>`
41
+ - [ ] **6. Show message to user** — present commit message for approval before proceeding
42
+ - [ ] **7. MANDATORY: Pre-commit preparation** — run `nvm use 18` (legacy Node.js version)
43
+ - [ ] **8. Create commit** — execute `git commit` with the approved message
44
+ - [ ] **9. Parallelization analysis (optional)** — fetch Linear comments, search for orchestration plan, delegate to `shared-parallelization-analyzer` if found
45
+
46
+ ### Task Progress Tracking
47
+
48
+ **MANDATORY**: Use Claude Code's built-in task tracking to provide real-time progress visibility.
49
+
50
+ **At skill start**: Create tasks for each checklist step using `TaskCreate`:
51
+
52
+ ```
53
+ TaskCreate({
54
+ subject: "Fetch Linear task",
55
+ description: "Get title, description, labels/type from MCP Linear server",
56
+ activeForm: "Fetching Linear task"
57
+ })
58
+ ```
59
+
60
+ **During execution**:
61
+
62
+ - Before starting a step → `TaskUpdate({ taskId, status: "in_progress" })`
63
+ - After completing a step → `TaskUpdate({ taskId, status: "completed" })`
64
+
65
+ **At checkpoints**: Use `TaskList` to review overall progress before presenting status to user.
66
+
15
67
  ## Instructions
16
68
 
17
69
  You are tasked with creating a git commit based on a Linear task and staged changes.
@@ -1,7 +1,95 @@
1
- # Implementation Command
1
+ ---
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.
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ - Edit
8
+ - Write
9
+ - Glob
10
+ - Grep
11
+ - AskUserQuestion
12
+ - Task
13
+ - TaskCreate
14
+ - TaskUpdate
15
+ - TaskList
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
23
+ ---
24
+
25
+ # Implementation Skill
2
26
 
3
27
  Implement plans from Linear task comments. For tasks with subtasks, iteratively implement each subtask that is in "To Do" status.
4
28
 
29
+ ## Execution Checklist
30
+
31
+ Execute each step in order. Do not skip any step marked as MANDATORY.
32
+
33
+ ### Initial Setup
34
+
35
+ - [ ] **1. Fetch task and subtasks** — delegate to `shared-linear-subtask-iterator` agent
36
+
37
+ ### Per Subtask (repeat for each "To Do" subtask)
38
+
39
+ - [ ] **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
41
+ - [ ] **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
43
+ - [ ] **6. Check external library blockers** — if blockers found, set status to Blocked and skip
44
+ - [ ] **7. Capture "before" screenshots** — if `UI_CHANGE_REQUIRED: YES`, launch `screenshot-reporter` in background
45
+ - [ ] **8. MANDATORY: Implement with 3x3 rule** — pause every 3 changes, use `shared-tdd-developer` for ALL code (RED → GREEN → REFACTOR)
46
+ - [ ] **9. MANDATORY: Use Angular 14 patterns** — `*ngIf`/`*ngFor`, constructor DI, `@Input()`/`@Output()`, BehaviorSubject — NEVER signals, `@if`/`@for`, `inject()`
47
+ - [ ] **10. Verify implementation** — run tests, lint, build check
48
+ - [ ] **11. Capture "after" screenshots** — if `UI_CHANGE_REQUIRED: YES`, capture + post comparison to Linear + cleanup
49
+ - [ ] **12. MANDATORY: Screenshot verification** — output `SCREENSHOT_REQUIREMENT_MET: YES/NO`, block if missing
50
+ - [ ] **13. Create completion comment** — delegate to `shared-impl-reporter`, post to Linear
51
+ - [ ] **14. MANDATORY: Write reports in Polish** — all Linear comments must be in Polish language
52
+ - [ ] **15. Update status** — delegate to `shared-linear-subtask-iterator` for status determination
53
+ - [ ] **16. Agent evolution** — if user confirmed feedback, delegate to `shared-agent-evolver`
54
+ - [ ] **17. Pause for user confirmation** — ALWAYS wait before proceeding to next subtask
55
+
56
+ ### Finalization
57
+
58
+ - [ ] **18. Final summary** — present summary of all subtasks with statuses
59
+ - [ ] **19. ALWAYS pause** — wait for user confirmation at end
60
+
61
+ ### Task Progress Tracking
62
+
63
+ **MANDATORY**: Use Claude Code's built-in task tracking to provide real-time progress visibility.
64
+
65
+ **At skill start**: Create tasks for the initial setup and each subtask processing round using `TaskCreate`:
66
+
67
+ ```
68
+ TaskCreate({
69
+ subject: "Fetch task and subtasks",
70
+ description: "Delegate to shared-linear-subtask-iterator agent",
71
+ activeForm: "Fetching task and subtasks"
72
+ })
73
+ ```
74
+
75
+ **Per subtask**: Create a parent task for the subtask, then child tasks for each step:
76
+
77
+ ```
78
+ TaskCreate({
79
+ subject: "Implement subtask MOB-123",
80
+ description: "Full implementation cycle: classify → orchestrate → implement → verify",
81
+ activeForm: "Implementing subtask MOB-123"
82
+ })
83
+ ```
84
+
85
+ **During execution**:
86
+
87
+ - Before starting a step → `TaskUpdate({ taskId, status: "in_progress" })`
88
+ - After completing a step → `TaskUpdate({ taskId, status: "completed" })`
89
+ - At 3x3 checkpoints → `TaskList` to show progress overview
90
+
91
+ **At pause points**: Use `TaskList` to present a clear status summary to the user before waiting for confirmation.
92
+
5
93
  ## Role
6
94
 
7
95
  **You are a highly experienced senior TypeScript developer** with:
@@ -30,6 +118,7 @@ You implement code that is:
30
118
  **ALWAYS use these patterns in legacy projects:**
31
119
 
32
120
  ### Components
121
+
33
122
  ```typescript
34
123
  // CORRECT (Angular 14)
35
124
  @Component({
@@ -45,7 +134,7 @@ export class ExampleComponent implements OnInit {
45
134
 
46
135
  constructor(
47
136
  private readonly dataService: DataService,
48
- private readonly router: Router
137
+ private readonly router: Router,
49
138
  ) {}
50
139
 
51
140
  ngOnInit(): void {
@@ -61,13 +150,12 @@ export class ExampleComponent implements OnInit {
61
150
  ```
62
151
 
63
152
  ### Templates
153
+
64
154
  ```html
65
155
  <!-- CORRECT (Angular 14) -->
66
156
  <div *ngIf="isLoading">Loading...</div>
67
157
  <ul *ngIf="items.length > 0">
68
- <li *ngFor="let item of items; trackBy: trackByFn">
69
- {{ item.name }}
70
- </li>
158
+ <li *ngFor="let item of items; trackBy: trackByFn">{{ item.name }}</li>
71
159
  </ul>
72
160
 
73
161
  <!-- WRONG (Angular 20+ - DO NOT USE) -->
@@ -76,6 +164,7 @@ export class ExampleComponent implements OnInit {
76
164
  ```
77
165
 
78
166
  ### Services
167
+
79
168
  ```typescript
80
169
  // CORRECT (Angular 14)
81
170
  @Injectable({ providedIn: 'root' })
@@ -295,6 +384,7 @@ Use tools:
295
384
  - `Glob` and `Grep` for additional exploration if needed
296
385
 
297
386
  **CRITICAL - Angular 14 Pattern Enforcement:**
387
+
298
388
  - ALWAYS use `*ngIf`, `*ngFor` in templates
299
389
  - ALWAYS use constructor injection
300
390
  - ALWAYS use `@Input()`, `@Output()` decorators
@@ -313,6 +403,7 @@ Use tools:
313
403
  3. ✅ [Change 3 description] - `path/to/file3.ts`
314
404
 
315
405
  ### Angular 14 Patterns Used
406
+
316
407
  - Constructor DI: ✅
317
408
  - *ngIf/*ngFor: ✅
318
409
  - @Input/@Output: ✅
@@ -332,6 +423,26 @@ Use tools:
332
423
  Continue? (yes/no/adjust)
333
424
  ```
334
425
 
426
+ **Feedback Collection for Agent Evolution:**
427
+
428
+ During 3x3 checkpoints, when the user provides corrections or suggestions about coding patterns, implementation approach, or agent behavior — **ASK the user explicitly** if they want to create a Linear issue for the improvement.
429
+
430
+ **When user provides a correction or pattern suggestion, ASK:**
431
+
432
+ ```
433
+ 🔄 Detected potential improvement suggestion:
434
+ "[summary of user's correction]"
435
+
436
+ Would you like to create a Linear issue for this pattern improvement?
437
+ - Yes - File as Linear issue in "MobileMS Framework"
438
+ - No - Note for this session only
439
+ - Skip - Ignore this feedback
440
+ ```
441
+
442
+ **Only feedback confirmed with "Yes"** should be collected as **evolution feedback items** and processed in Step 3g-evolve via `linear-suggestion` skill.
443
+
444
+ Look for signals like: universal language ("always", "never"), pattern-level corrections, or explicit requests to update agent behavior.
445
+
335
446
  #### Step 3e: Verify Implementation
336
447
 
337
448
  After implementing:
@@ -408,6 +519,35 @@ The agent will determine the correct status and provide MCP command to execute.
408
519
 
409
520
  **Execute the status update** via MCP Linear server.
410
521
 
522
+ #### Step 3g-evolve: Agent Evolution Checkpoint
523
+
524
+ **Prerequisites**: Only execute this step if user confirmed at least one feedback item with "Yes" during 3x3 checkpoints.
525
+
526
+ **Delegate to `shared-agent-evolver` agent:**
527
+
528
+ ```
529
+ Analyze feedback from current subtask implementation:
530
+ - Subtask ID: [current subtask ID]
531
+ - User-confirmed corrections: [list of feedback items where user answered "Yes"]
532
+ - Files that were implemented: [list of files modified/created]
533
+ - Patterns the user corrected or suggested: [specific corrections]
534
+ ```
535
+
536
+ The agent will:
537
+
538
+ 1. Classify each feedback item (IGNORE / EVOLVE_PATTERN / EVOLVE_RULE / EVOLVE_TEMPLATE / CREATE_AGENT / UPDATE_WORKFLOW)
539
+ 2. Generate proposals for non-IGNORE items
540
+ 3. File each proposal as a Linear issue in "MobileMS Framework" via `linear-suggestion` skill
541
+ 4. Return Evolution Report with created issue IDs
542
+
543
+ **IMPORTANT**:
544
+
545
+ - Agent files are NOT modified directly — proposals are filed as Linear issues for manual review
546
+ - **Only process feedback explicitly confirmed by user** — do not auto-collect without asking
547
+ - If no user-confirmed feedback was collected during this subtask, skip this step
548
+ - This step runs BEFORE the subtask pause (Step 3h) so evolution is complete before moving on
549
+ - If Linear issue creation fails, continue silently — do not block the workflow
550
+
411
551
  #### Step 3h: Pause After Subtask Completion
412
552
 
413
553
  **Delegate to `shared-linear-subtask-iterator` agent:**
@@ -460,13 +600,14 @@ To Do → In Progress → In Review (if completed)
460
600
 
461
601
  **ALWAYS stop and wait for user confirmation at these points:**
462
602
 
463
- | Pause Point | When | What to Show |
464
- | -------------------- | ----------------------------------- | ----------------------------------- |
465
- | **3x3 Checkpoint** | After every 3 changes | Summary of 3 changes + next 3 steps |
466
- | **Subtask Complete** | After finishing each subtask | Subtask summary + next subtask info |
467
- | **Task Complete** | After finishing all subtasks | Final summary with all results |
468
- | **Blocker Found** | When external dependency found | Blocker details + options |
469
- | **Error/Issue** | When unexpected problem occurs | Error details + proposed solution |
603
+ | Pause Point | When | What to Show |
604
+ | -------------------- | ----------------------------------- | ----------------------------------------- |
605
+ | **3x3 Checkpoint** | After every 3 changes | Summary of 3 changes + next 3 steps |
606
+ | **Subtask Complete** | After finishing each subtask | Subtask summary + next subtask info |
607
+ | **Task Complete** | After finishing all subtasks | Final summary with all results |
608
+ | **Blocker Found** | When external dependency found | Blocker details + options |
609
+ | **Error/Issue** | When unexpected problem occurs | Error details + proposed solution |
610
+ | **Agent Evolution** | After subtask / after final summary | Evolution report with filed Linear issues |
470
611
 
471
612
  **Never proceed automatically** - always wait for explicit user confirmation before:
472
613
 
@@ -489,6 +630,7 @@ To Do → In Progress → In Review (if completed)
489
630
  11. **Follow existing patterns**: Match the codebase conventions when implementing
490
631
  12. **Commit changes**: After each subtask implementation, consider if a commit is needed
491
632
  13. **Ask for clarification**: If implementation plan is unclear, ask before proceeding
633
+ 14. **Ask before collecting feedback for agent evolution**: When user provides corrections or suggestions during implementation, **explicitly ask** if they want to create a Linear issue for the improvement. Only user-confirmed feedback (answered "Yes") should be processed at evolution checkpoints (Step 3g-evolve) via `shared-agent-evolver` agent.
492
634
 
493
635
  ---
494
636
 
@@ -1,16 +1,16 @@
1
1
  ---
2
2
  name: linear-suggestion
3
- description: Create a Linear issue in the "MobileMS Framework" project with a suggestion for agent, command, or skill improvements.
3
+ description: Create a Linear issue in the "MobileMS Framework" project with a suggestion for agent or skill improvements.
4
4
  allowed-tools: mcp__linear-server__create_issue
5
5
  ---
6
6
 
7
7
  # Linear Suggestion
8
8
 
9
- Create a Linear issue in the **MobileMS Framework** project containing a suggestion for improving agent definitions, commands, or skills. Used by automated analysis agents to propose changes without blocking the workflow.
9
+ Create a Linear issue in the **MobileMS Framework** project containing a suggestion for improving agent definitions or skills. Used by automated analysis agents to propose changes without blocking the workflow.
10
10
 
11
11
  ## When to Use
12
12
 
13
- - When an automated agent (e.g., `shared-parallelization-analyzer`) identifies a recurring pattern that could improve an agent, command, or skill
13
+ - When an automated agent (e.g., `shared-parallelization-analyzer`) identifies a recurring pattern that could improve an agent or skill
14
14
  - When proposing orchestrator rule changes based on parallelization analysis
15
15
  - When any non-interactive process needs to suggest framework improvements
16
16
 
@@ -18,13 +18,13 @@ Create a Linear issue in the **MobileMS Framework** project containing a suggest
18
18
 
19
19
  The invoking agent must provide:
20
20
 
21
- | Parameter | Required | Description |
22
- | ------------- | -------- | --------------------------------------------------------------- |
23
- | `title` | YES | Short summary of the suggestion (max 100 chars) |
24
- | `description` | YES | Full markdown description with rationale and proposed changes |
21
+ | Parameter | Required | Description |
22
+ | ------------- | -------- | ----------------------------------------------------------------------------- |
23
+ | `title` | YES | Short summary of the suggestion (max 100 chars) |
24
+ | `description` | YES | Full markdown description with rationale and proposed changes |
25
25
  | `source` | YES | Agent that generated the suggestion (e.g., `shared-parallelization-analyzer`) |
26
- | `targetFile` | NO | Path to the file to be modified (e.g., `agents/shared-impl-orchestrator.md`) |
27
- | `category` | NO | One of: `OPTIMIZATION`, `NEW_RULE`, `PATTERN_UPDATE`, `BUG_FIX` |
26
+ | `targetFile` | NO | Path to the file to be modified (e.g., `agents/shared-impl-orchestrator.md`) |
27
+ | `category` | NO | One of: `OPTIMIZATION`, `NEW_RULE`, `PATTERN_UPDATE`, `BUG_FIX` |
28
28
 
29
29
  ## Issue Format
30
30
 
@@ -129,4 +129,4 @@ Linear issue created:
129
129
  - ID: MOB-815
130
130
  - Title: [Agent Suggestion] Add parallel scaffolding rule to orchestrator
131
131
  - URL: https://linear.app/mobilems/issue/MOB-815
132
- ```
132
+ ```
@@ -1,7 +1,68 @@
1
- # Plan Create Command
1
+ ---
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.
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ - Glob
8
+ - Grep
9
+ - AskUserQuestion
10
+ - TaskCreate
11
+ - TaskUpdate
12
+ - TaskList
13
+ - 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
19
+ ---
20
+
21
+ # Plan Skill
2
22
 
3
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.
4
24
 
25
+ ## Execution Checklist
26
+
27
+ Execute each step in order. Do not skip any step marked as MANDATORY.
28
+
29
+ - [ ] **1. Fetch Linear task** — get title, description, labels, priority, estimate from MCP Linear server
30
+ - [ ] **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
33
+ - [ ] **5. Analyze previous commits** — `git log --all --grep="<taskId>"` for each task/subtask
34
+ - [ ] **6. Analyze staged changes** — `git status` and `git diff --cached` for work in progress
35
+ - [ ] **7. MANDATORY: Analyze codebase** — explore affected files, patterns, dependencies, and test coverage
36
+ - [ ] **8. MANDATORY: Verify Angular 14 patterns** — confirm `*ngIf`/`*ngFor`, constructor DI, `@Input()`/`@Output()`, BehaviorSubject in existing code
37
+ - [ ] **9. Analyze external library deps** — check if `@smartsoft001` or `@smartsoft001-mobilems` changes are needed (mark as separate process)
38
+ - [ ] **10. Create implementation plans** — generate structured plans per task/subtask with all required sections, using Angular 14 patterns
39
+ - [ ] **11. MANDATORY: Write plans in Polish** — all plan content must be in Polish language
40
+ - [ ] **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
44
+
45
+ ### Task Progress Tracking
46
+
47
+ **MANDATORY**: Use Claude Code's built-in task tracking to provide real-time progress visibility.
48
+
49
+ **At skill start**: Create tasks for each checklist step using `TaskCreate`:
50
+
51
+ ```
52
+ TaskCreate({
53
+ subject: "Fetch Linear task",
54
+ description: "Get title, description, labels, priority, estimate from MCP Linear server",
55
+ activeForm: "Fetching Linear task"
56
+ })
57
+ ```
58
+
59
+ **During execution**:
60
+
61
+ - Before starting a step → `TaskUpdate({ taskId, status: "in_progress" })`
62
+ - After completing a step → `TaskUpdate({ taskId, status: "completed" })`
63
+
64
+ **Before user review**: Use `TaskList` to show progress overview before presenting plans for approval.
65
+
5
66
  ## Role
6
67
 
7
68
  **You are a highly experienced software architect** with:
@@ -38,17 +99,20 @@ You create plans that are:
38
99
  When creating plans, always use these legacy patterns:
39
100
 
40
101
  ### Components
102
+
41
103
  - Use `@Component` with `NgModule` (NOT standalone)
42
104
  - Use `*ngIf` and `*ngFor` (NOT `@if` and `@for`)
43
105
  - Use constructor injection (NOT `inject()`)
44
106
  - Use `@Input()` and `@Output()` decorators (NOT `input()`, `output()`)
45
107
 
46
108
  ### Services
109
+
47
110
  - Use `BehaviorSubject` and `Observable` (NOT signals)
48
111
  - Use constructor injection
49
112
  - Use `@Injectable({ providedIn: 'root' })` or module providers
50
113
 
51
114
  ### State Management
115
+
52
116
  - Use NgRx Store/Effects or BehaviorSubject patterns
53
117
  - NO signals, computed(), or effect()
54
118
 
@@ -126,6 +190,9 @@ Create a list of tasks/subtasks that need planning:
126
190
 
127
191
  - `tasksNeedingPlan`: Array of task IDs that need a new or updated plan
128
192
  - `tasksWithExistingPlan`: Array of task IDs that already have valid plans (skip these)
193
+ - `oldPlanCommentIds`: Map of task ID → comment ID for existing plan comments that will be replaced (needed for deletion in Step 9)
194
+
195
+ **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.
129
196
 
130
197
  **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.
131
198
 
@@ -185,6 +252,7 @@ Use tools like:
185
252
  - `Read` to understand specific implementations
186
253
 
187
254
  **Important**: Always check for Angular 14 patterns in existing code:
255
+
188
256
  - Look for `*ngIf`, `*ngFor` usage (NOT `@if`, `@for`)
189
257
  - Look for constructor injection patterns
190
258
  - Look for `@Input()`, `@Output()` decorators
@@ -297,6 +365,7 @@ Create a **separate plan for each subtask** that includes:
297
365
  [Key findings from codebase exploration]
298
366
 
299
367
  **Angular 14 patterns to follow:**
368
+
300
369
  - Use `*ngIf` / `*ngFor` for control flow
301
370
  - Use constructor injection for DI
302
371
  - Use `@Input()` / `@Output()` for component communication
@@ -393,6 +462,7 @@ _Plan generated by Claude Code (flow-legacy)_
393
462
  [Findings specific to this subtask]
394
463
 
395
464
  **Angular 14 patterns to follow:**
465
+
396
466
  - Use `*ngIf` / `*ngFor` for control flow
397
467
  - Use constructor injection for DI
398
468
  - Use `@Input()` / `@Output()` for component communication
@@ -443,7 +513,45 @@ _Plan generated by Claude Code (flow-legacy)_
443
513
  _Plan generated by Claude Code (flow-legacy)_
444
514
  ```
445
515
 
446
- ### Step 9: Save Plans as Comments
516
+ ### Step 9: Confirm and Delete Old Plan Comments
517
+
518
+ **This step applies only when replacing existing plans** (i.e., `oldPlanCommentIds` from Step 3a is not empty).
519
+
520
+ Before saving new plans, ask the user to confirm deletion of old plan comments:
521
+
522
+ ```markdown
523
+ ## Zastąpienie istniejących planów
524
+
525
+ Następujące komentarze z planami zostaną usunięte i zastąpione nowymi:
526
+
527
+ | Task | Stary komentarz (ID) |
528
+ | --------- | -------------------- |
529
+ | <task-id> | <comment-id> |
530
+
531
+ Czy potwierdzasz usunięcie starych planów i zapisanie nowych?
532
+ ```
533
+
534
+ Use `AskUserQuestion` tool with options:
535
+
536
+ - "Tak, usuń stare plany i zapisz nowe" (Recommended)
537
+ - "Nie, zachowaj stare plany (zapisz nowe obok)"
538
+ - "Anuluj"
539
+
540
+ **If user confirms deletion:**
541
+
542
+ 1. For each task in `oldPlanCommentIds`, delete the old plan comment using `mcp__linear-server__delete_comment`
543
+ 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
544
+ 3. Then proceed to save new plan comments
545
+
546
+ **If user chooses to keep old plans:**
547
+
548
+ - Skip deletion, save new plans as additional comments (old plans remain)
549
+
550
+ **If user cancels:**
551
+
552
+ - Stop the entire process, do not save any plans
553
+
554
+ ### Step 9a: Save New Plans as Comments
447
555
 
448
556
  Use the MCP Linear server to create comments:
449
557
 
@@ -482,6 +590,7 @@ After successfully saving the plans, confirm to the user:
482
590
  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.
483
591
  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")
484
592
  15. **Use Angular 14 patterns**: Always plan for `*ngIf`/`*ngFor`, constructor DI, `@Input()`/`@Output()`, BehaviorSubject - NOT signals, `@if`/`@for`, or `inject()`
593
+ 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
485
594
 
486
595
  ---
487
596