Part of the persona-kit consolidation. Depends on #67. This is issue 5 of 8.
Goal
Now that workforce CLI consumes everything persona-shaped from @agentworkforce/persona-kit (#67), @agentworkforce/workload-router no longer needs to re-export those symbols. Delete the moved-out exports outright. Major-version bump for the breaking change.
After this PR, workload-router is only:
- Routing profiles (
RoutingProfile, RoutingProfileRule)
- Persona catalog (
personaCatalog, the auto-generated registry from packages/workload-router/src/generated/personas.ts)
PersonaSelection (the routing-resolution result type)
- Evidence + owner-decision logic
- Anything else that's about picking a persona for a workload, not about instantiating one.
What gets deleted from packages/workload-router/src/index.ts
Everything that was re-exported via persona-kit shim in #65. Concretely:
- Constants:
HARNESS_VALUES, PERSONA_TIERS, PERSONA_TAGS, SIDECAR_MD_MODES, PERMISSION_MODES, CODEX_SANDBOX_MODES, CODEX_APPROVAL_POLICIES, SKILL_SOURCE_KINDS, HARNESS_SKILL_TARGETS.
- Types:
Harness, PersonaTier, PersonaTag, HarnessSettings, PersonaRuntime, PersonaSkill, PersonaInputSpec, PersonaPermissions, PersonaMount, McpServerSpec, PersonaSpec, HarnessSkillTarget, SkillMaterializationOptions, SkillInstall, SkillMaterializationPlan, PersonaInstallContext, PersonaContext, SidecarMdMode, CodexSandboxMode, CodexApprovalPolicy, PermissionMode.
- Functions:
materializeSkills, materializeSkillsFor, parseSkills, parsePersonaSpec, buildInstallArtifacts, resolveSkillSource.
- Constants/types that the persona schema references:
PERSONA_INTENTS, BUILT_IN_PERSONA_INTENTS — these are persona-domain.
What stays
Tasks
Constraints
- This is a breaking change for any external consumer of
@agentworkforce/workload-router that imports persona-domain symbols. Per user direction, no back-compat shim. Major version bump signals it.
- relay's SDK still pins
@agentworkforce/workload-router@^0.11.0 at this point — that's fine because relay's migration is a separate issue (relay-side). Don't break that pin from this side; relay will catch up by depending on persona-kit directly.
- Don't touch
packages/workload-router/src/generated/personas.ts or its build script; the catalog stays.
Verification
Reference
Plan section 1.5.
Part of the persona-kit consolidation. Depends on #67. This is issue 5 of 8.
Goal
Now that workforce CLI consumes everything persona-shaped from
@agentworkforce/persona-kit(#67),@agentworkforce/workload-routerno longer needs to re-export those symbols. Delete the moved-out exports outright. Major-version bump for the breaking change.After this PR,
workload-routeris only:RoutingProfile,RoutingProfileRule)personaCatalog, the auto-generated registry frompackages/workload-router/src/generated/personas.ts)PersonaSelection(the routing-resolution result type)What gets deleted from
packages/workload-router/src/index.tsEverything that was re-exported via persona-kit shim in #65. Concretely:
HARNESS_VALUES,PERSONA_TIERS,PERSONA_TAGS,SIDECAR_MD_MODES,PERMISSION_MODES,CODEX_SANDBOX_MODES,CODEX_APPROVAL_POLICIES,SKILL_SOURCE_KINDS,HARNESS_SKILL_TARGETS.Harness,PersonaTier,PersonaTag,HarnessSettings,PersonaRuntime,PersonaSkill,PersonaInputSpec,PersonaPermissions,PersonaMount,McpServerSpec,PersonaSpec,HarnessSkillTarget,SkillMaterializationOptions,SkillInstall,SkillMaterializationPlan,PersonaInstallContext,PersonaContext,SidecarMdMode,CodexSandboxMode,CodexApprovalPolicy,PermissionMode.materializeSkills,materializeSkillsFor,parseSkills,parsePersonaSpec,buildInstallArtifacts,resolveSkillSource.PERSONA_INTENTS,BUILT_IN_PERSONA_INTENTS— these are persona-domain.What stays
RoutingProfile,RoutingProfileRuletypes.PersonaSelectiontype — but its.skills,.runtime, etc. fields now refer to types imported from persona-kit.personaCatalogand the build scriptscripts/generate-personas.mjs.usePersona(intent, profile)resolver function.Tasks
packages/workload-router/src/index.ts. The file should shrink by hundreds of lines.@agentworkforce/persona-kit(e.g.,PersonaSelection.skills: PersonaSkill[]—PersonaSkillnow comes from persona-kit).@agentworkforce/persona-kitas a regular dep onpackages/workload-router/package.json.packages/workload-router/package.jsonversion to the next major (0.18.0→1.0.0, or follow the local convention if there's a0.xrule).packages/workload-router/src/index.test.ts— remove tests that covered the moved-out functions (those moved to persona-kit in [persona-kit 2/8] Move harness-kit + workload-router persona code into persona-kit (no behavior change) #65). Keep tests for routing/catalog/evidence.packages/persona-kit/: persona-kit no longer needs to re-export the moved symbols 'as if from workload-router' — kill any compatibility shims added in [persona-kit 2/8] Move harness-kit + workload-router persona code into persona-kit (no behavior change) #65.Constraints
@agentworkforce/workload-routerthat imports persona-domain symbols. Per user direction, no back-compat shim. Major version bump signals it.@agentworkforce/workload-router@^0.11.0at this point — that's fine because relay's migration is a separate issue (relay-side). Don't break that pin from this side; relay will catch up by depending on persona-kit directly.packages/workload-router/src/generated/personas.tsor its build script; the catalog stays.Verification
pnpm -r buildsucceeds.pnpm -r testpasses.agentworkforce <persona>smoke test (claude/codex/opencode harnesses) — same behavior as before.grep -r '@agentworkforce/workload-router' packages/cli packages/persona-kit packages/harness-kit packages/agentworkforce— only routing/catalog imports remain; nomaterializeSkills,PersonaSpec,PersonaSkill,Harnessfrom workload-router anywhere in the monorepo.npm pack --dry-runon workload-router shows the smaller surface area; no leftover persona files.Reference
Plan section 1.5.