@ai-outfitter/outfitter 0.6.1 → 0.7.1

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 (93) hide show
  1. package/LICENSE.md +20 -50
  2. package/README.md +41 -280
  3. package/code/enterprise/LICENSE +35 -0
  4. package/code/enterprise/README.md +7 -0
  5. package/code/enterprise/cli/privateCatalogGate.cjs +134 -0
  6. package/code/enterprise/cli/privateCatalogSettings.cjs +59 -0
  7. package/code/enterprise/pi-extension/privateCatalogOnboarding.js +89 -0
  8. package/code/enterprise/private-catalog-boundary.json +9 -0
  9. package/code/enterprise/privateCatalog.js +24 -0
  10. package/code/enterprise/shared/privateCatalogPolicy.cjs +66 -0
  11. package/dist/agents/AdapterProfileControls.d.ts +2 -2
  12. package/dist/agents/AdapterProfileControls.js +8 -1
  13. package/dist/agents/AdapterProfileControls.js.map +1 -1
  14. package/dist/agents/AgentAdapter.d.ts +11 -0
  15. package/dist/agents/AgentLaunch.d.ts +6 -0
  16. package/dist/agents/AgentLaunch.js +89 -0
  17. package/dist/agents/AgentLaunch.js.map +1 -0
  18. package/dist/agents/claude/ClaudeAdapter.js +18 -3
  19. package/dist/agents/claude/ClaudeAdapter.js.map +1 -1
  20. package/dist/agents/pi/PiAdapter.js +162 -33
  21. package/dist/agents/pi/PiAdapter.js.map +1 -1
  22. package/dist/agents/pi/PiArgs.d.ts +2 -0
  23. package/dist/agents/pi/PiArgs.js +15 -0
  24. package/dist/agents/pi/PiArgs.js.map +1 -0
  25. package/dist/agents/pi/PiExtensionCache.d.ts +4 -0
  26. package/dist/agents/pi/PiExtensionCache.js +105 -0
  27. package/dist/agents/pi/PiExtensionCache.js.map +1 -0
  28. package/dist/cli/commands/PiLoginLaunch.d.ts +9 -2
  29. package/dist/cli/commands/PiLoginLaunch.js +817 -75
  30. package/dist/cli/commands/PiLoginLaunch.js.map +1 -1
  31. package/dist/cli/commands/RunCommand.d.ts +22 -3
  32. package/dist/cli/commands/RunCommand.js +104 -20
  33. package/dist/cli/commands/RunCommand.js.map +1 -1
  34. package/dist/cli/commands/SetupCommand.d.ts +19 -2
  35. package/dist/cli/commands/SetupCommand.js +281 -57
  36. package/dist/cli/commands/SetupCommand.js.map +1 -1
  37. package/dist/cli/commands/SyncCommand.d.ts +19 -1
  38. package/dist/cli/commands/SyncCommand.js +47 -6
  39. package/dist/cli/commands/SyncCommand.js.map +1 -1
  40. package/dist/cli/commands/WelcomeCommand.js +1 -1
  41. package/dist/cli/commands/WelcomeCommand.js.map +1 -1
  42. package/dist/cli/commands/assets/outfitter-ascii.txt +5 -0
  43. package/dist/cli/commands/profile/Command.d.ts +1 -0
  44. package/dist/cli/commands/profile/Command.js +3 -0
  45. package/dist/cli/commands/profile/Command.js.map +1 -1
  46. package/dist/cli/commands/profile/LintCommand.d.ts +19 -0
  47. package/dist/cli/commands/profile/LintCommand.js +123 -0
  48. package/dist/cli/commands/profile/LintCommand.js.map +1 -0
  49. package/dist/cli.js +8 -2
  50. package/dist/cli.js.map +1 -1
  51. package/dist/merge/ArrayMergePolicy.js.map +1 -1
  52. package/dist/merge/SettingsValueMerger.js.map +1 -1
  53. package/dist/profiles/Profile.d.ts +13 -1
  54. package/dist/profiles/Profile.js.map +1 -1
  55. package/dist/profiles/ProfileLoader.d.ts +4 -0
  56. package/dist/profiles/ProfileLoader.js +117 -17
  57. package/dist/profiles/ProfileLoader.js.map +1 -1
  58. package/dist/profiles/ProfileMerger.js +3 -0
  59. package/dist/profiles/ProfileMerger.js.map +1 -1
  60. package/dist/profiles/PromptIncludes.d.ts +32 -0
  61. package/dist/profiles/PromptIncludes.js +147 -0
  62. package/dist/profiles/PromptIncludes.js.map +1 -0
  63. package/dist/prompts/SystemPromptExport.d.ts +16 -0
  64. package/dist/prompts/SystemPromptExport.js +81 -0
  65. package/dist/prompts/SystemPromptExport.js.map +1 -0
  66. package/dist/schemas/profile.schema.json +37 -2
  67. package/dist/schemas/settings.schema.json +23 -0
  68. package/dist/settings/Settings.d.ts +9 -0
  69. package/dist/settings/Settings.js.map +1 -1
  70. package/dist/settings/SettingsLoader.js +5 -0
  71. package/dist/settings/SettingsLoader.js.map +1 -1
  72. package/dist/settings/SettingsMerger.js +11 -0
  73. package/dist/settings/SettingsMerger.js.map +1 -1
  74. package/package.json +7 -11
  75. package/src/schemas/profile.schema.json +37 -2
  76. package/src/schemas/settings.schema.json +23 -0
  77. package/doc/.deepreview +0 -30
  78. package/doc/architecture.md +0 -856
  79. package/doc/controllable-elements.md +0 -162
  80. package/doc/file_structure.md +0 -141
  81. package/doc/integration_test_system.md +0 -214
  82. package/doc/specs/validating_requirements_with_rules.md +0 -55
  83. package/doc/state_writeback_strategy.md +0 -342
  84. package/requirements/OFTR-001-project-foundation.md +0 -53
  85. package/requirements/OFTR-002-settings.md +0 -65
  86. package/requirements/OFTR-003-profiles.md +0 -60
  87. package/requirements/OFTR-004-sync-and-setup.md +0 -67
  88. package/requirements/OFTR-005-run-and-composite-profile.md +0 -60
  89. package/requirements/OFTR-006-agent-adapters.md +0 -66
  90. package/requirements/OFTR-007-controllable-elements.md +0 -32
  91. package/requirements/OFTR-008-requirements-governance.md +0 -42
  92. package/requirements/OFTR-009-release-publishing.md +0 -35
  93. package/requirements/OFTR-010-onboarding-welcome.md +0 -48
@@ -1,66 +0,0 @@
1
- # OFTR-006: Agent Adapters, Pi Support, and Claude Code Support
2
-
3
- ## Overview
4
-
5
- Agent adapters translate generic Outfitter profile controls into native configuration files, environment variables, and command-line arguments for specific agent CLIs.
6
- Pi is the default and primary supported adapter; Claude Code is also supported through a dedicated adapter.
7
-
8
- ## Requirements
9
-
10
- ### OFTR-006.1: Adapter Boundary
11
-
12
- 1. Outfitter MUST define an agent adapter abstraction for CLI-specific composite profile assembly and launch command generation.
13
- 2. Each adapter MUST expose an identifier for the agent CLI it supports.
14
- 3. Each adapter MUST report which controllable elements it supports.
15
- 4. Each adapter MUST return warnings for profile controls it cannot translate.
16
- 5. Outfitter SHOULD keep generic profile resolution independent from adapter-specific file generation.
17
-
18
- ### OFTR-006.2: Supported Adapter Availability
19
-
20
- 1. Outfitter MUST support the `pi` agent CLI on day one.
21
- 2. Outfitter MAY document other agent CLIs as roadmap adapters before implementing them.
22
- 3. Non-pi adapters MUST NOT be presented as supported until their adapter implementation and tests exist.
23
- 4. When generic Outfitter terminology conflicts with pi terminology, the pi adapter SHOULD prefer pi naming for generated pi artifacts and user-facing pi diagnostics.
24
- 5. Outfitter MUST keep `pi` as the default adapter when no adapter is selected explicitly or through settings.
25
- 6. Outfitter MUST support Claude Code through a `claude` adapter once implementation and tests are present.
26
-
27
- ### OFTR-006.3: Pi Launch Controls
28
-
29
- 1. The pi adapter MUST use `PI_CODING_AGENT_DIR` as the primary profile-scoped pi configuration boundary.
30
- 2. The pi adapter MUST support profile-controlled environment variables.
31
- 3. The pi adapter MUST support profile-controlled pi CLI arguments.
32
- 4. The pi adapter SHOULD support `PI_CODING_AGENT_SESSION_DIR` or `--session-dir` for session location control.
33
- 5. The pi adapter SHOULD support `--extension` or `-e` for explicit extension injection.
34
- 6. The pi adapter SHOULD support `--skill` for explicit skill injection.
35
- 7. The pi adapter SHOULD support `--prompt-template` for prompt template injection.
36
- 8. The pi adapter SHOULD support `--system-prompt` and `--append-system-prompt` for prompt control.
37
- 9. The pi adapter SHOULD support pi model, provider, and thinking controls where native pi flags exist.
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
- 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/`.
42
-
43
- ### OFTR-006.4: Pi Startup Boundary
44
-
45
- 1. Outfitter MUST NOT rely on pi extensions to choose the initial pi configuration directory.
46
- 2. Outfitter MUST choose pi configuration paths before launching pi.
47
- 3. Outfitter MAY use explicit bootstrap extensions for behavior that can run after pi has discovered its initial configuration directory.
48
- 4. Outfitter MUST document warnings when a requested pi control cannot be applied because pi startup order makes it impossible.
49
-
50
- ### OFTR-006.5: Claude Code Launch Controls
51
-
52
- 1. The Claude Code adapter MUST use `CLAUDE_CONFIG_DIR` as the primary profile-scoped Claude Code configuration boundary.
53
- 2. The Claude Code adapter MUST launch the native `claude` command.
54
- 3. The Claude Code adapter MUST support profile-controlled environment variables.
55
- 4. The Claude Code adapter MUST support profile-controlled pass-through Claude Code CLI arguments.
56
- 5. The Claude Code adapter SHOULD support `--model`, `--effort`, `--system-prompt`, `--append-system-prompt`, and `--plugin-dir` where native Claude Code flags exist.
57
- 6. The Claude Code adapter SHOULD support `controls.session_directory` and `controls.claude.session_directory` by routing Claude `projects/` session state through Outfitter state persistence.
58
- 7. The Claude Code adapter MUST return unsupported-control warnings for requested generic or `controls.claude` controls that it cannot translate.
59
-
60
- ### OFTR-006.6: Pi Settings Reconciliation
61
-
62
- 1. When profile-controlled Pi extensions duplicate native Pi `settings.json` package entries, the pi adapter MUST avoid launching pi with both copies enabled.
63
- 2. The pi adapter MUST compare duplicate Pi extension and package entries by normalized resource identity rather than raw source string.
64
- 3. The pi adapter MUST preserve unrelated Pi settings and unrelated package entries when generating a reconciled runtime `settings.json`.
65
- 4. The pi adapter MUST keep reconciled runtime `settings.json` writes non-durable and declared so they are discarded without being reported as unknown state.
66
- 5. The pi adapter MUST fall back to native Pi `settings.json` state persistence when reconciliation is unnecessary or the settings file cannot be interpreted safely.
@@ -1,32 +0,0 @@
1
- # OFTR-007: Controllable Elements Documentation
2
-
3
- ## Overview
4
-
5
- Outfitter maintains a generic cross-agent-CLI vocabulary for profile-controlled concepts.
6
- This vocabulary is documented separately from implementation details so companies can reason about profiles across multiple agent CLIs.
7
-
8
- ## Requirements
9
-
10
- ### OFTR-007.1: Documentation File
11
-
12
- 1. The project MUST include documentation with the header `Controllable Elements`.
13
- 2. The controllable elements documentation MUST define each generic controllable aspect as a named term.
14
- 3. Each defined term MUST describe the equivalent name or mechanism for pi.
15
- 4. Each defined term SHOULD describe the equivalent name or mechanism for other major CLIs when those mappings are known.
16
-
17
- ### OFTR-007.2: Support Matrix
18
-
19
- 1. The controllable elements documentation MUST include a support matrix table.
20
- 2. The support matrix MUST contain one row for each defined controllable aspect.
21
- 3. The support matrix MUST contain one column for each documented agent CLI.
22
- 4. Each support matrix cell MUST contain exactly one of `Unsupported`, `Supported`, or `Roadmap`.
23
- 5. Pi MUST be the only CLI with `Supported` entries until another adapter is implemented and tested.
24
-
25
- ### OFTR-007.3: Initial Controllable Aspects
26
-
27
- 1. The documentation MUST include an Agent Config Directory controllable element.
28
- 2. The documentation MUST include a Session Directory controllable element.
29
- 3. The documentation MUST include Extensions, Skills, and Prompt Templates controllable elements.
30
- 4. The documentation MUST include System Prompt and Appended System Prompt controllable elements.
31
- 5. The documentation MUST include Model Selection and Credentials and Environment controllable elements.
32
- 6. The documentation MUST include Tool Availability, Context Files, Theme or UI Presentation, Project Override Policy, Working Directory, Pass-through Arguments, and Bootstrap Hook controllable elements.
@@ -1,42 +0,0 @@
1
- # OFTR-008: Requirements Governance
2
-
3
- ## Overview
4
-
5
- Outfitter requirements define reviewable project obligations.
6
- Each requirement should be traceable to TypeScript implementation, tests, DeepSchemas, or DeepReview rules depending on the appropriate validation mechanism.
7
-
8
- ## Requirements
9
-
10
- ### OFTR-008.1: Requirement File Format
11
-
12
- 1. Requirement files MUST live under `requirements/` and use filenames matching `OFTR-NNN-<topic>.md`.
13
- 2. Requirement files MUST begin with a top-level heading matching `# OFTR-NNN: Title`.
14
- 3. Requirement files MUST include an `## Overview` section before requirements.
15
- 4. Requirement files MUST include an `## Requirements` section.
16
- 5. Requirement section headings MUST use the format `### OFTR-NNN.M: Title`.
17
- 6. Requirement statements MUST use RFC 2119 keywords such as MUST, MUST NOT, SHOULD, SHOULD NOT, MAY, REQUIRED, RECOMMENDED, or OPTIONAL.
18
- 7. Requirement section ID numbering within each file MUST be sequential without gaps.
19
- 8. Each requirement MUST be specific enough to verify by automated test, DeepSchema, DeepReview rule, or direct reviewer judgment.
20
-
21
- ### OFTR-008.2: Validation Mechanism Selection
22
-
23
- 1. Machine-verifiable requirements MUST be validated by automated TypeScript tests when the implementation exists.
24
- 2. Single-file semantic requirements SHOULD be validated by anonymous DeepSchemas placed next to the governed file.
25
- 3. Broad judgment-based requirements SHOULD be validated by `.deepreview` rules.
26
- 4. Tests MUST NOT use fragile keyword checks to pretend to validate judgment-based requirements.
27
- 5. Review rules SHOULD NOT ask reviewers to verify exact values, paths, or schema shapes that an automated test or JSON Schema can verify deterministically.
28
-
29
- ### OFTR-008.3: Test Traceability Comments
30
-
31
- 1. Tests that validate a formal requirement MUST include a traceability comment immediately before the test case or test block.
32
- 2. Traceability comments MUST identify at least one requirement ID using the pattern `OFTR-NNN.M`.
33
- 3. Traceability comments MUST state that the test validates a hard requirement and MUST NOT be modified unless the requirement changes.
34
- 4. Test comments MUST describe durable behavior or policy intent rather than transient line numbers, pull request numbers, or current-diff context.
35
- 5. Test comments MUST be updated or removed when the tested behavior changes.
36
-
37
- ### OFTR-008.4: Traceability Reviews
38
-
39
- 1. Changes to requirement files MUST trigger review of requirement formatting and traceability.
40
- 2. Changes to TypeScript source or tests SHOULD trigger review for missing requirement coverage when they introduce or change product behavior.
41
- 3. Changes to DeepSchemas or `.deepreview` policies MUST preserve references to the requirement IDs they enforce when applicable.
42
- 4. The requirements DeepSchema MUST include a filename regex that matches the `OFTR-NNN-<topic>.md` naming style.
@@ -1,35 +0,0 @@
1
- # OFTR-009: Release Publishing
2
-
3
- ## Overview
4
-
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
-
7
- ## Requirements
8
-
9
- ### OFTR-009.1: Release Metadata Synchronization
10
-
11
- 1. The release metadata synchronization script MUST accept a release version from an explicit argument, `OUTFITTER_RELEASE_VERSION`, or `GITHUB_REF_NAME`, in that precedence order.
12
- 2. The release metadata synchronization script MUST normalize a leading `v` from release tags before writing package metadata.
13
- 3. The release metadata synchronization script MUST reject invalid Semantic Versioning values before mutating package metadata.
14
- 4. The release metadata synchronization script MUST update the root `package.json` version, root `package-lock.json` version, and `package-lock.json` root package entry version to the same normalized release version.
15
- 5. The release metadata synchronization script MUST verify that the root package metadata it prepares belongs to the `@ai-outfitter/outfitter` npm package.
16
- 6. The release metadata synchronization script MUST verify that `package.json` and the package-lock root metadata declare `repository.url` as `https://github.com/ai-outfitter/outfitter.git` so npm provenance validation can match the publishing repository.
17
- 7. The release metadata synchronization script MUST fail with an actionable error when required package-lock root package metadata is missing.
18
-
19
- ### OFTR-009.2: Npm Release Workflow
20
-
21
- 1. The npm release workflow MUST run when a GitHub release is published.
22
- 2. The npm release workflow MUST install dependencies with `npm ci` before publishing.
23
- 3. The npm release workflow MUST synchronize package metadata from the GitHub release tag before publishing.
24
- 4. The npm release workflow MUST run CI checks before publishing.
25
- 5. The npm release workflow MUST build the package before publishing.
26
- 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`.
27
-
28
- ### OFTR-009.3: Conventional Commit Release Automation
29
-
30
- 1. The Release Please workflow MUST run on pushes to `main`.
31
- 2. The Release Please workflow MUST use `googleapis/release-please-action@v4` with the upstream example-style token input from `secrets.RELEASE_PLEASE_TOKEN`.
32
- 3. The Release Please workflow MUST use `release-type: node` for the root `@ai-outfitter/outfitter` npm package.
33
- 4. The Release Please workflow MUST derive version bumps from Conventional Commits.
34
- 5. The Release Please workflow MUST update npm package metadata and changelog through a release PR before publishing.
35
- 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`.
@@ -1,48 +0,0 @@
1
- # OFTR-010: Onboarding Welcome
2
-
3
- ## Overview
4
-
5
- Outfitter welcome onboarding gets a new user to a productive Pi session in one question. The
6
- recommended path installs the founder profile automatically; declining opens `/outfitter` inside Pi
7
- so the user can configure a profile interactively.
8
-
9
- ## Requirements
10
-
11
- ### OFTR-010.1: Welcome Text
12
-
13
- 1. Welcome text MUST be shown to the user explaining what Outfitter and Pi are and what the founder profile provides.
14
- 2. Welcome text MUST use Outfitter-branded ASCII/text.
15
- 3. Welcome text MUST reference `/outfitter` as the way to customize the profile after installation.
16
-
17
- > Pi is a fully extensible agentic coding harness.
18
- > The founder profile brings Pi to feature parity with dedicated agentic coding tools.
19
- > Press Y to install it now. Run /outfitter inside Pi at any time to customize your profile.
20
-
21
- ### OFTR-010.2: Profile Installation
22
-
23
- 1. The welcome onboarding flow MUST present a single accept/decline prompt for the founder profile.
24
- 2. Accepting (default) MUST install the founder role and the full recommended loadout without further prompts.
25
- 3. The founder role MUST be the default and fallback selection. Outfitter's built-in role catalog also includes `engineer` and `data_analyst`; these are accessible via `/outfitter` after first run.
26
- 4. If the accepted role cannot be mapped to an available standard profile, Outfitter MUST warn the user and choose a deterministic fallback role rather than silently ignoring the selection.
27
-
28
- ### OFTR-010.3: Loadout
29
-
30
- 1. On acceptance, the full recommended loadout MUST be installed automatically with no item-level selection prompt.
31
- 2. The default recommended loadout MUST include `git:github.com/ai-outfitter/deepwork`, `npm:@juicesharp/rpiv-ask-user-question`, `git:github.com/applepi-ai/ulta-tasklist`, `npm:pi-nolo`, `npm:pi-browser-harness`, `npm:@mjakl/pi-subagent`, `npm:@narumitw/pi-btw`, `npm:pi-must-have-extension`, `npm:pi-interactive-shell`, and `npm:pi-mcp-adapter` while those packages remain available.
32
- 3. Loadout installation MUST be captured as structured onboarding data so profile creation can install the selected extensions deterministically.
33
- 4. On acceptance, Outfitter MUST display a message directing users to `/outfitter` inside Pi and `outfitter profile list` in the terminal for post-install management.
34
- 5. If a loadout item is unavailable or unsupported by the selected agent adapter, Outfitter MUST warn the user and continue with the remaining loadout items unless strict onboarding validation is enabled.
35
- 6. The Outfitter npm package MUST publish a default Pi skill named `outfitter` for profile setup guidance from inside Pi.
36
- 7. The Pi adapter MUST load the default Outfitter skill for normal profile launches.
37
-
38
- ### OFTR-010.4: Pi Login Setup
39
-
40
- 1. Before launching Pi after the welcome flow, Outfitter MUST detect whether native Pi appears to have no configured login state.
41
- 2. If Pi is not logged in after the welcome flow, Outfitter MUST automatically invoke Pi's `/login` flow when Pi starts.
42
- 3. When Outfitter launches Pi outside the welcome flow and Pi does not appear to be logged in, Outfitter MUST inform the user to run `/login` inside Pi.
43
- 4. Pi login setup MUST NOT ask Outfitter to collect, echo, or persist provider API keys.
44
-
45
- ### OFTR-010.5: Decline Path
46
-
47
- 1. If the user declines the welcome profile, Outfitter MUST launch Pi with `/outfitter` prefilled and auto-submitted so the user can configure a profile interactively on first session start.
48
- 2. The profile install target MUST always be the user home directory (`~/.outfitter`); no installation scope prompt MUST be shown.