@exaudeus/workrail 0.2.5-beta.2 → 0.2.5-beta.4

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.2.5-beta.2",
3
+ "version": "0.2.5-beta.4",
4
4
  "description": "MCP server for structured workflow orchestration and step-by-step task guidance",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -24,89 +24,23 @@
24
24
  "Use each function's definition as the authoritative checklist for how to perform the step and what to produce (doc updates, context vars).",
25
25
  "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.",
26
26
  "If a function requires inputs that are missing, state exactly what is missing and pause. Otherwise, do not ask for confirmation.",
27
- "If prompt text and a function definition conflict, prefer the function definition for the how, and the step prompt for the what."
28
- ],
29
- "functionDefinitions": [
30
- {
31
- "name": "collectNits",
32
- "definition": "From the current analysis pass, extract items labeled 'Nit:' or clearly Minor suggestions. Append them to a running array `nitFindings` with entries: { title, details, filePath, line, analysisDepth }. Maintain `nitsCount`.",
33
- "scope": "workflow"
34
- },
35
- {
36
- "name": "prepareNitAppendix",
37
- "definition": "Aggregate `nitFindings` into a concise appendix grouped by file. Format each bullet as: `filePath:line - short description`. Produce markdown in `nitAppendix` and set `nitAppendixReady = true`.",
38
- "scope": "workflow"
39
- },
40
- {
41
- "name": "discoverModulePatterns",
42
- "definition": "Determine `moduleRoot` as the nearest common ancestor of changed files (clamped to the package or src subtree). Scan only within `moduleRoot` to build `patternCatalog` and `patternExamples` (naming, dependency injection, error handling, logging, test style, file layout).",
43
- "scope": "workflow"
44
- },
45
- {
46
- "name": "consolidatePatternFindings",
47
- "definition": "Compare MR changes against `patternCatalog` scoped to `moduleRoot`. Produce `patternFindings` and a grouped `patternAppendix` (by directory/file), and set `patternAppendixReady = true`.",
48
- "scope": "workflow"
49
- },
50
- {
51
- "name": "initReviewDoc",
52
- "definition": "Create a live Markdown report at project root. Determine filename as `<YYYY-MM-DD>--<ticket-or-branch>--mr-review.md` (ticket preferred, else branch, else `mr-unknown`). Initialize sections with stable markers and write header metadata. Set `reviewDocPath`.",
53
- "scope": "workflow"
54
- },
55
- {
56
- "name": "upsertSection",
57
- "definition": "Upsert content under a known section marker in the Markdown doc without duplicating sections. Maintain concise, scannable formatting.",
58
- "scope": "workflow"
59
- },
60
- {
61
- "name": "appendChangedFileRow",
62
- "definition": "Append or update a row in the Changed Files table with columns: File | +/- | Summary | Risk.",
63
- "scope": "workflow"
64
- },
65
- {
66
- "name": "appendFinding",
67
- "definition": "Append a finding grouped by severity (Critical/Major/Minor). Each entry includes path:line, 1–2 lines rationale, optional tiny diff.",
68
- "scope": "workflow"
69
- },
70
- {
71
- "name": "appendPatternResult",
72
- "definition": "Append a Pattern Adherence row (Check | Result | Note) and brief per-file deviations.",
73
- "scope": "workflow"
74
- },
75
- {
76
- "name": "appendNit",
77
- "definition": "Append a Nit entry grouped by file: `path:line — nit text`.",
78
- "scope": "workflow"
79
- },
80
- {
81
- "name": "appendMRComment",
82
- "definition": "Append a copy-ready MR comment block with file:line, short title, rationale, and optional tiny diff snippet.",
83
- "scope": "workflow"
84
- },
85
- {
86
- "name": "logRevision",
87
- "definition": "Append a timestamped line to the Revision Log describing the update (e.g., 'Added Depth 1 results').",
88
- "scope": "workflow"
89
- },
90
- {
91
- "name": "discoverHygieneSignals",
92
- "definition": "Within `moduleRoot`, scan changed files and immediate neighbors for generic hygiene signals: disabled/skipped/focused tests; tests with no assertions; commented-out code; stale/misleading comments; TODO/FIXME/HACK/BUG without ticket/reference or clearly stale; high-density TODOs; naming/DI/logging/error handling inconsistencies vs local `patternCatalog`; ad-hoc debug prints; obvious unused identifiers/unreachable code.",
93
- "scope": "workflow"
94
- },
95
- {
96
- "name": "consolidateHygieneFindings",
97
- "definition": "Consolidate hygiene signals with caps: total ≤10, per-category ≤3; dedupe similar items; group by file; elevate severity to Major only for clearly risky cases (e.g., focused tests, tests with no assertions). Produce category counts and a capped item list.",
98
- "scope": "workflow"
99
- },
100
- {
101
- "name": "appendHygieneFinding",
102
- "definition": "Append a hygiene bullet to the live doc grouped by file: `path:line — short note (≤ 2 lines)`. Avoid duplication with Nit items; reference '(linked in Nits)' instead of repeating if needed.",
103
- "scope": "workflow"
104
- },
105
- {
106
- "name": "finalizeReviewDocument",
107
- "definition": "Finalize the live review document. If `complexity == 'Trivial'`: write a brief executive summary (approve), do light hygiene (≤2) and quick nit sweep, set status=Final, log revision. Otherwise: write full executive summary (3 positives, 3 risks, recommendation), dedupe/sort findings, ensure sections (patterns, deviations, tests/docs, ideas, nits, MR comments), ensure Critical/Major coverage with curated MR comments, set status=Final, log revision.",
108
- "scope": "workflow"
109
- }
27
+ "If prompt text and a function definition conflict, prefer the function definition for the how, and the step prompt for the what.",
28
+ "collectNits(): From the current pass, extract 'Nit:' or Minor items; append to nitFindings {title, details, filePath, line, analysisDepth}; maintain nitsCount.",
29
+ "prepareNitAppendix(): Group nitFindings by file; format 'filePath:line - short desc'; write markdown to nitAppendix; set nitAppendixReady=true.",
30
+ "discoverModulePatterns(): Compute moduleRoot (nearest common ancestor of changed files, clamped to package/src); scan only moduleRoot to build patternCatalog + patternExamples (naming, DI, errors, logging, tests, layout).",
31
+ "consolidatePatternFindings(): Compare changes to patternCatalog (scoped to moduleRoot); produce patternFindings + grouped patternAppendix; set patternAppendixReady=true.",
32
+ "initReviewDoc(): Create live Markdown at project root; filename '<YYYY-MM-DD>--<ticket-or-branch>--mr-review.md'; insert section markers; set reviewDocPath; if no file I/O, output full doc and path.",
33
+ "upsertSection(): Upsert under a known section marker; never duplicate sections; keep formatting concise.",
34
+ "appendChangedFileRow(): Append/update Changed Files table row: File | +/- | Summary | Risk.",
35
+ "appendFinding(): Append finding under severity (Critical/Major/Minor) with path:line, 1–2-line rationale, optional tiny diff.",
36
+ "appendPatternResult(): Append Pattern Adherence row (Check | Result | Note); add brief per-file deviations.",
37
+ "appendNit(): Append Nit grouped by file: 'path:line nit text'.",
38
+ "appendMRComment(): Append copy-ready MR comment: file:line, short title, rationale, optional tiny diff.",
39
+ "logRevision(): Append timestamped message to the Revision Log describing the update.",
40
+ "discoverHygieneSignals(): In moduleRoot, scan changed files + neighbors for: disabled/skipped/focused tests; no-assert tests; commented-out code; stale/misleading comments; TODO/FIXME/HACK/BUG w/o ticket or stale; pattern inconsistencies; ad-hoc debug prints; obvious unused/unreachable.",
41
+ "consolidateHygieneFindings(): Cap total ≤10 and ≤3 per category; dedupe; group by file; elevate Major only for clearly risky cases; produce category counts and capped items.",
42
+ "appendHygieneFinding(): Append hygiene bullet grouped by file: 'path:line short note (≤2 lines)'; if duplicated in Nits, reference '(linked in Nits)'.",
43
+ "finalizeReviewDocument(): Trivial: brief summary approve, light hygiene (≤2), quick nits, status=Final, log. Non-trivial: exec summary (3 positives, 3 risks, recommendation), dedupe/sort findings, ensure sections + curated comments for Critical/Major, status=Final, log."
110
44
  ],
111
45
  "steps": [
112
46
  {