diff --git a/CHANGELOG.md b/CHANGELOG.md index a019df8..25882e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 ` → `/opsx:show ` + - `openspec status --change ` → `/opsx:status ` + - `openspec new change` → `/opsx:new` + - `openspec validate ` → `/opsx:validate ` + - `openspec diff ` → `/opsx:diff ` + - `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 ### 🐛 修复 diff --git a/README.md b/README.md index 3758371..49ecc07 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/package.json b/package.json index 52ec962..15fb65a 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/templates/commands/spec-impl.md b/templates/commands/spec-impl.md index d8f8415..1c2ca6a 100644 --- a/templates/commands/spec-impl.md +++ b/templates/commands/spec-impl.md @@ -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 ` to review tasks. + - Run `/opsx:show ` 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 ` -- Validate before archive: `openspec validate ` -- View active changes: `openspec list` +- Check task status: `/opsx:show ` +- Validate before archive: `/opsx:validate ` +- View active changes: `/opsx:list` - Search existing patterns: `rg -n "function|class" ` **Exit Criteria** diff --git a/templates/commands/spec-init.md b/templates/commands/spec-init.md index 3cb64ca..9cdca04 100644 --- a/templates/commands/spec-init.md +++ b/templates/commands/spec-init.md @@ -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 diff --git a/templates/commands/spec-plan.md b/templates/commands/spec-plan.md index ef0b659..056ecc6 100644 --- a/templates/commands/spec-plan.md +++ b/templates/commands/spec-plan.md @@ -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 ` to review current state. + - Run `/opsx:status ` 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 --verbose` -- Check conflicts: `openspec workflow schemas` +- Inspect change: `/opsx:status ` +- Check conflicts: `/opsx:schemas` - Search patterns: `rg -n "INVARIANT:|PROPERTY:" openspec/` - Use `AskUserQuestion` for ANY ambiguity—never assume diff --git a/templates/commands/spec-research.md b/templates/commands/spec-research.md index b24f178..71f32bf 100644 --- a/templates/commands/spec-research.md +++ b/templates/commands/spec-research.md @@ -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 "" + ``` - This scaffolds `openspec/changes//` 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 diff --git a/templates/commands/spec-review.md b/templates/commands/spec-review.md index d8fc708..1ef95d0 100644 --- a/templates/commands/spec-review.md +++ b/templates/commands/spec-review.md @@ -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 ` to load spec and tasks. + - Run `/opsx:show ` to load spec and tasks. 2. **Collect Implementation Artifacts** - Identify all files modified by this proposal. - - Use `git diff` or `openspec diff ` to get change summary. + - Use `git diff` or `/opsx:diff ` to get change summary. - Load relevant spec constraints and PBT properties from `openspec/changes//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 ` +- View proposal: `/opsx:show ` - Check spec constraints: `rg -n "CONSTRAINT:|MUST|INVARIANT:" openspec/changes//specs/` -- View implementation diff: `openspec diff ` or `git diff` +- View implementation diff: `/opsx:diff ` or `git diff` - Archive (after passing): `/ccg:spec-impl` → Step 10