@ai-outfitter/outfitter 0.3.0 → 0.4.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 (43) hide show
  1. package/README.md +13 -7
  2. package/dist/agents/AdapterProfileControls.d.ts +1 -0
  3. package/dist/agents/AdapterProfileControls.js +6 -0
  4. package/dist/agents/AdapterProfileControls.js.map +1 -1
  5. package/dist/agents/claude/ClaudeAdapter.js +2 -2
  6. package/dist/agents/claude/ClaudeAdapter.js.map +1 -1
  7. package/dist/agents/pi/PiAdapter.js +16 -12
  8. package/dist/agents/pi/PiAdapter.js.map +1 -1
  9. package/dist/cli/OutfitterCli.js +7 -2
  10. package/dist/cli/OutfitterCli.js.map +1 -1
  11. package/dist/cli/commands/RunCommand.js +4 -1
  12. package/dist/cli/commands/RunCommand.js.map +1 -1
  13. package/dist/cli/commands/SetupCommand.d.ts +15 -0
  14. package/dist/cli/commands/SetupCommand.js +355 -32
  15. package/dist/cli/commands/SetupCommand.js.map +1 -1
  16. package/dist/cli/commands/WelcomeCommand.d.ts +1 -0
  17. package/dist/cli/commands/WelcomeCommand.js +10 -7
  18. package/dist/cli/commands/WelcomeCommand.js.map +1 -1
  19. package/dist/cli/commands/profile/ListCommand.d.ts +2 -0
  20. package/dist/cli/commands/profile/ListCommand.js +9 -3
  21. package/dist/cli/commands/profile/ListCommand.js.map +1 -1
  22. package/dist/merge/ArrayMergePolicy.d.ts +2 -1
  23. package/dist/merge/ArrayMergePolicy.js +14 -11
  24. package/dist/merge/ArrayMergePolicy.js.map +1 -1
  25. package/dist/merge/SettingsValueMerger.js +27 -2
  26. package/dist/merge/SettingsValueMerger.js.map +1 -1
  27. package/dist/profiles/Profile.d.ts +3 -1
  28. package/dist/profiles/Profile.js.map +1 -1
  29. package/dist/profiles/ProfileLoader.js +15 -2
  30. package/dist/profiles/ProfileLoader.js.map +1 -1
  31. package/dist/profiles/ProfileMerger.d.ts +0 -1
  32. package/dist/profiles/ProfileMerger.js +20 -9
  33. package/dist/profiles/ProfileMerger.js.map +1 -1
  34. package/dist/schemas/profile.schema.json +16 -4
  35. package/doc/architecture.md +28 -7
  36. package/package.json +1 -1
  37. package/requirements/OFTR-001-project-foundation.md +1 -1
  38. package/requirements/OFTR-003-profiles.md +13 -5
  39. package/requirements/OFTR-004-sync-and-setup.md +11 -1
  40. package/requirements/OFTR-006-agent-adapters.md +2 -0
  41. package/requirements/OFTR-009-release-publishing.md +11 -2
  42. package/requirements/OFTR-010-onboarding-welcome.md +1 -0
  43. package/src/schemas/profile.schema.json +16 -4
@@ -12,7 +12,7 @@ Outfitter resolves profile definitions across settings scopes, explicit sources,
12
12
  1. A profile MUST be represented by a folder with a required `profile.yml` file.
13
13
  2. Outfitter MUST provide a JSON Schema for `profile.yml`.
14
14
  3. Outfitter MUST validate every loaded `profile.yml` file against the profile JSON Schema.
15
- 4. A profile folder MAY contain conventional resource folders such as `skills`, `prompts`, and `extensions`.
15
+ 4. A profile folder MAY contain conventional resource folders such as `skills`, `prompts`, `extensions`, and `deepwork/jobs`.
16
16
  5. A profile folder MAY contain `cli_specific/<cli-name>/` folders for agent-specific resources and overrides.
17
17
 
18
18
  ### OFTR-003.2: Profile Identity
@@ -37,11 +37,11 @@ Outfitter resolves profile definitions across settings scopes, explicit sources,
37
37
  4. Outfitter MUST detect inheritance cycles and report them as validation errors.
38
38
  5. Outfitter MUST preserve inherited profile order when building the profile stack.
39
39
 
40
- ### OFTR-003.5: Implicit Default Profile
40
+ ### OFTR-003.5: Default Profile Selection
41
41
 
42
- 1. The default profile from user settings MUST be included as an implicit bottom profile when running any explicit profile.
43
- 2. Profiles inherited by the implicit default profile MUST be included recursively below the default profile according to the inheritance rules.
44
- 3. Outfitter MUST avoid duplicating a profile in the resolved stack when the same profile appears explicitly and implicitly.
42
+ 1. Outfitter MUST use the configured `default_profile` only when no explicit profile is selected.
43
+ 2. When an explicit profile is selected, Outfitter MUST resolve only that profile and its declared `inherits` chain.
44
+ 3. Outfitter MUST NOT include the configured `default_profile` as an implicit base layer for an explicit profile.
45
45
 
46
46
  ### OFTR-003.6: Profile Merging
47
47
 
@@ -49,3 +49,11 @@ Outfitter resolves profile definitions across settings scopes, explicit sources,
49
49
  2. YAML object values SHOULD be merged with `defu` or an equivalent controlled deep-merge utility.
50
50
  3. Array merge behavior MUST be documented per profile key before that key is treated as stable.
51
51
  4. CLI-specific profile content MUST take precedence over generic controls when both generate the same agent-specific artifact.
52
+ 5. Outfitter MUST compose `append_system_prompt` values from multiple resolved profile layers into repeated agent append-prompt inputs without requiring profiles to use raw CLI `args` for prompt composition.
53
+
54
+ ### OFTR-003.7: Template Profiles
55
+
56
+ 1. A profile MAY set top-level `template: true` to indicate it is intended for inheritance by runnable profiles rather than direct launch.
57
+ 2. Outfitter MUST allow template profiles to contribute controls through `inherits` without marking the inheriting profile as a template.
58
+ 3. Outfitter MUST reject direct launches of template profiles, including launches selected through `default_profile`.
59
+ 4. `outfitter profile list` SHOULD hide template profiles by default and MUST expose them when the user explicitly requests all profiles.
@@ -14,13 +14,23 @@ Outfitter provides setup and maintenance commands that create initial configurat
14
14
  4. The `setup` command MUST validate discovered settings files.
15
15
  5. The `setup` command MUST run sync behavior for URI-based profile sources.
16
16
  6. The `setup` command SHOULD avoid overwriting existing user files unless a future explicit force option authorizes replacement.
17
- 7. When provided a setup source URI, the `setup` command MUST use that source repository's Outfitter `settings.yml` and profiles as the initial user setup starting point.
17
+ 7. When provided a setup source URI, the `setup` command MUST use that source repository's Outfitter `settings.yml` and profiles as the initial setup starting point for the selected import target.
18
18
  8. The interactive `setup` command MUST require interactive TTY streams on both stdin and stdout before prompting.
19
19
  9. The interactive `setup` command MUST synchronize remote profile sources before any setup profile choice prompt.
20
20
  10. Initial interactive first-run setup MUST NOT ask a separate default-profile choice before welcome onboarding; the welcome role selection determines the generated local default profile.
21
21
  11. When the interactive `setup` command presents setup profile choices outside the initial welcome handoff, it MUST present discovered profile IDs as default-profile choices and preserve available display labels in the prompt choices.
22
22
  12. When the interactive `setup` command presents setup profile choices outside the initial welcome handoff, it MUST validate the selected default profile ID before writing it to `settings.yml`.
23
23
  13. After the interactive `setup` command writes a selected default profile, any newly-created fallback default profile file MUST correspond to the final selected default profile.
24
+ 14. When interactive `setup <source>` presents setup profile choices, it MUST limit those choices to profiles from the passed setup source and MUST NOT include default profile sources from pre-existing effective settings.
25
+ 15. When interactive `setup <source>` presents setup profile choices and the setup source declares an explicit `default_profile` that exists among those source choices, it MUST make that profile the prompt default and first displayed choice; pre-existing user defaults MUST NOT override that source default for the setup-source prompt.
26
+ 16. Interactive `setup <source>` MUST NOT present a default-profile choice before the setup-source welcome/import explanation.
27
+ 17. Interactive `setup <source>` MUST explain which setup source is being imported and MUST let the user choose whether to install profiles into user home or the current project before writing setup-source profiles/settings.
28
+ 18. Interactive `setup <source>` MUST present exactly one setup-source profile/default choice after the import target choice when setup-source profiles are available.
29
+ 19. When the interactive setup-source import target is user home, setup MUST copy missing source profiles into `~/.outfitter/profiles`, write the selected default profile to `~/.outfitter/settings.yml`, and preserve non-overwrite copy behavior.
30
+ 20. When the interactive setup-source import target is the current project, setup MUST copy missing source profiles into `<project>/.outfitter/profiles`, write the selected default profile to `<project>/.outfitter/settings.yml`, ensure that project settings expose `./profiles`, and preserve any existing user default profile.
31
+ 21. After interactive `setup <source>` imports the selected default profile, setup MUST offer to start Outfitter with that selected profile.
32
+ 22. When the user declines the post-import start offer, setup MUST exit without launching and show both `outfitter` for starting the configured default profile and `outfitter --profile <selected-profile>` for starting it explicitly.
33
+ 23. Non-interactive `setup <source>` completion MUST NOT launch Outfitter and MUST show the same default and explicit start command guidance.
24
34
 
25
35
  ### OFTR-004.2: Sync Command
26
36
 
@@ -37,6 +37,8 @@ Pi is the default and primary supported adapter; Claude Code is also supported t
37
37
  9. The pi adapter SHOULD support pi model, provider, and thinking controls where native pi flags exist.
38
38
  10. The pi adapter MUST merge `.mcp.json` files from contributing `cli_specific/pi/` profile folders into the composite profile, adding unique array entries by identity while keeping the last entry for duplicate identities.
39
39
  11. The pi adapter MUST make native Pi `models.json` available inside the composite profile so custom providers and model definitions are visible before Pi resolves `--provider` and `--model` flags.
40
+ 12. The pi adapter MUST expose valid Agent Skills from contributing profile `skills/` folders as `--skill` arguments, and MAY also expose Pi-specific skills from `cli_specific/pi/skills/`.
41
+ 13. The pi adapter MUST expose DeepWork jobs from contributing profile `deepwork/jobs/` folders through `DEEPWORK_ADDITIONAL_JOBS_FOLDERS`, and MAY also expose Pi-specific jobs from `cli_specific/pi/deepwork/jobs/`.
40
42
 
41
43
  ### OFTR-006.4: Pi Startup Boundary
42
44
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- Outfitter release publishing prepares package metadata from a GitHub release tag and publishes the `@ai-outfitter/outfitter` npm package through GitHub Actions.
5
+ Outfitter release publishing prepares package metadata from Conventional Commit release PRs and GitHub release tags, then publishes the `@ai-outfitter/outfitter` npm package through GitHub Actions using npm trusted publishing / OIDC.
6
6
 
7
7
  ## Requirements
8
8
 
@@ -22,4 +22,13 @@ Outfitter release publishing prepares package metadata from a GitHub release tag
22
22
  3. The npm release workflow MUST synchronize package metadata from the GitHub release tag before publishing.
23
23
  4. The npm release workflow MUST run CI checks before publishing.
24
24
  5. The npm release workflow MUST build the package before publishing.
25
- 6. The npm release workflow MUST publish the public `@ai-outfitter/outfitter` package to the npm registry using an npm token secret.
25
+ 6. The npm release workflow MUST request `id-token: write`, use the `npm-publish` GitHub environment, and publish the public `@ai-outfitter/outfitter` package to the npm registry with provenance through npm trusted publishing / OIDC rather than `NPM_TOKEN` or `NODE_AUTH_TOKEN`.
26
+
27
+ ### OFTR-009.3: Conventional Commit Release Automation
28
+
29
+ 1. The Release Please workflow MUST run on pushes to `main`.
30
+ 2. The Release Please workflow MUST use `googleapis/release-please-action@v4` with the upstream example-style token input from `secrets.RELEASE_PLEASE_TOKEN`.
31
+ 3. The Release Please workflow MUST use `release-type: node` for the root `@ai-outfitter/outfitter` npm package.
32
+ 4. The Release Please workflow MUST derive version bumps from Conventional Commits.
33
+ 5. The Release Please workflow MUST update npm package metadata and changelog through a release PR before publishing.
34
+ 6. The Release Please workflow MUST use GitHub repository write auth capable of triggering release PR CI and the release-published npm workflow, not the default `GITHUB_TOKEN`.
@@ -9,6 +9,7 @@ Outfitter welcome onboarding guides a new user through the minimum choices neede
9
9
  ### OFTR-010.1: Welcome Text
10
10
 
11
11
  1. Welcome text MUST be shown to the user explaining what Outfitter and Pi are.
12
+ 2. Welcome text MUST use Outfitter-branded ASCII/text.
12
13
 
13
14
  > Pi is a heavily customizable coding harness.
14
15
  > The next few questions will configure Outfitter to best suit your workflow.
@@ -9,6 +9,7 @@
9
9
  "pattern": "^[a-z0-9][a-z0-9._-]*[a-z0-9]$|^[a-z0-9]$"
10
10
  },
11
11
  "label": { "type": "string" },
12
+ "template": { "type": "boolean" },
12
13
  "inherits": {
13
14
  "type": "array",
14
15
  "items": {
@@ -43,7 +44,7 @@
43
44
  },
44
45
  "prompt_template": { "type": "string" },
45
46
  "system_prompt": { "type": "string" },
46
- "append_system_prompt": { "type": "string" },
47
+ "append_system_prompt": { "$ref": "#/$defs/appendSystemPrompt" },
47
48
  "environment": {
48
49
  "type": "object",
49
50
  "additionalProperties": { "type": "string" }
@@ -69,7 +70,7 @@
69
70
  },
70
71
  "prompt_template": { "type": "string" },
71
72
  "system_prompt": { "type": "string" },
72
- "append_system_prompt": { "type": "string" },
73
+ "append_system_prompt": { "$ref": "#/$defs/appendSystemPrompt" },
73
74
  "allow_external_deepwork_jobs": { "type": "boolean" },
74
75
  "environment": {
75
76
  "type": "object",
@@ -99,7 +100,7 @@
99
100
  },
100
101
  "prompt_template": { "type": "string" },
101
102
  "system_prompt": { "type": "string" },
102
- "append_system_prompt": { "type": "string" },
103
+ "append_system_prompt": { "$ref": "#/$defs/appendSystemPrompt" },
103
104
  "environment": {
104
105
  "type": "object",
105
106
  "additionalProperties": { "type": "string" }
@@ -111,5 +112,16 @@
111
112
  "additionalProperties": true
112
113
  }
113
114
  },
114
- "additionalProperties": true
115
+ "additionalProperties": true,
116
+ "$defs": {
117
+ "appendSystemPrompt": {
118
+ "oneOf": [
119
+ { "type": "string" },
120
+ {
121
+ "type": "array",
122
+ "items": { "type": "string" }
123
+ }
124
+ ]
125
+ }
126
+ }
115
127
  }