mirror of
https://github.com/Fission-AI/OpenSpec.git
synced 2026-11-04 08:44:44 +08:00
* feat(skills): auto-approve the openspec CLI in generated skills Emit `allowed-tools: Bash(openspec:*)` in every generated SKILL.md so agents that honor the Agent Skills standard run `openspec` commands without prompting on each call. Scope is limited to the CLI; per the standard `allowed-tools` pre-approves rather than restricts, so every other tool a skill uses stays available under the user's normal permission settings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(commands): auto-approve the openspec CLI in Claude slash commands Extend the allowed-tools pre-approval to the second surface: Claude Code /opsx:* slash commands share the skill frontmatter contract, so the Claude command adapter now emits `allowed-tools: Bash(openspec:*)` too. The value is single-sourced in `src/core/shared/allowed-tools.ts` (a leaf module both surfaces import). Other command adapters are unchanged — no other tool's slash-command format defines a per-command pre-approval field; on the skills side every tool already gets the standard field via generateSkillContent and non-implementing tools ignore the unknown key. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1.2 KiB
1.2 KiB
MODIFIED Requirements
Requirement: Skill Generation
The command SHALL generate Agent Skills for selected AI tools.
Scenario: Generating skills for a tool
- WHEN a tool is selected during initialization
- THEN create 9 skill directories under
.<tool>/skills/:openspec-explore/SKILL.mdopenspec-new-change/SKILL.mdopenspec-continue-change/SKILL.mdopenspec-apply-change/SKILL.mdopenspec-ff-change/SKILL.mdopenspec-verify-change/SKILL.mdopenspec-sync-specs/SKILL.mdopenspec-archive-change/SKILL.mdopenspec-bulk-archive-change/SKILL.md
- AND each SKILL.md SHALL contain YAML frontmatter with name and description
- AND each SKILL.md SHALL contain the skill instructions
Scenario: Pre-approving the OpenSpec CLI in skill frontmatter
- WHEN generating a skill's YAML frontmatter
- THEN the frontmatter SHALL include an
allowed-toolsfield with the valueBash(openspec:*) - AND an agent that honors
allowed-toolsSHALL runopenspeccommands from the skill without prompting for approval - AND because
allowed-toolspre-approves rather than restricts, any other tool the skill uses SHALL remain available under the user's existing permission settings