refactor: rename workflow-agent-kit → workflow-util-agent, merge workflow-moderator into cli-workflow #512

Closed
opened 2026-05-25 10:48:07 +00:00 by xiaoju · 0 comments
Owner

Background

Our naming convention:

  • workflow-agent-xxx = agent adapter CLIs (hermes, claude-code, builtin)
  • workflow-util-xxx = shared utility libraries

workflow-agent-kit is a utility library, not an agent CLI. It should be workflow-util-agent.

workflow-moderator is only 62 lines, only used by cli-workflow. No need for a standalone package.

Also: packages/workflow-util-agent/src/build-agent-prompt.ts is dead code (imports non-existent @uncaged/workflow-runtime), delete it.

Task 1: Rename workflow-agent-kitworkflow-util-agent

  1. Rename directory packages/workflow-agent-kit/packages/workflow-util-agent/
    • Note: packages/workflow-util-agent/ already exists with a single dead file src/build-agent-prompt.ts — delete that file first, then move all contents from workflow-agent-kit into it
  2. Update package.json name: @uncaged/workflow-agent-kit@uncaged/workflow-util-agent
  3. Update package.json repository.directory field
  4. Update ALL imports across the monorepo: @uncaged/workflow-agent-kit@uncaged/workflow-util-agent
  5. Update ALL tsconfig.json references: ../workflow-agent-kit../workflow-util-agent
  6. Update root tsconfig.json reference
  7. Update all docs (README.md, CLAUDE.md, CONTRIBUTING.md, docs/*.md)

Consumers: cli-workflow, workflow-agent-builtin, workflow-agent-claude-code, workflow-agent-hermes

Task 2: Merge workflow-moderator into cli-workflow

  1. Copy packages/workflow-moderator/src/evaluate.ts and types.tspackages/cli-workflow/src/moderator/
  2. Create packages/cli-workflow/src/moderator/index.ts re-exporting evaluate and EvaluateResult
  3. Update packages/cli-workflow/src/commands/thread.ts: change import from @uncaged/workflow-moderator to ../moderator/index.js
  4. Copy tests: packages/workflow-moderator/__tests__/evaluate.test.tspackages/cli-workflow/src/__tests__/moderator-evaluate.test.ts
    • Change test imports: bun:testvitest (cli-workflow uses vitest)
    • Fix import path to ../moderator/evaluate.js
  5. Add mustache + @types/mustache as dependencies to packages/cli-workflow/package.json (moderator uses mustache)
  6. Remove @uncaged/workflow-moderator from cli-workflow package.json dependencies
  7. Remove workflow-moderator reference from cli-workflow/tsconfig.json
  8. Remove workflow-moderator reference from root tsconfig.json
  9. Move packages/workflow-moderator/legacy-packages/workflow-moderator/
  10. Update all docs referencing workflow-moderator

Verification

  • bun install succeeds
  • bun run build (tsc --build) passes
  • bun run test:ci — all packages pass (note: cas-exit-code.test.ts, thread-step-count.test.ts, workflow-resolution.test.ts in cli-workflow have pre-existing failures, ignore those)
  • No remaining references to workflow-agent-kit or @uncaged/workflow-moderator in source code (*.ts, *.json, tsconfig files)
  • Docs updated

Do NOT

  • Do NOT publish to npm
  • Do NOT change any logic, only move/rename
  • Do NOT fix pre-existing test failures
## Background Our naming convention: - `workflow-agent-xxx` = agent adapter CLIs (hermes, claude-code, builtin) - `workflow-util-xxx` = shared utility libraries `workflow-agent-kit` is a utility library, not an agent CLI. It should be `workflow-util-agent`. `workflow-moderator` is only 62 lines, only used by `cli-workflow`. No need for a standalone package. Also: `packages/workflow-util-agent/src/build-agent-prompt.ts` is dead code (imports non-existent `@uncaged/workflow-runtime`), delete it. ## Task 1: Rename `workflow-agent-kit` → `workflow-util-agent` 1. Rename directory `packages/workflow-agent-kit/` → `packages/workflow-util-agent/` - Note: `packages/workflow-util-agent/` already exists with a single dead file `src/build-agent-prompt.ts` — delete that file first, then move all contents from `workflow-agent-kit` into it 2. Update `package.json` name: `@uncaged/workflow-agent-kit` → `@uncaged/workflow-util-agent` 3. Update `package.json` repository.directory field 4. Update ALL imports across the monorepo: `@uncaged/workflow-agent-kit` → `@uncaged/workflow-util-agent` 5. Update ALL `tsconfig.json` references: `../workflow-agent-kit` → `../workflow-util-agent` 6. Update root `tsconfig.json` reference 7. Update all docs (README.md, CLAUDE.md, CONTRIBUTING.md, docs/*.md) Consumers: `cli-workflow`, `workflow-agent-builtin`, `workflow-agent-claude-code`, `workflow-agent-hermes` ## Task 2: Merge `workflow-moderator` into `cli-workflow` 1. Copy `packages/workflow-moderator/src/evaluate.ts` and `types.ts` → `packages/cli-workflow/src/moderator/` 2. Create `packages/cli-workflow/src/moderator/index.ts` re-exporting `evaluate` and `EvaluateResult` 3. Update `packages/cli-workflow/src/commands/thread.ts`: change import from `@uncaged/workflow-moderator` to `../moderator/index.js` 4. Copy tests: `packages/workflow-moderator/__tests__/evaluate.test.ts` → `packages/cli-workflow/src/__tests__/moderator-evaluate.test.ts` - Change test imports: `bun:test` → `vitest` (cli-workflow uses vitest) - Fix import path to `../moderator/evaluate.js` 5. Add `mustache` + `@types/mustache` as dependencies to `packages/cli-workflow/package.json` (moderator uses mustache) 6. Remove `@uncaged/workflow-moderator` from `cli-workflow` package.json dependencies 7. Remove `workflow-moderator` reference from `cli-workflow/tsconfig.json` 8. Remove `workflow-moderator` reference from root `tsconfig.json` 9. Move `packages/workflow-moderator/` → `legacy-packages/workflow-moderator/` 10. Update all docs referencing workflow-moderator ## Verification - `bun install` succeeds - `bun run build` (tsc --build) passes - `bun run test:ci` — all packages pass (note: `cas-exit-code.test.ts`, `thread-step-count.test.ts`, `workflow-resolution.test.ts` in cli-workflow have pre-existing failures, ignore those) - No remaining references to `workflow-agent-kit` or `@uncaged/workflow-moderator` in source code (*.ts, *.json, tsconfig files) - Docs updated ## Do NOT - Do NOT publish to npm - Do NOT change any logic, only move/rename - Do NOT fix pre-existing test failures
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#512