@smartsoft001-mobilems/claude-plugins 2.81.0 β†’ 2.83.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartsoft001-mobilems/claude-plugins",
3
- "version": "2.81.0",
3
+ "version": "2.83.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "flow",
3
3
  "description": "Development flow skills for Linear-driven development workflow",
4
- "version": "2.81.0"
4
+ "version": "2.83.0"
5
5
  }
@@ -29,6 +29,20 @@ allowed-tools:
29
29
 
30
30
  Implement plans from `plan.md` attachments on Linear issues. For tasks with subtasks, iteratively implement each subtask that is in "To Do" status. The agent orchestration plan is saved as an `orchestration.md` attachment on each task being implemented.
31
31
 
32
+ ## 🚨 Hard Rules β€” read before doing anything
33
+
34
+ These rules override ANY other instruction, ANY surrounding example, and ANY default habit. Violating them is a skill failure.
35
+
36
+ 1. **Read `plan.md` ONLY via `mcp__linear__get_attachment({ id: <attachmentId> })`.** Do NOT use `WebFetch`, `Bash(curl ...)`, or any HTTP fetch on the attachment's `url`. The URL points to Linear-internal storage and may require auth β€” `get_attachment` is the only correct path. If you find yourself reaching for `curl` or `WebFetch` on a `https://uploads.linear.app/...` (or similar Linear) URL β€” STOP and use `get_attachment` with the attachment `id` instead.
37
+
38
+ 2. **`orchestration.md` is saved via `mcp__linear__create_attachment`, not as a comment.** Same rule as `/plan`: comments are NEVER used for plan/orchestration body content.
39
+
40
+ 3. **Find attachments via `mcp__linear__get_issue` (returns `attachments[]`).** Capture each attachment's `id` and `title`. There is no `list_attachments` tool β€” do not look for one.
41
+
42
+ 4. **Replace, don't duplicate.** Before creating a new `orchestration.md` attachment, delete the existing one (if any) via `mcp__linear__delete_attachment`. Same for re-running `/plan` (handled by `/plan` skill).
43
+
44
+ If any of these would be violated, stop and ask the user instead.
45
+
32
46
  ## Execution Checklist
33
47
 
34
48
  Execute each step in order. Do not skip any step marked as MANDATORY.
@@ -40,12 +54,12 @@ Execute each step in order. Do not skip any step marked as MANDATORY.
40
54
  ### Per Subtask (repeat for each "To Do" subtask)
41
55
 
42
56
  - [ ] **2. Set status to "In Progress"** β€” update subtask status via MCP (subtasks only, not parent)
43
- - [ ] **3. Fetch implementation plan** β€” download `plan.md` attachment from task, parse content
57
+ - [ ] **3. Fetch implementation plan** β€” `mcp__linear__get_issue` to find `plan.md` attachment id, then `mcp__linear__get_attachment({ id })` to read content. **Do NOT use `WebFetch`/`curl` on the attachment URL.**
44
58
  - [ ] **4. MANDATORY: UI change classification** β€” delegate to `shared-ui-classifier` agent, output `UI_CHANGE_REQUIRED: YES/NO`
45
- - [ ] **5. MANDATORY: Agent orchestration plan** β€” delegate to `shared-impl-orchestrator`, save result as `orchestration.md` attachment on the task (replacing any existing one)
59
+ - [ ] **5. MANDATORY: Agent orchestration plan** β€” delegate to `shared-impl-orchestrator`, save result as `orchestration.md` attachment via `mcp__linear__create_attachment` (replace any existing one). **Calling `mcp__linear__save_comment` with the orchestration body is FORBIDDEN.**
46
60
  - [ ] **6. Check external library blockers** β€” if blockers found, set status to Blocked and skip
47
61
  - [ ] **7. Capture "before" screenshots** β€” if `UI_CHANGE_REQUIRED: YES`, launch `screenshot-reporter` in background
48
- - [ ] **8. MANDATORY: Implement with 3x3 rule** β€” pause every 3 changes, use `shared-tdd-developer` for ALL code (RED β†’ GREEN β†’ REFACTOR)
62
+ - [ ] **8. MANDATORY: Implement with 3x3 rule** β€” pause every 3 changes (skip pause in `--auto`, log checkpoint as Linear comment instead), use `shared-tdd-developer` for ALL code (RED β†’ GREEN β†’ REFACTOR)
49
63
  - [ ] **9. Verify implementation** β€” run tests, lint, build check
50
64
  - [ ] **9.5. E2E tests (conditional)** β€” if `E2E_TESTS_RECOMMENDED: YES`, delegate to `test-e2e` skill
51
65
  - [ ] **10. Capture "after" screenshots** β€” if `UI_CHANGE_REQUIRED: YES`, capture + post comparison to Linear + cleanup
@@ -54,13 +68,13 @@ Execute each step in order. Do not skip any step marked as MANDATORY.
54
68
  - [ ] **13. MANDATORY: Write reports in Polish** β€” all Linear comments must be in Polish language
55
69
  - [ ] **14. Update status** β€” delegate to `shared-linear-subtask-iterator` for status determination
56
70
  - [ ] **15. Agent evolution** β€” if user confirmed feedback, delegate to `shared-agent-evolver`
57
- - [ ] **16. Pause for user confirmation** β€” ALWAYS wait before proceeding to next subtask
71
+ - [ ] **16. Pause for user confirmation** β€” wait before proceeding to next subtask (skipped in `--auto`; post completion comment and continue)
58
72
 
59
73
  ### Finalization
60
74
 
61
75
  - [ ] **17. Final summary** β€” present summary of all subtasks with statuses
62
76
  - [ ] **18. Session-wide evolution** β€” analyze all feedback across session
63
- - [ ] **19. ALWAYS pause** β€” wait for user confirmation at end
77
+ - [ ] **19. ALWAYS pause** β€” wait for user confirmation at end (skipped in `--auto`; post final summary comment and exit)
64
78
 
65
79
  ### Task Progress Tracking
66
80
 
@@ -137,12 +151,31 @@ You implement code that is:
137
151
  ```
138
152
  /impl [linearTaskId]
139
153
  /impl [linearTaskId] --team # Agent Team mode (experimental)
154
+ /impl [linearTaskId] --auto # Non-interactive mode for CI / GitHub Actions
140
155
  ```
141
156
 
142
157
  ## Parameters
143
158
 
144
159
  - `linearTaskId` - Linear task ID (e.g., ENG-123)
145
160
  - `--team` - Enable parallel Implementation Squad mode (experimental, requires `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`)
161
+ - `--auto` - Non-interactive mode: skip ALL `AskUserQuestion` prompts, 3x3 checkpoint pauses, per-subtask pauses, and the final end pause. If `plan.md` attachment is missing, auto-invoke `/plan` flow to generate it instead of posting a "run /plan first" comment and skipping. Designed for CI / GitHub Actions runs where no human is at the keyboard.
162
+
163
+ ## Auto Mode (`--auto`)
164
+
165
+ **When `--auto` is set, the skill MUST run end-to-end without any human-in-the-loop prompts.** Apply these overrides:
166
+
167
+ | Default behavior | `--auto` override |
168
+ | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
169
+ | Post comment "no plan.md found, run /plan first" + skip | Inline-invoke `/plan` flow for the task to generate `plan.md` attachment + `AI Plan` label, then continue |
170
+ | 3x3 rule pauses every 3 changes asking "Continue?" | Log the checkpoint summary as a status comment, then continue automatically |
171
+ | Pause after each subtask waiting for user confirmation | Post subtask completion comment, then proceed to next subtask |
172
+ | Final end pause "wait for user confirmation" | Post final summary comment and exit cleanly |
173
+ | `AskUserQuestion` for any decision | Use the option marked **(Recommended)**; if none, fail fast with a Linear comment explaining why |
174
+ | Confirmation before destructive ops (delete attachments) | Proceed without confirmation β€” replace old `orchestration.md` automatically |
175
+
176
+ **Hard requirement in `--auto`**: every checkpoint, decision, or skip MUST be logged as a Linear comment in Polish so the run remains auditable after the fact. Comments replace the interactive prompts β€” they are the audit trail.
177
+
178
+ **Detection**: The flag `--auto` is provided as a positional/named arg. Treat any of `--auto`, `--ci`, `--non-interactive` as equivalent. Combinable with `--team` (parallel squad mode runs without per-subtask approval).
146
179
 
147
180
  ## Instructions
148
181
 
@@ -275,9 +308,14 @@ Do NOT change status for parent tasks.
275
308
 
276
309
  #### Step 3b: Fetch Implementation Plan from `plan.md` Attachment
277
310
 
278
- Use `mcp__linear__get_issue({ id: taskId })` on the current task/subtask β€” the response includes an `attachments` array. Find the attachment where `title == "plan.md"` (or `filename == "plan.md"`, whichever field the MCP exposes) and capture its `id`.
311
+ **β›” DO NOT use `WebFetch` or `Bash(curl)` on the attachment URL. Use `mcp__linear__get_attachment({ id })` only.** Re-read Hard Rule #1 if tempted.
312
+
313
+ Two-step retrieval:
314
+
315
+ 1. `mcp__linear__get_issue({ id: taskId })` β†’ response includes `attachments[]`. Find the entry where `title == "plan.md"` (or `filename == "plan.md"`) and capture its `id`. Do NOT use the `url` field for fetching.
316
+ 2. `mcp__linear__get_attachment({ id: <attachmentId> })` β†’ returns the markdown content directly (Linear hosts the file natively because `/plan` uploaded it via base64).
279
317
 
280
- If found, fetch its content via `mcp__linear__get_attachment({ id: <attachmentId> })`. The tool returns the attachment's content (Linear hosts the file natively since `/plan` uploaded it via base64). Parse the markdown for:
318
+ Parse the markdown for:
281
319
 
282
320
  - Implementation Steps
283
321
  - Files to Modify
@@ -285,7 +323,12 @@ If found, fetch its content via `mcp__linear__get_attachment({ id: <attachmentId
285
323
  - Testing Strategy
286
324
  - External Library Changes (if any β€” these are blockers, not to be implemented)
287
325
 
288
- **If no `plan.md` attachment found**: Create a comment noting that no plan was found, suggest running `/plan <taskId>` first, and skip this task. Set status back to "To Do". Do NOT fall back to reading plan content from comments β€” the attachment is the source of truth.
326
+ **If no `plan.md` attachment found**:
327
+
328
+ - **Default mode**: Create a comment noting that no plan was found, suggest running `/plan <taskId>` first, and skip this task. Set status back to "To Do".
329
+ - **`--auto` mode**: Inline-invoke the `/plan` skill flow for this task to generate `plan.md` attachment + `AI Plan` label, then proceed with implementation. Post a comment in Polish noting the plan was auto-generated. Do NOT skip the task.
330
+
331
+ Do NOT fall back to reading plan content from comments β€” the attachment is the source of truth.
289
332
 
290
333
  #### Step 3b-classify: MANDATORY UI Change Classification
291
334
 
@@ -334,7 +377,9 @@ The agent will:
334
377
  4. Plan TDD cycles for each implementation unit
335
378
  5. Generate the orchestration plan in markdown format
336
379
 
337
- **After receiving the orchestration plan, save it as a native `orchestration.md` attachment on the Linear issue (NOT as a comment):**
380
+ **After receiving the orchestration plan, save it as a native `orchestration.md` attachment on the Linear issue.**
381
+
382
+ **β›” Calling `mcp__linear__save_comment` with the orchestration body is FORBIDDEN. Use `mcp__linear__create_attachment` only.** Re-read Hard Rule #2 if tempted.
338
383
 
339
384
  1. **Check for existing `orchestration.md` attachment** on the task via `mcp__linear__get_issue` (the response includes an `attachments` array).
340
385
  - If one exists, delete it via `mcp__linear__delete_attachment({ id: oldAttachmentId })`. Linear hosts the file natively, so nothing else needs cleanup.
@@ -696,7 +741,10 @@ The agent will provide:
696
741
  - Next subtask details (if any)
697
742
  - Pause point for user confirmation
698
743
 
699
- **IMPORTANT**: ALWAYS wait for user confirmation before proceeding to next subtask.
744
+ **IMPORTANT**:
745
+
746
+ - **Default mode**: ALWAYS wait for user confirmation before proceeding to next subtask.
747
+ - **`--auto` mode**: Skip the wait. The completion comment from Step 3f is the audit trail; proceed directly to Step 3i.
700
748
 
701
749
  #### Step 3i: Move to Next Subtask
702
750
 
@@ -718,7 +766,10 @@ When all subtasks are processed, the agent will return `🏁 Iteration Complete`
718
766
  - Statistics (completed, partial, blocked)
719
767
  - Recommendations for follow-up
720
768
 
721
- **IMPORTANT**: ALWAYS pause and present the final summary to the user.
769
+ **IMPORTANT**:
770
+
771
+ - **Default mode**: ALWAYS pause and present the final summary to the user.
772
+ - **`--auto` mode**: Post the final summary as a Linear comment in Polish on the parent task (or invoked task) and exit cleanly without pausing.
722
773
 
723
774
  ### Step 4a: Session-Wide Agent Evolution
724
775
 
@@ -767,18 +818,18 @@ To Do β†’ In Progress β†’ In Review (if completed)
767
818
 
768
819
  ## Pause Points (3x3 Rule)
769
820
 
770
- **ALWAYS stop and wait for user confirmation at these points:**
821
+ **ALWAYS stop and wait for user confirmation at these points** (skipped in `--auto` β€” see overrides):
771
822
 
772
- | Pause Point | When | What to Show |
773
- | -------------------- | ----------------------------------- | ----------------------------------------- |
774
- | **3x3 Checkpoint** | After every 3 changes | Summary of 3 changes + next 3 steps |
775
- | **Subtask Complete** | After finishing each subtask | Subtask summary + next subtask info |
776
- | **Task Complete** | After finishing all subtasks | Final summary with all results |
777
- | **Blocker Found** | When external dependency found | Blocker details + options |
778
- | **Error/Issue** | When unexpected problem occurs | Error details + proposed solution |
779
- | **Agent Evolution** | After subtask / after final summary | Evolution report with filed Linear issues |
823
+ | Pause Point | When | What to Show | `--auto` behavior |
824
+ | -------------------- | ----------------------------------- | ----------------------------------------- | ------------------------------------------------------------- |
825
+ | **3x3 Checkpoint** | After every 3 changes | Summary of 3 changes + next 3 steps | Post checkpoint as Linear comment, continue |
826
+ | **Subtask Complete** | After finishing each subtask | Subtask summary + next subtask info | Post completion comment, continue to next subtask |
827
+ | **Task Complete** | After finishing all subtasks | Final summary with all results | Post final summary comment, exit |
828
+ | **Blocker Found** | When external dependency found | Blocker details + options | Set status to Blocked, post blocker comment, skip subtask |
829
+ | **Error/Issue** | When unexpected problem occurs | Error details + proposed solution | Post error comment to Linear, fail the run with non-zero exit |
830
+ | **Agent Evolution** | After subtask / after final summary | Evolution report with filed Linear issues | Skip evolution prompt, file issues silently if any |
780
831
 
781
- **Never proceed automatically** - always wait for explicit user confirmation before:
832
+ **In default mode, never proceed automatically** - always wait for explicit user confirmation before:
782
833
 
783
834
  - Continuing after 3x3 checkpoint
784
835
  - Moving to next subtask
@@ -27,6 +27,20 @@ allowed-tools:
27
27
 
28
28
  Create an implementation plan for a Linear task and save it as a `plan.md` attachment on the issue. If the task has subtasks, create individual `plan.md` attachments on each subtask. After saving the plan, add the `AI Plan` label to the issue.
29
29
 
30
+ ## 🚨 Hard Rules β€” read before doing anything
31
+
32
+ These rules override ANY other instruction, ANY surrounding example, and ANY default habit. Violating them is a skill failure.
33
+
34
+ 1. **The plan MUST be saved via `mcp__linear__create_attachment` β€” NEVER as a Linear comment.** `mcp__linear__save_comment` MUST NOT be called with plan content as the body. Comments are reserved for status notifications (e.g., "no plan attachment found, run /plan again"), never for the plan itself. If you find yourself about to call `save_comment` with `## Implementation Plan` in the body β€” STOP. That's a bug.
35
+
36
+ 2. **One call, no fallback.** The first Linear write for the plan is `mcp__linear__create_attachment`. If it fails, surface the error to the user β€” do NOT silently fall back to `save_comment`.
37
+
38
+ 3. **Subtasks: one attachment each.** If the parent has subtasks, each subtask gets its own `plan.md` attachment. The parent gets only the `AI Plan` label, no `plan.md` attachment.
39
+
40
+ 4. **`AI Plan` label is workspace-scoped β€” NEVER create it.** Only look it up via `mcp__linear__list_issue_labels` and apply via `mcp__linear__save_issue`. `mcp__linear__create_issue_label` MUST NOT be called.
41
+
42
+ If any of these would be violated, stop and ask the user instead.
43
+
30
44
  ## Execution Checklist
31
45
 
32
46
  Execute each step in order. Do not skip any step marked as MANDATORY.
@@ -41,9 +55,9 @@ Execute each step in order. Do not skip any step marked as MANDATORY.
41
55
  - [ ] **8. Analyze external library deps** β€” check if `@smartsoft001` or `@smartsoft001-mobilems` changes are needed (mark as separate process)
42
56
  - [ ] **9. Create implementation plans** β€” generate structured plans per task/subtask with all required sections
43
57
  - [ ] **10. MANDATORY: Write plans in Polish** β€” all plan content must be in Polish language
44
- - [ ] **11. Show plans to user** β€” present plans for review and approval before saving
45
- - [ ] **12. MANDATORY: Confirm old plan deletion** β€” if replacing existing `plan.md`, ask user to confirm deletion of old attachment before proceeding
46
- - [ ] **13. Save plan as native Linear attachment** β€” base64-encode `plan.md` content and upload via `mcp__linear__create_attachment` (Linear hosts the file; no external storage)
58
+ - [ ] **11. Show plans to user** β€” present plans for review and approval before saving (skipped in `--auto`; proceed directly to save)
59
+ - [ ] **12. MANDATORY: Confirm old plan deletion** β€” if replacing existing `plan.md`, ask user to confirm deletion of old attachment before proceeding (skipped in `--auto`; delete old attachment automatically)
60
+ - [ ] **13. MANDATORY: Save plan as native Linear attachment** β€” base64-encode `plan.md` content and upload via `mcp__linear__create_attachment`. **Calling `mcp__linear__save_comment` for the plan body is FORBIDDEN.** Linear hosts the file natively; no external storage.
47
61
  - [ ] **14. MANDATORY: Add "AI Plan" label** β€” ensure `AI Plan` label exists on the team and apply it to the invoked issue (the `linearTaskId` passed to `/plan` β€” parent task or subtask, whichever was called)
48
62
  - [ ] **15. Confirm to user** β€” list saved plans with summaries and Linear links
49
63
 
@@ -103,12 +117,30 @@ You create plans that are:
103
117
  ```
104
118
  /plan [linearTaskId]
105
119
  /plan [linearTaskId] --deep # Deep planning with Agent Team (experimental)
120
+ /plan [linearTaskId] --auto # Non-interactive mode for CI / GitHub Actions
106
121
  ```
107
122
 
108
123
  ## Parameters
109
124
 
110
125
  - `linearTaskId` - Linear task ID (e.g., ENG-123)
111
126
  - `--deep` - Enable deep planning with Agent Team (experimental, requires `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`)
127
+ - `--auto` - Non-interactive mode: skip ALL `AskUserQuestion` prompts. Auto-approve plans before saving (no review step), auto-delete stale `plan.md` attachments without confirmation, and silently skip when all plans are up to date (no "regenerate anyway?" prompt). Designed for CI / GitHub Actions runs where no human is at the keyboard.
128
+
129
+ ## Auto Mode (`--auto`)
130
+
131
+ **When `--auto` is set, the skill MUST run end-to-end without any human-in-the-loop prompts.** Apply these overrides:
132
+
133
+ | Default behavior | `--auto` override |
134
+ | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
135
+ | Show plans to user for review/approval before saving | Skip the review step; proceed directly to attachment save |
136
+ | Ask user to confirm deletion of old `plan.md` attachments | Delete old attachments automatically before saving new ones |
137
+ | Ask "regenerate anyway?" when all plans are up-to-date | Exit cleanly with a Linear comment noting all plans are current; no regeneration |
138
+ | Secondary signal prompt (keyword-triggered confirmation to regen) | Ignore the secondary signal; only the mtime rule decides regeneration |
139
+ | `AskUserQuestion` for any decision | Use the option marked **(Recommended)**; if none, fail fast with a Linear comment explaining why |
140
+
141
+ **Hard requirement in `--auto`**: every decision (save, replace, skip) MUST be logged as a Linear comment in Polish so the run remains auditable after the fact. The mtime rule remains authoritative β€” `--auto` does not change *what* gets regenerated, only that no human is asked.
142
+
143
+ **Detection**: The flag `--auto` is provided as a positional/named arg. Treat any of `--auto`, `--ci`, `--non-interactive` as equivalent. Combinable with `--deep` (deep team mode runs without the final approval prompt).
112
144
 
113
145
  ## Instructions
114
146
 
@@ -181,7 +213,10 @@ Create a list of tasks/subtasks that need planning:
181
213
  - `tasksWithExistingPlan`: Array of task IDs with valid, up-to-date plans (skip these)
182
214
  - `oldPlanAttachments`: Map of task ID β†’ `attachmentId` for plans that will be replaced (needed for deletion in Step 9)
183
215
 
184
- **Important**: If ALL tasks already have up-to-date plans, inform the user and ask if they want to regenerate anyway.
216
+ **Important**: If ALL tasks already have up-to-date plans:
217
+
218
+ - **Default mode**: Inform the user and ask if they want to regenerate anyway.
219
+ - **`--auto` mode**: Exit cleanly with a Linear comment in Polish noting all plans are current; do NOT regenerate.
185
220
 
186
221
  ### Step 4: Analyze Previous Commits
187
222
 
@@ -644,7 +679,9 @@ When using `--deep` flag and the Planning Team has completed its analysis, appen
644
679
 
645
680
  **This step applies only when replacing existing plans** (i.e., `oldPlanAttachments` from Step 3a is not empty).
646
681
 
647
- Before saving new plans, ask the user to confirm deletion of old `plan.md` attachments:
682
+ **`--auto` mode**: Skip the confirmation prompt. For each task in `oldPlanAttachments`, delete the Linear attachment via `mcp__linear__delete_attachment({ id: attachmentId })` and proceed directly to Step 9a. Log the deletions in the final summary comment.
683
+
684
+ **Default mode** (interactive): Before saving new plans, ask the user to confirm deletion of old `plan.md` attachments:
648
685
 
649
686
  ```markdown
650
687
  ## ZastΔ…pienie istniejΔ…cych planΓ³w
@@ -674,6 +711,8 @@ Use `AskUserQuestion` tool with options:
674
711
 
675
712
  ### Step 9a: Save Plan as Linear Attachment
676
713
 
714
+ **β›” 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.**
715
+
677
716
  For each task that needs planning, upload the plan content directly to Linear via `mcp__linear__create_attachment` β€” Linear hosts the file itself, no intermediate storage.
678
717
 
679
718
  #### 9a.1 β€” Prepare plan content
@@ -922,4 +961,9 @@ _Plan generated by Claude Code_
922
961
 
923
962
  ---
924
963
 
925
- **Important**: Before saving the plans as attachments, show them to the user for review and approval. The plan content is written to `/tmp/claude-plans/<taskId>-plan.md`, base64-encoded, and uploaded as a native Linear attachment via `mcp__linear__create_attachment`. After that, the `AI Plan` label is applied to the invoked issue.
964
+ **Important**:
965
+
966
+ - **Default mode**: Before saving the plans as attachments, show them to the user for review and approval.
967
+ - **`--auto` mode**: Skip the review step; proceed directly to saving the attachments.
968
+
969
+ The plan content is written to `/tmp/claude-plans/<taskId>-plan.md`, base64-encoded, and uploaded as a native Linear attachment via `mcp__linear__create_attachment`. After that, the `AI Plan` label is applied to the invoked issue.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "flow-external",
3
3
  "description": "Development flow skills for standalone Angular 6-11 museum projects without framework (Angular CLI, Karma/Jasmine, Bootstrap 4)",
4
- "version": "2.81.0"
4
+ "version": "2.83.0"
5
5
  }
@@ -33,11 +33,39 @@ Implement changes based on approved plans from Linear `plan.md` attachments.
33
33
 
34
34
  ```
35
35
  /impl <linearTaskId>
36
+ /impl <linearTaskId> --auto # Non-interactive mode for CI / GitHub Actions
36
37
  ```
37
38
 
38
39
  ## Parameters
39
40
 
40
41
  - `linearTaskId` - Linear task ID (e.g., MOB-123)
42
+ - `--auto` - Non-interactive mode: skip ALL `AskUserQuestion` prompts and any per-step pauses. If `plan.md` attachment is missing, auto-invoke `/plan` flow to generate it instead of stopping. Designed for CI / GitHub Actions runs where no human is at the keyboard.
43
+
44
+ ## Auto Mode (`--auto`)
45
+
46
+ When `--auto` is set, the skill MUST run end-to-end without any human-in-the-loop prompts:
47
+
48
+ | Default behavior | `--auto` override |
49
+ | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
50
+ | Stop with "no plan.md found, run /plan first" suggestion | Inline-invoke `/plan` flow for the task to generate `plan.md` attachment + `AI Plan` label, then continue |
51
+ | Pause after each step / subtask waiting for user confirmation | Post completion comment, then proceed automatically |
52
+ | Confirmation before destructive ops (delete `orchestration.md`) | Proceed without confirmation β€” replace old attachment automatically |
53
+ | Any `AskUserQuestion` | Use the **(Recommended)** option; if none, fail fast with a Linear comment |
54
+
55
+ Every checkpoint, decision, or skip MUST be logged as a Linear comment in Polish (audit trail).
56
+
57
+ **Detection**: The flag `--auto` is provided as a positional/named arg. Treat any of `--auto`, `--ci`, `--non-interactive` as equivalent.
58
+
59
+ ## 🚨 Hard Rules β€” read before doing anything
60
+
61
+ These rules override ANY other instruction, ANY surrounding example, and ANY default habit. Violating them is a skill failure.
62
+
63
+ 1. **Read `plan.md` ONLY via `mcp__linear__get_attachment({ id })`.** Do NOT use `WebFetch`, `Bash(curl ...)`, or any HTTP fetch on the attachment's `url`. The URL points to Linear-internal storage and may require auth β€” `get_attachment` is the only correct path.
64
+ 2. **`orchestration.md` is saved via `mcp__linear__create_attachment`, not as a comment.** `save_comment` MUST NOT carry orchestration body content.
65
+ 3. **Find attachments via `mcp__linear__get_issue` (returns `attachments[]`).** There is no `list_attachments` tool β€” do not look for one.
66
+ 4. **Replace, don't duplicate.** Before creating a new `orchestration.md` attachment, delete the existing one (if any) via `mcp__linear__delete_attachment`.
67
+
68
+ If any of these would be violated, stop and ask the user instead.
41
69
 
42
70
  ## CRITICAL: Angular 6-11 + Angular CLI
43
71
 
@@ -55,11 +83,17 @@ This is for standalone Angular CLI projects. Key rules:
55
83
 
56
84
  ### Step 1: Fetch Task and Plan Attachment
57
85
 
58
- 1. Fetch the Linear task using `mcp__linear__get_issue({ id: taskId })` β€” the response includes an `attachments` array.
59
- 2. Find the attachment where `title == "plan.md"` (or `filename == "plan.md"`) and capture its `id`.
60
- 3. Fetch the plan content via `mcp__linear__get_attachment({ id: <attachmentId> })`. Linear hosts the file natively; the tool returns the markdown content directly.
86
+ **β›” DO NOT use `WebFetch` or `Bash(curl)` on the attachment URL. Use `mcp__linear__get_attachment({ id })` only.** Re-read Hard Rule #1 if tempted.
87
+
88
+ 1. `mcp__linear__get_issue({ id: taskId })` β€” the response includes an `attachments[]` array.
89
+ 2. Find the attachment where `title == "plan.md"` (or `filename == "plan.md"`) and capture its `id`. Do NOT use the `url` field for fetching.
90
+ 3. `mcp__linear__get_attachment({ id: <attachmentId> })` β€” returns the markdown content directly (Linear hosts the file natively).
61
91
  4. Parse the plan content.
62
- 5. If no `plan.md` attachment exists, inform the user and suggest running `/plan <taskId>` first. Do NOT fall back to parsing plan content from comments.
92
+ 5. If no `plan.md` attachment exists:
93
+ - **Default mode**: inform the user and suggest running `/plan <taskId>` first. Stop the skill.
94
+ - **`--auto` mode**: inline-invoke the `/plan` skill flow for this task to generate `plan.md` attachment + `AI Plan` label, then proceed with implementation. Post a Linear comment in Polish noting the plan was auto-generated.
95
+
96
+ Do NOT fall back to parsing plan content from comments, and do NOT attempt `curl`/`WebFetch` on a URL.
63
97
 
64
98
  ### Step 2: Detect Project Structure
65
99
 
@@ -91,6 +125,8 @@ If task has subtasks:
91
125
 
92
126
  ### Step 3a: Save Orchestration Plan as Native Linear Attachment
93
127
 
128
+ **β›” Calling `mcp__linear__save_comment` with the orchestration body is FORBIDDEN. Use `mcp__linear__create_attachment` only.** Re-read Hard Rule #2 if tempted.
129
+
94
130
  Use `shared-impl-orchestrator` agent to generate a `🎭 Agent Orchestration Plan` that lists which agents run in what order (Angular 6-11 + CLI context).
95
131
 
96
132
  Then save it as an `orchestration.md` attachment on the task (not as a comment):
@@ -27,11 +27,38 @@ Create a structured implementation plan for a Linear task and save it as a `plan
27
27
 
28
28
  ```
29
29
  /plan <linearTaskId>
30
+ /plan <linearTaskId> --auto # Non-interactive mode for CI / GitHub Actions
30
31
  ```
31
32
 
32
33
  ## Parameters
33
34
 
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 prompt before user runs `/impl` | Skip the prompt; finish with a Linear comment confirming plan saved |
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 MUST be saved via `mcp__linear__create_attachment` β€” NEVER as a Linear comment.** `mcp__linear__save_comment` MUST NOT be called with plan content as the body. Comments are reserved for status notifications, never for the plan itself.
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.
35
62
 
36
63
  ## CRITICAL: External Project Context
37
64
 
@@ -155,16 +182,20 @@ For complex tasks, create subtasks in Linear:
155
182
 
156
183
  ### Step 6: Save Plan as Native Linear Attachment
157
184
 
185
+ **β›” 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.**
186
+
158
187
  Upload the plan directly to Linear via `mcp__linear__create_attachment` β€” Linear hosts the file itself, no external storage needed.
159
188
 
160
189
  #### 6.1 β€” If replacing an existing plan, confirm with user
161
190
 
162
- If a `plan.md` attachment is being replaced, ask the user via `AskUserQuestion`:
191
+ If a `plan.md` attachment is being replaced:
163
192
 
164
- - "Tak, usuΕ„ stary plan i zapisz nowy" (Recommended)
165
- - "Anuluj"
193
+ - **Default mode**: ask the user via `AskUserQuestion`:
194
+ - "Tak, usuΕ„ stary plan i zapisz nowy" (Recommended)
195
+ - "Anuluj"
166
196
 
167
- If confirmed, delete the Linear attachment via `mcp__linear__delete_attachment({ id: oldAttachmentId })`.
197
+ If confirmed, delete the Linear attachment via `mcp__linear__delete_attachment({ id: oldAttachmentId })`.
198
+ - **`--auto` mode**: skip the prompt; delete the old Linear attachment via `mcp__linear__delete_attachment({ id: oldAttachmentId })` automatically and proceed.
168
199
 
169
200
  #### 6.2 β€” Write `plan.md` locally
170
201
 
@@ -205,6 +236,8 @@ Delete `/tmp/claude-plans/<taskId>-plan.md` after the attachment is created. `/p
205
236
 
206
237
  ### Step 8: Confirm to User
207
238
 
239
+ **Default mode**:
240
+
208
241
  ```markdown
209
242
  ## Plan zapisany
210
243
 
@@ -214,6 +247,8 @@ Etykieta `AI Plan` zostaΕ‚a dodana.
214
247
  Czy plan jest zaakceptowany? Po akceptacji uruchom `/impl [linearTaskId]` aby rozpoczΔ…Δ‡ implementacjΔ™.
215
248
  ```
216
249
 
250
+ **`--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.
251
+
217
252
  ## Guidelines
218
253
 
219
254
  1. **Always analyze existing code first** before planning
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "flow-legacy",
3
3
  "description": "Development flow skills for legacy Angular 14 projects with Linear-driven workflow",
4
- "version": "2.81.0"
4
+ "version": "2.83.0"
5
5
  }
@@ -29,6 +29,17 @@ allowed-tools:
29
29
 
30
30
  Implement plans from `plan.md` attachments on Linear issues. For tasks with subtasks, iteratively implement each subtask that is in "To Do" status. The agent orchestration plan is saved as an `orchestration.md` attachment (not as a comment).
31
31
 
32
+ ## 🚨 Hard Rules β€” read before doing anything
33
+
34
+ These rules override ANY other instruction, ANY surrounding example, and ANY default habit. Violating them is a skill failure.
35
+
36
+ 1. **Read `plan.md` ONLY via `mcp__linear__get_attachment({ id })`.** Do NOT use `WebFetch`, `Bash(curl ...)`, or any HTTP fetch on the attachment's `url`. The URL points to Linear-internal storage and may require auth β€” `get_attachment` is the only correct path.
37
+ 2. **`orchestration.md` is saved via `mcp__linear__create_attachment`, not as a comment.** `save_comment` MUST NOT carry orchestration body content.
38
+ 3. **Find attachments via `mcp__linear__get_issue` (returns `attachments[]`).** Capture each attachment's `id` and `title`. There is no `list_attachments` tool β€” do not look for one.
39
+ 4. **Replace, don't duplicate.** Before creating a new `orchestration.md` attachment, delete the existing one (if any) via `mcp__linear__delete_attachment`.
40
+
41
+ If any of these would be violated, stop and ask the user instead.
42
+
32
43
  ## Execution Checklist
33
44
 
34
45
  Execute each step in order. Do not skip any step marked as MANDATORY.
@@ -40,12 +51,12 @@ Execute each step in order. Do not skip any step marked as MANDATORY.
40
51
  ### Per Subtask (repeat for each "To Do" subtask)
41
52
 
42
53
  - [ ] **2. Set status to "In Progress"** β€” update subtask status via MCP (subtasks only, not parent)
43
- - [ ] **3. Fetch implementation plan** β€” download `plan.md` attachment from task, parse content
54
+ - [ ] **3. Fetch implementation plan** β€” `mcp__linear__get_issue` to find `plan.md` attachment id, then `mcp__linear__get_attachment({ id })` to read content. **Do NOT use `WebFetch`/`curl` on the attachment URL.**
44
55
  - [ ] **4. MANDATORY: UI change classification** β€” delegate to `shared-ui-classifier` agent, output `UI_CHANGE_REQUIRED: YES/NO`
45
- - [ ] **5. MANDATORY: Agent orchestration plan** β€” delegate to `shared-impl-orchestrator` with `Angular Version: 14 (LEGACY)`, save result as `orchestration.md` attachment on the task (replacing any existing one)
56
+ - [ ] **5. MANDATORY: Agent orchestration plan** β€” delegate to `shared-impl-orchestrator` with `Angular Version: 14 (LEGACY)`, save result as `orchestration.md` attachment via `mcp__linear__create_attachment` (replace any existing one). **Calling `mcp__linear__save_comment` with the orchestration body is FORBIDDEN.**
46
57
  - [ ] **6. Check external library blockers** β€” if blockers found, set status to Blocked and skip
47
58
  - [ ] **7. Capture "before" screenshots** β€” if `UI_CHANGE_REQUIRED: YES`, launch `screenshot-reporter` in background
48
- - [ ] **8. MANDATORY: Implement with 3x3 rule** β€” pause every 3 changes, use `shared-tdd-developer` for ALL code (RED β†’ GREEN β†’ REFACTOR)
59
+ - [ ] **8. MANDATORY: Implement with 3x3 rule** β€” pause every 3 changes (skip pause in `--auto`, log checkpoint as Linear comment instead), use `shared-tdd-developer` for ALL code (RED β†’ GREEN β†’ REFACTOR)
49
60
  - [ ] **9. MANDATORY: Use Angular 14 patterns** β€” `*ngIf`/`*ngFor`, constructor DI, `@Input()`/`@Output()`, BehaviorSubject β€” NEVER signals, `@if`/`@for`, `inject()`
50
61
  - [ ] **10. Verify implementation** β€” run tests, lint, build check
51
62
  - [ ] **11. Capture "after" screenshots** β€” if `UI_CHANGE_REQUIRED: YES`, capture + post comparison to Linear + cleanup
@@ -54,12 +65,12 @@ Execute each step in order. Do not skip any step marked as MANDATORY.
54
65
  - [ ] **14. MANDATORY: Write reports in Polish** β€” all Linear comments must be in Polish language
55
66
  - [ ] **15. Update status** β€” delegate to `shared-linear-subtask-iterator` for status determination
56
67
  - [ ] **16. Agent evolution** β€” if user confirmed feedback, delegate to `shared-agent-evolver`
57
- - [ ] **17. Pause for user confirmation** β€” ALWAYS wait before proceeding to next subtask
68
+ - [ ] **17. Pause for user confirmation** β€” wait before proceeding to next subtask (skipped in `--auto`; post completion comment and continue)
58
69
 
59
70
  ### Finalization
60
71
 
61
72
  - [ ] **18. Final summary** β€” present summary of all subtasks with statuses
62
- - [ ] **19. ALWAYS pause** β€” wait for user confirmation at end
73
+ - [ ] **19. ALWAYS pause** β€” wait for user confirmation at end (skipped in `--auto`; post final summary comment and exit)
63
74
 
64
75
  ### Task Progress Tracking
65
76
 
@@ -207,11 +218,30 @@ export class DataService {
207
218
 
208
219
  ```
209
220
  /impl [linearTaskId]
221
+ /impl [linearTaskId] --auto # Non-interactive mode for CI / GitHub Actions
210
222
  ```
211
223
 
212
224
  ## Parameters
213
225
 
214
226
  - `linearTaskId` - Linear task ID (e.g., ENG-123)
227
+ - `--auto` - Non-interactive mode: skip ALL `AskUserQuestion` prompts, 3x3 checkpoint pauses, per-subtask pauses, and the final end pause. If `plan.md` attachment is missing, auto-invoke `/plan` flow to generate it instead of posting a "run /plan first" comment and skipping. Designed for CI / GitHub Actions runs where no human is at the keyboard.
228
+
229
+ ## Auto Mode (`--auto`)
230
+
231
+ **When `--auto` is set, the skill MUST run end-to-end without any human-in-the-loop prompts.** Apply these overrides:
232
+
233
+ | Default behavior | `--auto` override |
234
+ | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
235
+ | Post comment "no plan.md found, run /plan first" + skip | Inline-invoke `/plan` flow for the task to generate `plan.md` attachment + `AI Plan` label, then continue |
236
+ | 3x3 rule pauses every 3 changes asking "Continue?" | Log the checkpoint summary as a status comment, then continue automatically |
237
+ | Pause after each subtask waiting for user confirmation | Post subtask completion comment, then proceed to next subtask |
238
+ | Final end pause "wait for user confirmation" | Post final summary comment and exit cleanly |
239
+ | `AskUserQuestion` for any decision | Use the option marked **(Recommended)**; if none, fail fast with a Linear comment explaining why |
240
+ | Confirmation before destructive ops (delete attachments) | Proceed without confirmation β€” replace old `orchestration.md` automatically |
241
+
242
+ **Hard requirement in `--auto`**: every checkpoint, decision, or skip MUST be logged as a Linear comment in Polish so the run remains auditable after the fact. Comments replace the interactive prompts β€” they are the audit trail.
243
+
244
+ **Detection**: The flag `--auto` is provided as a positional/named arg. Treat any of `--auto`, `--ci`, `--non-interactive` as equivalent.
215
245
 
216
246
  ## Instructions
217
247
 
@@ -246,9 +276,14 @@ Do NOT change status for parent tasks.
246
276
 
247
277
  #### Step 3b: Fetch Implementation Plan from `plan.md` Attachment
248
278
 
249
- Use `mcp__linear__get_issue({ id: taskId })` on the current task/subtask β€” the response includes an `attachments` array. Find the attachment where `title == "plan.md"` (or `filename == "plan.md"`) and capture its `id`.
279
+ **β›” DO NOT use `WebFetch` or `Bash(curl)` on the attachment URL. Use `mcp__linear__get_attachment({ id })` only.** Re-read Hard Rule #1 if tempted.
250
280
 
251
- If found, fetch its content via `mcp__linear__get_attachment({ id: <attachmentId> })` (Linear hosts the file natively). Parse the markdown for:
281
+ Two-step retrieval:
282
+
283
+ 1. `mcp__linear__get_issue({ id: taskId })` β†’ response includes `attachments[]`. Find the entry where `title == "plan.md"` (or `filename == "plan.md"`) and capture its `id`. Do NOT use the `url` field for fetching.
284
+ 2. `mcp__linear__get_attachment({ id: <attachmentId> })` β†’ returns the markdown content directly (Linear hosts the file natively).
285
+
286
+ Parse the markdown for:
252
287
 
253
288
  - Implementation Steps
254
289
  - Files to Modify
@@ -256,7 +291,12 @@ If found, fetch its content via `mcp__linear__get_attachment({ id: <attachmentId
256
291
  - Testing Strategy
257
292
  - External Library Changes (blockers β€” not to be implemented)
258
293
 
259
- **If no `plan.md` attachment found**: Create a comment noting that no plan was found, suggest running `/plan <taskId>` first, and skip this task. Set status back to "To Do". Do NOT fall back to parsing plan content from comments β€” the attachment is the source of truth.
294
+ **If no `plan.md` attachment found**:
295
+
296
+ - **Default mode**: Create a comment noting that no plan was found, suggest running `/plan <taskId>` first, and skip this task. Set status back to "To Do".
297
+ - **`--auto` mode**: Inline-invoke the `/plan` skill flow for this task to generate `plan.md` attachment + `AI Plan` label, then proceed with implementation. Post a comment in Polish noting the plan was auto-generated. Do NOT skip the task.
298
+
299
+ Do NOT fall back to parsing plan content from comments β€” the attachment is the source of truth.
260
300
 
261
301
  #### Step 3b-classify: MANDATORY UI Change Classification
262
302
 
@@ -306,7 +346,9 @@ The agent will:
306
346
  4. Plan TDD cycles for each implementation unit
307
347
  5. Generate the orchestration plan in markdown format
308
348
 
309
- **After receiving the orchestration plan, save it as a native `orchestration.md` attachment on the Linear issue (NOT as a comment):**
349
+ **After receiving the orchestration plan, save it as a native `orchestration.md` attachment on the Linear issue.**
350
+
351
+ **β›” Calling `mcp__linear__save_comment` with the orchestration body is FORBIDDEN. Use `mcp__linear__create_attachment` only.** Re-read Hard Rule #2 if tempted.
310
352
 
311
353
  1. **Check for existing `orchestration.md` attachment** on the task via `mcp__linear__get_issue` (response includes `attachments`).
312
354
  - If one exists, delete it via `mcp__linear__delete_attachment({ id: oldAttachmentId })`. Linear hosts the file natively, so nothing else needs cleanup.
@@ -589,7 +631,10 @@ The agent will provide:
589
631
  - Next subtask details (if any)
590
632
  - Pause point for user confirmation
591
633
 
592
- **IMPORTANT**: ALWAYS wait for user confirmation before proceeding to next subtask.
634
+ **IMPORTANT**:
635
+
636
+ - **Default mode**: ALWAYS wait for user confirmation before proceeding to next subtask.
637
+ - **`--auto` mode**: Skip the wait. The completion comment from Step 3f is the audit trail; proceed directly to Step 3i.
593
638
 
594
639
  #### Step 3i: Move to Next Subtask
595
640
 
@@ -611,7 +656,10 @@ When all subtasks are processed, the agent will return `🏁 Iteration Complete`
611
656
  - Statistics (completed, partial, blocked)
612
657
  - Recommendations for follow-up
613
658
 
614
- **IMPORTANT**: ALWAYS pause and present the final summary to the user.
659
+ **IMPORTANT**:
660
+
661
+ - **Default mode**: ALWAYS pause and present the final summary to the user.
662
+ - **`--auto` mode**: Post the final summary as a Linear comment in Polish on the parent task (or invoked task) and exit cleanly without pausing.
615
663
 
616
664
  ## Status Flow
617
665
 
@@ -623,18 +671,18 @@ To Do β†’ In Progress β†’ In Review (if completed)
623
671
 
624
672
  ## Pause Points (3x3 Rule)
625
673
 
626
- **ALWAYS stop and wait for user confirmation at these points:**
674
+ **ALWAYS stop and wait for user confirmation at these points** (skipped in `--auto` β€” see overrides):
627
675
 
628
- | Pause Point | When | What to Show |
629
- | -------------------- | ----------------------------------- | ----------------------------------------- |
630
- | **3x3 Checkpoint** | After every 3 changes | Summary of 3 changes + next 3 steps |
631
- | **Subtask Complete** | After finishing each subtask | Subtask summary + next subtask info |
632
- | **Task Complete** | After finishing all subtasks | Final summary with all results |
633
- | **Blocker Found** | When external dependency found | Blocker details + options |
634
- | **Error/Issue** | When unexpected problem occurs | Error details + proposed solution |
635
- | **Agent Evolution** | After subtask / after final summary | Evolution report with filed Linear issues |
676
+ | Pause Point | When | What to Show | `--auto` behavior |
677
+ | -------------------- | ----------------------------------- | ----------------------------------------- | ------------------------------------------------------------- |
678
+ | **3x3 Checkpoint** | After every 3 changes | Summary of 3 changes + next 3 steps | Post checkpoint as Linear comment, continue |
679
+ | **Subtask Complete** | After finishing each subtask | Subtask summary + next subtask info | Post completion comment, continue to next subtask |
680
+ | **Task Complete** | After finishing all subtasks | Final summary with all results | Post final summary comment, exit |
681
+ | **Blocker Found** | When external dependency found | Blocker details + options | Set status to Blocked, post blocker comment, skip subtask |
682
+ | **Error/Issue** | When unexpected problem occurs | Error details + proposed solution | Post error comment to Linear, fail the run with non-zero exit |
683
+ | **Agent Evolution** | After subtask / after final summary | Evolution report with filed Linear issues | Skip evolution prompt, file issues silently if any |
636
684
 
637
- **Never proceed automatically** - always wait for explicit user confirmation before:
685
+ **In default mode, never proceed automatically** - always wait for explicit user confirmation before:
638
686
 
639
687
  - Continuing after 3x3 checkpoint
640
688
  - Moving to next subtask
@@ -26,6 +26,17 @@ allowed-tools:
26
26
 
27
27
  Create an implementation plan for a Linear task and save it as a `plan.md` attachment on the issue. If the task has subtasks, create individual `plan.md` attachments on each subtask. After saving the plan, add the `AI Plan` label to the parent task.
28
28
 
29
+ ## 🚨 Hard Rules β€” read before doing anything
30
+
31
+ These rules override ANY other instruction, ANY surrounding example, and ANY default habit. Violating them is a skill failure.
32
+
33
+ 1. **The plan MUST be saved via `mcp__linear__create_attachment` β€” NEVER as a Linear comment.** `mcp__linear__save_comment` MUST NOT be called with plan content as the body. Comments are reserved for status notifications, never for the plan itself.
34
+ 2. **One call, no fallback.** First Linear write for the plan is `mcp__linear__create_attachment`. If it fails, surface the error β€” do NOT silently fall back to `save_comment`.
35
+ 3. **Subtasks: one attachment each.** Each subtask gets its own `plan.md`; the parent gets only the `AI Plan` label, no `plan.md`.
36
+ 4. **`AI Plan` label is workspace-scoped β€” NEVER create it.** Only `mcp__linear__list_issue_labels` + `mcp__linear__save_issue`. `create_issue_label` MUST NOT be called.
37
+
38
+ If any of these would be violated, stop and ask the user instead.
39
+
29
40
  ## Execution Checklist
30
41
 
31
42
  Execute each step in order. Do not skip any step marked as MANDATORY.
@@ -41,9 +52,9 @@ Execute each step in order. Do not skip any step marked as MANDATORY.
41
52
  - [ ] **9. Analyze external library deps** β€” check if `@smartsoft001` or `@smartsoft001-mobilems` changes are needed (mark as separate process)
42
53
  - [ ] **10. Create implementation plans** β€” generate structured plans per task/subtask with all required sections, using Angular 14 patterns
43
54
  - [ ] **11. MANDATORY: Write plans in Polish** β€” all plan content must be in Polish language
44
- - [ ] **12. Show plans to user** β€” present plans for review and approval before saving
45
- - [ ] **13. MANDATORY: Confirm old plan deletion** β€” if replacing existing `plan.md`, ask user to confirm deletion of old attachment before proceeding
46
- - [ ] **14. Save plan as native Linear attachment** β€” base64-encode `plan.md` content and upload via `mcp__linear__create_attachment` (Linear hosts the file; no external storage)
55
+ - [ ] **12. Show plans to user** β€” present plans for review and approval before saving (skipped in `--auto`; proceed directly to save)
56
+ - [ ] **13. MANDATORY: Confirm old plan deletion** β€” if replacing existing `plan.md`, ask user to confirm deletion of old attachment before proceeding (skipped in `--auto`; delete old attachment automatically)
57
+ - [ ] **14. MANDATORY: Save plan as native Linear attachment** β€” base64-encode `plan.md` content and upload via `mcp__linear__create_attachment`. **Calling `mcp__linear__save_comment` for the plan body is FORBIDDEN.** Linear hosts the file natively; no external storage.
47
58
  - [ ] **15. MANDATORY: Add "AI Plan" label** β€” ensure `AI Plan` label exists on the team and apply it to the invoked issue (the `linearTaskId` passed to `/plan` β€” parent task or subtask, whichever was called)
48
59
  - [ ] **16. Confirm to user** β€” list saved plans with summaries and Linear links
49
60
 
@@ -104,11 +115,29 @@ You create plans that are:
104
115
 
105
116
  ```
106
117
  /plan [linearTaskId]
118
+ /plan [linearTaskId] --auto # Non-interactive mode for CI / GitHub Actions
107
119
  ```
108
120
 
109
121
  ## Parameters
110
122
 
111
123
  - `linearTaskId` - Linear task ID (e.g., ENG-123)
124
+ - `--auto` - Non-interactive mode: skip ALL `AskUserQuestion` prompts. Auto-approve plans before saving (no review step), auto-delete stale `plan.md` attachments without confirmation, and silently skip when all plans are up to date (no "regenerate anyway?" prompt). Designed for CI / GitHub Actions runs where no human is at the keyboard.
125
+
126
+ ## Auto Mode (`--auto`)
127
+
128
+ **When `--auto` is set, the skill MUST run end-to-end without any human-in-the-loop prompts.** Apply these overrides:
129
+
130
+ | Default behavior | `--auto` override |
131
+ | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
132
+ | Show plans to user for review/approval before saving | Skip the review step; proceed directly to attachment save |
133
+ | Ask user to confirm deletion of old `plan.md` attachments | Delete old attachments automatically before saving new ones |
134
+ | Ask "regenerate anyway?" when all plans are up-to-date | Exit cleanly with a Linear comment noting all plans are current; no regeneration |
135
+ | Secondary signal prompt (keyword-triggered confirmation to regen) | Ignore the secondary signal; only the mtime rule decides regeneration |
136
+ | `AskUserQuestion` for any decision | Use the option marked **(Recommended)**; if none, fail fast with a Linear comment explaining why |
137
+
138
+ **Hard requirement in `--auto`**: every decision (save, replace, skip) MUST be logged as a Linear comment in Polish so the run remains auditable after the fact. The mtime rule remains authoritative β€” `--auto` does not change *what* gets regenerated, only that no human is asked.
139
+
140
+ **Detection**: The flag `--auto` is provided as a positional/named arg. Treat any of `--auto`, `--ci`, `--non-interactive` as equivalent.
112
141
 
113
142
  ## Angular 14 Legacy Patterns
114
143
 
@@ -195,7 +224,10 @@ If `planAttachment` exists and no comment is newer than it, but the user's lates
195
224
  - `tasksWithExistingPlan`: Array of task IDs with up-to-date plans
196
225
  - `oldPlanAttachments`: Map of task ID β†’ `attachmentId` for plans being replaced
197
226
 
198
- **Important**: If ALL tasks already have up-to-date plans, inform the user and ask if they want to regenerate anyway.
227
+ **Important**: If ALL tasks already have up-to-date plans:
228
+
229
+ - **Default mode**: Inform the user and ask if they want to regenerate anyway.
230
+ - **`--auto` mode**: Exit cleanly with a Linear comment in Polish noting all plans are current; do NOT regenerate.
199
231
 
200
232
  ### Step 4: Analyze Previous Commits
201
233
 
@@ -518,7 +550,9 @@ _Plan generated by Claude Code (flow-legacy)_
518
550
 
519
551
  **This step applies only when replacing existing plans** (`oldPlanAttachments` from Step 3a is not empty).
520
552
 
521
- Before saving new plans, ask the user to confirm deletion of old `plan.md` attachments:
553
+ **`--auto` mode**: Skip the confirmation prompt. For each task in `oldPlanAttachments`, delete the Linear attachment via `mcp__linear__delete_attachment({ id: attachmentId })` and proceed directly to Step 9a. Log the deletions in the final summary comment.
554
+
555
+ **Default mode** (interactive): Before saving new plans, ask the user to confirm deletion of old `plan.md` attachments:
522
556
 
523
557
  ```markdown
524
558
  ## ZastΔ…pienie istniejΔ…cych planΓ³w
@@ -546,6 +580,8 @@ Use `AskUserQuestion` with options:
546
580
 
547
581
  ### Step 9a: Save Plan as Native Linear Attachment
548
582
 
583
+ **β›” 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.**
584
+
549
585
  For each task that needs planning, upload the plan content directly to Linear (no external storage).
550
586
 
551
587
  #### 9a.1 β€” Write `plan.md` locally
@@ -630,4 +666,9 @@ After saving:
630
666
 
631
667
  ---
632
668
 
633
- **Important**: Before saving the plans as attachments, show them to the user for review and approval. The plan content is written to `/tmp/claude-plans/<taskId>-plan.md`, base64-encoded, and uploaded as a native Linear attachment via `mcp__linear__create_attachment`. After that, the `AI Plan` label is applied to the invoked issue.
669
+ **Important**:
670
+
671
+ - **Default mode**: Before saving the plans as attachments, show them to the user for review and approval.
672
+ - **`--auto` mode**: Skip the review step; proceed directly to saving the attachments.
673
+
674
+ The plan content is written to `/tmp/claude-plans/<taskId>-plan.md`, base64-encoded, and uploaded as a native Linear attachment via `mcp__linear__create_attachment`. After that, the `AI Plan` label is applied to the invoked issue.