v0.0:初始版本

This commit is contained in:
GuDaStudio
2026-01-22 17:31:11 +08:00
commit 743c8a48fc
26 changed files with 992 additions and 0 deletions

235
docs/README_EN.md Normal file
View File

@@ -0,0 +1,235 @@
<div align="center">
![](../images/title.png)
**Based on RPI and Effective Context Theory, Let Claude Code Focus on One Thing at a Time**
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Claude Code](https://img.shields.io/badge/Claude%20Code-Compatible-green.svg)](https://claude.ai/code) [![Share](https://img.shields.io/badge/share-000000?logo=x&logoColor=white)](https://x.com/intent/tweet?text=GudaStudio%20CommandsClaude%20Code%20Multi-Model%20Collaborative%20Workflow%20https://github.com/GuDaStudio/commands%20%23AI%20%23Coding%20%23ClaudeCode)
⭐ Star us on GitHub ~ Your support means a lot to us! 🙏😊
English | [简体中文](../README.md)
</div>
---
## 1. Introduction
**GudaStudio Commands** is a collection of Claude Code custom commands developed by **GudaStudio**. The core command `gudaspec` implements a complete workflow based on **RPI (Research-Plan-Implementation) Coding Theory**, integrating OpenSpec and multi-model collaboration to make Claude Code **more suitable for complex scenarios and long-duration coding tasks**. Additionally, this project introduces a *human-centric* operational philosophy, allowing users to manually segment context across multiple phases, **maximizing Claude Code's effective context window (~80K)!** Check out the usage examples for full features!
### gudaspec Command Set
| Command | Function |
|---------|----------|
| `/gudaspec:init` | Initialize OpenSpec environment, verify MCP tool availability |
| `/gudaspec:research` | Parallel codebase exploration, transform requirements into constraint sets |
| `/gudaspec:plan` | Multi-model analysis, generate zero-decision execution plans with PBT properties |
| `/gudaspec:implementation` | Multi-model collaborative implementation, refactor prototypes into production-grade code |
---
## 2. Quick Start
### 0. Prerequisites
- [Claude Code](https://docs.claude.com/docs/claude-code) (v2.1.15+)
- [Auggie MCP](https://docs.augmentcode.com/context-services/mcp/quickstart-claude-code)
### 1. Clone the Repository
```bash
git clone https://github.com/GuDaStudio/commands
cd commands
```
### 2. Install Commands
<details>
<summary><b>Linux / macOS</b></summary>
```bash
# User-level installation (applies to all projects)
./install.sh --user
# Project-level installation (applies to current project only)
./install.sh --project
# Custom path
./install.sh --target /your/custom/path
```
</details>
<details>
<summary><b>Windows (PowerShell)</b></summary>
```powershell
# User-level installation (applies to all projects)
.\install.ps1 -User
# Project-level installation (applies to current project only)
.\install.ps1 -Project
# Custom path
.\install.ps1 -Target C:\your\custom\path
```
</details>
<details>
<summary>Parameter Reference</summary>
| Bash | PowerShell | Short | Description |
|------|------------|-------|-------------|
| `--user` | `-User` | `-u` | Install to user-level directory (`~/.claude/commands/`) |
| `--project` | `-Project` | `-p` | Install to project-level directory (`./.claude/commands/`) |
| `--target <path>` | `-Target <path>` | `-t` | Install to custom path |
| `--help` | `-Help` | `-h` | Show help information |
</details>
### 3. Verify Installation
After launching Claude Code, type `/gudaspec` to view available commands.
### 4. Configure Global Prompt 🎊
Add the following prompt to `~/.claude/CLAUDE.md`:
````markdown
# CLAUDE.md
## 0. Global Protocols
All operations must strictly follow these system constraints:
- **Interaction Language**: Tool-model interactions MUST use **English**; user output MUST use **English**.
- **Multi-turn Conversations**: If a tool returns a persistent conversation field like `SESSION_ID`, it indicates the tool supports multi-turn conversations. Record this field and **force deliberation** in subsequent tool calls on whether to continue the conversation. For example, Codex/Gemini sometimes interrupt sessions during tool calls; if you don't get the needed response, continue the conversation.
- **Sandbox Security**: Codex/Gemini are PROHIBITED from performing write operations to the filesystem. All code retrieval must request `unified diff patch` format.
- **Code Sovereignty**: Code generated by external models serves only as logical reference (Prototype). Final delivered code **MUST be refactored** to ensure no redundancy and enterprise-grade standards.
- **Style Definition**: Overall code style is **always positioned** as lean, efficient, with zero redundancy. This requirement also applies to comments and documentation, and for these two, strictly follow the core principle of **form only when necessary**.
- **Targeted Changes Only**: PROHIBITED from affecting user's existing other functionalities.
- **Context Retrieval**: When calling `mcp__auggie-mcp__codebase-retrieval`, minimize the number of search/find/grep operations.
- **Judgment Basis**: Always use project code and grok search results as the basis for judgment. PROHIBITED from guessing based on general knowledge. Expressing uncertainty to users is allowed.
````
---
## 3. Usage Examples
The core philosophy of this project is **focusing effective context on one thing at a time**. This section will demonstrate the unique charm of this project using `Building a Visual Weather Page from Scratch` as an example! 😀
> All examples below use **Claude Opus 4.5**, and we **strongly recommend enabling reasoning mode to enhance Claude's instruction-following capability**!
### 0. Init - Project Initialization
**0.1** Enter the project, open Claude Code, and type `/gudaspec:init` to initialize gudaspec for this project.
![](../images/init0.png)
**0.2** Claude will automatically install `openspec` for you and detect whether `Codex-MCP` and `Gemini-MCP` are available.
![](../images/init1.png)
**0.3** This phase's task is complete. Type `/clear` to clear the current context and start a new conversation.
### 1. Research - Requirements Research
This phase aims to develop a preliminary understanding of user requirements based on existing code/initial information, and form a standard OpenSpec document.
**1.1** In the new conversation window, enter the following:
```
/gudaspec:research
I need to create a beautiful real-time weather display page. Requirements:
1. Real-time weather info must be real data, including temperature, humidity, etc.
2. Users can select from three cities: Beijing, Shanghai, Shenzhen
3. Four different basic weather conditions (windy, rainy, sunny, snowy) have different page displays
4. UI design is highly aesthetic, referencing Apple's top-tier frontend design
```
Claude will automatically research and generate a preliminary proposal in OpenSpec format.
![](../images/research0.png)
![](../images/research1.png)
**1.2** When your requirements contain obvious ambiguities, Claude will proactively seek your opinion.
![](../images/research3.png)
**1.3** Finally, Claude will generate a preliminary spec document for you. At this point, only *59.5K* of context has been used, still well within **Claude's most focused context length of 80K**. 🥳
![](../images/research4.png)
### 2. Plan - Planning
This phase's task is to completely eliminate uncertainty in user requirements and generate an executable plan, while providing verifiable properties for the plan.
**2.1** In a new conversation window, enter the following. Claude will automatically find the pending requirements for you.
```
/gudaspec:plan
```
![](../images/plan0.png)
**2.2** Claude will launch multi-model (Codex/Gemini) collaboration to analyze and refine the implementation approach in the preliminary requirements report.
![](../images/plan1.png)
**2.3** After obtaining analysis from multiple models, Claude will further refine the requirements to completely eliminate technical ambiguity.
![](../images/plan2.png)
**2.4** After all decision items are completed, Claude will extract Property-Based Testing properties for verification in subsequent phases.
![](../images/plan3.png)
**2.5** Until the plan becomes a zero-decision sequentially executable pipeline, Claude will generate the complete spec document. This phase's task is complete. Type `/clear` to clear the current context and start a new conversation window.
![](../images/plan4.png)
### 3. Implementation - Code Implementation
This phase's goal is to execute specific code implementation until user requirements are fulfilled.
**3.1** In a new conversation window, execute the following command. Claude will automatically identify pending requirement proposals for you.
```
/gudaspec:implementation
```
![](../images/imp0.png)
**3.2** Claude will automatically identify minimal verifiable tasks for incremental implementation, **helping you control context better!**
![](../images/imp1.png)
**3.3** After completing a phase task, Claude will pause and ask for your opinion on whether to continue. At this point, we **strongly recommend** you pay attention to the context window. **If it's less than 80K, you can continue to the next phase of implementation**; otherwise, you can type `/clear` to start a new conversation window and continue implementation from **3.1**.
![](../images/imp2.png)
**3.4** During the process, Claude will automatically enable multi-model code prototype retrieval (Frontend/UI → Gemini | Backend/Logic → Codex), and enable multi-model review after completing each phase task to ensure code reliability.
![](../images/imp3.png)
**3.5** Result showcase. Once all tasks are completed, we get a weather system with real data! 😀 (Left: system screenshot, Right: China Meteorological Administration screenshot)
![](../images/result.png)
---
## FAQ
<details>
<summary>Q1: What is OpenSpec?</summary>
OpenSpec is a standardized requirements-to-implementation workflow framework that ensures traceability and consistency from requirements to code through structured constraint set management.
</details>
<details>
<summary>Q2: Is Codex/Gemini MCP required?</summary>
No, it's not mandatory. However, to use the complete multi-model collaboration features, you need to install the corresponding MCP tools. Running `/gudaspec:init` will detect and prompt for installation.
</details>
<details>
<summary>Q3: What is the purpose of constraint sets?</summary>
Constraint sets transform requirements into specific technical constraints, eliminating decision points during implementation. Each constraint narrows the solution space, making the implementation phase pure mechanical execution without real-time judgment needed.
</details>
---
## License
This project is open-sourced under the [MIT License](../LICENSE).
Copyright (c) 2025 [guda.studio](mailto:gudaclaude@gmail.com)
---
<div align="center">
## Power This Project with 🌟
</div>