@flumecode/runner 0.17.0 → 0.18.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/dist/cli.js CHANGED
@@ -266,6 +266,28 @@ function widgetPosted(kind) {
266
266
  import { createSdkMcpServer as createSdkMcpServer2, tool as tool2 } from "@anthropic-ai/claude-agent-sdk";
267
267
  import { z as z2 } from "zod";
268
268
 
269
+ // src/code-lang.ts
270
+ var EXT_TO_LANG = {
271
+ ts: "typescript",
272
+ tsx: "tsx",
273
+ js: "javascript",
274
+ jsx: "jsx",
275
+ json: "json",
276
+ css: "css",
277
+ md: "markdown",
278
+ sh: "bash",
279
+ py: "python",
280
+ yaml: "yaml",
281
+ yml: "yaml",
282
+ html: "markup",
283
+ xml: "markup",
284
+ sql: "sql"
285
+ };
286
+ function langFromPath(path) {
287
+ const ext = path.split(".").pop()?.toLowerCase();
288
+ return ext ? EXT_TO_LANG[ext] : void 0;
289
+ }
290
+
269
291
  // src/schema-hints.ts
270
292
  var INLINE_CODE_HINT = "Wrap code identifiers (function, variable, type, and file names, commands, and flags) in inline backticks, e.g. `getCodingSessionsForRequest`.";
271
293
 
@@ -357,7 +379,8 @@ function renderPlan(plan) {
357
379
  lines2.push("");
358
380
  lines2.push(`\`${entry.file}\``);
359
381
  lines2.push("");
360
- lines2.push("```");
382
+ const lang = langFromPath(entry.file);
383
+ lines2.push(lang ? "```" + lang : "```");
361
384
  lines2.push(entry.pseudoCode);
362
385
  lines2.push("```");
363
386
  }
@@ -446,6 +469,15 @@ var STATUS_ICON = {
446
469
  not_met: "\u274C",
447
470
  unclear: "\u26A0\uFE0F"
448
471
  };
472
+ var CICD_STATUS_ICON = {
473
+ passed: "\u2705",
474
+ failed: "\u274C"
475
+ };
476
+ var cicdCheckSchema = z3.object({
477
+ command: z3.string().min(1).describe("The exact verification command run, e.g. `pnpm typecheck`."),
478
+ status: z3.enum(["passed", "failed"]).describe("Whether the command passed or failed."),
479
+ output: z3.string().optional().describe("Short excerpt of failing output; include on failure.")
480
+ });
449
481
  var evidenceSchema = z3.object({
450
482
  file: z3.string().min(1).describe("Repo-relative path the hunk comes from."),
451
483
  hunk: z3.string().min(1).describe(
@@ -477,6 +509,9 @@ var reportInputSchema = {
477
509
  ),
478
510
  conflictResolution: z3.string().optional().describe(
479
511
  "Markdown: present ONLY when a merge conflict was actually resolved. Explain, per conflicted file, how ours/theirs were integrated. Rendered under '## Conflict resolution'. Omit entirely when no conflict occurred."
512
+ ),
513
+ cicd: z3.array(cicdCheckSchema).optional().describe(
514
+ "Verify-phase build/typecheck/lint/test results. Omit when the repo has no verification setup. Rendered under '## CI/CD'."
480
515
  )
481
516
  };
482
517
  var reportSchema = z3.object(reportInputSchema);
@@ -504,6 +539,15 @@ function renderReport(report) {
504
539
  if (report.conflictResolution?.trim()) {
505
540
  lines2.push("", "## Conflict resolution", "", report.conflictResolution.trim());
506
541
  }
542
+ if (report.cicd && report.cicd.length > 0) {
543
+ lines2.push("", "## CI/CD");
544
+ for (const check of report.cicd) {
545
+ lines2.push("", `- ${CICD_STATUS_ICON[check.status]} \`${check.command}\``);
546
+ if (check.status === "failed" && check.output?.trim()) {
547
+ lines2.push("", "```", check.output.trim(), "```");
548
+ }
549
+ }
550
+ }
507
551
  lines2.push("", "## Code quality", "", report.codeQuality.trim());
508
552
  lines2.push("", "## Caveats / follow-ups", "", report.caveats.trim());
509
553
  return lines2.join("\n");
@@ -512,7 +556,7 @@ function createReportTooling() {
512
556
  let submittedReport = null;
513
557
  const submitReport = tool3(
514
558
  SUBMIT_REPORT,
515
- "Submit the final implementation report as structured data. Call this exactly once, at the end of the run. `acceptanceCriteria` must contain one entry per plan criterion, each with a met / not_met / unclear verdict and the diff hunk(s) that prove it. `summary`, `filesChanged`, `codeQuality`, and `caveats` are the four named markdown sections. Do NOT include a PR link \u2014 the runner appends it.",
559
+ "Submit the final implementation report as structured data. Call this exactly once, at the end of the run. `acceptanceCriteria` must contain one entry per plan criterion, each with a met / not_met / unclear verdict and the diff hunk(s) that prove it. `summary`, `filesChanged`, `codeQuality`, and `caveats` are the four named markdown sections. `cicd` (optional) holds Verify-phase check results (one entry per command with `command`, `status` `passed`/`failed`, and `output` on failure); omit when no verification setup exists. Do NOT include a PR link \u2014 the runner appends it.",
516
560
  reportInputSchema,
517
561
  async (args) => {
518
562
  submittedReport = reportSchema.parse(args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flumecode/runner",
3
- "version": "0.17.0",
3
+ "version": "0.18.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": {
@@ -1,8 +1,9 @@
1
1
  ---
2
2
  name: technical-writing
3
3
  description: >-
4
- Inline-code conventions for agent-authored plan and report prose: wrap code
5
- identifiers in backticks so they render as inline code.
4
+ Inline-code and output-language conventions for agent-authored plan and report
5
+ prose: wrap code identifiers in backticks, and write prose in the same natural
6
+ language as the user's request.
6
7
  ---
7
8
 
8
9
  # Technical Writing
@@ -12,3 +13,12 @@ description: >-
12
13
  Wrap code identifiers — function names, variable names, type names, file names, commands, and flags — in inline backticks so they render as inline code. For example: `getCodingSessionsForRequest`, not getCodingSessionsForRequest.
13
14
 
14
15
  This convention applies to all free-text fields in plans and reports: goals, step descriptions, acceptance criteria, summaries, code-quality notes, and caveats.
16
+
17
+ ## Output language
18
+
19
+ Write all free-text prose in the same natural language as the user's request
20
+ (Korean in → Korean out, English in → English out). This applies to every
21
+ free-text field you author — plan goals/steps/risks, report summaries,
22
+ clarifying questions, and push-backs. Keep code identifiers, file paths,
23
+ commands, and quoted code/diffs verbatim; only the surrounding prose follows
24
+ the request language.
@@ -88,11 +88,26 @@ contain, in this order:
88
88
 
89
89
  ### Every page: front-load an "At a glance" block
90
90
 
91
+ Before the "At a glance" block on **every** page (component pages, README,
92
+ architecture, glossary), place a TL;DR blockquote immediately after the H1:
93
+
94
+ ```
95
+ > **TL;DR** — one plain-language sentence on what this page covers.
96
+ ```
97
+
98
+ Then a blank line, then the existing `> **Purpose**` / "At a glance" block
99
+ (where applicable). For `README.md`, place the TL;DR after the
100
+ `<!-- wiki-synced-to -->` marker and H1. The blank line between the TL;DR and
101
+ the next blockquote is required — without it, markdown merges the two
102
+ blockquotes into one. This rule applies in both Bootstrap and Update modes.
103
+
91
104
  So an agent can grab context in seconds, begin each component page with:
92
105
 
93
106
  ```
94
107
  # <component>
95
108
 
109
+ > **TL;DR** — one plain-language sentence on what this page covers.
110
+
96
111
  > **Purpose** — one or two sentences.
97
112
  > **Key files** — `path/a.ts`, `path/b.ts` (the entry points worth opening).
98
113
  > **Depends on** — what it relies on. **Used by** — what relies on it.
@@ -138,7 +138,11 @@ the next step.
138
138
  7. **Report** — Task, `model: "opus"`, read-only. Give the subagent the AC
139
139
  verdicts (with criterion text, from step 4), the Verify results (from step 3),
140
140
  and the quality findings, and tell it to run `git --no-pager diff` itself as
141
- the **single source of truth** for the report. Do not pass the full plan the
141
+ the **single source of truth** for the report. Pass the Verify results as the
142
+ `cicd` field — one entry per check with `command`, `status` (`passed`/`failed`),
143
+ and (on failure) a short `output` excerpt. Omit `cicd` when no verification
144
+ setup exists. A failing check does NOT block the report — include the failing
145
+ entry and continue. Do not pass the full plan — the
142
146
  AC verdicts carry each criterion verbatim, and the live `git --no-pager diff`
143
147
  is the authoritative source for evidence; re-inlining the full plan is
144
148
  redundant. Keep each subagent prompt to the minimal self-contained slice it
@@ -181,6 +185,7 @@ The report subagent calls `submit_report` with these fields:
181
185
  verbatim from the live `git --no-pager diff`, including each hunk's `@@ -a,b +c,d @@` header line(s) (do not strip them — the report renders file line numbers from them), and proves the verdict (`note`
182
186
  optionally explains it). Never include a hunk that isn't in the actual diff. Cite
183
187
  the supporting hunk(s) for a met criterion; may be empty for not_met / unclear.
188
+ - **`cicd`** (optional) — array of Verify-phase check results. Each entry: `command` (exact command run), `status` (`"passed"` / `"failed"`), `output` (short failing-output excerpt, on failure only). Omit when the repo has no verification setup. Rendered under `## CI/CD`. A failing check does not block the report.
184
189
 
185
190
  ## Always
186
191
 
@@ -104,5 +104,6 @@ Call **`submit_report`** with the structured report. Fields:
104
104
  file, explaining which side you kept and why (or how you merged both intents). Wrap file names
105
105
  and code identifiers in inline backticks. This is what the user reads to understand how each
106
106
  conflict was integrated.
107
+ - `cicd` (optional): array of Verify-phase check results from Step 3, each with `command`, `status` (`"passed"`/`"failed"`), and `output` on failure. Omit when no build/test setup exists.
107
108
 
108
109
  The runner renders the report and appends the pull-request link — do not add one yourself.
@@ -84,6 +84,8 @@ user:
84
84
  `implement-plan` does. Include one `acceptanceCriteria` entry per plan AC (with a
85
85
  met / not_met / unclear verdict and the diff hunk(s) that prove it), plus the four
86
86
  required markdown sections (`summary`, `filesChanged`, `codeQuality`, `caveats`).
87
+ Include `cicd` from the Verify results (one entry per check, same shape as
88
+ `implement-plan`; omit when no verification setup).
87
89
  Base `filesChanged` and evidence on the actual `git --no-pager diff`, not on what
88
90
  a subagent claimed; if the diff is empty, say nothing was changed. The runner
89
91
  renders the report and appends the pull-request link — do not add one yourself.