persona sources: rename display labels (built-in / repo / personal)#84
Conversation
The cascade has three conceptual tiers users should see:
built-in — bundled with @agentworkforce/cli (e.g. persona-maker,
persona-improver). Reserved for personas about Agent
Workforce itself; intentionally small.
personal — ~/.agentworkforce/workforce/personas/. One user, many repos.
repo — <cwd>/.agentworkforce/workforce/personas/. Codified in the
working tree so the whole team gets them on checkout. Both
installed library packs (the shadcn copy-and-own model) and
hand-authored team overrides live here.
Internally the cascade keys are still 'cwd' / 'user' / 'library' / 'dir:N'
so --save-in-directory <target> and the JSON outputs of `list` and
`sources list` are unchanged for any tooling that pinned on them. Only
the user-facing SOURCE column gets the new vocabulary:
- `agentworkforce list` (table)
- `agentworkforce sources list` (table)
- the interactive picker
A new formatPersonaSourceLabel() helper centralizes the mapping, with a
test that locks the four cases. README gains a "Persona sources" section
that explains the three categories and where library packs fit.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds an exported helper ChangesPersona Source Label Formatting
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🟡 show command outputs raw internal source label instead of user-facing label
The formatPersonaShow function at packages/cli/src/cli.ts:2288 prints the raw internal source value (e.g., library, cwd, user) directly in the human-readable output. All other human-facing displays in this PR — formatPersonaTable (packages/cli/src/cli.ts:2046), formatSourcesTable (packages/cli/src/cli.ts:1704), and buildTuiCandidates (packages/cli/src/cli.ts:3552) — now call formatPersonaSourceLabel() to map these to the new vocabulary (built-in, repo, personal). This means agentworkforce show code-reviewer will display SOURCE library while agentworkforce list displays built-in for the same persona.
(Refers to line 2288)
Was this helpful? React with 👍 or 👎 to provide feedback.
Per feedback: `cwd` is a more precise pointer than `repo` — it names the actual directory the persona was loaded from. Only `library → built-in` and `user → personal` remain as display renames; `cwd` and `dir:N` pass through unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Follow-up to #83 — this commit was on the branch but didn't make the merge window.
Renames the cascade's user-facing labels to match the three conceptual tiers:
built-in— bundled with@agentworkforce/cli(e.g.persona-maker,persona-improver). Reserved for personas about Agent Workforce itself; intentionally small.personal—~/.agentworkforce/workforce/personas/. One user, many repos.repo—<cwd>/.agentworkforce/workforce/personas/. Codified in the working tree so the whole team gets them on checkout. Both installed library packs (the shadcn copy-and-own model, e.g.@agentrelay/personas) and hand-authored team overrides live here.What changes for users
agentworkforce listSOURCE columnlibrary/cwd/user/dir:Nbuilt-in/repo/personal/dir:Nagentworkforce sources listSOURCE columnWhat doesn't change (deliberate)
PersonaSourceliterals ('cwd' \| 'user' \| 'library' \| 'dir:N')--save-in-directory <target>flag values--jsonoutput oflistandsources listpersonaSource=…)So any tooling that pinned on the existing strings keeps working.
Implementation
formatPersonaSourceLabel(source)helper inlocal-personas.tscentralizes the mapping; tested inlocal-personas.test.ts.Test plan
pnpm --filter @agentworkforce/cli test— 165/165 passpnpm -r typecheck— clean🤖 Generated with Claude Code