@smartsoft001/pro-claude-plugins 0.9.0 → 0.11.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/pro-claude-plugins",
3
- "version": "0.9.0",
3
+ "version": "0.11.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": "0.9.0"
4
+ "version": "0.11.0"
5
5
  }
@@ -23,11 +23,27 @@ Create a conventional commit message based on Linear task and staged changes.
23
23
 
24
24
  ```
25
25
  /commit [linearTaskId]
26
+ /commit [linearTaskId] --auto # Non-interactive mode for fully autonomous runs
26
27
  ```
27
28
 
28
29
  ## Parameters
29
30
 
30
31
  - `linearTaskId` - Linear task ID (e.g., ENG-123)
32
+ - `--auto` - Non-interactive mode: skip ALL `AskUserQuestion` prompts and the message-approval step. Treat any of `--auto`, `--ci`, `--non-interactive` as equivalent.
33
+
34
+ ## Auto Mode (`--auto`)
35
+
36
+ **When `--auto` is set, the skill MUST run end-to-end without any human-in-the-loop prompts.** Apply these overrides:
37
+
38
+ | Default behavior | `--auto` override |
39
+ | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
40
+ | Analyze only staged changes; if nothing staged, warn and don't commit | If nothing is staged but the working tree has task-related modifications, STAGE THEM AUTOMATICALLY (`git add -A`, excluding obvious non-source artifacts — loose `*.png` in the repo root, `.playwright-mcp/`, `docs/mockups/`, `.benchmark-test/`, `.claude/settings.json`) and continue. Never ask "would you like me to stage" |
41
+ | Completeness prompt (Step 2.5 `AskUserQuestion`) | Skip the prompt; commit the current changes and note any suspected gaps in the commit body |
42
+ | Show message to user for approval before committing | Skip the approval; create the commit immediately with the generated message |
43
+ | Any other `AskUserQuestion` | Use the option marked **(Recommended)**; if none, pick the safest option and continue |
44
+ | Nothing to commit at all | If an existing commit already references this task (e.g. `/impl` committed the work itself), exit cleanly with a one-line statement naming that commit. Otherwise exit cleanly stating there was nothing to commit. No question either way |
45
+
46
+ **Hard requirement in `--auto`**: the run MUST end in exactly one of two states — a created commit, or an explicit one-line clean-exit statement that nothing needed committing. Ending the run with a question is a skill failure (in one-shot `--print` execution nobody can answer, the commit is silently lost, and the caller has to fall back to an emergency commit).
31
47
 
32
48
  ## Execution Checklist
33
49
 
@@ -35,10 +51,10 @@ Execute each step in order. Do not skip any step marked as MANDATORY.
35
51
 
36
52
  - [ ] **1. Fetch Linear task** — get title, description, labels/type from MCP Linear server
37
53
  - [ ] **2. Analyze staged changes** — run `git diff --cached` to understand scope
38
- - [ ] **3. Verify completeness** — compare task requirements with staged changes; if incomplete, ask user whether to continue or stop
54
+ - [ ] **3. Verify completeness** — compare task requirements with staged changes; if incomplete, ask user whether to continue or stop (in `--auto`: no prompt — continue and note gaps in the body)
39
55
  - [ ] **4. Read commitlint config** — read `commitlint.config.js` for valid scopes and format
40
56
  - [ ] **5. Generate commit message** — draft `<type>(<scope>): <subject>` with body and `Refs: <linearTaskId>`
41
- - [ ] **6. Show message to user** — present commit message for approval before proceeding
57
+ - [ ] **6. Show message to user** — present commit message for approval before proceeding (skipped in `--auto`: commit immediately)
42
58
  - [ ] **7. MANDATORY: Pre-commit preparation** — run `nvm use 24` then `npm run format`, stage any formatting changes
43
59
  - [ ] **8. Create commit** — execute `git commit` with the approved message
44
60
  - [ ] **9. Parallelization analysis (optional)** — fetch Linear comments, search for orchestration plan, delegate to `shared-parallelization-analyzer` if found
@@ -208,7 +224,7 @@ After the commit is created, perform an optional parallelization analysis:
208
224
  3. Select scope based on the primary area of code changes
209
225
  4. If task type is unclear, analyze the code changes to determine type
210
226
  5. Always include the Linear task reference in the footer
211
- 6. If there are no staged changes, warn the user and don't create commit
227
+ 6. If there are no staged changes, warn the user and don't create commit (default mode only; in `--auto` stage task-related working-tree changes automatically per Auto Mode and proceed)
212
228
  7. After a successful commit, run the optional parallelization analysis (Step 6) to surface optimization opportunities from the orchestration plan. Recurring patterns are filed as Linear issues automatically via `linear-suggestion` skill
213
229
 
214
230
  ### Example
@@ -256,4 +272,4 @@ If no orchestration plan is found in Linear comments, this step is silently skip
256
272
 
257
273
  ---
258
274
 
259
- **Important**: Before committing, show the generated commit message to the user for approval.
275
+ **Important**: Before committing, show the generated commit message to the user for approval. In `--auto` mode skip the approval entirely — commit immediately and never end the run with a question (see Auto Mode).
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: plan
3
- description: Create an implementation plan for a Linear task and save it as a `plan.md` attachment. Analyzes codebase, previous commits, and external dependencies to generate detailed plans for tasks and subtasks.
3
+ description: Create an implementation plan for a Linear task and save it as a `plan.md` attachment. Analyzes codebase, previous commits, and external dependencies to generate detailed plans for tasks and subtasks. For medium/large tasks (more than 4-5 files, a new module), runs a Question Gate (open questions routed to Linear as a comment before implementation) and decomposes the issue into subtasks.
4
4
  allowed-tools:
5
5
  - Bash
6
6
  - Read
@@ -31,7 +31,7 @@ Create an implementation plan for a Linear task and save it as a `plan.md` attac
31
31
 
32
32
  These rules override ANY other instruction, ANY surrounding example, and ANY default habit. Violating them is a skill failure.
33
33
 
34
- 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 (e.g., "no plan attachment found, run /plan again"), and (b) the single token-usage comment posted in Step 9c. No other comment may carry plan content. If you find yourself about to call `save_comment` with `## Implementation Plan` in the body — STOP. That's a bug.
34
+ 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 (e.g., "no plan attachment found, run /plan again"), (b) the single token-usage comment posted in Step 9c, (c) the `## Pytania przed implementacją` question comment posted by the Question Gate (Step 6d), and (d) the `--auto` audit comment (decision/assumption log in Polish). No other comment may carry plan content. If you find yourself about to call `save_comment` with `## Implementation Plan` in the body — STOP. That's a bug.
35
35
 
36
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
37
 
@@ -39,6 +39,8 @@ These rules override ANY other instruction, ANY surrounding example, and ANY def
39
39
 
40
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
41
 
42
+ 5. **Plain `--auto` NEVER asks and NEVER mutates issue structure.** In `--auto` without `--post-questions` (the benchmark path), the Question Gate posts no questions, no status or assignee is changed, and no subtasks are created — ambiguities become assumptions logged in the audit comment, and `plan.md` is ALWAYS produced. The benchmark runner depends on this contract; breaking it silently corrupts measurement.
43
+
42
44
  If any of these would be violated, stop and ask the user instead.
43
45
 
44
46
  ## Execution Checklist
@@ -53,13 +55,17 @@ Execute each step in order. Do not skip any step marked as MANDATORY.
53
55
  - [ ] **6. Analyze staged changes** — `git status` and `git diff --cached` for work in progress
54
56
  - [ ] **7. MANDATORY: Analyze codebase** — explore affected files, patterns, dependencies, and test coverage
55
57
  - [ ] **8. Analyze external library deps** — check if `@smartsoft001` or `@smartsoft001/pro` changes are needed (mark as separate process)
56
- - [ ] **9. Create implementation plans** — generate structured plans per task/subtask with all required sections
57
- - [ ] **10. MANDATORY: Write plans in Polish** — all plan content must be in Polish language
58
- - [ ] **11. MANDATORY: Get user approval of generated plan** — present the full plan content in the chat, then call `AskUserQuestion` with three options: save / regenerate / cancel. Save and label steps below MUST NOT run without approval. Skipped only in `--auto` (auto-approved; logged in audit comment).
59
- - [ ] **12. MANDATORY: Confirm old plan deletion** — if replacing existing `plan.md`, ask user to confirm deletion of old attachment before proceeding (skipped in `--auto`; delete old attachment automatically)
60
- - [ ] **13. MANDATORY: Save plan as native Linear attachment** — base64-encode `plan.md` content and upload via `mcp__linear__create_attachment`. **Calling `mcp__linear__save_comment` for the plan body is FORBIDDEN.** Linear hosts the file natively; no external storage.
61
- - [ ] **14. MANDATORY: Add "AI Plan" label** — ensure `AI Plan` label exists on the team and apply it to the invoked issue (the `linearTaskId` passed to `/plan` parent task or subtask, whichever was called)
62
- - [ ] **15. Confirm to user** — list saved plans with summaries and Linear links
58
+ - [ ] **9. Classify task size** — Small vs Medium/Large (Step 6c); only M/L triggers the Question Gate and decomposition
59
+ - [ ] **10. Question Gate (M/L only)** — classify ambiguities and route stakeholder questions per mode (Step 6d); may STOP the task before planning (questions posted to Linear, status Todo, assignee set — interactive / `--post-questions` only; plain `--auto` logs assumptions instead, Hard Rule 5)
60
+ - [ ] **11. Decompose (M/L only)** — create subtasks in Linear (interactive / `--post-questions`) or express decomposition inside `plan.md` (plain `--auto`) (Step 6e)
61
+ - [ ] **12. Create implementation plans** — generate structured plans per task/subtask with all required sections
62
+ - [ ] **13. MANDATORY: Write plans in Polish** — all plan content must be in Polish language
63
+ - [ ] **14. MANDATORY: Get user approval of generated plan** — present the full plan content in the chat, then call `AskUserQuestion` with three options: save / regenerate / cancel. Save and label steps below MUST NOT run without approval. Skipped only in `--auto` (auto-approved; logged in audit comment).
64
+ - [ ] **15. 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)
65
+ - [ ] **16. 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.
66
+ - [ ] **17. MANDATORY: Add "AI Plan" label** — look up the workspace-level `AI Plan` label (never create it — Hard Rule 4) and apply it to the invoked issue (the `linearTaskId` passed to `/plan` — parent task or subtask, whichever was called)
67
+ - [ ] **18. Post token-usage comment** — run the token-summing script and post the single usage comment on the invoked issue (Step 9c)
68
+ - [ ] **19. Confirm to user** — list saved plans with summaries and Linear links
63
69
 
64
70
  ### Task Progress Tracking
65
71
 
@@ -116,15 +122,18 @@ You create plans that are:
116
122
 
117
123
  ```
118
124
  /plan [linearTaskId]
119
- /plan [linearTaskId] --deep # Deep planning with Agent Team (experimental)
120
- /plan [linearTaskId] --auto # Non-interactive mode for CI / GitHub Actions
125
+ /plan [linearTaskId] --deep # Deep planning with Agent Team (experimental)
126
+ /plan [linearTaskId] --auto # Non-interactive mode for benchmark / fully autonomous runs
127
+ /plan [linearTaskId] --auto --post-questions # Non-interactive mode for the automated Claude Code development process
121
128
  ```
122
129
 
123
130
  ## Parameters
124
131
 
125
132
  - `linearTaskId` - Linear task ID (e.g., ENG-123)
126
133
  - `--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.
134
+ - `--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 runs where no human is at the keyboard. Without `--post-questions` this is the **benchmark contract**: no questions posted, no status/assignee changes, no subtask creation, `plan.md` always produced (Hard Rule 5).
135
+ - `--post-questions` - Modifier for `--auto` (ignored without it): headless runs of the Claude Code development process — NOT the benchmark. Stakeholder ambiguities found by the Question Gate are posted to Linear automatically (question comment + status `Todo` + assignee = issue creator) and the task exits without `plan.md` — and without creating subtasks — until answers arrive. When no stakeholder questions block the task (none found, or all answered on a re-run), M/L tasks are decomposed into real Linear subtasks automatically. The benchmark runner never passes this flag.
136
+ - `--questions-assignee=<user>` - Optional, only with `--auto --post-questions`: overrides the addressee of posted questions (name or email resolvable in Linear). Default: the issue creator. Useful when issues are created by an integration/bot account.
128
137
 
129
138
  ## Auto Mode (`--auto`)
130
139
 
@@ -136,15 +145,17 @@ You create plans that are:
136
145
  | Ask user to confirm deletion of old `plan.md` attachments | Delete old attachments automatically before saving new ones |
137
146
  | Ask "regenerate anyway?" when all plans are up-to-date | Exit cleanly with a Linear comment noting all plans are current; no regeneration |
138
147
  | 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 |
148
+ | `AskUserQuestion` for any decision | Use the option marked **(Recommended)**. If none is marked: in plain `--auto` pick the safest option, log it in the audit comment, and continue — plain `--auto` may NEVER exit without `plan.md` (Hard Rule 5); the fail-fast-with-Linear-comment exit is allowed only with `--post-questions` |
149
+ | Question Gate: stakeholder questions (Step 6d) | Plain `--auto`: never posted — adopt the safest assumption per question and log ALL of them in the audit comment. With `--post-questions`: post the question comment + status `Todo` + assignee automatically; the task exits without `plan.md` and without creating subtasks |
150
+ | Decomposition: subtask creation (Step 6e) | Plain `--auto`: never — decomposition stays inside `plan.md` as phases. With `--post-questions`: subtasks created automatically (and listed in the audit comment) ONLY when no stakeholder questions block the task |
140
151
 
141
152
  **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
153
 
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).
154
+ **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) and with `--post-questions` (see Parameters).
144
155
 
145
156
  ## Instructions
146
157
 
147
- You are tasked with creating an implementation plan for a Linear task and saving it as a comment in Linear. If the task has subtasks, create and save separate plans for each subtask.
158
+ You are tasked with creating an implementation plan for a Linear task and saving it as a `plan.md` attachment in Linear (Hard Rule 1 — never as a comment). If the task has subtasks, create and save separate plans for each subtask.
148
159
 
149
160
  ### Step 1: Fetch Linear Task Details
150
161
 
@@ -309,7 +320,7 @@ Check if the task requires changes to external library packages:
309
320
  - `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` must be set
310
321
  - `--deep` flag must be provided
311
322
 
312
- **If prerequisites NOT met** → Skip to Step 7 (standard planning).
323
+ **If prerequisites NOT met** → Skip to Step 6c (size classification — the standard pipeline continues from there).
313
324
 
314
325
  **If prerequisites met:**
315
326
 
@@ -422,7 +433,7 @@ Check if the task requires changes to external library packages:
422
433
  - ŚREDNIA: HIGH findings but addressed in responses
423
434
  - NISKA: CRITICAL findings or unresolved HIGH findings
424
435
 
425
- 5. **Present enriched plan to user** (Step 7 continues with enhanced plan content)
436
+ 5. **Continue with Step 6c** — the team's enriched analysis feeds size classification, the Question Gate, decomposition, and the final plan content (Step 7)
426
437
 
427
438
  6. **Cleanup team**
428
439
 
@@ -434,6 +445,108 @@ Check if the task requires changes to external library packages:
434
445
 
435
446
  **Fallback**: If env var not set or flag not provided, skill runs in standard sequential mode.
436
447
 
448
+ ### Step 6c: Task Size Classification
449
+
450
+ Based on the findings from Steps 4–6a, classify the task as **Small** or **Medium/Large**:
451
+
452
+ **Medium/Large (M/L)** if ANY of the following holds:
453
+
454
+ - estimated affected files (modify + create) exceed **4–5**,
455
+ - a **new module / package / domain area** is created,
456
+ - the change spans **multiple layers or apps** (e.g. domain + backend + frontend),
457
+ - the Linear estimate (if present) is M or higher.
458
+
459
+ **Small** otherwise (isolated bugfix, copy change, single-component tweak).
460
+
461
+ Routing:
462
+
463
+ - **Small** → skip Steps 6d–6e entirely and continue with Step 7. Behavior is identical to the skill before the Question Gate existed.
464
+ - **M/L** → run Step 6d (Question Gate), then Step 6e (Decomposition).
465
+ - If the issue **already has subtasks**, treat decomposition as done: run Step 6d only, then continue with per-subtask planning as usual.
466
+
467
+ State the classification and its trigger (e.g. `M/L — 9 plików, nowy moduł raportów`) in the chat (interactive) or in the audit comment (`--auto`).
468
+
469
+ ### Step 6d: Question Gate (M/L only)
470
+
471
+ Surface ambiguities BEFORE the plan is written — key decisions should happen at the cheapest possible moment, and questions should travel to the person who can answer them instead of dying inside the session.
472
+
473
+ #### 6d.1 — Collect and classify ambiguities
474
+
475
+ Scan the task description, its comments, and your codebase findings for unknowns in four categories (one question = one category):
476
+
477
+ 1. **Blockers** — missing decisions or data without which the implementation would have to guess (e.g. which permission gates a view, where the data comes from)
478
+ 2. **Approach tradeoffs** — two or more viable designs with real consequences
479
+ 3. **Scope / priorities** — unclear boundaries ("does X belong to this task?")
480
+ 4. **Risky assumptions** — things you would otherwise assume silently
481
+
482
+ **Never ask about anything checkable in the code, git history, or Linear** — check it instead. If there are NO ambiguities, note `brak pytań` and go straight to Step 6e.
483
+
484
+ Split the resulting questions into:
485
+
486
+ - **session-resolvable** — the operator at the keyboard can decide;
487
+ - **stakeholder-needed** — requires product/data/another person. Default addressee: the **issue creator**.
488
+
489
+ #### 6d.2 — Mode behavior
490
+
491
+ | Mode | Session-resolvable | Stakeholder-needed |
492
+ | ------------------------ | -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
493
+ | Interactive (default) | one `AskUserQuestion` batch (1–4 questions, 2–4 disjoint options each, recommended option FIRST with "(Recommended)") | ask the developer first (gate below); on approval post the comment + status + assignee |
494
+ | `--auto --post-questions`| resolve with the recommended option; log in the audit comment | post the question comment + status **Todo** + assignee **automatically**; the task exits without `plan.md`; audit comment records what was posted |
495
+ | `--auto` (plain) | resolve with the recommended option; log | do NOT post; adopt the safest assumption per question; log ALL assumptions in the audit comment (`Założenia przyjęte automatycznie: ...`); `plan.md` ALWAYS produced |
496
+
497
+ Interactive stakeholder gate — `AskUserQuestion`:
498
+
499
+ > Wykryto N pytań wymagających odpowiedzi interesariusza. Dodać komentarz z pytaniami do `<linearTaskId>`, ustawić status Todo i przypisać do `<creator>`?
500
+
501
+ - **"Tak, dodaj pytania i zmień status"** _(Recommended)_ — post per 6d.3–6d.4, then STOP for this task.
502
+ - **"Nie — odpowiem teraz w sesji"** — ask the questions via `AskUserQuestion` batches and continue the pipeline.
503
+ - **"Pomiń — przyjmij założenia"** — treat like plain `--auto` for these questions; record the assumptions in the plan's "Risks & Considerations" section.
504
+
505
+ #### 6d.3 — Question comment format (Polish)
506
+
507
+ Post ONE comment via `mcp__linear__save_comment`:
508
+
509
+ ```markdown
510
+ ## Pytania przed implementacją
511
+
512
+ Odpowiedz pod tym komentarzem — wystarczy numer pytania i odpowiedź.
513
+
514
+ **P1. [krótki tytuł]**
515
+ [2–3 zdania kontekstu — samowystarczalne, bez ścieżek repo i żargonu wewnętrznego]
516
+ Pytanie: [...]
517
+ Blokuje: [co dokładnie stoi bez odpowiedzi]
518
+
519
+ **P2. [...]**
520
+ ```
521
+
522
+ - **Continuous numbering per issue**: scan existing comments for previous `## Pytania przed implementacją` sections and continue the numbering (P4, P5, ...). NEVER renumber existing questions — replies reference them by number.
523
+ - **Reconciliation check before posting**: every **blocker** from 6d.1 maps to exactly one question (1:1); questions from the other three categories (tradeoffs, scope, assumptions) are allowed and must each trace back to a specific 6d.1 item. Fix mismatches before the post.
524
+
525
+ #### 6d.4 — Status + assignee
526
+
527
+ After posting the comment, call `mcp__linear__save_issue({ id, state: "Todo", assignee: <addressee> })` — status **Todo** (never In Progress; the task is explicitly waiting for a human). The addressee defaults to the **issue creator, taken from the `creator` field of the `mcp__linear__get_issue` response** (no extra user-lookup tool needed); overrides: interactively pick "Other" on the gate question and name the person, headless pass `--questions-assignee=<user>`. Then STOP: the halt covers the ENTIRE invoked issue — if it has subtasks, no `plan.md` is saved on any of them and no new subtasks are created; the status/assignee change lands on the invoked issue only. Print a short Polish summary listing the posted questions.
528
+
529
+ #### 6d.5 — Re-run with answers
530
+
531
+ When `/plan` runs again on an issue that carries a `## Pytania przed implementacją` comment:
532
+
533
+ - **answers exist** (comments newer than the question comment): incorporate them — quote each decision in the plan's "Technical Analysis" or "Risks & Considerations" — and continue the pipeline;
534
+ - **unanswered**: interactive → tell the user and ask (wait / answer now in session / proceed with assumptions); `--auto --post-questions` → exit cleanly with an audit comment (`Pytania z <data> wciąż bez odpowiedzi — plan nie został wygenerowany.`); plain `--auto` → proceed with logged assumptions (Hard Rule 5).
535
+
536
+ ### Step 6e: Decomposition into Subtasks (M/L only)
537
+
538
+ Skip if the issue already has subtasks. Otherwise break the task into subtasks, each an independently implementable and reviewable unit:
539
+
540
+ - each subtask = one coherent slice; layers (domain → BE/FE) live INSIDE a subtask, never as separate subtasks;
541
+ - per subtask: imperative Polish title, 2–5-sentence description with scope + planned Files to Modify, and dependencies on other subtasks;
542
+ - prefer 2–6 subtasks; merge any "subtask" smaller than roughly one file into a neighbor.
543
+
544
+ Mode behavior:
545
+
546
+ - **Interactive**: present the breakdown table (title, scope, files, depends-on) and ask via `AskUserQuestion`: `Utworzyć N podzadań w Linear?` with options **"Tak, utwórz podzadania"** _(Recommended)_ / **"Popraw podział"** (capture feedback, redo the breakdown) / **"Kontynuuj bez podzadań"** (single-task planning). On approval create each subtask via `mcp__linear__save_issue` (team and project inherited from the parent, state `Todo`, parent set to the invoked issue). Then continue with Step 7 using the "If subtasks exist" path.
547
+ - **`--auto --post-questions`**: create the subtasks automatically and list them in the audit comment.
548
+ - **`--auto` (plain)**: do NOT create subtasks — express the decomposition inside `plan.md` as phases in "Implementation Steps". Issue structure stays untouched (Hard Rule 5).
549
+
437
550
  ### Step 7: Create Implementation Plans
438
551
 
439
552
  #### If NO subtasks exist:
@@ -756,7 +869,7 @@ Use `AskUserQuestion` tool with options:
756
869
 
757
870
  ### Step 9a: Save Plan as Linear Attachment
758
871
 
759
- **⛔ 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 9c that's the one allowed exception.)
872
+ **⛔ 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.** (The allowed `save_comment` exceptions are listed in Hard Rule 1 — token usage in Step 9c, Question Gate questions, audit comments.)
760
873
 
761
874
  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.
762
875
 
@@ -856,7 +969,7 @@ After successfully saving the plans, confirm to the user:
856
969
 
857
970
  - List all tasks/subtasks where `plan.md` was attached (include Linear attachment URL)
858
971
  - Show a summary of each plan
859
- - Confirm that `AI Plan` label was added to the parent task
972
+ - Confirm that `AI Plan` label was added to the invoked issue
860
973
  - Provide Linear task links
861
974
  - Mention any important considerations or questions
862
975
 
@@ -868,7 +981,7 @@ After successfully saving the plans, confirm to the user:
868
981
  4. **Consider edge cases**: Think about error handling, validation, and edge cases
869
982
  5. **Follow project conventions**: Ensure the plan aligns with project architecture and patterns
870
983
  6. **Identify dependencies**: Note if any tasks depend on others or external factors
871
- 7. **Ask for clarification**: If requirements are unclear, use `AskUserQuestion` before creating the plan
984
+ 7. **Ask for clarification**: for M/L tasks the Question Gate (Step 6d) is the mandatory mechanism — stakeholder questions go to Linear, not into silent assumptions; for Small tasks keep the pre-existing behavior: an ad-hoc `AskUserQuestion` in interactive mode only (in any `--auto` mode adopt the safest assumption and log it — Hard Rule 5)
872
985
  8. **Track progress accurately**: Clearly distinguish between completed, in-progress, and remaining work
873
986
  9. **Reference commits**: Always include commit hashes when mentioning previous work
874
987
  10. **Keep subtask plans focused**: Each subtask plan should only cover that subtask's scope
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "flow-external",
3
3
  "description": "Development flow skills for standalone Angular 6-11 projects without framework (Angular CLI, Karma/Jasmine, Bootstrap 4)",
4
- "version": "0.9.0"
4
+ "version": "0.11.0"
5
5
  }
@@ -19,20 +19,36 @@ Create a conventional commit message based on Linear task and staged changes.
19
19
 
20
20
  ```
21
21
  /commit [linearTaskId]
22
+ /commit [linearTaskId] --auto # Non-interactive mode for fully autonomous runs
22
23
  ```
23
24
 
24
25
  ## Parameters
25
26
 
26
27
  - `linearTaskId` - Linear task ID (e.g., FRA-123)
28
+ - `--auto` - Non-interactive mode: skip ALL `AskUserQuestion` prompts and the message-approval step. Treat any of `--auto`, `--ci`, `--non-interactive` as equivalent.
29
+
30
+ ## Auto Mode (`--auto`)
31
+
32
+ **When `--auto` is set, the skill MUST run end-to-end without any human-in-the-loop prompts.** Apply these overrides:
33
+
34
+ | Default behavior | `--auto` override |
35
+ | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
36
+ | Analyze only staged changes; if nothing staged, warn and don't commit | If nothing is staged but the working tree has task-related modifications, STAGE THEM AUTOMATICALLY (`git add -A`, excluding obvious non-source artifacts — loose `*.png` in the repo root, `.playwright-mcp/`, `docs/mockups/`, `.benchmark-test/`, `.claude/settings.json`) and continue. Never ask "would you like me to stage" |
37
+ | Completeness prompt (`AskUserQuestion`) | Skip the prompt; commit the current changes and note any suspected gaps in the commit body |
38
+ | Show message to user for approval before committing | Skip the approval; create the commit immediately with the generated message |
39
+ | Any other `AskUserQuestion` | Use the option marked **(Recommended)**; if none, pick the safest option and continue |
40
+ | Nothing to commit at all | If an existing commit already references this task (e.g. `/impl` committed the work itself), exit cleanly with a one-line statement naming that commit. Otherwise exit cleanly stating there was nothing to commit. No question either way |
41
+
42
+ **Hard requirement in `--auto`**: the run MUST end in exactly one of two states — a created commit, or an explicit one-line clean-exit statement that nothing needed committing. Ending the run with a question is a skill failure (in one-shot `--print` execution nobody can answer, the commit is silently lost, and the caller has to fall back to an emergency commit).
27
43
 
28
44
  ## Execution Checklist
29
45
 
30
46
  - [ ] **1. Fetch Linear task** — get title, description, labels/type from MCP Linear server
31
47
  - [ ] **2. Analyze staged changes** — run `git diff --cached` to understand scope
32
- - [ ] **3. Verify completeness** — compare task requirements with staged changes; if incomplete, ask user whether to continue or stop
48
+ - [ ] **3. Verify completeness** — compare task requirements with staged changes; if incomplete, ask user whether to continue or stop (in `--auto`: no prompt — continue and note gaps in the body)
33
49
  - [ ] **4. Determine commit type and scope** — based on changes and task type
34
50
  - [ ] **5. Generate commit message** — draft `<type>(<scope>): <subject>` with body and `Refs: <linearTaskId>`
35
- - [ ] **6. Show message to user** — present commit message for approval before proceeding
51
+ - [ ] **6. Show message to user** — present commit message for approval before proceeding (skipped in `--auto`: commit immediately)
36
52
  - [ ] **7. Create commit** — execute `git commit` with the approved message
37
53
 
38
54
  ## Commit Message Format
@@ -93,6 +109,8 @@ Refs: FRA-548
93
109
 
94
110
  ### No Staged Changes
95
111
 
112
+ Default mode only — in `--auto` do NOT print this and do NOT stop: stage task-related working-tree changes automatically and continue (see Auto Mode).
113
+
96
114
  ```markdown
97
115
  ## No staged changes
98
116
 
@@ -108,7 +126,7 @@ If linearTaskId is not provided or task not found:
108
126
 
109
127
  ## Guidelines
110
128
 
111
- 1. **Always show commit message for approval** before creating the commit
129
+ 1. **Always show commit message for approval** before creating the commit (default mode; in `--auto` skip the approval and commit immediately — see Auto Mode)
112
130
  2. **Use Polish branch naming** if branch follows FRA-XXX pattern
113
131
  3. **Include Refs:** with Linear task ID when available
114
132
  4. **Keep subject line under 72 characters**
@@ -1,6 +1,6 @@
1
1
  ---
2
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.
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. For medium/large tasks (more than 4-5 files, a new module), runs a Question Gate (open questions routed to Linear as a comment before implementation) and decomposes the issue into subtasks.
4
4
  allowed-tools:
5
5
  - Bash
6
6
  - Read
@@ -13,7 +13,6 @@ allowed-tools:
13
13
  - mcp__linear__list_comments
14
14
  - mcp__linear__save_comment
15
15
  - mcp__linear__save_issue
16
- - mcp__linear__save_issue
17
16
  - mcp__linear__create_attachment
18
17
  - mcp__linear__delete_attachment
19
18
  - mcp__linear__list_issue_labels
@@ -27,13 +26,16 @@ Create a structured implementation plan for a Linear task and save it as a `plan
27
26
 
28
27
  ```
29
28
  /plan <linearTaskId>
30
- /plan <linearTaskId> --auto # Non-interactive mode for CI / GitHub Actions
29
+ /plan <linearTaskId> --auto # Non-interactive mode for fully autonomous runs
30
+ /plan <linearTaskId> --auto --post-questions # Non-interactive mode for the automated Claude Code development process
31
31
  ```
32
32
 
33
33
  ## Parameters
34
34
 
35
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.
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 runs where no human is at the keyboard. Without `--post-questions` this is the fully-autonomous contract: no questions posted, no status/assignee changes, no subtask creation, `plan.md` always produced (Hard Rule 4).
37
+ - `--post-questions` - Modifier for `--auto` (ignored without it): headless runs of the Claude Code development process. Stakeholder ambiguities found by the Question Gate are posted to Linear automatically (question comment + status `Todo` + assignee = issue creator) and the task exits without `plan.md` — and without creating subtasks — until answers arrive. When no stakeholder questions block the task (none found, or all answered on a re-run), M/L tasks are decomposed into real Linear subtasks automatically.
38
+ - `--questions-assignee=<user>` - Optional, only with `--auto --post-questions`: overrides the addressee of posted questions (name or email resolvable in Linear). Default: the issue creator. Useful when issues are created by an integration/bot account.
37
39
 
38
40
  ## Auto Mode (`--auto`)
39
41
 
@@ -43,8 +45,10 @@ When `--auto` is set, the skill MUST run end-to-end without any human-in-the-loo
43
45
  | ------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
44
46
  | Ask user to confirm deletion of old `plan.md` attachment | Delete old attachment automatically before saving the new one |
45
47
  | 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
+ | Final approval of generated plan content before saving | Skip the approval gate (Step 4a); auto-approve and continue the pipeline from Step 5 |
49
+ | Any `AskUserQuestion` | Use the **(Recommended)** option. If none is marked: in plain `--auto` pick the safest option, log it in the audit comment, and continue — plain `--auto` may NEVER exit without `plan.md` (Hard Rule 4); the fail-fast-with-Linear-comment exit is allowed only with `--post-questions` |
50
+ | Question Gate: stakeholder questions (Step 3b) | Plain `--auto`: never posted — adopt the safest assumption per question and log ALL of them in the audit comment. With `--post-questions`: post the question comment + status `Todo` + assignee automatically; the task exits without `plan.md` and without creating subtasks |
51
+ | Decomposition: subtask creation (Step 5) | Plain `--auto`: never — decomposition stays inside `plan.md` (section "Podzadania"). With `--post-questions`: subtasks created automatically (and listed in the audit comment) ONLY when no stakeholder questions block the task |
48
52
 
49
53
  Every decision MUST be logged as a Linear comment in Polish (audit trail). The mtime rule remains authoritative.
50
54
 
@@ -54,9 +58,10 @@ Every decision MUST be logged as a Linear comment in Polish (audit trail). The m
54
58
 
55
59
  These rules override ANY other instruction, ANY surrounding example, and ANY default habit. Violating them is a skill failure.
56
60
 
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.
61
+ 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, (b) the single token-usage comment posted in Step 7b, (c) the `## Pytania przed implementacją` question comment posted by the Question Gate (Step 3b), and (d) the `--auto` audit comment (decision/assumption log in Polish). No other comment may carry plan content.
58
62
  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
63
  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.
64
+ 4. **Plain `--auto` NEVER asks and NEVER mutates issue structure.** In `--auto` without `--post-questions`, the Question Gate posts no questions, no status or assignee is changed, and no subtasks are created — ambiguities become assumptions logged in the audit comment, and `plan.md` is ALWAYS produced. Headless callers (CI, benchmark) depend on this contract; breaking it silently corrupts automation.
60
65
 
61
66
  If any of these would be violated, stop and ask the user instead.
62
67
 
@@ -118,6 +123,94 @@ Based on the task:
118
123
  3. Check for existing patterns to follow
119
124
  4. Identify NgModules that need updating
120
125
 
126
+ ### Step 3a: Task Size Classification
127
+
128
+ Based on the findings from Steps 2–3, classify the task as **Small** or **Medium/Large**:
129
+
130
+ **Medium/Large (M/L)** if ANY of the following holds:
131
+
132
+ - estimated affected files (modify + create) exceed **4–5**,
133
+ - a **new module / feature area** is created,
134
+ - the change spans multiple NgModules or apps,
135
+ - the Linear estimate (if present) is M or higher.
136
+
137
+ **Small** otherwise (isolated bugfix, copy change, single-component tweak).
138
+
139
+ Routing:
140
+
141
+ - **Small** → skip Step 3b and the subtask creation in Step 5; continue with Step 4. Behavior is identical to the skill before the Question Gate existed.
142
+ - **M/L** → run Step 3b (Question Gate), then continue with Step 4; Step 5 handles decomposition.
143
+ - If the issue **already has subtasks**, treat decomposition as done: run Step 3b, then continue with Step 4; skip the subtask creation in Step 5.
144
+
145
+ State the classification and its trigger (e.g. `M/L — 9 plików, nowy moduł raportów`) in the chat (interactive) or in the audit comment (`--auto`).
146
+
147
+ ### Step 3b: Question Gate (M/L only)
148
+
149
+ Surface ambiguities BEFORE the plan is written — key decisions should happen at the cheapest possible moment, and questions should travel to the person who can answer them instead of dying inside the session.
150
+
151
+ #### 3b.1 — Collect and classify ambiguities
152
+
153
+ Scan the task description, its comments, and your codebase findings for unknowns in four categories (one question = one category):
154
+
155
+ 1. **Blockers** — missing decisions or data without which the implementation would have to guess
156
+ 2. **Approach tradeoffs** — two or more viable designs with real consequences
157
+ 3. **Scope / priorities** — unclear boundaries ("does X belong to this task?")
158
+ 4. **Risky assumptions** — things you would otherwise assume silently
159
+
160
+ **Never ask about anything checkable in the code, git history, or Linear** — check it instead. If there are NO ambiguities, note `brak pytań` and go straight to Step 4.
161
+
162
+ Split the resulting questions into:
163
+
164
+ - **session-resolvable** — the operator at the keyboard can decide;
165
+ - **stakeholder-needed** — requires product/data/another person. Default addressee: the **issue creator**.
166
+
167
+ #### 3b.2 — Mode behavior
168
+
169
+ | Mode | Session-resolvable | Stakeholder-needed |
170
+ | ------------------------ | -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
171
+ | Interactive (default) | one `AskUserQuestion` batch (1–4 questions, 2–4 disjoint options each, recommended option FIRST with "(Recommended)") | ask the developer first (gate below); on approval post the comment + status + assignee |
172
+ | `--auto --post-questions`| resolve with the recommended option; log in the audit comment | post the question comment + status **Todo** + assignee **automatically**; the task exits without `plan.md`; audit comment records what was posted |
173
+ | `--auto` (plain) | resolve with the recommended option; log | do NOT post; adopt the safest assumption per question; log ALL assumptions in the audit comment (`Założenia przyjęte automatycznie: ...`); `plan.md` ALWAYS produced |
174
+
175
+ Interactive stakeholder gate — `AskUserQuestion`:
176
+
177
+ > Wykryto N pytań wymagających odpowiedzi interesariusza. Dodać komentarz z pytaniami do `<linearTaskId>`, ustawić status Todo i przypisać do `<creator>`?
178
+
179
+ - **"Tak, dodaj pytania i zmień status"** _(Recommended)_ — post per 3b.3–3b.4, then STOP for this task.
180
+ - **"Nie — odpowiem teraz w sesji"** — ask the questions via `AskUserQuestion` batches and continue the pipeline.
181
+ - **"Pomiń — przyjmij założenia"** — treat like plain `--auto` for these questions; record the assumptions in the plan.
182
+
183
+ #### 3b.3 — Question comment format (Polish)
184
+
185
+ Post ONE comment via `mcp__linear__save_comment`:
186
+
187
+ ```markdown
188
+ ## Pytania przed implementacją
189
+
190
+ Odpowiedz pod tym komentarzem — wystarczy numer pytania i odpowiedź.
191
+
192
+ **P1. [krótki tytuł]**
193
+ [2–3 zdania kontekstu — samowystarczalne, bez ścieżek repo i żargonu wewnętrznego]
194
+ Pytanie: [...]
195
+ Blokuje: [co dokładnie stoi bez odpowiedzi]
196
+
197
+ **P2. [...]**
198
+ ```
199
+
200
+ - **Continuous numbering per issue**: scan existing comments for previous `## Pytania przed implementacją` sections and continue the numbering (P4, P5, ...). NEVER renumber existing questions — replies reference them by number.
201
+ - **Reconciliation check before posting**: every **blocker** from 3b.1 maps to exactly one question (1:1); questions from the other three categories (tradeoffs, scope, assumptions) are allowed and must each trace back to a specific 3b.1 item. Fix mismatches before the post.
202
+
203
+ #### 3b.4 — Status + assignee
204
+
205
+ After posting the comment, call `mcp__linear__save_issue({ id, state: "Todo", assignee: <addressee> })` — status **Todo** (never In Progress; the task is explicitly waiting for a human). The addressee defaults to the **issue creator, taken from the `creator` field of the `mcp__linear__get_issue` response** (no extra user-lookup tool needed); overrides: interactively pick "Other" on the gate question and name the person, headless pass `--questions-assignee=<user>`. Then STOP: do NOT create subtasks, do NOT save `plan.md`; the status/assignee change lands on the invoked issue only. Print a short Polish summary listing the posted questions.
206
+
207
+ #### 3b.5 — Re-run with answers
208
+
209
+ When `/plan` runs again on an issue that carries a `## Pytania przed implementacją` comment:
210
+
211
+ - **answers exist** (comments newer than the question comment): incorporate them — quote each decision in the plan's "Analiza" section — and continue the pipeline;
212
+ - **unanswered**: interactive → tell the user and ask (wait / answer now in session / proceed with assumptions); `--auto --post-questions` → exit cleanly with an audit comment (`Pytania z <data> wciąż bez odpowiedzi — plan nie został wygenerowany.`); plain `--auto` → proceed with logged assumptions (Hard Rule 4).
213
+
121
214
  ### Step 4: Create Implementation Plan
122
215
 
123
216
  Structure the plan as follows:
@@ -218,12 +311,16 @@ This file is the source for the Linear attachment in Step 6 and is NOT deleted
218
311
 
219
312
  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.
220
313
 
221
- ### Step 5: Create Subtasks (if needed)
314
+ ### Step 5: Create Subtasks (M/L only)
315
+
316
+ Runs only for tasks classified **M/L** in Step 3a, after plan approval (Step 4a), and only when the issue does not already have subtasks. Each subtask = one coherent, independently implementable slice mapped to a plan step ("Podzadania" table); imperative Polish title, short scope description; prefer 2–6 subtasks.
222
317
 
223
- For complex tasks, create subtasks in Linear:
318
+ Mode behavior:
224
319
 
225
- - Use `mcp__linear__save_issue` with parent task ID
226
- - Each subtask should map to a plan step
320
+ - **Interactive**: the subtask breakdown was part of the approved plan (Step 4a) — create each subtask via `mcp__linear__save_issue` (team and project inherited from the parent, state `Todo`, parent set to the invoked issue).
321
+ - **`--auto --post-questions`**: create the subtasks automatically and list them in the audit comment — ONLY when no stakeholder questions block the task (Step 3b).
322
+ - **`--auto` (plain)**: do NOT create subtasks — the decomposition stays inside `plan.md` as the "Podzadania" table. Issue structure stays untouched (Hard Rule 4).
323
+ - **Small tasks**: skip this step entirely.
227
324
 
228
325
  ### Step 6: Save Plan as Native Linear Attachment
229
326
 
@@ -337,3 +434,4 @@ Uruchom `/impl [linearTaskId]` aby rozpocząć implementację.
337
434
  9. **Use Angular CLI commands** not Nx commands
338
435
  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.
339
436
  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.
437
+ 12. **Ask for clarification**: for M/L tasks the Question Gate (Step 3b) is the mandatory mechanism — stakeholder questions go to Linear, not into silent assumptions; for Small tasks use an ad-hoc `AskUserQuestion` in interactive mode only (in any `--auto` mode adopt the safest assumption and log it — Hard Rule 4)
@@ -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": "0.9.0"
4
+ "version": "0.11.0"
5
5
  }
@@ -23,11 +23,27 @@ Create a conventional commit message based on Linear task and staged changes.
23
23
 
24
24
  ```
25
25
  /commit [linearTaskId]
26
+ /commit [linearTaskId] --auto # Non-interactive mode for fully autonomous runs
26
27
  ```
27
28
 
28
29
  ## Parameters
29
30
 
30
31
  - `linearTaskId` - Linear task ID (e.g., ENG-123)
32
+ - `--auto` - Non-interactive mode: skip ALL `AskUserQuestion` prompts and the message-approval step. Treat any of `--auto`, `--ci`, `--non-interactive` as equivalent.
33
+
34
+ ## Auto Mode (`--auto`)
35
+
36
+ **When `--auto` is set, the skill MUST run end-to-end without any human-in-the-loop prompts.** Apply these overrides:
37
+
38
+ | Default behavior | `--auto` override |
39
+ | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
40
+ | Analyze only staged changes; if nothing staged, warn and don't commit | If nothing is staged but the working tree has task-related modifications, STAGE THEM AUTOMATICALLY (`git add -A`, excluding obvious non-source artifacts — loose `*.png` in the repo root, `.playwright-mcp/`, `docs/mockups/`, `.benchmark-test/`, `.claude/settings.json`) and continue. Never ask "would you like me to stage" |
41
+ | Completeness prompt (`AskUserQuestion`) | Skip the prompt; commit the current changes and note any suspected gaps in the commit body |
42
+ | Show message to user for approval before committing | Skip the approval; create the commit immediately with the generated message |
43
+ | Any other `AskUserQuestion` | Use the option marked **(Recommended)**; if none, pick the safest option and continue |
44
+ | Nothing to commit at all | If an existing commit already references this task (e.g. `/impl` committed the work itself), exit cleanly with a one-line statement naming that commit. Otherwise exit cleanly stating there was nothing to commit. No question either way |
45
+
46
+ **Hard requirement in `--auto`**: the run MUST end in exactly one of two states — a created commit, or an explicit one-line clean-exit statement that nothing needed committing. Ending the run with a question is a skill failure (in one-shot `--print` execution nobody can answer, the commit is silently lost, and the caller has to fall back to an emergency commit).
31
47
 
32
48
  ## Execution Checklist
33
49
 
@@ -35,10 +51,10 @@ Execute each step in order. Do not skip any step marked as MANDATORY.
35
51
 
36
52
  - [ ] **1. Fetch Linear task** — get title, description, labels/type from MCP Linear server
37
53
  - [ ] **2. Analyze staged changes** — run `git diff --cached` to understand scope
38
- - [ ] **3. Verify completeness** — compare task requirements with staged changes; if incomplete, ask user whether to continue or stop
54
+ - [ ] **3. Verify completeness** — compare task requirements with staged changes; if incomplete, ask user whether to continue or stop (in `--auto`: no prompt — continue and note gaps in the body)
39
55
  - [ ] **4. Read commitlint config** — read `commitlint.config.js` for valid scopes and format
40
56
  - [ ] **5. Generate commit message** — draft `<type>(<scope>): <subject>` with body and `Refs: <linearTaskId>`
41
- - [ ] **6. Show message to user** — present commit message for approval before proceeding
57
+ - [ ] **6. Show message to user** — present commit message for approval before proceeding (skipped in `--auto`: commit immediately)
42
58
  - [ ] **7. MANDATORY: Pre-commit preparation** — run `nvm use 18` (legacy Node.js version)
43
59
  - [ ] **8. Create commit** — execute `git commit` with the approved message
44
60
  - [ ] **9. Parallelization analysis (optional)** — fetch Linear comments, search for orchestration plan, delegate to `shared-parallelization-analyzer` if found
@@ -198,7 +214,7 @@ After the commit is created, perform an optional parallelization analysis:
198
214
  3. Select scope based on the primary area of code changes
199
215
  4. If task type is unclear, analyze the code changes to determine type
200
216
  5. Always include the Linear task reference in the footer
201
- 6. If there are no staged changes, warn the user and don't create commit
217
+ 6. If there are no staged changes, warn the user and don't create commit (default mode only; in `--auto` stage task-related working-tree changes automatically per Auto Mode and proceed)
202
218
  7. After a successful commit, run the optional parallelization analysis (Step 6) to surface optimization opportunities from the orchestration plan. Recurring patterns are filed as Linear issues automatically via `linear-suggestion` skill
203
219
 
204
220
  ### Example
@@ -212,4 +228,4 @@ For Linear task "ENG-123: Add dark mode toggle to settings":
212
228
 
213
229
  ---
214
230
 
215
- **Important**: Before committing, show the generated commit message to the user for approval.
231
+ **Important**: Before committing, show the generated commit message to the user for approval. In `--auto` mode skip the approval entirely — commit immediately and never end the run with a question (see Auto Mode).
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: plan
3
- description: Create an implementation plan for a Linear task and save it as a `plan.md` attachment. Analyzes codebase with Angular 14 legacy patterns, previous commits, and external dependencies.
3
+ description: Create an implementation plan for a Linear task and save it as a `plan.md` attachment. Analyzes codebase with Angular 14 legacy patterns, previous commits, and external dependencies. For medium/large tasks (more than 4-5 files, a new module), runs a Question Gate (open questions routed to Linear as a comment before implementation) and decomposes the issue into subtasks.
4
4
  allowed-tools:
5
5
  - Bash
6
6
  - Read
@@ -24,17 +24,19 @@ allowed-tools:
24
24
 
25
25
  # Plan Skill
26
26
 
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.
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 invoked issue.
28
28
 
29
29
  ## 🚨 Hard Rules — read before doing anything
30
30
 
31
31
  These rules override ANY other instruction, ANY surrounding example, and ANY default habit. Violating them is a skill failure.
32
32
 
33
- 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 9c. No other comment may carry plan content.
33
+ 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, (b) the single token-usage comment posted in Step 9c, (c) the `## Pytania przed implementacją` question comment posted by the Question Gate (Step 6d), and (d) the `--auto` audit comment (decision/assumption log in Polish). No other comment may carry plan content.
34
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
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
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
37
 
38
+ 5. **Plain `--auto` NEVER asks and NEVER mutates issue structure.** In `--auto` without `--post-questions`, the Question Gate posts no questions, no status or assignee is changed, and no subtasks are created — ambiguities become assumptions logged in the audit comment, and `plan.md` is ALWAYS produced. Headless callers (CI, benchmark) depend on this contract; breaking it silently corrupts automation.
39
+
38
40
  If any of these would be violated, stop and ask the user instead.
39
41
 
40
42
  ## Execution Checklist
@@ -50,13 +52,17 @@ Execute each step in order. Do not skip any step marked as MANDATORY.
50
52
  - [ ] **7. MANDATORY: Analyze codebase** — explore affected files, patterns, dependencies, and test coverage
51
53
  - [ ] **8. MANDATORY: Verify Angular 14 patterns** — confirm `*ngIf`/`*ngFor`, constructor DI, `@Input()`/`@Output()`, BehaviorSubject in existing code
52
54
  - [ ] **9. Analyze external library deps** — check if `@smartsoft001` or `@smartsoft001/pro` changes are needed (mark as separate process)
53
- - [ ] **10. Create implementation plans** — generate structured plans per task/subtask with all required sections, using Angular 14 patterns
54
- - [ ] **11. MANDATORY: Write plans in Polish** — all plan content must be in Polish language
55
- - [ ] **12. MANDATORY: Get user approval of generated plan** — present the full plan content in the chat, then call `AskUserQuestion` with three options: save / regenerate / cancel. Save and label steps below MUST NOT run without approval. Skipped only in `--auto` (auto-approved; logged in audit comment).
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.
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)
59
- - [ ] **16. Confirm to user** — list saved plans with summaries and Linear links
55
+ - [ ] **10. Classify task size** — Small vs Medium/Large (Step 6c); only M/L triggers the Question Gate and decomposition
56
+ - [ ] **11. Question Gate (M/L only)** — classify ambiguities and route stakeholder questions per mode (Step 6d); may STOP the task before planning (questions posted to Linear, status Todo, assignee set — interactive / `--post-questions` only; plain `--auto` logs assumptions instead, Hard Rule 5)
57
+ - [ ] **12. Decompose (M/L only)** — create subtasks in Linear (interactive / `--post-questions`) or express decomposition inside `plan.md` (plain `--auto`) (Step 6e)
58
+ - [ ] **13. Create implementation plans** — generate structured plans per task/subtask with all required sections, using Angular 14 patterns
59
+ - [ ] **14. MANDATORY: Write plans in Polish** — all plan content must be in Polish language
60
+ - [ ] **15. MANDATORY: Get user approval of generated plan** — present the full plan content in the chat, then call `AskUserQuestion` with three options: save / regenerate / cancel. Save and label steps below MUST NOT run without approval. Skipped only in `--auto` (auto-approved; logged in audit comment).
61
+ - [ ] **16. 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)
62
+ - [ ] **17. 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.
63
+ - [ ] **18. MANDATORY: Add "AI Plan" label** — look up the workspace-level `AI Plan` label (never create it — Hard Rule 4) and apply it to the invoked issue (the `linearTaskId` passed to `/plan` — parent task or subtask, whichever was called)
64
+ - [ ] **19. Post token-usage comment** — run the token-summing script and post the single usage comment on the invoked issue (Step 9c)
65
+ - [ ] **20. Confirm to user** — list saved plans with summaries and Linear links
60
66
 
61
67
  ### Task Progress Tracking
62
68
 
@@ -115,13 +121,16 @@ You create plans that are:
115
121
 
116
122
  ```
117
123
  /plan [linearTaskId]
118
- /plan [linearTaskId] --auto # Non-interactive mode for CI / GitHub Actions
124
+ /plan [linearTaskId] --auto # Non-interactive mode for fully autonomous runs
125
+ /plan [linearTaskId] --auto --post-questions # Non-interactive mode for the automated Claude Code development process
119
126
  ```
120
127
 
121
128
  ## Parameters
122
129
 
123
130
  - `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.
131
+ - `--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 runs where no human is at the keyboard. Without `--post-questions` this is the fully-autonomous contract: no questions posted, no status/assignee changes, no subtask creation, `plan.md` always produced (Hard Rule 5).
132
+ - `--post-questions` - Modifier for `--auto` (ignored without it): headless runs of the Claude Code development process. Stakeholder ambiguities found by the Question Gate are posted to Linear automatically (question comment + status `Todo` + assignee = issue creator) and the task exits without `plan.md` — and without creating subtasks — until answers arrive. When no stakeholder questions block the task (none found, or all answered on a re-run), M/L tasks are decomposed into real Linear subtasks automatically.
133
+ - `--questions-assignee=<user>` - Optional, only with `--auto --post-questions`: overrides the addressee of posted questions (name or email resolvable in Linear). Default: the issue creator. Useful when issues are created by an integration/bot account.
125
134
 
126
135
  ## Auto Mode (`--auto`)
127
136
 
@@ -133,11 +142,13 @@ You create plans that are:
133
142
  | Ask user to confirm deletion of old `plan.md` attachments | Delete old attachments automatically before saving new ones |
134
143
  | Ask "regenerate anyway?" when all plans are up-to-date | Exit cleanly with a Linear comment noting all plans are current; no regeneration |
135
144
  | 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 |
145
+ | `AskUserQuestion` for any decision | Use the option marked **(Recommended)**. If none is marked: in plain `--auto` pick the safest option, log it in the audit comment, and continue — plain `--auto` may NEVER exit without `plan.md` (Hard Rule 5); the fail-fast-with-Linear-comment exit is allowed only with `--post-questions` |
146
+ | Question Gate: stakeholder questions (Step 6d) | Plain `--auto`: never posted — adopt the safest assumption per question and log ALL of them in the audit comment. With `--post-questions`: post the question comment + status `Todo` + assignee automatically; the task exits without `plan.md` and without creating subtasks |
147
+ | Decomposition: subtask creation (Step 6e) | Plain `--auto`: never — decomposition stays inside `plan.md` as phases. With `--post-questions`: subtasks created automatically (and listed in the audit comment) ONLY when no stakeholder questions block the task |
137
148
 
138
149
  **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
150
 
140
- **Detection**: The flag `--auto` is provided as a positional/named arg. Treat any of `--auto`, `--ci`, `--non-interactive` as equivalent.
151
+ **Detection**: The flag `--auto` is provided as a positional/named arg. Treat any of `--auto`, `--ci`, `--non-interactive` as equivalent. Combinable with `--post-questions` (see Parameters).
141
152
 
142
153
  ## Angular 14 Legacy Patterns
143
154
 
@@ -163,7 +174,7 @@ When creating plans, always use these legacy patterns:
163
174
 
164
175
  ## Instructions
165
176
 
166
- You are tasked with creating an implementation plan for a Linear task and saving it as a comment in Linear. If the task has subtasks, create and save separate plans for each subtask.
177
+ You are tasked with creating an implementation plan for a Linear task and saving it as a `plan.md` attachment in Linear (Hard Rule 1 — never as a comment). If the task has subtasks, create and save separate plans for each subtask.
167
178
 
168
179
  ### Step 1: Fetch Linear Task Details
169
180
 
@@ -320,6 +331,108 @@ Check if the task requires changes to external library packages:
320
331
  3. Update dependency version in this project
321
332
  4. Then implement the changes in this project that depend on the library updates
322
333
 
334
+ ### Step 6c: Task Size Classification
335
+
336
+ Based on the findings from Steps 4–6a, classify the task as **Small** or **Medium/Large**:
337
+
338
+ **Medium/Large (M/L)** if ANY of the following holds:
339
+
340
+ - estimated affected files (modify + create) exceed **4–5**,
341
+ - a **new module / package / domain area** is created,
342
+ - the change spans **multiple layers or apps** (e.g. domain + backend + frontend),
343
+ - the Linear estimate (if present) is M or higher.
344
+
345
+ **Small** otherwise (isolated bugfix, copy change, single-component tweak).
346
+
347
+ Routing:
348
+
349
+ - **Small** → skip Steps 6d–6e entirely and continue with Step 7. Behavior is identical to the skill before the Question Gate existed.
350
+ - **M/L** → run Step 6d (Question Gate), then Step 6e (Decomposition).
351
+ - If the issue **already has subtasks**, treat decomposition as done: run Step 6d only, then continue with per-subtask planning as usual.
352
+
353
+ State the classification and its trigger (e.g. `M/L — 9 plików, nowy moduł raportów`) in the chat (interactive) or in the audit comment (`--auto`).
354
+
355
+ ### Step 6d: Question Gate (M/L only)
356
+
357
+ Surface ambiguities BEFORE the plan is written — key decisions should happen at the cheapest possible moment, and questions should travel to the person who can answer them instead of dying inside the session.
358
+
359
+ #### 6d.1 — Collect and classify ambiguities
360
+
361
+ Scan the task description, its comments, and your codebase findings for unknowns in four categories (one question = one category):
362
+
363
+ 1. **Blockers** — missing decisions or data without which the implementation would have to guess (e.g. which permission gates a view, where the data comes from)
364
+ 2. **Approach tradeoffs** — two or more viable designs with real consequences
365
+ 3. **Scope / priorities** — unclear boundaries ("does X belong to this task?")
366
+ 4. **Risky assumptions** — things you would otherwise assume silently
367
+
368
+ **Never ask about anything checkable in the code, git history, or Linear** — check it instead. If there are NO ambiguities, note `brak pytań` and go straight to Step 6e.
369
+
370
+ Split the resulting questions into:
371
+
372
+ - **session-resolvable** — the operator at the keyboard can decide;
373
+ - **stakeholder-needed** — requires product/data/another person. Default addressee: the **issue creator**.
374
+
375
+ #### 6d.2 — Mode behavior
376
+
377
+ | Mode | Session-resolvable | Stakeholder-needed |
378
+ | ------------------------ | -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
379
+ | Interactive (default) | one `AskUserQuestion` batch (1–4 questions, 2–4 disjoint options each, recommended option FIRST with "(Recommended)") | ask the developer first (gate below); on approval post the comment + status + assignee |
380
+ | `--auto --post-questions`| resolve with the recommended option; log in the audit comment | post the question comment + status **Todo** + assignee **automatically**; the task exits without `plan.md`; audit comment records what was posted |
381
+ | `--auto` (plain) | resolve with the recommended option; log | do NOT post; adopt the safest assumption per question; log ALL assumptions in the audit comment (`Założenia przyjęte automatycznie: ...`); `plan.md` ALWAYS produced |
382
+
383
+ Interactive stakeholder gate — `AskUserQuestion`:
384
+
385
+ > Wykryto N pytań wymagających odpowiedzi interesariusza. Dodać komentarz z pytaniami do `<linearTaskId>`, ustawić status Todo i przypisać do `<creator>`?
386
+
387
+ - **"Tak, dodaj pytania i zmień status"** _(Recommended)_ — post per 6d.3–6d.4, then STOP for this task.
388
+ - **"Nie — odpowiem teraz w sesji"** — ask the questions via `AskUserQuestion` batches and continue the pipeline.
389
+ - **"Pomiń — przyjmij założenia"** — treat like plain `--auto` for these questions; record the assumptions in the plan's "Risks & Considerations" section.
390
+
391
+ #### 6d.3 — Question comment format (Polish)
392
+
393
+ Post ONE comment via `mcp__linear__save_comment`:
394
+
395
+ ```markdown
396
+ ## Pytania przed implementacją
397
+
398
+ Odpowiedz pod tym komentarzem — wystarczy numer pytania i odpowiedź.
399
+
400
+ **P1. [krótki tytuł]**
401
+ [2–3 zdania kontekstu — samowystarczalne, bez ścieżek repo i żargonu wewnętrznego]
402
+ Pytanie: [...]
403
+ Blokuje: [co dokładnie stoi bez odpowiedzi]
404
+
405
+ **P2. [...]**
406
+ ```
407
+
408
+ - **Continuous numbering per issue**: scan existing comments for previous `## Pytania przed implementacją` sections and continue the numbering (P4, P5, ...). NEVER renumber existing questions — replies reference them by number.
409
+ - **Reconciliation check before posting**: every **blocker** from 6d.1 maps to exactly one question (1:1); questions from the other three categories (tradeoffs, scope, assumptions) are allowed and must each trace back to a specific 6d.1 item. Fix mismatches before the post.
410
+
411
+ #### 6d.4 — Status + assignee
412
+
413
+ After posting the comment, call `mcp__linear__save_issue({ id, state: "Todo", assignee: <addressee> })` — status **Todo** (never In Progress; the task is explicitly waiting for a human). The addressee defaults to the **issue creator, taken from the `creator` field of the `mcp__linear__get_issue` response** (no extra user-lookup tool needed); overrides: interactively pick "Other" on the gate question and name the person, headless pass `--questions-assignee=<user>`. Then STOP: the halt covers the ENTIRE invoked issue — if it has subtasks, no `plan.md` is saved on any of them and no new subtasks are created; the status/assignee change lands on the invoked issue only. Print a short Polish summary listing the posted questions.
414
+
415
+ #### 6d.5 — Re-run with answers
416
+
417
+ When `/plan` runs again on an issue that carries a `## Pytania przed implementacją` comment:
418
+
419
+ - **answers exist** (comments newer than the question comment): incorporate them — quote each decision in the plan's "Technical Analysis" or "Risks & Considerations" — and continue the pipeline;
420
+ - **unanswered**: interactive → tell the user and ask (wait / answer now in session / proceed with assumptions); `--auto --post-questions` → exit cleanly with an audit comment (`Pytania z <data> wciąż bez odpowiedzi — plan nie został wygenerowany.`); plain `--auto` → proceed with logged assumptions (Hard Rule 5).
421
+
422
+ ### Step 6e: Decomposition into Subtasks (M/L only)
423
+
424
+ Skip if the issue already has subtasks. Otherwise break the task into subtasks, each an independently implementable and reviewable unit:
425
+
426
+ - each subtask = one coherent slice; layers (domain → BE/FE) live INSIDE a subtask, never as separate subtasks;
427
+ - per subtask: imperative Polish title, 2–5-sentence description with scope + planned Files to Modify, and dependencies on other subtasks;
428
+ - prefer 2–6 subtasks; merge any "subtask" smaller than roughly one file into a neighbor.
429
+
430
+ Mode behavior:
431
+
432
+ - **Interactive**: present the breakdown table (title, scope, files, depends-on) and ask via `AskUserQuestion`: `Utworzyć N podzadań w Linear?` with options **"Tak, utwórz podzadania"** _(Recommended)_ / **"Popraw podział"** (capture feedback, redo the breakdown) / **"Kontynuuj bez podzadań"** (single-task planning). On approval create each subtask via `mcp__linear__save_issue` (team and project inherited from the parent, state `Todo`, parent set to the invoked issue). Then continue with Step 7 using the "If subtasks exist" path.
433
+ - **`--auto --post-questions`**: create the subtasks automatically and list them in the audit comment.
434
+ - **`--auto` (plain)**: do NOT create subtasks — express the decomposition inside `plan.md` as phases in "Implementation Steps". Issue structure stays untouched (Hard Rule 5).
435
+
323
436
  ### Step 7: Create Implementation Plans
324
437
 
325
438
  #### If NO subtasks exist:
@@ -714,7 +827,7 @@ After saving:
714
827
 
715
828
  - List all tasks/subtasks where `plan.md` was attached (with Linear attachment URL)
716
829
  - Show plan summaries
717
- - Confirm `AI Plan` label added to parent task
830
+ - Confirm `AI Plan` label added to the invoked issue
718
831
  - Provide Linear links
719
832
 
720
833
  ## Guidelines
@@ -725,7 +838,7 @@ After saving:
725
838
  4. **Consider edge cases**: Think about error handling, validation, and edge cases
726
839
  5. **Follow project conventions**: Ensure the plan aligns with project architecture and patterns
727
840
  6. **Identify dependencies**: Note if any tasks depend on others or external factors
728
- 7. **Ask for clarification**: If requirements are unclear, use `AskUserQuestion` before creating the plan
841
+ 7. **Ask for clarification**: for M/L tasks the Question Gate (Step 6d) is the mandatory mechanism — stakeholder questions go to Linear, not into silent assumptions; for Small tasks keep the pre-existing behavior: an ad-hoc `AskUserQuestion` in interactive mode only (in any `--auto` mode adopt the safest assumption and log it — Hard Rule 5)
729
842
  8. **Track progress accurately**: Clearly distinguish between completed, in-progress, and remaining work
730
843
  9. **Reference commits**: Always include commit hashes when mentioning previous work
731
844
  10. **Keep subtask plans focused**: Each subtask plan should only cover that subtask's scope
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "smart-pro",
3
3
  "description": "Smart-pro integration - safety validation, audit logging, and auto-formatting hooks",
4
- "version": "0.9.0"
4
+ "version": "0.11.0"
5
5
  }