-
Notifications
You must be signed in to change notification settings - Fork 3.7k
feat(cli): add openspec agent command group — cut tokens + turns for AI skills
#1132
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
Open
jussirantala
wants to merge
5
commits into
Fission-AI:main
Choose a base branch
from
jussirantala:feat/agent-helpers
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,411
−181
Open
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
804769c
feat(cli): add resolve-change, next-artifact, mark-task-done
b85d8b4
feat(templates): refactor propose + apply-change to use new agent hel…
23d2a1b
refactor(cli): group helpers under `openspec agent` namespace
00ef520
fix(coderabbit): address 3 PR review findings
e6e8feb
fix(cli): address agent-command review feedback
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,37 @@ | ||
| --- | ||
| "@fission-ai/openspec": minor | ||
| --- | ||
|
|
||
| ### Added | ||
|
|
||
| - **`openspec resolve-change [name] [--auto] [--json]`** — agent helper that | ||
| resolves which active change to operate on. Lists every active change, | ||
| validates a supplied name, or auto-selects when exactly one exists. Distinct | ||
| exit codes (`0` ok, `1` none, `2` not found, `3` ambiguous) let skills branch | ||
| without parsing stderr. | ||
| - **`openspec next-artifact --change <name>`** — agent helper that returns the | ||
| next ready artifact bundled with its full `instructions` payload. Replaces | ||
| the two-call `status --json` + `instructions <artifact> --json` pattern with | ||
| one call. JSON by default; pass `--no-json` for a human summary. Emits | ||
| `{ "done": true }` once every artifact is complete. | ||
| - **`openspec mark-task-done <task-id> --change <name>`** — agent helper that | ||
| flips a single checkbox in the change's tracking file (typically `tasks.md`) | ||
| from `- [ ]` to `- [x]`. Idempotent on already-checked lines, preserves | ||
| CRLF/LF endings, and uses anchored matching so `1.1` does not match `1.10`. | ||
|
|
||
| ### Changed | ||
|
|
||
| - `openspec instructions apply --change <n> --json` payload is now richer: | ||
| - Each task in the `tasks` array carries an optional `numericId` field | ||
| (`"1.1"`, `"2.3.4"`) extracted from the start of the task description when | ||
| the tracking file uses numbered tasks. Existing positional `id` is | ||
| unchanged. | ||
| - The top-level payload includes a new `nextPendingId` field: the first | ||
| unchecked task that has a `numericId`, or `null`. Pair with | ||
| `openspec mark-task-done` to drive an apply loop without re-parsing | ||
| `tasks.md`. | ||
| - Skill workflow templates for `openspec-propose` and `openspec-apply-change` | ||
| now use the three new commands instead of inlining multi-step CLI | ||
| orchestration. Run `openspec update` against an existing OpenSpec project to | ||
| pick up the slimmer skill bodies. Net effect: fewer tokens per propose/apply | ||
| cycle and fewer round-trips between the agent and the CLI. |
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
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.
Uh oh!
There was an error while loading. Please reload this page.