@smartsoft001-mobilems/claude-plugins 2.84.0 → 2.86.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 (136) hide show
  1. package/.claude-plugin/marketplace.json +2 -6
  2. package/README.md +97 -0
  3. package/package.json +2 -2
  4. package/plugins/flow/scripts/refresh-mobilems-api-spec.sh +372 -0
  5. package/plugins/flow/skills/mobilems-docs-reader/SKILL.md +116 -0
  6. package/plugins/flow-external/scripts/refresh-mobilems-api-spec.sh +372 -0
  7. package/plugins/flow-external/skills/mobilems-docs-reader/SKILL.md +116 -0
  8. package/plugins/flow-legacy/scripts/refresh-mobilems-api-spec.sh +372 -0
  9. package/plugins/flow-legacy/skills/mobilems-docs-reader/SKILL.md +116 -0
  10. package/plugins/mobilems/.claude-plugin/README.md +30 -0
  11. package/plugins/mobilems/.claude-plugin/plugin.json +5 -0
  12. package/plugins/mobilems/scripts/refresh-mobilems-api-spec.sh +372 -0
  13. package/plugins/mobilems/skills/mobilems-docs-reader/SKILL.md +116 -0
  14. package/plugins/flow/.claude-plugin/README.md +0 -91
  15. package/plugins/flow/.claude-plugin/merge-permissions.js +0 -97
  16. package/plugins/flow/.claude-plugin/plugin.json +0 -5
  17. package/plugins/flow/.claude-plugin/settings.template.json +0 -86
  18. package/plugins/flow/agents/angular-component-scaffolder.md +0 -175
  19. package/plugins/flow/agents/angular-directive-builder.md +0 -153
  20. package/plugins/flow/agents/angular-guard-builder.md +0 -243
  21. package/plugins/flow/agents/angular-jest-test-writer.md +0 -474
  22. package/plugins/flow/agents/angular-pipe-builder.md +0 -169
  23. package/plugins/flow/agents/angular-resolver-builder.md +0 -286
  24. package/plugins/flow/agents/angular-service-builder.md +0 -161
  25. package/plugins/flow/agents/angular-signal-state-builder.md +0 -339
  26. package/plugins/flow/agents/angular-test-diagnostician.md +0 -279
  27. package/plugins/flow/agents/angular-testbed-configurator.md +0 -315
  28. package/plugins/flow/agents/arch-scaffolder.md +0 -278
  29. package/plugins/flow/agents/e2e-data-testid-injector.md +0 -197
  30. package/plugins/flow/agents/e2e-project-scaffolder.md +0 -194
  31. package/plugins/flow/agents/e2e-test-writer.md +0 -350
  32. package/plugins/flow/agents/shared-agent-evolver.md +0 -294
  33. package/plugins/flow/agents/shared-build-verifier.md +0 -160
  34. package/plugins/flow/agents/shared-config-updater.md +0 -310
  35. package/plugins/flow/agents/shared-coverage-enforcer.md +0 -184
  36. package/plugins/flow/agents/shared-error-handler.md +0 -217
  37. package/plugins/flow/agents/shared-file-creator.md +0 -344
  38. package/plugins/flow/agents/shared-impl-orchestrator.md +0 -312
  39. package/plugins/flow/agents/shared-impl-reporter.md +0 -339
  40. package/plugins/flow/agents/shared-impl-teammate.md +0 -201
  41. package/plugins/flow/agents/shared-linear-subtask-iterator.md +0 -337
  42. package/plugins/flow/agents/shared-logic-implementer.md +0 -243
  43. package/plugins/flow/agents/shared-maia-api.md +0 -26
  44. package/plugins/flow/agents/shared-parallelization-analyzer.md +0 -343
  45. package/plugins/flow/agents/shared-performance-validator.md +0 -168
  46. package/plugins/flow/agents/shared-plan-perspective.md +0 -269
  47. package/plugins/flow/agents/shared-project-standardizer.md +0 -205
  48. package/plugins/flow/agents/shared-report-synthesizer.md +0 -188
  49. package/plugins/flow/agents/shared-review-teammate.md +0 -189
  50. package/plugins/flow/agents/shared-security-scanner.md +0 -186
  51. package/plugins/flow/agents/shared-style-enforcer.md +0 -230
  52. package/plugins/flow/agents/shared-subtask-dependency-analyzer.md +0 -188
  53. package/plugins/flow/agents/shared-tdd-developer.md +0 -350
  54. package/plugins/flow/agents/shared-team-coordinator.md +0 -189
  55. package/plugins/flow/agents/shared-test-fixer.md +0 -186
  56. package/plugins/flow/agents/shared-test-runner.md +0 -191
  57. package/plugins/flow/agents/shared-ui-classifier.md +0 -263
  58. package/plugins/flow/agents/shared-verification-orchestrator.md +0 -194
  59. package/plugins/flow/agents/shared-verification-runner.md +0 -140
  60. package/plugins/flow/agents/ui-a11y-validator.md +0 -305
  61. package/plugins/flow/agents/ui-screenshot-reporter.md +0 -329
  62. package/plugins/flow/agents/ui-web-designer.md +0 -214
  63. package/plugins/flow/skills/a11y-audit/SKILL.md +0 -214
  64. package/plugins/flow/skills/angular-patterns/SKILL.md +0 -191
  65. package/plugins/flow/skills/browser-capture/SKILL.md +0 -238
  66. package/plugins/flow/skills/commit/SKILL.md +0 -259
  67. package/plugins/flow/skills/debug-helper/SKILL.md +0 -375
  68. package/plugins/flow/skills/impl/SKILL.md +0 -992
  69. package/plugins/flow/skills/linear-suggestion/SKILL.md +0 -132
  70. package/plugins/flow/skills/maia-files-delete/SKILL.md +0 -59
  71. package/plugins/flow/skills/maia-files-upload/SKILL.md +0 -57
  72. package/plugins/flow/skills/nx-conventions/SKILL.md +0 -326
  73. package/plugins/flow/skills/plan/SKILL.md +0 -1003
  74. package/plugins/flow/skills/push/SKILL.md +0 -737
  75. package/plugins/flow/skills/review/SKILL.md +0 -443
  76. package/plugins/flow/skills/test-e2e/SKILL.md +0 -161
  77. package/plugins/flow/skills/test-unit/SKILL.md +0 -456
  78. package/plugins/flow-external/.claude-plugin/README.md +0 -152
  79. package/plugins/flow-external/.claude-plugin/merge-permissions.js +0 -80
  80. package/plugins/flow-external/.claude-plugin/plugin.json +0 -5
  81. package/plugins/flow-external/.claude-plugin/settings.template.json +0 -78
  82. package/plugins/flow-external/agents/angular-component-scaffolder.md +0 -269
  83. package/plugins/flow-external/agents/angular-directive-builder.md +0 -130
  84. package/plugins/flow-external/agents/angular-guard-builder.md +0 -70
  85. package/plugins/flow-external/agents/angular-pipe-builder.md +0 -82
  86. package/plugins/flow-external/agents/angular-resolver-builder.md +0 -74
  87. package/plugins/flow-external/agents/angular-service-builder.md +0 -160
  88. package/plugins/flow-external/agents/angular-state-builder.md +0 -254
  89. package/plugins/flow-external/agents/shared-build-verifier.md +0 -67
  90. package/plugins/flow-external/agents/shared-impl-orchestrator.md +0 -88
  91. package/plugins/flow-external/agents/shared-impl-reporter.md +0 -107
  92. package/plugins/flow-external/agents/shared-linear-subtask-iterator.md +0 -70
  93. package/plugins/flow-external/agents/shared-ui-classifier.md +0 -38
  94. package/plugins/flow-external/agents/ui-web-designer.md +0 -179
  95. package/plugins/flow-external/skills/a11y-audit/SKILL.md +0 -96
  96. package/plugins/flow-external/skills/angular-cli-conventions/SKILL.md +0 -267
  97. package/plugins/flow-external/skills/angular-patterns/SKILL.md +0 -170
  98. package/plugins/flow-external/skills/browser-capture/SKILL.md +0 -68
  99. package/plugins/flow-external/skills/commit/SKILL.md +0 -114
  100. package/plugins/flow-external/skills/debug-helper/SKILL.md +0 -131
  101. package/plugins/flow-external/skills/impl/SKILL.md +0 -217
  102. package/plugins/flow-external/skills/linear-suggestion/SKILL.md +0 -62
  103. package/plugins/flow-external/skills/maia-files-delete/SKILL.md +0 -34
  104. package/plugins/flow-external/skills/maia-files-upload/SKILL.md +0 -41
  105. package/plugins/flow-external/skills/plan/SKILL.md +0 -302
  106. package/plugins/flow-external/skills/push/SKILL.md +0 -210
  107. package/plugins/flow-legacy/.claude-plugin/README.md +0 -143
  108. package/plugins/flow-legacy/.claude-plugin/merge-permissions.js +0 -94
  109. package/plugins/flow-legacy/.claude-plugin/plugin.json +0 -5
  110. package/plugins/flow-legacy/.claude-plugin/settings.template.json +0 -79
  111. package/plugins/flow-legacy/agents/angular-component-scaffolder.md +0 -323
  112. package/plugins/flow-legacy/agents/angular-directive-builder.md +0 -258
  113. package/plugins/flow-legacy/agents/angular-guard-builder.md +0 -322
  114. package/plugins/flow-legacy/agents/angular-pipe-builder.md +0 -227
  115. package/plugins/flow-legacy/agents/angular-resolver-builder.md +0 -332
  116. package/plugins/flow-legacy/agents/angular-service-builder.md +0 -271
  117. package/plugins/flow-legacy/agents/angular-state-builder.md +0 -479
  118. package/plugins/flow-legacy/agents/shared-impl-orchestrator.md +0 -174
  119. package/plugins/flow-legacy/agents/shared-impl-reporter.md +0 -204
  120. package/plugins/flow-legacy/agents/shared-linear-subtask-iterator.md +0 -187
  121. package/plugins/flow-legacy/agents/shared-tdd-developer.md +0 -306
  122. package/plugins/flow-legacy/agents/shared-test-runner.md +0 -131
  123. package/plugins/flow-legacy/agents/shared-ui-classifier.md +0 -145
  124. package/plugins/flow-legacy/skills/a11y-audit/SKILL.md +0 -214
  125. package/plugins/flow-legacy/skills/angular-patterns/SKILL.md +0 -346
  126. package/plugins/flow-legacy/skills/browser-capture/SKILL.md +0 -238
  127. package/plugins/flow-legacy/skills/commit/SKILL.md +0 -215
  128. package/plugins/flow-legacy/skills/debug-helper/SKILL.md +0 -395
  129. package/plugins/flow-legacy/skills/impl/SKILL.md +0 -710
  130. package/plugins/flow-legacy/skills/linear-suggestion/SKILL.md +0 -132
  131. package/plugins/flow-legacy/skills/maia-files-delete/SKILL.md +0 -59
  132. package/plugins/flow-legacy/skills/maia-files-upload/SKILL.md +0 -57
  133. package/plugins/flow-legacy/skills/nx-conventions/SKILL.md +0 -368
  134. package/plugins/flow-legacy/skills/plan/SKILL.md +0 -708
  135. package/plugins/flow-legacy/skills/push/SKILL.md +0 -623
  136. package/plugins/flow-legacy/skills/test-unit/SKILL.md +0 -500
@@ -1,708 +0,0 @@
1
- ---
2
- name: plan
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
- allowed-tools:
5
- - Bash
6
- - Read
7
- - Write
8
- - Glob
9
- - Grep
10
- - AskUserQuestion
11
- - TaskCreate
12
- - TaskUpdate
13
- - TaskList
14
- - TaskGet
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
23
- ---
24
-
25
- # Plan Skill
26
-
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.
39
-
40
- ## Execution Checklist
41
-
42
- Execute each step in order. Do not skip any step marked as MANDATORY.
43
-
44
- - [ ] **1. Fetch Linear task** — get title, description, labels, priority, estimate from MCP Linear server
45
- - [ ] **2. Fetch subtasks** — check for children; if present, plan each subtask individually
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
48
- - [ ] **5. Analyze previous commits** — `git log --all --grep="<taskId>"` for each task/subtask
49
- - [ ] **6. Analyze staged changes** — `git status` and `git diff --cached` for work in progress
50
- - [ ] **7. MANDATORY: Analyze codebase** — explore affected files, patterns, dependencies, and test coverage
51
- - [ ] **8. MANDATORY: Verify Angular 14 patterns** — confirm `*ngIf`/`*ngFor`, constructor DI, `@Input()`/`@Output()`, BehaviorSubject in existing code
52
- - [ ] **9. Analyze external library deps** — check if `@smartsoft001` or `@smartsoft001-mobilems` changes are needed (mark as separate process)
53
- - [ ] **10. Create implementation plans** — generate structured plans per task/subtask with all required sections, using Angular 14 patterns
54
- - [ ] **11. MANDATORY: Write plans in Polish** — all plan content must be in Polish language
55
- - [ ] **12. MANDATORY: Get user approval of generated plan** — present the full plan content in the chat, then call `AskUserQuestion` with three options: save / regenerate / cancel. Save and label steps below MUST NOT run without approval. Skipped only in `--auto` (auto-approved; logged in audit comment).
56
- - [ ] **13. MANDATORY: Confirm old plan deletion** — if replacing existing `plan.md`, ask user to confirm deletion of old attachment before proceeding (skipped in `--auto`; delete old attachment automatically)
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
60
-
61
- ### Task Progress Tracking
62
-
63
- **MANDATORY**: Use Claude Code's built-in task tracking to provide real-time progress visibility.
64
-
65
- **Task naming convention**: Every task subject MUST be prefixed with the Linear task ID:
66
-
67
- ```
68
- <linearTaskId> <step description>
69
- ```
70
-
71
- **At skill start**: Create tasks for each checklist step using `TaskCreate`:
72
-
73
- ```
74
- TaskCreate({
75
- subject: "MM-123 Fetch Linear task",
76
- description: "Get title, description, labels, priority, estimate from MCP Linear server",
77
- activeForm: "MM-123 Fetching Linear task"
78
- })
79
- TaskCreate({
80
- subject: "MM-123 Analyze codebase",
81
- description: "Explore affected files, patterns, dependencies, and test coverage",
82
- activeForm: "MM-123 Analyzing codebase"
83
- })
84
- ```
85
-
86
- **During execution**:
87
-
88
- - Before starting a step → `TaskUpdate({ taskId, status: "in_progress" })`
89
- - After completing a step → `TaskUpdate({ taskId, status: "completed" })`
90
-
91
- **Before user review**: Use `TaskList` to show progress overview before presenting plans for approval.
92
-
93
- ## Role
94
-
95
- **You are a highly experienced software architect** with:
96
-
97
- - Over 15 years of experience in system design
98
- - Deep knowledge of design patterns and architectural patterns
99
- - Expertise in **Angular 14** patterns (NgModules, `*ngIf`/`*ngFor`, constructor DI, `@Input`/`@Output`)
100
- - Ability to break down complex tasks into smaller, understandable steps
101
- - Experience planning tasks for development teams in a clear and precise manner
102
- - Skill in anticipating potential problems and risks
103
- - Focus on architectural consistency and alignment with existing project patterns
104
- - Thinking about scalability, maintainability, and testability of solutions
105
-
106
- You create plans that are:
107
-
108
- - **Specific**: each step is clearly defined
109
- - **Actionable**: the developer knows exactly what to do
110
- - **Complete**: nothing is omitted
111
- - **Realistic**: they account for constraints and dependencies
112
- - **Legacy-compatible**: they use Angular 14 patterns (no signals, no standalone components)
113
-
114
- ## Usage
115
-
116
- ```
117
- /plan [linearTaskId]
118
- /plan [linearTaskId] --auto # Non-interactive mode for CI / GitHub Actions
119
- ```
120
-
121
- ## Parameters
122
-
123
- - `linearTaskId` - Linear task ID (e.g., ENG-123)
124
- - `--auto` - Non-interactive mode: skip ALL `AskUserQuestion` prompts. Auto-approve plans before saving (no review step), auto-delete stale `plan.md` attachments without confirmation, and silently skip when all plans are up to date (no "regenerate anyway?" prompt). Designed for CI / GitHub Actions runs where no human is at the keyboard.
125
-
126
- ## Auto Mode (`--auto`)
127
-
128
- **When `--auto` is set, the skill MUST run end-to-end without any human-in-the-loop prompts.** Apply these overrides:
129
-
130
- | Default behavior | `--auto` override |
131
- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
132
- | Final approval of generated plan content before saving | Skip the approval gate; proceed directly to attachment save (auto-approve) |
133
- | Ask user to confirm deletion of old `plan.md` attachments | Delete old attachments automatically before saving new ones |
134
- | Ask "regenerate anyway?" when all plans are up-to-date | Exit cleanly with a Linear comment noting all plans are current; no regeneration |
135
- | Secondary signal prompt (keyword-triggered confirmation to regen) | Ignore the secondary signal; only the mtime rule decides regeneration |
136
- | `AskUserQuestion` for any decision | Use the option marked **(Recommended)**; if none, fail fast with a Linear comment explaining why |
137
-
138
- **Hard requirement in `--auto`**: every decision (save, replace, skip) MUST be logged as a Linear comment in Polish so the run remains auditable after the fact. The mtime rule remains authoritative — `--auto` does not change _what_ gets regenerated, only that no human is asked.
139
-
140
- **Detection**: The flag `--auto` is provided as a positional/named arg. Treat any of `--auto`, `--ci`, `--non-interactive` as equivalent.
141
-
142
- ## Angular 14 Legacy Patterns
143
-
144
- When creating plans, always use these legacy patterns:
145
-
146
- ### Components
147
-
148
- - Use `@Component` with `NgModule` (NOT standalone)
149
- - Use `*ngIf` and `*ngFor` (NOT `@if` and `@for`)
150
- - Use constructor injection (NOT `inject()`)
151
- - Use `@Input()` and `@Output()` decorators (NOT `input()`, `output()`)
152
-
153
- ### Services
154
-
155
- - Use `BehaviorSubject` and `Observable` (NOT signals)
156
- - Use constructor injection
157
- - Use `@Injectable({ providedIn: 'root' })` or module providers
158
-
159
- ### State Management
160
-
161
- - Use NgRx Store/Effects or BehaviorSubject patterns
162
- - NO signals, computed(), or effect()
163
-
164
- ## Instructions
165
-
166
- You are tasked with creating an implementation plan for a Linear task and saving it as a comment in Linear. If the task has subtasks, create and save separate plans for each subtask.
167
-
168
- ### Step 1: Fetch Linear Task Details
169
-
170
- Use the MCP Linear server to fetch task details for the provided `linearTaskId`. Extract:
171
-
172
- - Task title
173
- - Task description
174
- - Task labels/type (bug, feature, etc.)
175
- - Acceptance criteria (if available)
176
- - Task priority
177
- - Task estimate (if available)
178
-
179
- ### Step 2: Fetch Subtasks
180
-
181
- Use the MCP Linear server to check if the task has subtasks (children). If subtasks exist:
182
-
183
- - Fetch details for each subtask (title, description, labels, priority)
184
- - Note the subtask IDs for later comment creation
185
- - The main task becomes the "parent context" for all subtask plans
186
-
187
- **Important**: If subtasks exist, you will create individual plans for each subtask, not for the parent task.
188
-
189
- ### Step 3: Fetch Task Attachments and Comments
190
-
191
- Use the MCP Linear server to fetch, for the parent task and each subtask:
192
-
193
- - Attachments via `mcp__linear__get_issue` (attachments included in response) — look for one titled exactly `plan.md`
194
- - Comments via `mcp__linear__list_comments` — keep `id`, `createdAt`, body text
195
-
196
- ### Step 3a: Determine Which Tasks Need Planning
197
-
198
- For each task/subtask, use the **attachment mtime vs comment ctime** rule:
199
-
200
- #### Inputs per task
201
-
202
- - `planAttachment`: the Linear attachment titled `plan.md` (or `null`)
203
- - `planAttachment.updatedAt` (fall back to `createdAt`): when the plan was last written
204
- - `comments`: list of all comments with `createdAt`
205
-
206
- #### Decision logic
207
-
208
- **Create a NEW plan if:**
209
-
210
- 1. `planAttachment == null`, OR
211
- 2. there is at least one comment where `comment.createdAt > planAttachment.updatedAt`
212
-
213
- **SKIP planning if:**
214
-
215
- 1. `planAttachment` exists AND no comment is newer than it.
216
-
217
- #### Secondary signal (optional)
218
-
219
- 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.
220
-
221
- #### Output:
222
-
223
- - `tasksNeedingPlan`: Array of task IDs that need a new or updated plan
224
- - `tasksWithExistingPlan`: Array of task IDs with up-to-date plans
225
- - `oldPlanAttachments`: Map of task ID → `attachmentId` for plans being replaced
226
-
227
- **Important**: If ALL tasks already have up-to-date plans:
228
-
229
- - **Default mode**: Inform the user and ask if they want to regenerate anyway.
230
- - **`--auto` mode**: Exit cleanly with a Linear comment in Polish noting all plans are current; do NOT regenerate.
231
-
232
- ### Step 4: Analyze Previous Commits
233
-
234
- Search for previous commits related to this Linear task by looking for the `linearTaskId` (and subtask IDs if applicable) in commit messages:
235
-
236
- ```bash
237
- # For parent task
238
- git log --all --grep="<linearTaskId>" --oneline
239
-
240
- # For each subtask
241
- git log --all --grep="<subtaskId>" --oneline
242
- ```
243
-
244
- For each found commit, analyze:
245
-
246
- 1. **Commit message**: What was the purpose of the change
247
- 2. **Changed files**: Run `git show --stat <commit-hash>` to see affected files
248
- 3. **Detailed changes**: Run `git show <commit-hash>` if needed to understand specific changes
249
-
250
- This helps to:
251
-
252
- - Understand what work has already been completed
253
- - Identify patterns and approaches already established
254
- - Avoid duplicating already implemented features
255
- - Build upon existing implementation
256
-
257
- ### Step 5: Analyze Staged Changes
258
-
259
- Check what's currently staged in Git:
260
-
261
- ```bash
262
- git status
263
- git diff --cached
264
- ```
265
-
266
- Analyze staged changes to understand:
267
-
268
- - What work is in progress but not yet committed
269
- - Files that are being modified as part of this task
270
- - Current implementation direction
271
-
272
- ### Step 6: Analyze the Codebase
273
-
274
- Based on the task requirements (and each subtask if applicable), explore the codebase to understand:
275
-
276
- 1. **Affected areas**: Identify which files, components, or modules will need changes
277
- 2. **Existing patterns**: Understand current implementation patterns to maintain consistency
278
- 3. **Dependencies**: Identify any dependencies or related code that might be affected
279
- 4. **Test coverage**: Check existing tests that might need updates
280
-
281
- Use tools like:
282
-
283
- - `Glob` to find relevant files
284
- - `Grep` to search for related code patterns
285
- - `Read` to understand specific implementations
286
-
287
- **Important**: Always check for Angular 14 patterns in existing code:
288
-
289
- - Look for `*ngIf`, `*ngFor` usage (NOT `@if`, `@for`)
290
- - Look for constructor injection patterns
291
- - Look for `@Input()`, `@Output()` decorators
292
- - Look for `BehaviorSubject`, `Observable` patterns (NOT signals)
293
-
294
- ### Step 6a: Analyze External Library Dependencies
295
-
296
- Check if the task requires changes to external library packages:
297
-
298
- #### @smartsoft001 libraries
299
-
300
- - **Repository location**: `../smartsoft001`
301
- - **Package path**: `../smartsoft001/packages/`
302
- - If changes are needed in `@smartsoft001/*` packages, explore the library repository to understand:
303
- - Current implementation of the relevant package
304
- - API surface that needs to be modified or extended
305
- - Existing patterns and conventions in the library
306
-
307
- #### @smartsoft001-mobilems libraries
308
-
309
- - **Repository location**: `../mobilems-framework`
310
- - **Package path**: `../mobilems-framework/packages/`
311
- - If changes are needed in `@smartsoft001-mobilems/*` packages, explore the library repository to understand:
312
- - Current implementation of the relevant package
313
- - API surface that needs to be modified or extended
314
- - Existing patterns and conventions in the library
315
-
316
- **Important**: Changes to these external libraries are NOT part of this task's implementation. They require a separate process:
317
-
318
- 1. Create a separate task/PR in the library repository
319
- 2. Publish new version of the library
320
- 3. Update dependency version in this project
321
- 4. Then implement the changes in this project that depend on the library updates
322
-
323
- ### Step 7: Create Implementation Plans
324
-
325
- #### If NO subtasks exist:
326
-
327
- Create a single detailed implementation plan for the parent task with:
328
-
329
- 1. **Summary**: Brief overview of what needs to be done
330
- 2. **Already Completed**: Work done in previous commits (with commit references)
331
- 3. **Currently In Progress**: Work visible in staged changes
332
- 4. **Remaining Work**: What still needs to be implemented
333
- 5. **Technical Analysis**: Key findings from codebase exploration
334
- 6. **Implementation Steps**: Numbered list of specific remaining tasks
335
- 7. **Files to Modify**: List of files that will need changes
336
- 8. **New Files**: List of any new files that need to be created
337
- 9. **External Library Changes**: Changes needed in @smartsoft001 or @smartsoft001-mobilems (separate process)
338
- 10. **Testing Strategy**: How the changes will be tested
339
- 11. **Risks & Considerations**: Any potential issues or things to watch out for
340
- 12. **Estimated Complexity**: Low / Medium / High
341
-
342
- #### If subtasks exist:
343
-
344
- Create a **separate plan for each subtask** that includes:
345
-
346
- 1. **Parent Context**: Reference to parent task and its overall goal
347
- 2. **Subtask Summary**: What this specific subtask needs to accomplish
348
- 3. **Already Completed**: Work done in previous commits for this subtask
349
- 4. **Currently In Progress**: Staged changes related to this subtask
350
- 5. **Remaining Work**: What still needs to be done for this subtask
351
- 6. **Technical Analysis**: Findings specific to this subtask
352
- 7. **Implementation Steps**: Steps specific to this subtask
353
- 8. **Files to Modify**: Files affected by this subtask
354
- 9. **New Files**: New files needed for this subtask
355
- 10. **External Library Changes**: Changes in @smartsoft001 or @smartsoft001-mobilems (separate process)
356
- 11. **Dependencies**: Other subtasks this depends on or blocks
357
- 12. **Testing Strategy**: Testing specific to this subtask
358
- 13. **Estimated Complexity**: Low / Medium / High
359
-
360
- ### Step 8: Format the Plans
361
-
362
- #### Format for task WITHOUT subtasks:
363
-
364
- ```markdown
365
- ## Implementation Plan
366
-
367
- ### Summary
368
-
369
- [Brief overview]
370
-
371
- ### Already Completed
372
-
373
- [List of work done in previous commits - skip if no previous commits]
374
-
375
- - `abc1234` - [commit message / description of changes]
376
- - `def5678` - [commit message / description of changes]
377
-
378
- **Files modified in previous commits:**
379
-
380
- - `path/to/file1.ts`
381
- - `path/to/file2.ts`
382
-
383
- ### Currently In Progress
384
-
385
- [Description of staged changes - skip if nothing staged]
386
-
387
- - [File/change description]
388
-
389
- ### Remaining Work
390
-
391
- [What still needs to be done based on task requirements]
392
-
393
- - [ ] [Remaining item 1]
394
- - [ ] [Remaining item 2]
395
-
396
- ### Technical Analysis
397
-
398
- [Key findings from codebase exploration]
399
-
400
- **Angular 14 patterns to follow:**
401
-
402
- - Use `*ngIf` / `*ngFor` for control flow
403
- - Use constructor injection for DI
404
- - Use `@Input()` / `@Output()` for component communication
405
- - Use `BehaviorSubject` / `Observable` for state management
406
-
407
- ### Implementation Steps
408
-
409
- 1. [Step 1]
410
- 2. [Step 2]
411
- 3. [Step 3]
412
- ...
413
-
414
- ### Files to Modify
415
-
416
- - `path/to/file1.ts` - [reason]
417
- - `path/to/file2.ts` - [reason]
418
-
419
- ### New Files
420
-
421
- - `path/to/new-file.ts` - [purpose]
422
-
423
- ### External Library Changes (separate process)
424
-
425
- [Skip this section if no library changes are needed]
426
-
427
- **@smartsoft001 (repo: ../smartsoft001)**
428
-
429
- - [ ] `packages/[package-name]` - [description of required changes]
430
-
431
- **@smartsoft001-mobilems (repo: ../mobilems-framework)**
432
-
433
- - [ ] `packages/[package-name]` - [description of required changes]
434
-
435
- > **Note**: These changes are NOT part of this task implementation. They require:
436
- >
437
- > 1. Separate task/PR in the library repository
438
- > 2. Library version publication
439
- > 3. Dependency update in this project
440
-
441
- ### Testing Strategy
442
-
443
- - [ ] Unit tests for [component/service]
444
- - [ ] E2E tests for [feature]
445
- - [ ] Manual testing: [scenarios]
446
-
447
- ### Risks & Considerations
448
-
449
- - [Risk 1]
450
- - [Risk 2]
451
-
452
- ### Estimated Complexity
453
-
454
- [Low / Medium / High]
455
-
456
- ---
457
-
458
- _Plan generated by Claude Code (flow-legacy)_
459
- ```
460
-
461
- #### Format for SUBTASK plan:
462
-
463
- ```markdown
464
- ## Implementation Plan for Subtask
465
-
466
- **Parent Task**: [Parent task ID] - [Parent task title]
467
-
468
- ### Subtask Summary
469
-
470
- [What this specific subtask needs to accomplish]
471
-
472
- ### Already Completed
473
-
474
- [Work done in previous commits for this subtask - skip if none]
475
-
476
- - `abc1234` - [commit message / description of changes]
477
-
478
- **Files modified:**
479
-
480
- - `path/to/file1.ts`
481
-
482
- ### Currently In Progress
483
-
484
- [Staged changes related to this subtask - skip if none]
485
-
486
- - [File/change description]
487
-
488
- ### Remaining Work
489
-
490
- - [ ] [Remaining item 1]
491
- - [ ] [Remaining item 2]
492
-
493
- ### Technical Analysis
494
-
495
- [Findings specific to this subtask]
496
-
497
- **Angular 14 patterns to follow:**
498
-
499
- - Use `*ngIf` / `*ngFor` for control flow
500
- - Use constructor injection for DI
501
- - Use `@Input()` / `@Output()` for component communication
502
-
503
- ### Implementation Steps
504
-
505
- 1. [Step 1]
506
- 2. [Step 2]
507
- ...
508
-
509
- ### Files to Modify
510
-
511
- - `path/to/file1.ts` - [reason]
512
-
513
- ### New Files
514
-
515
- - `path/to/new-file.ts` - [purpose]
516
-
517
- ### External Library Changes (separate process)
518
-
519
- [Skip this section if no library changes are needed]
520
-
521
- **@smartsoft001 (repo: ../smartsoft001)**
522
-
523
- - [ ] `packages/[package-name]` - [description of required changes]
524
-
525
- **@smartsoft001-mobilems (repo: ../mobilems-framework)**
526
-
527
- - [ ] `packages/[package-name]` - [description of required changes]
528
-
529
- > **Note**: These changes are NOT part of this subtask. Separate process required.
530
-
531
- ### Dependencies
532
-
533
- - **Depends on**: [List subtask IDs this depends on, or "None"]
534
- - **Blocks**: [List subtask IDs this blocks, or "None"]
535
-
536
- ### Testing Strategy
537
-
538
- - [ ] [Test specific to this subtask]
539
-
540
- ### Estimated Complexity
541
-
542
- [Low / Medium / High]
543
-
544
- ---
545
-
546
- _Plan generated by Claude Code (flow-legacy)_
547
- ```
548
-
549
- ### Step 8a: User Approval of Generated Plan
550
-
551
- **MANDATORY.** Before any Linear write (deletion of old `plan.md`, creation of new `plan.md`, label apply), the user MUST approve the generated plan content. This is the gate FRA-126 added.
552
-
553
- **`--auto` mode**: Skip this entire step. The plan is auto-approved. Record the auto-approval in the final Linear audit comment (e.g. `Plan zaakceptowany automatycznie (--auto)`). Proceed to Step 9.
554
-
555
- **Default mode** (interactive):
556
-
557
- 1. **Render the full plan(s) in chat.** Print the markdown produced in Step 8 for every task/subtask that needs planning. The `AskUserQuestion` option labels alone do not give the user enough context — the full text must be visible above the prompt.
558
-
559
- 2. **Ask for approval** via `AskUserQuestion`:
560
-
561
- ```markdown
562
- ## Akceptacja planu
563
-
564
- Powyżej znajduje się wygenerowany plan dla zadania <linearTaskId> (oraz <N> podzadań, jeśli dotyczy).
565
- Czy akceptujesz plan i mogę zapisać go jako załącznik `plan.md` w Linear?
566
- ```
567
-
568
- Options (use exactly these labels for consistency with Step 9):
569
-
570
- - **"Tak, zapisz plan do Linear"** _(Recommended)_ — user accepts. Proceed to Step 9 (delete old attachment if replacing, then save). Existing flow continues unchanged from here.
571
- - **"Wygeneruj plan ponownie"** — user wants a different plan. Go to step 3 (regeneration loop) below.
572
- - **"Anuluj"** — user rejects. Stop the whole skill. Do NOT delete the existing `plan.md` attachment. Do NOT save a new one. Do NOT apply the `AI Plan` label. Print a short status in Polish (`Plan nie został zapisany. Anulowano na żądanie użytkownika.`) and exit.
573
-
574
- 3. **Regeneration branch**: if the user chose "Wygeneruj plan ponownie":
575
-
576
- - Ask a follow-up `AskUserQuestion` (or accept the free-text the user typed alongside the rejection) to capture what should change: scope, structure, missed files, wrong approach, etc.
577
- - Loop back to **Step 7 (Create Implementation Plans)** with the user's feedback in mind. Do NOT re-run Steps 1–6 — the Linear task, comments, commits, and codebase analysis have not changed.
578
- - On the regenerated plan, return to **Step 8a step 1** (render + ask again).
579
- - **Cap the loop at 3 regenerations.** On the 3rd rejection, surface the situation to the user (`Plan został odrzucony 3 razy. Przerywam, abyś mógł doprecyzować wymagania.`) and exit without saving.
580
-
581
- 4. **State invariants on entry to Step 9**: the only path that reaches Step 9 is the explicit "Tak, zapisz plan do Linear" choice (or `--auto`). Treat plan content as final.
582
-
583
- ### Step 9: Confirm and Delete Old Plan Attachments
584
-
585
- **This step applies only when replacing existing plans** (`oldPlanAttachments` from Step 3a is not empty).
586
-
587
- **`--auto` mode**: Skip the confirmation prompt. For each task in `oldPlanAttachments`, delete the Linear attachment via `mcp__linear__delete_attachment({ id: attachmentId })` and proceed directly to Step 9a. Log the deletions in the final summary comment.
588
-
589
- **Default mode** (interactive): The plan content was already approved in Step 8a; this prompt is strictly about confirming deletion of the **existing** Linear attachment that will be overwritten. Ask the user:
590
-
591
- ```markdown
592
- ## Zastąpienie istniejących planów
593
-
594
- Następujące załączniki `plan.md` zostaną usunięte i zastąpione nowymi:
595
-
596
- | Task | Stary załącznik (ID) |
597
- | --------- | -------------------- |
598
- | <task-id> | <attachment-id> |
599
-
600
- Czy potwierdzasz usunięcie starych planów i zapisanie nowych?
601
- ```
602
-
603
- Use `AskUserQuestion` with options:
604
-
605
- - "Tak, usuń stare plany i zapisz nowe" (Recommended)
606
- - "Anuluj"
607
-
608
- **If user confirms:**
609
-
610
- 1. For each entry in `oldPlanAttachments`, delete the Linear attachment via `mcp__linear__delete_attachment({ id: attachmentId })`.
611
- 2. Proceed to Step 9a.
612
-
613
- **If user cancels:** Stop the process, do not save any plans.
614
-
615
- ### Step 9a: Save Plan as Native Linear Attachment
616
-
617
- **⛔ 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.**
618
-
619
- For each task that needs planning, upload the plan content directly to Linear (no external storage).
620
-
621
- #### 9a.1 — Write `plan.md` locally
622
-
623
- ```bash
624
- mkdir -p /tmp/claude-plans
625
- ```
626
-
627
- Use `Write` to save plan content to `/tmp/claude-plans/<taskId>-plan.md`.
628
-
629
- #### 9a.2 — Base64-encode
630
-
631
- ```bash
632
- b64=$(base64 -i /tmp/claude-plans/<taskId>-plan.md)
633
- ```
634
-
635
- On macOS `base64 -i <file>` outputs without line-wrapping. On Linux, pipe through `tr -d '\n'` if needed.
636
-
637
- #### 9a.3 — Create Linear attachment
638
-
639
- Call `mcp__linear__create_attachment` with:
640
-
641
- - `issue`: the task/subtask ID
642
- - `filename`: `plan.md`
643
- - `contentType`: `text/markdown`
644
- - `title`: `plan.md` (exact — used for detection in Step 3 and by `/impl`)
645
- - `subtitle`: `Plan wygenerowany przez Claude Code (legacy)`
646
- - `base64Content`: the base64 string from 9a.2
647
-
648
- Linear hosts the file on its own infrastructure.
649
-
650
- #### 9a.4 — Clean up local file
651
-
652
- Delete `/tmp/claude-plans/<taskId>-plan.md` after the attachment is created. `/push` does NOT delete Linear attachments — they stay on the issue.
653
-
654
- #### Scope rule
655
-
656
- - No subtasks → attach `plan.md` to parent.
657
- - Has subtasks → attach `plan.md` to each subtask needing planning. Do NOT attach on the parent.
658
-
659
- ### Step 9b: Add "AI Plan" Label
660
-
661
- Apply the `AI Plan` label to the **invoked issue** — i.e. the `linearTaskId` passed to `/plan`:
662
-
663
- - `/plan MOB-123` (parent) → label on `MOB-123`. Subtasks receive `plan.md` attachments but no label.
664
- - `/plan MOB-123-1` (subtask) → label on `MOB-123-1` directly; parent untouched.
665
-
666
- **`AI Plan` is a workspace-level (organization-wide) label that already exists** — do NOT create it.
667
-
668
- 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.
669
- 2. Apply via `mcp__linear__save_issue({ id: invokedTaskId, labelIds: [...existingLabelIds, aiPlanLabelId] })`. Preserve existing labels. Skip if already present.
670
- 3. If label operations fail, surface the error but do not roll back the attachment.
671
-
672
- ### Step 10: Confirm to User
673
-
674
- After saving:
675
-
676
- - List all tasks/subtasks where `plan.md` was attached (with Linear attachment URL)
677
- - Show plan summaries
678
- - Confirm `AI Plan` label added to parent task
679
- - Provide Linear links
680
-
681
- ## Guidelines
682
-
683
- 1. **Write plans in Polish**: All implementation plans must be written in Polish language
684
- 2. **Be thorough but concise**: Include all necessary details without being verbose
685
- 3. **Be specific**: Reference actual file paths and code patterns found in the codebase
686
- 4. **Consider edge cases**: Think about error handling, validation, and edge cases
687
- 5. **Follow project conventions**: Ensure the plan aligns with project architecture and patterns
688
- 6. **Identify dependencies**: Note if any tasks depend on others or external factors
689
- 7. **Ask for clarification**: If requirements are unclear, use `AskUserQuestion` before creating the plan
690
- 8. **Track progress accurately**: Clearly distinguish between completed, in-progress, and remaining work
691
- 9. **Reference commits**: Always include commit hashes when mentioning previous work
692
- 10. **Keep subtask plans focused**: Each subtask plan should only cover that subtask's scope
693
- 11. **Identify cross-subtask dependencies**: Note which subtasks depend on or block others
694
- 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
695
- 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`).
696
- 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.
697
- 15. **Use Angular 14 patterns**: Always plan for `*ngIf`/`*ngFor`, constructor DI, `@Input()`/`@Output()`, BehaviorSubject - NOT signals, `@if`/`@for`, or `inject()`
698
- 16. **Delete old plans cleanly**: When replacing, ask user to confirm, then delete the old Linear attachment via `mcp__linear__delete_attachment`.
699
- 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.
700
-
701
- ---
702
-
703
- **Important**:
704
-
705
- - **Default mode**: Before saving the plans as attachments, show them to the user for review and approval.
706
- - **`--auto` mode**: Skip the review step; proceed directly to saving the attachments.
707
-
708
- 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.