-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(skill-guidance): add-skill-guidance #964
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
duizendnegen
wants to merge
3
commits into
Fission-AI:main
Choose a base branch
from
duizendnegen:feature/workflow-guidance
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.
+59
−0
Open
Changes from 1 commit
Commits
Show all changes
3 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,2 @@ | ||
| schema: spec-driven | ||
| created: 2026-04-12 |
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,45 @@ | ||
| ## Why | ||
|
|
||
| `openspec/config.yaml` lets teams inject project context and per-artifact rules into artifact generation, but there is no equivalent mechanism for workflow skills (explore, propose, apply, etc.). Teams have no way to pass project-specific conventions into skill behaviour without editing the seeded skill files directly — which get overwritten on `openspec update`. | ||
|
|
||
| ## What Changes | ||
|
|
||
| - **New CLI command** `openspec guidance <skill-name> [--json]`: reads `openspec/config.yaml` and returns the shared project `context` plus any skill-specific instruction string from a new `skills:` key. | ||
| - **New `skills:` key in `config.yaml`**: a free-form map of skill name → instruction string. All keys are accepted without validation. | ||
| - **Guidance step in all seeded workflow templates**: every workflow skill (explore, propose, apply, archive, verify, onboard, continue, ff-change) calls `openspec guidance <skill-name> --json` as Step 1. The returned `context` is applied as binding project constraints throughout the session; the returned `instructions` override or extend the skill's default behaviour for the session. If the command fails or returns null fields, the skill continues normally. | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
| - **Updated seeded `config.yaml` template**: the scaffold from `openspec init` gains a commented-out `skills:` section so the feature is discoverable on first setup. | ||
| - **Updated user-facing docs**: `docs/customization.md` documents the `skills:` config key; `docs/cli.md` documents the `openspec guidance` command. | ||
| - **Updated specs**: `skill-guidance-command`, `config-loading`, `explore-skill-workflow`, and `propose-skill-workflow` specs updated to reflect OpenSpec CLI identity and precise field roles. | ||
|
|
||
| ## Capabilities | ||
|
|
||
| ### New Capabilities | ||
|
|
||
| - `skill-guidance-command`: The `openspec guidance <skill-name>` CLI command — reads `openspec/config.yaml` and returns `{ skill, context, instructions }`. `context` is the shared project context field; `instructions` is the value of `skills.<skill-name>` if present, null otherwise. | ||
| - `explore-skill-workflow`: Guidance fetch as Step 1 in the numbered Steps sequence, before document creation or any other action. `context` = binding project constraints applied throughout the session (not written to the exploration document); `instructions` = workflow-specific overrides for the session. | ||
| - `propose-skill-workflow`: Guidance fetch as Step 1, before flag parsing, exploration doc scanning, or any other action. `context` = binding project constraints; `instructions` = workflow-specific overrides. Includes requirements for OpenSpec branding in generated templates (CLI binary, display names, skill metadata). | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
|
|
||
| ### Modified Capabilities | ||
|
|
||
| - `config-loading`: `ProjectConfigSchema` and `readProjectConfig` gain a `skills` field — a `Record<string, string>` map of skill name to instruction string. Unknown keys accepted without validation. | ||
|
|
||
| ## Impact | ||
|
|
||
| - `src/commands/guidance.ts` — new command, wired into CLI | ||
| - `src/core/project-config.ts` — schema and parser updated for `skills:` field | ||
| - `src/core/templates/workflows/explore.ts` — guidance as Step 1 (skill + command templates) | ||
| - `src/core/templates/workflows/propose.ts` — guidance as Step 1 (skill + command templates) | ||
| - `src/core/templates/workflows/apply-change.ts` — guidance as Step 1 | ||
| - `src/core/templates/workflows/archive-change.ts` — guidance as Step 1 | ||
| - `src/core/templates/workflows/verify-change.ts` — guidance as Step 1 | ||
| - `src/core/templates/workflows/onboard.ts` — guidance as Step 1 | ||
| - `src/core/templates/workflows/continue-change.ts` — guidance as Step 1 | ||
| - `src/core/templates/workflows/ff-change.ts` — guidance as Step 1 | ||
| - `src/core/init.ts` — seeded `config.yaml` template updated with commented `skills:` section | ||
| - `docs/customization.md` — new "Skill-Specific Instructions" section documenting `skills:` key | ||
| - `docs/cli.md` — new entry for `openspec guidance` command | ||
| - `openspec/specs/skill-guidance-command/spec.md` — new spec | ||
| - `openspec/specs/explore-skill-workflow/spec.md` — new spec | ||
| - `openspec/specs/propose-skill-workflow/spec.md` — new spec | ||
| - `openspec/specs/config-loading/spec.md` — delta: `skills:` field requirement | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| - No breaking changes to existing config files; `skills:` is optional and additive | ||
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.