@ai-outfitter/outfitter 0.7.2 → 0.9.0

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 (89) hide show
  1. package/README.md +12 -2
  2. package/code/pi-extension/src/outfitter-extension.js +720 -0
  3. package/dist/agents/AdapterStatePaths.js +3 -1
  4. package/dist/agents/AdapterStatePaths.js.map +1 -1
  5. package/dist/agents/AgentAdapter.d.ts +3 -0
  6. package/dist/agents/AgentLaunch.js +5 -0
  7. package/dist/agents/AgentLaunch.js.map +1 -1
  8. package/dist/agents/OutfitterDocs.d.ts +2 -0
  9. package/dist/agents/OutfitterDocs.js +38 -0
  10. package/dist/agents/OutfitterDocs.js.map +1 -0
  11. package/dist/agents/claude/ClaudeAdapter.js +3 -2
  12. package/dist/agents/claude/ClaudeAdapter.js.map +1 -1
  13. package/dist/agents/pi/PiAdapter.js +24 -19
  14. package/dist/agents/pi/PiAdapter.js.map +1 -1
  15. package/dist/agents/pi/PiExtensionCache.d.ts +8 -0
  16. package/dist/agents/pi/PiExtensionCache.js +95 -5
  17. package/dist/agents/pi/PiExtensionCache.js.map +1 -1
  18. package/dist/agents/pi/PiSkillSources.d.ts +8 -0
  19. package/dist/agents/pi/PiSkillSources.js +69 -0
  20. package/dist/agents/pi/PiSkillSources.js.map +1 -0
  21. package/dist/cli/OutfitterCli.js +7 -2
  22. package/dist/cli/OutfitterCli.js.map +1 -1
  23. package/dist/cli/commands/PiLoginLaunch.js +28 -737
  24. package/dist/cli/commands/PiLoginLaunch.js.map +1 -1
  25. package/dist/cli/commands/RunCommand.d.ts +6 -17
  26. package/dist/cli/commands/RunCommand.js +115 -186
  27. package/dist/cli/commands/RunCommand.js.map +1 -1
  28. package/dist/cli/commands/SetupCommand.d.ts +4 -63
  29. package/dist/cli/commands/SetupCommand.js +13 -673
  30. package/dist/cli/commands/SetupCommand.js.map +1 -1
  31. package/dist/cli/commands/SyncCommand.d.ts +1 -1
  32. package/dist/cli/commands/SyncCommand.js +37 -12
  33. package/dist/cli/commands/SyncCommand.js.map +1 -1
  34. package/dist/cli/commands/run/RunFirstRunOnboarding.d.ts +7 -0
  35. package/dist/cli/commands/run/RunFirstRunOnboarding.js +52 -0
  36. package/dist/cli/commands/run/RunFirstRunOnboarding.js.map +1 -0
  37. package/dist/cli/commands/run/RunLaunchSummary.d.ts +2 -0
  38. package/dist/cli/commands/run/RunLaunchSummary.js +35 -0
  39. package/dist/cli/commands/run/RunLaunchSummary.js.map +1 -0
  40. package/dist/cli/commands/run/RunProfileResolution.d.ts +37 -0
  41. package/dist/cli/commands/run/RunProfileResolution.js +124 -0
  42. package/dist/cli/commands/run/RunProfileResolution.js.map +1 -0
  43. package/dist/cli/commands/run/RunStateWritePrompt.d.ts +2 -0
  44. package/dist/cli/commands/run/RunStateWritePrompt.js +29 -0
  45. package/dist/cli/commands/run/RunStateWritePrompt.js.map +1 -0
  46. package/dist/cli/commands/setup/SetupPrompts.d.ts +14 -0
  47. package/dist/cli/commands/setup/SetupPrompts.js +296 -0
  48. package/dist/cli/commands/setup/SetupPrompts.js.map +1 -0
  49. package/dist/cli/commands/setup/SetupSourceImport.d.ts +5 -0
  50. package/dist/cli/commands/setup/SetupSourceImport.js +177 -0
  51. package/dist/cli/commands/setup/SetupSourceImport.js.map +1 -0
  52. package/dist/cli/commands/setup/SetupSourceLaunch.d.ts +4 -0
  53. package/dist/cli/commands/setup/SetupSourceLaunch.js +65 -0
  54. package/dist/cli/commands/setup/SetupSourceLaunch.js.map +1 -0
  55. package/dist/cli/commands/setup/SetupStarterSource.d.ts +21 -0
  56. package/dist/cli/commands/setup/SetupStarterSource.js +133 -0
  57. package/dist/cli/commands/setup/SetupStarterSource.js.map +1 -0
  58. package/dist/cli/commands/setup/SetupTypes.d.ts +91 -0
  59. package/dist/cli/commands/setup/SetupTypes.js +26 -0
  60. package/dist/cli/commands/setup/SetupTypes.js.map +1 -0
  61. package/dist/compositeProfile/CompositeProfileCleanup.d.ts +9 -0
  62. package/dist/compositeProfile/CompositeProfileCleanup.js +87 -0
  63. package/dist/compositeProfile/CompositeProfileCleanup.js.map +1 -0
  64. package/dist/compositeProfile/StatePersistence.d.ts +16 -1
  65. package/dist/compositeProfile/StatePersistence.js +27 -5
  66. package/dist/compositeProfile/StatePersistence.js.map +1 -1
  67. package/dist/fs/SafeSymlink.d.ts +13 -0
  68. package/dist/fs/SafeSymlink.js +50 -0
  69. package/dist/fs/SafeSymlink.js.map +1 -0
  70. package/dist/settings/SettingsLoader.d.ts +1 -0
  71. package/dist/settings/SettingsLoader.js +10 -1
  72. package/dist/settings/SettingsLoader.js.map +1 -1
  73. package/doc/architecture/state_writeback_strategy.md +350 -0
  74. package/doc/documentation/README.md +21 -0
  75. package/doc/documentation/cli.md +74 -0
  76. package/doc/documentation/concepts.md +54 -0
  77. package/doc/documentation/first-time-cli-agent-users.md +137 -0
  78. package/doc/documentation/getting-started.md +49 -0
  79. package/doc/documentation/iterating-on-profiles.md +109 -0
  80. package/doc/documentation/profile-repository.md +111 -0
  81. package/doc/documentation/profiles.md +183 -0
  82. package/doc/documentation/state.md +224 -0
  83. package/doc/documentation/support-matrix.md +46 -0
  84. package/doc/documentation/switching-to-outfitter.md +130 -0
  85. package/doc/documentation/usecases/engineering.md +114 -0
  86. package/doc/documentation/usecases/organization-profile-catalog.md +140 -0
  87. package/doc/documentation/usecases/persona-reviews.md +173 -0
  88. package/doc/philosophy.md +25 -0
  89. package/package.json +3 -2
@@ -0,0 +1,137 @@
1
+ # First-time CLI agent users
2
+
3
+ This guide is for people who have never used Claude Code, Codex, Pi, or another terminal agent. Outfitter gives you a curated Pi setup; this page explains the working model so the first session feels powerful instead of mysterious.
4
+
5
+ ## Start with YOLO mode, then understand permissions
6
+
7
+ Most people first enjoy agent CLIs when they let the agent act: read the repo, edit files, run tests, and iterate without stopping for every tiny approval. That is the “YOLO mode” feeling: the agent can move at software speed while you steer the goal.
8
+
9
+ Use it intentionally:
10
+
11
+ ```text
12
+ Goal: make the failing test pass.
13
+ You may inspect files, edit code, and run project tests.
14
+ Ask before deleting files, changing dependencies, touching credentials, or publishing anything.
15
+ ```
16
+
17
+ Permissions are the safety boundary. A good session says what the agent may do, what it must ask about, and what evidence proves the job is done. Outfitter’s default profile catalog is meant to provide useful defaults, but you still own the trust decision for each project and command.
18
+
19
+ Good first permission rules:
20
+
21
+ - Let the agent read project files and run local tests.
22
+ - Let it make small edits in a git branch or worktree.
23
+ - Require approval for dependency changes, destructive shell commands, production data, credentials, publishing, releases, payments, legal filings, merges, and force-pushes.
24
+ - Ask for a short plan before broad rewrites.
25
+
26
+ ## Context engineering
27
+
28
+ Agent CLIs work best when you shape the context, not when you paste everything. Basic context engineering starts with `AGENTS.md`: a repository-local instruction file that tells the agent how the project works, what commands are safe, what evidence matters, and what rules must survive across sessions.
29
+
30
+ A useful first `AGENTS.md` can be small:
31
+
32
+ ```md
33
+ # Agent instructions
34
+
35
+ - Read `README.md` and `package.json` before changing code.
36
+ - Use `npm test -- --runInBand path/to/test` for narrow test runs when possible.
37
+ - Ask before deleting files, changing dependencies, or editing release config.
38
+ - Treat docs in `docs/requirements/` as product requirements.
39
+ ```
40
+
41
+ Then ask the agent to use that context:
42
+
43
+ ```text
44
+ Read AGENTS.md, the README, package scripts, and the failing test before editing.
45
+ Then propose a three-step plan with acceptance criteria.
46
+ ```
47
+
48
+ Outfitter profiles can store reusable personal context, while `AGENTS.md` keeps project context in the repo. Pi also supports extension-provided tools and skills; the default profile catalog may include skills that add project-governance, review, or browser/testing instructions to the session.
49
+
50
+ ## Planning mode
51
+
52
+ Planning mode is provided by the plan Pi extension installed in the current Outfitter profile. In the default Outfitter Pi setup, use the plan-mode keybinding (`Shift+Tab`) to toggle from build mode into plan mode before broad changes. Plan mode keeps the agent in an investigation/design posture: read, inspect, and propose; do not write the implementation yet.
53
+
54
+ Use the plan-mode keybinding when:
55
+
56
+ - the change spans multiple files;
57
+ - you do not know the repo conventions;
58
+ - the task mixes product, docs, and code;
59
+ - the cost of a wrong edit is high.
60
+
61
+ Example after toggling plan mode:
62
+
63
+ ```text
64
+ Goal: add a settings flag for quiet startup.
65
+ Find the relevant command, settings schema, tests, and docs.
66
+ Return the expected commits and validation commands.
67
+ ```
68
+
69
+ A strong plan includes checkable requirements: “MUST update the schema,” “MUST preserve non-interactive behavior,” “SHOULD add a regression test.” Toggle back to build mode when you want the agent to implement the approved plan.
70
+
71
+ ## Subagents
72
+
73
+ A subagent is another agent process given a focused task. Use subagents when one agent should keep the main plan while another does isolated research or implementation.
74
+
75
+ Two common patterns:
76
+
77
+ ```text
78
+ One focused agent:
79
+ Fix this bug in the current branch. Inspect, edit, test, and report the diff.
80
+ ```
81
+
82
+ ```text
83
+ One agent managing subagents:
84
+ Create a plan. Delegate implementation to a subagent in a worktree. Review the subagent diff before committing.
85
+ ```
86
+
87
+ Subagents are useful for:
88
+
89
+ - independent research;
90
+ - code review;
91
+ - implementation in a clean worktree;
92
+ - comparing approaches;
93
+ - keeping risky experiments away from the main checkout.
94
+
95
+ Whether subagents are available depends on the active Pi/Outfitter profile and extensions. The default profile catalog may include subagent definitions or guidance; vanilla agent CLIs differ in what they provide out of the box.
96
+
97
+ ## Skills
98
+
99
+ A skill is packaged instruction for a recurring job. Inside Pi, active skills are invoked as slash commands, for example `/skill:generated-daily-report`. Instead of teaching the agent your report, review, or research process every time, a skill can define how to run it, what files matter, and what “done” means.
100
+
101
+ Try inside Pi:
102
+
103
+ ```text
104
+ /skill:generated-daily-report
105
+ ```
106
+
107
+ Then provide the goal or inputs the skill asks for. Other examples might be project review, browser testing, release notes, or incident summaries, depending on what the active profile installed.
108
+
109
+ Skills may come from Pi packages, from the Outfitter default profile catalog, or from a project-local `.outfitter` profile. If a skill is not active, ask Pi what skills it can see before relying on it.
110
+
111
+ ## Extensions and tools
112
+
113
+ Extensions add tools and UI affordances to Pi. For example, an extension can expose a browser tool, a structured question UI, a GitHub helper, or an Outfitter setup command. These are not all vanilla Pi features; they appear when the active profile loads the relevant Pi package or extension.
114
+
115
+ Ask:
116
+
117
+ ```text
118
+ What tools and skills are active in this session? Which came from Pi, which came from Outfitter, and which came from project-local config?
119
+ ```
120
+
121
+ That question teaches you the session’s actual capability boundary before you depend on a tool.
122
+
123
+ ## First useful session script
124
+
125
+ Paste this into your first serious agent session:
126
+
127
+ ```text
128
+ I am new to CLI agents.
129
+ Goal: help me make one small, safe improvement in this repo.
130
+ First, inspect the repo entry points and explain the project shape.
131
+ Second, propose a plan with acceptance criteria.
132
+ Third, wait for my approval before editing.
133
+ You may read files and run non-destructive discovery commands.
134
+ Ask before deleting files, changing dependencies, pushing, publishing, or touching credentials.
135
+ ```
136
+
137
+ After a few sessions, move the reusable parts into an Outfitter profile so every launch starts with your preferred operating style.
@@ -0,0 +1,49 @@
1
+ # Getting started
2
+
3
+ Install Outfitter globally:
4
+
5
+ ```bash
6
+ npm install -g @ai-outfitter/outfitter
7
+ outfitter --help
8
+ ```
9
+
10
+ Outfitter launches agent CLIs; install the agents you plan to use separately.
11
+
12
+ ## First-time setup
13
+
14
+ Set up profiles from the Outfitter [default profiles repo](https://github.com/ai-outfitter/default-profiles), then launch the default profile:
15
+
16
+ ```bash
17
+ outfitter setup
18
+ outfitter
19
+ ```
20
+
21
+ If you are new to Claude Code, Codex, Pi, and agent CLIs, start with [First-time CLI agent users](./first-time-cli-agent-users.md) for YOLO mode, permissions, context engineering, planning mode, subagents, skills, and extension basics. If you already have an agent workflow, use [Switching to Outfitter](./switching-to-outfitter.md) to migrate the smallest durable set of habits first.
22
+
23
+ Learn how shared setup sources work in [Profile repositories](./profile-repository.md), then see [Profiles](./profiles.md) for profile composition, inheritance, and prompt examples.
24
+
25
+ ## Common commands
26
+
27
+ ```bash
28
+ outfitter run --profile engineering-default
29
+ outfitter run --agent claude --profile support
30
+ outfitter sync
31
+ outfitter profile list
32
+ outfitter profile create regulated --scope user
33
+ ```
34
+
35
+ See the [CLI reference](./cli.md) for every command and flag, and [Concepts](./concepts.md) for how settings, profiles, and adapters fit together. (`outfitter welcome` also exists as a legacy compatibility command for the older terminal onboarding prompts; current onboarding runs inside Pi via `outfitter setup`.)
36
+
37
+ ## Other install options
38
+
39
+ Upgrade a global install:
40
+
41
+ ```bash
42
+ npm update -g @ai-outfitter/outfitter
43
+ ```
44
+
45
+ Try without a global install:
46
+
47
+ ```bash
48
+ npx --yes @ai-outfitter/outfitter@latest --help
49
+ ```
@@ -0,0 +1,109 @@
1
+ # Iterating on local and worktree profiles
2
+
3
+ This guide covers the edit-run-inspect loop for profiles: switching to a profile you can edit, iterating on it locally or in a git worktree of a profile catalog, and verifying the result.
4
+ It is written for people and for Outfitter-managed agents — if you are an agent reading this, the "Improving your own profile" section describes how to modify the profile you were launched with.
5
+
6
+ ## Where editable profiles live
7
+
8
+ Outfitter resolves profiles from every configured `profile_sources` entry.
9
+ Three scopes are directly editable on the current machine:
10
+
11
+ | Scope | Profiles | Settings | Use for |
12
+ | ------------- | -------------------------------------- | ----------------------------------------- | ----------------------------------------- |
13
+ | user | `~/.outfitter/profiles/` | `~/.outfitter/settings.yml` | Personal defaults shared across projects |
14
+ | project | `<project>/.outfitter/profiles/` | `<project>/.outfitter/settings.yml` | Checked-in behavior the whole team gets |
15
+ | project-local | `<project>/.outfitter/local/profiles/` | `<project>/.outfitter/local/settings.yml` | Machine-private overrides and experiments |
16
+
17
+ Profiles synced from a remote catalog (`github:` or `uri:` profile sources) land in the Outfitter cache.
18
+ Do not edit the cache — `outfitter sync` overwrites it.
19
+ To iterate on a catalog profile, work in a local checkout of the catalog instead (see the worktree section below).
20
+
21
+ ## Switching profiles
22
+
23
+ - One launch: `outfitter run --profile <id> [-- <agent args>]`
24
+ - Future launches: set `default_profile: <id>` in the settings scope you want it to apply to.
25
+ - List what is resolvable right now: `outfitter profile list` (add `--all` to include inheritance-only templates).
26
+
27
+ Profile changes apply on the next launch.
28
+ A running session keeps the composite profile it started with, so after editing a profile you must restart `outfitter` to load the result.
29
+
30
+ ## The iteration loop
31
+
32
+ 1. Create or locate an editable profile:
33
+
34
+ ```sh
35
+ outfitter profile create my_experiment --scope project-local
36
+ ```
37
+
38
+ To iterate on an existing profile without touching it, create a new profile that inherits from it:
39
+
40
+ ```yaml
41
+ # .outfitter/local/profiles/my_experiment/profile.yml
42
+ id: my_experiment
43
+ label: My Experiment
44
+ inherits:
45
+ - engineer
46
+ controls:
47
+ append_system_prompt:
48
+ - |
49
+ <the behavior you are trying out>
50
+ ```
51
+
52
+ 2. Point your next launch at it, either with `outfitter run --profile my_experiment` or by setting `default_profile: my_experiment` in `.outfitter/local/settings.yml`.
53
+
54
+ 3. Validate before launching:
55
+
56
+ ```sh
57
+ outfitter profile lint --strict
58
+ ```
59
+
60
+ This reports schema and inheritance errors, missing typed prompt include files, and raw append-prompt strings that look like file paths.
61
+
62
+ 4. Inspect what the agent actually received.
63
+ With `profile_export: true` in the active settings, Outfitter writes the composed system prompt next to the profile (`generated-system-prompt.md` in a directory profile, `<id>.generated-system-prompt.md` beside a flat profile).
64
+ Diff it between iterations to confirm a change landed.
65
+
66
+ 5. Restart and test the behavior, then fold the settled changes back into the profile the experiment inherited from.
67
+
68
+ ## Iterating on a catalog profile in a git worktree
69
+
70
+ Shared profiles usually come from a catalog repository (see [Profile repositories](./profile-repository.md)) referenced as a `github:` source.
71
+ To change one:
72
+
73
+ 1. Clone the catalog, or add a worktree to an existing clone so the iteration branch stays isolated:
74
+
75
+ ```sh
76
+ cd ~/repos/acme/profile-catalog/main
77
+ git worktree add ../worktrees/feat/sharper-review-prompts -b feat/sharper-review-prompts
78
+ ```
79
+
80
+ 2. Point a machine-private profile source at the worktree in `.outfitter/local/settings.yml` (or `~/.outfitter/settings.yml`).
81
+ Local `path:` sources take the same layout as the catalog:
82
+
83
+ ```yaml
84
+ # .outfitter/local/settings.yml
85
+ profile_sources:
86
+ - path: ~/repos/acme/profile-catalog/worktrees/feat/sharper-review-prompts/profiles
87
+ ```
88
+
89
+ 3. Iterate with the loop above: edit in the worktree, `outfitter profile lint --strict`, relaunch, inspect the prompt export.
90
+
91
+ 4. Commit in the worktree, push, and open a pull request against the catalog.
92
+ After it merges, remove the local `path:` override, run `outfitter sync` to refresh the cached catalog, and remove the worktree.
93
+
94
+ Because the override lives in project-local settings, teammates and CI keep resolving the published catalog while you iterate.
95
+
96
+ ## Improving your own profile (for Outfitter-managed agents)
97
+
98
+ If you are an agent launched by Outfitter, your instructions, tools, skills, and extensions came from a profile, and you can improve that profile the same way you improve code — but the change only takes effect for future sessions, never the current one.
99
+
100
+ 1. Identify your active profile.
101
+ The launch header and `outfitter profile list` show profile ids; your composite profile directory contains `outfitter/profile.json` with the id, label, and merged controls you were launched with.
102
+ 2. Find the editable source for that profile with the scope table above.
103
+ If the profile comes from a remote catalog, do not edit the cache — use the worktree flow above, or create a local profile that `inherits` from it and layer the improvement on top.
104
+ 3. Make the smallest change that captures the improvement: a new `append_system_prompt` entry for a behavior correction, a `skills` entry for a reusable procedure, or a control override (model, thinking level, environment) for launch mechanics.
105
+ 4. Validate with `outfitter profile lint --strict`, and review the `profile_export` prompt output when prompt text changed.
106
+ 5. Tell the user what you changed and why, and that the change applies when they restart `outfitter` (or launch `outfitter run --profile <id>`).
107
+ You cannot reload your own profile mid-session.
108
+
109
+ Prefer durable, reviewable improvements: put team-relevant changes in the project or catalog profile through a pull request, and keep personal or experimental changes in user or project-local scope.
@@ -0,0 +1,111 @@
1
+ # Profile repositories
2
+
3
+ A profile repository (also called a profile catalog) is a git repository that publishes Outfitter profiles so a team or organization can share them. You can bootstrap a machine or project from one, or add one as an ongoing profile source that Outfitter keeps synchronized.
4
+
5
+ ```bash
6
+ outfitter setup https://github.com/my_account/outfitter_config
7
+ ```
8
+
9
+ ## Authoring a catalog repository
10
+
11
+ A setup repository usually contains either root-level Outfitter files:
12
+
13
+ ```text
14
+ outfitter_config/
15
+ settings.yml
16
+ profiles/
17
+ engineering-default/profile.yml
18
+ ```
19
+
20
+ or a `.outfitter/` folder:
21
+
22
+ ```text
23
+ outfitter_config/
24
+ .outfitter/
25
+ settings.yml
26
+ profiles/
27
+ engineering-default/profile.yml
28
+ deepwork/jobs/
29
+ ```
30
+
31
+ Inside the profiles directory, both profile layouts work:
32
+
33
+ - **Flat profiles** — each `*.yml` or `*.yaml` file directly under the profiles directory is one profile. Best for catalogs where profiles are mostly YAML (controls, prompts inline). Easy to scan, diff, and review.
34
+ - **Directory profiles** — one folder per profile with a required `profile.yml`, plus bundled resources such as `prompts/`, `skills/`, `extensions/`, and `deepwork/jobs/` that travel with the profile.
35
+
36
+ See [Profiles](./profiles.md) for the full layout reference, inheritance, and prompt-include rules. A catalog can also publish a shared base profile marked `template: true` that role profiles inherit from without the base itself appearing as a launchable choice.
37
+
38
+ ## Consuming a catalog as a profile source
39
+
40
+ Add the repository to `profile_sources` in your user (`~/.outfitter/settings.yml`) or project (`.outfitter/settings.yml`) settings:
41
+
42
+ ```yaml
43
+ profile_sources:
44
+ - github: my-org/outfitter-catalog # owner/repo shorthand
45
+ ref: v1.2.0 # optional: pin a tag, branch, or commit
46
+ path: profiles # optional: subdirectory inside the repo
47
+ only: # optional: allowlist of profile ids
48
+ - engineer
49
+ - platform-operator
50
+ - uri: git+https://git.example.com/team/catalog.git # any git URI
51
+ except: # optional: blocklist of profile ids
52
+ - experimental
53
+ ```
54
+
55
+ Each source entry is one of:
56
+
57
+ - `path:` — a local directory (no `ref`; read live from disk).
58
+ - `github:` — an `owner/repo` GitHub shorthand.
59
+ - `uri:` — any git-cloneable URI, for non-GitHub hosts.
60
+
61
+ Remote entries (`github`/`uri`) additionally accept:
62
+
63
+ - `ref:` — a tag, branch, or commit to pin. With a `ref`, `outfitter sync` fetches and checks out exactly that ref. Without one, sync fast-forwards the repository's default branch, so you always track the catalog's latest state.
64
+ - `path:` — a subdirectory inside the repository that contains the profiles.
65
+ - `only:` / `except:` — filter which profile ids from the source are exposed. `only` is an allowlist; `except` is a blocklist.
66
+
67
+ ## Remote settings
68
+
69
+ Beyond profiles, a repository can supply a shared settings file that Outfitter layers below your local settings:
70
+
71
+ ```yaml
72
+ # ~/.outfitter/settings.yml
73
+ remote_settings:
74
+ - github: my-org/outfitter-catalog
75
+ path: settings.yml # required: file path inside the repo
76
+ ref: v1.2.0 # optional pin
77
+ ```
78
+
79
+ Remote settings are cached locally and merged at lower precedence than your project and user settings, so anything you set locally wins. This is how an organization distributes shared `profile_sources` and defaults without controlling each user's machine.
80
+
81
+ ## Syncing and updating
82
+
83
+ `outfitter sync` synchronizes every remote source into the local cache under `~/.outfitter/cache/`:
84
+
85
+ 1. Remote settings repositories are cloned or updated first, then reloaded.
86
+ 2. Remote profile sources (including any added by remote settings) are cloned or updated.
87
+ 3. Each synced profile source is validated; sync reports `updated`, `unchanged`, `skipped`, or `failed` per source.
88
+
89
+ Run `outfitter sync` after changing remote settings or profile sources, and periodically to pick up catalog updates. Pinned (`ref:`) sources stay on their pinned ref until you change it; unpinned sources fast-forward to the latest default branch on every sync.
90
+
91
+ ## Private repositories
92
+
93
+ Private GitHub catalogs are an enterprise feature. When sync detects a private GitHub repository, it asks for confirmation before use and records the decision via the `enterprise.private_profile_catalogs` setting in `~/.outfitter/settings.yml`. Review the Outfitter Enterprise license or your enterprise agreement before enabling private catalogs. Non-GitHub `uri:` sources use whatever git credentials your environment already has; credentials embedded in URIs are redacted from sync output.
94
+
95
+ ## Trust and review
96
+
97
+ Adding a catalog source means trusting its authors with your agent runtime. Profiles from a catalog can:
98
+
99
+ - **Inject extensions** into your agent launch (`controls.extensions`). Extensions are code that runs inside the agent process with full access to your system — files, network, and shell.
100
+ - **Add arbitrary CLI arguments** (`controls.args`) to the launched agent, which can change permission modes or other agent behavior.
101
+ - **Set environment variables** (`controls.environment`) for the agent process.
102
+ - **Shape prompts, skills, subagents, and DeepWork jobs** — steering what the agent does with the access it already has.
103
+
104
+ Before adding a source, review it:
105
+
106
+ 1. Read every profile's `controls` — especially `extensions`, `args`, and `environment` — and any extension code the repository ships.
107
+ 2. Check `remote_settings` targets: a settings file can add further profile sources you did not review.
108
+ 3. Confirm the repository's ownership and that its maintainers are who you expect.
109
+ 4. Prefer `only:` filters so you expose just the profiles you reviewed.
110
+
111
+ For organization catalogs, pin a `ref:` (a tag or commit) rather than tracking the default branch. A pinned ref makes updates an explicit, reviewable action — bump the ref after reviewing the diff — instead of silently pulling whatever the catalog publishes next. Unpinned sources are convenient for catalogs you maintain yourself, but they mean `outfitter sync` executes-by-configuration whatever landed upstream.
@@ -0,0 +1,183 @@
1
+ # Profiles
2
+
3
+ Profiles define the accoutrements that shape an Outfitter-managed agent launch.
4
+
5
+ A profile can compose:
6
+
7
+ - context and prompts
8
+ - model and provider settings
9
+ - Pi extensions
10
+ - skills
11
+ - subagents
12
+ - DeepWork workflows
13
+ - agent-specific CLI flags and environment variables
14
+
15
+ Profiles can be local to a user or project, inherited from other profiles, or loaded from a shared profile repository. See [Profile repositories](./profile-repository.md) for shared setup sources.
16
+
17
+ ## Profile layouts
18
+
19
+ Outfitter supports two profile layouts inside any configured `profile_sources` directory.
20
+
21
+ ### Flat profile layout
22
+
23
+ Use the flat layout for small profile catalogs where each profile is mostly YAML and does not need its own resource folder. Each `*.yml` or `*.yaml` file directly under the profile source is a profile. If the file omits `id`, Outfitter uses the filename stem as the profile id.
24
+
25
+ ```text
26
+ ~/.outfitter/profiles/
27
+ founder.yml
28
+ engineer.yml
29
+ data-analyst.yaml
30
+ ```
31
+
32
+ ```yaml
33
+ # ~/.outfitter/profiles/founder.yml
34
+ label: Founder
35
+ description: Founder-operator defaults for product, engineering, research, and prose.
36
+ controls:
37
+ append_system_prompt: |
38
+ Think like a founder-operator: connect product judgment, implementation, and evidence.
39
+ ```
40
+
41
+ Flat profiles are easy to scan, diff, and copy between setup repositories. Generated Pi prompt exports for flat profiles are written beside the flat file as `<profile-id>.generated-system-prompt.md` when `profile_export` is enabled.
42
+
43
+ ### Directory profile layout
44
+
45
+ The original layout is one folder per profile with a required `profile.yml`. Use it when a profile owns prompts, skills, extensions, DeepWork jobs, or CLI-specific files that should travel with that profile.
46
+
47
+ ```text
48
+ ~/.outfitter/profiles/
49
+ home-default/
50
+ profile.yml
51
+ prompts/
52
+ system.md
53
+ skills/
54
+ extensions/
55
+ deepwork/
56
+ jobs/
57
+ cli_specific/
58
+ pi/
59
+ ```
60
+
61
+ ```yaml
62
+ # ~/.outfitter/profiles/home-default/profile.yml
63
+ id: home-default
64
+ label: Home Default
65
+ controls:
66
+ system_prompt: ./prompts/system.md
67
+ skills:
68
+ - ./skills/review
69
+ ```
70
+
71
+ Directory profiles keep bundled resources close to the profile that references them. Generated Pi prompt exports for directory profiles are written as `generated-system-prompt.md` inside the profile directory when `profile_export` is enabled.
72
+
73
+ ## Home and project example
74
+
75
+ A home profile SHOULD hold reusable defaults for one developer.
76
+ A project profile SHOULD live with the repository and add only the behavior that project needs.
77
+ The comments below name the files; each `---` starts a separate YAML document in the same example block.
78
+
79
+ ```yaml
80
+ # ~/.outfitter/settings.yml
81
+ default_profile: home-default
82
+ default_agent: pi
83
+ profile_sources:
84
+ - path: ./profiles
85
+
86
+ ---
87
+ # ~/.outfitter/profiles/home-default.yml
88
+ id: home-default
89
+ label: Home Default
90
+ description: Reusable personal defaults for Outfitter-managed Pi runs.
91
+ controls:
92
+ provider: openai-codex
93
+ model: gpt-5.5
94
+ thinking: high
95
+ append_system_prompt:
96
+ - |
97
+ Use concise, evidence-backed engineering prose.
98
+ Prefer small, reviewable changes.
99
+ Keep durable decisions in repo files.
100
+ - file: prompts/personal-policy.md
101
+ - repo_file: docs/mission.md
102
+
103
+ ---
104
+ # ~/repos/acme/example/.outfitter/settings.yml
105
+ default_profile: acme-example
106
+ profile_export: true
107
+ profile_sources:
108
+ # Relative to this settings.yml; exposes ~/.outfitter/profiles to the project.
109
+ - path: ../../../../.outfitter/profiles
110
+ only:
111
+ - home-default
112
+ - path: ./profiles
113
+
114
+ ---
115
+ # ~/repos/acme/example/.outfitter/profiles/acme-example/profile.yml
116
+ id: acme-example
117
+ label: Acme Example
118
+ description: Checked-in project profile for ~/repos/acme/example.
119
+ inherits:
120
+ - home-default
121
+ controls:
122
+ thinking: xhigh
123
+ append_system_prompt:
124
+ - |
125
+ You are working in ~/repos/acme/example.
126
+ Honor the project test contract before calling work complete.
127
+ Prefer repository-local conventions over personal defaults.
128
+ - file: .outfitter/prompts/review-policy.md
129
+ environment:
130
+ ACME_PROJECT: example
131
+ ```
132
+
133
+ `home-default` is the home-folder profile: it supplies personal defaults that can work across repositories.
134
+ `acme-example` is the project profile: it inherits those defaults, then overrides the thinking level and adds project-specific prompt and environment settings.
135
+ When a project `settings.yml` declares `profile_sources`, it SHOULD include any home profile source that project profiles inherit from.
136
+ Because `append_system_prompt` composes instead of replacing, the higher-precedence project prompt is passed first and the inherited home prompt follows.
137
+ Typed prompt includes read `{ file: string }` entries before launch and pass the file contents as repeated append-prompt text. Raw strings remain literal prompt text; if a raw string looks like a whole file path, Outfitter warns so the profile can be migrated to `{ file: ... }`.
138
+
139
+ ### Append prompt file includes
140
+
141
+ `append_system_prompt` accepts a literal string, a multiline string, `{ file: string }`, `{ repo_file: string }`, or an ordered list mixing those entry types. Outfitter does not support `{ text: ... }`; use raw YAML strings for inline prompt text, `{ file: ... }` for maintained profile/catalog files, and `{ repo_file: ... }` for files that should come from the active project.
142
+
143
+ Profile-owned file includes resolve from the source root of the profile layer that declares the entry, including inherited layers:
144
+
145
+ | Declaring profile location | Include root |
146
+ | ---------------------------------------------------------------------------------- | -------------------------- |
147
+ | `~/.outfitter/profiles/<id>/profile.yml` or `~/.outfitter/profiles/<id>.yml` | `~/.outfitter` |
148
+ | `<project>/.outfitter/profiles/<id>/profile.yml` | `<project>` |
149
+ | Catalog repo `outfitter/profiles/<id>/profile.yml` | Catalog repository root |
150
+ | Explicit `profile_sources[].path` without `.outfitter/` or `outfitter/` convention | The configured source path |
151
+
152
+ `repo_file:` resolves from the active project directory where Outfitter launches the agent. This lets a reusable catalog or home profile request project-local governance context such as `docs/mission.md` without copying those docs into the catalog.
153
+
154
+ Run `outfitter profile lint` to report schema and inheritance errors, missing typed include files, and raw string append-prompt entries that look like file paths. Add `--strict` to exit non-zero for warnings, and `--json` for machine-readable diagnostics.
155
+
156
+ With `profile_export: true`, the selected project directory profile can write `generated-system-prompt.md` beside `profile.yml`.
157
+ For this example, the generated prompt fallback would show the composed prompt inputs like this:
158
+
159
+ ```text
160
+ <!-- Generated by Outfitter from Pi runtime ctx.getSystemPrompt(). Safe to review or git-ignore. Do not edit by hand. -->
161
+ # Generated Pi runtime system prompt
162
+
163
+ You are an expert coding assistant operating inside pi, a coding agent harness. You help users by reading files, executing commands, editing code, and writing new files.
164
+
165
+ Available tools:
166
+ - read: Read file contents
167
+ - bash: Execute bash commands (ls, grep, find, etc.)
168
+ - edit: Make precise file edits with exact text replacement, including multiple disjoint edits in one call
169
+
170
+ ....
171
+
172
+ ## append_system_prompt[0]
173
+
174
+ You are working in ~/repos/acme/example.
175
+ Honor the project test contract before calling work complete.
176
+ Prefer repository-local conventions over personal defaults.
177
+
178
+ ## append_system_prompt[1]
179
+
180
+ Use concise, evidence-backed engineering prose.
181
+ Prefer small, reviewable changes.
182
+ Keep durable decisions in repo files.
183
+ ```