@cluesmith/codev 2.1.2 → 2.1.4
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/dashboard/dist/assets/index-B401UsXA.js +194 -0
- package/dashboard/dist/assets/{index-DrG-moyC.js.map → index-B401UsXA.js.map} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dist/agent-farm/commands/architect.d.ts.map +1 -1
- package/dist/agent-farm/commands/architect.js +1 -0
- package/dist/agent-farm/commands/architect.js.map +1 -1
- package/dist/agent-farm/commands/spawn-roles.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn-roles.js +4 -3
- package/dist/agent-farm/commands/spawn-roles.js.map +1 -1
- package/dist/agent-farm/servers/tower-cron.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-cron.js +3 -1
- package/dist/agent-farm/servers/tower-cron.js.map +1 -1
- package/dist/agent-farm/servers/tower-routes.js +11 -4
- package/dist/agent-farm/servers/tower-routes.js.map +1 -1
- package/dist/agent-farm/servers/tower-server.js +61 -3
- package/dist/agent-farm/servers/tower-server.js.map +1 -1
- package/dist/agent-farm/servers/tower-types.d.ts +1 -0
- package/dist/agent-farm/servers/tower-types.d.ts.map +1 -1
- package/package.json +1 -1
- package/skeleton/.claude/skills/af/SKILL.md +105 -81
- package/skeleton/.claude/skills/codev/SKILL.md +42 -25
- package/skeleton/.claude/skills/consult/SKILL.md +63 -65
- package/skeleton/.claude/skills/generate-image/SKILL.md +18 -29
- package/skeleton/.claude/skills/porch/SKILL.md +36 -29
- package/templates/tower.html +11 -0
- package/dashboard/dist/assets/index-DrG-moyC.js +0 -194
|
@@ -1,98 +1,96 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: consult
|
|
3
|
-
description: AI consultation CLI
|
|
4
|
-
disable-model-invocation: false
|
|
3
|
+
description: AI consultation CLI — query Gemini, Codex, or Claude for reviews and analysis. ALWAYS check this skill before running any `consult` command. Use when reviewing specs, plans, implementations, or PRs with external models, running parallel 3-way reviews (cmap), or checking consultation stats. The `-m` model flag is always required except for `consult stats`.
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# consult - AI Consultation CLI
|
|
8
7
|
|
|
8
|
+
Query external AI models for reviews and analysis. Supports Gemini, Codex, and Claude.
|
|
9
|
+
|
|
9
10
|
## Synopsis
|
|
10
11
|
|
|
11
|
-
```
|
|
12
|
+
```
|
|
12
13
|
consult -m <model> [options]
|
|
13
14
|
consult stats [options]
|
|
14
15
|
```
|
|
15
16
|
|
|
16
|
-
The `-m` / `--model` flag is **always required**
|
|
17
|
+
The `-m` / `--model` flag is **always required** except for `consult stats`.
|
|
17
18
|
|
|
18
19
|
## Models
|
|
19
20
|
|
|
20
|
-
|
|
|
21
|
-
|
|
22
|
-
| `gemini` | `pro` | ~120-150s
|
|
23
|
-
| `codex` | `gpt` | ~200-250s
|
|
24
|
-
| `claude` | `opus` |
|
|
25
|
-
|
|
26
|
-
## Modes
|
|
27
|
-
|
|
28
|
-
### General Mode
|
|
29
|
-
```bash
|
|
30
|
-
consult -m gemini --prompt "What's the best way to structure auth?"
|
|
31
|
-
consult -m codex --prompt-file review-checklist.md
|
|
32
|
-
```
|
|
21
|
+
| Flag value | Alias | Notes |
|
|
22
|
+
|------------|-------|-------|
|
|
23
|
+
| `gemini` | `pro` | Fast (~120-150s), file access via --yolo |
|
|
24
|
+
| `codex` | `gpt` | Thorough (~200-250s), shell exploration |
|
|
25
|
+
| `claude` | `opus` | Agent SDK with tool use (~60-120s) |
|
|
33
26
|
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
consult -m gemini --protocol spir --type spec # Review a specification
|
|
37
|
-
consult -m codex --protocol spir --type plan # Review a plan
|
|
38
|
-
consult -m claude --protocol spir --type impl # Review implementation
|
|
39
|
-
consult -m gemini --protocol spir --type pr # Review a PR
|
|
40
|
-
consult -m codex --protocol spir --type phase # Phase-scoped review
|
|
41
|
-
consult -m gemini --type integration # Integration review
|
|
42
|
-
```
|
|
27
|
+
## All flags
|
|
43
28
|
|
|
44
|
-
### Stats Mode
|
|
45
|
-
```bash
|
|
46
|
-
consult stats # 30-day summary
|
|
47
|
-
consult stats --days 7 --json # Last 7 days as JSON
|
|
48
29
|
```
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
--
|
|
55
|
-
--
|
|
56
|
-
--
|
|
57
|
-
|
|
58
|
-
--
|
|
30
|
+
-m, --model <model> Model to use (required except stats)
|
|
31
|
+
--prompt <text> Inline prompt (general mode)
|
|
32
|
+
--prompt-file <path> Prompt file path (general mode)
|
|
33
|
+
--protocol <name> Protocol: spir, aspir, air, bugfix, tick, maintain
|
|
34
|
+
-t, --type <type> Review type (see below)
|
|
35
|
+
--issue <number> Issue number (required in architect context)
|
|
36
|
+
--output <path> Save result to file
|
|
37
|
+
--plan-phase <phase> Scope review to a plan phase (porch use)
|
|
38
|
+
--context <path> Context file with feedback (porch use)
|
|
39
|
+
--project-id <id> Project ID for metrics (porch use)
|
|
40
|
+
--days <n> Stats: limit to last N days (default: 30)
|
|
41
|
+
--project <id> Stats: filter by project ID
|
|
42
|
+
--last <n> Stats: show last N invocations
|
|
43
|
+
--json Stats: output as JSON
|
|
59
44
|
```
|
|
60
45
|
|
|
61
|
-
## Review
|
|
46
|
+
## Review types (`--type`)
|
|
62
47
|
|
|
63
|
-
| Type |
|
|
64
|
-
|
|
65
|
-
| `spec` | Review specification completeness |
|
|
66
|
-
| `plan` | Review implementation plan |
|
|
48
|
+
| Type | When to use |
|
|
49
|
+
|------|-------------|
|
|
50
|
+
| `spec` | Review a specification for completeness |
|
|
51
|
+
| `plan` | Review an implementation plan |
|
|
67
52
|
| `impl` | Review code implementation |
|
|
68
|
-
| `pr` | Review pull request before merge |
|
|
69
|
-
| `phase` | Phase-scoped review (builder only) |
|
|
70
|
-
| `integration` | Architect's integration review |
|
|
71
|
-
|
|
72
|
-
Protocol-specific prompts live in `codev/protocols/<protocol>/consult-types/`.
|
|
53
|
+
| `pr` | Review a pull request before merge |
|
|
54
|
+
| `phase` | Phase-scoped review (builder context only) |
|
|
55
|
+
| `integration` | Architect's integration review of a PR |
|
|
73
56
|
|
|
74
|
-
##
|
|
57
|
+
## Usage patterns
|
|
75
58
|
|
|
76
|
-
|
|
77
|
-
|
|
59
|
+
**General query:**
|
|
60
|
+
```bash
|
|
61
|
+
consult -m gemini --prompt "What's the best way to structure auth?"
|
|
62
|
+
consult -m codex --prompt-file review-checklist.md
|
|
63
|
+
```
|
|
78
64
|
|
|
79
|
-
|
|
65
|
+
**Protocol review:**
|
|
66
|
+
```bash
|
|
67
|
+
consult -m gemini --type spec --issue 42
|
|
68
|
+
consult -m codex --type plan --issue 42
|
|
69
|
+
consult -m claude --type integration --issue 42
|
|
70
|
+
```
|
|
80
71
|
|
|
81
|
-
|
|
72
|
+
**3-way parallel review (cmap):**
|
|
73
|
+
Always use `--output` for background runs — without it, results go to a temp file that may be garbage-collected.
|
|
82
74
|
|
|
83
75
|
```bash
|
|
84
|
-
consult -m gemini --
|
|
85
|
-
consult -m codex --
|
|
86
|
-
consult -m claude --
|
|
76
|
+
consult -m gemini --type integration --issue 42 --output /tmp/cmap-gemini-42.md &
|
|
77
|
+
consult -m codex --type integration --issue 42 --output /tmp/cmap-codex-42.md &
|
|
78
|
+
consult -m claude --type integration --issue 42 --output /tmp/cmap-claude-42.md &
|
|
87
79
|
wait
|
|
88
80
|
```
|
|
89
81
|
|
|
90
|
-
|
|
82
|
+
**Stats:**
|
|
83
|
+
```bash
|
|
84
|
+
consult stats # 30-day summary
|
|
85
|
+
consult stats --days 7 --json # Last 7 days as JSON
|
|
86
|
+
consult stats --project 42 # Filter by project
|
|
87
|
+
```
|
|
91
88
|
|
|
92
|
-
##
|
|
89
|
+
## Rules
|
|
93
90
|
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
- `--protocol` requires `--type`
|
|
98
|
-
-
|
|
91
|
+
- `-m` is required for all non-stats commands
|
|
92
|
+
- `--prompt` and `--type` are mutually exclusive (different modes)
|
|
93
|
+
- `--prompt` and `--prompt-file` are mutually exclusive
|
|
94
|
+
- `--protocol` requires `--type`
|
|
95
|
+
- From architect context (outside `.builders/`), `--issue` is required for protocol reviews
|
|
96
|
+
- From builder context (inside `.builders/`), project auto-detects from porch state
|
|
@@ -1,56 +1,45 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: generate-image
|
|
3
|
-
description: AI image generation
|
|
4
|
-
disable-model-invocation: false
|
|
3
|
+
description: AI image generation via Gemini. Use when the user wants to generate, create, or make an image, or when you need to create visual assets like logos, diagrams, or illustrations. Requires GEMINI_API_KEY or GOOGLE_API_KEY.
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# generate-image - AI Image Generation
|
|
8
7
|
|
|
9
|
-
Uses Google Gemini
|
|
8
|
+
Uses Google Gemini to generate images from text prompts.
|
|
10
9
|
|
|
11
10
|
## Synopsis
|
|
12
11
|
|
|
13
|
-
```
|
|
12
|
+
```
|
|
14
13
|
codev generate-image "<prompt>" [options]
|
|
15
14
|
```
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
Note: this is a `codev` subcommand, not standalone.
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
--
|
|
18
|
+
## All flags
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
-o, --output <file> Output file path (default: output.png)
|
|
22
|
+
-r, --resolution <res> Resolution: 1K, 2K, 4K (default: 1K)
|
|
23
|
+
-a, --aspect <ratio> Aspect ratio (default: 1:1)
|
|
24
|
+
--ref <image> Reference image (repeatable, max 14)
|
|
24
25
|
```
|
|
25
26
|
|
|
26
|
-
## Aspect
|
|
27
|
+
## Aspect ratios
|
|
27
28
|
|
|
28
29
|
`1:1` | `16:9` | `9:16` | `3:4` | `4:3` | `3:2` | `2:3`
|
|
29
30
|
|
|
30
31
|
## Examples
|
|
31
32
|
|
|
32
33
|
```bash
|
|
33
|
-
# Basic generation
|
|
34
34
|
codev generate-image "A sunset over mountains"
|
|
35
|
-
|
|
36
|
-
# High-res widescreen
|
|
37
35
|
codev generate-image "A futuristic city" -r 4K -a 16:9 -o city.png
|
|
38
|
-
|
|
39
|
-
# With reference images (style transfer)
|
|
40
36
|
codev generate-image "Same style but with cats" --ref style.png --ref layout.png
|
|
41
|
-
|
|
42
|
-
# Prompt from file
|
|
43
|
-
codev generate-image prompt.txt -o result.png
|
|
37
|
+
codev generate-image prompt.txt -o result.png # Prompt from .txt file
|
|
44
38
|
```
|
|
45
39
|
|
|
46
|
-
##
|
|
47
|
-
|
|
48
|
-
Requires `GEMINI_API_KEY` or `GOOGLE_API_KEY` environment variable.
|
|
49
|
-
Get a key at https://aistudio.google.com/apikey
|
|
50
|
-
|
|
51
|
-
## Common Mistakes
|
|
40
|
+
## Notes
|
|
52
41
|
|
|
53
|
-
- Prompt must be
|
|
54
|
-
- Prompt can
|
|
55
|
-
- Reference images must exist on disk
|
|
56
|
-
-
|
|
42
|
+
- Prompt must be quoted if it contains spaces
|
|
43
|
+
- Prompt can be a `.txt` file path (auto-detected by extension)
|
|
44
|
+
- Reference images must exist on disk
|
|
45
|
+
- Requires `GEMINI_API_KEY` or `GOOGLE_API_KEY` environment variable
|
|
@@ -1,53 +1,60 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: porch
|
|
3
|
-
description: Protocol orchestrator CLI
|
|
4
|
-
disable-model-invocation: false
|
|
3
|
+
description: Protocol orchestrator CLI — drives SPIR, ASPIR, AIR, TICK, and BUGFIX protocols via a state machine. ALWAYS check this skill before running any `porch` command. Use when you need to check project status, approve gates, signal phase completion, or manage protocol state. Also use when a builder asks about gate approvals or phase transitions.
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# porch - Protocol Orchestrator
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
porch <command> [project-id]
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Porch drives SPIR, TICK, and BUGFIX protocols via a state machine with phase transitions, gates, and multi-agent consultations.
|
|
8
|
+
Porch manages the state machine behind development protocols. It tracks phases, gates, consultations, and transitions.
|
|
16
9
|
|
|
17
10
|
## Commands
|
|
18
11
|
|
|
19
|
-
```
|
|
20
|
-
porch status [id]
|
|
21
|
-
porch run [id]
|
|
22
|
-
porch next [id]
|
|
23
|
-
porch done [id]
|
|
24
|
-
porch
|
|
25
|
-
porch
|
|
12
|
+
```
|
|
13
|
+
porch status [id] Show current project state and phase
|
|
14
|
+
porch run [id] Run the protocol loop (strict mode)
|
|
15
|
+
porch next [id] Get next tasks as JSON
|
|
16
|
+
porch done [id] Signal current phase is complete
|
|
17
|
+
porch check [id] Run checks for current phase
|
|
18
|
+
porch gate [id] Request human approval at a gate
|
|
19
|
+
porch approve <id> <gate> --a-human-explicitly-approved-this
|
|
20
|
+
porch rollback <id> <phase> Rewind to an earlier phase
|
|
21
|
+
porch init <protocol> <id> <name> Initialize a new project
|
|
26
22
|
```
|
|
27
23
|
|
|
28
|
-
|
|
24
|
+
Project ID auto-detects from worktree path when inside a builder worktree.
|
|
29
25
|
|
|
30
|
-
|
|
26
|
+
## Gate approvals
|
|
27
|
+
|
|
28
|
+
Gates are human-only approval checkpoints. The `--a-human-explicitly-approved-this` flag is **required** — it exists to prevent AI agents from auto-approving.
|
|
31
29
|
|
|
32
30
|
| Gate | Protocol | When |
|
|
33
31
|
|------|----------|------|
|
|
34
32
|
| `spec-approval` | SPIR | After spec is written |
|
|
35
33
|
| `plan-approval` | SPIR | After plan is written |
|
|
36
|
-
| `pr` | SPIR, TICK | After PR is created |
|
|
34
|
+
| `pr` | SPIR, TICK, AIR | After PR is created |
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
porch approve 42 spec-approval --a-human-explicitly-approved-this
|
|
38
|
+
porch approve 42 plan-approval --a-human-explicitly-approved-this
|
|
39
|
+
porch approve 42 pr --a-human-explicitly-approved-this
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**ASPIR and BUGFIX have no spec/plan gates** — they run autonomously through those phases.
|
|
43
|
+
|
|
44
|
+
## Checking pending gates
|
|
37
45
|
|
|
38
46
|
```bash
|
|
39
|
-
porch
|
|
40
|
-
porch approve 42 plan-approval # Approve plan gate
|
|
41
|
-
porch approve 42 pr # Approve PR gate
|
|
47
|
+
porch pending # List all gates waiting for approval
|
|
42
48
|
```
|
|
43
49
|
|
|
44
|
-
##
|
|
50
|
+
## Critical rules
|
|
45
51
|
|
|
46
|
-
|
|
52
|
+
- **Builders must NEVER call `porch approve`** — only humans approve gates
|
|
53
|
+
- **Never edit `status.yaml` directly** — porch manages all state
|
|
54
|
+
- Builders signal completion with `porch done`, not `porch approve`
|
|
55
|
+
- `porch run` is for strict mode only — soft mode builders follow the protocol document manually
|
|
56
|
+
- When running `porch approve` from the architect, use a subshell if you need worktree context: `(cd /path/to/worktree && porch approve ...)`
|
|
47
57
|
|
|
48
|
-
##
|
|
58
|
+
## State storage
|
|
49
59
|
|
|
50
|
-
|
|
51
|
-
- **Never edit status.yaml directly** - Only porch modifies state
|
|
52
|
-
- Builders should use `porch done` to signal phase completion, not `porch approve`
|
|
53
|
-
- `porch run` is for strict mode only - soft mode builders follow the protocol manually
|
|
60
|
+
Project state lives in `codev/projects/<id>-<name>/status.yaml`, managed automatically by porch. The status file tracks current phase, gate states, consultation results, and timestamps.
|
package/templates/tower.html
CHANGED
|
@@ -1026,6 +1026,17 @@
|
|
|
1026
1026
|
}
|
|
1027
1027
|
}
|
|
1028
1028
|
|
|
1029
|
+
// Abort SSE connection on page unload to free connection slots.
|
|
1030
|
+
// fetch+ReadableStream SSE doesn't auto-close like EventSource,
|
|
1031
|
+
// so without this, reloads leak connections until Chrome's 6-per-origin
|
|
1032
|
+
// limit is exhausted and all subsequent fetches queue forever.
|
|
1033
|
+
window.addEventListener('beforeunload', () => {
|
|
1034
|
+
if (sseController) {
|
|
1035
|
+
sseController.abort();
|
|
1036
|
+
sseController = null;
|
|
1037
|
+
}
|
|
1038
|
+
});
|
|
1039
|
+
|
|
1029
1040
|
// Subscribe to SSE for push notifications
|
|
1030
1041
|
subscribeToEvents();
|
|
1031
1042
|
|