mirror of
https://github.com/tradecatlabs/vibe-coding-cn.git
synced 2026-08-18 05:18:05 +00:00
docs: 新增 OpenCode CLI 配置入门文档
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 2025-12-25T05:45:00+08:00 - Implemented workflow_engine MVP
|
||||
|
||||
- Key changes: Created `workflow_engine/` directory, implemented file event hooks + state machine scheduler
|
||||
- Files/modules involved:
|
||||
- `workflow_engine/runner.py` - State machine scheduler, supports start/dispatch/status commands
|
||||
- `workflow_engine/hook_runner.sh` - inotify file watching hook
|
||||
- `workflow_engine/state/current_step.json` - State file
|
||||
- `workflow_engine/README.md` - Usage documentation
|
||||
- Verification method and results: `python runner.py start` successfully executed step1→step5 full flow, artifacts saved to artifacts/
|
||||
- Remaining issues and next steps: Integrate actual LLM calls to replace MOCK; add CI integration examples
|
||||
|
||||
## 2025-12-25T04:58:27+08:00 - Workflow Auto-loop Solution Analysis
|
||||
|
||||
- Key changes: Researched the five prompts under `workflow_steps`, analyzed closed-loop and master control requirements, output an implementable state machine/hook-style orchestrator design (no code changes).
|
||||
- Files/modules involved: `step1_requirements.jsonl`, `step2_execution_plan.jsonl`, `step3_implementation.jsonl`, `step4_verification.jsonl`, `step5_controller.jsonl` (read only).
|
||||
- Verification method and results: Analytical output, no code execution, TODO.
|
||||
- Remaining issues and next steps: Implement orchestrator MVP; calibrate JSONL with PARE v3.0 structure; add persistent state and task queue for master control loop.
|
||||
|
||||
## 2025-12-25T05:04:00+08:00 - Moved workflow-orchestrator Skill Directory
|
||||
|
||||
- Key changes: Migrated `i18n/zh/skills/01-AI工具/workflow-orchestrator` to `prompt_jsonl/workflow_steps/` directory.
|
||||
- Files/modules involved: `workflow-orchestrator/SKILL.md`, `workflow-orchestrator/AGENTS.md`, `workflow-orchestrator/references/index.md`, `workflow-orchestrator/CHANGELOG.md`.
|
||||
- Verification method and results: Command line `mv` followed by directory structure check, files intact.
|
||||
- Remaining issues and next steps: Add `workflow_engine` scripts in new location and align with skill documentation.
|
||||
@@ -0,0 +1,93 @@
|
||||
# Fully Automated Development Loop Workflow
|
||||
|
||||
A 5-step AI Agent workflow system based on **state machine + file hooks**.
|
||||
|
||||
## Directory Structure
|
||||
|
||||
```
|
||||
workflow/
|
||||
├── .kiro/agents/workflow.json # Kiro Agent configuration
|
||||
├── workflow_engine/ # State machine scheduling engine
|
||||
│ ├── runner.py # Core scheduler
|
||||
│ ├── hook_runner.sh # File watching hook
|
||||
│ ├── state/ # State files
|
||||
│ └── artifacts/ # Artifacts directory
|
||||
├── workflow-orchestrator/ # Orchestration skill documentation
|
||||
├── step1_requirements.jsonl # Requirements locking Agent
|
||||
├── step2_execution_plan.jsonl # Plan orchestration Agent
|
||||
├── step3_implementation.jsonl # Implementation changes Agent
|
||||
├── step4_verification.jsonl # Verification & release Agent
|
||||
├── step5_controller.jsonl # Master control & loop Agent
|
||||
└── CHANGELOG.md
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Method 1: Using Kiro CLI
|
||||
|
||||
```bash
|
||||
# Navigate to workflow directory
|
||||
cd ~/projects/vibe-coding-cn/i18n/en/workflow
|
||||
|
||||
# Start with workflow agent
|
||||
kiro-cli chat --agent workflow
|
||||
```
|
||||
|
||||
### Method 2: Manual Execution
|
||||
|
||||
```bash
|
||||
cd ~/projects/vibe-coding-cn/i18n/en/workflow
|
||||
|
||||
# Start workflow
|
||||
python3 workflow_engine/runner.py start
|
||||
|
||||
# Check status
|
||||
python3 workflow_engine/runner.py status
|
||||
```
|
||||
|
||||
### Method 3: Auto Mode (Hook Watching)
|
||||
|
||||
```bash
|
||||
# Terminal 1: Start file watching
|
||||
./workflow_engine/hook_runner.sh
|
||||
|
||||
# Terminal 2: Trigger workflow
|
||||
python3 workflow_engine/runner.py start
|
||||
```
|
||||
|
||||
## Workflow Process
|
||||
|
||||
```
|
||||
┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
|
||||
│ Step1 │───▶│ Step2 │───▶│ Step3 │───▶│ Step4 │───▶│ Step5 │
|
||||
│ Input │ │ Plan │ │ Impl │ │ Verify │ │ Control │
|
||||
└─────────┘ └─────────┘ └─────────┘ └─────────┘ └────┬────┘
|
||||
▲ │
|
||||
│ Failure rollback │
|
||||
└────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
## Core Mechanisms
|
||||
|
||||
| Mechanism | Description |
|
||||
|-----------|-------------|
|
||||
| State-driven | `state/current_step.json` as the single scheduling entry point |
|
||||
| File Hook | `inotifywait` watches state changes and triggers automatically |
|
||||
| Loop Control | Step5 decides rollback or completion based on verification results |
|
||||
| Circuit Breaker | Maximum 3 retries per task |
|
||||
|
||||
## Kiro Integration
|
||||
|
||||
Agent configuration is located at `.kiro/agents/workflow.json`, including:
|
||||
|
||||
- **hooks**: Agent lifecycle hooks
|
||||
- `agentSpawn`: Read state on startup
|
||||
- `stop`: Check state when conversation ends
|
||||
- **resources**: Auto-load prompt files into context
|
||||
- **toolsSettings**: Pre-authorize file operations and command execution
|
||||
|
||||
## Next Steps
|
||||
|
||||
- [ ] Integrate actual LLM calls (replace MOCK in runner.py)
|
||||
- [ ] Add CI/CD integration examples
|
||||
- [ ] Support parallel task processing
|
||||
Reference in New Issue
Block a user