@exaudeus/workrail 0.3.0 → 0.4.1

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": "@exaudeus/workrail",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "MCP server for structured workflow orchestration and step-by-step task guidance",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -30,6 +30,8 @@
30
30
  "Document I/O: create/update the file at reviewDocPath using file-writing tools. If the agent cannot write files, output the exact doc content with the intended path so the user can save it.",
31
31
  "If a function requires inputs that are missing, state exactly what is missing and pause. Otherwise, do not ask for confirmation.",
32
32
  "If prompt text and a function definition conflict, prefer the function definition for the how, and the step prompt for the what.",
33
+ "Phase 1a is user-driven: request ticket/dev/design/BRD; wait for user reply; do not search or analyze code in this step.",
34
+ "Do not self-confirm. Only proceed after explicit user confirmation or 'skip'; then set contextGatheringComplete=true or skipContextGathering=true.",
33
35
  "discoverModulePatterns(): Compute moduleRoot; scan only moduleRoot to build patternCatalog.",
34
36
  "discoverModulePatterns() details: moduleRoot = nearest common ancestor, clamped to package/src; catalog = naming, DI, errors, logging, tests, layout.",
35
37
  "consolidatePatternFindings(): Compare changes to patternCatalog (scoped to moduleRoot).",
@@ -85,9 +87,13 @@
85
87
  {
86
88
  "id": "phase-1a-llm-context-gathering",
87
89
  "title": "Phase 1a: Comprehensive Context Gathering",
88
- "prompt": "To perform a thorough review, I need more than just the code diff. Please provide the following:\n\n1. **Ticket(s):** Link(s) and, if possible, paste the full text (requirements, acceptance criteria).\n2. **Dev/Design Docs:** Dev plan; design/architecture docs; and any BRD or decision records relevant to this MR.\n3. **Technical Context:** If this change relies on other parts of the codebase, provide relevant code snippets or file contents; include coding standards or module conventions if available.\n\nI will synthesize this information to build a comprehensive context for my review.\n\n**Confirmation & Gating:**\n- After you confirm that I have the right context (or explicitly instruct me to skip), I will set `contextGatheringComplete = true` or `skipContextGathering = true` accordingly.\n- I will not proceed to deeper analysis until one of these is set.",
90
+ "prompt": "To perform a thorough review, I need you to provide source documents. In this step I will not search or analyze code—I'm waiting for your inputs. Please provide:\n\n1. **Ticket(s):** Link(s) and, if possible, paste the full text (requirements, acceptance criteria).\n2. **Dev/Design Docs:** Dev plan; design/architecture docs; any BRD/ADR/decision records relevant to this MR.\n3. **Technical Context:** If this change relies on other parts of the codebase, paste relevant code snippets or file contents; include coding standards or module conventions if available.\n\nI will synthesize this information once received.\n\n**Confirmation & Gating:**\n- After you confirm that I have the right context (or explicitly instruct me to skip), I will set `contextGatheringComplete = true` or `skipContextGathering = true` accordingly.\n- I will not proceed to deeper analysis until one of these is set.",
89
91
  "agentRole": "You are a context-aware analyst ensuring you have all necessary information before starting a deep review.",
90
- "guidance": ["A high-quality review depends on high-quality context. The more information provided here, the more accurate the review will be."],
92
+ "guidance": [
93
+ "User-driven step: ask for ticket, dev plan, design/architecture docs, BRD/ADR, and any coding standards.",
94
+ "Do not search or analyze code in this step; wait for user inputs.",
95
+ "Only after explicit confirmation or 'skip' set contextGatheringComplete=true or skipContextGathering=true."
96
+ ],
91
97
  "runCondition": { "var": "complexity", "not_equals": "Trivial" },
92
98
  "requireConfirmation": true
93
99
  },
@@ -101,9 +107,10 @@
101
107
  "Scope strictly to moduleRoot and changed files plus immediate neighbors.",
102
108
  "Cap per-file neighbors and graph size to avoid noise; prefer edges directly related to the diff.",
103
109
  "Write full details to the live doc; in chat, keep output minimal.",
104
- "Render 'ASCII Call Graphs' under 'Bounded Call Graph': edges 'A -> B', width ≤100, highlight changed as [*name*], include tiny legend.",
105
- "Paths: for each changed symbol show top 2–3 inbound and outbound paths, depth ≤2, dedupe, shortest-first then alphabetical.",
106
- "Caps: ≤12 nodes, ≤20 edges across graphs; if exceeded, fall back to an adjacency list with per-edge counts.",
110
+ "Small Multiples: for each changed symbol, render mini path lines (≤6 nodes) for top 1–2 inbound and 1–2 outbound paths; width ≤100; highlight changed as [*name*]; tag HOT where applicable.",
111
+ "Path Lists with Aliasing: collapse repeated subpaths using deterministic aliases (A1, A2, ...); reuse aliases across paths; append an 'Alias Legend' listing alias → full subpath.",
112
+ "Ordering: HOT-first, then shortest path, then alphabetical; depth ≤2; dedupe identical paths.",
113
+ "Caps: ≤5 anchors; ≤8 total paths; ≤12 nodes across all small multiples; if exceeded, render 'Adjacency Summary' with per-edge counts instead.",
107
114
  "Flow Anchors: map entrypoints to changed symbols; table 'Anchor | Type | Target Symbol | Notes'; cap ≤5 anchors.",
108
115
  "Hot-Path ranking: score edges (diff touch, anchor, ticket keyword, test ref); tag HOT if score ≥ threshold; prefer HOT paths in ASCII output.",
109
116
  "Legend in doc: [*name*]=changed; HOT=high-impact; 'A -> B'=calls; 'Route -> Handler'; 'Job -> Worker'.",
@@ -170,7 +177,7 @@
170
177
  "guidance": [
171
178
  "Targets: naming clarity; small readability/style inconsistencies; redundant comments; commented/dead code; import/order polish; safe micro-perf; test naming/structure.",
172
179
  "Quotas: if majorIssuesFound==true aim 5–8 (cap 12); else aim 8–12 (cap 15); ≤3 per category; 1–2 lines each; dedupe; group by file; prefix 'Nit:'.",
173
- "Add ready-to-copy MR comments for the top 3 nits; log the revision.",
180
+ "MUST add ready-to-copy MR comments for the top 3 nits (file:line, short title, 1–2 line rationale, optional tiny diff); log the revision.",
174
181
  "Append Nit grouped by file: 'path:line — nit text'."
175
182
  ],
176
183
  "runCondition": { "var": "analysisDepth", "equals": 4 },
@@ -238,10 +245,11 @@
238
245
  "Dedupe: identical path:line + similar text → keep one; if overlap with Hygiene/Patterns, keep in the most specific section and cross-reference in the other.",
239
246
  "Caps: ≤15 total; ≤3 per category; if exceeded, append a single 'More items omitted due to caps.' line.",
240
247
  "Cross-link any existing MR comments to their nit rows (e.g., 'MR: MR-##').",
248
+ "If fewer than 3 Nit MR comments exist overall, create minimal ready-to-copy MR comments for the highest-signal remaining nits to reach 3 (file:line, short title, 1–2 line rationale, optional tiny diff).",
241
249
  "Chat: minimal recap with doc path and counts; full details live in the doc."
242
250
  ],
243
251
  "runCondition": { "and": [ { "var": "complexity", "not_equals": "Trivial" }, { "or": [ { "var": "contextGatheringComplete", "equals": true }, { "var": "skipContextGathering", "equals": true } ] } ] },
244
- "functionReferences": ["upsertSection()", "logRevision()"],
252
+ "functionReferences": ["appendMRComment()", "upsertSection()", "logRevision()"],
245
253
  "requireConfirmation": false
246
254
  },
247
255
  {
@@ -257,6 +265,7 @@
257
265
  "Risk Heatmap table: rows 'Risk | Area | Likelihood(L/M/H) | Impact(L/M/H) | Mitigation(≤1 line)'; sort by Impact desc then Likelihood desc; cap ≤6 rows; add 'omitted due to caps' line if needed.",
258
266
  "Dedupe patches and MR comments; ensure every Critical/Major has either a patch or a copy-ready MR comment.",
259
267
  "If any Critical/Major lacks an MR comment, generate a minimal ready-to-copy comment (file:line, short title, 1–2 line rationale, optional tiny diff snippet).",
268
+ "Ensure at least 3 Nit MR comments exist overall; if fewer, create minimal Nit MR comments for the top remaining nits to reach 3.",
260
269
  "Group MR comments by file and dedupe similar entries; add a 'Missing Comments Summary' note if any comments were auto-added.",
261
270
  "Cross-link each MR comment to its related Proposed Patch when applicable ('See Proposed Patch: <title>').",
262
271
  "Keep all caps deterministic; if any list exceeds its cap, add a single trailing 'More items omitted due to caps.' line."