@exaudeus/workrail 3.42.0 → 3.44.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.
Files changed (36) hide show
  1. package/dist/console-ui/assets/{index-DwfWMKvv.js → index-Bi38ITiQ.js} +1 -1
  2. package/dist/console-ui/index.html +1 -1
  3. package/dist/daemon/workflow-runner.d.ts +15 -1
  4. package/dist/daemon/workflow-runner.js +86 -9
  5. package/dist/manifest.json +39 -23
  6. package/dist/trigger/adapters/github-queue-poller.d.ts +34 -0
  7. package/dist/trigger/adapters/github-queue-poller.js +200 -0
  8. package/dist/trigger/delivery-action.d.ts +2 -0
  9. package/dist/trigger/delivery-action.js +24 -0
  10. package/dist/trigger/github-queue-config.d.ts +18 -0
  11. package/dist/trigger/github-queue-config.js +155 -0
  12. package/dist/trigger/polling-scheduler.d.ts +1 -0
  13. package/dist/trigger/polling-scheduler.js +185 -6
  14. package/dist/trigger/trigger-router.js +24 -1
  15. package/dist/trigger/trigger-store.js +77 -2
  16. package/dist/trigger/types.d.ts +19 -0
  17. package/docs/design/adaptive-coordinator-context-candidates.md +265 -0
  18. package/docs/design/adaptive-coordinator-context-review.md +101 -0
  19. package/docs/design/adaptive-coordinator-context.md +504 -0
  20. package/docs/design/adaptive-coordinator-routing-candidates.md +340 -0
  21. package/docs/design/adaptive-coordinator-routing-design-review.md +135 -0
  22. package/docs/design/adaptive-coordinator-routing-review.md +156 -0
  23. package/docs/design/adaptive-coordinator-routing.md +660 -0
  24. package/docs/design/context-assembly-layer-design-review.md +110 -0
  25. package/docs/design/context-assembly-layer.md +622 -0
  26. package/docs/design/stuck-escalation-candidates.md +176 -0
  27. package/docs/design/stuck-escalation-design-review.md +70 -0
  28. package/docs/design/stuck-escalation.md +326 -0
  29. package/docs/design/worktrain-task-queue-candidates.md +252 -0
  30. package/docs/design/worktrain-task-queue-design-review.md +109 -0
  31. package/docs/design/worktrain-task-queue.md +443 -0
  32. package/docs/design/worktree-review-findings-candidates.md +101 -0
  33. package/docs/design/worktree-review-findings-design-review.md +65 -0
  34. package/docs/design/worktree-review-findings-implementation-plan.md +153 -0
  35. package/docs/ideas/backlog.md +148 -0
  36. package/package.json +3 -3
@@ -0,0 +1,153 @@
1
+ # Worktree Review Findings - Implementation Plan
2
+
3
+ ## Problem Statement
4
+
5
+ PR #630 (`feat/worktree-auto-commit`) has 7 MR review findings (1 critical, 2 major, 4 minor) that must be resolved before merge. The critical bug causes delivery to fail with "not a git repository" because `runWorkflow()` deletes the worktree before `maybeRunDelivery()` runs.
6
+
7
+ ## Acceptance Criteria
8
+
9
+ 1. `runWorkflow()` does NOT remove the worktree on the success path or immediate-complete path.
10
+ 2. `makeSpawnAgentTool()` has a JSDoc comment documenting that child sessions always use `branchStrategy: 'none'`.
11
+ 3. `WorkflowRunSuccess` has a `readonly sessionId?: string` field.
12
+ 4. `runWorkflow()` sets `sessionId` in the success return when `branchStrategy === 'worktree'`.
13
+ 5. `trigger-router.ts` reads `result.sessionId` instead of `result.sessionWorkspacePath.split('/').at(-1)`.
14
+ 6. `trigger-store.ts` validates `branchPrefix` and `baseBranch` against `/^[a-zA-Z0-9._/-]+$/` and rejects values starting with `-`.
15
+ 7. `tests/unit/trigger-router.test.ts` has a test verifying delivery uses the worktree path.
16
+ 8. `npm run build` compiles clean.
17
+ 9. `npx vitest run` shows no regressions.
18
+ 10. `persistTokens()` is called unconditionally after worktree creation (not gated on `startContinueToken`).
19
+ 11. Immediate-complete path return includes `sessionWorkspacePath` and `sessionId` when `sessionWorktreePath !== undefined`.
20
+
21
+ ## Non-Goals
22
+
23
+ - Do NOT touch `src/mcp/` in any way.
24
+ - Do NOT change delivery logic in `delivery-action.ts`.
25
+ - Do NOT change the cleanup location in `maybeRunDelivery()` (lines 365-377 in trigger-router.ts) -- this is correct.
26
+ - Do NOT add new abstractions or dependencies.
27
+ - Do NOT change workflow definitions or schema files.
28
+
29
+ ## Philosophy-Driven Constraints
30
+
31
+ - Use `TriggerStoreError` with `kind: 'invalid_field_value'` for validation errors (errors-as-data).
32
+ - `WorkflowRunSuccess.sessionId` must be `readonly` (immutability by default).
33
+ - JSDoc must explain WHY, not just what (document 'why' principle).
34
+ - Validation must happen at the boundary (trigger-store parse time), not at worktree creation time.
35
+ - Architectural fix: cleanup moves to the correct layer, not patched at the symptom.
36
+
37
+ ## Invariants
38
+
39
+ 1. Worktree must exist until `maybeRunDelivery()` completes; `runWorkflow()` must NOT remove it on any success path.
40
+ 2. `persistTokens()` must always record `worktreePath` immediately after worktree creation (not conditional on token presence).
41
+ 3. The `sessionId` field on `WorkflowRunSuccess` must never require path parsing at the call site.
42
+ 4. `branchPrefix` and `baseBranch` must be validated before use (fail-fast at daemon startup).
43
+
44
+ ## Selected Approach
45
+
46
+ Follow review verbatim, with one additional fix: the immediate-complete return path (line 3062) must also include `sessionWorkspacePath` and `sessionId` when a worktree was created (this was missing and discovered during design review).
47
+
48
+ ## Vertical Slices
49
+
50
+ ### Slice 1: CRITICAL -- Remove Premature Worktree Removal
51
+ **File**: `src/daemon/workflow-runner.ts`
52
+ **Changes**:
53
+ - Remove the `if (sessionWorktreePath)` cleanup block at lines 3049-3058 (immediate-complete path).
54
+ - Add `sessionWorkspacePath` and `sessionId` spread to the immediate-complete return at line 3062.
55
+ - Remove the `// ---- Remove worktree on success ----` comment and `if (sessionWorktreePath)` block at lines 3502-3514 (success path).
56
+
57
+ **Done when**: `runWorkflow()` returns without any `execFileAsync('git', ['-C', ..., 'worktree', 'remove', ...])` calls on the success path. The worktree cleanup comment in `trigger-router.ts` lines 355-357 remains the sole cleanup on the success path.
58
+
59
+ ### Slice 2: MAJOR -- JSDoc on makeSpawnAgentTool
60
+ **File**: `src/daemon/workflow-runner.ts`
61
+ **Changes**:
62
+ - Add a JSDoc comment block immediately before `export function makeSpawnAgentTool(` (line 2009).
63
+ - Content: "Child sessions spawned by this tool always have `branchStrategy: 'none'` -- they operate in the parent's workspace without their own worktree or feature branch. Coordinators that need isolated child sessions should dispatch them via `TriggerRouter.dispatch()` instead."
64
+
65
+ **Done when**: JSDoc is present and describes the branchStrategy limitation.
66
+
67
+ ### Slice 3: Minor 1 -- Unconditional persistTokens After Worktree Creation
68
+ **File**: `src/daemon/workflow-runner.ts`
69
+ **Changes**:
70
+ - Remove the `if (startContinueToken)` guard from the second `persistTokens()` call (lines 3020-3022).
71
+ - Replace with an unconditional call: `await persistTokens(sessionId, startContinueToken ?? currentContinueToken, startCheckpointToken, sessionWorktreePath);`
72
+
73
+ **Done when**: `persistTokens()` is called unconditionally after worktree creation, ensuring `worktreePath` is always written to the sidecar.
74
+
75
+ ### Slice 4: Minor 2 -- Thread sessionId Through WorkflowRunSuccess
76
+ **Files**: `src/daemon/workflow-runner.ts`, `src/trigger/trigger-router.ts`
77
+ **Changes in workflow-runner.ts**:
78
+ - Add `readonly sessionId?: string` to `WorkflowRunSuccess` interface (after `sessionWorkspacePath`).
79
+ - In the main success return (line 3526), add `...(sessionWorktreePath !== undefined ? { sessionId } : {})` (where `sessionId` is the process-local UUID already in scope).
80
+ - In the immediate-complete return (line 3062), add `...(sessionWorktreePath !== undefined ? { sessionId } : {})` alongside `sessionWorkspacePath`.
81
+
82
+ **Changes in trigger-router.ts**:
83
+ - Line 321: Replace `result.sessionWorkspacePath.split('/').at(-1) ?? ''` with `result.sessionId ?? ''`.
84
+
85
+ **Done when**: `WorkflowRunSuccess.sessionId` is set when `branchStrategy === 'worktree'` and trigger-router reads it directly without path manipulation.
86
+
87
+ ### Slice 5: Minor 3 -- Validate git-safe chars for branchPrefix/baseBranch
88
+ **File**: `src/trigger/trigger-store.ts`
89
+ **Changes**:
90
+ - After lines 867-868 where `baseBranch` and `branchPrefix` are extracted, add regex validation.
91
+ - For each non-undefined value, check `/^[a-zA-Z0-9._/-]+$/` and that it does not start with `-`.
92
+ - Return `err({ kind: 'invalid_field_value', field: '...', triggerId: rawId })` on failure.
93
+
94
+ **Done when**: A trigger with `branchPrefix: '--bad'` or `baseBranch: '-main'` fails at parse time with `kind: 'invalid_field_value'`.
95
+
96
+ ### Slice 6: Minor 4 -- Add End-to-End Delivery Test for branchStrategy:worktree
97
+ **File**: `tests/unit/trigger-router.test.ts`
98
+ **Changes**:
99
+ - Add a test in the `describe('delivery wiring (autoCommit)')` block.
100
+ - The test creates a `WorkflowRunSuccess` with `sessionWorkspacePath: '/worktrees/test-session-id'` and valid `lastStepNotes`.
101
+ - Stubs `runWorkflowFn` to return this success result.
102
+ - Verifies the first git call uses `/worktrees/test-session-id` as the working directory (not trigger.workspacePath).
103
+
104
+ **Done when**: Test passes and verifies `execFn` is called with the worktree path.
105
+
106
+ ## Test Design
107
+
108
+ ### Existing Tests to Verify Unchanged
109
+ - `tests/unit/trigger-router.test.ts` -- all existing tests must still pass.
110
+ - `tests/unit/trigger-store.test.ts` -- all existing validation tests must still pass.
111
+
112
+ ### New Test (Slice 6)
113
+ ```
114
+ describe('delivery wiring (autoCommit)')
115
+ it('uses sessionWorkspacePath as working directory when runWorkflow returns a worktree session')
116
+ - trigger: { autoCommit: true, branchStrategy: 'worktree', workspacePath: '/workspace' }
117
+ - runWorkflowFn returns: { _tag: 'success', sessionWorkspacePath: '/worktrees/abc-session', lastStepNotes: VALID_HANDOFF_NOTES }
118
+ - fakeExec: vi.fn().mockResolvedValue(...)
119
+ - assertion: fakeExec called; first git add call uses cwd '/worktrees/abc-session'
120
+ ```
121
+
122
+ ## Risk Register
123
+
124
+ | Risk | Likelihood | Impact | Mitigation |
125
+ |---|---|---|---|
126
+ | `startContinueToken` is undefined in practice when branchStrategy='worktree' | Very Low | Low | persistTokens writes '' as fallback; startup recovery handles it |
127
+ | Removing cleanup breaks non-autoCommit worktree sessions | Low | Low | Startup recovery reaps after 24h; combination is unusual |
128
+ | `sessionId` field name collision with WorkRail server sessionId | Low | Low | Field is optional; no ambiguity since it's typed on the interface |
129
+
130
+ ## PR Packaging Strategy
131
+
132
+ All changes on existing branch `feat/worktree-auto-commit`. Single PR #630.
133
+
134
+ Commit message: `fix(daemon): address worktree review findings -- move success cleanup, document spawn_agent limitation, thread sessionId, validate git-safe chars`
135
+
136
+ ## Philosophy Alignment
137
+
138
+ | Principle | Slice | Status |
139
+ |---|---|---|
140
+ | Architectural fixes over patches | Slice 1 | Satisfied -- cleanup moved to correct layer |
141
+ | Errors are data | Slice 5 | Satisfied -- TriggerStoreError returned |
142
+ | Make illegal states unrepresentable | Slice 4 | Satisfied -- typed sessionId, no path-parsing |
143
+ | Validate at boundaries | Slice 5 | Satisfied -- parse-time validation |
144
+ | Document 'why' | Slice 2 | Satisfied -- JSDoc explains architectural reason |
145
+ | Immutability by default | Slice 4 | Satisfied -- readonly field added |
146
+ | YAGNI | All | Satisfied -- no new abstractions |
147
+
148
+ ## Open Questions
149
+
150
+ None. All questions resolved during design.
151
+
152
+ ## Unresolved Unknown Count: 0
153
+ ## Plan Confidence Band: High
@@ -6247,3 +6247,151 @@ Scheduled tasks are the entry point for fully autonomous work:
6247
6247
  - `node-cron` or `croner` npm package for cron expression parsing and next-fire-time calculation. Lightweight, no daemon dependencies.
6248
6248
  - Scheduled triggers have no webhook payload -- `contextMapping` is empty, `goalTemplate` uses only static text or env vars.
6249
6249
  - The schedule state (last-fired-at per trigger) persists to `~/.workrail/schedule-state.json` so the daemon can detect missed runs on restart.
6250
+
6251
+ ---
6252
+
6253
+ ## Autonomous grooming loop + workOnAll mode (Apr 19, 2026)
6254
+
6255
+ ### The vision
6256
+
6257
+ WorkTrain eventually finds and executes its own work without any human seeding the queue. This is the full autonomous loop: raw backlog idea → groomed issue → discovered/shaped spec → implemented PR → reviewed → merged. Zero human input required once configured.
6258
+
6259
+ ### Three autonomy levels
6260
+
6261
+ **Level 0 -- Opt-in queue (current design)**
6262
+ Human adds `worktrain` label to specific issues. WorkTrain works those issues only. Safe, predictable, explicit.
6263
+
6264
+ **Level 1 -- workOnAll mode**
6265
+ Config flag `workOnAll: true` in `~/.workrail/config.json`. WorkTrain looks at ALL open issues, infers which ones are actionable, picks the highest-priority one. Human escape hatch: `worktrain:skip` label blocks WorkTrain from touching a specific issue. Status labels (`worktrain:in-progress`, `worktrain:done`) are coordinator-managed for observability. No human-set maturity labels needed -- coordinator infers from content.
6266
+
6267
+ **Level 2 -- Fully proactive**
6268
+ WorkTrain also surfaces work it found itself: failing CI, Dependabot alerts, backlog items with no issue, patterns in git history suggesting missing tests or docs. Creates its own work items, runs them, closes the loop.
6269
+
6270
+ ### The grooming loop (scheduled, e.g. nightly)
6271
+
6272
+ Runs on a cron trigger. Responsibilities:
6273
+ 1. Read `docs/ideas/backlog.md`, `docs/roadmap/now-next-later.md`, open GitHub issues
6274
+ 2. Reconcile: close issues that are already done (PR merged), update priorities based on what shipped recently, flag duplicate or obsolete items
6275
+ 3. For each ungroomed `worktrain` issue (or all issues in workOnAll mode): infer maturity -- does it have a linked spec? acceptance criteria? concrete implementation plan?
6276
+ 4. For high-value `idea`-level items: autonomously run `wr.discovery` → `wr.shaping` → update or create issue with pitch attached, set `worktrain:specced`
6277
+ 5. Backlog → issue promotion: when a backlog item crosses a readiness threshold (has enough context to act on), create a GitHub issue from it
6278
+
6279
+ ### Maturity inference (no human-set labels required in Level 1+)
6280
+
6281
+ The coordinator reads issue content and infers:
6282
+ - Linked pitch/PRD/spec URL → `ready` or `specced`
6283
+ - Has acceptance criteria or concrete implementation plan → `specced` or `ready`
6284
+ - Vague/exploratory language → `idea`
6285
+ - Has open PR or recent branch activity → skip (already in flight)
6286
+
6287
+ The `worktrain:idea/specced/ready` taxonomy is the coordinator's internal model, not something humans set. In Level 1+ the coordinator manages it automatically.
6288
+
6289
+ ### workOnAll config
6290
+
6291
+ ```json
6292
+ // ~/.workrail/config.json
6293
+ {
6294
+ "workOnAll": true,
6295
+ "workOnAllExclusions": ["needs-design", "blocked-external", "wontfix"],
6296
+ "maxConcurrentSelf": 2
6297
+ }
6298
+ ```
6299
+
6300
+ `maxConcurrentSelf` caps how many autonomous self-improvement sessions run simultaneously -- important so WorkTrain doesn't try to implement 10 things at once and create merge conflicts.
6301
+
6302
+ ### Design notes
6303
+
6304
+ - The grooming loop and the work loop are **separate triggers** with separate schedules. Grooming runs more frequently (nightly or post-merge). Work loop runs on demand or weekly.
6305
+ - The grooming loop requires LLM judgment ("is this ready?") -- it's a `wr.discovery`-style session on the backlog, not a deterministic script. This is a feature, not a limitation.
6306
+ - `worktrain:skip` is the only label humans need to set in Level 1+ -- it's the explicit "not this one" override.
6307
+ - Auto-PR-from-backlog requires careful scope: WorkTrain should create draft PRs for its own discoveries, not automatically push to open issues on other people's repos.
6308
+
6309
+ ### Priority
6310
+
6311
+ This is the long-term autonomous vision. Implement in order:
6312
+ 1. Level 0 (current, task queue PR #4)
6313
+ 2. workOnAll config flag (small addition to the coordinator, after #4 ships)
6314
+ 3. Maturity inference (replace label-based routing with content inference)
6315
+ 4. Grooming loop (scheduled cron trigger, wr.discovery session on backlog)
6316
+ 5. Level 2 proactive work (post-grooming, after proving the loop works)
6317
+
6318
+ ---
6319
+
6320
+ ## Escalating review gates based on finding severity (Apr 19, 2026)
6321
+
6322
+ **The idea:** when an MR review returns a Critical finding post-implementation, the review is not over -- it triggers a deeper audit chain before merge is allowed.
6323
+
6324
+ ### Current state
6325
+
6326
+ `worktrain run pr-review` routes by severity: `clean` → merge, `minor` → fix-agent loop, `blocking` → escalate to human. But "blocking" is binary -- a single Critical finding and a trivially incorrect comment are treated identically (both block, neither gets more scrutiny).
6327
+
6328
+ ### The right behavior
6329
+
6330
+ After a fix round, if the re-review still returns a Critical finding (or the original review does):
6331
+ 1. **Another full MR review** -- confirm the Critical is real, not a false positive from the reviewer
6332
+ 2. **Production readiness audit** (`production-readiness-audit` workflow) -- a Critical finding often implies a runtime risk. Check for error handling gaps, security exposure, missing observability.
6333
+ 3. **Architecture audit** (`architecture-scalability-audit`) -- if the Critical is architectural (wrong abstraction, tight coupling, violates invariants), run a targeted audit on the affected modules.
6334
+
6335
+ Not all Criticals warrant all three. The coordinator should route based on the finding's `category` field (from `wr.review_verdict`):
6336
+ - `correctness` / `security` → always trigger prod audit
6337
+ - `architecture` / `design` → trigger arch audit
6338
+ - All → trigger re-review
6339
+
6340
+ ### Auto-merge policy interaction
6341
+
6342
+ A PR that triggered the escalating audit chain should NEVER auto-merge, even if the final re-review comes back clean. The human should approve it explicitly after seeing the audit trail. This is a hard rule, not a setting.
6343
+
6344
+ ### Implementation notes
6345
+
6346
+ - The escalation logic belongs in the `IMPLEMENT` and `REVIEW_ONLY` mode coordinators (part of the adaptive pipeline coordinator work).
6347
+ - `wr.review_verdict` `findings[].category` field needs to be defined if not already -- check `src/v2/durable-core/schemas/artifacts/review-verdict.ts`.
6348
+ - The audit chain runs sequentially (prod then arch), not in parallel -- each audit's output informs the next.
6349
+ - All audit session IDs should be linked to the same parent work unit so the console session tree shows the full chain.
6350
+
6351
+ ### Priority
6352
+
6353
+ Design this alongside the adaptive pipeline coordinator (#3). The coordinator needs to know about this escalation policy before its routing logic is finalized -- the `IMPLEMENT` mode's post-review handling is incomplete without it.
6354
+
6355
+ ---
6356
+
6357
+ ## UX/UI impact detection and design workflow integration (Apr 19, 2026)
6358
+
6359
+ **The idea:** When the adaptive pipeline coordinator classifies a task, it should detect whether the task touches user-facing surfaces (UI components, user flows, API contracts that clients consume) and automatically insert a `ui-ux-design-workflow` run before implementation.
6360
+
6361
+ ### Why this matters
6362
+
6363
+ Coding tasks that touch UI get implemented without a design pass today. The agent writes functional code but often produces interfaces that are technically correct but experientially wrong -- wrong information hierarchy, wrong affordances, missing error states, missing loading states, wrong copy. A `ui-ux-design-workflow` run before coding forces the "multiple design directions before converging" discipline that prevents the single-solution trap.
6364
+
6365
+ ### Detection signals (what marks a task as UX-impactful)
6366
+
6367
+ The coordinator should classify a task as `touchesUI: true` when any of:
6368
+ - Issue title or body mentions: component, screen, page, modal, dialog, button, form, flow, onboarding, dashboard, table, list, navigation, UX, UI, design, user-facing, frontend, console, web
6369
+ - Affected files (from git diff or knowledge graph) include: `console/src/`, `*.tsx`, `*.css`, `web/`, `views/`
6370
+ - The task has a `ui` or `frontend` label
6371
+ - The upstream spec (pitch/PRD) explicitly calls out visual or interaction design requirements
6372
+
6373
+ False positives (running design workflow unnecessarily) are cheaper than false negatives (shipping bad UX). Default to `touchesUI: true` when signals are ambiguous and the task is `complexity: Medium` or larger.
6374
+
6375
+ ### Pipeline integration
6376
+
6377
+ When `touchesUI: true`, the `IMPLEMENT` pipeline becomes:
6378
+
6379
+ ```
6380
+ coding-task-classify → ui-ux-design-workflow → coding-task-workflow-agentic → PR → review → merge
6381
+ ```
6382
+
6383
+ The `ui-ux-design-workflow` output (a design spec with chosen direction, information architecture, component breakdown, error states) feeds into Phase 0.5 of `coding-task-workflow-agentic` as the upstream spec. The coding agent then implements against a concrete design spec, not ad-hoc intuition.
6384
+
6385
+ ### Relationship to escalating review gates
6386
+
6387
+ When a post-implementation MR review finds a UI/UX finding (wrong affordance, missing state, confusing flow), the escalation should include a targeted `ui-ux-design-workflow` audit pass, not just a code review. UX regressions need design eyes, not just code eyes.
6388
+
6389
+ ### Open design questions
6390
+
6391
+ - **Who reviews the design spec before coding starts?** If the UX design workflow runs autonomously at 2am and coding starts immediately after, there is no human review of the design direction. This is fine for small UI tweaks; it's wrong for new user flows. The coordinator needs a complexity gate: `complexity: Large AND touchesUI: true` → require human ack on the design spec before coding.
6392
+ - **Design spec format:** `ui-ux-design-workflow` currently produces a markdown design document. Does the coding workflow reliably consume this as an upstream spec via Phase 0.5? Verify before relying on the automated handoff.
6393
+ - **Console-specific workflows:** WorkRail's console is a React/TypeScript SPA. Consider a `worktrain:console` label or file-path heuristic that routes to a console-specific design workflow variant.
6394
+
6395
+ ### Priority
6396
+
6397
+ Design this as part of the adaptive coordinator (#3). The `touchesUI` flag belongs on the classification output alongside `taskComplexity` and `maturity`. The UI detection logic and the design workflow insertion are both coordinator-level concerns, not engine-level.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exaudeus/workrail",
3
- "version": "3.42.0",
3
+ "version": "3.44.0",
4
4
  "description": "Step-by-step workflow enforcement for AI agents via MCP",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -54,8 +54,8 @@
54
54
  "preinstall": "node -e \"const v=parseInt(process.versions.node.split('.')[0],10); if(v<20){console.error('WorkRail requires Node.js >=20. Current: '+process.versions.node+'\\nPlease upgrade: https://nodejs.org/'); process.exit(1);}\"",
55
55
  "dev:mcp": "pkill -f \"$(pwd)/dist/mcp-server.js\" 2>/dev/null; sleep 0.5; WORKRAIL_TRANSPORT=http WORKRAIL_ENABLE_SESSION_TOOLS=true node dist/mcp-server.js",
56
56
  "dev:mcp:watch": "pkill -f \"$(pwd)/dist/mcp-server.js\" 2>/dev/null; sleep 0.5; WORKRAIL_TRANSPORT=http WORKRAIL_ENABLE_SESSION_TOOLS=true nodemon --watch dist --ext js --delay 2 --exec 'node dist/mcp-server.js'",
57
- "web:dev": "npm run build && WORKRAIL_ENABLE_SESSION_TOOLS=true node dist/mcp-server.js",
58
- "web:ci": "WORKRAIL_ENABLE_SESSION_TOOLS=true node dist/mcp-server.js",
57
+ "web:dev": "npm run build && node dist/cli-worktrain.js console",
58
+ "web:ci": "node dist/cli-worktrain.js console",
59
59
  "web:typecheck": "tsc -p tsconfig.web.json",
60
60
  "typecheck": "tsc --noEmit",
61
61
  "test": "vitest",