-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(init): add shared agents skills target #1303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@fission-ai/openspec": minor | ||
| --- | ||
|
|
||
| Add the vendor-neutral `agents` target: `openspec init --tools agents` installs the workflow skills to `.agents/skills/openspec-*/SKILL.md`, the shared location AGENTS.md-compatible assistants read. It is skills-only, so no slash commands are generated. Because `agents` is now a real target, `--tools all` includes it and creates `.agents/skills/` where it previously did not. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| schema: spec-driven | ||
| created: 2026-07-29 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| ## Why | ||
|
|
||
| `.agents/skills` has become the shared, vendor-neutral location modern agent tools read. OpenSpec already carried an `agents` entry in `AI_TOOLS`, but with `available: false` and no `skillsDir` it was unreachable — every real gate keys off `skillsDir`. Teams running several agents on one repo, or a tool with no first-class integration yet, had to generate for some other tool and move the files by hand (#1480), or pick a vendor target they do not use (#1104, #653). | ||
|
|
||
| ## What Changes | ||
|
|
||
| - Enable `agents` in `AI_TOOLS` with `skillsDir: '.agents'`, making it selectable interactively and via `--tools agents`. | ||
| - Scope detection to `detectionPaths: ['.agents/skills']` so a bare `.agents/` written by another framework does not select — or silently install into — the target. | ||
| - Rename the entry to `Shared .agents skills`. The old label said "AGENTS.md", but OpenSpec writes no `AGENTS.md` — it strips its markers out of one. | ||
| - Document the target, including when to prefer it over a tool-specific integration. | ||
|
|
||
| ## Capabilities | ||
|
|
||
| ### New Capabilities | ||
|
|
||
| _None._ | ||
|
|
||
| ### Modified Capabilities | ||
|
|
||
| - `ai-tool-paths`: define the `.agents` skills root and its scoped detection path | ||
| - `cli-init`: record that the shared target installs skills and skips command generation | ||
|
|
||
| ## Impact | ||
|
|
||
| - `src/core/config.ts` - enable the `agents` entry, scope detection, correct the label | ||
| - `.changeset/add-agents-tool.md` - minor release note, including the `--tools all` behavior change | ||
| - `docs/supported-tools.md`, `docs/cli.md`, `docs/commands.md`, `docs/how-commands-work.md`, `docs/troubleshooting.md` - list `agents` among skills-only tools and explain when to choose it | ||
| - `test/core/*`, `test/commands/*`, `test/cli-e2e/*` - cover init, update, detection, and the deprecated alias | ||
|
|
||
| ## Non-Goals | ||
|
|
||
| - No command adapter for `agents`. There is no cross-vendor slash-command format, so commands stay skills-only (the Kimi/Hermes pattern). | ||
| - No `.pi`, `.codex`, or `.agent` migration into `.agents`. Moving vendor tools to the shared root is separate work (#830, #1157). |
23 changes: 23 additions & 0 deletions
23
openspec/changes/add-init-agents-target/specs/ai-tool-paths/spec.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # ai-tool-paths Delta Specification | ||
|
|
||
| ## ADDED Requirements | ||
|
|
||
| ### Requirement: Shared .agents skills target | ||
|
|
||
| OpenSpec SHALL provide a vendor-neutral `agents` tool target rooted at the shared `.agents` directory, for assistants that read skills from the shared location rather than a vendor-specific one. | ||
|
|
||
| #### Scenario: Shared agents target paths defined | ||
|
|
||
| - **WHEN** looking up the `agents` tool | ||
| - **THEN** `skillsDir` SHALL be `.agents` | ||
|
|
||
| #### Scenario: Detection keys off the shared skills subtree | ||
|
|
||
| - **WHEN** a project contains a `.agents/skills` path | ||
| - **THEN** OpenSpec SHALL detect `agents` as an available target | ||
|
|
||
| #### Scenario: A bare shared root does not select the target | ||
|
|
||
| - **GIVEN** a project contains `.agents` but no `.agents/skills` path | ||
| - **WHEN** OpenSpec detects available tools | ||
| - **THEN** `agents` SHALL NOT be reported as available |
20 changes: 20 additions & 0 deletions
20
openspec/changes/add-init-agents-target/specs/cli-init/spec.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # cli-init Delta Specification | ||
|
|
||
| ## ADDED Requirements | ||
|
|
||
| ### Requirement: Shared .agents target initialization | ||
|
|
||
| `openspec init` SHALL accept the shared `agents` target wherever tool IDs are selected, and SHALL treat it as a skills-only tool. | ||
|
|
||
| #### Scenario: Non-interactive selection of the shared target | ||
|
|
||
| - **WHEN** the user runs `openspec init --tools agents` | ||
| - **THEN** OpenSpec SHALL generate skills for the `agents` target | ||
| - **AND** initialization SHALL NOT fail because `agents` has no registered command adapter | ||
|
|
||
| #### Scenario: Shared agents target skips command-file generation | ||
|
|
||
| - **GIVEN** the configured delivery includes command generation | ||
| - **WHEN** the user selects the shared `agents` target during initialization | ||
| - **THEN** command-file generation SHALL be skipped because no `agents` adapter is registered | ||
| - **AND** `agents` SHALL be listed among the tools reported as having commands skipped |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| ## 1. Tests | ||
|
|
||
| - [x] 1.1 Cover `agents` init, update, detection, and the deprecated `experimental --tool` alias | ||
| - [x] 1.2 Assert a bare `.agents/` directory does not select the target | ||
|
|
||
| ## 2. Registry | ||
|
|
||
| - [x] 2.1 Enable `agents` in `src/core/config.ts` with `skillsDir: '.agents'` | ||
| - [x] 2.2 Scope detection with `detectionPaths: ['.agents/skills']` | ||
| - [x] 2.3 Rename the entry to `Shared .agents skills` so it names the directory instead of a file OpenSpec never writes | ||
|
|
||
| ## 3. Docs | ||
|
|
||
| - [x] 3.1 Add `agents` to the tool ID lists in `docs/cli.md` and `docs/supported-tools.md` | ||
| - [x] 3.2 Add the Tool Directory row and the skills-only invocation rows across `docs/supported-tools.md`, `docs/commands.md`, `docs/how-commands-work.md`, and `docs/troubleshooting.md` | ||
| - [x] 3.3 Document when to choose the shared target over a tool-specific integration | ||
|
|
||
| ## 4. Verification | ||
|
|
||
| - [x] 4.1 Run `pnpm run build` and the full Vitest suite | ||
| - [x] 4.2 Validate with `openspec validate --strict`, and confirm `openspec archive` applies cleanly against a scratch copy of `openspec/` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Do not present shared
.agentsas universally supporting slash commands.Because
.agentsis a vendor-neutral, skills-only target without a generic command adapter, this row may imply that/openspec-*syntax works in every assistant consuming.agents. Qualify the entry as assistant-dependent, or point readers to their assistant’s skill-invocation documentation.🤖 Prompt for AI Agents