@smartsoft001/pro-claude-plugins 0.2.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 (198) hide show
  1. package/.claude-plugin/marketplace.json +26 -0
  2. package/README.md +56 -0
  3. package/package.json +14 -0
  4. package/plugins/flow/.claude-plugin/README.md +91 -0
  5. package/plugins/flow/.claude-plugin/merge-permissions.js +115 -0
  6. package/plugins/flow/.claude-plugin/plugin.json +5 -0
  7. package/plugins/flow/.claude-plugin/settings.template.json +86 -0
  8. package/plugins/flow/agents/angular-component-scaffolder.md +176 -0
  9. package/plugins/flow/agents/angular-directive-builder.md +154 -0
  10. package/plugins/flow/agents/angular-guard-builder.md +244 -0
  11. package/plugins/flow/agents/angular-jest-test-writer.md +475 -0
  12. package/plugins/flow/agents/angular-pipe-builder.md +170 -0
  13. package/plugins/flow/agents/angular-resolver-builder.md +287 -0
  14. package/plugins/flow/agents/angular-service-builder.md +162 -0
  15. package/plugins/flow/agents/angular-signal-state-builder.md +340 -0
  16. package/plugins/flow/agents/angular-test-diagnostician.md +279 -0
  17. package/plugins/flow/agents/angular-testbed-configurator.md +315 -0
  18. package/plugins/flow/agents/arch-scaffolder.md +278 -0
  19. package/plugins/flow/agents/e2e-data-testid-injector.md +195 -0
  20. package/plugins/flow/agents/e2e-project-scaffolder.md +194 -0
  21. package/plugins/flow/agents/e2e-test-writer.md +357 -0
  22. package/plugins/flow/agents/shared-agent-evolver.md +294 -0
  23. package/plugins/flow/agents/shared-build-verifier.md +160 -0
  24. package/plugins/flow/agents/shared-config-updater.md +310 -0
  25. package/plugins/flow/agents/shared-coverage-enforcer.md +184 -0
  26. package/plugins/flow/agents/shared-error-handler.md +217 -0
  27. package/plugins/flow/agents/shared-file-creator.md +344 -0
  28. package/plugins/flow/agents/shared-impl-orchestrator.md +312 -0
  29. package/plugins/flow/agents/shared-impl-reporter.md +368 -0
  30. package/plugins/flow/agents/shared-impl-teammate.md +201 -0
  31. package/plugins/flow/agents/shared-linear-subtask-iterator.md +337 -0
  32. package/plugins/flow/agents/shared-logic-implementer.md +244 -0
  33. package/plugins/flow/agents/shared-maia-api.md +26 -0
  34. package/plugins/flow/agents/shared-parallelization-analyzer.md +343 -0
  35. package/plugins/flow/agents/shared-performance-validator.md +168 -0
  36. package/plugins/flow/agents/shared-plan-perspective.md +271 -0
  37. package/plugins/flow/agents/shared-project-standardizer.md +205 -0
  38. package/plugins/flow/agents/shared-report-synthesizer.md +188 -0
  39. package/plugins/flow/agents/shared-review-teammate.md +189 -0
  40. package/plugins/flow/agents/shared-security-scanner.md +186 -0
  41. package/plugins/flow/agents/shared-style-enforcer.md +230 -0
  42. package/plugins/flow/agents/shared-subtask-dependency-analyzer.md +189 -0
  43. package/plugins/flow/agents/shared-tdd-developer.md +350 -0
  44. package/plugins/flow/agents/shared-team-coordinator.md +192 -0
  45. package/plugins/flow/agents/shared-test-fixer.md +186 -0
  46. package/plugins/flow/agents/shared-test-runner.md +191 -0
  47. package/plugins/flow/agents/shared-ui-classifier.md +263 -0
  48. package/plugins/flow/agents/shared-verification-orchestrator.md +194 -0
  49. package/plugins/flow/agents/shared-verification-runner.md +140 -0
  50. package/plugins/flow/agents/ui-a11y-validator.md +305 -0
  51. package/plugins/flow/agents/ui-screenshot-reporter.md +329 -0
  52. package/plugins/flow/agents/ui-web-designer.md +214 -0
  53. package/plugins/flow/scripts/compute-session-tokens.sh +39 -0
  54. package/plugins/flow/skills/a11y-audit/SKILL.md +214 -0
  55. package/plugins/flow/skills/angular-patterns/SKILL.md +191 -0
  56. package/plugins/flow/skills/browser-capture/SKILL.md +238 -0
  57. package/plugins/flow/skills/commit/SKILL.md +259 -0
  58. package/plugins/flow/skills/debug-helper/SKILL.md +375 -0
  59. package/plugins/flow/skills/impl/SKILL.md +992 -0
  60. package/plugins/flow/skills/karpathy-guidelines/SKILL.md +72 -0
  61. package/plugins/flow/skills/linear-suggestion/SKILL.md +132 -0
  62. package/plugins/flow/skills/maia-files-delete/SKILL.md +59 -0
  63. package/plugins/flow/skills/maia-files-upload/SKILL.md +57 -0
  64. package/plugins/flow/skills/nx-conventions/SKILL.md +326 -0
  65. package/plugins/flow/skills/plan/SKILL.md +1033 -0
  66. package/plugins/flow/skills/push/SKILL.md +759 -0
  67. package/plugins/flow/skills/review/SKILL.md +443 -0
  68. package/plugins/flow/skills/test-e2e/SKILL.md +164 -0
  69. package/plugins/flow/skills/test-unit/SKILL.md +456 -0
  70. package/plugins/flow-external/.claude-plugin/README.md +146 -0
  71. package/plugins/flow-external/.claude-plugin/merge-permissions.js +94 -0
  72. package/plugins/flow-external/.claude-plugin/plugin.json +5 -0
  73. package/plugins/flow-external/.claude-plugin/settings.template.json +78 -0
  74. package/plugins/flow-external/agents/angular-component-scaffolder.md +271 -0
  75. package/plugins/flow-external/agents/angular-directive-builder.md +134 -0
  76. package/plugins/flow-external/agents/angular-guard-builder.md +73 -0
  77. package/plugins/flow-external/agents/angular-pipe-builder.md +90 -0
  78. package/plugins/flow-external/agents/angular-resolver-builder.md +79 -0
  79. package/plugins/flow-external/agents/angular-service-builder.md +168 -0
  80. package/plugins/flow-external/agents/angular-state-builder.md +263 -0
  81. package/plugins/flow-external/agents/shared-build-verifier.md +67 -0
  82. package/plugins/flow-external/agents/shared-impl-orchestrator.md +90 -0
  83. package/plugins/flow-external/agents/shared-impl-reporter.md +135 -0
  84. package/plugins/flow-external/agents/shared-linear-subtask-iterator.md +70 -0
  85. package/plugins/flow-external/agents/shared-ui-classifier.md +38 -0
  86. package/plugins/flow-external/agents/ui-web-designer.md +203 -0
  87. package/plugins/flow-external/scripts/compute-session-tokens.sh +39 -0
  88. package/plugins/flow-external/skills/a11y-audit/SKILL.md +97 -0
  89. package/plugins/flow-external/skills/angular-cli-conventions/SKILL.md +268 -0
  90. package/plugins/flow-external/skills/angular-patterns/SKILL.md +182 -0
  91. package/plugins/flow-external/skills/browser-capture/SKILL.md +74 -0
  92. package/plugins/flow-external/skills/commit/SKILL.md +114 -0
  93. package/plugins/flow-external/skills/debug-helper/SKILL.md +135 -0
  94. package/plugins/flow-external/skills/impl/SKILL.md +218 -0
  95. package/plugins/flow-external/skills/karpathy-guidelines/SKILL.md +72 -0
  96. package/plugins/flow-external/skills/linear-suggestion/SKILL.md +62 -0
  97. package/plugins/flow-external/skills/maia-files-delete/SKILL.md +34 -0
  98. package/plugins/flow-external/skills/maia-files-upload/SKILL.md +41 -0
  99. package/plugins/flow-external/skills/plan/SKILL.md +334 -0
  100. package/plugins/flow-external/skills/push/SKILL.md +232 -0
  101. package/plugins/flow-legacy/.claude-plugin/README.md +143 -0
  102. package/plugins/flow-legacy/.claude-plugin/merge-permissions.js +94 -0
  103. package/plugins/flow-legacy/.claude-plugin/plugin.json +5 -0
  104. package/plugins/flow-legacy/.claude-plugin/settings.template.json +79 -0
  105. package/plugins/flow-legacy/agents/angular-component-scaffolder.md +327 -0
  106. package/plugins/flow-legacy/agents/angular-directive-builder.md +253 -0
  107. package/plugins/flow-legacy/agents/angular-guard-builder.md +326 -0
  108. package/plugins/flow-legacy/agents/angular-pipe-builder.md +238 -0
  109. package/plugins/flow-legacy/agents/angular-resolver-builder.md +339 -0
  110. package/plugins/flow-legacy/agents/angular-service-builder.md +271 -0
  111. package/plugins/flow-legacy/agents/angular-state-builder.md +480 -0
  112. package/plugins/flow-legacy/agents/shared-impl-orchestrator.md +174 -0
  113. package/plugins/flow-legacy/agents/shared-impl-reporter.md +232 -0
  114. package/plugins/flow-legacy/agents/shared-linear-subtask-iterator.md +198 -0
  115. package/plugins/flow-legacy/agents/shared-tdd-developer.md +307 -0
  116. package/plugins/flow-legacy/agents/shared-test-runner.md +133 -0
  117. package/plugins/flow-legacy/agents/shared-ui-classifier.md +145 -0
  118. package/plugins/flow-legacy/scripts/compute-session-tokens.sh +39 -0
  119. package/plugins/flow-legacy/skills/a11y-audit/SKILL.md +214 -0
  120. package/plugins/flow-legacy/skills/angular-patterns/SKILL.md +346 -0
  121. package/plugins/flow-legacy/skills/browser-capture/SKILL.md +238 -0
  122. package/plugins/flow-legacy/skills/commit/SKILL.md +215 -0
  123. package/plugins/flow-legacy/skills/debug-helper/SKILL.md +395 -0
  124. package/plugins/flow-legacy/skills/impl/SKILL.md +710 -0
  125. package/plugins/flow-legacy/skills/karpathy-guidelines/SKILL.md +72 -0
  126. package/plugins/flow-legacy/skills/linear-suggestion/SKILL.md +132 -0
  127. package/plugins/flow-legacy/skills/maia-files-delete/SKILL.md +59 -0
  128. package/plugins/flow-legacy/skills/maia-files-upload/SKILL.md +57 -0
  129. package/plugins/flow-legacy/skills/nx-conventions/SKILL.md +368 -0
  130. package/plugins/flow-legacy/skills/plan/SKILL.md +742 -0
  131. package/plugins/flow-legacy/skills/push/SKILL.md +645 -0
  132. package/plugins/flow-legacy/skills/test-unit/SKILL.md +500 -0
  133. package/plugins/smart-pro/.claude-plugin/README.md +115 -0
  134. package/plugins/smart-pro/.claude-plugin/merge-permissions.js +129 -0
  135. package/plugins/smart-pro/.claude-plugin/plugin.json +5 -0
  136. package/plugins/smart-pro/.claude-plugin/settings.template.json +94 -0
  137. package/plugins/smart-pro/agents/angular-components/AGENT.md +214 -0
  138. package/plugins/smart-pro/hooks/CONFIG.md +198 -0
  139. package/plugins/smart-pro/hooks/README.md +139 -0
  140. package/plugins/smart-pro/hooks/audit_logger.py +107 -0
  141. package/plugins/smart-pro/hooks/auto_format.sh +11 -0
  142. package/plugins/smart-pro/hooks/hooks.json +79 -0
  143. package/plugins/smart-pro/hooks/safety_validator.py +129 -0
  144. package/plugins/smart-pro/hooks/sensitive_file_blocker.py +58 -0
  145. package/plugins/smart-pro/hooks/skill_validator.py +220 -0
  146. package/plugins/smart-pro/skills/angular-components-action-panel/SKILL.md +159 -0
  147. package/plugins/smart-pro/skills/angular-components-avatar/SKILL.md +142 -0
  148. package/plugins/smart-pro/skills/angular-components-badge/SKILL.md +110 -0
  149. package/plugins/smart-pro/skills/angular-components-breadcrumbs/SKILL.md +91 -0
  150. package/plugins/smart-pro/skills/angular-components-button/SKILL.md +146 -0
  151. package/plugins/smart-pro/skills/angular-components-button-group/SKILL.md +121 -0
  152. package/plugins/smart-pro/skills/angular-components-calendar/SKILL.md +78 -0
  153. package/plugins/smart-pro/skills/angular-components-card/SKILL.md +110 -0
  154. package/plugins/smart-pro/skills/angular-components-card-heading/SKILL.md +105 -0
  155. package/plugins/smart-pro/skills/angular-components-command-palette/SKILL.md +168 -0
  156. package/plugins/smart-pro/skills/angular-components-container/SKILL.md +93 -0
  157. package/plugins/smart-pro/skills/angular-components-description-list/SKILL.md +102 -0
  158. package/plugins/smart-pro/skills/angular-components-details/SKILL.md +70 -0
  159. package/plugins/smart-pro/skills/angular-components-divider/SKILL.md +110 -0
  160. package/plugins/smart-pro/skills/angular-components-drawer/SKILL.md +136 -0
  161. package/plugins/smart-pro/skills/angular-components-dropdown/SKILL.md +131 -0
  162. package/plugins/smart-pro/skills/angular-components-empty-state/SKILL.md +103 -0
  163. package/plugins/smart-pro/skills/angular-components-feed/SKILL.md +110 -0
  164. package/plugins/smart-pro/skills/angular-components-form/SKILL.md +77 -0
  165. package/plugins/smart-pro/skills/angular-components-grid-list/SKILL.md +91 -0
  166. package/plugins/smart-pro/skills/angular-components-input/SKILL.md +118 -0
  167. package/plugins/smart-pro/skills/angular-components-list/SKILL.md +75 -0
  168. package/plugins/smart-pro/skills/angular-components-list-container/SKILL.md +106 -0
  169. package/plugins/smart-pro/skills/angular-components-media-object/SKILL.md +133 -0
  170. package/plugins/smart-pro/skills/angular-components-modal/SKILL.md +159 -0
  171. package/plugins/smart-pro/skills/angular-components-multi-column-layout/SKILL.md +84 -0
  172. package/plugins/smart-pro/skills/angular-components-navbar/SKILL.md +93 -0
  173. package/plugins/smart-pro/skills/angular-components-notification/SKILL.md +147 -0
  174. package/plugins/smart-pro/skills/angular-components-page/SKILL.md +162 -0
  175. package/plugins/smart-pro/skills/angular-components-page-heading/SKILL.md +96 -0
  176. package/plugins/smart-pro/skills/angular-components-paging/SKILL.md +86 -0
  177. package/plugins/smart-pro/skills/angular-components-progress-bars/SKILL.md +94 -0
  178. package/plugins/smart-pro/skills/angular-components-searchbar/SKILL.md +113 -0
  179. package/plugins/smart-pro/skills/angular-components-section-heading/SKILL.md +156 -0
  180. package/plugins/smart-pro/skills/angular-components-select-menu/SKILL.md +101 -0
  181. package/plugins/smart-pro/skills/angular-components-sidebar-layout/SKILL.md +121 -0
  182. package/plugins/smart-pro/skills/angular-components-sidebar-navigation/SKILL.md +80 -0
  183. package/plugins/smart-pro/skills/angular-components-sign-in-form/SKILL.md +91 -0
  184. package/plugins/smart-pro/skills/angular-components-stacked-layout/SKILL.md +114 -0
  185. package/plugins/smart-pro/skills/angular-components-stacked-list/SKILL.md +93 -0
  186. package/plugins/smart-pro/skills/angular-components-stats/SKILL.md +87 -0
  187. package/plugins/smart-pro/skills/angular-components-table/SKILL.md +98 -0
  188. package/plugins/smart-pro/skills/angular-components-tabs/SKILL.md +99 -0
  189. package/plugins/smart-pro/skills/angular-components-textarea/SKILL.md +111 -0
  190. package/plugins/smart-pro/skills/angular-components-toggle/SKILL.md +109 -0
  191. package/plugins/smart-pro/skills/angular-components-vertical-navigation/SKILL.md +139 -0
  192. package/plugins/smart-pro/skills/audit-log/SKILL.md +82 -0
  193. package/plugins/smart-pro/skills/format-code/SKILL.md +46 -0
  194. package/plugins/smart-pro/skills/project-conventions/SKILL.md +90 -0
  195. package/plugins/smart-pro/skills/safety-check/SKILL.md +0 -0
  196. package/src/index.d.ts +6 -0
  197. package/src/index.js +7 -0
  198. package/src/index.js.map +1 -0
@@ -0,0 +1,759 @@
1
+ ---
2
+ name: push
3
+ description: Push local changes to remote repository, update Linear task status, monitor CI pipeline, verify QA deployment, and optionally create pull requests for feature branches.
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ - Glob
8
+ - Grep
9
+ - AskUserQuestion
10
+ - WebFetch
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__list_issue_statuses
21
+ ---
22
+
23
+ # Push Skill
24
+
25
+ Push local changes to remote and optionally update Linear task status.
26
+
27
+ ## Execution Checklist
28
+
29
+ Execute each step in order. Do not skip any step marked as MANDATORY.
30
+
31
+ ### Pre-Push
32
+
33
+ - [ ] **1. Check git status** — verify branch, commits ahead, warn about uncommitted changes
34
+ - [ ] **2. Get commits to push** — `git log origin/<branch>..HEAD --oneline`; exit if none
35
+ - [ ] **3. Fetch Linear task** — get title, status, subtasks and their statuses via MCP
36
+ - [ ] **4. Analyze subtasks** — classify completed vs incomplete, find reasons for incomplete ones
37
+ - [ ] **5. MANDATORY: Show summary to user** — present commits + subtask status, ask about status change
38
+ - [ ] **6. Update Linear status** — BEFORE push: set completed subtasks to "In Review", post summary comment in Polish
39
+ - [ ] **7. MANDATORY: Write Linear comments in Polish** — all comments must be in Polish language
40
+
41
+ ### Push
42
+
43
+ - [ ] **8. Push to remote** — `git push`; handle errors gracefully
44
+
45
+ ### Post-Push (branch-specific)
46
+
47
+ #### If `development` branch:
48
+
49
+ - [ ] **9a. Ask about deployment verification** — offer optional CI monitoring + QA check
50
+ - [ ] **10a. Monitor CI pipeline** — poll `gh run view` every 30s until completion
51
+ - [ ] **11a. Handle CI failure** — revert task to "To Do", post error comment to Linear
52
+ - [ ] **12a. Verify package.json update** — `git pull`, compare versions
53
+ - [ ] **13a. Verify QA deployment** — wait 5 min, check `<meta name="app-version">` matches
54
+
55
+ #### If feature branch:
56
+
57
+ - [ ] **9b. Check for existing PR** — `gh pr list --head <branch> --base development`
58
+ - [ ] **10b. Ask about PR creation** — if no PR exists and subtasks are ready
59
+ - [ ] **11b. Create PR** — `gh pr create` with structured summary
60
+
61
+ ### Final
62
+
63
+ - [ ] **12. Show final status** — complete summary of all actions taken
64
+
65
+ ### Task Progress Tracking
66
+
67
+ **MANDATORY**: Use Claude Code's built-in task tracking to provide real-time progress visibility.
68
+
69
+ **Task naming convention**: Every task subject MUST be prefixed with the Linear task ID:
70
+
71
+ ```
72
+ <linearTaskId> <step description>
73
+ ```
74
+
75
+ **At skill start**: Create tasks for each checklist step using `TaskCreate`:
76
+
77
+ ```
78
+ TaskCreate({
79
+ subject: "MM-123 Check git status",
80
+ description: "Verify branch, commits ahead, warn about uncommitted changes",
81
+ activeForm: "MM-123 Checking git status"
82
+ })
83
+ TaskCreate({
84
+ subject: "MM-123 Push to remote",
85
+ description: "Execute git push and handle errors",
86
+ activeForm: "MM-123 Pushing to remote"
87
+ })
88
+ ```
89
+
90
+ **During execution**:
91
+
92
+ - Before starting a step → `TaskUpdate({ taskId, status: "in_progress" })`
93
+ - After completing a step → `TaskUpdate({ taskId, status: "completed" })`
94
+ - For branch-specific steps, only create tasks for the applicable branch path (development OR feature)
95
+
96
+ **Before user decisions**: Use `TaskList` to show progress overview before asking user about status changes or PR creation.
97
+
98
+ ## Usage
99
+
100
+ ```
101
+ /push-local [linearTaskId]
102
+ ```
103
+
104
+ ## Parameters
105
+
106
+ - `linearTaskId` - Linear task ID (e.g., FRA-123)
107
+
108
+ ## Instructions
109
+
110
+ You are tasked with pushing local changes to the remote repository, summarizing what was done, and optionally moving the Linear task to "In Review".
111
+
112
+ ### Step 1: Check Git Status
113
+
114
+ Run `git status` to verify:
115
+
116
+ - Current branch name
117
+ - Number of commits ahead of remote
118
+ - Any uncommitted changes (warn user if present)
119
+
120
+ If there are uncommitted changes, warn the user and ask if they want to proceed or commit first.
121
+
122
+ ### Step 2: Get Commits to Push
123
+
124
+ Run `git log origin/<branch>..HEAD --oneline` to get the list of commits that will be pushed.
125
+
126
+ If no commits to push, inform the user and exit.
127
+
128
+ ### Step 3: Fetch Linear Task Details (if linearTaskId provided)
129
+
130
+ If `linearTaskId` was provided, use MCP Linear server to fetch:
131
+
132
+ - Task title
133
+ - Current status
134
+ - Subtasks (if any) and their statuses
135
+ - Comments on subtasks (to find reasons for incomplete items)
136
+
137
+ ### Step 4: Analyze Subtasks Status
138
+
139
+ For each subtask, determine:
140
+
141
+ 1. **Completed subtasks**: Status is "Done", "In Review", or has implementation completed
142
+ 2. **Incomplete subtasks**: Status is "To Do", "Blocked", or was not implemented
143
+
144
+ For incomplete subtasks, find the reason by:
145
+
146
+ - Reading comments on the subtask (look for "Analiza problemu", "Blocker", "Status: Blocked")
147
+ - Checking if it was marked as backend issue, external dependency, etc.
148
+
149
+ Build a summary of incomplete items with reasons.
150
+
151
+ ### Step 5: Show Summary and Ask About Status Update
152
+
153
+ Show summary of what will be pushed and ask user:
154
+
155
+ ```markdown
156
+ ## Podsumowanie
157
+
158
+ ### Commity do wysłania (X)
159
+
160
+ | Commit | Opis |
161
+ | ------- | -------------------------- |
162
+ | abc1234 | feat(scope): description 1 |
163
+ | def5678 | fix(scope): description 2 |
164
+
165
+ ### Podzadania
166
+
167
+ #### Zrealizowane
168
+
169
+ - ✅ FRA-549: Naprawić szerokość logo
170
+ - ✅ FRA-550: Usunąć zdublowane zdjęcia
171
+
172
+ #### Niezrealizowane
173
+
174
+ - ⚠️ FRA-554: Obsłużyć zdjęcia PNG → Problem backendu
175
+
176
+ ---
177
+
178
+ **Task**: [linearTaskId] - [Task Title]
179
+ **Aktualny status**: [Current Status]
180
+
181
+ Czy przenieść task do "In Review" i wysłać zmiany?
182
+ ```
183
+
184
+ Use `AskUserQuestion` tool with options:
185
+
186
+ - "Tak, przenieś do In Review i wyślij" (Recommended)
187
+ - "Tylko wyślij, bez zmiany statusu"
188
+ - "Anuluj"
189
+
190
+ ### Step 6: Update Linear Status (if confirmed)
191
+
192
+ **BEFORE pushing**, if user confirmed status change:
193
+
194
+ 1. **For tasks with subtasks**: Update all completed subtasks to "In Review"
195
+ 2. **For tasks without subtasks**: Update the task itself to "In Review"
196
+
197
+ **Before posting**, run the token-summing script and capture its output:
198
+
199
+ ```bash
200
+ bash "$CLAUDE_PLUGIN_ROOT/scripts/compute-session-tokens.sh"
201
+ ```
202
+
203
+ 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).
204
+
205
+ 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 `_Raport wygenerowany przez Claude Code_` footer. Do not create a second Linear comment — the block belongs in **this** comment.
206
+
207
+ ```markdown
208
+ ## Zużycie tokenów — etap /push
209
+
210
+ | Metryka | Wartość |
211
+ | -------------- | -------------- |
212
+ | Input | <INPUT> |
213
+ | Output | <OUTPUT> |
214
+ | Cache creation | <CACHE_CREATE> |
215
+ | Cache read | <CACHE_READ> |
216
+ | **Łącznie** | **<TOTAL>** |
217
+ ```
218
+
219
+ Create a comment on the **parent task** summarizing:
220
+
221
+ ```markdown
222
+ ## Podsumowanie Implementacji
223
+
224
+ ### Branch
225
+
226
+ `<branch-name>`
227
+
228
+ ### Zrealizowane Podzadania
229
+
230
+ | Podzadanie | Tytuł | Status |
231
+ | ---------- | ------------------------- | --------------- |
232
+ | FRA-549 | Naprawić szerokość logo | ✅ Zrealizowane |
233
+ | FRA-550 | Usunąć zdublowane zdjęcia | ✅ Zrealizowane |
234
+
235
+ ### Niezrealizowane Podzadania
236
+
237
+ | Podzadanie | Tytuł | Powód |
238
+ | ---------- | -------------------- | ------------------------------------------------------- |
239
+ | FRA-554 | Obsłużyć zdjęcia PNG | ⚠️ Problem backendu - wymaga naprawy po stronie serwera |
240
+
241
+ ### Commity
242
+
243
+ | Commit | Opis |
244
+ | ------- | -------------------------- |
245
+ | abc1234 | feat(scope): description 1 |
246
+ | def5678 | fix(scope): description 2 |
247
+
248
+ ### Status
249
+
250
+ Task przeniesiony do "In Review".
251
+
252
+ ---
253
+
254
+ _Raport wygenerowany przez Claude Code_
255
+ ```
256
+
257
+ **Important**: For each incomplete subtask, include:
258
+
259
+ - The subtask ID and title
260
+ - A clear reason why it wasn't completed (e.g., "Problem backendu", "Zewnętrzna zależność", "Brak planu implementacji")
261
+ - Reference to any comments on the subtask that explain the issue
262
+
263
+ ### Step 7: Push to Remote
264
+
265
+ Execute `git push` to push the commits to the remote repository.
266
+
267
+ If push fails:
268
+
269
+ - Show the error message
270
+ - Suggest possible solutions (pull first, force push if appropriate, etc.)
271
+ - Note: Linear status was already updated, may need to revert if push ultimately fails
272
+
273
+ ### Step 8: Final Confirmation
274
+
275
+ Show final status to user:
276
+
277
+ ```markdown
278
+ ## Gotowe
279
+
280
+ ✅ Linear task [linearTaskId] przeniesiony do "In Review"
281
+ ✅ Zmiany wysłane do `origin/<branch-name>`
282
+
283
+ ### Następne kroki
284
+
285
+ - Oczekiwanie na code review
286
+ ```
287
+
288
+ ### Step 9: Branch-Specific Post-Push Actions
289
+
290
+ After successful push, determine the next action based on the current branch:
291
+
292
+ 1. **If branch is `development`**: Proceed to **Step 10** (Deployment Verification)
293
+ 2. **If branch is a feature branch** (matches Linear issue ID pattern like `FRA-123`, `mob-123`, etc.): Proceed to **Step 9a** (PR Workflow)
294
+
295
+ #### Step 9a: Feature Branch - Check/Create Pull Request
296
+
297
+ **Applicable only when on a feature branch (not `development`).**
298
+
299
+ 1. **Check if all subtasks are completed**:
300
+
301
+ Review the subtask analysis from Step 4. Consider a task "ready for PR" if:
302
+
303
+ - All subtasks are in "Done" or "In Review" status, OR
304
+ - Incomplete subtasks have documented reasons (backend issue, external dependency, etc.)
305
+
306
+ 2. **Check if PR already exists**:
307
+
308
+ ```bash
309
+ gh pr list --head <branch-name> --base development --json number,title,state,url
310
+ ```
311
+
312
+ 3. **If PR exists**:
313
+
314
+ ```markdown
315
+ ## Pull Request Already Exists
316
+
317
+ **PR**: #<number> - <title>
318
+ **Status**: <state>
319
+ **URL**: <url>
320
+
321
+ No action needed - PR already created.
322
+ ```
323
+
324
+ 4. **If PR does NOT exist**, ask user:
325
+
326
+ ```markdown
327
+ ## Create Pull Request?
328
+
329
+ Branch `<branch-name>` has no open PR to `development`.
330
+
331
+ ### Subtasks Status
332
+
333
+ - ✅ Completed: X
334
+ - ⚠️ Incomplete: Y (with documented reasons)
335
+
336
+ Do you want to create a Pull Request?
337
+ ```
338
+
339
+ Use `AskUserQuestion` tool with options:
340
+
341
+ - "Tak, utwórz PR do development" (Recommended)
342
+ - "Nie, zakończ bez PR"
343
+
344
+ 5. **If user confirms PR creation**:
345
+
346
+ Create PR using `gh pr create`:
347
+
348
+ ```bash
349
+ gh pr create --base development --head <branch-name> --title "<Linear-ID>: <Task Title>" --body "$(cat <<'EOF'
350
+ ## Summary
351
+
352
+ Implementation for [<Linear-ID>](https://linear.app/issue/<Linear-ID>)
353
+
354
+ ### Completed Subtasks
355
+
356
+ - ✅ <subtask-id>: <title>
357
+ - ✅ <subtask-id>: <title>
358
+
359
+ ### Incomplete Subtasks (with reasons)
360
+
361
+ - ⚠️ <subtask-id>: <title> → <reason>
362
+
363
+ ### Commits
364
+
365
+ | Commit | Description |
366
+ |--------|-------------|
367
+ | abc123 | feat: ... |
368
+
369
+ ---
370
+
371
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
372
+ EOF
373
+ )"
374
+ ```
375
+
376
+ 6. **Show PR creation result**:
377
+
378
+ ```markdown
379
+ ## ✅ Pull Request Created
380
+
381
+ **PR**: #<number> - <title>
382
+ **URL**: <url>
383
+ **Base**: development
384
+ **Head**: <branch-name>
385
+
386
+ ### Następne kroki
387
+
388
+ - Oczekiwanie na code review
389
+ - Po zatwierdzeniu: merge do development
390
+ ```
391
+
392
+ **End the command here for feature branches.**
393
+
394
+ ### Step 10: Ask About Deployment Verification (development branch only)
395
+
396
+ **Applicable only when on `development` branch.**
397
+
398
+ After successful push, ask the user if they want to verify deployment:
399
+
400
+ ```markdown
401
+ ## Deployment Verification
402
+
403
+ Do you want to verify the deployment on QA environment?
404
+
405
+ Verification process:
406
+
407
+ 1. Monitor GitHub Actions CI pipeline until completion
408
+ 2. Git pull and check if package.json was updated
409
+ 3. Wait 5 minutes for deployment
410
+ 4. Verify app version on QA site
411
+ ```
412
+
413
+ Use `AskUserQuestion` tool with options:
414
+
415
+ - "Yes, verify deployment" (Recommended)
416
+ - "No, finish now"
417
+
418
+ If user chooses not to verify, end the command here.
419
+
420
+ ### Step 11: Monitor CI Pipeline via GitHub Actions
421
+
422
+ **Do NOT wait a fixed time.** Instead, actively monitor GitHub Actions workflows using `gh` CLI.
423
+
424
+ 1. **Get the latest workflow run for the current branch**:
425
+
426
+ ```bash
427
+ gh run list --branch <branch-name> --limit 1 --json databaseId,status,conclusion,workflowName
428
+ ```
429
+
430
+ 2. **Poll workflow status** every 30 seconds until it completes:
431
+
432
+ ```bash
433
+ gh run view <run-id> --json status,conclusion
434
+ ```
435
+
436
+ Or use `gh run watch <run-id>` to watch in real-time (but this blocks).
437
+
438
+ 3. **Show progress to user**:
439
+
440
+ ```markdown
441
+ ## CI/CD Pipeline Monitoring
442
+
443
+ 🔄 Monitoring GitHub Actions workflow...
444
+
445
+ **Workflow**: <workflow-name>
446
+ **Run ID**: <run-id>
447
+ **Status**: in_progress | queued | completed
448
+ ```
449
+
450
+ 4. **Check workflow result**:
451
+
452
+ **If workflow FAILED**:
453
+
454
+ 1. **Get failed job logs**:
455
+
456
+ ```bash
457
+ gh run view <run-id> --log-failed 2>&1 | tail -100
458
+ ```
459
+
460
+ 2. **Revert Linear task to "To Do"**:
461
+
462
+ If Linear task was provided and status was changed to "In Review":
463
+
464
+ - Move the parent task back to "To Do" status
465
+ - For tasks with subtasks: Move all subtasks that were changed to "In Review" back to "To Do"
466
+
467
+ 3. **Add error comment to Linear task**:
468
+
469
+ Create a comment on the **parent task** with CI error details:
470
+
471
+ ```markdown
472
+ ## ❌ CI Build Failed
473
+
474
+ ### Branch
475
+
476
+ `<branch-name>`
477
+
478
+ ### Workflow
479
+
480
+ **Name**: <workflow-name>
481
+ **Run ID**: <run-id>
482
+ **URL**: https://github.com/<owner>/<repo>/actions/runs/<run-id>
483
+
484
+ ### Error Details
485
+ ```
486
+
487
+ <last 50-100 lines of error logs from gh run view --log-failed>
488
+
489
+ ```
490
+
491
+ ### Status
492
+
493
+ Task przywrócony do "To Do" z powodu błędu CI.
494
+
495
+ ---
496
+
497
+ _Raport wygenerowany przez Claude Code_
498
+ ```
499
+
500
+ 4. **Show error to user**:
501
+
502
+ ```markdown
503
+ ## ❌ CI Pipeline Failed
504
+
505
+ **Workflow**: <workflow-name>
506
+ **Run ID**: <run-id>
507
+ **Conclusion**: failure
508
+
509
+ ### Linear Task Status
510
+
511
+ ⚠️ Task [linearTaskId] przywrócony do "To Do"
512
+ ✅ Komentarz z błędem dodany do taska
513
+
514
+ ### View logs
515
+
516
+ Run `gh run view <run-id> --log-failed` to see error details.
517
+
518
+ Or visit: https://github.com/<owner>/<repo>/actions/runs/<run-id>
519
+
520
+ ### Następne kroki
521
+
522
+ 1. Przeanalizuj błędy w CI
523
+ 2. Napraw problemy lokalnie
524
+ 3. Uruchom `/push-local` ponownie
525
+ ```
526
+
527
+ Stop here if workflow failed.
528
+
529
+ **If workflow SUCCEEDED**, run:
530
+
531
+ ```bash
532
+ git fetch origin
533
+ git pull origin <branch-name>
534
+ ```
535
+
536
+ Check if `package.json` version has changed:
537
+
538
+ 1. Read the current `package.json` version
539
+ 2. Compare with the version before push
540
+
541
+ **If package.json was NOT updated** (version unchanged):
542
+
543
+ ```markdown
544
+ ## ❌ Pipeline Error
545
+
546
+ **Problem**: CI/CD pipeline did not update the version in `package.json`.
547
+
548
+ **Expected**: Automatic version bump after push
549
+ **Current version**: X.X.X (unchanged)
550
+
551
+ ### Possible causes
552
+
553
+ 1. Version bump workflow not triggered
554
+ 2. Workflow succeeded but didn't bump version
555
+ 3. Auto-version configuration is not working
556
+
557
+ ### Recommended actions
558
+
559
+ 1. Check workflow logs: `gh run view <run-id> --log`
560
+ 2. Verify auto-versioning configuration
561
+ ```
562
+
563
+ Stop here if package.json was not updated.
564
+
565
+ **If package.json WAS updated**, save the new version and proceed to Step 12.
566
+
567
+ ### Step 12: Verify Deployment on QA (App Version Check)
568
+
569
+ Wait 5 minutes for deployment to complete:
570
+
571
+ ```markdown
572
+ ## QA Deployment Verification
573
+
574
+ ⏳ Waiting 5 minutes for QA deployment...
575
+ ```
576
+
577
+ Use `sleep 300` or equivalent to wait.
578
+
579
+ After waiting, read SITE_URL from `.env.dev` file and fetch the page:
580
+
581
+ ```bash
582
+ curl -s "<SITE_URL>" | grep -o '<meta name="app-version" content="[^"]*"'
583
+ ```
584
+
585
+ Or use WebFetch to get the page and extract the `<meta name="app-version">` tag.
586
+
587
+ Compare the deployed version with `package.json` version:
588
+
589
+ **If versions MATCH**:
590
+
591
+ ```markdown
592
+ ## ✅ Deployment Successful
593
+
594
+ **Version in package.json**: X.X.X
595
+ **Version on QA**: X.X.X
596
+
597
+ ✅ Application was successfully deployed to QA environment.
598
+ ```
599
+
600
+ **If versions DO NOT MATCH**:
601
+
602
+ ```markdown
603
+ ## ❌ Deployment Error
604
+
605
+ **Problem**: App version on QA does not match the version in `package.json`.
606
+
607
+ **Version in package.json**: X.X.X
608
+ **Version on QA**: Y.Y.Y
609
+
610
+ ### Possible causes
611
+
612
+ 1. Deployment is still in progress (try again in a few minutes)
613
+ 2. Deployment pipeline failed with error
614
+ 3. CDN cache is serving old version
615
+ 4. Deployment configuration error
616
+
617
+ ### Recommended actions
618
+
619
+ 1. Check deployment pipeline status
620
+ 2. Review server logs
621
+ 3. Clear browser cache and check again
622
+ 4. Wait additional 5 minutes and run `/push-local --verify-only`
623
+ ```
624
+
625
+ ### Step 13: Final Deployment Status
626
+
627
+ Show complete summary:
628
+
629
+ ```markdown
630
+ ## Complete Process Summary
631
+
632
+ ### Git
633
+
634
+ ✅ Changes pushed to `origin/<branch-name>`
635
+
636
+ ### Linear
637
+
638
+ ✅ Task [linearTaskId] moved to "In Review"
639
+
640
+ ### CI/CD Pipeline
641
+
642
+ ✅ Package.json updated to version X.X.X
643
+
644
+ ### QA Deployment
645
+
646
+ ✅ Application deployed to <SITE_URL>
647
+ ✅ Version: X.X.X
648
+ ```
649
+
650
+ ## Guidelines
651
+
652
+ 1. **Write comments in Polish**: All Linear comments must be written in Polish
653
+ 2. **Always confirm before status change**: Never change Linear status without user confirmation
654
+ 3. **Update Linear BEFORE push**: Status change happens before git push
655
+ 4. **Handle errors gracefully**: If push fails after status update, inform user
656
+ 5. **Warn about uncommitted changes**: Don't push if there are uncommitted changes without user acknowledgment
657
+ 6. **Show clear summaries**: Always show what commits will be pushed and subtask status
658
+ 7. **Document incomplete subtasks**: Always explain WHY a subtask wasn't completed
659
+ 8. **Deployment verification is optional**: Always ask user before starting the 10-minute verification process
660
+ 9. **Read SITE_URL from .env.dev**: Use the SITE_URL variable from `.env.dev` file for QA verification
661
+ 10. **Version comparison**: Compare `package.json` version with `<meta name="app-version">` tag on QA site
662
+ 11. **Revert on CI failure**: If CI pipeline fails, move task back to "To Do" and add error comment
663
+ 12. **Branch-specific post-push actions**:
664
+ - **`development` branch**: Offer deployment verification (CI monitoring + QA version check)
665
+ - **Feature branch (e.g., `FRA-123`)**: Check/create PR to `development` when all subtasks are ready
666
+
667
+ ## Example Flows
668
+
669
+ ### Example 1: Push to `development` branch (with deployment verification)
670
+
671
+ ```
672
+ User: /push-local FRA-548
673
+ (on branch: development)
674
+
675
+ 1. Check git status → 6 commits ahead, no uncommitted changes
676
+ 2. List commits to push → 6 commits shown
677
+ 3. Fetch FRA-548 details → "Druga lista uwag", 6 subtasks
678
+ 4. Analyze subtasks → 5 completed, 1 incomplete (backend issue)
679
+ 5. Show summary, ask user: "Move to In Review and push?" → User: "Yes"
680
+ 6. Update FRA-548 subtasks to "In Review", create summary comment
681
+ 7. git push → success
682
+ 8. Show final confirmation
683
+ 9. Branch is `development` → Ask user: "Verify deployment?" → User: "Yes"
684
+ 10. Monitor GitHub Actions (gh run list/view) → workflow completed ✅
685
+ → git pull → package.json version changed (0.136.0 → 0.137.0) ✅
686
+ 11. Wait 5 minutes → curl SITE_URL → meta app-version="0.137.0" ✅
687
+ 12. Show complete deployment summary
688
+ ```
689
+
690
+ ### Example 2: Push to feature branch (with PR creation)
691
+
692
+ ```
693
+ User: /push-local FRA-560
694
+ (on branch: FRA-560)
695
+
696
+ 1. Check git status → 3 commits ahead, no uncommitted changes
697
+ 2. List commits to push → 3 commits shown
698
+ 3. Fetch FRA-560 details → "Implement dark mode", 4 subtasks
699
+ 4. Analyze subtasks → 4 completed, 0 incomplete
700
+ 5. Show summary, ask user: "Move to In Review and push?" → User: "Yes"
701
+ 6. Update FRA-560 subtasks to "In Review", create summary comment
702
+ 7. git push → success
703
+ 8. Show final confirmation
704
+ 9. Branch is feature branch (FRA-560) → Check for existing PR
705
+ → gh pr list --head FRA-560 --base development → No PR found
706
+ → Ask user: "Create PR to development?" → User: "Yes"
707
+ → gh pr create --base development --title "FRA-560: Implement dark mode"
708
+ → Show PR created: #42 - URL: https://github.com/.../pull/42
709
+ 10. End command (no deployment verification for feature branches)
710
+ ```
711
+
712
+ ## Error Handling
713
+
714
+ ### Push Rejected (non-fast-forward)
715
+
716
+ ```markdown
717
+ ## Push Failed
718
+
719
+ **Error**: Updates were rejected because the remote contains work that you do not have locally.
720
+
721
+ **Uwaga**: Status w Linear został już zaktualizowany do "In Review".
722
+
723
+ ### Options
724
+
725
+ 1. `git pull --rebase` - Pull remote changes and rebase your commits on top
726
+ 2. `git pull` - Pull remote changes and merge
727
+ 3. `git push --force` - Force push (⚠️ overwrites remote changes)
728
+
729
+ Which option do you want to use?
730
+ ```
731
+
732
+ ### No Commits to Push
733
+
734
+ ```markdown
735
+ ## Nothing to Push
736
+
737
+ Your branch is up to date with `origin/<branch-name>`.
738
+
739
+ No commits to push.
740
+ ```
741
+
742
+ ### Uncommitted Changes Present
743
+
744
+ ```markdown
745
+ ## Warning: Uncommitted Changes
746
+
747
+ You have uncommitted changes in your working directory:
748
+
749
+ - modified: path/to/file1.ts
750
+ - modified: path/to/file2.ts
751
+
752
+ ### Options
753
+
754
+ 1. Commit changes first (`/commit`)
755
+ 2. Stash changes and push
756
+ 3. Proceed anyway (push existing commits only)
757
+
758
+ What would you like to do?
759
+ ```