@cluesmith/codev 2.0.0-rc.59 → 2.0.0-rc.60

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.
Files changed (41) hide show
  1. package/dist/agent-farm/cli.js +1 -1
  2. package/dist/agent-farm/cli.js.map +1 -1
  3. package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
  4. package/dist/agent-farm/commands/spawn.js +18 -0
  5. package/dist/agent-farm/commands/spawn.js.map +1 -1
  6. package/dist/agent-farm/servers/tower-server.js +25 -4
  7. package/dist/agent-farm/servers/tower-server.js.map +1 -1
  8. package/dist/commands/adopt.d.ts.map +1 -1
  9. package/dist/commands/adopt.js +11 -1
  10. package/dist/commands/adopt.js.map +1 -1
  11. package/dist/commands/init.d.ts.map +1 -1
  12. package/dist/commands/init.js +11 -1
  13. package/dist/commands/init.js.map +1 -1
  14. package/dist/commands/porch/index.d.ts.map +1 -1
  15. package/dist/commands/porch/index.js +9 -43
  16. package/dist/commands/porch/index.js.map +1 -1
  17. package/dist/commands/porch/next.js +7 -3
  18. package/dist/commands/porch/next.js.map +1 -1
  19. package/dist/commands/porch/prompts.d.ts.map +1 -1
  20. package/dist/commands/porch/prompts.js +6 -1
  21. package/dist/commands/porch/prompts.js.map +1 -1
  22. package/dist/commands/porch/types.d.ts +1 -0
  23. package/dist/commands/porch/types.d.ts.map +1 -1
  24. package/dist/commands/update.d.ts.map +1 -1
  25. package/dist/commands/update.js +10 -1
  26. package/dist/commands/update.js.map +1 -1
  27. package/dist/lib/scaffold.d.ts +13 -0
  28. package/dist/lib/scaffold.d.ts.map +1 -1
  29. package/dist/lib/scaffold.js +36 -0
  30. package/dist/lib/scaffold.js.map +1 -1
  31. package/package.json +1 -1
  32. package/skeleton/.claude/skills/af/SKILL.md +74 -0
  33. package/skeleton/.claude/skills/codev/SKILL.md +41 -0
  34. package/skeleton/.claude/skills/consult/SKILL.md +81 -0
  35. package/skeleton/.claude/skills/generate-image/SKILL.md +56 -0
  36. package/skeleton/protocols/bugfix/builder-prompt.md +5 -0
  37. package/skeleton/protocols/experiment/builder-prompt.md +5 -0
  38. package/skeleton/protocols/maintain/builder-prompt.md +5 -0
  39. package/skeleton/protocols/spir/builder-prompt.md +6 -0
  40. package/skeleton/protocols/spir/protocol.md +6 -0
  41. package/skeleton/protocols/tick/builder-prompt.md +5 -0
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: af
3
+ description: Agent Farm CLI quick reference. Use when running af commands to check correct syntax, subcommands, and flags. Prevents guessing at command names.
4
+ disable-model-invocation: false
5
+ ---
6
+
7
+ # Agent Farm Quick Reference
8
+
9
+ ## Tower (Dashboard Server)
10
+
11
+ ```bash
12
+ af tower start # Start Tower on port 4100
13
+ af tower stop # Stop Tower
14
+ af tower log # Tail Tower logs
15
+ af tower status # Check if Tower is running
16
+ ```
17
+
18
+ There is NO `af tower restart` — use `af tower stop && af tower start`.
19
+
20
+ ## Dashboard
21
+
22
+ ```bash
23
+ af dash start # Start architect dashboard for current project
24
+ af dash stop # Stop dashboard for current project
25
+ af dash open # Open dashboard in browser
26
+ ```
27
+
28
+ ## Builder Management
29
+
30
+ ```bash
31
+ af spawn -p 0003 # Spawn builder for spec (strict mode, default)
32
+ af spawn --soft -p 0003 # Spawn builder (soft mode)
33
+ af spawn --issue 42 # Spawn builder for a bugfix
34
+ af status # Check all builder status
35
+ af cleanup --project 0003 # Clean up builder worktree (safe)
36
+ af cleanup --project 0003 -f # Force cleanup
37
+ ```
38
+
39
+ ## Utility
40
+
41
+ ```bash
42
+ af util # Open utility shell
43
+ af open file.ts # Open file in annotation viewer
44
+ af ports list # List port allocations
45
+ af send <builder> "msg" # Send message to a builder
46
+ ```
47
+
48
+ ## Configuration
49
+
50
+ Edit `af-config.json` at project root to customize shell commands.
51
+
52
+ ```json
53
+ {
54
+ "shell": {
55
+ "architect": "claude",
56
+ "builder": "claude",
57
+ "shell": "bash"
58
+ }
59
+ }
60
+ ```
61
+
62
+ ## Pre-Spawn Checklist
63
+
64
+ **Before `af spawn`, commit all local changes.** Builders work in git worktrees
65
+ branched from HEAD — uncommitted files (specs, plans, codev updates) are invisible
66
+ to the builder. The spawn command will refuse if the worktree is dirty (override
67
+ with `--force`).
68
+
69
+ ## Common Mistakes
70
+
71
+ - **Spawning with uncommitted changes** — builder won't see specs, plans, or codev updates
72
+ - There is NO `codev tower` command — Tower is managed via `af tower`
73
+ - There is NO `restart` subcommand — stop then start
74
+ - There is NO `af start` for Tower — use `af tower start` or `af dash start`
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: codev
3
+ description: Codev project management CLI quick reference. Use when running codev commands to check correct syntax for init, adopt, update, and doctor.
4
+ disable-model-invocation: false
5
+ ---
6
+
7
+ # codev - Project Management CLI
8
+
9
+ ## Commands
10
+
11
+ ```bash
12
+ codev init [name] # Create a new codev project
13
+ codev init my-app -y # Non-interactive with defaults
14
+ codev adopt # Add codev to existing project (run from project root)
15
+ codev adopt -y # Skip conflict prompts
16
+ codev update # Update protocols, roles, skills from installed package
17
+ codev update --dry-run # Preview changes without applying
18
+ codev update --force # Force overwrite all framework files
19
+ codev doctor # Check system dependencies
20
+ ```
21
+
22
+ ## What Each Command Does
23
+
24
+ ### codev init
25
+ Creates a new project directory with codev structure: specs/, plans/, reviews/, protocols, CLAUDE.md, AGENTS.md, .claude/skills/, af-config.json, .gitignore.
26
+
27
+ ### codev adopt
28
+ Adds codev to the **current directory**. Detects existing CLAUDE.md/AGENTS.md and creates `.codev-new` versions for merge if conflicts exist. Spawns Claude to merge automatically.
29
+
30
+ ### codev update
31
+ Updates framework files (protocols, roles, skills) from the installed `@cluesmith/codev` package. **Never touches user data** (specs, plans, reviews). If you've customized a framework file, creates a `.codev-new` version for manual merge.
32
+
33
+ ### codev doctor
34
+ Checks that all required dependencies are installed: Node.js (>=18), tmux (>=3), git (>=2.5), gh (authenticated), and at least one AI CLI (Claude, Gemini, or Codex).
35
+
36
+ ## Common Mistakes
37
+
38
+ - There is NO `codev tower` command — Tower is managed via `af tower start` / `af tower stop`
39
+ - `codev init` creates a **new directory** — use `codev adopt` for existing projects
40
+ - `codev update` only updates framework files — it will never overwrite your specs/plans/reviews
41
+ - Always run `codev adopt` and `codev update` from the **project root directory**
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: consult
3
+ description: AI consultation CLI quick reference. Use when running consult commands to check syntax for PR reviews, spec reviews, plan reviews, and general queries across Gemini, Codex, and Claude.
4
+ disable-model-invocation: false
5
+ ---
6
+
7
+ # consult - AI Consultation CLI
8
+
9
+ ## Synopsis
10
+
11
+ ```bash
12
+ consult -m <model> <subcommand> [args] [options]
13
+ ```
14
+
15
+ The `-m` / `--model` flag is **always required**.
16
+
17
+ ## Models
18
+
19
+ | Model | Alias | Speed | Approach |
20
+ |-------|-------|-------|----------|
21
+ | `gemini` | `pro` | ~120-150s | Pure text analysis, fast |
22
+ | `codex` | `gpt` | ~200-250s | Shell command exploration, thorough |
23
+ | `claude` | `opus` | ~60-120s | Balanced tool use |
24
+
25
+ ## Subcommands
26
+
27
+ ```bash
28
+ consult -m gemini pr 42 # Review a pull request
29
+ consult -m codex spec 42 # Review a specification
30
+ consult -m gemini plan 42 # Review an implementation plan
31
+ consult -m claude general "query" # General question (quoted string)
32
+ ```
33
+
34
+ ## Options
35
+
36
+ ```bash
37
+ -n, --dry-run # Show command without running
38
+ -t, --type <type> # Review type (spec-review, plan-review, impl-review, pr-ready, integration-review)
39
+ -r, --role <role> # Custom role from codev/roles/ (without .md extension)
40
+ ```
41
+
42
+ ## Review Types (--type)
43
+
44
+ | Type | Stage | Use Case |
45
+ |------|-------|----------|
46
+ | `spec-review` | conceived | Review spec completeness |
47
+ | `plan-review` | specified | Review implementation plan |
48
+ | `impl-review` | implementing | Review code implementation |
49
+ | `pr-ready` | implemented | Final check before PR |
50
+ | `integration-review` | committed | Architect's integration review |
51
+
52
+ Review type prompts live in `codev/consult-types/` and can be customized.
53
+
54
+ ## Parallel Consultation (3-Way / cmap)
55
+
56
+ Run all three models in parallel for thorough reviews:
57
+
58
+ ```bash
59
+ consult -m gemini spec 42 &
60
+ consult -m codex spec 42 &
61
+ consult -m claude spec 42 &
62
+ wait
63
+ ```
64
+
65
+ Or from Claude Code, use **cmap** pattern: three parallel background Bash calls.
66
+
67
+ ## Custom Roles
68
+
69
+ ```bash
70
+ consult -m gemini --role security-reviewer pr 42
71
+ consult -m codex --role architect general "Review this design"
72
+ ```
73
+
74
+ Roles are markdown files in `codev/roles/`. Create your own by adding `.md` files there.
75
+
76
+ ## Common Mistakes
77
+
78
+ - The `-m` flag is **required** — `consult pr 42` will fail without it
79
+ - PR numbers are GitHub PR numbers, not spec numbers
80
+ - Spec/plan numbers match the `0042` prefix in filenames (pass just `42`, not `0042`)
81
+ - General queries must be **quoted**: `consult -m gemini general "your question here"`
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: generate-image
3
+ description: AI image generation CLI using Gemini. Use when generating images, checking syntax for resolution, aspect ratio, and reference image options.
4
+ disable-model-invocation: false
5
+ ---
6
+
7
+ # generate-image - AI Image Generation
8
+
9
+ Uses Google Gemini (gemini-3-pro-image-preview) to generate images from text prompts.
10
+
11
+ ## Synopsis
12
+
13
+ ```bash
14
+ codev generate-image "<prompt>" [options]
15
+ ```
16
+
17
+ ## Options
18
+
19
+ ```bash
20
+ -o, --output <file> # Output file path (default: output.png)
21
+ -r, --resolution <res> # Resolution: 1K, 2K, 4K (default: 1K)
22
+ -a, --aspect <ratio> # Aspect ratio (default: 1:1)
23
+ --ref <image> # Reference image (repeatable, max 14)
24
+ ```
25
+
26
+ ## Aspect Ratios
27
+
28
+ `1:1` | `16:9` | `9:16` | `3:4` | `4:3` | `3:2` | `2:3`
29
+
30
+ ## Examples
31
+
32
+ ```bash
33
+ # Basic generation
34
+ codev generate-image "A sunset over mountains"
35
+
36
+ # High-res widescreen
37
+ codev generate-image "A futuristic city" -r 4K -a 16:9 -o city.png
38
+
39
+ # With reference images (style transfer)
40
+ 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
44
+ ```
45
+
46
+ ## Prerequisites
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
52
+
53
+ - Prompt must be **quoted** if it contains spaces
54
+ - Prompt can also be a `.txt` file path (auto-detected by extension)
55
+ - Reference images must exist on disk — max 14 images
56
+ - Output defaults to `output.png` in current directory — use `-o` to change
@@ -17,6 +17,11 @@ You are running in STRICT mode. This means:
17
17
  - Porch orchestrates your work
18
18
  - Run: `porch run {{project_id}}`
19
19
  - Follow porch signals and gate approvals
20
+
21
+ ### ABSOLUTE RESTRICTIONS (STRICT MODE)
22
+ - **NEVER edit `status.yaml` directly** — only porch commands may modify project state
23
+ - **NEVER call `porch approve` without explicit human approval** — only run it after the architect says to
24
+ - **NEVER skip the 3-way review** — always follow porch next → porch done cycle
20
25
  {{/if}}
21
26
 
22
27
  ## Protocol
@@ -16,6 +16,11 @@ You are running in STRICT mode. This means:
16
16
  - Porch orchestrates your work
17
17
  - Run: `porch run {{project_id}}`
18
18
  - Follow porch signals and gate approvals
19
+
20
+ ### ABSOLUTE RESTRICTIONS (STRICT MODE)
21
+ - **NEVER edit `status.yaml` directly** — only porch commands may modify project state
22
+ - **NEVER call `porch approve` without explicit human approval** — only run it after the architect says to
23
+ - **NEVER skip the 3-way review** — always follow porch next → porch done cycle
19
24
  {{/if}}
20
25
 
21
26
  ## Protocol
@@ -16,6 +16,11 @@ You are running in STRICT mode. This means:
16
16
  - Porch orchestrates your work
17
17
  - Run: `porch run {{project_id}}`
18
18
  - Follow porch signals and gate approvals
19
+
20
+ ### ABSOLUTE RESTRICTIONS (STRICT MODE)
21
+ - **NEVER edit `status.yaml` directly** — only porch commands may modify project state
22
+ - **NEVER call `porch approve` without explicit human approval** — only run it after the architect says to
23
+ - **NEVER skip the 3-way review** — always follow porch next → porch done cycle
19
24
  {{/if}}
20
25
 
21
26
  ## Protocol
@@ -18,6 +18,12 @@ You are running in STRICT mode. This means:
18
18
  - Run: `porch run {{project_id}}`
19
19
  - Follow porch signals and gate approvals
20
20
  - Do not deviate from the porch-driven workflow
21
+
22
+ ### ABSOLUTE RESTRICTIONS (STRICT MODE)
23
+ - **NEVER edit `status.yaml` directly** — only porch commands may modify project state
24
+ - **NEVER call `porch approve` without explicit human approval** — only run it after the architect says to
25
+ - **NEVER skip the 3-way review** — always follow porch next → porch done cycle
26
+ - **NEVER advance plan phases manually** — porch handles phase transitions after unanimous review approval
21
27
  {{/if}}
22
28
 
23
29
  ## Protocol
@@ -8,6 +8,12 @@
8
8
 
9
9
  ## Prerequisites
10
10
 
11
+ **Clean Worktree Before Spawning Builders**:
12
+ - All specs, plans, and local changes **MUST be committed** before `af spawn`
13
+ - Builders work in git worktrees branched from HEAD — uncommitted files are invisible
14
+ - This includes `codev update` results, spec drafts, and plan approvals
15
+ - The `af spawn` command enforces this (use `--force` to override)
16
+
11
17
  **Required for Multi-Agent Consultation**:
12
18
  - The `consult` CLI must be available (installed with `npm install -g @cluesmith/codev`)
13
19
  - At least one consultation backend: `claude`, `gemini-cli`, or `codex`
@@ -17,6 +17,11 @@ You are running in STRICT mode. This means:
17
17
  - Porch orchestrates your work
18
18
  - Run: `porch run {{project_id}}`
19
19
  - Follow porch signals and gate approvals
20
+
21
+ ### ABSOLUTE RESTRICTIONS (STRICT MODE)
22
+ - **NEVER edit `status.yaml` directly** — only porch commands may modify project state
23
+ - **NEVER call `porch approve` without explicit human approval** — only run it after the architect says to
24
+ - **NEVER skip the 3-way review** — always follow porch next → porch done cycle
20
25
  {{/if}}
21
26
 
22
27
  ## Protocol