Commit a338122
feat(persona-maker): mount/MCP/sidecar guidance via agentsMd sidecar (#108)
* docs(persona-maker): teach mount policy and mcpServers shape
persona-maker.json's AGENTS.md sidecar only listed `mount` and
`mcpServers` as optional fields without explaining when to use them,
the shape, or how harness selection is constrained by MCP support.
Authored personas needing filesystem sandboxing or MCP wiring were a
coin-flip on getting these blocks right.
- Add a `mount` section covering ignoredPatterns/readonlyPatterns
semantics, the `.{persona.id}.agentignore` overlay behavior keyed off
`agentName: persona.id`, the gitignore-negation idiom for allow-lists,
the file-scope-vs-tool-scope split from `permissions`, and the
auto-`.git` sandbox behavior.
- Add an `mcpServers` section with the two spec variants (http/sse vs
stdio), an example of each, `$VAR` substitution policy, and the
claude / codex / opencode support matrix so harness selection is
informed when MCP is required.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(persona-maker): extract mount/MCP/sidecar guidance into local skills
The mount and MCP additions from the previous commit made agentsMdContent
even longer. Extract them — plus the silent-footgun guidance about
claudeMdContent vs claudeMd — into three local skill .md files matching
the proactive-agents skill-loading pattern. The skills install into the
session via the local source-kind, so the persona reads them as standalone
SKILL.md files in its working dir instead of carrying everything inline.
Skills:
- personas/skills/relayfile-mount.md — mount field deep dive: allow-list
idiom (/* not **, paired !dir/ + !dir/**), readonlyPatterns scope rule
(never the work dir), agentName overlay, .git sandbox behavior.
- personas/skills/persona-mcp-servers.md — mcpServers two variants
(http/sse vs stdio), $VAR substitution, claude/codex/opencode support
matrix, permissions.allow pairing.
- personas/skills/persona-sidecars.md — claudeMd (path) vs claudeMdContent
(inline) distinction; calls out that the dry-run does NOT catch a path
string mistakenly stored in *MdContent.
persona-maker.json:
- skills[] now declares the three local skills alongside skill.sh/find-skills.
- agentsMdContent trimmed: the long mount/MCP/sidecar paragraphs are
replaced with one-line skill pointers. Net length: 15985 → 15318 chars.
- Anti-goals extended with the four lessons from a recent broken persona:
filename string in *MdContent; ** as broad mount exclude; readonly on
work dir; opencode + mcpServers; bare model alias without version.
- Added 'full model identifiers' rule (claude-sonnet-4-6, not claude-sonnet).
Regenerated packages/workload-router/src/generated/personas.ts to pick up
the new skills.
Dry-run: ✓ 4 skill(s) installed cleanly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(persona-maker): correct mount allow-list pattern — !dir not !dir/
The "obvious" gitignore allow-list `["/*", "!web/", "!web/**"]` silently
produces an empty mount. Reproduced against relayfile's createMount:
mount root contained only CLAUDE.md, _MOUNT_README.md, and .relayfile-local-mount
— no web/.
Root cause in relayfile-local-mount/src/mount.ts isPathMatched():
return matcher.ignores(relPath) || (isDirectory && matcher.ignores(`${relPath}/`));
The OR short-circuits. For a directory `web`:
- matcher.ignores('web') → true (`/*` matches the bare name)
- matcher.ignores('web/') → false (`!web/` negates the trailing-slash form)
but this branch is never reached.
So `!web/` (slash) only counters the trailing-slash form, leaving the
bare-name check unopposed. The walker treats `web` as ignored and skips
recursion. Verified by harness:
/* + !web/ + !web/** → web (dir) reported as ignored: true (broken)
/* + !web + !web/** → web (dir) reported as ignored: false (correct)
Confirmed end-to-end against a real createMount: with `!web` the mount
root contains web/content/post.md as expected.
Updates:
- relayfile-mount.md skill: add a fourth rule explicitly calling out the
`!dir` vs `!dir/` distinction with the walker's short-circuit as the
reason, plus a "wrong / right" side-by-side. Update the checklist line.
- persona-maker.json anti-goal: replace `!dir/` reference with `!dir`
plus the reason.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(persona-maker): use agentsMd sidecar so cross-repo invocation works
The previous extraction-into-local-skills approach was broken in the
field. Reported live: persona-maker spawned from a non-workforce cwd
(e.g. ../relay) only loaded `find-skills` — the three local skills
`relayfile-mount`, `persona-mcp-servers`, `persona-sidecars` were
missing from opencode's Skills picker.
Two layered bugs:
1. The agentworkforce binary on PATH is the published 3.0.3 from npm.
Its baked-in catalog has the old persona-maker (only find-skills).
New skills aren't visible until a release lands.
2. Even with the local CLI build, local skill sources resolve relative
paths against process.cwd() at install time. When invoked from
`/tmp/` or any non-workforce repo, `cp personas/skills/<x>.md ...`
fails because the .md files only exist in the workforce source repo.
Three of four skill installs fail with exit code 1.
The proactive-agents pattern (local/<name> source paths) works there
because both the persona AND its skill .md files are co-located in
the same user-repo. Persona-maker is a BUILT-IN shipped via npm —
that pattern doesn't carry across.
Fix: use the agentsMd path-form sidecar. The catalog generator at
`packages/workload-router/scripts/generate-personas.mjs` already
inlines sidecar .md content into agentsMdContent at build time, so
the published package ships a single bundled spec. The .md file is a
real markdown file the author can edit ergonomically; the user sees
the full content in AGENTS.md at session start with no runtime
filesystem lookups required.
Changes:
- New: personas/persona-maker.md — full operating spec including the
Relayfile mount, MCP servers, and Persona sidecar sections that were
previously split into local skill files. Same content the generator
would have inlined; consolidated into one file because cross-cwd
resolution made splitting unworkable.
- personas/persona-maker.json: replace agentsMdContent (inline) with
agentsMd (./persona-maker.md). Drop the three local/ skill entries
from skills[]; only skill.sh/find-skills remains.
- Delete personas/skills/* — content lives in persona-maker.md now.
- Regenerated packages/workload-router/src/generated/personas.ts;
agentsMdContent now 25,371 chars with all three sections inlined.
Verified: dry-run green from /tmp (non-workforce cwd) — the
cross-repo case that previously produced 3 of 4 failed installs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(persona-maker): publish skills to @agent-workforce/ scope on prpm.dev
Previous iterations tried inlining everything in agentsMdContent and then
extracting to local skill .md files referenced via repo-relative paths.
The local-path approach broke cross-repo invocation because local skill
sources resolve against process.cwd() at install time, not the workforce
package install root. Confirmed live: persona-maker spawned from
/Users/khaliqgant/Projects/AgentWorkforce/relay only saw skill.sh/find-skills
in the opencode picker.
Fix: publish the three skills as prpm packages so they're installable from
any cwd via npx -y prpm install <ref>.
Package layout (personas/skills/):
- prpm.json — multi-package manifest following the
@prpm/prpm-json-best-practices-skill structure: top-level metadata
(name, version, author, license, repository, organization), plus a
packages[] with three skill entries (format: generic, subtype: skill).
- LICENSE — MIT, picked up automatically by prpm publish for all packages.
- README.md — discovery / install docs.
- persona-relayfile-mount/SKILL.md — mount field deep dive: allow-list
idiom, !web vs !web/ walker gotcha, readonlyPatterns scope, agentName
overlay, .git sandbox.
- persona-mcp-servers/SKILL.md — mcpServers spec variants, $VAR
substitution, claude/codex/opencode harness matrix, permissions.allow
pairing.
- persona-sidecars/SKILL.md — claudeMd (path) vs claudeMdContent (inline)
distinction; the silent footgun the dry-run does NOT catch.
persona-maker.json:
- skills[] now declares the three @agent-workforce/persona-* refs
alongside skill.sh/find-skills. They install via prpm at session start
and appear in the opencode Skills picker.
- agentsMd: ./persona-maker.md — slim sidecar restored, with the three
embedded sections replaced by pointers to the published skills.
Anti-goals updated to reference the new skill IDs.
Regenerated packages/workload-router/src/generated/personas.ts.
`prpm publish --dry-run` from personas/skills/: ✓ all 3 packages ready
to publish under @agent-workforce/ scope (khaliqgant ✓ as org member).
Publish runs separately (user-driven, not automated in this commit).
After publish lands on prpm.dev, `agentworkforce agent persona-maker
--dry-run` will install all four skills cleanly. Until then the dry-run
exercising the three new skills will fail at the prpm registry lookup
step — expected.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(prpm): format claude (not generic) so prpm install --as opencode works
Published 1.0.0 with format: generic. Install via `npx -y prpm install
@agent-workforce/persona-relayfile-mount --as opencode` (the command
persona-kit emits for opencode-harness personas) errors with:
Failed to parse generic format: Unsupported source format for
conversion: generic
prpm has format converters keyed off the source format. `generic` has
no converter to `opencode` / `codex` / etc., so install fails the
moment the workforce CLI tries to materialize the skill.
Bump to 1.0.1 with format: claude. SKILL.md with YAML frontmatter is
canonically claude-flavored, and prpm knows how to convert claude →
opencode (verified by installing @agent-relay/choosing-swarm-patterns
with --as opencode: ✓ Converted from claude to opencode).
Dry-run validates clean for all three packages at 1.0.1.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore(prpm): bump skills to 1.0.2 — registry 1.0.1 still has format generic
Verified after publish: `prpm show @agent-workforce/persona-relayfile-mount`
returns "Type: generic skill" at version 1.0.1, and `prpm install --as
opencode` still errors "Failed to parse generic format". Either the
publish of 1.0.1 happened before the format-change commit landed in the
working tree, or prpm caches format metadata at first publish — either
way, the remote tarball is still generic.
Bump to 1.0.2 with format: claude. Dry-run confirms:
Package: @agent-workforce/persona-relayfile-mount@1.0.2
Format: claude | Subtype: skill
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore(prpm): bump skills to 1.0.3 — published after prpm registry fix
The prpm registry route now updates mutable manifest fields on republish
(format, subtype, description, tags, etc.), so the three skills finally
landed as format: claude. Verified end-to-end:
- `prpm show @agent-workforce/persona-relayfile-mount` reports Type:
claude skill at v1.0.3 (previously locked at generic from 1.0.0).
- `agentworkforce agent persona-maker --dry-run` from /tmp:
✓ dry-run ok: 4 skill(s) installed cleanly. All three new skills now
convert claude → opencode and materialize into .opencode/skills/ at
session start.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Ricky Schema Cascade <ricky@agent-relay.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 8d5d097 commit a338122
9 files changed
Lines changed: 471 additions & 2 deletions
File tree
- packages/workload-router/src/generated
- personas
- skills
- persona-mcp-servers
- persona-relayfile-mount
- persona-sidecars
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
13 | 28 | | |
14 | 29 | | |
15 | 30 | | |
| |||
33 | 48 | | |
34 | 49 | | |
35 | 50 | | |
36 | | - | |
| 51 | + | |
37 | 52 | | |
0 commit comments