-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 all commits
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,57 @@ | ||
| ## 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. If the command exits non-zero, cannot be found, or its output cannot be parsed, the skill logs a warning with the command, skill name, and error details and continues without applying any guidance. If the command succeeds but one or both fields are null, the skill silently applies only the non-null field(s). | ||
| - **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. | ||
| - **New and updated specs**: guidance fetch requirement added to all workflow skill specs — new specs for `explore-skill-workflow`, `propose-skill-workflow`, `apply-skill-workflow`, `continue-skill-workflow`, and `ff-change-skill-workflow` (none existed in OpenSpec); delta specs for `opsx-archive-skill`, `opsx-verify-skill`, and `opsx-onboard-skill` (guidance step added to existing specs); delta spec for `config-loading` (`skills:` field); new spec for `skill-guidance-command`. | ||
|
|
||
| ## Capabilities | ||
|
|
||
| ### New Capabilities | ||
|
|
||
| - `skill-guidance-command`: The `openspec guidance <skill-name>` CLI command — reads `openspec/config.yaml` and returns `{ skill, context, instructions }`. `skill` is an echo of the input argument. `context` is the shared project context field (e.g. "Always use TypeScript strict mode; follow the Google Style Guide"); `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` = persistent project-level constraints applied throughout the session, never written to the exploration document (e.g. "All code must target Node.js ≥20"); `instructions` = session overrides specific to the explore workflow (e.g. "always create a decision log entry for each Q&A round"). | ||
| - `propose-skill-workflow`: Guidance fetch as Step 1, before flag parsing, exploration doc scanning, or any other action. `context` = persistent project-level constraints; `instructions` = session overrides specific to the propose workflow (e.g. "include cost estimates in every proposal"; "tag proposals affecting the public API with `api-impact: true`"). | ||
| - `apply-skill-workflow`: Guidance fetch as Step 1. | ||
| - `continue-skill-workflow`: Guidance fetch as Step 1. | ||
| - `ff-change-skill-workflow`: Guidance fetch as Step 1. | ||
|
|
||
| ### Modified Capabilities | ||
|
|
||
| - `config-loading`: `ProjectConfigSchema` and `readProjectConfig` gain a `skills` field — a `Record<string, string>` map of skill name to instruction string. All keys are accepted without validation. | ||
| - `opsx-archive-skill`: Guidance fetch added as Step 1. | ||
| - `opsx-verify-skill`: Guidance fetch added as Step 1. | ||
| - `opsx-onboard-skill`: Guidance fetch added as Step 1. | ||
|
|
||
| ## 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/apply-skill-workflow/spec.md` — new spec | ||
| - `openspec/specs/continue-skill-workflow/spec.md` — new spec | ||
| - `openspec/specs/ff-change-skill-workflow/spec.md` — new spec | ||
| - `openspec/specs/config-loading/spec.md` — delta: `skills:` field requirement | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| - `openspec/specs/opsx-archive-skill/spec.md` — delta: guidance step requirement | ||
| - `openspec/specs/opsx-verify-skill/spec.md` — delta: guidance step requirement | ||
| - `openspec/specs/opsx-onboard-skill/spec.md` — delta: guidance step requirement | ||
| - 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.