@smartsoft001-mobilems/claude-plugins 2.85.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 (132) hide show
  1. package/.claude-plugin/marketplace.json +2 -6
  2. package/package.json +2 -2
  3. package/plugins/mobilems/.claude-plugin/README.md +30 -0
  4. package/plugins/mobilems/.claude-plugin/plugin.json +5 -0
  5. package/plugins/mobilems/scripts/refresh-mobilems-api-spec.sh +372 -0
  6. package/plugins/mobilems/skills/mobilems-docs-reader/SKILL.md +116 -0
  7. package/plugins/flow/.claude-plugin/README.md +0 -91
  8. package/plugins/flow/.claude-plugin/merge-permissions.js +0 -97
  9. package/plugins/flow/.claude-plugin/plugin.json +0 -5
  10. package/plugins/flow/.claude-plugin/settings.template.json +0 -86
  11. package/plugins/flow/agents/angular-component-scaffolder.md +0 -175
  12. package/plugins/flow/agents/angular-directive-builder.md +0 -153
  13. package/plugins/flow/agents/angular-guard-builder.md +0 -243
  14. package/plugins/flow/agents/angular-jest-test-writer.md +0 -474
  15. package/plugins/flow/agents/angular-pipe-builder.md +0 -169
  16. package/plugins/flow/agents/angular-resolver-builder.md +0 -286
  17. package/plugins/flow/agents/angular-service-builder.md +0 -161
  18. package/plugins/flow/agents/angular-signal-state-builder.md +0 -339
  19. package/plugins/flow/agents/angular-test-diagnostician.md +0 -279
  20. package/plugins/flow/agents/angular-testbed-configurator.md +0 -315
  21. package/plugins/flow/agents/arch-scaffolder.md +0 -278
  22. package/plugins/flow/agents/e2e-data-testid-injector.md +0 -197
  23. package/plugins/flow/agents/e2e-project-scaffolder.md +0 -194
  24. package/plugins/flow/agents/e2e-test-writer.md +0 -350
  25. package/plugins/flow/agents/shared-agent-evolver.md +0 -294
  26. package/plugins/flow/agents/shared-build-verifier.md +0 -160
  27. package/plugins/flow/agents/shared-config-updater.md +0 -310
  28. package/plugins/flow/agents/shared-coverage-enforcer.md +0 -184
  29. package/plugins/flow/agents/shared-error-handler.md +0 -217
  30. package/plugins/flow/agents/shared-file-creator.md +0 -344
  31. package/plugins/flow/agents/shared-impl-orchestrator.md +0 -312
  32. package/plugins/flow/agents/shared-impl-reporter.md +0 -368
  33. package/plugins/flow/agents/shared-impl-teammate.md +0 -201
  34. package/plugins/flow/agents/shared-linear-subtask-iterator.md +0 -337
  35. package/plugins/flow/agents/shared-logic-implementer.md +0 -243
  36. package/plugins/flow/agents/shared-maia-api.md +0 -26
  37. package/plugins/flow/agents/shared-parallelization-analyzer.md +0 -343
  38. package/plugins/flow/agents/shared-performance-validator.md +0 -168
  39. package/plugins/flow/agents/shared-plan-perspective.md +0 -269
  40. package/plugins/flow/agents/shared-project-standardizer.md +0 -205
  41. package/plugins/flow/agents/shared-report-synthesizer.md +0 -188
  42. package/plugins/flow/agents/shared-review-teammate.md +0 -189
  43. package/plugins/flow/agents/shared-security-scanner.md +0 -186
  44. package/plugins/flow/agents/shared-style-enforcer.md +0 -230
  45. package/plugins/flow/agents/shared-subtask-dependency-analyzer.md +0 -188
  46. package/plugins/flow/agents/shared-tdd-developer.md +0 -350
  47. package/plugins/flow/agents/shared-team-coordinator.md +0 -189
  48. package/plugins/flow/agents/shared-test-fixer.md +0 -186
  49. package/plugins/flow/agents/shared-test-runner.md +0 -191
  50. package/plugins/flow/agents/shared-ui-classifier.md +0 -263
  51. package/plugins/flow/agents/shared-verification-orchestrator.md +0 -194
  52. package/plugins/flow/agents/shared-verification-runner.md +0 -140
  53. package/plugins/flow/agents/ui-a11y-validator.md +0 -305
  54. package/plugins/flow/agents/ui-screenshot-reporter.md +0 -329
  55. package/plugins/flow/agents/ui-web-designer.md +0 -214
  56. package/plugins/flow/scripts/compute-session-tokens.sh +0 -39
  57. package/plugins/flow/skills/a11y-audit/SKILL.md +0 -214
  58. package/plugins/flow/skills/angular-patterns/SKILL.md +0 -191
  59. package/plugins/flow/skills/browser-capture/SKILL.md +0 -238
  60. package/plugins/flow/skills/commit/SKILL.md +0 -259
  61. package/plugins/flow/skills/debug-helper/SKILL.md +0 -375
  62. package/plugins/flow/skills/impl/SKILL.md +0 -992
  63. package/plugins/flow/skills/linear-suggestion/SKILL.md +0 -132
  64. package/plugins/flow/skills/maia-files-delete/SKILL.md +0 -59
  65. package/plugins/flow/skills/maia-files-upload/SKILL.md +0 -57
  66. package/plugins/flow/skills/nx-conventions/SKILL.md +0 -326
  67. package/plugins/flow/skills/plan/SKILL.md +0 -1033
  68. package/plugins/flow/skills/push/SKILL.md +0 -759
  69. package/plugins/flow/skills/review/SKILL.md +0 -443
  70. package/plugins/flow/skills/test-e2e/SKILL.md +0 -161
  71. package/plugins/flow/skills/test-unit/SKILL.md +0 -456
  72. package/plugins/flow-external/.claude-plugin/README.md +0 -152
  73. package/plugins/flow-external/.claude-plugin/merge-permissions.js +0 -80
  74. package/plugins/flow-external/.claude-plugin/plugin.json +0 -5
  75. package/plugins/flow-external/.claude-plugin/settings.template.json +0 -78
  76. package/plugins/flow-external/agents/angular-component-scaffolder.md +0 -269
  77. package/plugins/flow-external/agents/angular-directive-builder.md +0 -130
  78. package/plugins/flow-external/agents/angular-guard-builder.md +0 -70
  79. package/plugins/flow-external/agents/angular-pipe-builder.md +0 -82
  80. package/plugins/flow-external/agents/angular-resolver-builder.md +0 -74
  81. package/plugins/flow-external/agents/angular-service-builder.md +0 -160
  82. package/plugins/flow-external/agents/angular-state-builder.md +0 -254
  83. package/plugins/flow-external/agents/shared-build-verifier.md +0 -67
  84. package/plugins/flow-external/agents/shared-impl-orchestrator.md +0 -88
  85. package/plugins/flow-external/agents/shared-impl-reporter.md +0 -135
  86. package/plugins/flow-external/agents/shared-linear-subtask-iterator.md +0 -70
  87. package/plugins/flow-external/agents/shared-ui-classifier.md +0 -38
  88. package/plugins/flow-external/agents/ui-web-designer.md +0 -179
  89. package/plugins/flow-external/scripts/compute-session-tokens.sh +0 -39
  90. package/plugins/flow-external/skills/a11y-audit/SKILL.md +0 -96
  91. package/plugins/flow-external/skills/angular-cli-conventions/SKILL.md +0 -267
  92. package/plugins/flow-external/skills/angular-patterns/SKILL.md +0 -170
  93. package/plugins/flow-external/skills/browser-capture/SKILL.md +0 -68
  94. package/plugins/flow-external/skills/commit/SKILL.md +0 -114
  95. package/plugins/flow-external/skills/debug-helper/SKILL.md +0 -131
  96. package/plugins/flow-external/skills/impl/SKILL.md +0 -217
  97. package/plugins/flow-external/skills/linear-suggestion/SKILL.md +0 -62
  98. package/plugins/flow-external/skills/maia-files-delete/SKILL.md +0 -34
  99. package/plugins/flow-external/skills/maia-files-upload/SKILL.md +0 -41
  100. package/plugins/flow-external/skills/plan/SKILL.md +0 -334
  101. package/plugins/flow-external/skills/push/SKILL.md +0 -232
  102. package/plugins/flow-legacy/.claude-plugin/README.md +0 -143
  103. package/plugins/flow-legacy/.claude-plugin/merge-permissions.js +0 -94
  104. package/plugins/flow-legacy/.claude-plugin/plugin.json +0 -5
  105. package/plugins/flow-legacy/.claude-plugin/settings.template.json +0 -79
  106. package/plugins/flow-legacy/agents/angular-component-scaffolder.md +0 -323
  107. package/plugins/flow-legacy/agents/angular-directive-builder.md +0 -258
  108. package/plugins/flow-legacy/agents/angular-guard-builder.md +0 -322
  109. package/plugins/flow-legacy/agents/angular-pipe-builder.md +0 -227
  110. package/plugins/flow-legacy/agents/angular-resolver-builder.md +0 -332
  111. package/plugins/flow-legacy/agents/angular-service-builder.md +0 -271
  112. package/plugins/flow-legacy/agents/angular-state-builder.md +0 -479
  113. package/plugins/flow-legacy/agents/shared-impl-orchestrator.md +0 -174
  114. package/plugins/flow-legacy/agents/shared-impl-reporter.md +0 -232
  115. package/plugins/flow-legacy/agents/shared-linear-subtask-iterator.md +0 -187
  116. package/plugins/flow-legacy/agents/shared-tdd-developer.md +0 -306
  117. package/plugins/flow-legacy/agents/shared-test-runner.md +0 -131
  118. package/plugins/flow-legacy/agents/shared-ui-classifier.md +0 -145
  119. package/plugins/flow-legacy/scripts/compute-session-tokens.sh +0 -39
  120. package/plugins/flow-legacy/skills/a11y-audit/SKILL.md +0 -214
  121. package/plugins/flow-legacy/skills/angular-patterns/SKILL.md +0 -346
  122. package/plugins/flow-legacy/skills/browser-capture/SKILL.md +0 -238
  123. package/plugins/flow-legacy/skills/commit/SKILL.md +0 -215
  124. package/plugins/flow-legacy/skills/debug-helper/SKILL.md +0 -395
  125. package/plugins/flow-legacy/skills/impl/SKILL.md +0 -710
  126. package/plugins/flow-legacy/skills/linear-suggestion/SKILL.md +0 -132
  127. package/plugins/flow-legacy/skills/maia-files-delete/SKILL.md +0 -59
  128. package/plugins/flow-legacy/skills/maia-files-upload/SKILL.md +0 -57
  129. package/plugins/flow-legacy/skills/nx-conventions/SKILL.md +0 -368
  130. package/plugins/flow-legacy/skills/plan/SKILL.md +0 -742
  131. package/plugins/flow-legacy/skills/push/SKILL.md +0 -645
  132. package/plugins/flow-legacy/skills/test-unit/SKILL.md +0 -500
@@ -1,62 +0,0 @@
1
- ---
2
- name: linear-suggestion
3
- description: Create a Linear issue in the "MobileMS Framework" project with a suggestion for agent or skill improvements.
4
- allowed-tools: mcp__linear__save_issue
5
- ---
6
-
7
- # Linear Suggestion
8
-
9
- Create a Linear issue in the **MobileMS Framework** project containing a suggestion for improving agent definitions or skills.
10
-
11
- ## When to Use
12
-
13
- - When an automated agent identifies a recurring pattern that could improve an agent or skill
14
- - When proposing orchestrator rule changes
15
- - When any non-interactive process needs to suggest framework improvements
16
-
17
- ## Input Parameters
18
-
19
- | Parameter | Required | Description |
20
- | ------------- | -------- | --------------------------------------------------------------- |
21
- | `title` | YES | Short summary (max 100 chars) |
22
- | `description` | YES | Full markdown description with rationale |
23
- | `source` | YES | Agent that generated the suggestion |
24
- | `targetFile` | NO | Path to the file to be modified |
25
- | `category` | NO | One of: `OPTIMIZATION`, `NEW_RULE`, `PATTERN_UPDATE`, `BUG_FIX` |
26
-
27
- ## Issue Format
28
-
29
- ### Title
30
-
31
- ```
32
- [Agent Suggestion] {title}
33
- ```
34
-
35
- ### Description
36
-
37
- ```markdown
38
- ## Agent Improvement Suggestion
39
-
40
- **Source agent**: `{source}`
41
- **Category**: {category}
42
- **Target file**: `{targetFile}`
43
-
44
- ---
45
-
46
- {description}
47
-
48
- ---
49
-
50
- _This issue was automatically created by `{source}` via the `linear-suggestion` skill._
51
- ```
52
-
53
- ## Process
54
-
55
- 1. Format the issue title with `[Agent Suggestion]` prefix
56
- 2. Build the description using the template
57
- 3. Create the issue using MCP Linear server
58
- 4. Return the issue ID and URL
59
-
60
- ## Error Handling
61
-
62
- If creation fails, log error silently and do NOT block the parent workflow.
@@ -1,34 +0,0 @@
1
- ---
2
- name: maia-files-delete
3
- description: Delete a file from Maia API temporary storage.
4
- allowed-tools: Bash
5
- ---
6
-
7
- # Maia Files Delete
8
-
9
- Delete a file from Maia AI API temporary storage.
10
-
11
- ## API Endpoint
12
-
13
- ```
14
- DELETE https://maia-ai-api.smartsoft.biz.pl/files/{id}
15
- ```
16
-
17
- ## Usage
18
-
19
- ```bash
20
- curl -s -X DELETE https://maia-ai-api.smartsoft.biz.pl/files/{id}
21
- ```
22
-
23
- ## Batch Deletion
24
-
25
- ```bash
26
- for id in id1 id2 id3; do
27
- curl -s -X DELETE "https://maia-ai-api.smartsoft.biz.pl/files/$id"
28
- echo "Deleted: $id"
29
- done
30
- ```
31
-
32
- ## Error Handling
33
-
34
- If deletion fails, report error but continue with remaining files.
@@ -1,41 +0,0 @@
1
- ---
2
- name: maia-files-upload
3
- description: Upload a file to Maia API temporary storage.
4
- allowed-tools: Bash
5
- ---
6
-
7
- # Maia Files Upload
8
-
9
- Upload a file to Maia AI API temporary storage.
10
-
11
- ## API Endpoint
12
-
13
- ```
14
- POST https://maia-ai-api.smartsoft.biz.pl/files
15
- ```
16
-
17
- ## Usage
18
-
19
- ```bash
20
- curl -s -X POST https://maia-ai-api.smartsoft.biz.pl/files \
21
- -F "file=@/path/to/file.png"
22
- ```
23
-
24
- ## Response
25
-
26
- ```json
27
- { "id": "abc123def456" }
28
- ```
29
-
30
- ## Result URL
31
-
32
- ```
33
- https://maia-ai-api.smartsoft.biz.pl/files/{id}
34
- ```
35
-
36
- ## Process
37
-
38
- 1. Validate file exists
39
- 2. Upload file using curl
40
- 3. Extract ID from response
41
- 4. Return ID and full URL
@@ -1,334 +0,0 @@
1
- ---
2
- name: plan
3
- description: Create implementation plan and save it as a `plan.md` attachment on the Linear issue. Analyzes codebase, understands task requirements, and generates structured plan.
4
- allowed-tools:
5
- - Bash
6
- - Read
7
- - Write
8
- - Glob
9
- - Grep
10
- - AskUserQuestion
11
- - mcp__linear__get_issue
12
- - mcp__linear__list_issues
13
- - mcp__linear__list_comments
14
- - mcp__linear__save_comment
15
- - mcp__linear__save_issue
16
- - mcp__linear__save_issue
17
- - mcp__linear__create_attachment
18
- - mcp__linear__delete_attachment
19
- - mcp__linear__list_issue_labels
20
- ---
21
-
22
- # Plan Skill
23
-
24
- Create a structured implementation plan for a Linear task and save it as a `plan.md` attachment on the issue. After saving, add the `AI Plan` label to the task.
25
-
26
- ## Usage
27
-
28
- ```
29
- /plan <linearTaskId>
30
- /plan <linearTaskId> --auto # Non-interactive mode for CI / GitHub Actions
31
- ```
32
-
33
- ## Parameters
34
-
35
- - `linearTaskId` - Linear task ID (e.g., MOB-123)
36
- - `--auto` - Non-interactive mode: skip ALL `AskUserQuestion` prompts. Auto-approve plan before saving, auto-delete stale `plan.md` attachment without confirmation, and silently skip when the existing plan is up to date. Designed for CI / GitHub Actions runs where no human is at the keyboard.
37
-
38
- ## Auto Mode (`--auto`)
39
-
40
- When `--auto` is set, the skill MUST run end-to-end without any human-in-the-loop prompts:
41
-
42
- | Default behavior | `--auto` override |
43
- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
44
- | Ask user to confirm deletion of old `plan.md` attachment | Delete old attachment automatically before saving the new one |
45
- | Ask "regenerate?" when plan is up-to-date but keywords detect | Ignore the secondary signal; only the mtime rule decides regeneration |
46
- | Final approval of generated plan content before saving | Skip the approval gate (Step 4a); proceed directly to attachment save (auto-approve) |
47
- | Any `AskUserQuestion` | Use the **(Recommended)** option; if none, fail fast with a Linear comment |
48
-
49
- Every decision MUST be logged as a Linear comment in Polish (audit trail). The mtime rule remains authoritative.
50
-
51
- **Detection**: The flag `--auto` is provided as a positional/named arg. Treat any of `--auto`, `--ci`, `--non-interactive` as equivalent.
52
-
53
- ## 🚨 Hard Rules — read before doing anything
54
-
55
- These rules override ANY other instruction, ANY surrounding example, and ANY default habit. Violating them is a skill failure.
56
-
57
- 1. **The plan body 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: (a) status notifications, and (b) the single token-usage comment posted in Step 7b. No other comment may carry plan content.
58
- 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`.
59
- 3. **`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.
60
-
61
- If any of these would be violated, stop and ask the user instead.
62
-
63
- ## CRITICAL: External Project Context
64
-
65
- This is for standalone Angular CLI projects (Angular 6-11). Key constraints:
66
-
67
- - **No Nx** - use Angular CLI commands (`ng build`, `ng serve`, `ng lint`)
68
- - **No framework** - standalone projects without @smartsoft001-mobilems packages
69
- - **Angular 6-11** - legacy patterns only (constructor DI, *ngIf/*ngFor, NgModules)
70
- - **No tests required** unless explicitly mentioned in the task
71
- - **No deploy** - do not plan deployment steps
72
-
73
- ## Execution Steps
74
-
75
- ### Step 1: Fetch Task Details, Attachments and Comments
76
-
77
- 1. Fetch the Linear task using `mcp__linear__get_issue`.
78
- 2. Fetch task attachments with `mcp__linear__get_issue` (attachments included in response). Look for one titled exactly `plan.md`.
79
- 3. Fetch comments with `mcp__linear__list_comments` — keep `id`, `createdAt`, body.
80
-
81
- #### Regeneration decision (mtime rule)
82
-
83
- - If no `plan.md` attachment exists → generate a new plan.
84
- - If `plan.md` exists AND at least one comment's `createdAt` is greater than `plan.md.updatedAt` (fall back to `createdAt`) → regenerate (the comment is treated as feedback on the plan).
85
- - Otherwise skip — the plan is still fresh.
86
-
87
- Secondary signal: if `plan.md` is fresh but the user's latest prompt uses plan-change keywords ("zmień plan", "zaktualizuj plan", "popraw plan", etc.), ask explicitly before regenerating.
88
-
89
- When regenerating, record the old `plan.md` attachment ID so it can be deleted via `mcp__linear__delete_attachment` before the new one is created.
90
-
91
- ### Step 2: Analyze Codebase
92
-
93
- Understand the project structure:
94
-
95
- ```bash
96
- # Detect project layout
97
- ls angular.json 2>/dev/null && echo "ROOT_ANGULAR" || echo "CHECK_APP_DIR"
98
- ls app/angular.json 2>/dev/null && echo "APP_DIR_ANGULAR"
99
-
100
- # Check Angular version
101
- cat package.json | grep '"@angular/core"' 2>/dev/null
102
- cat app/package.json | grep '"@angular/core"' 2>/dev/null
103
-
104
- # Check CSS framework
105
- cat package.json | grep -E '"bootstrap|tailwind"' 2>/dev/null
106
- cat app/package.json | grep -E '"bootstrap|tailwind"' 2>/dev/null
107
-
108
- # Understand project structure
109
- ls -la src/app/ 2>/dev/null || ls -la app/src/app/ 2>/dev/null
110
- ```
111
-
112
- ### Step 3: Identify Affected Areas
113
-
114
- Based on the task:
115
-
116
- 1. Find relevant existing files
117
- 2. Identify what needs to be created vs modified
118
- 3. Check for existing patterns to follow
119
- 4. Identify NgModules that need updating
120
-
121
- ### Step 4: Create Implementation Plan
122
-
123
- Structure the plan as follows:
124
-
125
- ```markdown
126
- ## Plan Implementacji
127
-
128
- ### Zadanie: [Task ID] - [Task Title]
129
-
130
- ### Analiza
131
-
132
- [Brief analysis of what needs to be done and why]
133
-
134
- ### Struktura Projektu
135
-
136
- - Angular: [version]
137
- - CSS: [Bootstrap 4 / custom SCSS / other]
138
- - Struktura: [app/src/ or src/]
139
-
140
- ### Kroki Implementacji
141
-
142
- #### Krok 1: [Description]
143
-
144
- **Pliki do zmiany:**
145
-
146
- | Plik | Akcja | Opis |
147
- | ------------------------------------------- | ----------- | ------------------ |
148
- | `src/app/components/feature.component.ts` | Nowy | Komponent widoku |
149
- | `src/app/components/feature.component.html` | Nowy | Szablon |
150
- | `src/app/components/feature.component.scss` | Nowy | Style |
151
- | `src/app/feature.module.ts` | Modyfikacja | Dodanie deklaracji |
152
-
153
- **Wzorce:**
154
-
155
- - Constructor DI
156
- - *ngIf/*ngFor
157
- - [CSS approach from project]
158
-
159
- #### Krok 2: [Description]
160
-
161
- ...
162
-
163
- ### Weryfikacja
164
-
165
- - [ ] `ng build --prod` przechodzi bez bledow
166
- - [ ] Funkcjonalnosc dziala zgodnie z opisem zadania
167
-
168
- ### Podzadania
169
-
170
- | ID | Tytul | Priorytet | Krok |
171
- | --- | ----------- | --------- | ---- |
172
- | - | [Subtask 1] | High | 1 |
173
- | - | [Subtask 2] | Medium | 2 |
174
- ```
175
-
176
- ### Step 4a: User Approval of Generated Plan
177
-
178
- **MANDATORY.** Before any Linear write (subtask creation, attachment delete, attachment create, label apply), the user MUST approve the generated plan content. This is the gate FRA-126 added.
179
-
180
- **`--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 5.
181
-
182
- **Default mode** (interactive):
183
-
184
- 1. **Render the full plan in chat.** Print the markdown produced in Step 4. The `AskUserQuestion` option labels alone do not give the user enough context — the full text must be visible above the prompt.
185
-
186
- 2. **Ask for approval** via `AskUserQuestion`:
187
-
188
- ```markdown
189
- ## Akceptacja planu
190
-
191
- Powyżej znajduje się wygenerowany plan dla zadania <linearTaskId>.
192
- Czy akceptujesz plan i mogę zapisać go jako załącznik `plan.md` w Linear?
193
- ```
194
-
195
- Options:
196
-
197
- - **"Tak, zapisz plan do Linear"** _(Recommended)_ — user accepts. Proceed to Step 5 (create subtasks if needed) and Step 6 (save attachment).
198
- - **"Wygeneruj plan ponownie"** — user wants a different plan. Go to step 3 (regeneration loop) below.
199
- - **"Anuluj"** — user rejects. Stop the whole skill. Do NOT create subtasks. 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.
200
-
201
- 3. **Regeneration branch**: if the user chose "Wygeneruj plan ponownie":
202
-
203
- - 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.
204
- - Loop back to **Step 4 (Create Implementation Plan)** with the user's feedback in mind. Do NOT re-run Steps 1–3 — the Linear task, comments, and codebase analysis have not changed.
205
- - On the regenerated plan, return to **Step 4a step 1** (render + ask again).
206
- - **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.
207
-
208
- 4. **State invariant on entry to Step 5**: the only path that reaches Step 5 is the explicit "Tak, zapisz plan do Linear" choice (or `--auto`). Treat plan content as final.
209
-
210
- ### Step 5: Create Subtasks (if needed)
211
-
212
- For complex tasks, create subtasks in Linear:
213
-
214
- - Use `mcp__linear__save_issue` with parent task ID
215
- - Each subtask should map to a plan step
216
-
217
- ### Step 6: Save Plan as Native Linear Attachment
218
-
219
- **⛔ 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.** (Token usage is posted via `save_comment` in Step 7b — that's the one allowed exception.)
220
-
221
- Upload the plan directly to Linear via `mcp__linear__create_attachment` — Linear hosts the file itself, no external storage needed.
222
-
223
- #### 6.1 — If replacing an existing plan, confirm with user
224
-
225
- If a `plan.md` attachment is being replaced:
226
-
227
- - **Default mode**: ask the user via `AskUserQuestion`:
228
-
229
- - "Tak, usuń stary plan i zapisz nowy" (Recommended)
230
- - "Anuluj"
231
-
232
- If confirmed, delete the Linear attachment via `mcp__linear__delete_attachment({ id: oldAttachmentId })`.
233
-
234
- - **`--auto` mode**: skip the prompt; delete the old Linear attachment via `mcp__linear__delete_attachment({ id: oldAttachmentId })` automatically and proceed.
235
-
236
- #### 6.2 — Write `plan.md` locally
237
-
238
- The plan content is exactly the markdown produced in Step 4. Write it to the temp file:
239
-
240
- ```bash
241
- mkdir -p /tmp/claude-plans
242
- ```
243
-
244
- Use `Write` to save the plan content to `/tmp/claude-plans/<taskId>-plan.md`.
245
-
246
- #### 6.3 — Base64-encode
247
-
248
- ```bash
249
- b64=$(base64 -i /tmp/claude-plans/<taskId>-plan.md)
250
- ```
251
-
252
- #### 6.4 — Create Linear attachment
253
-
254
- Call `mcp__linear__create_attachment` with:
255
-
256
- - `issue`: the task ID
257
- - `filename`: `plan.md`
258
- - `contentType`: `text/markdown`
259
- - `title`: `plan.md` (exact — required for detection)
260
- - `subtitle`: `Plan wygenerowany przez Claude Code (external)`
261
- - `base64Content`: the base64 string from 6.3
262
-
263
- #### 6.5 — Clean up local file
264
-
265
- Delete `/tmp/claude-plans/<taskId>-plan.md` after the attachment is created. `/push` leaves the Linear attachment in place.
266
-
267
- ### Step 7: Add "AI Plan" Label
268
-
269
- **`AI Plan` is a workspace-level (organization-wide) label that already exists** — do NOT create it.
270
-
271
- 1. Look up the `AI Plan` label via `mcp__linear__list_issue_labels` (workspace-wide). If not found, surface the error — do NOT create a team-scoped duplicate.
272
- 2. Apply via `mcp__linear__save_issue({ id: taskId, labelIds: [...existingLabelIds, aiPlanLabelId] })`. Preserve existing labels; skip if already present.
273
- 3. If label operations fail, surface the error but do not roll back the plan attachment.
274
-
275
- ### Step 7b: Post Token-Usage Comment
276
-
277
- After the plan attachment and `AI Plan` label have been applied, post a single Linear comment on the **invoked issue** (the `linearTaskId` passed to `/plan`, identical to the labelling target) reporting the session's token usage.
278
-
279
- 1. Run the per-plugin token-summing script:
280
-
281
- ```bash
282
- bash "$CLAUDE_PLUGIN_ROOT/scripts/compute-session-tokens.sh"
283
- ```
284
-
285
- The script prints four whitespace-separated integers on one line: `<input> <output> <cache_creation> <cache_read>`. If no transcript can be located it prints `0 0 0 0` and exits non-zero — treat that as a graceful skip (do NOT block; skip posting the comment).
286
-
287
- 2. Compute `<TOTAL> = <input> + <output> + <cache_creation> + <cache_read>`.
288
-
289
- 3. Call `mcp__linear__save_comment` with `issueId: taskId` and `body` equal to:
290
-
291
- ```markdown
292
- ## Zużycie tokenów — etap /plan
293
-
294
- | Metryka | Wartość |
295
- | -------------- | -------------- |
296
- | Input | <INPUT> |
297
- | Output | <OUTPUT> |
298
- | Cache creation | <CACHE_CREATE> |
299
- | Cache read | <CACHE_READ> |
300
- | **Łącznie** | **<TOTAL>** |
301
- ```
302
-
303
- 4. **Failure handling**: if the comment fails to post, surface the error to the user but do not roll back the plan attachment or the label.
304
-
305
- ### Step 8: Confirm to User
306
-
307
- The plan has been approved in Step 4a (or auto-approved in `--auto`). Step 8 is purely informational — **do NOT ask another question here**, just print the status.
308
-
309
- **Default mode**:
310
-
311
- ```markdown
312
- ## Plan zapisany
313
-
314
- Plan implementacji został dodany jako załącznik `plan.md` do zadania [linearTaskId].
315
- Etykieta `AI Plan` została dodana.
316
-
317
- Uruchom `/impl [linearTaskId]` aby rozpocząć implementację.
318
- ```
319
-
320
- **`--auto` mode**: post a Linear comment confirming the plan was saved (no question asked) and exit. The comment is the audit trail for the CI run.
321
-
322
- ## Guidelines
323
-
324
- 1. **Always analyze existing code first** before planning
325
- 2. **Follow existing project patterns** - don't introduce new patterns
326
- 3. **Write plan in Polish** (content inside the `plan.md` attachment)
327
- 4. **Keep steps small and focused** - one logical change per step
328
- 5. **Don't plan tests** unless explicitly requested in the task
329
- 6. **Don't plan deployment** steps
330
- 7. **Identify the CSS approach** before planning UI changes
331
- 8. **Include build verification** as the final step (`ng build --prod`)
332
- 9. **Use Angular CLI commands** not Nx commands
333
- 10. **Mtime rule is authoritative**: only regenerate `plan.md` when the attachment is missing or a comment is newer than `plan.md.updatedAt`. Keyword detection triggers an explicit user confirmation only.
334
- 11. **Always add "AI Plan" label** after saving the `plan.md` attachment. The label is workspace-level and pre-configured organization-wide — do NOT create a team-scoped duplicate.
@@ -1,232 +0,0 @@
1
- ---
2
- name: push
3
- description: Push changes to remote repository and update Linear task status. Shows commit summary, updates subtask statuses, and creates PR if on feature branch.
4
- allowed-tools:
5
- - Bash
6
- - Read
7
- - Glob
8
- - Grep
9
- - AskUserQuestion
10
- - mcp__linear__get_issue
11
- - mcp__linear__list_issues
12
- - mcp__linear__list_comments
13
- - mcp__linear__save_comment
14
- - mcp__linear__save_issue
15
- - mcp__linear__list_issue_statuses
16
- ---
17
-
18
- # Push Skill
19
-
20
- Push changes to remote and update Linear task status.
21
-
22
- ## Usage
23
-
24
- ```
25
- /push [linearTaskId]
26
- ```
27
-
28
- ## Parameters
29
-
30
- - `linearTaskId` - Linear task ID (e.g., MOB-123). Optional - will try to detect from branch name.
31
-
32
- ## Execution Steps
33
-
34
- ### Step 1: Check Git Status
35
-
36
- ```bash
37
- git status
38
- git log origin/$(git branch --show-current)..HEAD --oneline
39
- ```
40
-
41
- Check for:
42
-
43
- - Uncommitted changes (warn user)
44
- - Commits ahead of remote (list them)
45
- - Current branch name
46
-
47
- ### Step 2: Detect Linear Task
48
-
49
- If `linearTaskId` not provided, try to extract from branch name:
50
-
51
- - Branch `MOB-123` → task `MOB-123`
52
- - Branch `feature/MOB-123-description` → task `MOB-123`
53
-
54
- ### Step 3: Fetch Task Details
55
-
56
- If Linear task ID is available:
57
-
58
- 1. Fetch parent task details
59
- 2. Fetch subtasks if any
60
- 3. Analyze completion status
61
-
62
- ### Step 4: Show Summary
63
-
64
- ```markdown
65
- ## Push Summary
66
-
67
- **Branch**: `<branch-name>`
68
- **Commits**: X ahead of remote
69
-
70
- ### Commits
71
-
72
- | Hash | Message |
73
- | ------- | ------------------------------ |
74
- | abc1234 | feat(gallery): add lightbox |
75
- | def5678 | fix(gallery): fix image sizing |
76
-
77
- ### Linear Task: [ID] - [Title]
78
-
79
- **Subtasks**:
80
-
81
- - [x] MOB-549: Completed subtask
82
- - [x] MOB-550: Another completed
83
- - [ ] MOB-551: Incomplete (reason)
84
- ```
85
-
86
- ### Step 5: Ask for Confirmation
87
-
88
- ```markdown
89
- Do you want to push and update Linear status to "In Review"?
90
- ```
91
-
92
- Use `AskUserQuestion` with options:
93
-
94
- - "Tak, push i zaktualizuj status"
95
- - "Nie, anuluj"
96
-
97
- ### Step 6: Update Linear Status
98
-
99
- If confirmed:
100
-
101
- 1. Update parent task status to "In Review"
102
- 2. Update completed subtasks to "In Review"
103
- 3. **Before posting**, run the token-summing script and capture its output:
104
-
105
- ```bash
106
- bash "$CLAUDE_PLUGIN_ROOT/scripts/compute-session-tokens.sh"
107
- ```
108
-
109
- It prints four whitespace-separated integers on one line: `<INPUT> <OUTPUT> <CACHE_CREATE> <CACHE_READ>`. If no transcript can be located it prints `0 0 0 0` and exits non-zero — treat that as a graceful skip (still post the comment, with zeros in the table).
110
-
111
- Compute `<TOTAL> = <INPUT> + <OUTPUT> + <CACHE_CREATE> + <CACHE_READ>`. Append exactly one copy of the following Polish block to the bottom of the comment body, after the existing footer. Do not create a second Linear comment — the block belongs in **this** comment.
112
-
113
- ```markdown
114
- ## Zużycie tokenów — etap /push
115
-
116
- | Metryka | Wartość |
117
- | -------------- | -------------- |
118
- | Input | <INPUT> |
119
- | Output | <OUTPUT> |
120
- | Cache creation | <CACHE_CREATE> |
121
- | Cache read | <CACHE_READ> |
122
- | **Łącznie** | **<TOTAL>** |
123
- ```
124
-
125
- 4. Create summary comment on parent task (in Polish):
126
-
127
- ```markdown
128
- ## Podsumowanie Implementacji
129
-
130
- ### Zrealizowane Podzadania
131
-
132
- | Podzadanie | Tytul | Status |
133
- | ---------- | ------- | ------------ |
134
- | MOB-549 | [title] | Zrealizowane |
135
- | MOB-550 | [title] | Zrealizowane |
136
-
137
- ### Niezrealizowane Podzadania
138
-
139
- | Podzadanie | Tytul | Powod |
140
- | ---------- | ------- | -------- |
141
- | MOB-551 | [title] | [reason] |
142
-
143
- ### Commity
144
-
145
- | Commit | Opis |
146
- | ------- | --------------------------- |
147
- | abc1234 | feat(gallery): add lightbox |
148
-
149
- ### Status
150
-
151
- Task przeniesiony do "In Review".
152
-
153
- ---
154
-
155
- _Raport wygenerowany przez Claude Code_
156
- ```
157
-
158
- ### Step 7: Push to Remote
159
-
160
- ```bash
161
- git push
162
- ```
163
-
164
- ### Step 8: Branch-Specific Actions
165
-
166
- #### Feature Branch → Check/Create PR
167
-
168
- If on a feature branch (not `development` or `main`):
169
-
170
- 1. Check if PR exists:
171
-
172
- ```bash
173
- gh pr list --head <branch-name> --base development --json number,title,state,url
174
- ```
175
-
176
- 2. If no PR, ask user:
177
-
178
- ```markdown
179
- ## Create Pull Request?
180
-
181
- Branch `<branch-name>` has no open PR to `development`.
182
- Do you want to create one?
183
- ```
184
-
185
- 3. If confirmed, create PR:
186
- ```bash
187
- gh pr create --base development --head <branch-name> --title "<Linear-ID>: <Task Title>" --body "..."
188
- ```
189
-
190
- #### Development/Main Branch
191
-
192
- Just push and show confirmation.
193
-
194
- ### Step 9: Final Confirmation
195
-
196
- ```markdown
197
- ## Gotowe
198
-
199
- Linear task [linearTaskId] przeniesiony do "In Review"
200
- Zmiany wyslane do `origin/<branch-name>`
201
- ```
202
-
203
- ## Error Handling
204
-
205
- ### Push Rejected
206
-
207
- ```markdown
208
- ## Push Failed
209
-
210
- Updates were rejected. Options:
211
-
212
- 1. `git pull --rebase` then push again
213
- 2. `git pull` and merge
214
- ```
215
-
216
- ### No Commits to Push
217
-
218
- ```markdown
219
- ## Nothing to Push
220
-
221
- Branch is up to date with remote.
222
- ```
223
-
224
- ## Guidelines
225
-
226
- 1. **Write all Linear comments in Polish**
227
- 2. **Always confirm before status change**
228
- 3. **Update Linear BEFORE push**
229
- 4. **Document incomplete subtasks with reasons**
230
- 5. **Offer PR creation on feature branches**
231
- 6. **Do NOT monitor CI/CD pipelines**
232
- 7. **Do NOT verify deployment**