mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
docs: Remove deprecated CLI commands, clarify semantic invocation
Addresses issue #33 - /cli:mode:bug-diagnosis command not found Changes: - Remove deprecated /cli:* commands (/cli:analyze, /cli:chat, /cli:execute, /cli:codex-execute, /cli:discuss-plan, /cli:mode:*) from documentation - Only /cli:cli-init remains as the sole CLI command - Update all references to use /workflow:lite-plan, /workflow:lite-fix - Clarify that CLI tools are now invoked through semantic invocation (natural language) - Claude auto-selects Gemini/Qwen/Codex with templates - Update COMMAND_SPEC.md, COMMAND_REFERENCE.md, GETTING_STARTED*.md, FAQ.md, WORKFLOW_DECISION_GUIDE*.md, workflow-architecture.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -782,15 +782,11 @@ All workflows use the same file structure definition regardless of complexity. *
|
||||
|
||||
**Examples**:
|
||||
|
||||
*Analysis Commands (read-only):*
|
||||
- `/cli:analyze "security"` (no session) → `.scratchpad/analyze-security-20250105-143022.md`
|
||||
- `/cli:chat "build process"` (unrelated to active session) → `.scratchpad/chat-build-process-20250105-143045.md`
|
||||
- `/cli:mode:plan "feature idea"` (exploratory) → `.scratchpad/plan-feature-idea-20250105-143110.md`
|
||||
- `/cli:mode:code-analysis "trace auth flow"` (no session) → `.scratchpad/code-analysis-auth-flow-20250105-143130.md`
|
||||
*Workflow Commands (lightweight):*
|
||||
- `/workflow:lite-plan "feature idea"` (exploratory) → `.scratchpad/lite-plan-feature-idea-20250105-143110.md`
|
||||
- `/workflow:lite-fix "bug description"` (bug fixing) → `.scratchpad/lite-fix-bug-20250105-143130.md`
|
||||
|
||||
*Implementation Commands (⚠️ modifies code):*
|
||||
- `/cli:execute "implement JWT auth"` (no session) → `.scratchpad/execute-jwt-auth-20250105-143200.md`
|
||||
- `/cli:codex-execute "refactor API layer"` (no session) → `.scratchpad/codex-execute-api-refactor-20250105-143230.md`
|
||||
> **Note**: Direct CLI commands (`/cli:analyze`, `/cli:execute`, etc.) have been replaced by semantic invocation and workflow commands.
|
||||
|
||||
**Maintenance**:
|
||||
- Periodically review and clean up old scratchpad files
|
||||
|
||||
@@ -4,21 +4,13 @@ This document provides a comprehensive reference for all commands available in t
|
||||
|
||||
> **Version 5.9.6 Update**: Enhanced review cycle with dashboards, optimized lite-plan with parallel execution, and added lite-fix workflow for intelligent bug diagnosis.
|
||||
|
||||
## Unified CLI Commands (`/cli:*`)
|
||||
|
||||
These commands provide direct access to AI tools for quick analysis and interaction without initiating a full workflow.
|
||||
## CLI Commands (`/cli:*`)
|
||||
|
||||
| Command | Description |
|
||||
|---|---|
|
||||
| `/cli:analyze` | Quick codebase analysis using CLI tools (codex/gemini/qwen). |
|
||||
| `/cli:chat` | Simple CLI interaction command for direct codebase analysis. |
|
||||
| `/cli:cli-init`| Initialize CLI tool configurations (Gemini and Qwen) based on workspace analysis. |
|
||||
| `/cli:codex-execute` | Automated task decomposition and execution with Codex using resume mechanism. |
|
||||
| `/cli:discuss-plan` | Orchestrates an iterative, multi-model discussion for planning and analysis without implementation. |
|
||||
| `/cli:execute` | Auto-execution of implementation tasks with YOLO permissions and intelligent context inference. |
|
||||
| `/cli:mode:bug-diagnosis` | Bug analysis and fix suggestions using CLI tools. |
|
||||
| `/cli:mode:code-analysis` | Deep code analysis and debugging using CLI tools with specialized template. |
|
||||
| `/cli:mode:plan` | Project planning and architecture analysis using CLI tools. |
|
||||
|
||||
> **Note**: For analysis, planning, and bug fixing, use workflow commands (`/workflow:lite-plan`, `/workflow:lite-fix`) or semantic invocation through natural language.
|
||||
|
||||
## Workflow Commands (`/workflow:*`)
|
||||
|
||||
|
||||
@@ -191,25 +191,7 @@ Commands for creating, listing, and managing workflow sessions.
|
||||
|
||||
## 5. CLI Commands
|
||||
|
||||
Direct access to AI tools for analysis and code interaction without a full workflow structure.
|
||||
|
||||
### **/cli:analyze**
|
||||
- **Syntax**: `/cli:analyze [--agent] [--tool codex|gemini|qwen] [--enhance] <analysis target>`
|
||||
- **Responsibilities**: Performs read-only codebase analysis. Can operate in standard mode (direct tool call) or agent mode (`@cli-execution-agent`) for automated context discovery.
|
||||
- **Agent Calls**: `@cli-execution-agent` (if `--agent` is used).
|
||||
- **Example**:
|
||||
```bash
|
||||
/cli:analyze "authentication patterns"
|
||||
```
|
||||
|
||||
### **/cli:chat**
|
||||
- **Syntax**: `/cli:chat [--agent] [--tool codex|gemini|qwen] [--enhance] <inquiry>`
|
||||
- **Responsibilities**: Provides a direct Q&A interface with AI tools for codebase questions. Read-only.
|
||||
- **Agent Calls**: `@cli-execution-agent` (if `--agent` is used).
|
||||
- **Example**:
|
||||
```bash
|
||||
/cli:chat "how does the caching layer work?"
|
||||
```
|
||||
CLI tool configuration commands.
|
||||
|
||||
### **/cli:cli-init**
|
||||
- **Syntax**: `/cli:cli-init [--tool gemini|qwen|all] [--output path] [--preview]`
|
||||
@@ -220,59 +202,7 @@ Direct access to AI tools for analysis and code interaction without a full workf
|
||||
/cli:cli-init
|
||||
```
|
||||
|
||||
### **/cli:codex-execute**
|
||||
- **Syntax**: `/cli:codex-execute [--verify-git] <description|task-id>`
|
||||
- **Responsibilities**: Orchestrates automated task decomposition and sequential execution using Codex. It uses the `resume --last` mechanism for context continuity between subtasks.
|
||||
- **Agent Calls**: None directly, but orchestrates `codex` CLI tool.
|
||||
- **Example**:
|
||||
```bash
|
||||
/cli:codex-execute "implement user authentication system"
|
||||
```
|
||||
|
||||
### **/cli:discuss-plan**
|
||||
- **Syntax**: `/cli:discuss-plan [--topic '...'] [--task-id '...'] [--rounds N] <input>`
|
||||
- **Responsibilities**: Orchestrates an iterative, multi-model (Gemini, Codex, Claude) discussion to perform deep analysis and planning without modifying code.
|
||||
- **Agent Calls**: None directly, but orchestrates `gemini` and `codex` CLI tools.
|
||||
- **Example**:
|
||||
```bash
|
||||
/cli:discuss-plan --topic "Design a new caching layer"
|
||||
```
|
||||
|
||||
### **/cli:execute**
|
||||
- **Syntax**: `/cli:execute [--agent] [--tool codex|gemini|qwen] [--enhance] <description|task-id>`
|
||||
- **Responsibilities**: Executes implementation tasks with auto-approval (`YOLO` mode). **MODIFIES CODE**.
|
||||
- **Agent Calls**: `@cli-execution-agent` (if `--agent` is used).
|
||||
- **Example**:
|
||||
```bash
|
||||
/cli:execute "implement JWT authentication with middleware"
|
||||
```
|
||||
|
||||
### **/cli:mode:bug-diagnosis**
|
||||
- **Syntax**: `/cli:mode:bug-diagnosis [--tool ...] [--enhance] [--cd path] <bug description>`
|
||||
- **Responsibilities**: Performs systematic bug analysis using the `bug-fix.md` template. Read-only.
|
||||
- **Agent Calls**: `@cli-execution-agent` (default).
|
||||
- **Example**:
|
||||
```bash
|
||||
/cli:mode:bug-diagnosis "null pointer error in login flow"
|
||||
```
|
||||
|
||||
### **/cli:mode:code-analysis**
|
||||
- **Syntax**: `/cli:mode:code-analysis [--agent] [--tool ...] [--enhance] [--cd path] <analysis target>`
|
||||
- **Responsibilities**: Performs deep code analysis and execution path tracing using the `code-analysis.md` template. Read-only.
|
||||
- **Agent Calls**: `@cli-execution-agent` (if `--agent` is used).
|
||||
- **Example**:
|
||||
```bash
|
||||
/cli:mode:code-analysis "trace authentication execution flow"
|
||||
```
|
||||
|
||||
### **/cli:mode:plan**
|
||||
- **Syntax**: `/cli:mode:plan [--agent] [--tool ...] [--enhance] [--cd path] <topic>`
|
||||
- **Responsibilities**: Performs comprehensive planning and architecture analysis using the `plan.md` template. Read-only.
|
||||
- **Agent Calls**: `@cli-execution-agent` (if `--agent` is used).
|
||||
- **Example**:
|
||||
```bash
|
||||
/cli:mode:plan "design user dashboard architecture"
|
||||
```
|
||||
> **Note**: For analysis, planning, and bug fixing, use workflow commands (`/workflow:lite-plan`, `/workflow:lite-fix`) or semantic invocation through natural language. Claude will automatically use appropriate CLI tools (Gemini/Qwen/Codex) with templates as needed.
|
||||
|
||||
---
|
||||
|
||||
@@ -380,13 +310,14 @@ Commands for managing individual tasks within a workflow session.
|
||||
```
|
||||
|
||||
### **/enhance-prompt**
|
||||
- **Syntax**: `/enhance-prompt <user input>`
|
||||
- **Responsibilities**: A system-level skill that enhances a user's prompt by adding context from session memory and codebase analysis. It is typically triggered automatically by other commands that include the `--enhance` flag.
|
||||
- **Skill Invocation**: This is a core skill, invoked when `--enhance` is used.
|
||||
- **Syntax**: `/enhance-prompt <user input>` or use `-e` flag in conversation
|
||||
- **Responsibilities**: A system-level skill that enhances a user's prompt by adding context from session memory and codebase analysis. It is typically triggered by the `-e` flag in natural conversation.
|
||||
- **Skill Invocation**: This is a core skill, invoked when `-e` is used in conversation.
|
||||
- **Agent Calls**: None.
|
||||
- **Example (as part of another command)**:
|
||||
```bash
|
||||
/cli:execute --enhance "fix the login button"
|
||||
- **Example (in natural conversation)**:
|
||||
```
|
||||
User: "fix the login button -e"
|
||||
→ Prompt-enhancer expands and enhances the request
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
24
FAQ.md
24
FAQ.md
@@ -248,16 +248,16 @@ CCW-help
|
||||
### What's the difference between `/cli:*` and `/workflow:*` commands?
|
||||
|
||||
**`/cli:*` commands**:
|
||||
- Direct access to external AI tools
|
||||
- No workflow session required
|
||||
- Quick one-off tasks
|
||||
- Examples: `/cli:analyze`, `/cli:chat`
|
||||
- CLI tool configuration
|
||||
- Example: `/cli:cli-init` (initialize Gemini/Qwen configurations)
|
||||
|
||||
**`/workflow:*` commands**:
|
||||
- Multi-phase orchestration
|
||||
- Session-based
|
||||
- Complex development workflows
|
||||
- Examples: `/workflow:plan`, `/workflow:execute`
|
||||
- Examples: `/workflow:plan`, `/workflow:lite-plan`, `/workflow:lite-fix`
|
||||
|
||||
> **Note**: Most CLI commands have been replaced by **semantic invocation**. Simply describe your needs in natural language, and Claude will automatically use the appropriate tools.
|
||||
|
||||
### How do I use command flags?
|
||||
|
||||
@@ -270,9 +270,6 @@ Most commands support flags for customization:
|
||||
# With CLI execution flag
|
||||
/workflow:plan --cli-execute "Feature description"
|
||||
|
||||
# With tool selection
|
||||
/cli:analyze --tool gemini "Code analysis"
|
||||
|
||||
# With multiple flags
|
||||
/workflow:ui-design:explore-auto --prompt "Login page" --style-variants 3 --layout-variants 2
|
||||
```
|
||||
@@ -281,17 +278,12 @@ Most commands support flags for customization:
|
||||
|
||||
**Yes!** Claude understands semantic invocation:
|
||||
|
||||
Instead of:
|
||||
```bash
|
||||
/cli:analyze --tool gemini "Authentication module"
|
||||
```
|
||||
|
||||
You can say:
|
||||
Instead of using specific commands, you can say:
|
||||
```
|
||||
"Use Gemini to analyze the authentication module architecture"
|
||||
```
|
||||
|
||||
Claude will automatically execute the appropriate command.
|
||||
Claude will automatically select and execute the appropriate CLI tools (Gemini/Qwen/Codex) with optimized templates.
|
||||
|
||||
### What does the `-e` or `--enhance` flag do?
|
||||
|
||||
@@ -303,8 +295,6 @@ User: "Analyze authentication module -e"
|
||||
|
||||
Claude will expand and enhance your request for better results.
|
||||
|
||||
**Note**: `--enhance` in CLI commands (e.g., `/cli:analyze --enhance`) is a different feature built into CLI tools.
|
||||
|
||||
---
|
||||
|
||||
## 📦 Sessions & Tasks
|
||||
|
||||
@@ -178,62 +178,36 @@ After planning, validate your implementation plan for consistency and completene
|
||||
Quick bug analysis and fix workflow:
|
||||
|
||||
```bash
|
||||
# Analyze the bug
|
||||
/cli:mode:bug-diagnosis "Incorrect success message with wrong password"
|
||||
# Lightweight bug fix workflow with intelligent diagnosis
|
||||
/workflow:lite-fix "Incorrect success message with wrong password"
|
||||
|
||||
# Claude will analyze and then directly implement the fix based on the analysis
|
||||
# Claude will analyze severity, diagnose root cause, and implement the fix
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Workflow-Free Usage: Standalone Tools
|
||||
## 🔧 Lightweight Commands
|
||||
|
||||
Beyond the full workflow mode, CCW provides standalone CLI tools and commands suitable for quick analysis, ad-hoc queries, and routine maintenance tasks.
|
||||
Beyond the full workflow mode, CCW provides lightweight commands suitable for quick analysis and routine tasks.
|
||||
|
||||
### Direct CLI Tool Invocation
|
||||
### Workflow Commands for Quick Tasks
|
||||
|
||||
CCW supports direct invocation of external AI tools (Gemini, Qwen, Codex) through a unified CLI interface without creating workflow sessions.
|
||||
|
||||
#### Code Analysis
|
||||
|
||||
Quickly analyze project code structure and architectural patterns:
|
||||
Use workflow commands for integrated planning and bug fixing:
|
||||
|
||||
```bash
|
||||
# Code analysis with Gemini
|
||||
/cli:analyze --tool gemini "Analyze authentication module architecture"
|
||||
# Lightweight planning workflow
|
||||
/workflow:lite-plan "Design a scalable microservices architecture"
|
||||
|
||||
# Code quality analysis with Qwen
|
||||
/cli:analyze --tool qwen "Review database model design for best practices"
|
||||
# Bug fix workflow with intelligent diagnosis
|
||||
/workflow:lite-fix "Analyze potential causes of memory leak"
|
||||
|
||||
# Initialize CLI tool configurations
|
||||
/cli:cli-init
|
||||
```
|
||||
|
||||
#### Interactive Chat
|
||||
### Semantic Tool Invocation (Replaces Direct CLI Commands)
|
||||
|
||||
Direct interactive dialogue with AI tools:
|
||||
|
||||
```bash
|
||||
# Chat with Gemini
|
||||
/cli:chat --tool gemini "Explain React Hook use cases"
|
||||
|
||||
# Discuss implementation with Codex
|
||||
/cli:chat --tool codex "How to optimize this query performance"
|
||||
```
|
||||
|
||||
#### Specialized Analysis Modes
|
||||
|
||||
Use specific analysis modes for in-depth exploration:
|
||||
|
||||
```bash
|
||||
# Architecture planning mode
|
||||
/cli:mode:plan --tool gemini "Design a scalable microservices architecture"
|
||||
|
||||
# Deep code analysis
|
||||
/cli:mode:code-analysis --tool qwen "Analyze utility functions in src/utils/"
|
||||
|
||||
# Bug analysis mode
|
||||
/cli:mode:bug-index --tool gemini "Analyze potential causes of memory leak"
|
||||
```
|
||||
|
||||
### Semantic Tool Invocation
|
||||
> **Important**: Direct CLI commands (`/cli:analyze`, `/cli:chat`, `/cli:execute`, etc.) have been replaced by **semantic invocation**. Simply describe your needs in natural language, and Claude will automatically select and execute the appropriate CLI tools (Gemini/Qwen/Codex) with optimized templates.
|
||||
|
||||
Users can tell Claude to use specific tools through natural language, and Claude will understand the intent and automatically execute the appropriate commands.
|
||||
|
||||
@@ -381,13 +355,7 @@ User: "Analyze authentication module -e"
|
||||
→ AI uses prompt-enhancer skill to expand the request
|
||||
```
|
||||
|
||||
**CLI Command Enhancement** (built-in CLI feature):
|
||||
```bash
|
||||
# The --enhance flag here is a CLI parameter, not a skill trigger
|
||||
/cli:analyze --enhance "check for security issues"
|
||||
```
|
||||
|
||||
**Important Note**: The `-e` flag works in natural conversation, but `--enhance` in CLI commands is a separate enhancement mechanism, not the skill system.
|
||||
**Important Note**: The `-e` flag works in natural conversation to trigger the prompt-enhancer skill.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -188,62 +188,36 @@
|
||||
快速 Bug 分析和修复工作流:
|
||||
|
||||
```bash
|
||||
# 分析 Bug
|
||||
/cli:mode:bug-diagnosis "密码错误时仍显示成功消息"
|
||||
# 轻量级 Bug 修复工作流,带智能诊断
|
||||
/workflow:lite-fix "密码错误时仍显示成功消息"
|
||||
|
||||
# Claude 会分析后直接根据分析结果实现修复
|
||||
# Claude 会分析严重程度,诊断根因,并实现修复
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔧 无工作流协作:独立工具使用
|
||||
## 🔧 轻量级命令
|
||||
|
||||
除了完整的工作流模式,CCW 还提供独立的 CLI 工具和命令,适合快速分析、临时查询和日常维护任务。
|
||||
除了完整的工作流模式,CCW 还提供轻量级命令,适合快速分析和日常任务。
|
||||
|
||||
### CLI 工具直接调用
|
||||
### 快速任务工作流命令
|
||||
|
||||
CCW 支持通过统一的 CLI 接口直接调用外部 AI 工具(Gemini、Qwen、Codex),无需创建工作流会话。
|
||||
|
||||
#### 代码分析
|
||||
|
||||
快速分析项目代码结构和架构模式:
|
||||
使用工作流命令进行集成规划和 Bug 修复:
|
||||
|
||||
```bash
|
||||
# 使用 Gemini 进行代码分析
|
||||
/cli:analyze --tool gemini "分析认证模块的架构设计"
|
||||
# 轻量级规划工作流
|
||||
/workflow:lite-plan "设计一个可扩展的微服务架构"
|
||||
|
||||
# 使用 Qwen 分析代码质量
|
||||
/cli:analyze --tool qwen "检查数据库模型的设计是否合理"
|
||||
# 带智能诊断的 Bug 修复工作流
|
||||
/workflow:lite-fix "分析内存泄漏问题的可能原因"
|
||||
|
||||
# 初始化 CLI 工具配置
|
||||
/cli:cli-init
|
||||
```
|
||||
|
||||
#### 交互式对话
|
||||
### 语义调用(替代直接 CLI 命令)
|
||||
|
||||
与 AI 工具进行直接交互式对话:
|
||||
|
||||
```bash
|
||||
# 与 Gemini 交互
|
||||
/cli:chat --tool gemini "解释一下 React Hook 的使用场景"
|
||||
|
||||
# 与 Codex 交互讨论实现方案
|
||||
/cli:chat --tool codex "如何优化这个查询性能"
|
||||
```
|
||||
|
||||
#### 专业模式分析
|
||||
|
||||
使用特定的分析模式进行深度探索:
|
||||
|
||||
```bash
|
||||
# 架构分析模式
|
||||
/cli:mode:plan --tool gemini "设计一个可扩展的微服务架构"
|
||||
|
||||
# 深度代码分析
|
||||
/cli:mode:code-analysis --tool qwen "分析 src/utils/ 目录下的工具函数"
|
||||
|
||||
# Bug 分析模式
|
||||
/cli:mode:bug-diagnosis --tool gemini "分析内存泄漏问题的可能原因"
|
||||
```
|
||||
|
||||
### 工具语义调用
|
||||
> **重要**: 直接 CLI 命令(`/cli:analyze`、`/cli:chat`、`/cli:execute` 等)已被**语义调用**替代。只需使用自然语言描述您的需求,Claude 会自动选择并执行合适的 CLI 工具(Gemini/Qwen/Codex)和优化的模板。
|
||||
|
||||
用户可以通过自然语言告诉 Claude 使用特定工具完成任务,Claude 会理解意图并自动执行相应的命令。
|
||||
|
||||
@@ -391,13 +365,7 @@ CCW 使用分层的 CLAUDE.md 文档系统维护项目上下文。定期更新
|
||||
→ AI 使用 prompt-enhancer 技能扩展请求
|
||||
```
|
||||
|
||||
**CLI 命令增强** (CLI 内置功能):
|
||||
```bash
|
||||
# 这里的 --enhance 标识符是 CLI 参数,不是技能触发器
|
||||
/cli:analyze --enhance "检查安全问题"
|
||||
```
|
||||
|
||||
**重要说明**:`-e` 标识符仅在自然对话中有效,而 CLI 命令中的 `--enhance` 是独立的增强机制,与技能系统无关。
|
||||
**重要说明**:`-e` 标识符用于在自然对话中触发 prompt-enhancer 技能。
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ flowchart TD
|
||||
BugFix --> BugSeverity{了解问题根因?}
|
||||
BugSeverity -->|清楚| LiteFix[/ /workflow:lite-fix<br>标准Bug修复 /]
|
||||
BugSeverity -->|生产事故| HotFix[/ /workflow:lite-fix --hotfix<br>热修复模式 /]
|
||||
BugSeverity -->|不清楚| BugDiag[/ /cli:mode:bug-diagnosis<br>先诊断根因 /]
|
||||
BugSeverity -->|不清楚| BugDiag[/ /workflow:lite-fix<br>自动诊断根因 /]
|
||||
|
||||
BugDiag --> LiteFix
|
||||
LiteFix --> BugComplete[Bug修复完成]
|
||||
@@ -142,7 +142,7 @@ flowchart TD
|
||||
|------|------|------|
|
||||
| 🐛 **标准Bug修复** | `/workflow:lite-fix "bug描述"` | 自适应严重性评估,完整诊断→影响评估→修复→验证 |
|
||||
| 🔥 **生产热修复** | `/workflow:lite-fix --hotfix "bug描述"` | 最小化诊断,快速修复,自动生成跟进任务 |
|
||||
| ❓ **根因不清楚** | `/cli:mode:bug-diagnosis` → `/workflow:lite-fix` | 先深度诊断,再执行修复 |
|
||||
| ❓ **根因不清楚** | `/workflow:lite-fix` | 自动进行深度诊断并执行修复 |
|
||||
| ✅ **功能开发** | 继续后续流程 | 不是Bug修复,按正常开发流程 |
|
||||
|
||||
**Lite-Fix 工作流特性**:
|
||||
@@ -171,16 +171,16 @@ flowchart TD
|
||||
→ 最小化诊断 → 假设 Critical → 手术式修复 → 烟雾测试
|
||||
→ 自动生成: 全面修复任务(3天内)+ 事后分析(1周内)
|
||||
|
||||
# 根因不清楚(先诊断)
|
||||
/cli:mode:bug-diagnosis --tool gemini "购物车随机丢失商品"
|
||||
→ 深度诊断报告 → /workflow:lite-fix "修复购物车状态同步问题"
|
||||
# 根因不清楚(lite-fix 自动诊断)
|
||||
/workflow:lite-fix "购物车随机丢失商品"
|
||||
→ 自动深度诊断 → 识别根因 → 实现修复
|
||||
```
|
||||
|
||||
**何时使用 lite-fix**:
|
||||
- ✅ 任何有明确症状的Bug(自动适应严重性)
|
||||
- ✅ 本地化修复(1-5个文件)
|
||||
- ✅ 生产事故(使用 `--hotfix` 模式)
|
||||
- ❌ 根因完全不明 → 先用 `/cli:mode:bug-diagnosis`
|
||||
- ✅ 根因不清楚(自动进行深度诊断)
|
||||
- ❌ 需要架构变更 → 用 `/workflow:plan --mode bugfix`
|
||||
|
||||
---
|
||||
@@ -416,33 +416,24 @@ Phase 1: Gemini 分析 ──┐
|
||||
→ Claude Code 自动生成:codex -C src/auth --full-auto exec "实现注册"
|
||||
```
|
||||
|
||||
**方式二:直接命令调用**
|
||||
|
||||
```bash
|
||||
# 通过 Slash 命令精准调用
|
||||
/cli:chat --tool gemini "解释这个算法"
|
||||
/cli:analyze --tool qwen "分析性能瓶颈"
|
||||
/cli:execute --tool codex "优化查询性能"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
#### 🔗 CLI 结果作为上下文(Memory)
|
||||
#### 🔗 语义调用与结果上下文(Memory)
|
||||
|
||||
CLI 工具的分析结果可以被保存并作为后续操作的上下文(memory),实现智能化的工作流程:
|
||||
通过自然语言描述,Claude 会自动选择并执行适当的 CLI 工具(Gemini/Qwen/Codex),分析结果作为后续操作的上下文。
|
||||
|
||||
**1. 结果持久化**
|
||||
**1. 语义调用示例**
|
||||
|
||||
```bash
|
||||
# CLI 执行结果自动保存到会话目录
|
||||
/cli:chat --tool gemini "分析认证模块架构"
|
||||
→ 保存到:.workflow/active/WFS-xxx/.chat/chat-[timestamp].md
|
||||
# 用自然语言描述需求,Claude 自动选择工具
|
||||
"使用 gemini 分析认证模块架构"
|
||||
→ Claude 自动执行 Gemini CLI 并保存结果
|
||||
|
||||
/cli:analyze --tool qwen "评估性能瓶颈"
|
||||
→ 保存到:.workflow/active/WFS-xxx/.chat/analyze-[timestamp].md
|
||||
"让 qwen 评估性能瓶颈"
|
||||
→ Claude 自动执行 Qwen CLI 并保存结果
|
||||
|
||||
/cli:execute --tool codex "实现功能"
|
||||
→ 保存到:.workflow/active/WFS-xxx/.chat/execute-[timestamp].md
|
||||
"用 codex 实现这个功能"
|
||||
→ Claude 自动执行 Codex CLI
|
||||
```
|
||||
|
||||
**2. 结果作为规划依据**
|
||||
@@ -476,8 +467,8 @@ CLI 工具的分析结果可以被保存并作为后续操作的上下文(memo
|
||||
|
||||
```bash
|
||||
# 引用历史会话的分析结果
|
||||
/cli:execute --tool codex "参考 WFS-2024-001 中的架构分析,实现新的支付模块"
|
||||
→ 系统自动加载指定会话的上下文
|
||||
"参考 WFS-2024-001 中的架构分析,用 codex 实现新的支付模块"
|
||||
→ Claude 自动加载指定会话的上下文
|
||||
→ 基于历史分析进行实现
|
||||
```
|
||||
|
||||
|
||||
@@ -348,33 +348,24 @@ Phase 1: Gemini analysis ──┐
|
||||
→ Claude Code auto-generates: codex -C src/auth --full-auto exec "Implement registration"
|
||||
```
|
||||
|
||||
**Method 2: Direct Command Invocation**
|
||||
|
||||
```bash
|
||||
# Precise invocation via Slash commands
|
||||
/cli:chat --tool gemini "Explain this algorithm"
|
||||
/cli:analyze --tool qwen "Analyze performance bottlenecks"
|
||||
/cli:execute --tool codex "Optimize query performance"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
#### 🔗 CLI Results as Context (Memory)
|
||||
#### 🔗 Semantic Invocation & Results Context (Memory)
|
||||
|
||||
CLI tool analysis results can be saved and used as context (memory) for subsequent operations, enabling intelligent workflows:
|
||||
Through natural language, Claude automatically selects and executes appropriate CLI tools (Gemini/Qwen/Codex), with results serving as context for subsequent operations.
|
||||
|
||||
**1. Result Persistence**
|
||||
**1. Semantic Invocation Examples**
|
||||
|
||||
```bash
|
||||
# CLI execution results automatically saved to session directory
|
||||
/cli:chat --tool gemini "Analyze authentication module architecture"
|
||||
→ Saved to: .workflow/active/WFS-xxx/.chat/chat-[timestamp].md
|
||||
# Describe needs in natural language, Claude auto-selects tools
|
||||
"Use gemini to analyze authentication module architecture"
|
||||
→ Claude auto-executes Gemini CLI and saves results
|
||||
|
||||
/cli:analyze --tool qwen "Evaluate performance bottlenecks"
|
||||
→ Saved to: .workflow/active/WFS-xxx/.chat/analyze-[timestamp].md
|
||||
"Have qwen evaluate performance bottlenecks"
|
||||
→ Claude auto-executes Qwen CLI and saves results
|
||||
|
||||
/cli:execute --tool codex "Implement feature"
|
||||
→ Saved to: .workflow/active/WFS-xxx/.chat/execute-[timestamp].md
|
||||
"Use codex to implement this feature"
|
||||
→ Claude auto-executes Codex CLI
|
||||
```
|
||||
|
||||
**2. Results as Planning Basis**
|
||||
@@ -408,8 +399,8 @@ Have codex synthesize above Gemini and Qwen analyses to implement optimal soluti
|
||||
|
||||
```bash
|
||||
# Reference historical session analysis results
|
||||
/cli:execute --tool codex "Refer to architecture analysis in WFS-2024-001, implement new payment module"
|
||||
→ System automatically loads specified session context
|
||||
"Refer to architecture analysis in WFS-2024-001, use codex to implement new payment module"
|
||||
→ Claude automatically loads specified session context
|
||||
→ Implement based on historical analysis
|
||||
```
|
||||
|
||||
@@ -630,16 +621,13 @@ Use gemini to review code quality
|
||||
### Scenario D: Bug Fixing
|
||||
|
||||
```bash
|
||||
# 1. Diagnosis
|
||||
/cli:mode:bug-diagnosis --tool gemini "User login fails with token expired error"
|
||||
# 1. Intelligent bug fix workflow (includes diagnosis)
|
||||
/workflow:lite-fix "User login fails with token expired error"
|
||||
|
||||
# 2. Quick fix
|
||||
/workflow:lite-plan "Fix JWT token expiration validation logic"
|
||||
|
||||
# 3. Test fix
|
||||
# 2. Test fix (if needed)
|
||||
/workflow:test-cycle-execute
|
||||
|
||||
# 4. Complete
|
||||
# 3. Complete
|
||||
```
|
||||
|
||||
---
|
||||
@@ -654,7 +642,7 @@ Use gemini to review code quality
|
||||
| ❓ Know what, don't know how | `/workflow:brainstorm:auto-parallel "Design technical solution"` |
|
||||
| ✅ Know what and how | `/workflow:plan "Specific implementation description"` |
|
||||
| ⚡ Simple, clear small task | `/workflow:lite-plan "Task description"` |
|
||||
| 🐛 Bug fixing | `/cli:mode:bug-diagnosis` + `/workflow:lite-plan` |
|
||||
| 🐛 Bug fixing | `/workflow:lite-fix "bug description"` |
|
||||
|
||||
### Choose by Project Phase
|
||||
|
||||
|
||||
Reference in New Issue
Block a user