@flumecode/runner 0.16.0 → 0.17.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": "@flumecode/runner",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "description": "FlumeCode local runner — claims jobs and drives your local Claude Code against a real checkout.",
6
6
  "bin": {
@@ -90,10 +90,14 @@ For **each package that has commits** (skip unchanged ones), call
90
90
  if patch suggested: also offer minor and major), plus the current version as
91
91
  "No change (keep X.Y.Z)".
92
92
 
93
- Also present the drafted release notes in your reply text so the user can read
94
- them, then call `mcp__flume_widgets__single_select` for a confirmatory question:
95
- `Do the release notes look correct?` with options `Yes, use these notes` and
96
- `I'll edit them in the PR`.
93
+ Also call `mcp__flume_widgets__single_select` for the notes confirmation, passing
94
+ the drafted release notes (the 3–10 bullet markdown) as its `body` so the user
95
+ can read them inside the question widget:
96
+
97
+ - `body`: the drafted release-notes markdown
98
+ - `question`: `Do the release notes look correct?`
99
+ - `options`: `Yes, use these notes`, `I'll edit them in the PR`
100
+ (You may still summarise in the reply text, but the notes MUST be in the widget `body`.)
97
101
 
98
102
  **After calling widgets, end your turn.** Do NOT open a PR in Phase 1.
99
103
 
@@ -31,6 +31,7 @@ and determine which phase you are in:**
31
31
 
32
32
  1. Investigate the repo enough to ask _informed_ questions — locate the relevant
33
33
  files, existing patterns, and constraints. Never ask what the code answers.
34
+ If the request is a bug fix, investigate deeply enough to identify the **root cause** (the specific code or condition producing the incorrect behavior) before proceeding to Plan — you will need it for the `rootCause` field.
34
35
  2. Identify genuine ambiguity only: scope, intended behavior, edge cases,
35
36
  competing approaches, acceptance criteria. Skip anything you can reasonably
36
37
  decide yourself.
@@ -64,6 +65,7 @@ Field-by-field guidance:
64
65
  - **`goal`** — one or two sentences stating the outcome, phrased so it directly
65
66
  answers the request's title and body. Must be achievable by the steps below
66
67
  and nothing more.
68
+ - **`rootCause`** — required when `scope` is `fix`; omit for all other scopes. Identify the underlying cause of the bug — the specific code, logic, or condition that produces the incorrect behavior, **not** the symptom. To fill this accurately, you must investigate the codebase deeply enough to find the root cause before writing the plan.
67
69
  - **`assumptions`** — anything you decided during investigation (including
68
70
  unanswered defaults from Phase 1).
69
71
  - **`requirements`** — **required; at least 1 item.** Plain-language statements of what this change must accomplish and why, written so a non-technical reader can follow them. Distinct from `acceptanceCriteria`: requirements explain intent and rationale; acceptance criteria are the machine-checkable proof. At least 1 item required.
@@ -1,64 +0,0 @@
1
- ---
2
- name: format-code-plugin-generator
3
- description: >-
4
- Generate a concrete plan to install the FlumeCode Format plugin for THIS repo —
5
- a .flumecode/plugins/format-code/ manifest wired to the pre-commit socket that
6
- auto-formats code (prettier --write) so changes ride into the commit.
7
- ---
8
-
9
- # format-code-plugin-generator
10
-
11
- You generate a concrete, repo-specific plan to install the FlumeCode Format
12
- plugin. You work **read-only**: inspect the repo and produce a plan via
13
- `submit_plan`; never edit files.
14
-
15
- ## Orient yourself first
16
-
17
- Before producing the plan, inspect:
18
-
19
- 1. `.flumecode/wiki/README.md` and `components/plugins.md` (if present) for context.
20
- 2. `package.json` `scripts` — look for `format`, `format:write`, `prettier` references.
21
- 3. `.prettierrc*` — confirm Prettier is configured.
22
- 4. `.husky/pre-commit` — find the existing formatting step this plugin replaces.
23
-
24
- From this, determine the **exact shell command** the `run` script should execute
25
- (e.g. `pnpm format`). Do not hard-code — derive from the repo.
26
-
27
- ## Produce the plan
28
-
29
- Call `submit_plan` **once**, passing a `plans` array with one entry whose steps
30
- instruct the implementer to create:
31
-
32
- ### Artifact — `.flumecode/plugins/format-code/plugin.json`
33
-
34
- ```json
35
- {
36
- "key": "format-code",
37
- "socket": "pre-commit",
38
- "run": "<detected format write command>"
39
- }
40
- ```
41
-
42
- Derive `run` from the repo's detected commands (e.g. `pnpm format`). Do not hard-code — include the actual commands discovered in the Orient step.
43
-
44
- ### Manifest shape
45
-
46
- The manifest `plugin.json` must have exactly these fields:
47
-
48
- ```
49
- { key, socket, run }
50
- ```
51
-
52
- This is the shape the FlumeCode plugin loader expects.
53
-
54
- ### Acceptance criteria the plan must include
55
-
56
- - `.flumecode/plugins/format-code/plugin.json` exists with `key: "format-code"`, `socket: "pre-commit"`, and `run` set to the detected write-format command.
57
- - The `run` command reformats files in place and exits 0; reformatted files are staged and included in the commit.
58
-
59
- ## Always
60
-
61
- - Stay read-only. Produce the plan via `submit_plan`; never edit files.
62
- - The plan must be specific enough for an `implement-plan` run to execute
63
- without re-deriving the commands — include the actual detected commands in
64
- the step descriptions and artifact content.
@@ -1,66 +0,0 @@
1
- ---
2
- name: lint-plugin-generator
3
- description: >-
4
- Generate a concrete plan to install the FlumeCode Lint plugin for THIS repo —
5
- a .flumecode/plugins/lint/ manifest wired to the pre-commit socket that runs
6
- the repo's lint/format checks.
7
- ---
8
-
9
- # lint-plugin-generator
10
-
11
- You generate a concrete, repo-specific plan to install the FlumeCode Lint
12
- plugin. You work **read-only**: inspect the repo and produce a plan via
13
- `submit_plan`; never edit files.
14
-
15
- ## Orient yourself first
16
-
17
- Before producing the plan, inspect:
18
-
19
- 1. `.flumecode/wiki/README.md` and `components/skills-plugin.md` (if present) for context.
20
- 2. `package.json` `scripts` — look for `lint`, `format`, `format:check`, `typecheck`, `test`.
21
- 3. `.lintstagedrc.json` / `.lintstagedrc.js` — staged-file formatters.
22
- 4. `.husky/pre-commit` — the exact commands the pre-commit hook already runs.
23
- 5. ESLint config (`eslint.config.*`, `.eslintrc.*`) and Prettier config (`.prettierrc.*`) to confirm tools are present.
24
-
25
- From this, determine the **exact shell commands** the run script should execute
26
- (e.g. `pnpm exec lint-staged && pnpm lint && pnpm typecheck`). Do not
27
- hard-code — derive from the repo.
28
-
29
- ## Produce the plan
30
-
31
- Call `submit_plan` **once**, passing a `plans` array with one entry whose steps
32
- instruct the implementer to create:
33
-
34
- ### Artifact 1 — `.flumecode/plugins/lint/plugin.json`
35
-
36
- ```json
37
- {
38
- "key": "lint",
39
- "socket": "pre-commit",
40
- "run": "<detected lint/format/typecheck command chain>"
41
- }
42
- ```
43
-
44
- Derive `run` from the repo's detected commands (e.g. `pnpm exec lint-staged && pnpm lint && pnpm typecheck && pnpm test`). Do not hard-code — include the actual commands discovered in the Orient step.
45
-
46
- ### Manifest shape
47
-
48
- The manifest `plugin.json` must have exactly these fields:
49
-
50
- ```
51
- { key, socket, run }
52
- ```
53
-
54
- This is the shape the FlumeCode plugin loader expects.
55
-
56
- ### Acceptance criteria the plan must include
57
-
58
- - `.flumecode/plugins/lint/plugin.json` exists with `key: "lint"`, `socket: "pre-commit"`, and `run` set to the detected command chain.
59
- - The `run` command exits non-zero on any lint/format/typecheck failure.
60
-
61
- ## Always
62
-
63
- - Stay read-only. Produce the plan via `submit_plan`; never edit files.
64
- - The plan must be specific enough for an `implement-plan` run to execute
65
- without re-deriving the commands — include the actual detected commands in
66
- the step descriptions and artifact content.
@@ -1,74 +0,0 @@
1
- ---
2
- name: unit-test-plugin-generator
3
- description: >-
4
- Generate a concrete plan to install the FlumeCode Unit Test plugin for THIS repo —
5
- a .flumecode/plugins/unit-test/ manifest wired to the pre-commit socket that runs
6
- the repo's unit tests and emits a JSON report the runner parses into pass/fail counts.
7
- ---
8
-
9
- # unit-test-plugin-generator
10
-
11
- You generate a concrete, repo-specific plan to install the FlumeCode Unit Test
12
- plugin. You work **read-only**: inspect the repo and produce a plan via
13
- `submit_plan`; never edit files.
14
-
15
- ## Orient yourself first
16
-
17
- Before producing the plan, inspect:
18
-
19
- 1. `.flumecode/wiki/README.md` and `components/plugins.md` (if present) for context.
20
- 2. `package.json` `scripts` — look for `test`, `test:unit`, or similar test commands.
21
- 3. `vitest.config.*` — to detect Vitest as the test runner.
22
- 4. `jest.config.*` — to detect Jest as the test runner.
23
-
24
- From this, determine:
25
-
26
- - Which test runner is in use (Vitest or Jest).
27
- - The **exact shell command** that runs the tests and writes a JSON report file (e.g. `pnpm vitest run --reporter=json --outputFile=.flumecode/tmp/unit-test-report.json`). Do not hard-code — derive from the repo.
28
-
29
- ## Produce the plan
30
-
31
- Call `submit_plan` **once**, passing a `plans` array with one entry whose steps
32
- instruct the implementer to:
33
-
34
- ### Artifact 1 — `.flumecode/plugins/unit-test/plugin.json`
35
-
36
- ```json
37
- {
38
- "key": "unit-test",
39
- "socket": "pre-commit",
40
- "run": "<detected command, e.g. pnpm vitest run --reporter=json --outputFile=.flumecode/tmp/unit-test-report.json>",
41
- "report": { "file": ".flumecode/tmp/unit-test-report.json", "format": "jest" }
42
- }
43
- ```
44
-
45
- Derive `run` from the repo's detected test runner and scripts. Do not hard-code —
46
- include the actual commands discovered in the Orient step.
47
-
48
- ### Artifact 2 — `.gitignore` update
49
-
50
- Add `.flumecode/tmp/` to `.gitignore` so the transient JSON report file is never committed.
51
-
52
- ### Manifest shape
53
-
54
- The manifest `plugin.json` must have exactly these fields:
55
-
56
- ```
57
- { key, socket, run, report }
58
- ```
59
-
60
- where `report.file` points to the JSON report output path (repo-relative) and
61
- `report.format` is `"jest"` (Vitest's JSON reporter uses the same schema).
62
-
63
- ### Acceptance criteria the plan must include
64
-
65
- - `.flumecode/plugins/unit-test/plugin.json` exists with `key: "unit-test"`, `socket: "pre-commit"`, `run` set to the detected test command that writes a JSON report, and `report` set to `{ "file": ".flumecode/tmp/unit-test-report.json", "format": "jest" }`.
66
- - The `run` command exits non-zero on any test failure and writes the JSON report file.
67
- - `.flumecode/tmp/` is present in `.gitignore`.
68
-
69
- ## Always
70
-
71
- - Stay read-only. Produce the plan via `submit_plan`; never edit files.
72
- - The plan must be specific enough for an `implement-plan` run to execute
73
- without re-deriving the commands — include the actual detected commands in
74
- the step descriptions and artifact content.