@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,334 @@
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., FRA-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/pro 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.
@@ -0,0 +1,232 @@
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., FRA-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 `FRA-123` → task `FRA-123`
52
+ - Branch `feature/FRA-123-description` → task `FRA-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] FRA-549: Completed subtask
82
+ - [x] FRA-550: Another completed
83
+ - [ ] FRA-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
+ | FRA-549 | [title] | Zrealizowane |
135
+ | FRA-550 | [title] | Zrealizowane |
136
+
137
+ ### Niezrealizowane Podzadania
138
+
139
+ | Podzadanie | Tytul | Powod |
140
+ | ---------- | ------- | -------- |
141
+ | FRA-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**
@@ -0,0 +1,143 @@
1
+ # Flow-Legacy Plugin for Claude Code
2
+
3
+ Development flow skills for **legacy Angular 14 projects** with Linear-driven workflow.
4
+
5
+ ## Target Projects
6
+
7
+ This plugin is designed for older standalone Angular projects using:
8
+
9
+ - **Angular 14.x** (not Angular 20+)
10
+ - **Nx 14.x** with `@nrwl/*` packages
11
+ - **NgRx 14.x**
12
+ - **Node.js 18** (not 24)
13
+
14
+ ### Legacy Patterns (what this plugin supports)
15
+
16
+ | Feature | Legacy (Angular 14) | Modern (Angular 20+) |
17
+ |---------|---------------------|----------------------|
18
+ | Control flow | `*ngIf`, `*ngFor` | `@if`, `@for` |
19
+ | Dependency injection | Constructor injection | `inject()` |
20
+ | Inputs/Outputs | `@Input()`, `@Output()` | `input()`, `output()` |
21
+ | State management | BehaviorSubject, Observable | Signals |
22
+ | Components | NgModules | Standalone |
23
+ | Nx packages | `@nrwl/*` | `@nx/*` |
24
+
25
+ ## Workflow Skills
26
+
27
+ | Skill | Description |
28
+ |-------|-------------|
29
+ | `/commit` | Create conventional commit based on Linear task |
30
+ | `/impl` | Implement plans from Linear task comments |
31
+ | `/plan` | Create implementation plan and save to Linear |
32
+ | `/push` | Push changes and update Linear status |
33
+
34
+ ## Installation
35
+
36
+ ### 1. Enable plugin in project's `.claude/settings.json`:
37
+
38
+ ```json
39
+ {
40
+ "enabledPlugins": {
41
+ "flow-legacy@smart-pro": true
42
+ }
43
+ }
44
+ ```
45
+
46
+ ### 2. Merge permissions from template
47
+
48
+ Run the merge script:
49
+
50
+ ```bash
51
+ node node_modules/@smartsoft001/pro-claude-plugins/plugins/flow-legacy/.claude-plugin/merge-permissions.js
52
+ ```
53
+
54
+ Or manually copy permissions from `settings.template.json` to your project's `.claude/settings.json`.
55
+
56
+ ## Required MCP Servers
57
+
58
+ Configure these in your `.mcp.json`:
59
+
60
+ - `linear` - Linear API integration (MCP prefix `mcp__linear__`)
61
+ - `playwright` - Browser automation for screenshots
62
+
63
+ ## Permission Strategy
64
+
65
+ ### Automatic (allow)
66
+ - Git read operations (status, diff, log, show)
67
+ - Nx commands (test, lint, build)
68
+ - Linear API (read/write issues, comments)
69
+ - Playwright (screenshots)
70
+ - Utility skills
71
+
72
+ ### Requires Confirmation (ask)
73
+ - Workflow skills (/commit, /impl, /plan, /push)
74
+ - `git commit` - creating commits
75
+ - `git push` - pushing to remote
76
+ - `gh pr create` - creating pull requests
77
+
78
+ ## Utility Skills
79
+
80
+ | Skill | Description |
81
+ |-------|-------------|
82
+ | `maia-files-upload` | Upload files to Maia API |
83
+ | `maia-files-delete` | Delete files from Maia API |
84
+ | `browser-capture` | Capture screenshots with Playwright |
85
+ | `linear-suggestion` | Create Linear issues for improvements |
86
+ | `test-unit` | Run unit tests with coverage |
87
+ | `a11y-audit` | Accessibility audit |
88
+
89
+ ## Agents
90
+
91
+ See `agents/` directory for specialized agents adapted for Angular 14 patterns:
92
+
93
+ ### Angular Agents (Legacy patterns)
94
+ - `angular-component-scaffolder` - Components with NgModules, `*ngIf`/`*ngFor`, constructor DI
95
+ - `angular-service-builder` - Services with BehaviorSubject, constructor DI
96
+ - `angular-state-builder` - State management with BehaviorSubject/Observable patterns
97
+ - `angular-directive-builder` - Directives with constructor DI
98
+ - `angular-pipe-builder` - Pipes with legacy patterns
99
+ - `angular-guard-builder` - Guards with constructor DI
100
+ - `angular-resolver-builder` - Resolvers with constructor DI
101
+
102
+ ### Shared Agents
103
+ - `shared-tdd-developer` - TDD workflow
104
+ - `shared-impl-orchestrator` - Implementation orchestration
105
+ - `shared-impl-reporter` - Implementation reporting
106
+ - `shared-linear-subtask-iterator` - Linear subtask iteration
107
+ - `shared-verification-orchestrator` - Verification pipeline
108
+ - And more...
109
+
110
+ ## Differences from `flow` plugin
111
+
112
+ | Aspect | `flow` (modern) | `flow-legacy` |
113
+ |--------|-----------------|---------------|
114
+ | Angular version | 20+ | 14 |
115
+ | Node.js version | 24 | 18 |
116
+ | Component syntax | Standalone, signals | NgModules, *ngIf/*ngFor |
117
+ | DI pattern | `inject()` | Constructor injection |
118
+ | Nx packages | `@nx/*` | `@nrwl/*` |
119
+ | State | Signals | BehaviorSubject/Observable |
120
+
121
+ ## Example Project Structure
122
+
123
+ ```
124
+ libs/
125
+ shared/
126
+ angular/
127
+ src/
128
+ lib/
129
+ components/
130
+ services/
131
+ pipes/
132
+ directives/
133
+ museum-articles/
134
+ shell/
135
+ angular/
136
+ museum-objects/
137
+ shell/
138
+ angular/
139
+ apps/
140
+ web/
141
+ src/
142
+ app/
143
+ ```