@nclamvn/vibecode-cli 1.5.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vibecode/learning/fixes.json +1 -0
- package/.vibecode/learning/preferences.json +1 -0
- package/bin/vibecode.js +86 -3
- package/docs-site/README.md +41 -0
- package/docs-site/blog/2019-05-28-first-blog-post.md +12 -0
- package/docs-site/blog/2019-05-29-long-blog-post.md +44 -0
- package/docs-site/blog/2021-08-01-mdx-blog-post.mdx +24 -0
- package/docs-site/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg +0 -0
- package/docs-site/blog/2021-08-26-welcome/index.md +29 -0
- package/docs-site/blog/authors.yml +25 -0
- package/docs-site/blog/tags.yml +19 -0
- package/docs-site/docs/commands/agent.md +162 -0
- package/docs-site/docs/commands/assist.md +71 -0
- package/docs-site/docs/commands/build.md +53 -0
- package/docs-site/docs/commands/config.md +30 -0
- package/docs-site/docs/commands/debug.md +173 -0
- package/docs-site/docs/commands/doctor.md +34 -0
- package/docs-site/docs/commands/go.md +128 -0
- package/docs-site/docs/commands/index.md +79 -0
- package/docs-site/docs/commands/init.md +42 -0
- package/docs-site/docs/commands/learn.md +82 -0
- package/docs-site/docs/commands/lock.md +33 -0
- package/docs-site/docs/commands/plan.md +29 -0
- package/docs-site/docs/commands/review.md +31 -0
- package/docs-site/docs/commands/snapshot.md +34 -0
- package/docs-site/docs/commands/start.md +32 -0
- package/docs-site/docs/commands/status.md +37 -0
- package/docs-site/docs/commands/undo.md +83 -0
- package/docs-site/docs/configuration.md +72 -0
- package/docs-site/docs/faq.md +83 -0
- package/docs-site/docs/getting-started.md +119 -0
- package/docs-site/docs/guides/agent-mode.md +94 -0
- package/docs-site/docs/guides/debug-mode.md +83 -0
- package/docs-site/docs/guides/magic-mode.md +107 -0
- package/docs-site/docs/installation.md +98 -0
- package/docs-site/docs/intro.md +67 -0
- package/docs-site/docusaurus.config.ts +141 -0
- package/docs-site/package-lock.json +18039 -0
- package/docs-site/package.json +48 -0
- package/docs-site/sidebars.ts +70 -0
- package/docs-site/src/components/HomepageFeatures/index.tsx +72 -0
- package/docs-site/src/components/HomepageFeatures/styles.module.css +16 -0
- package/docs-site/src/css/custom.css +30 -0
- package/docs-site/src/pages/index.module.css +23 -0
- package/docs-site/src/pages/index.tsx +44 -0
- package/docs-site/src/pages/markdown-page.md +7 -0
- package/docs-site/src/theme/Footer/index.tsx +127 -0
- package/docs-site/src/theme/Footer/styles.module.css +285 -0
- package/docs-site/static/.nojekyll +0 -0
- package/docs-site/static/img/docusaurus-social-card.jpg +0 -0
- package/docs-site/static/img/docusaurus.png +0 -0
- package/docs-site/static/img/favicon.ico +0 -0
- package/docs-site/static/img/logo.svg +1 -0
- package/docs-site/static/img/undraw_docusaurus_mountain.svg +171 -0
- package/docs-site/static/img/undraw_docusaurus_react.svg +170 -0
- package/docs-site/static/img/undraw_docusaurus_tree.svg +40 -0
- package/docs-site/tsconfig.json +8 -0
- package/package.json +5 -2
- package/src/agent/orchestrator.js +104 -35
- package/src/commands/build.js +13 -3
- package/src/commands/debug.js +109 -1
- package/src/commands/git.js +923 -0
- package/src/commands/go.js +9 -2
- package/src/commands/learn.js +294 -0
- package/src/commands/shell.js +486 -0
- package/src/commands/undo.js +281 -0
- package/src/commands/watch.js +556 -0
- package/src/commands/wizard.js +322 -0
- package/src/core/backup.js +325 -0
- package/src/core/learning.js +295 -0
- package/src/debug/image-analyzer.js +304 -0
- package/src/debug/index.js +30 -1
- package/src/index.js +50 -0
- package/src/ui/__tests__/error-translator.test.js +390 -0
- package/src/ui/dashboard.js +364 -0
- package/src/ui/error-translator.js +775 -0
- package/src/utils/image.js +222 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 3
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# vibecode status
|
|
6
|
+
|
|
7
|
+
Display current state and progress.
|
|
8
|
+
|
|
9
|
+
## Synopsis
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
vibecode status [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
| Option | Description |
|
|
18
|
+
|--------|-------------|
|
|
19
|
+
| `--json` | Output as JSON |
|
|
20
|
+
| `-v, --verbose` | Show detailed info |
|
|
21
|
+
|
|
22
|
+
## Examples
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Basic status
|
|
26
|
+
vibecode status
|
|
27
|
+
|
|
28
|
+
# JSON output
|
|
29
|
+
vibecode status --json
|
|
30
|
+
|
|
31
|
+
# Detailed info
|
|
32
|
+
vibecode status --verbose
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## See Also
|
|
36
|
+
|
|
37
|
+
- [doctor](./doctor) - Check configuration
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 15
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# vibecode undo
|
|
6
|
+
|
|
7
|
+
Undo/rollback to previous state.
|
|
8
|
+
|
|
9
|
+
## Synopsis
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
vibecode undo [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
| Option | Description |
|
|
18
|
+
|--------|-------------|
|
|
19
|
+
| `-l, --list` | List available backups |
|
|
20
|
+
| `-s, --step <n>` | Restore to N steps ago |
|
|
21
|
+
| `-c, --clear` | Clear all backups |
|
|
22
|
+
| `-f, --force` | Skip confirmation |
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
|
+
### List Backups
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
vibecode undo --list
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Output:
|
|
33
|
+
```
|
|
34
|
+
╭────────────────────────────────────────────────────────────╮
|
|
35
|
+
│ 📦 BACKUP HISTORY │
|
|
36
|
+
╰────────────────────────────────────────────────────────────╯
|
|
37
|
+
|
|
38
|
+
1. build-auto
|
|
39
|
+
5 phút trước · 12 files
|
|
40
|
+
|
|
41
|
+
2. agent-build
|
|
42
|
+
1 giờ trước · 8 files
|
|
43
|
+
|
|
44
|
+
Chạy vibecode undo để restore
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Interactive Restore
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
vibecode undo
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Restore Specific Step
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
vibecode undo --step 2
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Force Restore
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
vibecode undo --step 1 --force
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## How Backups Work
|
|
66
|
+
|
|
67
|
+
Backups are created automatically before:
|
|
68
|
+
- `vibecode build --auto`
|
|
69
|
+
- `vibecode agent`
|
|
70
|
+
- `vibecode go`
|
|
71
|
+
|
|
72
|
+
Stored in `.vibecode/backups/` with:
|
|
73
|
+
- File content snapshots
|
|
74
|
+
- MD5 hash verification
|
|
75
|
+
- Manifest for restore
|
|
76
|
+
|
|
77
|
+
Last 10 backups are kept.
|
|
78
|
+
|
|
79
|
+
## See Also
|
|
80
|
+
|
|
81
|
+
- [build](./build) - Triggers backup
|
|
82
|
+
- [agent](./agent) - Triggers backup
|
|
83
|
+
- [go](./go) - Triggers backup
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 7
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Configuration
|
|
6
|
+
|
|
7
|
+
Customize Vibecode behavior to fit your workflow.
|
|
8
|
+
|
|
9
|
+
## Configuration Files
|
|
10
|
+
|
|
11
|
+
### `.vibecode/state.json`
|
|
12
|
+
|
|
13
|
+
Project-level state:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"currentState": "initialized",
|
|
18
|
+
"projectName": "my-project",
|
|
19
|
+
"spec_hash": "abc123...",
|
|
20
|
+
"created": "2024-01-01T00:00:00Z"
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### `~/.vibecode/config.json`
|
|
25
|
+
|
|
26
|
+
Global configuration:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"defaultProvider": "claude-code",
|
|
31
|
+
"preferredLanguage": "vi",
|
|
32
|
+
"autoBackup": true
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Environment Variables
|
|
37
|
+
|
|
38
|
+
| Variable | Description |
|
|
39
|
+
|----------|-------------|
|
|
40
|
+
| `ANTHROPIC_API_KEY` | API key for Claude |
|
|
41
|
+
| `VIBECODE_PROVIDER` | Override default provider |
|
|
42
|
+
| `VIBECODE_DEBUG` | Enable debug logging |
|
|
43
|
+
|
|
44
|
+
## Provider Configuration
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Set default provider
|
|
48
|
+
vibecode config --provider claude-code
|
|
49
|
+
|
|
50
|
+
# View current config
|
|
51
|
+
vibecode config --show
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Backup Settings
|
|
55
|
+
|
|
56
|
+
Backups are created automatically before:
|
|
57
|
+
- Auto builds
|
|
58
|
+
- Agent builds
|
|
59
|
+
- Magic mode
|
|
60
|
+
|
|
61
|
+
Stored in `.vibecode/backups/` (last 10 kept).
|
|
62
|
+
|
|
63
|
+
## Learning Settings
|
|
64
|
+
|
|
65
|
+
Learnings stored in:
|
|
66
|
+
- Local: `.vibecode/learning/`
|
|
67
|
+
- Global: `~/.vibecode/learning/`
|
|
68
|
+
|
|
69
|
+
Clear with:
|
|
70
|
+
```bash
|
|
71
|
+
vibecode learn --clear
|
|
72
|
+
```
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 8
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# FAQ
|
|
6
|
+
|
|
7
|
+
Frequently asked questions about Vibecode CLI.
|
|
8
|
+
|
|
9
|
+
## General
|
|
10
|
+
|
|
11
|
+
### What is Vibecode?
|
|
12
|
+
|
|
13
|
+
Vibecode is a CLI tool for AI-assisted software development with built-in discipline and guardrails.
|
|
14
|
+
|
|
15
|
+
### Is it free?
|
|
16
|
+
|
|
17
|
+
Yes, Vibecode CLI is open source and free. However, you need an Anthropic API key for Claude Code.
|
|
18
|
+
|
|
19
|
+
### What models does it use?
|
|
20
|
+
|
|
21
|
+
Vibecode uses Claude Code CLI which uses Claude 3.5 Sonnet by default.
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
### Why do I need Claude Code?
|
|
26
|
+
|
|
27
|
+
Claude Code provides the AI capabilities for code generation, debugging, and assistance.
|
|
28
|
+
|
|
29
|
+
### Node.js version error?
|
|
30
|
+
|
|
31
|
+
Upgrade to Node.js 18 or higher:
|
|
32
|
+
```bash
|
|
33
|
+
nvm install 20
|
|
34
|
+
nvm use 20
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
### Magic Mode vs Agent Mode?
|
|
40
|
+
|
|
41
|
+
- **Magic Mode** (`go`): Single-module projects, quick prototypes
|
|
42
|
+
- **Agent Mode** (`agent`): Complex multi-module systems
|
|
43
|
+
|
|
44
|
+
### How do I undo changes?
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
vibecode undo --list # See available backups
|
|
48
|
+
vibecode undo # Interactive restore
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### How does learning work?
|
|
52
|
+
|
|
53
|
+
After each fix, Vibecode asks for feedback. This helps improve future suggestions.
|
|
54
|
+
|
|
55
|
+
## Troubleshooting
|
|
56
|
+
|
|
57
|
+
### Build failed?
|
|
58
|
+
|
|
59
|
+
1. Check logs: `cat .vibecode/sessions/*/evidence/build.log`
|
|
60
|
+
2. Try iterative mode: `vibecode go "desc" --iterate`
|
|
61
|
+
3. Use debug: `vibecode debug --auto`
|
|
62
|
+
|
|
63
|
+
### Tests failing?
|
|
64
|
+
|
|
65
|
+
Run with strict mode to see issues:
|
|
66
|
+
```bash
|
|
67
|
+
vibecode build --iterate --strict
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Claude Code not found?
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npm install -g @anthropic-ai/claude-code
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Contributing
|
|
77
|
+
|
|
78
|
+
### How can I contribute?
|
|
79
|
+
|
|
80
|
+
- Report issues on GitHub
|
|
81
|
+
- Submit pull requests
|
|
82
|
+
- Improve documentation
|
|
83
|
+
- Share feedback
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 2
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Getting Started
|
|
6
|
+
|
|
7
|
+
Get up and running with Vibecode CLI in minutes.
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
Before installing Vibecode, ensure you have:
|
|
12
|
+
|
|
13
|
+
1. **Node.js 18+**
|
|
14
|
+
```bash
|
|
15
|
+
node --version # Should be v18.0.0 or higher
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
2. **Claude Code CLI** (for AI features)
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g @anthropic-ai/claude-code
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
Install Vibecode globally:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install -g @nclamvn/vibecode-cli
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Verify installation:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
vibecode --version
|
|
35
|
+
# Output: 1.6.0
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Your First Project
|
|
39
|
+
|
|
40
|
+
### Option 1: Interactive Wizard
|
|
41
|
+
|
|
42
|
+
Simply run `vibecode` with no arguments:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
vibecode
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
You'll see an interactive menu:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
? Bạn muốn làm gì hôm nay?
|
|
52
|
+
🚀 Tạo project mới nhanh (go)
|
|
53
|
+
🤖 Build project phức tạp (agent)
|
|
54
|
+
🔧 Debug lỗi (debug)
|
|
55
|
+
💬 Hỏi AI (assist)
|
|
56
|
+
📊 Xem trạng thái
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Option 2: Magic Mode
|
|
60
|
+
|
|
61
|
+
Build a complete project with one command:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
vibecode go "A todo app with React and local storage"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Vibecode will:
|
|
68
|
+
1. Create project directory
|
|
69
|
+
2. Capture requirements
|
|
70
|
+
3. Design architecture
|
|
71
|
+
4. Generate code
|
|
72
|
+
5. Run tests
|
|
73
|
+
6. Show results
|
|
74
|
+
|
|
75
|
+
### Option 3: Step-by-Step Workflow
|
|
76
|
+
|
|
77
|
+
For more control, use the guided workflow:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Initialize workspace
|
|
81
|
+
vibecode init
|
|
82
|
+
|
|
83
|
+
# Start guided session
|
|
84
|
+
vibecode start
|
|
85
|
+
|
|
86
|
+
# ... follow prompts ...
|
|
87
|
+
|
|
88
|
+
# Build with AI
|
|
89
|
+
vibecode build --auto
|
|
90
|
+
|
|
91
|
+
# Review results
|
|
92
|
+
vibecode review
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Project Structure
|
|
96
|
+
|
|
97
|
+
After running `vibecode init`, your project will have:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
your-project/
|
|
101
|
+
├── .vibecode/
|
|
102
|
+
│ ├── state.json # Current state
|
|
103
|
+
│ ├── sessions/ # Session data
|
|
104
|
+
│ │ └── [session-id]/
|
|
105
|
+
│ │ ├── intake.md # Requirements
|
|
106
|
+
│ │ ├── blueprint.md # Architecture
|
|
107
|
+
│ │ ├── contract.md # Locked spec
|
|
108
|
+
│ │ ├── plan.md # Execution plan
|
|
109
|
+
│ │ └── evidence/ # Build logs
|
|
110
|
+
│ ├── backups/ # Auto-backups
|
|
111
|
+
│ └── learning/ # AI learnings
|
|
112
|
+
└── ... your code files
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Next Steps
|
|
116
|
+
|
|
117
|
+
- [Commands Overview](./commands) - Learn all available commands
|
|
118
|
+
- [Magic Mode Guide](./guides/magic-mode) - Deep dive into `vibecode go`
|
|
119
|
+
- [Configuration](./configuration) - Customize Vibecode behavior
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 2
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Agent Mode Guide
|
|
6
|
+
|
|
7
|
+
Build complex multi-module projects with autonomous agents.
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Agent Mode decomposes large projects into modules, builds each sequentially, and uses self-healing to recover from errors.
|
|
12
|
+
|
|
13
|
+
## When to Use Agent Mode
|
|
14
|
+
|
|
15
|
+
✅ **Good for:**
|
|
16
|
+
- Complex full-stack applications
|
|
17
|
+
- Projects with multiple features
|
|
18
|
+
- Systems with many integrations
|
|
19
|
+
- Production-grade builds
|
|
20
|
+
|
|
21
|
+
## Architecture
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
┌─────────────────────────────────────────┐
|
|
25
|
+
│ Orchestrator │
|
|
26
|
+
├─────────────────────────────────────────┤
|
|
27
|
+
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
|
|
28
|
+
│ │Decompose│→│ Build │→│ Verify │ │
|
|
29
|
+
│ └─────────┘ └─────────┘ └─────────┘ │
|
|
30
|
+
│ ↓ ↓ ↓ │
|
|
31
|
+
│ ┌─────────────────────────────────┐ │
|
|
32
|
+
│ │ Memory Engine │ │
|
|
33
|
+
│ └─────────────────────────────────┘ │
|
|
34
|
+
│ ↓ │
|
|
35
|
+
│ ┌─────────────────────────────────┐ │
|
|
36
|
+
│ │ Self-Healing Engine │ │
|
|
37
|
+
│ └─────────────────────────────────┘ │
|
|
38
|
+
└─────────────────────────────────────────┘
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Module Types
|
|
42
|
+
|
|
43
|
+
Agent Mode recognizes common module patterns:
|
|
44
|
+
|
|
45
|
+
- **auth** - Authentication/authorization
|
|
46
|
+
- **api** - REST/GraphQL endpoints
|
|
47
|
+
- **database** - Schema and models
|
|
48
|
+
- **ui** - Frontend components
|
|
49
|
+
- **admin** - Admin dashboard
|
|
50
|
+
- **integration** - Third-party services
|
|
51
|
+
|
|
52
|
+
## Example: E-commerce
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
vibecode agent "E-commerce platform with:
|
|
56
|
+
- User authentication (email, OAuth)
|
|
57
|
+
- Product catalog with categories
|
|
58
|
+
- Shopping cart with sessions
|
|
59
|
+
- Checkout with Stripe
|
|
60
|
+
- Admin dashboard
|
|
61
|
+
- Order management"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Agent decomposes into:
|
|
65
|
+
1. `auth` - User system
|
|
66
|
+
2. `products` - Catalog
|
|
67
|
+
3. `cart` - Shopping cart
|
|
68
|
+
4. `checkout` - Payment
|
|
69
|
+
5. `admin` - Dashboard
|
|
70
|
+
6. `orders` - Management
|
|
71
|
+
|
|
72
|
+
## Self-Healing
|
|
73
|
+
|
|
74
|
+
When a module fails:
|
|
75
|
+
|
|
76
|
+
1. **Analyze** - Identify error pattern
|
|
77
|
+
2. **Hypothesize** - Generate fix
|
|
78
|
+
3. **Apply** - Make changes
|
|
79
|
+
4. **Verify** - Re-test
|
|
80
|
+
5. **Learn** - Store pattern
|
|
81
|
+
|
|
82
|
+
Max 3 retries per module by default.
|
|
83
|
+
|
|
84
|
+
## Memory System
|
|
85
|
+
|
|
86
|
+
Agent remembers:
|
|
87
|
+
- Successful build patterns
|
|
88
|
+
- Common error fixes
|
|
89
|
+
- Technology preferences
|
|
90
|
+
|
|
91
|
+
View with:
|
|
92
|
+
```bash
|
|
93
|
+
vibecode agent --status
|
|
94
|
+
```
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 3
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Debug Mode Guide
|
|
6
|
+
|
|
7
|
+
Master the 9-step intelligent debugging protocol.
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Debug Mode uses a systematic approach to identify, fix, and prevent bugs.
|
|
12
|
+
|
|
13
|
+
## The 9 Steps
|
|
14
|
+
|
|
15
|
+
### Step 1: Evidence
|
|
16
|
+
Collect information about the error from:
|
|
17
|
+
- Error logs
|
|
18
|
+
- Stack traces
|
|
19
|
+
- User descriptions
|
|
20
|
+
- Screenshots
|
|
21
|
+
|
|
22
|
+
### Step 2: Reproduce
|
|
23
|
+
Confirm the error exists by running:
|
|
24
|
+
- Type checking
|
|
25
|
+
- Build commands
|
|
26
|
+
- Test suites
|
|
27
|
+
|
|
28
|
+
### Step 3: Analyze
|
|
29
|
+
Identify root cause:
|
|
30
|
+
- Pattern matching
|
|
31
|
+
- AI analysis
|
|
32
|
+
- Category detection
|
|
33
|
+
|
|
34
|
+
### Step 4: Hypothesize
|
|
35
|
+
Generate fix hypotheses:
|
|
36
|
+
- Ranked by confidence
|
|
37
|
+
- Based on past successes
|
|
38
|
+
- Multiple approaches
|
|
39
|
+
|
|
40
|
+
### Step 5: Test
|
|
41
|
+
Validate the approach:
|
|
42
|
+
- Generate fix prompt
|
|
43
|
+
- Prepare changes
|
|
44
|
+
|
|
45
|
+
### Step 6: Fix
|
|
46
|
+
Apply fix via Claude Code:
|
|
47
|
+
- Make changes
|
|
48
|
+
- Log evidence
|
|
49
|
+
|
|
50
|
+
### Step 7: Verify
|
|
51
|
+
Confirm fix works:
|
|
52
|
+
- Re-run tests
|
|
53
|
+
- Check functionality
|
|
54
|
+
|
|
55
|
+
### Step 8: Document
|
|
56
|
+
Log for future:
|
|
57
|
+
- Store fix pattern
|
|
58
|
+
- Update history
|
|
59
|
+
|
|
60
|
+
### Step 9: Prevent
|
|
61
|
+
Add prevention rules:
|
|
62
|
+
- Update CLAUDE.md
|
|
63
|
+
- Add warnings
|
|
64
|
+
|
|
65
|
+
## Error Categories
|
|
66
|
+
|
|
67
|
+
| Category | Examples |
|
|
68
|
+
|----------|----------|
|
|
69
|
+
| RUNTIME | undefined, null, type errors |
|
|
70
|
+
| SYNTAX | Unexpected tokens |
|
|
71
|
+
| MODULE | Missing imports |
|
|
72
|
+
| FILE | ENOENT |
|
|
73
|
+
| NETWORK | ECONNREFUSED |
|
|
74
|
+
| NPM | Dependency issues |
|
|
75
|
+
| DATABASE | Connection, query errors |
|
|
76
|
+
| TYPESCRIPT | Type mismatches |
|
|
77
|
+
|
|
78
|
+
## Tips
|
|
79
|
+
|
|
80
|
+
1. **Be specific** - Include full error message
|
|
81
|
+
2. **Use auto mode** - Let AI scan for all errors
|
|
82
|
+
3. **Provide context** - Mention what you were doing
|
|
83
|
+
4. **Give feedback** - Help AI learn from fixes
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 1
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Magic Mode Guide
|
|
6
|
+
|
|
7
|
+
A comprehensive guide to using `vibecode go` for one-command project building.
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Magic Mode is Vibecode's flagship feature - describe what you want, and it builds the entire project automatically.
|
|
12
|
+
|
|
13
|
+
## When to Use Magic Mode
|
|
14
|
+
|
|
15
|
+
✅ **Good for:**
|
|
16
|
+
- Prototypes and MVPs
|
|
17
|
+
- Landing pages
|
|
18
|
+
- Simple full-stack apps
|
|
19
|
+
- Learning projects
|
|
20
|
+
|
|
21
|
+
❌ **Consider Agent Mode for:**
|
|
22
|
+
- Complex multi-module systems
|
|
23
|
+
- Enterprise applications
|
|
24
|
+
- Projects with many integrations
|
|
25
|
+
|
|
26
|
+
## Best Practices
|
|
27
|
+
|
|
28
|
+
### 1. Be Specific
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# ❌ Too vague
|
|
32
|
+
vibecode go "a website"
|
|
33
|
+
|
|
34
|
+
# ✅ Specific
|
|
35
|
+
vibecode go "Landing page for a SaaS product with hero, features, pricing, and contact sections using React and Tailwind"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### 2. Mention Tech Stack
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
vibecode go "Todo app with React, TypeScript, and local storage"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 3. Include Key Features
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
vibecode go "Blog platform with markdown support, categories, search, and dark mode"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 4. Use Templates
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
vibecode go "My startup landing" --template landing
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Understanding the Process
|
|
57
|
+
|
|
58
|
+
### Phase 1: Initialization (5%)
|
|
59
|
+
- Creates project directory
|
|
60
|
+
- Sets up workspace structure
|
|
61
|
+
|
|
62
|
+
### Phase 2: Requirements (10%)
|
|
63
|
+
- Parses your description
|
|
64
|
+
- Generates intake document
|
|
65
|
+
|
|
66
|
+
### Phase 3: Architecture (15%)
|
|
67
|
+
- Designs system blueprint
|
|
68
|
+
- Identifies components
|
|
69
|
+
|
|
70
|
+
### Phase 4: Contract (20%)
|
|
71
|
+
- Creates acceptance criteria
|
|
72
|
+
- Defines deliverables
|
|
73
|
+
|
|
74
|
+
### Phase 5: Planning (25%)
|
|
75
|
+
- Generates execution plan
|
|
76
|
+
- Prepares coder pack
|
|
77
|
+
|
|
78
|
+
### Phase 6: Building (85%)
|
|
79
|
+
- Claude Code generates files
|
|
80
|
+
- Implements features
|
|
81
|
+
|
|
82
|
+
### Phase 7: Testing (95%)
|
|
83
|
+
- Runs automated tests
|
|
84
|
+
- Validates functionality
|
|
85
|
+
|
|
86
|
+
## Troubleshooting
|
|
87
|
+
|
|
88
|
+
### Build Failed
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Check logs
|
|
92
|
+
cat .vibecode/sessions/*/evidence/build.log
|
|
93
|
+
|
|
94
|
+
# Try iterative mode
|
|
95
|
+
vibecode go "your description" --iterate
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Tests Failing
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Use strict mode to see issues
|
|
102
|
+
vibecode go "your description" --iterate --strict
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Missing Features
|
|
106
|
+
|
|
107
|
+
Be more explicit in your description or use `vibecode assist` to add features after initial build.
|