@litmers/cursorflow-orchestrator 0.1.8 → 0.1.12
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/CHANGELOG.md +55 -0
- package/README.md +113 -319
- package/commands/cursorflow-clean.md +24 -135
- package/commands/cursorflow-doctor.md +74 -18
- package/commands/cursorflow-init.md +33 -50
- package/commands/cursorflow-models.md +51 -0
- package/commands/cursorflow-monitor.md +56 -118
- package/commands/cursorflow-prepare.md +410 -108
- package/commands/cursorflow-resume.md +51 -148
- package/commands/cursorflow-review.md +38 -202
- package/commands/cursorflow-run.md +208 -86
- package/commands/cursorflow-signal.md +38 -12
- package/dist/cli/clean.d.ts +3 -1
- package/dist/cli/clean.js +145 -8
- package/dist/cli/clean.js.map +1 -1
- package/dist/cli/doctor.js +14 -1
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.js +32 -21
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init.js +5 -4
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/models.d.ts +7 -0
- package/dist/cli/models.js +104 -0
- package/dist/cli/models.js.map +1 -0
- package/dist/cli/monitor.js +56 -1
- package/dist/cli/monitor.js.map +1 -1
- package/dist/cli/prepare.d.ts +7 -0
- package/dist/cli/prepare.js +748 -0
- package/dist/cli/prepare.js.map +1 -0
- package/dist/cli/resume.js +56 -0
- package/dist/cli/resume.js.map +1 -1
- package/dist/cli/run.js +30 -1
- package/dist/cli/run.js.map +1 -1
- package/dist/cli/signal.js +18 -0
- package/dist/cli/signal.js.map +1 -1
- package/dist/core/runner.d.ts +9 -1
- package/dist/core/runner.js +139 -23
- package/dist/core/runner.js.map +1 -1
- package/dist/utils/cursor-agent.d.ts +4 -0
- package/dist/utils/cursor-agent.js +58 -10
- package/dist/utils/cursor-agent.js.map +1 -1
- package/dist/utils/doctor.d.ts +10 -0
- package/dist/utils/doctor.js +581 -1
- package/dist/utils/doctor.js.map +1 -1
- package/dist/utils/types.d.ts +11 -0
- package/examples/README.md +114 -59
- package/examples/demo-project/README.md +61 -79
- package/examples/demo-project/_cursorflow/tasks/demo-test/01-create-utils.json +17 -6
- package/examples/demo-project/_cursorflow/tasks/demo-test/02-add-tests.json +17 -6
- package/examples/demo-project/_cursorflow/tasks/demo-test/README.md +66 -25
- package/package.json +1 -1
- package/scripts/patches/test-cursor-agent.js +203 -0
- package/src/cli/clean.ts +156 -9
- package/src/cli/doctor.ts +18 -2
- package/src/cli/index.ts +33 -21
- package/src/cli/init.ts +6 -4
- package/src/cli/models.ts +83 -0
- package/src/cli/monitor.ts +60 -1
- package/src/cli/prepare.ts +844 -0
- package/src/cli/resume.ts +66 -0
- package/src/cli/run.ts +36 -2
- package/src/cli/signal.ts +22 -0
- package/src/core/runner.ts +164 -23
- package/src/utils/cursor-agent.ts +62 -10
- package/src/utils/doctor.ts +633 -5
- package/src/utils/types.ts +11 -0
|
@@ -1,162 +1,51 @@
|
|
|
1
1
|
# CursorFlow Clean
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
|
-
Clean up
|
|
4
|
+
Clean up temporary resources created by CursorFlow, including Git worktrees, feature branches, and log files.
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Usage
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|------|------|
|
|
12
|
-
| `branches` | Clean Git branches |
|
|
13
|
-
| `worktrees` | Clean Git worktrees |
|
|
14
|
-
| `logs` | Clean log files |
|
|
15
|
-
| `all` | Clean everything |
|
|
16
|
-
|
|
17
|
-
2. **Clean branches**
|
|
18
|
-
```bash
|
|
19
|
-
cursorflow clean branches --pattern "feature/my-*"
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
3. **Clean worktrees**
|
|
23
|
-
```bash
|
|
24
|
-
cursorflow clean worktrees --all
|
|
25
|
-
```
|
|
8
|
+
```bash
|
|
9
|
+
cursorflow clean <type> [options]
|
|
10
|
+
```
|
|
26
11
|
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
cursorflow clean logs --older-than 30
|
|
30
|
-
```
|
|
12
|
+
## Clean Types
|
|
31
13
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
14
|
+
| Type | Description |
|
|
15
|
+
|------|------|
|
|
16
|
+
| `branches` | Remove local feature branches created by CursorFlow |
|
|
17
|
+
| `worktrees` | Remove temporary Git worktrees |
|
|
18
|
+
| `logs` | Clear all run and terminal logs |
|
|
19
|
+
| `all` | Clean everything (branches, worktrees, and logs) |
|
|
36
20
|
|
|
37
21
|
## Options
|
|
38
22
|
|
|
39
23
|
| Option | Description |
|
|
40
24
|
|------|------|
|
|
41
|
-
| `--
|
|
42
|
-
| `--
|
|
43
|
-
| `--
|
|
44
|
-
| `--force` | Delete without confirmation |
|
|
45
|
-
| `--local-only` | Local only (branches) |
|
|
46
|
-
| `--remote-only` | Remote only (branches) |
|
|
25
|
+
| `--dry-run` | Show what would be removed without actually deleting anything |
|
|
26
|
+
| `--force` | Force removal (ignore uncommitted changes in worktrees) |
|
|
27
|
+
| `--help`, `-h` | Show help |
|
|
47
28
|
|
|
48
29
|
## Examples
|
|
49
30
|
|
|
50
|
-
###
|
|
51
|
-
|
|
52
|
-
#### Delete by pattern
|
|
53
|
-
```bash
|
|
54
|
-
cursorflow clean branches --pattern "feature/dashboard-*"
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
#### All CursorFlow branches
|
|
58
|
-
```bash
|
|
59
|
-
cursorflow clean branches --pattern "feature/*" --dry-run
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
#### Local branches only
|
|
63
|
-
```bash
|
|
64
|
-
cursorflow clean branches --pattern "feature/*" --local-only
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Worktree cleanup
|
|
68
|
-
|
|
69
|
-
#### All worktrees
|
|
70
|
-
```bash
|
|
71
|
-
cursorflow clean worktrees --all
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
#### Specific pattern
|
|
75
|
-
```bash
|
|
76
|
-
cursorflow clean worktrees --pattern "*-dashboard-*"
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Log cleanup
|
|
80
|
-
|
|
81
|
-
#### Logs older than 30 days
|
|
31
|
+
### Review before deleting
|
|
82
32
|
```bash
|
|
83
|
-
cursorflow clean
|
|
33
|
+
cursorflow clean all --dry-run
|
|
84
34
|
```
|
|
85
35
|
|
|
86
|
-
|
|
36
|
+
### Clean only worktrees
|
|
87
37
|
```bash
|
|
88
|
-
cursorflow clean
|
|
38
|
+
cursorflow clean worktrees
|
|
89
39
|
```
|
|
90
40
|
|
|
91
|
-
###
|
|
92
|
-
|
|
93
|
-
#### Review then delete
|
|
41
|
+
### Force clean everything
|
|
94
42
|
```bash
|
|
95
|
-
cursorflow clean all --dry-run
|
|
96
43
|
cursorflow clean all --force
|
|
97
44
|
```
|
|
98
45
|
|
|
99
|
-
## Sample output
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
🧹 Cleaning CursorFlow Resources
|
|
103
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
104
|
-
|
|
105
|
-
Branches to delete:
|
|
106
|
-
- feature/dashboard-pipeline-abc123 (local)
|
|
107
|
-
- feature/dashboard-pipeline-abc123 (remote)
|
|
108
|
-
- feature/client-pipeline-def456 (local)
|
|
109
|
-
|
|
110
|
-
Worktrees to remove:
|
|
111
|
-
- .cursorflow/logs/worktrees/01-dashboard-pipeline-abc123
|
|
112
|
-
- .cursorflow/logs/worktrees/02-client-pipeline-def456
|
|
113
|
-
|
|
114
|
-
Logs to delete:
|
|
115
|
-
- _cursorflow/logs/runs/01-dashboard-2025-12-10T10-00-00 (9 days old)
|
|
116
|
-
|
|
117
|
-
Total: 5 branches, 2 worktrees, 1 log directory
|
|
118
|
-
|
|
119
|
-
Proceed? [y/N]
|
|
120
|
-
```
|
|
121
|
-
|
|
122
46
|
## Notes
|
|
123
47
|
|
|
124
|
-
1. **
|
|
125
|
-
2. **
|
|
126
|
-
3. **
|
|
127
|
-
4. **Irreversible**:
|
|
128
|
-
|
|
129
|
-
## Checklist
|
|
130
|
-
- [ ] Have you reviewed items to clean?
|
|
131
|
-
- [ ] Do you need backups?
|
|
132
|
-
- [ ] Did you run a dry run first?
|
|
133
|
-
- [ ] Are other teammates using these branches?
|
|
134
|
-
- [ ] Do you also need to delete from the remote?
|
|
135
|
-
|
|
136
|
-
## Troubleshooting
|
|
137
|
-
|
|
138
|
-
### Branch deletion failed
|
|
139
|
-
```bash
|
|
140
|
-
# Force delete
|
|
141
|
-
git branch -D <branch-name>
|
|
142
|
-
git push origin --delete <branch-name>
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### Worktree removal failed
|
|
146
|
-
```bash
|
|
147
|
-
# Force remove
|
|
148
|
-
git worktree remove --force <worktree-path>
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### Log directory permission issues
|
|
152
|
-
```bash
|
|
153
|
-
# Check permissions
|
|
154
|
-
ls -la _cursorflow/logs/
|
|
155
|
-
# Fix permissions
|
|
156
|
-
chmod -R u+w _cursorflow/logs/
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
## Next steps
|
|
160
|
-
1. Clean logs regularly (e.g., monthly).
|
|
161
|
-
2. Add an automated cleanup script to CI/CD.
|
|
162
|
-
3. Add log directories to `.gitignore`.
|
|
48
|
+
1. **Safety**: It is highly recommended to run with `--dry-run` first to see exactly what will be deleted.
|
|
49
|
+
2. **Worktrees**: The command identifies CursorFlow worktrees by their location (usually in `_cursorflow/worktrees/`) or their prefix.
|
|
50
|
+
3. **Branches**: Only branches starting with the configured `branchPrefix` (default: `cursorflow/`) are targeted.
|
|
51
|
+
4. **Irreversible**: Once logs are deleted, they cannot be recovered.
|
|
@@ -1,24 +1,80 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CursorFlow Doctor
|
|
2
2
|
|
|
3
|
-
##
|
|
4
|
-
Verify that
|
|
3
|
+
## Overview
|
|
4
|
+
Verify that your environment and task configurations are properly set up for CursorFlow.
|
|
5
5
|
|
|
6
6
|
## Usage
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
cursorflow doctor [options]
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Checks Performed
|
|
13
|
+
- **Environment**: Git repository status, remote availability, and worktree support.
|
|
14
|
+
- **Cursor IDE**: Verifies `cursor-agent` is installed and authenticated.
|
|
15
|
+
- **Tasks**: (Optional) Validates task JSON files for schema errors or missing fields.
|
|
16
|
+
|
|
17
|
+
## Options
|
|
18
|
+
|
|
19
|
+
| Option | Description |
|
|
20
|
+
|------|------|
|
|
21
|
+
| `--tasks-dir <path>` | Validate lane files in a specific directory |
|
|
22
|
+
| `--executor <type>` | Check environment for `cursor-agent` \| `cloud` |
|
|
23
|
+
| `--test-agent` | Run an interactive agent test (to approve permissions) |
|
|
24
|
+
| `--no-cursor` | Skip Cursor Agent installation and auth checks |
|
|
25
|
+
| `--json` | Output the report in machine-readable JSON format |
|
|
26
|
+
|
|
27
|
+
## Task Validation
|
|
28
|
+
|
|
29
|
+
When `--tasks-dir` is provided, the doctor performs comprehensive validation:
|
|
30
|
+
|
|
31
|
+
### Structure Validation
|
|
32
|
+
- **tasks array**: Must exist and be non-empty
|
|
33
|
+
- **task.name**: Required, must be alphanumeric with `-` and `_` only, unique within lane
|
|
34
|
+
- **task.prompt**: Required, should be descriptive (warns if < 10 chars)
|
|
35
|
+
- **task.model**: Optional, must be string if provided
|
|
36
|
+
- **task.acceptanceCriteria**: Optional, must be non-empty array if provided
|
|
37
|
+
|
|
38
|
+
### Dependency Validation (DAG)
|
|
39
|
+
- **Unknown dependencies**: Reports if `dependsOn` references non-existent lanes
|
|
40
|
+
- **Circular dependencies**: Detects cycles (e.g., A→B→A) that would cause deadlock
|
|
41
|
+
- Reports the exact cycle path for easy debugging
|
|
42
|
+
|
|
43
|
+
### Branch Validation
|
|
44
|
+
- **Prefix collision**: Warns if multiple lanes use the same `branchPrefix`
|
|
45
|
+
- **Existing branch conflicts**: Detects if existing branches match a lane's prefix
|
|
46
|
+
- **Duplicate lane names**: Ensures each lane file has a unique name
|
|
47
|
+
- **Naming suggestions**: Recommends using lane numbers in branch prefixes for consistency
|
|
48
|
+
|
|
49
|
+
Example errors:
|
|
50
|
+
```
|
|
51
|
+
❌ Branch prefix collision
|
|
52
|
+
Multiple lanes use the same branchPrefix "feature/lane-1-": 01-lane-1, 02-lane-2
|
|
53
|
+
Fix: Update the branchPrefix in each lane JSON file to be unique
|
|
54
|
+
|
|
55
|
+
⚠️ Existing branches may conflict with 01-lane-1
|
|
56
|
+
Found 2 existing branch(es) matching prefix "feature/lane-1-": feature/lane-1-abc, feature/lane-1-xyz
|
|
57
|
+
Fix: Delete conflicting branches or change the branchPrefix
|
|
58
|
+
```
|
|
20
59
|
|
|
21
60
|
## Example
|
|
22
|
-
"Check if my environment is ready for CursorFlow."
|
|
23
|
-
"Run cursorflow doctor on the _cursorflow/tasks/my-feature/ directory."
|
|
24
61
|
|
|
62
|
+
```bash
|
|
63
|
+
# Basic environment check
|
|
64
|
+
cursorflow doctor
|
|
65
|
+
|
|
66
|
+
# Test agent permissions
|
|
67
|
+
cursorflow doctor --test-agent
|
|
68
|
+
|
|
69
|
+
# Validate a specific task set
|
|
70
|
+
cursorflow doctor --tasks-dir _cursorflow/tasks/my-feature/
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Common Issues & Fixes
|
|
74
|
+
|
|
75
|
+
| Issue | Potential Fix |
|
|
76
|
+
|-------|---------------|
|
|
77
|
+
| `Cursor Agent not found` | Ensure Cursor IDE is installed and `cursor` command is in PATH. |
|
|
78
|
+
| `Not authenticated` | Open Cursor IDE and log in to your account. |
|
|
79
|
+
| `Worktree not supported` | Upgrade your Git version (requires Git >= 2.5). |
|
|
80
|
+
| `Circular dependency` | Check the `dependsOn` fields in your task JSON files. |
|
|
@@ -1,67 +1,50 @@
|
|
|
1
1
|
# CursorFlow Init
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
|
-
Initialize CursorFlow in your project.
|
|
4
|
+
Initialize CursorFlow in your project. This command creates the default configuration file, sets up the required directory structure, and prepares the environment for parallel AI orchestration.
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Usage
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
```
|
|
8
|
+
```bash
|
|
9
|
+
cursorflow init [options]
|
|
10
|
+
```
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
- `--example`: create example tasks
|
|
15
|
-
- `--config-only`: create only the config file
|
|
16
|
-
- `--no-commands`: skip installing Cursor commands
|
|
17
|
-
- `--force`: overwrite existing files
|
|
12
|
+
## Options
|
|
18
13
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
| Option | Description |
|
|
15
|
+
|------|------|
|
|
16
|
+
| `--example` | Create an example task to help you get started |
|
|
17
|
+
| `--config-only` | Only create the `cursorflow.config.js` file |
|
|
18
|
+
| `--no-commands` | Skip installing Cursor IDE custom commands |
|
|
19
|
+
| `--no-gitignore` | Skip adding `_cursorflow/` to your `.gitignore` |
|
|
20
|
+
| `--force` | Overwrite existing configuration or directories |
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
```javascript
|
|
27
|
-
// cursorflow.config.js
|
|
28
|
-
module.exports = {
|
|
29
|
-
tasksDir: '_cursorflow/tasks',
|
|
30
|
-
logsDir: '_cursorflow/logs',
|
|
31
|
-
baseBranch: 'main',
|
|
32
|
-
// ... other settings
|
|
33
|
-
};
|
|
34
|
-
```
|
|
22
|
+
## What's Created?
|
|
35
23
|
|
|
36
|
-
|
|
24
|
+
1. **`cursorflow.config.js`**: Central configuration for the project.
|
|
25
|
+
2. **`_cursorflow/tasks/`**: Directory where you define your task JSON files.
|
|
26
|
+
3. **`_cursorflow/logs/`**: Directory for run logs and terminal outputs.
|
|
27
|
+
4. **`.cursor/commands/cursorflow/`**: (Optional) Integrated Cursor IDE commands.
|
|
28
|
+
5. **`.gitignore` update**: Adds `_cursorflow/` to prevent committing logs.
|
|
37
29
|
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
cursorflow init
|
|
41
|
-
```
|
|
30
|
+
## Example
|
|
42
31
|
|
|
43
|
-
### Include example tasks
|
|
44
32
|
```bash
|
|
33
|
+
# Standard initialization with an example task
|
|
45
34
|
cursorflow init --example
|
|
46
|
-
```
|
|
47
35
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
cursorflow init --config-only
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### Overwrite existing files
|
|
54
|
-
```bash
|
|
55
|
-
cursorflow init --force
|
|
36
|
+
# Minimal initialization
|
|
37
|
+
cursorflow init --no-commands --no-gitignore
|
|
56
38
|
```
|
|
57
39
|
|
|
58
|
-
##
|
|
59
|
-
- [ ] Was the config file created at the project root?
|
|
60
|
-
- [ ] Were the required directories created?
|
|
61
|
-
- [ ] Were Cursor commands installed?
|
|
62
|
-
- [ ] Is the configuration adjusted for the project?
|
|
40
|
+
## Next Steps
|
|
63
41
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
42
|
+
1. **Configure**: Review `cursorflow.config.js` and adjust settings like `baseBranch` or `maxConcurrentLanes`.
|
|
43
|
+
2. **Explore**: If you used `--example`, run it with:
|
|
44
|
+
```bash
|
|
45
|
+
cursorflow run _cursorflow/tasks/example/
|
|
46
|
+
```
|
|
47
|
+
3. **Create**: Start your own feature tasks with:
|
|
48
|
+
```bash
|
|
49
|
+
cursorflow prepare MyFeature
|
|
50
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# CursorFlow Models
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
List available AI models supported by CursorFlow and their recommended use cases. These models are discovered from your local `cursor-agent` installation.
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
cursorflow models [options]
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Options
|
|
13
|
+
|
|
14
|
+
| Option | Description |
|
|
15
|
+
|------|------|
|
|
16
|
+
| `--list`, `-l` | List models in a table (default) |
|
|
17
|
+
| `--json` | Output model list as JSON |
|
|
18
|
+
|
|
19
|
+
## Available Models
|
|
20
|
+
|
|
21
|
+
| ID | Name | Provider | Recommended Use |
|
|
22
|
+
|----|------|----------|-----------------|
|
|
23
|
+
| `sonnet-4.5` | Claude 3.7 Sonnet | Anthropic | General implementation, fast work (Most versatile) |
|
|
24
|
+
| `sonnet-4.5-thinking` | Claude 3.7 Sonnet (Thinking) | Anthropic | Code review, deeper reasoning (Thinking model) |
|
|
25
|
+
| `opus-4.5` | Claude 4.0 Opus | Anthropic | Complex tasks, high quality (Advanced) |
|
|
26
|
+
| `opus-4.5-thinking` | Claude 4.0 Opus (Thinking) | Anthropic | Architecture design (Premium) |
|
|
27
|
+
| `gpt-5.2` | GPT-5.2 | OpenAI | General tasks |
|
|
28
|
+
| `gpt-5.2-high` | GPT-5.2 High Reasoning | OpenAI | Advanced reasoning (High performance) |
|
|
29
|
+
|
|
30
|
+
## Model Configuration
|
|
31
|
+
|
|
32
|
+
In your task `.json` files, specify the model like this:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"model": "sonnet-4.5",
|
|
37
|
+
"tasks": [
|
|
38
|
+
{
|
|
39
|
+
"name": "implement",
|
|
40
|
+
"prompt": "..."
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Tips
|
|
47
|
+
|
|
48
|
+
- Use the `ID` from the `cursorflow models` output in your JSON files.
|
|
49
|
+
- You can set a default model in `cursorflow.config.js`.
|
|
50
|
+
- Individual tasks within a lane can override the lane-level model.
|
|
51
|
+
|
|
@@ -1,131 +1,69 @@
|
|
|
1
1
|
# CursorFlow Monitor
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
|
-
|
|
4
|
+
The `cursorflow monitor` command provides a powerful, interactive terminal-based dashboard to track the execution status of all lanes in real-time. It allows you to visualize dependencies, stream live terminal output, and intervene in running tasks.
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Usage
|
|
7
7
|
|
|
8
|
-
1. **Monitor in real time**
|
|
9
|
-
```bash
|
|
10
|
-
cursorflow monitor --watch
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
2. **Monitor a specific run**
|
|
14
|
-
```bash
|
|
15
|
-
cursorflow monitor _cursorflow/logs/runs/my-run/
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
3. **Check status**
|
|
19
|
-
|
|
20
|
-
Lane status values:
|
|
21
|
-
- pending: waiting
|
|
22
|
-
- running: in progress
|
|
23
|
-
- completed: finished
|
|
24
|
-
- failed: failed
|
|
25
|
-
- blocked_dependency: waiting on dependencies
|
|
26
|
-
|
|
27
|
-
4. **Inspect logs**
|
|
28
|
-
|
|
29
|
-
Per-lane log files:
|
|
30
|
-
- `state.json`: current status
|
|
31
|
-
- `conversation.jsonl`: agent conversation
|
|
32
|
-
- `git-operations.jsonl`: Git activity
|
|
33
|
-
- `events.jsonl`: event log
|
|
34
|
-
|
|
35
|
-
## Options
|
|
36
|
-
|
|
37
|
-
| Option | Description |
|
|
38
|
-
|------|------|
|
|
39
|
-
| `--watch` | Refresh in real time (every 2 seconds) |
|
|
40
|
-
| `--interval <sec>` | Refresh interval in seconds |
|
|
41
|
-
| `--json` | Output in JSON format |
|
|
42
|
-
|
|
43
|
-
## Examples
|
|
44
|
-
|
|
45
|
-
### Monitor the latest run
|
|
46
|
-
```bash
|
|
47
|
-
cursorflow monitor
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### Real-time monitoring (5-second interval)
|
|
51
|
-
```bash
|
|
52
|
-
cursorflow monitor --watch --interval 5
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### JSON output
|
|
56
|
-
```bash
|
|
57
|
-
cursorflow monitor --json | jq
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Sample output
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
64
|
-
📡 Lane Status Monitoring
|
|
65
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
66
|
-
|
|
67
|
-
Run: 01-dashboard-2025-12-19T18-30-00
|
|
68
|
-
|
|
69
|
-
- 01-dashboard: running (2/3)
|
|
70
|
-
- 02-client: completed (3/3)
|
|
71
|
-
- 03-projects: blocked_dependency (1/2)
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Viewing logs
|
|
75
|
-
|
|
76
|
-
### Conversation history
|
|
77
8
|
```bash
|
|
78
|
-
|
|
79
|
-
|
|
9
|
+
# Monitor the most recent run
|
|
10
|
+
cursorflow monitor latest
|
|
80
11
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
cat _cursorflow/logs/runs/01-dashboard-xxx/git-operations.jsonl | jq
|
|
12
|
+
# Monitor a specific run directory
|
|
13
|
+
cursorflow monitor _cursorflow/logs/runs/run-2025-12-21T10-00-00
|
|
84
14
|
```
|
|
85
15
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
###
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
16
|
+
## Dashboard Controls
|
|
17
|
+
|
|
18
|
+
### List View (Main)
|
|
19
|
+
- **Navigation**: Use `↑` and `↓` to move between lanes.
|
|
20
|
+
- **Details**: Press `→` or `Enter` to enter the **Lane Detail View**.
|
|
21
|
+
- **Flow View**: Press `F` to see the task dependency graph (DAG).
|
|
22
|
+
- **Quit**: Press `Q` to exit.
|
|
23
|
+
|
|
24
|
+
### Lane Detail View
|
|
25
|
+
- **History Browsing**: Use `↑` and `↓` to scroll through conversation history.
|
|
26
|
+
- **Message Detail**: Press `→` or `Enter` on a message to see its full content.
|
|
27
|
+
- **Live Terminal**: Press `T` to enter the **Full Terminal View**.
|
|
28
|
+
- **Intervention**: Press `I` to send a manual prompt to the agent (requires `enableIntervention: true`).
|
|
29
|
+
- **Kill Process**: Press `K` to forcefully terminate a stuck agent process.
|
|
30
|
+
- **Back**: Press `←` or `Esc` to return to the List View.
|
|
31
|
+
|
|
32
|
+
### Full Terminal View
|
|
33
|
+
- **Scrolling**: Use `↑` and `↓` to scroll through the entire agent output log.
|
|
34
|
+
- **Back**: Press `T`, `←`, or `Esc` to return to the Lane Detail View.
|
|
35
|
+
|
|
36
|
+
### Intervention View
|
|
37
|
+
- **Typing**: Type your message directly.
|
|
38
|
+
- **Send**: Press `Enter` to send the intervention message.
|
|
39
|
+
- **Cancel**: Press `Esc` to cancel and return.
|
|
40
|
+
|
|
41
|
+
## Key Concepts
|
|
42
|
+
|
|
43
|
+
### Lane Statuses
|
|
44
|
+
| Status | Icon | Description |
|
|
45
|
+
|--------|------|-------------|
|
|
46
|
+
| `pending` | ⚪ | Lane is waiting to start |
|
|
47
|
+
| `waiting` | ⏳ | Waiting for parent dependencies to complete |
|
|
48
|
+
| `running` | 🔄 | Agent is currently executing tasks |
|
|
49
|
+
| `reviewing` | 👀 | AI Reviewer is checking the task results |
|
|
50
|
+
| `completed` | ✅ | All tasks and reviews finished successfully |
|
|
51
|
+
| `failed` | ❌ | A task or review failed with an error |
|
|
52
|
+
| `blocked` | 🚫 | Blocked by a failed dependency |
|
|
53
|
+
|
|
54
|
+
### Dependency Flow View
|
|
55
|
+
A visual representation of the Directed Acyclic Graph (DAG). It shows which lanes must finish before others can start, helping you understand the execution pipeline.
|
|
56
|
+
|
|
57
|
+
### Heartbeat Logs
|
|
58
|
+
CursorFlow monitors agent activity and logs status every few seconds. If a lane shows `0 bytes received` for a long period, it may be stuck or thinking deeply.
|
|
115
59
|
|
|
116
60
|
## Troubleshooting
|
|
117
61
|
|
|
118
62
|
### Lane is stuck
|
|
119
|
-
1.
|
|
120
|
-
2.
|
|
121
|
-
3.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
3. Verify the `logsDir` path in the config file.
|
|
127
|
-
|
|
128
|
-
## Next steps
|
|
129
|
-
1. If you find issues, resume with `cursorflow resume`.
|
|
130
|
-
2. Review PRs for completed lanes.
|
|
131
|
-
3. Analyze logs to identify improvements.
|
|
63
|
+
1. Enter the **Lane Detail View**.
|
|
64
|
+
2. Check the **PID** to ensure the process is still alive.
|
|
65
|
+
3. Check the **Live Terminal** preview or enter **Full Terminal View (T)**.
|
|
66
|
+
4. If it's truly stuck, press `K` to kill it, then use `cursorflow resume <lane>` to restart.
|
|
67
|
+
|
|
68
|
+
### Sending Instructions
|
|
69
|
+
If the agent is heading in the wrong direction, use the **Intervention (I)** feature to guide it without stopping the run. Note that this requires `enableIntervention: true` in the task's JSON configuration.
|