@ai-outfitter/outfitter 1.1.0 → 1.1.2

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 (33) hide show
  1. package/.outfitter/skills/outfitter/SKILL.md +1 -1
  2. package/README.md +1 -1
  3. package/dist/composer/Composer.js +93 -13
  4. package/dist/composer/Composer.js.map +1 -1
  5. package/dist/composer/Composition.d.ts +4 -0
  6. package/dist/projection/Materialize.d.ts +5 -3
  7. package/dist/projection/Materialize.js +72 -6
  8. package/dist/projection/Materialize.js.map +1 -1
  9. package/dist/projection/ProjectHarness.js +9 -4
  10. package/dist/projection/ProjectHarness.js.map +1 -1
  11. package/dist/resolver/Resolver.js +2 -0
  12. package/dist/resolver/Resolver.js.map +1 -1
  13. package/dist/resolver/ResolverValidation.js +2 -9
  14. package/dist/resolver/ResolverValidation.js.map +1 -1
  15. package/dist/resolver/Resource.d.ts +5 -0
  16. package/dist/resolver/Resource.js.map +1 -1
  17. package/dist/schemas/agent.schema.json +1 -1
  18. package/dist/setup/DefaultCatalog.d.ts +1 -1
  19. package/dist/setup/DefaultCatalog.js +1 -1
  20. package/docs/documentation/README.md +2 -2
  21. package/docs/documentation/agents.md +15 -2
  22. package/docs/documentation/cli.md +1 -1
  23. package/docs/documentation/concepts.md +1 -1
  24. package/docs/documentation/conventions.md +10 -0
  25. package/docs/documentation/getting-started.md +1 -1
  26. package/docs/documentation/personas.md +28 -27
  27. package/docs/documentation/profiles.md +1 -1
  28. package/docs/documentation/skills.md +2 -2
  29. package/docs/documentation/usecases/engineering.md +1 -1
  30. package/docs/documentation/usecases/organization-profile-catalog.md +1 -1
  31. package/docs/documentation/usecases/persona-reviews.md +90 -139
  32. package/package.json +1 -1
  33. package/src/schemas/agent.schema.json +1 -1
@@ -53,7 +53,7 @@ before answering or editing configuration.
53
53
  extensions, plugins, model, thinking, tools): read `references/profiles.md`.
54
54
  - The `agents/<id>/agent.md` resource format and loadout fields: read
55
55
  `references/agents.md`.
56
- - Personas — the base-agent-plus-persona-documents convention: read
56
+ - Personas — one portable persona document plus the shared reviewer: read
57
57
  `references/personas.md`.
58
58
  - Subagents and leader-agent delegation: read `references/subagents.md`.
59
59
  - Authoring or selecting skills, SKILL.md layout, skill references: read
package/README.md CHANGED
@@ -76,7 +76,7 @@ Managed porting and persistent harness symlinks are deferred to
76
76
  commands/ # slash commands
77
77
  ```
78
78
 
79
- Layers merge by ID: `<project>/.agents/` over `~/.agents/` over pinned remote [catalogs](./docs/documentation/catalogs.md). An [agent](./docs/documentation/agents.md) carries both its identity and its loadout — an [agent profile](./docs/documentation/profiles.md) — and is what you run; a [persona](./docs/documentation/personas.md) is a review convention layered on a base agent; a [subagent](./docs/documentation/subagents.md) is an agent a run delegates to, across [four delegation boundaries](./docs/documentation/subagents.md#the-four-delegation-boundaries) from an in-session helper to a Kubernetes Job.
79
+ Layers merge by ID: `<project>/.agents/` over `~/.agents/` over pinned remote [catalogs](./docs/documentation/catalogs.md). An [agent](./docs/documentation/agents.md) carries both its identity and its loadout — an [agent profile](./docs/documentation/profiles.md) — and is what you run; a [persona](./docs/documentation/personas.md) is one portable Markdown document a shared review agent adopts at launch; a [subagent](./docs/documentation/subagents.md) is an agent a run delegates to, across [four delegation boundaries](./docs/documentation/subagents.md#the-four-delegation-boundaries) from an in-session helper to a Kubernetes Job.
80
80
 
81
81
  ## Documentation
82
82
 
@@ -1,6 +1,7 @@
1
1
  // Composes a harness-neutral CompositionPlan from the effective resource set and a selected agent.
2
2
  import { existsSync, readFileSync } from 'node:fs';
3
3
  import { join } from 'node:path';
4
+ import { escapesRoots } from '../dump/Containment.js';
4
5
  import { isAgentDefinitionIssue, readAgentDefinition } from '../resolver/AgentDefinition.js';
5
6
  import { findLoadoutResource, findResource } from '../resolver/Resource.js';
6
7
  /** Reads the highest-precedence tree-root file (e.g. system-prompt.md) across layers, or undefined. */
@@ -13,12 +14,12 @@ const readRootFile = (set, fileName) => {
13
14
  }
14
15
  return undefined;
15
16
  };
16
- const resolveSlugs = (set, agentSlug, kind, field, slugs, warnings) => {
17
+ const resolveSlugs = (set, agentSlug, kind, reference, slugs, warnings) => {
17
18
  const resolved = [];
18
19
  for (const slug of slugs) {
19
20
  const resource = findLoadoutResource(set, agentSlug, kind, slug);
20
21
  if (resource === undefined) {
21
- warnings.push(`loadout ${field} references unknown ${kind} '${slug}'.`);
22
+ warnings.push(`${reference} references unknown ${kind} '${slug}'.`);
22
23
  }
23
24
  else {
24
25
  resolved.push(resource);
@@ -26,16 +27,95 @@ const resolveSlugs = (set, agentSlug, kind, field, slugs, warnings) => {
26
27
  }
27
28
  return resolved;
28
29
  };
29
- const composeLoadout = (set, agentSlug, loadout, warnings) => ({
30
- skills: resolveSlugs(set, agentSlug, 'skill', 'skills', loadout.skills, warnings),
31
- subagents: resolveSlugs(set, agentSlug, 'agent', 'subagents', loadout.subagents, warnings),
32
- mcp: loadout.mcp,
33
- extensions: loadout.extensions,
34
- plugins: loadout.plugins,
35
- model: loadout.model,
36
- thinking: loadout.thinking,
37
- tools: loadout.tools,
38
- });
30
+ const asRecord = (value) => value !== null && typeof value === 'object' && !Array.isArray(value) ? value : undefined;
31
+ const readMcpServers = (path, warnings) => {
32
+ let parsed;
33
+ try {
34
+ parsed = JSON.parse(readFileSync(path, 'utf8'));
35
+ }
36
+ catch (error) {
37
+ warnings.push(`MCP configuration '${path}' is not readable JSON: ${String(error)}`);
38
+ return {};
39
+ }
40
+ const document = asRecord(parsed);
41
+ const servers = document === undefined ? undefined : asRecord(document.mcpServers);
42
+ if (servers === undefined) {
43
+ warnings.push(`MCP configuration '${path}' must contain an object-valued 'mcpServers' map.`);
44
+ return {};
45
+ }
46
+ return servers;
47
+ };
48
+ const composeMcpServers = (set, agent, selectedIds, warnings) => {
49
+ if (selectedIds.length === 0) {
50
+ return {};
51
+ }
52
+ const rootPaths = set.layers.map((layer) => join(layer.root, 'mcp.json')).filter((path) => existsSync(path));
53
+ const pathsByPrecedence = [
54
+ ...rootPaths.reverse(),
55
+ // Resolver annotates every agent resource with mcpPaths, including an empty array.
56
+ ...[...agent.mcpPaths].reverse(),
57
+ ];
58
+ const available = {};
59
+ const roots = set.layers.map((layer) => layer.root);
60
+ for (const path of pathsByPrecedence) {
61
+ if (escapesRoots(path, roots)) {
62
+ warnings.push(`MCP configuration '${path}' resolves outside the resource layers and was skipped.`);
63
+ continue;
64
+ }
65
+ Object.assign(available, readMcpServers(path, warnings));
66
+ }
67
+ const selected = {};
68
+ for (const id of selectedIds) {
69
+ if (Object.hasOwn(available, id)) {
70
+ selected[id] = available[id];
71
+ }
72
+ else {
73
+ warnings.push(`loadout mcp references unknown server '${id}'.`);
74
+ }
75
+ }
76
+ return selected;
77
+ };
78
+ const resolveDelegateSkills = (set, subagents, leaderSkills, warnings) => {
79
+ const skills = new Map(leaderSkills.map((skill) => [skill.slug, skill]));
80
+ const delegateSkills = [];
81
+ const roots = set.layers.map((layer) => layer.root);
82
+ for (const subagent of subagents) {
83
+ const definitionPaths = [subagent.winner.path, ...(subagent.configPaths ?? [])];
84
+ if (definitionPaths.some((path) => escapesRoots(path, roots)))
85
+ continue;
86
+ const definition = readAgentDefinition(subagent.winner.path, subagent.configPaths);
87
+ if (isAgentDefinitionIssue(definition) || definition.name !== subagent.slug) {
88
+ continue;
89
+ }
90
+ for (const skill of resolveSlugs(set, subagent.slug, 'skill', `subagent '${subagent.slug}' loadout skills`, definition.loadout.skills, warnings)) {
91
+ const selected = skills.get(skill.slug);
92
+ if (selected === undefined) {
93
+ skills.set(skill.slug, skill);
94
+ delegateSkills.push(skill);
95
+ }
96
+ else if (selected.winner.path !== skill.winner.path) {
97
+ warnings.push(`delegate skill '${skill.slug}' resolves to conflicting definitions; using '${selected.winner.path}'.`);
98
+ }
99
+ }
100
+ }
101
+ return delegateSkills;
102
+ };
103
+ const composeLoadout = (set, agent, loadout, warnings) => {
104
+ const subagents = resolveSlugs(set, agent.slug, 'agent', 'loadout subagents', loadout.subagents, warnings);
105
+ const skills = resolveSlugs(set, agent.slug, 'skill', 'loadout skills', loadout.skills, warnings);
106
+ return {
107
+ skills,
108
+ delegateSkills: resolveDelegateSkills(set, subagents, skills, warnings),
109
+ subagents,
110
+ mcp: loadout.mcp,
111
+ mcpServers: composeMcpServers(set, agent, loadout.mcp, warnings),
112
+ extensions: loadout.extensions,
113
+ plugins: loadout.plugins,
114
+ model: loadout.model,
115
+ thinking: loadout.thinking,
116
+ tools: loadout.tools,
117
+ };
118
+ };
39
119
  /**
40
120
  * Composes the selected agent into a CompositionPlan. Returns an error when the agent slug does not
41
121
  * resolve or its definition is invalid; loadout slugs that do not resolve are non-fatal warnings.
@@ -65,7 +145,7 @@ export const compose = (set, agentSlug) => {
65
145
  label: definition.label,
66
146
  description: definition.description,
67
147
  },
68
- loadout: composeLoadout(set, agentSlug, definition.loadout, warnings),
148
+ loadout: composeLoadout(set, agent, definition.loadout, warnings),
69
149
  warnings,
70
150
  };
71
151
  return { plan, errors: [] };
@@ -1 +1 @@
1
- {"version":3,"file":"Composer.js","sourceRoot":"","sources":["../../src/composer/Composer.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAE7F,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAQ5E,uGAAuG;AACvG,MAAM,YAAY,GAAG,CAAC,GAAyB,EAAE,QAAgB,EAAsB,EAAE;IACvF,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;QAC/B,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAE7C,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC1B,OAAO,YAAY,CAAC,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CAAC,OAAO,EAAE,QAAQ,CAAC;QACjE,QAAQ;KACT,CAAC;IAEF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AAC9B,CAAC,CAAC"}
@@ -14,8 +14,12 @@ export interface ComposedIdentity {
14
14
  /** A loadout with its slug references resolved against the effective set. */
15
15
  export interface ComposedLoadout {
16
16
  readonly skills: readonly ResolvedResource[];
17
+ /** Skills selected by delegates, materialized for them without loading them into the leader. */
18
+ readonly delegateSkills: readonly ResolvedResource[];
17
19
  readonly subagents: readonly ResolvedResource[];
18
20
  readonly mcp: readonly string[];
21
+ /** Selected MCP server definitions after layer and per-agent precedence are applied. */
22
+ readonly mcpServers: Readonly<Record<string, unknown>>;
19
23
  readonly extensions: readonly string[];
20
24
  readonly plugins: readonly string[];
21
25
  readonly model?: string;
@@ -9,6 +9,8 @@ export interface MaterializedComposition {
9
9
  readonly skillDirectories: readonly string[];
10
10
  /** Skills that could not be materialized safely (escaping symlinks). */
11
11
  readonly skippedSkills: readonly string[];
12
+ /** Subagents whose merged agent definition could not be materialized. */
13
+ readonly skippedSubagents: readonly string[];
12
14
  }
13
15
  /**
14
16
  * Overlays native harness configuration into the runtime root. Inputs arrive highest precedence
@@ -17,8 +19,8 @@ export interface MaterializedComposition {
17
19
  */
18
20
  export declare const materializeConfigurationOverlays: (sourceDirectories: readonly string[], rootDirectory: string) => void;
19
21
  /**
20
- * Writes the composed identity and skills into `rootDirectory`. The base `system-prompt.md` becomes
21
- * the system prompt; shared `agents.md` context and the agent body are appended in order. Each
22
- * selected skill directory (SKILL.md + scripts/assets) is copied so the harness has real content.
22
+ * Writes the composed identity, skills, subagents, and selected MCP servers into
23
+ * `rootDirectory`. The base `system-prompt.md` becomes the system prompt; shared `agents.md`
24
+ * context and the agent body are appended in order.
23
25
  */
24
26
  export declare const materializeComposition: (composition: CompositionPlan, rootDirectory: string) => MaterializedComposition;
@@ -1,8 +1,9 @@
1
1
  // Materializes a CompositionPlan into a runtime configuration directory the harness launches from.
2
- import { copyFileSync, lstatSync, mkdirSync, readdirSync, writeFileSync } from 'node:fs';
2
+ import { copyFileSync, lstatSync, mkdirSync, readdirSync, rmSync, writeFileSync } from 'node:fs';
3
3
  import { dirname, join } from 'node:path';
4
4
  import { escapesRoots } from '../dump/Containment.js';
5
5
  import { removeTargetTypeConflict } from '../fs/TypeConflict.js';
6
+ import { isAgentDefinitionIssue, readAgentDefinition } from '../resolver/AgentDefinition.js';
6
7
  /** Recursively copies a directory, skipping symlinked entries so no path escapes the tree. */
7
8
  const copyDirectory = (sourceDir, targetDir) => {
8
9
  removeTargetTypeConflict(targetDir, 'directory');
@@ -49,10 +50,64 @@ const materializeSkill = (skill, rootDirectory) => {
49
50
  copyDirectory(sourceDir, targetDir);
50
51
  return targetDir;
51
52
  };
53
+ const optionalScalar = (name, value) => value === undefined ? [] : [`${name}: ${JSON.stringify(value)}`];
54
+ const optionalList = (name, values) => values.length === 0 ? [] : [`${name}: ${JSON.stringify(values.join(', '))}`];
55
+ const subagentEscapesRoots = (subagent) => {
56
+ const roots = [
57
+ subagent.winner.layer.root,
58
+ ...subagent.shadowed.map((definition) => definition.layer.root),
59
+ ...(subagent.configLayerRoots ?? []),
60
+ ];
61
+ const paths = [subagent.winner.path, ...(subagent.configPaths ?? [])];
62
+ return paths.some((path) => escapesRoots(path, roots));
63
+ };
64
+ const readValidSubagentDefinition = (subagent) => {
65
+ if (subagentEscapesRoots(subagent)) {
66
+ return undefined;
67
+ }
68
+ const definition = readAgentDefinition(subagent.winner.path, subagent.configPaths);
69
+ return isAgentDefinitionIssue(definition) || definition.name !== subagent.slug ? undefined : definition;
70
+ };
71
+ const serializeSubagent = (subagent) => {
72
+ const definition = readValidSubagentDefinition(subagent);
73
+ if (definition === undefined)
74
+ return undefined;
75
+ const denied = new Set(definition.loadout.tools?.deny ?? []);
76
+ const tools = definition.loadout.tools?.allow?.filter((tool) => !denied.has(tool));
77
+ const frontmatter = [
78
+ `name: ${JSON.stringify(subagent.slug)}`,
79
+ `description: ${JSON.stringify(definition.description ?? definition.label ?? `Delegated ${subagent.slug} agent.`)}`,
80
+ ...optionalScalar('model', definition.loadout.model),
81
+ ...optionalScalar('thinking', definition.loadout.thinking),
82
+ ...optionalList('tools', tools ?? []),
83
+ ...optionalList('skills', definition.loadout.skills),
84
+ ...optionalList('extensions', definition.loadout.extensions),
85
+ ];
86
+ return `---\n${frontmatter.join('\n')}\n---\n\n${definition.body}`;
87
+ };
88
+ const materializeSubagents = (subagents, rootDirectory) => {
89
+ if (subagents.length === 0) {
90
+ return [];
91
+ }
92
+ const agentsDirectory = join(rootDirectory, 'agents');
93
+ rmSync(agentsDirectory, { recursive: true, force: true });
94
+ mkdirSync(agentsDirectory, { recursive: true });
95
+ const skipped = [];
96
+ for (const subagent of subagents) {
97
+ const content = serializeSubagent(subagent);
98
+ if (content === undefined) {
99
+ skipped.push(subagent.slug);
100
+ }
101
+ else {
102
+ writeGeneratedFile(join(agentsDirectory, `${subagent.slug}.md`), content);
103
+ }
104
+ }
105
+ return skipped;
106
+ };
52
107
  /**
53
- * Writes the composed identity and skills into `rootDirectory`. The base `system-prompt.md` becomes
54
- * the system prompt; shared `agents.md` context and the agent body are appended in order. Each
55
- * selected skill directory (SKILL.md + scripts/assets) is copied so the harness has real content.
108
+ * Writes the composed identity, skills, subagents, and selected MCP servers into
109
+ * `rootDirectory`. The base `system-prompt.md` becomes the system prompt; shared `agents.md`
110
+ * context and the agent body are appended in order.
56
111
  */
57
112
  export const materializeComposition = (composition, rootDirectory) => {
58
113
  mkdirSync(rootDirectory, { recursive: true });
@@ -69,7 +124,7 @@ export const materializeComposition = (composition, rootDirectory) => {
69
124
  appendPromptPaths.push(agentBodyPath);
70
125
  const skillDirectories = [];
71
126
  const skippedSkills = [];
72
- for (const skill of composition.loadout.skills) {
127
+ for (const skill of [...composition.loadout.skills, ...composition.loadout.delegateSkills]) {
73
128
  const materialized = materializeSkill(skill, rootDirectory);
74
129
  if (materialized === undefined) {
75
130
  skippedSkills.push(skill.slug);
@@ -78,6 +133,17 @@ export const materializeComposition = (composition, rootDirectory) => {
78
133
  skillDirectories.push(materialized);
79
134
  }
80
135
  }
81
- return { rootDirectory, systemPromptPath, appendPromptPaths, skillDirectories, skippedSkills };
136
+ const skippedSubagents = materializeSubagents(composition.loadout.subagents, rootDirectory);
137
+ if (composition.loadout.mcp.length > 0) {
138
+ writeGeneratedFile(join(rootDirectory, 'mcp.json'), `${JSON.stringify({ mcpServers: composition.loadout.mcpServers }, null, 2)}\n`);
139
+ }
140
+ return {
141
+ rootDirectory,
142
+ systemPromptPath,
143
+ appendPromptPaths,
144
+ skillDirectories,
145
+ skippedSkills,
146
+ skippedSubagents,
147
+ };
82
148
  };
83
149
  //# sourceMappingURL=Materialize.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Materialize.js","sourceRoot":"","sources":["../../src/projection/Materialize.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACzF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAejE,8FAA8F;AAC9F,MAAM,aAAa,GAAG,CAAC,SAAiB,EAAE,SAAiB,EAAQ,EAAE;IACnE,wBAAwB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IACjD,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE1C,KAAK,MAAM,KAAK,IAAI,WAAW,CAAC,SAAS,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;QACpE,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAE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,CAAC;QAC5D,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;YAC/B,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,gBAAgB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAED,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IAE5F,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvC,kBAAkB,CAChB,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,EAC/B,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAC/E,CAAC;IACJ,CAAC;IAED,OAAO;QACL,aAAa;QACb,gBAAgB;QAChB,iBAAiB;QACjB,gBAAgB;QAChB,aAAa;QACb,gBAAgB;KACjB,CAAC;AACJ,CAAC,CAAC"}
@@ -1,12 +1,16 @@
1
1
  import { materializeComposition, materializeConfigurationOverlays } from './Materialize.js';
2
2
  // Loadout elements a projection actually maps to native config. Anything else is reported
3
3
  // unsupported so `--strict` catches silently-dropped selections. Baseline for both harnesses is
4
- // identity + skills + model + thinking; pi additionally projects `extensions` once the run path has
5
- // resolved their install dirs (`extensionLoadDirs`). subagents/mcp/plugins/tools remain unsupported
6
- // pending incremental parity (#183).
4
+ // identity + skills + model + thinking. Pi also projects selected subagents and MCP servers into
5
+ // its runtime config directory, and projects `extensions` once the run path has resolved their
6
+ // install dirs (`extensionLoadDirs`). plugins/tools remain unsupported pending incremental parity
7
+ // (#183).
7
8
  const supportedElements = (input) => {
8
9
  const baseline = ['skills', 'model', 'thinking'];
9
- return input.harness === 'pi' && input.extensionLoadDirs !== undefined ? [...baseline, 'extensions'] : baseline;
10
+ if (input.harness !== 'pi')
11
+ return baseline;
12
+ const pi = [...baseline, 'subagents', 'mcp'];
13
+ return input.extensionLoadDirs === undefined ? pi : [...pi, 'extensions'];
10
14
  };
11
15
  const loadoutElementsInUse = (composition) => {
12
16
  const { loadout } = composition;
@@ -71,6 +75,7 @@ export const projectComposition = (composition, input) => {
71
75
  const unsupported = [
72
76
  ...unsupportedElements(composition, input),
73
77
  ...materialized.skippedSkills.map((slug) => `skill:${slug} (escaping symlink)`),
78
+ ...materialized.skippedSubagents.map((slug) => `subagent:${slug} (invalid definition)`),
74
79
  ];
75
80
  return { rootDirectory: input.rootDirectory, launch, unsupported };
76
81
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ProjectHarness.js","sourceRoot":"","sources":["../../src/projection/ProjectHarness.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,gCAAgC,EAAE,MAAM,kBAAkB,CAAC;AAG5F,0FAA0F;AAC1F,gGAAgG;AAChG,oGAAoG;AACpG,oGAAoG;AACpG,qCAAqC;AACrC,MAAM,iBAAiB,GAAG,CAAC,KAAsB,EAAqB,EAAE;IACtE,MAAM,QAAQ,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IACjD,OAAO,KAAK,CAAC,OAAO,KAAK,IAAI,IAAI,KAAK,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;AAClH,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,WAA4B,EAAqB,EAAE;IAC/E,MAAM,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC;IAChC,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtD,IAAI,OAAO,CAAC,SA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AAC,CAAC;IACrG,CAAC;IACD,MAAM,YAAY,GAAG,sBAAsB,CAAC,WAAW,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAC9E,MAAM,MAAM,GAAG,eAAe,CAAC,WAAW,EAAE,KAAK,EAAE,YAAY,CAAC,gBAAgB,EAAE,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAClH,MAAM,WAAW,GAAG;QAClB,GAAG,mBAAmB,CAAC,WAAW,EAAE,KAAK,CAAC;QAC1C,GAAG,YAAY,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,IAAI,qBAAqB,CAAC;QAC/E,GAAG,YAAY,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,IAAI,uBAAuB,CAAC;KACxF,CAAC;IAEF,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AACrE,CAAC,CAAC"}
@@ -69,6 +69,7 @@ const discoverDirectoryResources = (layer, kind, base = layer.root) => {
69
69
  };
70
70
  // Existing `agents/<slug>/<...>` files across every layer that defines the agent, highest first.
71
71
  const collectAgentFiles = (layers, slug, ...segments) => layers.map((layer) => join(layer.root, 'agents', slug, ...segments)).filter((path) => resolvesToFile(path));
72
+ const collectAgentFileLayerRoots = (layers, slug, ...segments) => layers.filter((layer) => resolvesToFile(join(layer.root, 'agents', slug, ...segments))).map((layer) => layer.root);
72
73
  const isNonEmptyDirectory = (directory) => {
73
74
  try {
74
75
  return statSync(directory).isDirectory() && readdirSync(directory).length > 0;
@@ -87,6 +88,7 @@ const withAgentResourcePaths = (layers, agents) => new Map([...agents.entries()]
87
88
  {
88
89
  ...resource,
89
90
  configPaths: collectAgentFiles(layers, slug, 'config.json'),
91
+ configLayerRoots: collectAgentFileLayerRoots(layers, slug, 'config.json'),
90
92
  mcpPaths: collectAgentFiles(layers, slug, 'mcp.json'),
91
93
  hookPaths: collectAgentHookDirs(layers, slug),
92
94
  piConfigDirectories: collectAgentPiConfigDirs(layers, slug),
@@ -1 +1 @@
1
- {"version":3,"file":"Resolver.js","sourceRoot":"","sources":["../../src/resolver/Resolver.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAGvD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE7E,+FAA+F;AAC/F,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAW,EAAE;IACpD,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC;AAEF,0FAA0F;AAC1F,MAAM,cAAc,GAAG,CAAC,IAAY,EAAW,EAAE;IAC/C,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;IACjC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAsC,IAAI,GAAG,CAAC;IACxE,CAAC,OAAO,EAAE,QAAQ,CAAC;IACnB,CAAC,OAAO,EAAE,QAAQ,CAAC;CACpB,CAAC,CAAC;AAEH,MAAM,eAAe,GAAsC,IAAI,GAAG,CAAC;IACjE,CAAC,OAAO,EAAE,UAAU,CAAC;IACrB,CAAC,OAAO,EAAE,UAAU,CAAC;CACtB,CAAC,CAAC;AAEH,MAAM,qBAAqB,GAAsC,IAAI,GAAG,CAAC;IACvE,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,SAAS,EAAE,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AE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,sBAAsB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC9F,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,qBAAqB,CAAC,MAAM,CAAC,EAAE,CAAC;AAC9E,CAAC,CAAC"}
@@ -53,17 +53,10 @@ const shadowFindings = (resource) => resource.shadowed.map((definition) => ({
53
53
  resource: resourceLabel(resource),
54
54
  message: `shadowed definition in ${definition.layer.label} is overridden by ${resource.winner.layer.label}.`,
55
55
  }));
56
- // Agent-local resource shapes that resolver discovers but does not yet project into a run. Surfaced
57
- // as warnings (fatal only under --strict) so a selection placed here is never silently dropped.
56
+ // Reserved agent-local resource shapes that resolver discovers but does not yet project into a run.
57
+ // Surfaced as warnings (fatal only under --strict) so content placed here is never silently dropped.
58
58
  const reservedNamespaceFindings = (agent) => {
59
59
  const findings = [];
60
- if ((agent.mcpPaths ?? []).length > 0) {
61
- findings.push({
62
- severity: 'warning',
63
- resource: `agent:${agent.slug}`,
64
- message: "agent-local 'mcp.json' is discovered but not yet projected into the run (adapter parity, #183).",
65
- });
66
- }
67
60
  if ((agent.hookPaths ?? []).length > 0) {
68
61
  findings.push({
69
62
  severity: 'warning',
@@ -1 +1 @@
1
- {"version":3,"file":"ResolverValidation.js","sourceRoot":"","sources":["../../src/resolver/ResolverValidation.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,YAAY,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAQtH,MAAM,oBAAoB,GAAG,CAC3B,GAAyB,EACzB,SAAiB,EACjB,IAAuB,E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,QAAQ,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IACzC,CAAC;IAED,KAAK,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC,cAAc,EAAE,CAAC;QAC7C,IAAI,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,CAAC,KAAK,SAAS,EAAE,CAAC;YACxD,QAAQ,CAAC,IAAI,CAAC;gBACZ,QAAQ,EAAE,OAAO;gBACjB,QAAQ,EAAE,SAAS,SAAS,EAAE;gBAC9B,OAAO,EAAE,0DAA0D;aACpE,CAAC,CAAC;QACL,CAAC;QAED,KAAK,MAAM,IAAI,IAAI,eAAe,EAAE,CAAC;YACnC,KAAK,MAAM,QAAQ,IAAI,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC;gBAChE,QAAQ,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAC3C,sFAAsF;gBACtF,IAAI,IAAI,KAAK,OAAO;oBAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;YAClE,CAAC;QACH,CAAC;IACH,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,CAAU,EAAE,CAAC;QACvE,KAAK,MAAM,QAAQ,IAAI,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC;YAChD,QAAQ,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
@@ -54,6 +54,11 @@ export interface ResolvedResource {
54
54
  * override one loadout field of a globally defined agent.
55
55
  */
56
56
  readonly configPaths?: readonly string[];
57
+ /**
58
+ * For agents: layer roots corresponding to `configPaths`. Config-only overlay layers do not
59
+ * appear in `winner` or `shadowed`, so projection retains this provenance for containment checks.
60
+ */
61
+ readonly configLayerRoots?: readonly string[];
57
62
  /**
58
63
  * For agents: existing `agents/<slug>/mcp.json` paths across all layers, highest precedence first.
59
64
  * Discovered here so a later projection pass (#183) can merge them over the tree-root `mcp.json`.
@@ -1 +1 @@
1
- {"version":3,"file":"Resource.js","sourceRoot":"","sources":["../../src/resolver/Resource.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAK7F,MAAM,CAAC,MAAM,aAAa,GAA4B,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;AAEjG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAA4B,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;AAyB1F,MAAM,CAAC,MAAM,YAAY,GAAG,GAAY,EAAE,CAAC,CAAC;IAC1C,MAAM,EAAE,EAAE;IACV,SAAS,EAAE,EAAE;IACb,GAAG,EAAE,EAAE;IACP,UAAU,EAAE,EAAE;IACd,OAAO,EAAE,EAAE;CACZ,CAAC,CAAC;AA2CH,8EAA8E;AAC9E,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,KAAa,EAAU,EAAE,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAUhH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAyB,EAAE,IAAkB,EAA+B,EAAE;IAC1G,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAEvC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CA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,GAAyB,EACzB,IAAkB,EAClB,IAAY,EACkB,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;AAEtE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,GAAyB,EACzB,SAAiB,EACjB,IAAkB,EACW,EAAE;IAC/B,MAAM,MAAM,GAAG,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;IAE5D,OAAO,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AACrH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,GAAyB,EACzB,SAAiB,EACjB,IAAkB,EAClB,IAAY,EACkB,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;AAE3F,qGAAqG;AACrG,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,GAAyB,EACzB,SAAiB,EACjB,IAAkB,EAClB,IAAY,EACkB,EAAE,CAAC,iBAAiB,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC"}
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "mcp": {
20
20
  "$ref": "#/$defs/slugList",
21
- "description": "MCP server ids. Per-agent agents/<name>/mcp.json is discovered and merges by id over the tree-root mcp.json; projection into the run is deferred (adapter parity, #183)."
21
+ "description": "MCP server ids. Per-agent agents/<name>/mcp.json merges by id over layered tree-root mcp.json files before selected servers are projected into the run."
22
22
  },
23
23
  "extensions": {
24
24
  "$ref": "#/$defs/slugList",
@@ -1,7 +1,7 @@
1
1
  import type { RemoteSourceReference } from '../sources/SourceCache.js';
2
2
  export declare const defaultCatalogSource: {
3
3
  readonly github: "ai-outfitter/default-profiles";
4
- readonly ref: "v1.0.0";
4
+ readonly ref: "v1.1.0";
5
5
  };
6
6
  export interface PinnedCatalogBootstrapInput {
7
7
  readonly homeDirectory: string;
@@ -7,7 +7,7 @@ export const defaultCatalogSource = {
7
7
  github: 'ai-outfitter/default-profiles',
8
8
  // TODO(release-automation): when default-profiles publishes a new Release Please tag, open a
9
9
  // conventional dependency-bump commit in Outfitter so its next Release Please release ships it.
10
- ref: 'v1.0.0',
10
+ ref: 'v1.1.0',
11
11
  };
12
12
  const fullCommitPattern = /^[a-f0-9]{40}$/u;
13
13
  const versionTagPattern = /^v\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/u;
@@ -15,7 +15,7 @@ Outfitter lays out conventions for iterating on and sharing agent configuration
15
15
  - [Agents](./agents.md) — the `agents/<id>/agent.md` resource and its loadout — what you run.
16
16
  - [Agent profiles](./profiles.md) — why an agent and its loadout _is_ the profile.
17
17
  - [Skills](./skills.md) — capability packages with progressive disclosure, references, and routing.
18
- - [Personas](./personas.md) — the base-agent-plus-persona-documents review convention.
18
+ - [Personas](./personas.md) — one portable Markdown file per persona; append at launch or paste anywhere.
19
19
  - [Subagents and delegation](./subagents.md) — the four delegation boundaries, from in-session helpers to Kubernetes Jobs.
20
20
  - [Settings](./settings.md) — scopes, schema, and the flat `settings.local.yml` override file.
21
21
  - [Tasks](./tasks.md) — placeholder for a separate upcoming RFC.
@@ -49,7 +49,7 @@ Each use case is a worked story — a problem, the composition that answers it,
49
49
  - [Grafana alert investigations in-cluster](./usecases/grafana-alert-investigator.md) — a webhook turns each firing alert into one bounded investigation Job.
50
50
  - [Self-improving skills](./usecases/self-improving-skills.md) — a weekly loop that proposes skill edits and ships only measured improvements.
51
51
  - [Resident agents: a researcher wiki](./usecases/resident-agents.md) — a long-lived agent that turns an email inbox into a compounding, reviewable knowledge base.
52
- - [Persona reviews](./usecases/persona-reviews.md) — a base review agent plus customer-persona documents for feedback on ideas, docs, and designs.
52
+ - [Persona reviews](./usecases/persona-reviews.md) — author one persona file, run it through the shared reviewer, paste the same file into any web agent.
53
53
  - [Organization catalog](./usecases/organization-profile-catalog.md) — publish shared org resources and defaults through an `owner/.outfitter` control repository.
54
54
  - [Engineering catalog](./usecases/engineering.md) — package engineering agents and skills for repeatable workflows.
55
55
 
@@ -79,9 +79,20 @@ agents/founder/
79
79
 
80
80
  The overlay is file-based. Source layers are applied from lowest to highest precedence, so a workspace `agents/founder/pi/keybindings.json` replaces the same file from a global or remote catalog while unrelated lower-layer files remain present. Outfitter does not follow symlinks from the overlay. The folder is ignored when the selected harness is not Pi.
81
81
 
82
- Outfitter writes generated identity and composed skills after applying the native overlay, and seeds durable Pi credentials immediately before launch. Those runtime-owned resources therefore cannot be replaced accidentally by a profile overlay.
82
+ Outfitter writes generated identity, composed skills, selected delegates, and
83
+ selected MCP servers after applying the native overlay, and seeds durable Pi
84
+ credentials immediately before launch. Those runtime-owned resources therefore
85
+ cannot be replaced accidentally by a profile overlay.
83
86
 
84
- Two per-agent surfaces are **discovered but not yet projected** (adapter parity is tracked in [#183](https://github.com/ai-outfitter/outfitter/issues/183)): `agents/<agent>/mcp.json` (merges by server id over the tree-root `mcp.json`) and the reserved `agents/<agent>/hooks/` namespace (see [Hooks](./hooks.md)). Both surface a validation warning when present so a selection placed there is never silently dropped.
87
+ `agents/<agent>/mcp.json` merges by server id over layered tree-root `mcp.json`
88
+ files. The Pi projection writes only the servers selected by the active
89
+ agent's `mcp` loadout into the runtime `mcp.json`.
90
+
91
+ The per-agent `agents/<agent>/hooks/` namespace remains reserved and is not yet
92
+ projected (adapter parity is tracked in
93
+ [#183](https://github.com/ai-outfitter/outfitter/issues/183)). Its presence
94
+ surfaces a validation warning so content placed there is never silently
95
+ dropped.
85
96
 
86
97
  ## config.json
87
98
 
@@ -112,3 +123,5 @@ Agents resolve by slug across layers — workspace, global, then remote sources
112
123
  ## Agents as delegates
113
124
 
114
125
  The same agent definition can also be selected as a [subagent](./subagents.md) in another agent's `subagents` list — a delegate the run can hand focused work to. A leader agent's loadout is where that delegation is declared.
126
+ For Pi runs, Outfitter also resolves and materializes the delegate's selected skills. Those skills
127
+ are available to the delegate without being loaded into the leader's active skill set.
@@ -21,7 +21,7 @@ Any other arguments and unrecognized options are passed through to the launched
21
21
 
22
22
  ```bash
23
23
  outfitter run engineer --harness claude
24
- outfitter run reviewer -- --print "summarize this repo"
24
+ outfitter run persona-reviewer -- --print "summarize this repo"
25
25
  ```
26
26
 
27
27
  ## `outfitter setup [source]`
@@ -49,7 +49,7 @@ The protocol resources Outfitter resolves and composes:
49
49
  Three related terms, none of which is a settings key or a separate file format:
50
50
 
51
51
  - A **[profile](./profiles.md)** is just an agent and its loadout. "The engineer profile" is the `engineer` agent with everything it composes. There is no `profile.yml` and no `profiles:` map — the loadout lives on the agent.
52
- - A **[persona](./personas.md)** is a _convention_, not a resource: a base review agent (a base prompt plus how-to-review instructions) that reads an interchangeable persona description document — for example `docs/user-personas/coyote-road-runner-chaser.md` — as input. Swapping the input document swaps the persona.
52
+ - A **[persona](./personas.md)** is a _convention_, not a resource: one portable, committed Markdown document per persona — for example `docs/personas/platform-lead.md` — appended at launch to a shared review agent, or pasted into any tool as stakeholder context. Swapping the file swaps the persona.
53
53
  - A **[subagent](./subagents.md)** is an agent projected into the harness's native delegation mechanism, selected in another agent's `subagents` loadout. A leader agent delegates to local coding-harness subagents or to issue- and action-backed subagents.
54
54
 
55
55
  The same agent definition can be run directly or selected as a subagent elsewhere; its loadout decides what it composes.
@@ -50,6 +50,16 @@ The same convention builds a role-scoped profile — a `platform` or `marketing`
50
50
  - **Bespoke per org two ways:** as a [subagent](./subagents.md) other agents delegate role work to, or via one org-specific skill (a `brand` or `platform` skill) carrying the values — endpoints, voice, RBAC — that make the shared profile bespoke without duplicating it.
51
51
  - **Role separation is the point.** An engineer or a marketer doesn't want the other's machinery in context; they work in their own lane and delegate across lanes when needed. Cross-cutting work stays _available_ through inheritance and delegation, not by stuffing every profile.
52
52
 
53
+ ## Worked example: persona documents
54
+
55
+ The [persona convention](./personas.md) applies the same rule to a non-technical contribution: contributing a persona means committing one Markdown file — no loadout involved.
56
+
57
+ - **Community layer supplies the machinery** — the shared `persona-reviewer` agent and the `persona-authoring` / `persona-review` skills ship once, in [`community-profiles`](https://github.com/ai-outfitter/community-profiles).
58
+ - **The project layer holds only the files** — a marketer or founder authors `docs/personas/platform-lead.md` (with `persona-authoring` interviewing them, or from the template by hand) and commits it as ordinary project documentation. No agent, no YAML, no `.agents` entry.
59
+ - **Never copy** — a tenth persona is a tenth file, not a tenth reviewer. The same file also pastes unchanged into web agents as stakeholder context, so it is not tied to any one harness.
60
+
61
+ The full story is the [Persona reviews use case](./usecases/persona-reviews.md).
62
+
53
63
  ## Roadmap: a shareable prompt fragment
54
64
 
55
65
  Today the always-on vehicle is a tree's root `agents.md` / `system-prompt.md` — one file per layer. It inherits and overrides _per layer_, but you cannot yet publish one named fragment from a community catalog and override just that fragment by ID. A first-class, slug-composable shared prompt fragment is the missing primitive; until it lands, a single line per layer's shared context still deduplicates by inheritance — just not as a publishable unit. [Hooks](./hooks.md) carry the analogous gap for portable hook definitions.
@@ -39,7 +39,7 @@ Learn how shared sources work in [Catalogs](./catalogs.md), then see [Agents](./
39
39
 
40
40
  ```bash
41
41
  outfitter run engineer
42
- outfitter run reviewer --harness claude
42
+ outfitter run persona-reviewer --harness claude
43
43
  outfitter sync
44
44
  outfitter list agents
45
45
  outfitter validate
@@ -1,41 +1,42 @@
1
1
  # Personas
2
2
 
3
- A persona is not a resource or a settings key — it is a **convention** built from ordinary pieces:
3
+ A persona is not a resource or a settings key — it is a convention built from ordinary pieces:
4
4
 
5
- 1. A **base review agent** — a normal [agent](./agents.md) whose prompt says how to review something (an app, docs, a UX flow): what to look at, what evidence to cite, what output shape to return.
6
- 2. Interchangeable **persona description documents** plain markdown files with attributes in frontmatter and a short bio underneath. They come in two kinds you **mix and match**: a **role** (a reusable job archetype — goals, anxieties, buying triggers shared across a customer segment) and an **individual** (a named person with demographics — birthdate, income, education, hobbies, skills — who inherits one or more roles and adds their own voice). Give each the concreteness a [Lean Canvas](https://leanstack.com/lean-canvas) customer segment gets.
5
+ 1. A **shared review agent** — [`persona-reviewer`](https://github.com/ai-outfitter/community-profiles/blob/main/agents/persona-reviewer/agent.md), a normal [agent](./agents.md) from the community catalog that selects the `persona-review` skill, which owns the review method and report shape. One reviewer serves all personas.
6
+ 2. **One committed Markdown file per persona** a portable, self-contained document. The whole persona lives in that one file; swapping the file swaps the persona, and the review rules stay fixed.
7
7
 
8
- You run the base agent and feed it the persona files to adopt: a role, refined by an individual. Swapping the files swaps the persona; the base agent — the review rules — stays fixed. Nothing new is added to the protocol: it is one agent plus a folder of description files. See [Persona reviews](./usecases/persona-reviews.md) for the full shape.
8
+ ## The format
9
+
10
+ A persona file is plain Markdown with no frontmatter and no schema:
11
+
12
+ - Starts directly with an H1 naming a **generic role archetype**: `# Platform Lead`, `# Founder-operator`. Use a named individual (`# Priya Nair — Platform Lead`) only when a specific person's voice is the point.
13
+ - First-person prose: an unheaded opening paragraph, then the recommended sections `## My work and context`, `## What I need`, `## How I decide`, and `## How I communicate`. Sections may be renamed or combined; connected prose beats bullet stacks.
14
+ - Everything the persona knows — role, goals, constraints, decision signals, voice — is ordinary Markdown.
15
+
16
+ It lives in normal project documentation, deliberately outside `.agents/`:
9
17
 
10
18
  ```text
11
- customer-review/
12
- agents/
13
- reviewer/agent.md # base: how to review, what to return
14
- settings.yml
15
- docs/user-personas/
16
- roles/ # reusable job archetypes
17
- staff-engineer.md
18
- founder-operator.md
19
- individuals/ # named people, each naming one or more roles
20
- marcus-bell.md
21
- dana-okafor.md
19
+ docs/personas/
20
+ platform-lead.md
21
+ founder-operator.md
22
22
  ```
23
23
 
24
- ## Why a convention, not a key
24
+ A persona is project steering context rather than agent configuration, which is why `outfitter dump` does not carry it. The authoring template and completed reference personas ship in the community catalog's [`persona-authoring`](https://github.com/ai-outfitter/community-profiles/tree/main/skills/persona-authoring) skill.
25
25
 
26
- Modeling personas as their own resource — or as a `personas:` list you compose in order — duplicates what an agent already is and grows the surface area of the system. Agents are exactly what that machinery was reaching for. Keeping personas as "base agent + description document" means a team maintains one review agent and a directory of cheap markdown files, instead of a fleet of near-identical agents.
26
+ ## Three ways to consume the same file
27
27
 
28
- ## Running a persona review
28
+ - **Appended at launch**: `outfitter run persona-reviewer -- --append-system-prompt docs/personas/platform-lead.md …` — the direct run is the underlying interface, and the reviewer adopts the file as its identity for that session only. An agent using the [`persona-review`](https://github.com/ai-outfitter/community-profiles/tree/main/skills/persona-review) skill can drive the same run in the background or synchronously and capture its report in a durable file. See [Persona reviews](./usecases/persona-reviews.md) for the runnable form of both.
29
+ - **Pasted into a web agent**: upload or paste the file unchanged into claude.ai project knowledge or a ChatGPT project as stakeholder context. Same artifact, zero conversion.
30
+ - **Ordinary reading context**: any agent doing product planning, research, or writing can read the file to know who the work is for.
29
31
 
30
- Point the base agent at the artifact and name the persona files to adopt — a role refined by an individual:
32
+ ## Why a convention, not a key
31
33
 
32
- ```bash
33
- outfitter run reviewer -- --print \
34
- "Adopt docs/user-personas/roles/founder-operator.md refined by \
35
- docs/user-personas/individuals/dana-okafor.md. Review README.md and \
36
- docs/getting-started.md and return the standard review shape."
37
- ```
34
+ Modeling personas as their own resource — or as a `personas:` list you compose in order — duplicates what an agent already is and grows the surface area of the system. Keeping personas as "shared agent + one document" means a team maintains one review agent and a directory of cheap Markdown files, instead of a fleet of near-identical agents or a runtime chain of fragments.
35
+
36
+ Organization research, interviews, and individual detail are **authoring inputs**, not committed schema: interview from them, keep research notes however you like, but the committed canonical artifact is always one self-contained role file. Do not invent demographics, income, or biography the research does not support, and never generate an Outfitter agent per persona.
37
+
38
+ ## Status
38
39
 
39
- Because the base agent fixes the output shape, feedback from different persona documents stays directly comparable.
40
+ Personas ride entirely on existing CLI behavior (`outfitter run` plus `--append-system-prompt` passthrough), so no `OFTR-*` requirement covers them. The reviewer runs as the selected agent; native Pi subagent projection is not a prerequisite. An `.agents`-native persona form (a protocol resource, or a settings layer pointing at persona documents) is a separate, deferred design; the portable file must never depend on it.
40
41
 
41
- See [Persona reviews](./usecases/persona-reviews.md) for a complete catalog example.
42
+ See [Persona reviews](./usecases/persona-reviews.md) for the worked author → run → paste-anywhere story, and the community catalog's [persona boundary doc](https://github.com/ai-outfitter/community-profiles/blob/main/docs/persona-review.md) for the setup and runtime responsibility split.
@@ -23,7 +23,7 @@ Settings ([settings.md](./settings.md)) is left with just resolution and launch
23
23
 
24
24
  ## Composing from a base
25
25
 
26
- To share behavior across several agents, keep shared operating context in the tree's `system-prompt.md` and `agents.md` — every agent in the tree inherits those — and put shared procedures in [skills](./skills.md) each agent selects. Selecting an agent as a subagent does _not_ share its policy; it only makes that agent available as a delegation target. The [persona](./personas.md) convention builds on the shared-context idea: one base review agent, many interchangeable persona description documents fed as input.
26
+ To share behavior across several agents, keep shared operating context in the tree's `system-prompt.md` and `agents.md` — every agent in the tree inherits those — and put shared procedures in [skills](./skills.md) each agent selects. Selecting an agent as a subagent does _not_ share its policy; it only makes that agent available as a delegation target. The [persona](./personas.md) convention builds on the shared-context idea: one shared review agent, many single-file persona documents appended at launch.
27
27
 
28
28
  ## Migrating from authored profiles
29
29
 
@@ -57,7 +57,7 @@ Every skill directory contains `SKILL.md`. Its `name` MUST match the directory n
57
57
  ```yaml
58
58
  ---
59
59
  name: outfitter-actions
60
- description: Design concise GitHub automation using stable personas and progressively disclosed skills.
60
+ description: Design concise GitHub automation using stable agent identities and progressively disclosed skills.
61
61
  ---
62
62
  # Outfitter Actions
63
63
 
@@ -215,7 +215,7 @@ Loadout-added entries use the same `file` / `repo_file` sources and validation r
215
215
 
216
216
  ### Trust boundary
217
217
 
218
- Treat `file` references with the same trust as the skill that declares them. Treat every `repo_file` reference as untrusted repository content. A skill SHOULD select its workflow before reading repository references and MUST NOT allow instructions inside a reference to override persona policy, safety boundaries, or the user's request.
218
+ Treat `file` references with the same trust as the skill that declares them. Treat every `repo_file` reference as untrusted repository content. A skill SHOULD select its workflow before reading repository references and MUST NOT allow instructions inside a reference to override the agent's identity and policy, safety boundaries, or the user's request.
219
219
 
220
220
  Outfitter resolves and normalizes reference targets before launch. Targets MUST remain within their root after following symlinks; escaping, colliding, and broken `file` references fail validation. A directory target is scanned recursively so a contained symlink cannot smuggle outside content into the generated skill.
221
221
 
@@ -28,7 +28,7 @@ default_agent: engineer
28
28
 
29
29
  ## Shared operating context
30
30
 
31
- Rules that apply to every agent in the tree live in `agents.md`, so each role inherits them without ordered persona composition:
31
+ Rules that apply to every agent in the tree live in `agents.md`, so each role inherits them:
32
32
 
33
33
  ```markdown
34
34
  <!-- agents.md -->
@@ -26,7 +26,7 @@ default_agent: engineer
26
26
 
27
27
  ## Shared operating context
28
28
 
29
- Rules every role shares live in the tree's `agents.md`, inherited by each agent without ordered persona composition:
29
+ Rules every role shares live in the tree's `agents.md`, inherited by each agent:
30
30
 
31
31
  ```markdown
32
32
  <!-- .agents/agents.md -->
@@ -1,167 +1,118 @@
1
- # Persona Reviews
1
+ # Persona reviews
2
2
 
3
- A persona review catalog gathers structured feedback on a product, docs, onboarding flow, or UX from the points of view of the people who might use it — before asking real prospects to spend time. It uses the [persona convention](../personas.md): **one base review agent** plus a **directory of persona description documents**, run once per document.
3
+ A persona review gathers structured feedback on a product, docs, onboarding flow, or UX from the point of view of the people who might use it — before asking real prospects to spend time. It uses the [persona convention](../personas.md): **one shared review agent** plus **one committed Markdown file per persona**. The same file runs under Outfitter, and pastes unchanged into any web agent.
4
4
 
5
- There is no `personas:` map and no agent per customer type. The review rules live in a single agent; each persona is a cheap markdown file you feed it as input.
5
+ ## One persona, one file
6
6
 
7
- ```text
8
- customer-review/ # standalone .agents repo; root is the payload
9
- agents/
10
- reviewer/agent.md # the base review agent
11
- settings.yml
12
- docs/user-personas/
13
- roles/ # reusable job archetypes (shared segment priorities)
14
- staff-engineer.md
15
- founder-operator.md
16
- platform-lead.md
17
- individuals/ # specific named people, each naming one or more roles
18
- marcus-bell.md # roles: [staff-engineer]
19
- dana-okafor.md # roles: [founder-operator]
20
- priya-nair.md # roles: [platform-lead]
21
- ```
7
+ The whole persona is one portable, self-contained Markdown document — a generic role archetype, H1 first, no frontmatter, first-person prose. Abridged from the canonical [`platform-lead.md`](https://github.com/ai-outfitter/community-profiles/blob/main/skills/persona-authoring/references/personas/platform-lead.md) reference:
22
8
 
23
- Personas come in two kinds of file, and a review **mixes and matches** them: a **role** carries the priorities everyone in a customer segment shares, and an **individual** is one named person who inherits one or more roles and adds their own demographics and voice. Keep roles reusable and individuals concrete, and you can cover a lot of viewpoints from a small set of files.
9
+ ```markdown
10
+ # Platform Lead
24
11
 
25
- ## Settings
12
+ I'm the platform lead responsible for a consistent, reproducible agent setup
13
+ across a mid-sized engineering organization.
26
14
 
27
- Settings only names the default agent and where resources resolve from — no persona list:
15
+ ## How I decide
28
16
 
29
- ```yaml
30
- # settings.yml
31
- default_agent: reviewer
17
+ I look for clear precedence, pinned sources, documented secret boundaries,
18
+ least-privilege access, and tests showing that credentials stay isolated
19
+ between layers. I check the escape hatch first.
32
20
  ```
33
21
 
34
- ## The base review agent
35
-
36
- One agent holds the review method and the output shape. It does not name any customer type; it reads the persona files it is told to adopt, in order.
37
-
38
- ```
39
- <!-- agents/reviewer/agent.md -->
40
- ---
41
- name: reviewer
42
- description: Reviews an artifact from the point of view of an assigned customer persona.
43
- ---
44
-
45
- Adopt the persona files named in your instructions, in order: a role file
46
- establishes the segment's priorities, and an individual file layers that
47
- person's demographics and voice on top (later files refine earlier ones). If
48
- an individual names roles in its frontmatter, treat those as its baseline.
49
-
50
- Read or experience the provided artifact from that persona's point of view:
51
- docs, screenshots, website, prototype, product flow, or onboarding path.
52
- Distinguish evidence from assumptions, cite the exact page or UI moment that
53
- shaped your reaction, and do not invent real customer research.
54
-
55
- Return feedback as: persona, artifact reviewed, first impression, top blocker,
56
- strongest value signal, confusing language, suggested change, and confidence.
57
- If you need more context, ask for the smallest missing artifact.
22
+ The review method lives in the shared [`persona-reviewer`](https://github.com/ai-outfitter/community-profiles/blob/main/agents/persona-reviewer/agent.md) agent; each persona is a Markdown file you append to it.
23
+
24
+ ## Adopt persona reviews across an engineering organization
25
+
26
+ A platform engineer installs Outfitter and uses the `platform` profile to
27
+ configure a pinned [organization catalog](./organization-profile-catalog.md).
28
+ The catalog reuses the default `engineer` profile, defines the organization's
29
+ `marketing` profile, and makes the community persona-review components
30
+ available to both. After setup and sync, engineers review products from the
31
+ `engineer` profile while marketers review messaging from the `marketing`
32
+ profile. Both profile loadouts select `persona-review`. When either role is
33
+ asked to run a review, the skill launches the isolated shared reviewer with the
34
+ selected customer persona and saves the report:
35
+
36
+ ```mermaid
37
+ flowchart LR
38
+ subgraph platformTeam["Platform engineer platform profile"]
39
+ install["Install Outfitter"] --> platform["outfitter run platform"]
40
+ platform --> catalog["Configure pinned org catalog"]
41
+ end
42
+
43
+ subgraph distribution["Organization distribution"]
44
+ catalog --> defaults["default-profiles<br/>engineer skills: persona-review"]
45
+ catalog --> marketing["Organization catalog<br/>marketing skills: persona-review"]
46
+ defaults --> community["community-profiles<br/>persona-review skill<br/>persona-reviewer agent"]
47
+ end
48
+
49
+ subgraph roleTeams["Engineering and marketing teams"]
50
+ setup["outfitter setup and sync"] --> engineer["outfitter run engineer"]
51
+ setup --> marketer["outfitter run marketing"]
52
+ engineer -->|"Product review"| skill["Use persona-review skill"]
53
+ marketer -->|"Messaging review"| skill
54
+ persona["Customer persona<br/>docs/personas/customer.md"] --> reviewer["Isolated persona-reviewer"]
55
+ artifact["Review target"] --> reviewer
56
+ skill --> reviewer
57
+ reviewer --> report["Durable customer-review report"]
58
+ end
59
+
60
+ catalog --> setup
61
+ community --> setup
62
+ marketing --> setup
58
63
  ```
59
64
 
60
- ## Roles: reusable job archetypes
65
+ The `platform`, `engineer`, and `marketing` profiles are executable roles. A
66
+ customer persona supplies temporary identity context within the isolated
67
+ reviewer process.
61
68
 
62
- A role captures what everyone in a customer segment shares — the job, its goals, anxieties, buying triggers, and what its feedback focuses on — with no personal detail. Roles are reused across many individuals.
69
+ ## Author it
63
70
 
64
- ```
65
- <!-- docs/user-personas/roles/staff-engineer.md -->
66
- ---
67
- kind: role
68
- title: Staff Engineer
69
- segment: large-eng-org
70
- goals: [reduce cross-team friction, raise technical quality, adopt tools that survive scrutiny]
71
- anxieties: [tools that demo well but fail on a real codebase, unproven claims]
72
- buying_triggers: [credible examples, verifiable outcomes, a clean migration path]
73
- feedback_focus: [depth, verification paths, missing examples, evidence behind claims]
74
- ---
75
-
76
- Responsible for large codebases, architecture decisions, reviews, and
77
- cross-team technical quality. Cares whether the docs explain how the product
78
- improves real engineering work. Flags missing examples, weak verification
79
- paths, and claims that need evidence.
80
- ```
71
+ Start from the community catalog's [`template.persona.md`](https://github.com/ai-outfitter/community-profiles/blob/main/skills/persona-authoring/assets/template.persona.md) by hand, or let any agent that selects the [`persona-authoring`](https://github.com/ai-outfitter/community-profiles/tree/main/skills/persona-authoring) skill interview you into the file. Commit the result to normal project documentation:
81
72
 
82
- ```
83
- <!-- docs/user-personas/roles/founder-operator.md -->
84
- ---
85
- kind: role
86
- title: Founder-operator
87
- segment: seed-stage-startup
88
- goals: [ship weekly, keep the team small, reach the next milestone before the runway ends]
89
- anxieties: [tool sprawl, hidden pricing, time lost to setup]
90
- buying_triggers: [obvious value in the first hour, no credit card to try]
91
- feedback_focus: [time-to-first-value, jargon, trust boundaries, pricing clarity]
92
- ---
93
-
94
- A hands-on founder who writes product specs, edits docs, ships small features,
95
- and manages a thin team. Cares whether the first hour feels obviously valuable.
73
+ ```text
74
+ docs/personas/
75
+ platform-lead.md
76
+ founder-operator.md
96
77
  ```
97
78
 
98
- ## Individuals: named people who inherit roles
79
+ Prefer generic role archetypes over named individuals. Research and interviews are authoring inputs; commit only the self-contained file, and invent nothing the research does not support.
99
80
 
100
- An individual is one concrete person — with the demographics a [Lean Canvas](https://leanstack.com/lean-canvas) customer segment gets — who names one or more roles to inherit and then adds their own attributes and voice. The named person **mixes and matches** roles: usually one, but a founder who also runs the platform can list both.
81
+ ## Run it under Outfitter
101
82
 
102
- ```
103
- <!-- docs/user-personas/individuals/marcus-bell.md -->
104
- ---
105
- kind: individual
106
- name: Marcus Bell
107
- roles: [staff-engineer]
108
- born: 1985-11-02
109
- location: Seattle, WA
110
- household_income: 265000
111
- education: MS Computer Engineering
112
- employer: ~400-engineer fintech
113
- hobbies: [rock climbing, sci-fi novels, restoring old synths]
114
- skills: [distributed systems, code review, architecture, mentoring]
115
- tone: dry, skeptical, cites sources
116
- ---
117
-
118
- Reads new tooling the way he reads a design doc: looking for the failure mode
119
- first. Warm once convinced, but will not take a benchmark on faith.
120
- ```
83
+ After `outfitter setup`, launch the shared reviewer directly with the persona appended and save its output:
121
84
 
122
- ```
123
- <!-- docs/user-personas/individuals/dana-okafor.md -->
124
- ---
125
- kind: individual
126
- name: Dana Okafor
127
- roles: [founder-operator, platform-lead] # mixes two roles
128
- born: 1989-03-14
129
- location: Austin, TX
130
- household_income: 180000
131
- education: BS Computer Science
132
- employer: 6-person seed-stage startup (also the de facto platform owner)
133
- hobbies: [trail running, home espresso, mechanical keyboards]
134
- skills: [product specs, TypeScript, fundraising, hiring]
135
- tone: fast, pragmatic, allergic to jargon
136
- ---
137
-
138
- Wears the founder and the platform hat at once, so she weighs first-hour value
139
- against fleet-wide safety in the same breath. Impatient with setup friction.
85
+ ```sh
86
+ mkdir -p docs/persona-reviews
87
+ outfitter run persona-reviewer -- \
88
+ --append-system-prompt docs/personas/platform-lead.md \
89
+ --print "Review the onboarding flow and write the report. @README.md" \
90
+ > docs/persona-reviews/platform-lead-onboarding.md
140
91
  ```
141
92
 
142
- Keep the role attribute set consistent so reviews stay comparable, and let individuals vary freely in demographics and tone. Add more roles (`platform-lead`, `engineering-manager`, `agency-consultant`) and more individuals the same way.
93
+ This is the portable interface: it works from the project containing the persona and does not assume a particular catalog checkout path. One shared agent adopts the file as its identity for that session only and writes a first-person, sourced report — evidence cited to the exact page or UI moment, assumptions labeled. The reviewer inherits the caller's configured model; reviews benefit from a strong reasoning model.
143
94
 
144
- ## Running the reviews
95
+ ### Optional orchestration with the skill
145
96
 
146
- Run the base agent once per persona, naming the role and individual files to adopt and the artifact under review:
97
+ Use the [`persona-review`](https://github.com/ai-outfitter/community-profiles/tree/main/skills/persona-review) skill when another agent should manage the review process. The skill owns synchronous or background execution and durable report capture. From a checkout of the community catalog, its repository-relative launcher is an optional convenience:
147
98
 
148
- ```bash
149
- outfitter run reviewer -- --print \
150
- "Adopt docs/user-personas/roles/staff-engineer.md refined by \
151
- docs/user-personas/individuals/marcus-bell.md. Read README.md, \
152
- docs/getting-started.md, and docs/pricing.md, then return the standard \
153
- review shape: where the product feels credible, where it feels \
154
- underspecified, and the one example that would most improve your confidence."
99
+ ```sh
100
+ bash skills/persona-review/scripts/persona-review.sh \
101
+ --persona docs/personas/platform-lead.md \
102
+ --report docs/persona-reviews/platform-lead-onboarding.md \
103
+ -- --print "Review the onboarding flow and write the report. @README.md"
155
104
  ```
156
105
 
157
- ```bash
158
- outfitter run reviewer -- --print \
159
- "Adopt docs/user-personas/individuals/dana-okafor.md and the roles it names. \
160
- Browse the local docs site and try the first-run setup flow. Report the \
161
- first confusing moment, the first moment that felt valuable, and whether \
162
- you would keep using it."
163
- ```
106
+ The reviewer runs directly as the selected agent. This journey does not require Pi's native subagent projection.
107
+
108
+ ## Take the same file to the web
109
+
110
+ Paste or upload `docs/personas/platform-lead.md` unchanged into a claude.ai project's knowledge or a ChatGPT project and say: "Treat this as stakeholder context. Review the attached landing page from this persona's point of view." The file was written to read standalone, so a tool that takes Markdown project context can use it unchanged.
111
+
112
+ ## Why this shape
164
113
 
165
- Model and thinking choices — cheaper models for high-volume routing reviews, deeper reasoning for platform-risk reviews live in the reviewer agent's loadout, or a machine-local override, rather than being duplicated per persona.
114
+ - **One file per persona**: adding a persona adds a document, not another agent.
115
+ - **Comparable reports**: one agent fixes the review method and output shape, so feedback from different persona files is directly comparable.
116
+ - **No Outfitter dependency**: Outfitter is one optional consumer of a file that does not depend on it.
166
117
 
167
- Because the base agent fixes the output shape, feedback from every persona document is directly comparable. The result is a reusable customer-persona review catalog that reads docs or experiences a UX from many viewpoints without pretending to replace real customer discovery.
118
+ See the [persona spec](../personas.md) for the format, and the community catalog's [persona boundary doc](https://github.com/ai-outfitter/community-profiles/blob/main/docs/persona-review.md) for the responsibility split between authoring, the shared reviewer, and project wrappers.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-outfitter/outfitter",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Profile-oriented wrapper for launching pi, Claude Code, and future agent CLIs with reproducible configuration.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "mcp": {
20
20
  "$ref": "#/$defs/slugList",
21
- "description": "MCP server ids. Per-agent agents/<name>/mcp.json is discovered and merges by id over the tree-root mcp.json; projection into the run is deferred (adapter parity, #183)."
21
+ "description": "MCP server ids. Per-agent agents/<name>/mcp.json merges by id over layered tree-root mcp.json files before selected servers are projected into the run."
22
22
  },
23
23
  "extensions": {
24
24
  "$ref": "#/$defs/slugList",