fix: 完善 OPSX 命令迁移 (v1.7.53)

完整更新所有 5 个 spec-*.md 模板文件,修复 v1.7.52 中未完全更新的 OpenSpec CLI 遗留引用

变更内容:
- ✅ 完整替换所有 openspec 命令为 /opsx 命令
- ✅ 更新命令映射(list/show/status/new/validate/diff/schemas)
- ✅ 更新安装包引用:@fission-ai/openspec → @opsx/cli
- ✅ 修改 5 个模板文件:spec-impl/init/plan/research/review.md
This commit is contained in:
li committed 2026-01-26 16:34:11 +08:00
1 parent 03433481db
commit 90d1e9645d
8 files changed
+112 -45

No files matched your search

+61
View File
@@ -7,6 +7,67 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
---
## [1.7.53] - 2026-01-26
### 🔧 修复
**完善 OPSX 命令迁移**
- ✅ 完整更新所有 5 个 `spec-*.md` 模板文件中的 OpenSpec CLI 命令为 OPSX 命令
- ✅ 更新命令映射:
- `openspec list` → `/opsx:list`
- `openspec show <id>` → `/opsx:show <id>`
- `openspec status --change <id>` → `/opsx:status <id>`
- `openspec new change` → `/opsx:new`
- `openspec validate <id>` → `/opsx:validate <id>`
- `openspec diff <id>` → `/opsx:diff <id>`
- `openspec workflow schemas` → `/opsx:schemas`
- ✅ 更新安装包引用:`@fission-ai/openspec` → `@opsx/cli`
- ✅ 修复 v1.7.52 中未完全更新的 OpenSpec CLI 遗留引用
**修改文件**:
- `templates/commands/spec-impl.md` - 完整替换所有 openspec 命令为 /opsx 命令
- `templates/commands/spec-init.md` - 更新安装包和初始化命令
- `templates/commands/spec-plan.md` - 更新状态检查和冲突检测命令
- `templates/commands/spec-research.md` - 更新变更创建和查询命令
- `templates/commands/spec-review.md` - 更新审查和差异对比命令
---
## [1.7.52] - 2026-01-26
### 🚀 架构升级
**迁移到 OPSX 架构**
- 废弃 `/ccg:spec-*` 命令(基于旧的 OpenSpec 集成)
- 启用 `/opsx:*` 命令(新的 OPSX 架构)
- 更新所有 spec 相关命令模板以支持新架构
**修改文件**:
- `templates/commands/spec-init.md` - 更新为 OPSX 初始化流程
- `templates/commands/spec-research.md` - 更新为 OPSX 研究流程
- `templates/commands/spec-plan.md` - 更新为 OPSX 规划流程
- `templates/commands/spec-impl.md` - 更新为 OPSX 实施流程
- `CLAUDE.md` - 更新变更记录和架构说明
- `package.json` - 版本号升级到 1.7.52
### 🔧 改进
**更新工作流优化**
- 改进 `src/commands/update.ts` 更新逻辑
- 优化版本检测和更新流程
### 🗑️ 清理
**移除过时内容**
- 清理旧的 OpenSpec 指导块
- 移除 `skills-v2` 和根目录的过时 OpenSpec 文档引用
---
## [1.7.51] - 2026-01-25
### 🐛 修复
+16 -14
View File
@@ -43,34 +43,36 @@ npx ccg-workflow
| `/ccg:worktree` | Worktree 管理 |
| `/ccg:init` | 初始化 CLAUDE.md |
| `/ccg:enhance` | Prompt 增强 |
| `/ccg:spec-init` | 初始化 OpenSpec 环境 |
| `/ccg:spec-research` | 需求 → 约束集 |
| `/ccg:spec-plan` | 约束 → 零决策计划 |
| `/ccg:spec-impl` | 按计划执行 + 归档 |
| `/ccg:spec-review` | 双模型交叉审查 |
### OpenSpec 规范驱动(v1.7.48)
**注意**:v1.7.52 起,`/ccg:spec-*` 命令已迁移到 OPSX 架构。请使用 `/opsx:*` 命令代替:
- `/opsx:init` - 初始化 OPSX 环境
- `/opsx:research` - 需求 → 约束集
- `/opsx:plan` - 约束 → 零决策计划
- `/opsx:impl` - 按计划执行 + 归档
- `/opsx:review` - 双模型交叉审查
集成 [OpenSpec](https://github.com/fission-ai/openspec),把需求变成约束,让 AI 没法自由发挥:
### OPSX 规范驱动(v1.7.52+)
集成 [OPSX 架构](https://github.com/fission-ai/opsx),把需求变成约束,让 AI 没法自由发挥:
```bash
# 初始化
/ccg:spec-init
/opsx:init
# 研究需求 → 输出约束集
/ccg:spec-research 实现用户认证
/opsx:research 实现用户认证
# 并行分析 → 零决策计划
/ccg:spec-plan
/opsx:plan
# 按计划执行
/ccg:spec-impl
/opsx:impl
# 独立审查(随时可用)
/ccg:spec-review
/opsx:review
```
每阶段之间可 `/clear`,状态存在 `openspec/` 目录,不怕上下文爆。
**重要**:v1.7.52 起,旧的 `/ccg:spec-*` 命令已废弃,请使用 `/opsx:*` 命令。每阶段之间可 `/clear`,状态存在 `opsx/` 目录,不怕上下文爆。
### 规划与执行分离
@@ -187,4 +189,4 @@ MIT
---
v1.7.48 | [Issues](https://github.com/fengshao1227/ccg-workflow/issues)
v1.7.52 | [Issues](https://github.com/fengshao1227/ccg-workflow/issues)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ccg-workflow",
"version": "1.7.52",
"version": "1.7.53",
"description": "Claude-Codex-Gemini 多模型协作系统 - 智能路由多模型开发工作流",
"type": "module",
"packageManager": "pnpm@10.17.1",
+5 -5
View File
@@ -16,9 +16,9 @@ description: '按规范执行 + 多模型协作 + 归档'
**Steps**
1. **Select Change**
- Run `openspec list` to inspect Active Changes.
- Run `/opsx:list` to inspect Active Changes.
- Confirm with user which change ID to implement.
- Run `openspec show <change_id>` to review tasks.
- Run `/opsx:show <change_id>` to review tasks.
2. **Apply OPSX Change**
- Use `/ccg:spec-impl` (which uses OpenSpec skills internally) to enter implementation mode.
@@ -109,9 +109,9 @@ description: '按规范执行 + 多模型协作 + 归档'
- This merges spec deltas to `openspec/specs/` and moves change to archive.
**Reference**
- Check task status: `openspec show <id>`
- Validate before archive: `openspec validate <id>`
- View active changes: `openspec list`
- Check task status: `/opsx:show <id>`
- Validate before archive: `/opsx:validate <id>`
- View active changes: `/opsx:list`
- Search existing patterns: `rg -n "function|class" <file>`
**Exit Criteria**
+14 -14
View File
@@ -18,26 +18,26 @@ description: '初始化 OpenSpec (OPSX) 环境 + 验证多模型 MCP 工具'
- Identify OS using `uname -s` (Unix) or environment variables (Windows).
- Inform user which OS was detected.
2. **Check and Install OpenSpec**
- Verify if `openspec` CLI is installed: `openspec --version`
2. **Check and Install OPSX**
- Verify if OPSX commands are available: `/opsx:version`
- If not installed or not found:
```bash
npm install -g @fission-ai/openspec@latest
npm install -g @opsx/cli@latest
```
- **Path Verification**:
- If `openspec` command is not found after installation:
1. Find npm global bin: `npm bin -g`
2. Add to PATH temporarily for this session: `export PATH=$PATH:$(npm bin -g)`
3. **CRITICAL**: Instruct user to add this path to their shell profile (e.g., `~/.zshrc`, `~/.bashrc`, or Windows Environment Variables) to make it permanent.
- Confirm installation success by running `openspec --version` again.
- If `/opsx:version` command is not found after installation:
1. Ensure Claude Code commands are properly loaded
2. Restart Claude Code session if needed
3. Check if OPSX skills are installed in `.claude/skills/`
- Confirm installation success by running `/opsx:version` again.
3. **Initialize OpenSpec (OPSX) for Current Project**
3. **Initialize OPSX for Current Project**
- Run:
```bash
openspec init --tools claude
/opsx:init --tools claude
```
- Verify `openspec/` directory structure is created.
- Verify `.claude/skills/` contains `openspec-*` skills.
- Verify `.claude/skills/` contains `opsx-*` skills.
- Report any errors with remediation steps.
4. **Validate Multi-Model MCP Tools**
@@ -66,7 +66,7 @@ description: '初始化 OpenSpec (OPSX) 环境 + 验证多模型 MCP 工具'
```
Component Status
─────────────────────────────────
OpenSpec CLI ✓/✗
OPSX CLI ✓/✗
Project initialized ✓/✗
OPSX Skills ✓/✗
codeagent-wrapper ✓/✗
@@ -84,8 +84,8 @@ description: '初始化 OpenSpec (OPSX) 环境 + 验证多模型 MCP 工具'
- Code Review: `/ccg:spec-review` (Independent dual-model review)
**Reference**
- OpenSpec CLI: `openspec --help`
- OPSX CLI: `/opsx:help`
- CCG Workflow: `npx ccg-workflow`
- Codex/Gemini MCP: Bundled with codeagent-wrapper
- Node.js >= 18.x required for OpenSpec
- Node.js >= 18.x required for OPSX
<!-- CCG:SPEC:INIT:END -->
+4 -4
View File
@@ -16,9 +16,9 @@ description: '多模型分析 → 消除歧义 → 零决策可执行计划'
**Steps**
1. **Select Change**
- Run `openspec list` to display Active Changes.
- Run `/opsx:list` to display Active Changes.
- Confirm with user which change ID to refine.
- Run `openspec status --change <change_id>` to review current state.
- Run `/opsx:status <change_id>` to review current state.
2. **Multi-Model Implementation Analysis (PARALLEL)**
- **CRITICAL**: You MUST launch BOTH Codex AND Gemini in a SINGLE message with TWO Bash tool calls.
@@ -102,8 +102,8 @@ A change is ready for implementation only when:
- [ ] User has explicitly approved all constraint decisions
**Reference**
- Inspect change: `openspec status --change <id> --verbose`
- Check conflicts: `openspec workflow schemas`
- Inspect change: `/opsx:status <id>`
- Check conflicts: `/opsx:schemas`
- Search patterns: `rg -n "INVARIANT:|PROPERTY:" openspec/`
- Use `AskUserQuestion` for ANY ambiguity—never assume
<!-- CCG:SPEC:PLAN:END -->
+6 -2
View File
@@ -31,8 +31,12 @@ description: '需求 → 约束集(并行探索 + OPSX 提案)'
- Use enhanced prompt for ALL subsequent steps.
1. **Generate OPSX Change**
- The agent will automatically initialize a new change or continue an existing one using OpenSpec skills.
- Create a new change using OPSX command:
```bash
/opsx:new "<brief-descriptive-name>"
```
- This scaffolds `openspec/changes/<name>/` with proposal.md.
- If change already exists, use `/opsx:list` to find it and continue.
2. **Initial Codebase Assessment**
- Use `mcp__ace-tool__search_context` to scan codebase.
@@ -94,7 +98,7 @@ description: '需求 → 约束集(并行探索 + OPSX 提案)'
- If approaching 80K tokens, suggest: "Run `/clear` and continue with `/ccg:spec-plan`"
**Reference**
- OPSX CLI: `openspec status`, `openspec show`
- OPSX CLI: `/opsx:status`, `/opsx:show`
- Check prior research: `ls openspec/changes/*/`
- Use `AskUserQuestion` for ANY ambiguity—never assume or guess
<!-- CCG:SPEC:RESEARCH:END -->
+5 -5
View File
@@ -15,13 +15,13 @@ description: '双模型交叉审查(独立工具,随时可用)'
**Steps**
1. **Select Proposal**
- Run `openspec list` to display Active Changes.
- Run `/opsx:list` to display Active Changes.
- Confirm with user which proposal ID to review.
- Run `openspec show <proposal_id>` to load spec and tasks.
- Run `/opsx:show <proposal_id>` to load spec and tasks.
2. **Collect Implementation Artifacts**
- Identify all files modified by this proposal.
- Use `git diff` or `openspec diff <proposal_id>` to get change summary.
- Use `git diff` or `/opsx:diff <proposal_id>` to get change summary.
- Load relevant spec constraints and PBT properties from `openspec/changes/<id>/specs/`.
3. **Multi-Model Review (PARALLEL)**
@@ -113,8 +113,8 @@ Review is complete when:
- [ ] User decision captured (archive / return to impl / defer)
**Reference**
- View proposal: `openspec show <id>`
- View proposal: `/opsx:show <id>`
- Check spec constraints: `rg -n "CONSTRAINT:|MUST|INVARIANT:" openspec/changes/<id>/specs/`
- View implementation diff: `openspec diff <id>` or `git diff`
- View implementation diff: `/opsx:diff <id>` or `git diff`
- Archive (after passing): `/ccg:spec-impl` → Step 10
<!-- CCG:SPEC:REVIEW:END -->