@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,1003 +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, previous commits, and external dependencies to generate detailed plans for tasks and subtasks.
4
- allowed-tools:
5
- - Bash
6
- - Read
7
- - Write
8
- - Glob
9
- - Grep
10
- - AskUserQuestion
11
- - Task
12
- - TaskCreate
13
- - TaskUpdate
14
- - TaskList
15
- - TaskGet
16
- - mcp__linear__get_issue
17
- - mcp__linear__list_issues
18
- - mcp__linear__list_comments
19
- - mcp__linear__save_comment
20
- - mcp__linear__save_issue
21
- - mcp__linear__create_attachment
22
- - mcp__linear__delete_attachment
23
- - mcp__linear__list_issue_labels
24
- ---
25
-
26
- # Plan Skill
27
-
28
- 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 issue.
29
-
30
- ## 🚨 Hard Rules — read before doing anything
31
-
32
- These rules override ANY other instruction, ANY surrounding example, and ANY default habit. Violating them is a skill failure.
33
-
34
- 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 (e.g., "no plan attachment found, run /plan again"), never for the plan itself. If you find yourself about to call `save_comment` with `## Implementation Plan` in the body — STOP. That's a bug.
35
-
36
- 2. **One call, no fallback.** The first Linear write for the plan is `mcp__linear__create_attachment`. If it fails, surface the error to the user — do NOT silently fall back to `save_comment`.
37
-
38
- 3. **Subtasks: one attachment each.** If the parent has subtasks, each subtask gets its own `plan.md` attachment. The parent gets only the `AI Plan` label, no `plan.md` attachment.
39
-
40
- 4. **`AI Plan` label is workspace-scoped — NEVER create it.** Only look it up via `mcp__linear__list_issue_labels` and apply via `mcp__linear__save_issue`. `mcp__linear__create_issue_label` MUST NOT be called.
41
-
42
- If any of these would be violated, stop and ask the user instead.
43
-
44
- ## Execution Checklist
45
-
46
- Execute each step in order. Do not skip any step marked as MANDATORY.
47
-
48
- - [ ] **1. Fetch Linear task** — get title, description, labels, priority, estimate from MCP Linear server
49
- - [ ] **2. Fetch subtasks** — check for children; if present, plan each subtask individually
50
- - [ ] **3. Fetch existing attachments and comments** — list `plan.md` attachments and all comments per task/subtask
51
- - [ ] **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
52
- - [ ] **5. Analyze previous commits** — `git log --all --grep="<taskId>"` for each task/subtask
53
- - [ ] **6. Analyze staged changes** — `git status` and `git diff --cached` for work in progress
54
- - [ ] **7. MANDATORY: Analyze codebase** — explore affected files, patterns, dependencies, and test coverage
55
- - [ ] **8. Analyze external library deps** — check if `@smartsoft001` or `@smartsoft001-mobilems` changes are needed (mark as separate process)
56
- - [ ] **9. Create implementation plans** — generate structured plans per task/subtask with all required sections
57
- - [ ] **10. MANDATORY: Write plans in Polish** — all plan content must be in Polish language
58
- - [ ] **11. 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).
59
- - [ ] **12. 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)
60
- - [ ] **13. 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.
61
- - [ ] **14. 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)
62
- - [ ] **15. Confirm to user** — list saved plans with summaries and Linear links
63
-
64
- ### Task Progress Tracking
65
-
66
- **MANDATORY**: Use Claude Code's built-in task tracking to provide real-time progress visibility.
67
-
68
- **Task naming convention**: Every task subject MUST be prefixed with the Linear task ID:
69
-
70
- ```
71
- <linearTaskId> <step description>
72
- ```
73
-
74
- **At skill start**: Create tasks for each checklist step using `TaskCreate`:
75
-
76
- ```
77
- TaskCreate({
78
- subject: "MM-123 Fetch Linear task",
79
- description: "Get title, description, labels, priority, estimate from MCP Linear server",
80
- activeForm: "MM-123 Fetching Linear task"
81
- })
82
- TaskCreate({
83
- subject: "MM-123 Analyze codebase",
84
- description: "Explore affected files, patterns, dependencies, and test coverage",
85
- activeForm: "MM-123 Analyzing codebase"
86
- })
87
- ```
88
-
89
- **During execution**:
90
-
91
- - Before starting a step → `TaskUpdate({ taskId, status: "in_progress" })`
92
- - After completing a step → `TaskUpdate({ taskId, status: "completed" })`
93
-
94
- **Before user review**: Use `TaskList` to show progress overview before presenting plans for approval.
95
-
96
- ## Role
97
-
98
- **You are a highly experienced software architect** with:
99
-
100
- - Over 15 years of experience in system design
101
- - Deep knowledge of design patterns and architectural patterns
102
- - Ability to break down complex tasks into smaller, understandable steps
103
- - Experience planning tasks for development teams in a clear and precise manner
104
- - Skill in anticipating potential problems and risks
105
- - Focus on architectural consistency and alignment with existing project patterns
106
- - Thinking about scalability, maintainability, and testability of solutions
107
-
108
- You create plans that are:
109
-
110
- - **Specific**: each step is clearly defined
111
- - **Actionable**: the developer knows exactly what to do
112
- - **Complete**: nothing is omitted
113
- - **Realistic**: they account for constraints and dependencies
114
-
115
- ## Usage
116
-
117
- ```
118
- /plan [linearTaskId]
119
- /plan [linearTaskId] --deep # Deep planning with Agent Team (experimental)
120
- /plan [linearTaskId] --auto # Non-interactive mode for CI / GitHub Actions
121
- ```
122
-
123
- ## Parameters
124
-
125
- - `linearTaskId` - Linear task ID (e.g., ENG-123)
126
- - `--deep` - Enable deep planning with Agent Team (experimental, requires `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`)
127
- - `--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.
128
-
129
- ## Auto Mode (`--auto`)
130
-
131
- **When `--auto` is set, the skill MUST run end-to-end without any human-in-the-loop prompts.** Apply these overrides:
132
-
133
- | Default behavior | `--auto` override |
134
- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
135
- | Final approval of generated plan content before saving | Skip the approval gate; proceed directly to attachment save (auto-approve) |
136
- | Ask user to confirm deletion of old `plan.md` attachments | Delete old attachments automatically before saving new ones |
137
- | Ask "regenerate anyway?" when all plans are up-to-date | Exit cleanly with a Linear comment noting all plans are current; no regeneration |
138
- | Secondary signal prompt (keyword-triggered confirmation to regen) | Ignore the secondary signal; only the mtime rule decides regeneration |
139
- | `AskUserQuestion` for any decision | Use the option marked **(Recommended)**; if none, fail fast with a Linear comment explaining why |
140
-
141
- **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.
142
-
143
- **Detection**: The flag `--auto` is provided as a positional/named arg. Treat any of `--auto`, `--ci`, `--non-interactive` as equivalent. Combinable with `--deep` (deep team mode runs without the final approval prompt).
144
-
145
- ## Instructions
146
-
147
- 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.
148
-
149
- ### Step 1: Fetch Linear Task Details
150
-
151
- Use the MCP Linear server to fetch task details for the provided `linearTaskId`. Extract:
152
-
153
- - Task title
154
- - Task description
155
- - Task labels/type (bug, feature, etc.)
156
- - Acceptance criteria (if available)
157
- - Task priority
158
- - Task estimate (if available)
159
-
160
- ### Step 2: Fetch Subtasks
161
-
162
- Use the MCP Linear server to check if the task has subtasks (children). If subtasks exist:
163
-
164
- - Fetch details for each subtask (title, description, labels, priority)
165
- - Note the subtask IDs for later comment creation
166
- - The main task becomes the "parent context" for all subtask plans
167
-
168
- **Important**: If subtasks exist, you will create individual plans for each subtask, not for the parent task.
169
-
170
- ### Step 3: Fetch Task Attachments and Comments
171
-
172
- Use the MCP Linear server to fetch, for the parent task and each subtask (if any):
173
-
174
- - Attachments via `mcp__linear__get_issue({ id })` — the response includes an `attachments` array; look for one where `title == "plan.md"` (or filename — whichever field the MCP surfaces)
175
- - Comments via `mcp__linear__list_comments({ issueId })` — keep `id`, `createdAt`, body text
176
-
177
- This is used to:
178
-
179
- - Detect whether a plan already exists (attachment `plan.md`)
180
- - Determine whether the plan is stale (any comment is newer than the attachment)
181
- - Record old attachment IDs for replacement
182
-
183
- ### Step 3a: Determine Which Tasks Need Planning
184
-
185
- For each task/subtask, use the following decision logic driven by **attachment modification time vs comment creation time**:
186
-
187
- #### Inputs per task
188
-
189
- - `planAttachment`: the Linear attachment titled `plan.md` (or `null` if none)
190
- - `planAttachment.createdAt` / `planAttachment.updatedAt`: when the plan was last written
191
- - `comments`: list of all comments with `createdAt`
192
-
193
- #### Decision logic
194
-
195
- **Create a NEW plan if:**
196
-
197
- 1. **No plan attachment exists**: `planAttachment == null`
198
- 2. **Plan is stale**: there is at least one comment where `comment.createdAt > planAttachment.updatedAt` (use `updatedAt`; fall back to `createdAt` if `updatedAt` is unavailable). Every comment newer than the attachment counts as "feedback on the plan" — we intentionally do NOT try to filter acknowledgments, because the filesystem-style mtime rule is the source of truth the user asked for.
199
-
200
- **SKIP planning if:**
201
-
202
- 1. `planAttachment` exists AND no comment is newer than it.
203
-
204
- #### Secondary signal (optional, do not override mtime rule)
205
-
206
- If `planAttachment` exists and no comment is newer than it, but the user's latest message mentions plan-change keywords ("zmień plan", "zaktualizuj plan", "popraw plan", "nowy plan", "uwagi do planu", etc.), ask the user explicitly whether to regenerate. Do **not** regenerate silently based on keywords alone.
207
-
208
- #### Output:
209
-
210
- Create a list of tasks/subtasks that need planning:
211
-
212
- - `tasksNeedingPlan`: Array of task IDs that need a new or updated plan
213
- - `tasksWithExistingPlan`: Array of task IDs with valid, up-to-date plans (skip these)
214
- - `oldPlanAttachments`: Map of task ID → `attachmentId` for plans that will be replaced (needed for deletion in Step 9)
215
-
216
- **Important**: If ALL tasks already have up-to-date plans:
217
-
218
- - **Default mode**: Inform the user and ask if they want to regenerate anyway.
219
- - **`--auto` mode**: Exit cleanly with a Linear comment in Polish noting all plans are current; do NOT regenerate.
220
-
221
- ### Step 4: Analyze Previous Commits
222
-
223
- Search for previous commits related to this Linear task by looking for the `linearTaskId` (and subtask IDs if applicable) in commit messages:
224
-
225
- ```bash
226
- # For parent task
227
- git log --all --grep="<linearTaskId>" --oneline
228
-
229
- # For each subtask
230
- git log --all --grep="<subtaskId>" --oneline
231
- ```
232
-
233
- For each found commit, analyze:
234
-
235
- 1. **Commit message**: What was the purpose of the change
236
- 2. **Changed files**: Run `git show --stat <commit-hash>` to see affected files
237
- 3. **Detailed changes**: Run `git show <commit-hash>` if needed to understand specific changes
238
-
239
- This helps to:
240
-
241
- - Understand what work has already been completed
242
- - Identify patterns and approaches already established
243
- - Avoid duplicating already implemented features
244
- - Build upon existing implementation
245
-
246
- ### Step 5: Analyze Staged Changes
247
-
248
- Check what's currently staged in Git:
249
-
250
- ```bash
251
- git status
252
- git diff --cached
253
- ```
254
-
255
- Analyze staged changes to understand:
256
-
257
- - What work is in progress but not yet committed
258
- - Files that are being modified as part of this task
259
- - Current implementation direction
260
-
261
- ### Step 6: Analyze the Codebase
262
-
263
- Based on the task requirements (and each subtask if applicable), explore the codebase to understand:
264
-
265
- 1. **Affected areas**: Identify which files, components, or modules will need changes
266
- 2. **Existing patterns**: Understand current implementation patterns to maintain consistency
267
- 3. **Dependencies**: Identify any dependencies or related code that might be affected
268
- 4. **Test coverage**: Check existing tests that might need updates
269
-
270
- Use tools like:
271
-
272
- - `Glob` to find relevant files
273
- - `Grep` to search for related code patterns
274
- - `Read` to understand specific implementations
275
-
276
- ### Step 6a: Analyze External Library Dependencies
277
-
278
- Check if the task requires changes to external library packages:
279
-
280
- #### @smartsoft001 libraries
281
-
282
- - **Repository location**: `../smartsoft001`
283
- - **Package path**: `../smartsoft001/packages/`
284
- - If changes are needed in `@smartsoft001/*` packages, explore the library repository to understand:
285
- - Current implementation of the relevant package
286
- - API surface that needs to be modified or extended
287
- - Existing patterns and conventions in the library
288
-
289
- #### @smartsoft001-mobilems libraries
290
-
291
- - **Repository location**: `../mobilems-framework`
292
- - **Package path**: `../mobilems-framework/packages/`
293
- - If changes are needed in `@smartsoft001-mobilems/*` packages, explore the library repository to understand:
294
- - Current implementation of the relevant package
295
- - API surface that needs to be modified or extended
296
- - Existing patterns and conventions in the library
297
-
298
- **Important**: Changes to these external libraries are NOT part of this task's implementation. They require a separate process:
299
-
300
- 1. Create a separate task/PR in the library repository
301
- 2. Publish new version of the library
302
- 3. Update dependency version in this project
303
- 4. Then implement the changes in this project that depend on the library updates
304
-
305
- ### Step 6b: Deep Planning Mode (if --deep flag provided)
306
-
307
- **Prerequisites**:
308
-
309
- - `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` must be set
310
- - `--deep` flag must be provided
311
-
312
- **If prerequisites NOT met** → Skip to Step 7 (standard planning).
313
-
314
- **If prerequisites met:**
315
-
316
- 1. **Create Planning Team** with 3 perspective teammates:
317
-
318
- **Teammate "Architect"** — spawn `shared-plan-perspective` agent with prompt:
319
-
320
- ```
321
- You are the Architect perspective in a planning team for Linear task [taskId].
322
-
323
- Task: [title + description]
324
- Codebase analysis: [findings from Steps 4-6a]
325
-
326
- YOUR FOCUS:
327
- - Analyze architecture impact (Nx dependency graph, package boundaries)
328
- - Check cross-package dependencies (tsconfig paths, barrel exports)
329
- - Verify layer compliance (domain → shell flow, no reverse deps)
330
- - Evaluate if proposed changes fit existing patterns
331
- - Identify affected downstream consumers
332
-
333
- OUTPUT: Structured architecture analysis in Polish with:
334
- - Impact assessment (which packages affected)
335
- - Pattern compliance (does it follow existing conventions?)
336
- - Dependency risks (circular deps, breaking changes)
337
- - Recommended approach with file-level details
338
- ```
339
-
340
- **Teammate "Implementor"** — spawn `shared-plan-perspective` agent with prompt:
341
-
342
- ```
343
- You are the Implementor perspective in a planning team for Linear task [taskId].
344
-
345
- Task: [title + description]
346
- Codebase analysis: [findings from Steps 4-6a]
347
-
348
- YOUR FOCUS:
349
- - Propose concrete implementation steps
350
- - List exact files to modify/create with rationale
351
- - Estimate complexity per file (LOC changes, risk level)
352
- - Define TDD strategy (which tests first, what to mock)
353
- - Identify reusable code/patterns in existing codebase
354
-
355
- OUTPUT: Detailed implementation proposal in Polish with:
356
- - Step-by-step implementation plan
357
- - File change matrix (file, action, complexity, risk)
358
- - TDD strategy per component
359
- - Estimated total complexity (Low/Medium/High)
360
- ```
361
-
362
- **Teammate "Devil's Advocate"** — spawn `shared-plan-perspective` agent with prompt:
363
-
364
- ```
365
- You are the Devil's Advocate in a planning team for Linear task [taskId].
366
-
367
- Task: [title + description]
368
- Codebase analysis: [findings from Steps 4-6a]
369
-
370
- WAIT for Architect and Implementor to complete their analyses.
371
- Then CRITICALLY review their proposals:
372
-
373
- YOUR FOCUS:
374
- - Find holes in the Architect's analysis (missed dependencies, wrong patterns)
375
- - Challenge the Implementor's estimates (hidden complexity, missing edge cases)
376
- - Identify breaking changes that could affect production
377
- - Check for regression risks in existing tests
378
- - Look for security implications
379
- - Consider performance impact
380
-
381
- OUTPUT: Critical review in Polish with:
382
- - Issues found in Architect's analysis
383
- - Issues found in Implementor's proposal
384
- - Edge cases not covered
385
- - Risks with severity ratings (CRITICAL/HIGH/MEDIUM/LOW)
386
- - Alternative approaches (if proposed approach is risky)
387
- ```
388
-
389
- 2. **Task dependencies**:
390
-
391
- ```
392
- TaskCreate: [PLAN-TEAM] <taskId> Architect analysis → no dependencies
393
- TaskCreate: [PLAN-TEAM] <taskId> Implementor proposal → no dependencies
394
- TaskCreate: [PLAN-TEAM] <taskId> Devil's Advocate review → blocked by Architect + Implementor
395
- ```
396
-
397
- Use `TaskUpdate` to set `addBlockedBy` for Devil's Advocate task.
398
-
399
- 3. **After Devil's Advocate completes**:
400
-
401
- - Broadcast Devil's Advocate findings to Architect and Implementor
402
- - Allow one round of **response** (each teammate addresses concerns raised)
403
- - Collect all responses
404
-
405
- 4. **Lead synthesizes final plan**:
406
-
407
- - Delegate to `shared-report-synthesizer` with all three perspectives + responses
408
- - Team type: PLAN-TEAM
409
- - Generate plan with additional **"Risks & Mitigations"** section:
410
-
411
- ```markdown
412
- ### Ryzyka i mitygacje
413
-
414
- | Ryzyko | Ważność | Źródło | Mitygacja |
415
- | ------------- | ------- | -------------- | --------------------- |
416
- | [opis ryzyka] | HIGH | Adwokat Diabła | [strategia mitygacji] |
417
- ```
418
-
419
- - Add **"Consensus Rating"**: 1-5 scale based on agreement between teammates
420
- - Add **"Confidence Level"**: Based on Devil's Advocate severity findings
421
- - WYSOKA: no CRITICAL/HIGH findings
422
- - ŚREDNIA: HIGH findings but addressed in responses
423
- - NISKA: CRITICAL findings or unresolved HIGH findings
424
-
425
- 5. **Present enriched plan to user** (Step 7 continues with enhanced plan content)
426
-
427
- 6. **Cleanup team**
428
-
429
- ### Agent Team Mode (Experimental)
430
-
431
- **Prerequisite**: `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` in settings.
432
-
433
- **Activation**: Add `--deep` flag.
434
-
435
- **Fallback**: If env var not set or flag not provided, skill runs in standard sequential mode.
436
-
437
- ### Step 7: Create Implementation Plans
438
-
439
- #### If NO subtasks exist:
440
-
441
- Create a single detailed implementation plan for the parent task with:
442
-
443
- 1. **Summary**: Brief overview of what needs to be done
444
- 2. **Already Completed**: Work done in previous commits (with commit references)
445
- 3. **Currently In Progress**: Work visible in staged changes
446
- 4. **Remaining Work**: What still needs to be implemented
447
- 5. **Technical Analysis**: Key findings from codebase exploration
448
- 6. **Implementation Steps**: Numbered list of specific remaining tasks
449
- 7. **Files to Modify**: List of files that will need changes
450
- 8. **New Files**: List of any new files that need to be created
451
- 9. **External Library Changes**: Changes needed in @smartsoft001 or @smartsoft001-mobilems (separate process)
452
- 10. **Testing Strategy**: How the changes will be tested
453
- 11. **Risks & Considerations**: Any potential issues or things to watch out for
454
- 12. **Estimated Complexity**: Low / Medium / High
455
-
456
- #### If subtasks exist:
457
-
458
- Create a **separate plan for each subtask** that includes:
459
-
460
- 1. **Parent Context**: Reference to parent task and its overall goal
461
- 2. **Subtask Summary**: What this specific subtask needs to accomplish
462
- 3. **Already Completed**: Work done in previous commits for this subtask
463
- 4. **Currently In Progress**: Staged changes related to this subtask
464
- 5. **Remaining Work**: What still needs to be done for this subtask
465
- 6. **Technical Analysis**: Findings specific to this subtask
466
- 7. **Implementation Steps**: Steps specific to this subtask
467
- 8. **Files to Modify**: Files affected by this subtask
468
- 9. **New Files**: New files needed for this subtask
469
- 10. **External Library Changes**: Changes in @smartsoft001 or @smartsoft001-mobilems (separate process)
470
- 11. **Dependencies**: Other subtasks this depends on or blocks
471
- 12. **Testing Strategy**: Testing specific to this subtask
472
- 13. **Estimated Complexity**: Low / Medium / High
473
-
474
- ### Step 8: Format the Plans
475
-
476
- #### Format for task WITHOUT subtasks:
477
-
478
- ```markdown
479
- ## Implementation Plan
480
-
481
- ### Summary
482
-
483
- [Brief overview]
484
-
485
- ### Already Completed
486
-
487
- [List of work done in previous commits - skip if no previous commits]
488
-
489
- - `abc1234` - [commit message / description of changes]
490
- - `def5678` - [commit message / description of changes]
491
-
492
- **Files modified in previous commits:**
493
-
494
- - `path/to/file1.ts`
495
- - `path/to/file2.ts`
496
-
497
- ### Currently In Progress
498
-
499
- [Description of staged changes - skip if nothing staged]
500
-
501
- - [File/change description]
502
-
503
- ### Remaining Work
504
-
505
- [What still needs to be done based on task requirements]
506
-
507
- - [ ] [Remaining item 1]
508
- - [ ] [Remaining item 2]
509
-
510
- ### Technical Analysis
511
-
512
- [Key findings from codebase exploration]
513
-
514
- ### Implementation Steps
515
-
516
- 1. [Step 1]
517
- 2. [Step 2]
518
- 3. [Step 3]
519
- ...
520
-
521
- ### Files to Modify
522
-
523
- - `path/to/file1.ts` - [reason]
524
- - `path/to/file2.ts` - [reason]
525
-
526
- ### New Files
527
-
528
- - `path/to/new-file.ts` - [purpose]
529
-
530
- ### External Library Changes (separate process)
531
-
532
- [Skip this section if no library changes are needed]
533
-
534
- **@smartsoft001 (repo: ../smartsoft001)**
535
-
536
- - [ ] `packages/[package-name]` - [description of required changes]
537
-
538
- **@smartsoft001-mobilems (repo: ../mobilems-framework)**
539
-
540
- - [ ] `packages/[package-name]` - [description of required changes]
541
-
542
- > **Note**: These changes are NOT part of this task implementation. They require:
543
- >
544
- > 1. Separate task/PR in the library repository
545
- > 2. Library version publication
546
- > 3. Dependency update in this project
547
-
548
- ### Testing Strategy
549
-
550
- - [ ] Unit tests for [component/service]
551
- - [ ] E2E tests for [feature]
552
- - [ ] Manual testing: [scenarios]
553
-
554
- ### Risks & Considerations
555
-
556
- - [Risk 1]
557
- - [Risk 2]
558
-
559
- ### Estimated Complexity
560
-
561
- [Low / Medium / High]
562
-
563
- ---
564
-
565
- _Plan generated by Claude Code_
566
- ```
567
-
568
- #### Format for SUBTASK plan:
569
-
570
- ```markdown
571
- ## Implementation Plan for Subtask
572
-
573
- **Parent Task**: [Parent task ID] - [Parent task title]
574
-
575
- ### Subtask Summary
576
-
577
- [What this specific subtask needs to accomplish]
578
-
579
- ### Already Completed
580
-
581
- [Work done in previous commits for this subtask - skip if none]
582
-
583
- - `abc1234` - [commit message / description of changes]
584
-
585
- **Files modified:**
586
-
587
- - `path/to/file1.ts`
588
-
589
- ### Currently In Progress
590
-
591
- [Staged changes related to this subtask - skip if none]
592
-
593
- - [File/change description]
594
-
595
- ### Remaining Work
596
-
597
- - [ ] [Remaining item 1]
598
- - [ ] [Remaining item 2]
599
-
600
- ### Technical Analysis
601
-
602
- [Findings specific to this subtask]
603
-
604
- ### Implementation Steps
605
-
606
- 1. [Step 1]
607
- 2. [Step 2]
608
- ...
609
-
610
- ### Files to Modify
611
-
612
- - `path/to/file1.ts` - [reason]
613
-
614
- ### New Files
615
-
616
- - `path/to/new-file.ts` - [purpose]
617
-
618
- ### External Library Changes (separate process)
619
-
620
- [Skip this section if no library changes are needed]
621
-
622
- **@smartsoft001 (repo: ../smartsoft001)**
623
-
624
- - [ ] `packages/[package-name]` - [description of required changes]
625
-
626
- **@smartsoft001-mobilems (repo: ../mobilems-framework)**
627
-
628
- - [ ] `packages/[package-name]` - [description of required changes]
629
-
630
- > **Note**: These changes are NOT part of this subtask. Separate process required.
631
-
632
- ### Dependencies
633
-
634
- - **Depends on**: [List subtask IDs this depends on, or "None"]
635
- - **Blocks**: [List subtask IDs this blocks, or "None"]
636
-
637
- ### Testing Strategy
638
-
639
- - [ ] [Test specific to this subtask]
640
-
641
- ### Estimated Complexity
642
-
643
- [Low / Medium / High]
644
-
645
- ---
646
-
647
- _Plan generated by Claude Code_
648
- ```
649
-
650
- #### Additional sections for --deep mode
651
-
652
- When using `--deep` flag and the Planning Team has completed its analysis, append these sections to each plan:
653
-
654
- ```markdown
655
- ### Analiza wpływu architektonicznego
656
-
657
- [From Architect teammate — architecture impact, package dependencies, pattern compliance]
658
-
659
- ### Ryzyka i mitygacje
660
-
661
- | Ryzyko | Ważność | Źródło | Mitygacja |
662
- | ------------- | ------- | -------------- | --------------------- |
663
- | [opis ryzyka] | HIGH | Adwokat Diabła | [strategia mitygacji] |
664
-
665
- ### Ocena konsensusu: [1-5] / Pewność: [WYSOKA/ŚREDNIA/NISKA]
666
-
667
- [Podsumowanie na podstawie debaty zespołowej — zgodność między perspektywami]
668
- ```
669
-
670
- **Consensus Rating scale:**
671
-
672
- - 5: Full agreement between all three perspectives
673
- - 4: Minor disagreements, all addressed in response round
674
- - 3: Some unresolved concerns, but overall direction agreed
675
- - 2: Significant disagreements on approach
676
- - 1: Fundamental disagreements — plan needs revision
677
-
678
- ### Step 8a: User Approval of Generated Plan
679
-
680
- **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.
681
-
682
- **`--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.
683
-
684
- **Default mode** (interactive):
685
-
686
- 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.
687
-
688
- 2. **Ask for approval** via `AskUserQuestion`:
689
-
690
- ```markdown
691
- ## Akceptacja planu
692
-
693
- Powyżej znajduje się wygenerowany plan dla zadania <linearTaskId> (oraz <N> podzadań, jeśli dotyczy).
694
- Czy akceptujesz plan i mogę zapisać go jako załącznik `plan.md` w Linear?
695
- ```
696
-
697
- Options (use exactly these labels for consistency with Step 9):
698
-
699
- - **"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.
700
- - **"Wygeneruj plan ponownie"** — user wants a different plan. Go to step 3 (regeneration loop) below.
701
- - **"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.
702
-
703
- 3. **Regeneration branch**: if the user chose "Wygeneruj plan ponownie":
704
-
705
- - 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.
706
- - 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.
707
- - On the regenerated plan, return to **Step 8a step 1** (render + ask again).
708
- - **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.
709
-
710
- 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.
711
-
712
- ### Step 9: Confirm and Delete Old Plan Attachments
713
-
714
- **This step applies only when replacing existing plans** (i.e., `oldPlanAttachments` from Step 3a is not empty).
715
-
716
- **`--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.
717
-
718
- **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:
719
-
720
- ```markdown
721
- ## Zastąpienie istniejących planów
722
-
723
- Następujące załączniki `plan.md` zostaną usunięte i zastąpione nowymi:
724
-
725
- | Task | Stary załącznik (ID) |
726
- | --------- | -------------------- |
727
- | <task-id> | <attachment-id> |
728
-
729
- Czy potwierdzasz usunięcie starych planów i zapisanie nowych?
730
- ```
731
-
732
- Use `AskUserQuestion` tool with options:
733
-
734
- - "Tak, usuń stare plany i zapisz nowe" (Recommended)
735
- - "Anuluj"
736
-
737
- **If user confirms deletion:**
738
-
739
- 1. For each task in `oldPlanAttachments`, delete the Linear attachment via `mcp__linear__delete_attachment({ id: attachmentId })`.
740
- 2. Then proceed to Step 9a.
741
-
742
- **If user cancels:**
743
-
744
- - Stop the entire process, do not save any plans.
745
-
746
- ### Step 9a: Save Plan as Linear Attachment
747
-
748
- **⛔ 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.**
749
-
750
- For each task that needs planning, upload the plan content directly to Linear via `mcp__linear__create_attachment` — Linear hosts the file itself, no intermediate storage.
751
-
752
- #### 9a.1 — Prepare plan content
753
-
754
- The plan content is exactly the markdown produced in Step 8 (the same block that would previously have been posted as a comment).
755
-
756
- Write it to a temp file so it can be base64-encoded:
757
-
758
- ```bash
759
- mkdir -p /tmp/claude-plans
760
- ```
761
-
762
- Use the `Write` tool to save the plan markdown to `/tmp/claude-plans/<taskId>-plan.md`.
763
-
764
- #### 9a.2 — Base64-encode the content
765
-
766
- ```bash
767
- b64=$(base64 -i /tmp/claude-plans/<taskId>-plan.md)
768
- ```
769
-
770
- On macOS `base64 -i <file>` outputs without line-wrapping (which is what the Linear MCP expects). If you ever switch to GNU coreutils, pipe through `tr -d '\n'` to strip wraps.
771
-
772
- #### 9a.3 — Create the Linear attachment
773
-
774
- Call `mcp__linear__create_attachment` with:
775
-
776
- - `issue`: the task or subtask ID (e.g. `MOB-123`)
777
- - `filename`: `plan.md`
778
- - `contentType`: `text/markdown`
779
- - `title`: `plan.md` (exact — used for detection in Step 3 and by `/impl`)
780
- - `subtitle`: `Plan wygenerowany przez Claude Code`
781
- - `base64Content`: the base64 string from 9a.2
782
-
783
- Linear stores the file on its own infrastructure and surfaces it in the issue's Attachments pane.
784
-
785
- #### 9a.4 — Clean up local file
786
-
787
- Delete `/tmp/claude-plans/<taskId>-plan.md` after the attachment is created successfully. `/push` leaves Linear attachments in place — they stay on the issue as permanent artifacts.
788
-
789
- #### Scope rule
790
-
791
- - If the parent task has **no subtasks** → create one `plan.md` attachment on the parent task.
792
- - If the parent task **has subtasks** → create a `plan.md` attachment on **each subtask** that needs planning. Do NOT create a `plan.md` on the parent task.
793
-
794
- ### Step 9b: Add "AI Plan" Label
795
-
796
- After all plan attachments are saved, apply the `AI Plan` label to the **invoked issue** — i.e. the exact `linearTaskId` passed to `/plan`:
797
-
798
- - `/plan MOB-123` (parent) → label goes on `MOB-123`. Subtasks receive `plan.md` attachments but no label.
799
- - `/plan MOB-123-1` (subtask) → label goes on `MOB-123-1` directly. Do NOT touch the parent.
800
-
801
- **`AI Plan` is a workspace-level (organization-wide) label that already exists in this Linear workspace** — it must NOT be created. Do not call `create_issue_label`.
802
-
803
- Steps:
804
-
805
- 1. **Locate the label**:
806
-
807
- - Use `mcp__linear__list_issue_labels` (no team filter, or workspace-wide scope) to find the label named exactly `AI Plan`.
808
- - If for any reason the label cannot be located (rate limit, unexpected API response), surface the error and stop the labeling step — do NOT create a team-scoped duplicate.
809
-
810
- 2. **Apply to the invoked issue**:
811
-
812
- - Use `mcp__linear__save_issue({ id: invokedTaskId, labelIds: [...existingLabelIds, aiPlanLabelId] })`.
813
- - Preserve existing labels — do NOT replace them. Fetch current labels first if needed and concatenate.
814
- - If the label is already on the issue, skip the update.
815
-
816
- 3. **Failure handling**: if label lookup/apply fails, surface the error but do not roll back the plan attachment. The plan is the primary deliverable; the label is a marker.
817
-
818
- ### Step 10: Confirm to User
819
-
820
- After successfully saving the plans, confirm to the user:
821
-
822
- - List all tasks/subtasks where `plan.md` was attached (include Linear attachment URL)
823
- - Show a summary of each plan
824
- - Confirm that `AI Plan` label was added to the parent task
825
- - Provide Linear task links
826
- - Mention any important considerations or questions
827
-
828
- ## Guidelines
829
-
830
- 1. **Write plans in Polish**: All implementation plans must be written in Polish language
831
- 2. **Be thorough but concise**: Include all necessary details without being verbose
832
- 3. **Be specific**: Reference actual file paths and code patterns found in the codebase
833
- 4. **Consider edge cases**: Think about error handling, validation, and edge cases
834
- 5. **Follow project conventions**: Ensure the plan aligns with project architecture and patterns
835
- 6. **Identify dependencies**: Note if any tasks depend on others or external factors
836
- 7. **Ask for clarification**: If requirements are unclear, use `AskUserQuestion` before creating the plan
837
- 8. **Track progress accurately**: Clearly distinguish between completed, in-progress, and remaining work
838
- 9. **Reference commits**: Always include commit hashes when mentioning previous work
839
- 10. **Keep subtask plans focused**: Each subtask plan should only cover that subtask's scope
840
- 11. **Identify cross-subtask dependencies**: Note which subtasks depend on or block others
841
- 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
842
- 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`'s `updatedAt`). Don't regenerate plans unnecessarily.
843
- 14. **Mtime rule is authoritative**: Regeneration is driven by comparing `plan.md` attachment `updatedAt` against comment `createdAt`. Keyword detection in comments is only a secondary hint that triggers an explicit user confirmation — never a silent regen.
844
- 15. **Delete old plans cleanly**: When replacing, ask the user to confirm, then delete the old Linear attachment via `mcp__linear__delete_attachment`. Record attachment IDs during Step 3a for use in Step 9.
845
- 16. **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.
846
-
847
- ## Example with Subtasks
848
-
849
- For Linear task "ENG-456: User profile improvements" with subtasks:
850
-
851
- - ENG-456-1: Add avatar upload
852
- - ENG-456-2: Add profile bio field
853
- - ENG-456-3: Add social links section
854
-
855
- **Attachment `plan.md` saved on ENG-456-1:**
856
-
857
- ```markdown
858
- ## Implementation Plan for Subtask
859
-
860
- **Parent Task**: ENG-456 - User profile improvements
861
-
862
- ### Subtask Summary
863
-
864
- Add avatar upload functionality to user profile, allowing users to upload and display profile pictures.
865
-
866
- ### Already Completed
867
-
868
- - `a1b2c3d` - feat(shared-angular): add file upload base component
869
-
870
- **Files modified:**
871
-
872
- - `libs/shared/angular/src/lib/components/file-upload/file-upload.component.ts`
873
-
874
- ### Currently In Progress
875
-
876
- None
877
-
878
- ### Remaining Work
879
-
880
- - [ ] Integrate file-upload into user profile
881
- - [ ] Add avatar display with fallback
882
- - [ ] Connect to storage API
883
-
884
- ### Technical Analysis
885
-
886
- - File upload component already exists and can be reused
887
- - Need to add avatar-specific validation (image types, dimensions)
888
-
889
- ### Implementation Steps
890
-
891
- 1. Add avatar upload section to profile form
892
- 2. Implement image preview before upload
893
- 3. Connect to avatar storage endpoint
894
- 4. Add avatar display component
895
-
896
- ### Files to Modify
897
-
898
- - `libs/shared/angular/src/lib/components/user-profile/user-profile.component.ts`
899
-
900
- ### New Files
901
-
902
- - `libs/shared/angular/src/lib/components/avatar-display/avatar-display.component.ts`
903
-
904
- ### External Library Changes (separate process)
905
-
906
- **@smartsoft001-mobilems (repo: ../mobilems-framework)**
907
-
908
- - [ ] `packages/angular` - Add `SmartAvatarComponent` with image cropping support
909
-
910
- > **Note**: These changes are NOT part of this subtask. Separate process required.
911
-
912
- ### Dependencies
913
-
914
- - **Depends on**: None (but blocked by library changes above)
915
- - **Blocks**: None
916
-
917
- ### Testing Strategy
918
-
919
- - [ ] Unit tests for avatar upload integration
920
- - [ ] E2E test for upload flow
921
-
922
- ### Estimated Complexity
923
-
924
- Medium
925
-
926
- ---
927
-
928
- _Plan generated by Claude Code_
929
- ```
930
-
931
- **Attachment `plan.md` saved on ENG-456-2:**
932
-
933
- ```markdown
934
- ## Implementation Plan for Subtask
935
-
936
- **Parent Task**: ENG-456 - User profile improvements
937
-
938
- ### Subtask Summary
939
-
940
- Add a bio/description field to the user profile allowing users to write about themselves.
941
-
942
- ### Already Completed
943
-
944
- None
945
-
946
- ### Currently In Progress
947
-
948
- None
949
-
950
- ### Remaining Work
951
-
952
- - [ ] Add bio field to user model
953
- - [ ] Add textarea to profile form
954
- - [ ] Implement character limit validation
955
-
956
- ### Technical Analysis
957
-
958
- - User model at `libs/shared/angular/src/lib/models/user.model.ts`
959
- - Profile form uses reactive forms pattern
960
-
961
- ### Implementation Steps
962
-
963
- 1. Add `bio` field to user model
964
- 2. Add textarea with character counter to profile form
965
- 3. Update user service to handle bio field
966
-
967
- ### Files to Modify
968
-
969
- - `libs/shared/angular/src/lib/models/user.model.ts`
970
- - `libs/shared/angular/src/lib/components/user-profile/user-profile.component.ts`
971
- - `libs/shared/angular/src/lib/services/user.service.ts`
972
-
973
- ### New Files
974
-
975
- None
976
-
977
- ### Dependencies
978
-
979
- - **Depends on**: None
980
- - **Blocks**: None
981
-
982
- ### Testing Strategy
983
-
984
- - [ ] Unit test for bio validation
985
- - [ ] E2E test for bio save flow
986
-
987
- ### Estimated Complexity
988
-
989
- Low
990
-
991
- ---
992
-
993
- _Plan generated by Claude Code_
994
- ```
995
-
996
- ---
997
-
998
- **Important**:
999
-
1000
- - **Default mode**: Before saving the plans as attachments, show them to the user for review and approval.
1001
- - **`--auto` mode**: Skip the review step; proceed directly to saving the attachments.
1002
-
1003
- 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.