@ai-outfitter/outfitter 0.7.2 → 0.8.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 (61) hide show
  1. package/README.md +4 -2
  2. package/code/pi-extension/src/outfitter-extension.js +720 -0
  3. package/dist/agents/AgentAdapter.d.ts +2 -0
  4. package/dist/agents/AgentLaunch.js +5 -0
  5. package/dist/agents/AgentLaunch.js.map +1 -1
  6. package/dist/agents/OutfitterDocs.d.ts +2 -0
  7. package/dist/agents/OutfitterDocs.js +38 -0
  8. package/dist/agents/OutfitterDocs.js.map +1 -0
  9. package/dist/agents/pi/PiAdapter.js +15 -14
  10. package/dist/agents/pi/PiAdapter.js.map +1 -1
  11. package/dist/agents/pi/PiSkillSources.d.ts +8 -0
  12. package/dist/agents/pi/PiSkillSources.js +69 -0
  13. package/dist/agents/pi/PiSkillSources.js.map +1 -0
  14. package/dist/cli/OutfitterCli.js +7 -2
  15. package/dist/cli/OutfitterCli.js.map +1 -1
  16. package/dist/cli/commands/PiLoginLaunch.js +25 -728
  17. package/dist/cli/commands/PiLoginLaunch.js.map +1 -1
  18. package/dist/cli/commands/RunCommand.d.ts +4 -17
  19. package/dist/cli/commands/RunCommand.js +10 -146
  20. package/dist/cli/commands/RunCommand.js.map +1 -1
  21. package/dist/cli/commands/SetupCommand.d.ts +4 -63
  22. package/dist/cli/commands/SetupCommand.js +13 -673
  23. package/dist/cli/commands/SetupCommand.js.map +1 -1
  24. package/dist/cli/commands/run/RunLaunchSummary.d.ts +2 -0
  25. package/dist/cli/commands/run/RunLaunchSummary.js +35 -0
  26. package/dist/cli/commands/run/RunLaunchSummary.js.map +1 -0
  27. package/dist/cli/commands/run/RunProfileResolution.d.ts +37 -0
  28. package/dist/cli/commands/run/RunProfileResolution.js +115 -0
  29. package/dist/cli/commands/run/RunProfileResolution.js.map +1 -0
  30. package/dist/cli/commands/setup/SetupPrompts.d.ts +14 -0
  31. package/dist/cli/commands/setup/SetupPrompts.js +296 -0
  32. package/dist/cli/commands/setup/SetupPrompts.js.map +1 -0
  33. package/dist/cli/commands/setup/SetupSourceImport.d.ts +5 -0
  34. package/dist/cli/commands/setup/SetupSourceImport.js +177 -0
  35. package/dist/cli/commands/setup/SetupSourceImport.js.map +1 -0
  36. package/dist/cli/commands/setup/SetupSourceLaunch.d.ts +4 -0
  37. package/dist/cli/commands/setup/SetupSourceLaunch.js +65 -0
  38. package/dist/cli/commands/setup/SetupSourceLaunch.js.map +1 -0
  39. package/dist/cli/commands/setup/SetupStarterSource.d.ts +21 -0
  40. package/dist/cli/commands/setup/SetupStarterSource.js +133 -0
  41. package/dist/cli/commands/setup/SetupStarterSource.js.map +1 -0
  42. package/dist/cli/commands/setup/SetupTypes.d.ts +91 -0
  43. package/dist/cli/commands/setup/SetupTypes.js +26 -0
  44. package/dist/cli/commands/setup/SetupTypes.js.map +1 -0
  45. package/doc/architecture/state_writeback_strategy.md +350 -0
  46. package/doc/documentation/README.md +21 -0
  47. package/doc/documentation/cli.md +74 -0
  48. package/doc/documentation/concepts.md +54 -0
  49. package/doc/documentation/first-time-cli-agent-users.md +137 -0
  50. package/doc/documentation/getting-started.md +49 -0
  51. package/doc/documentation/iterating-on-profiles.md +109 -0
  52. package/doc/documentation/profile-repository.md +111 -0
  53. package/doc/documentation/profiles.md +183 -0
  54. package/doc/documentation/state.md +204 -0
  55. package/doc/documentation/support-matrix.md +46 -0
  56. package/doc/documentation/switching-to-outfitter.md +130 -0
  57. package/doc/documentation/usecases/engineering.md +114 -0
  58. package/doc/documentation/usecases/organization-profile-catalog.md +140 -0
  59. package/doc/documentation/usecases/persona-reviews.md +173 -0
  60. package/doc/philosophy.md +25 -0
  61. package/package.json +3 -2
@@ -0,0 +1,74 @@
1
+ # CLI reference
2
+
3
+ Global options:
4
+
5
+ | Option | Description |
6
+ | --------------- | ---------------------------- |
7
+ | `-V, --version` | Print the Outfitter version. |
8
+ | `-h, --help` | Show help for a command. |
9
+
10
+ ## `outfitter run [args...]`
11
+
12
+ Assemble a composite profile and launch the selected agent CLI. `run` is the default command, so plain `outfitter` and `outfitter run` are equivalent.
13
+
14
+ | Option | Description |
15
+ | ------------------------- | -------------------------------------------------------------------------- |
16
+ | `-p, --profile <profile>` | Outfitter profile id to run. Defaults to the settings `default_profile`. |
17
+ | `--agent <agent>` | Agent adapter to launch: `pi` or `claude`. Defaults to `default_agent`. |
18
+ | `--strict` | Fail instead of warning when controls cannot be translated by the adapter. |
19
+
20
+ Any other arguments and unrecognized options are passed through to the launched agent CLI:
21
+
22
+ ```bash
23
+ outfitter run --profile engineer --agent claude
24
+ outfitter -p data_analyst -- --print "summarize this repo"
25
+ ```
26
+
27
+ On a first interactive launch with no `~/.outfitter/settings.yml`, `outfitter` starts Pi-native onboarding instead of a normal run.
28
+
29
+ ## `outfitter setup [source]`
30
+
31
+ Create initial Outfitter settings and a default profile. Setup launches Pi with the Outfitter onboarding extension and finishes profile selection inside the agent session (see [Getting started](./getting-started.md)).
32
+
33
+ | Argument | Description |
34
+ | ---------- | -------------------------------------------------------------------------------------------------------------- |
35
+ | `[source]` | Optional setup source: a local path or a git URL of a [profile repository](./profile-repository.md) to import. |
36
+
37
+ ## `outfitter sync`
38
+
39
+ Synchronize URI-backed profile and remote settings sources into the local cache (`~/.outfitter/cache/`). Takes no options. Reports a per-source status of `updated`, `unchanged`, `skipped`, or `failed`, and validates synced profile sources.
40
+
41
+ ## `outfitter profile`
42
+
43
+ List and manage Outfitter profiles.
44
+
45
+ ### `outfitter profile list`
46
+
47
+ List available Outfitter profiles.
48
+
49
+ | Option | Description |
50
+ | ------- | ----------------------------------------------------------------- |
51
+ | `--all` | Include template profiles that are intended only for inheritance. |
52
+
53
+ ### `outfitter profile create <name>`
54
+
55
+ Create a new Outfitter profile skeleton.
56
+
57
+ | Argument / option | Description |
58
+ | ----------------- | --------------------------------------------------------- |
59
+ | `<name>` | Filesystem-safe profile name. |
60
+ | `--scope <scope>` | Destination scope: `user`, `project`, or `project-local`. |
61
+ | `--path <path>` | Destination profile source directory. |
62
+
63
+ ### `outfitter profile lint`
64
+
65
+ Validate profiles, inheritance, and typed prompt includes.
66
+
67
+ | Option | Description |
68
+ | ---------- | ---------------------------------------- |
69
+ | `--strict` | Exit non-zero when warnings are present. |
70
+ | `--json` | Print diagnostics as JSON. |
71
+
72
+ ## `outfitter welcome`
73
+
74
+ Run Outfitter welcome onboarding prompts in the terminal. This is a legacy compatibility command: current onboarding runs natively inside Pi (via `outfitter setup` or the first-run `outfitter` launch), and `welcome` remains for environments that need the older terminal prompt flow. Requires an interactive TTY. Takes no options.
@@ -0,0 +1,54 @@
1
+ # Concepts
2
+
3
+ How an `outfitter` launch goes from configuration files to a running agent:
4
+
5
+ ```mermaid
6
+ flowchart LR
7
+ A[Settings] --> B[Profile sources]
8
+ B --> C[Profile stack]
9
+ C --> D[Composite profile]
10
+ D --> E[Adapter]
11
+ E --> F[Agent CLI]
12
+ ```
13
+
14
+ Settings tell Outfitter where profiles come from; profile sources supply profile definitions; the definitions for the selected profile form an ordered stack; the merged stack is written out as a composite profile; an adapter translates that composite profile into agent-specific files, flags, and environment variables; and the agent CLI launches with the result.
15
+
16
+ ## Profile
17
+
18
+ A profile is a named, reusable YAML definition of how an agent should be outfitted: model and provider, thinking level, system and append prompts, skills, extensions, subagents, DeepWork jobs, CLI arguments, and environment variables. Profiles can inherit from other profiles and can live as a flat `<id>.yml` file or a directory with a `profile.yml` plus bundled resources. See [Profiles](./profiles.md).
19
+
20
+ ## Composite profile
21
+
22
+ A composite profile is the temporary runtime configuration directory Outfitter assembles for one profile and one agent CLI run. It contains the generated files the agent needs, is created under the system temp directory, and is owned by Outfitter for the lifetime of the run — durable state is handled separately (see state persistence below).
23
+
24
+ ## Catalog / profile source
25
+
26
+ A profile source is any place profiles are loaded from: a local directory (`path:`), a GitHub repository (`github: owner/repo`), or a git URI (`uri:`). A shared repository of profiles is called a catalog (or profile repository). Remote sources are cached under `~/.outfitter/cache/` and updated with `outfitter sync`; they support `ref` pinning and `only`/`except` filters. See [Profile repositories](./profile-repository.md).
27
+
28
+ ## Settings scopes
29
+
30
+ Outfitter reads `settings.yml` from three local scopes — user (`~/.outfitter/settings.yml`), project (`<project>/.outfitter/settings.yml`), and project-local (`<project>/.outfitter/local/settings.yml`, for personal, uncommitted overrides) — plus cached remote settings supplied by `remote_settings` entries. Settings declare the default profile and agent, profile sources, and other launch behavior.
31
+
32
+ ## Controls
33
+
34
+ Controls are the generic, agent-neutral knobs a profile sets: `model`, `provider`, `thinking`, `system_prompt`, `append_system_prompt`, `skills`, `extensions`, `args`, `environment`, and more. Profiles can also nest adapter-specific overrides under `controls.pi` or `controls.claude` when one agent needs different values.
35
+
36
+ ## Adapters
37
+
38
+ An adapter translates generic controls into one agent CLI's native configuration — files, command-line flags, and environment variables. Pi is the primary and most complete adapter; a Claude Code adapter is supported with gaps. When an adapter cannot honor a control it warns to stderr, or fails when `--strict` is set. See the [adapter support matrix](./support-matrix.md) for per-adapter coverage.
39
+
40
+ ## State persistence
41
+
42
+ Agents write state during a run — auth, native settings, plugins, sessions. Each adapter declares the state paths it understands and how writes are handled (`symlink`, `discard`, `warn`, `error`, or `prompt`), so useful state survives future runs without Outfitter silently copying unknown files. See [State persistence](./state.md).
43
+
44
+ ## Layer precedence
45
+
46
+ When several layers define the same profile or setting, higher layers win:
47
+
48
+ 1. Project-local (`.outfitter/local/`)
49
+ 2. Project (`.outfitter/`)
50
+ 3. User (`~/.outfitter/`)
51
+ 4. Cached remote sources (in configured source order)
52
+ 5. Built-in defaults
53
+
54
+ For profiles, explicitly inherited profiles slot between cached remote sources and built-in defaults, in declared order.
@@ -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.