@cluesmith/codev 3.0.0 → 3.0.1
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/LICENSE +201 -0
- package/bin/af.js +2 -2
- package/bin/afx.js +8 -0
- package/bin/consult.js +2 -1
- package/bin/team.js +2 -1
- package/{dashboard/dist/assets/index-nr0cXxtf.css → dashboard-dist/assets/index-BWYZtvwm.css} +1 -1
- package/dashboard-dist/assets/index-Dn9zmcKp.js +195 -0
- package/dashboard-dist/assets/index-Dn9zmcKp.js.map +1 -0
- package/{dashboard/dist → dashboard-dist}/index.html +2 -2
- package/dist/agent-farm/cli.d.ts.map +1 -1
- package/dist/agent-farm/cli.js +13 -14
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/architect.d.ts +4 -4
- package/dist/agent-farm/commands/architect.d.ts.map +1 -1
- package/dist/agent-farm/commands/architect.js +23 -12
- package/dist/agent-farm/commands/architect.js.map +1 -1
- package/dist/agent-farm/commands/attach.js +8 -8
- package/dist/agent-farm/commands/attach.js.map +1 -1
- package/dist/agent-farm/commands/bench.d.ts +1 -1
- package/dist/agent-farm/commands/bench.js +1 -1
- package/dist/agent-farm/commands/cron.js +1 -1
- package/dist/agent-farm/commands/cron.js.map +1 -1
- package/dist/agent-farm/commands/db.d.ts +3 -3
- package/dist/agent-farm/commands/db.js +4 -4
- package/dist/agent-farm/commands/db.js.map +1 -1
- package/dist/agent-farm/commands/open.js +2 -2
- package/dist/agent-farm/commands/open.js.map +1 -1
- package/dist/agent-farm/commands/rename.js +1 -1
- package/dist/agent-farm/commands/rename.js.map +1 -1
- package/dist/agent-farm/commands/send.js +3 -3
- package/dist/agent-farm/commands/send.js.map +1 -1
- package/dist/agent-farm/commands/shell.js +3 -3
- package/dist/agent-farm/commands/shell.js.map +1 -1
- package/dist/agent-farm/commands/spawn-roles.d.ts +8 -4
- package/dist/agent-farm/commands/spawn-roles.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn-roles.js +48 -28
- package/dist/agent-farm/commands/spawn-roles.js.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.d.ts +1 -1
- package/dist/agent-farm/commands/spawn-worktree.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.js +80 -13
- package/dist/agent-farm/commands/spawn-worktree.js.map +1 -1
- package/dist/agent-farm/commands/spawn.d.ts +6 -6
- package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn.js +90 -53
- package/dist/agent-farm/commands/spawn.js.map +1 -1
- package/dist/agent-farm/commands/status.d.ts.map +1 -1
- package/dist/agent-farm/commands/status.js +48 -3
- package/dist/agent-farm/commands/status.js.map +1 -1
- package/dist/agent-farm/commands/team-update.d.ts +1 -1
- package/dist/agent-farm/commands/team-update.js +1 -1
- package/dist/agent-farm/commands/team.d.ts +1 -1
- package/dist/agent-farm/commands/team.js +1 -1
- package/dist/agent-farm/commands/tower-cloud.d.ts +2 -2
- package/dist/agent-farm/commands/tower-cloud.js +3 -3
- package/dist/agent-farm/commands/tower-cloud.js.map +1 -1
- package/dist/agent-farm/commands/tower.js +2 -2
- package/dist/agent-farm/commands/tower.js.map +1 -1
- package/dist/agent-farm/lib/cloud-config.js +2 -2
- package/dist/agent-farm/lib/cloud-config.js.map +1 -1
- package/dist/agent-farm/lib/tower-client.d.ts +6 -230
- package/dist/agent-farm/lib/tower-client.d.ts.map +1 -1
- package/dist/agent-farm/lib/tower-client.js +6 -293
- package/dist/agent-farm/lib/tower-client.js.map +1 -1
- package/dist/agent-farm/lib/tunnel-client.js +1 -1
- package/dist/agent-farm/lib/tunnel-client.js.map +1 -1
- package/dist/agent-farm/servers/message-write.d.ts +24 -0
- package/dist/agent-farm/servers/message-write.d.ts.map +1 -0
- package/dist/agent-farm/servers/message-write.js +63 -0
- package/dist/agent-farm/servers/message-write.js.map +1 -0
- package/dist/agent-farm/servers/overview.d.ts +4 -1
- package/dist/agent-farm/servers/overview.d.ts.map +1 -1
- package/dist/agent-farm/servers/overview.js +38 -5
- package/dist/agent-farm/servers/overview.js.map +1 -1
- package/dist/agent-farm/servers/send-buffer.d.ts +4 -3
- package/dist/agent-farm/servers/send-buffer.d.ts.map +1 -1
- package/dist/agent-farm/servers/send-buffer.js +7 -4
- package/dist/agent-farm/servers/send-buffer.js.map +1 -1
- package/dist/agent-farm/servers/tower-cron-parser.js +1 -1
- package/dist/agent-farm/servers/tower-cron-parser.js.map +1 -1
- package/dist/agent-farm/servers/tower-cron.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-cron.js +4 -5
- package/dist/agent-farm/servers/tower-cron.js.map +1 -1
- package/dist/agent-farm/servers/tower-instances.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-instances.js +6 -5
- package/dist/agent-farm/servers/tower-instances.js.map +1 -1
- package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-routes.js +19 -16
- package/dist/agent-farm/servers/tower-routes.js.map +1 -1
- package/dist/agent-farm/servers/tower-server.js +1 -1
- package/dist/agent-farm/servers/tower-terminals.d.ts +2 -2
- package/dist/agent-farm/servers/tower-terminals.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.js +47 -18
- package/dist/agent-farm/servers/tower-terminals.js.map +1 -1
- package/dist/agent-farm/servers/tower-tunnel.js +2 -2
- package/dist/agent-farm/servers/tower-tunnel.js.map +1 -1
- package/dist/agent-farm/servers/tower-utils.d.ts +9 -6
- package/dist/agent-farm/servers/tower-utils.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-utils.js +12 -6
- package/dist/agent-farm/servers/tower-utils.js.map +1 -1
- package/dist/agent-farm/types.d.ts +9 -0
- package/dist/agent-farm/types.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.d.ts +11 -0
- package/dist/agent-farm/utils/config.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.js +21 -0
- package/dist/agent-farm/utils/config.js.map +1 -1
- package/dist/agent-farm/utils/harness.d.ts +85 -0
- package/dist/agent-farm/utils/harness.d.ts.map +1 -0
- package/dist/agent-farm/utils/harness.js +212 -0
- package/dist/agent-farm/utils/harness.js.map +1 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +19 -5
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.js +2 -2
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/consult/index.d.ts +37 -3
- package/dist/commands/consult/index.d.ts.map +1 -1
- package/dist/commands/consult/index.js +220 -150
- package/dist/commands/consult/index.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +54 -8
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.js +1 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/porch/artifacts.d.ts +69 -0
- package/dist/commands/porch/artifacts.d.ts.map +1 -0
- package/dist/commands/porch/artifacts.js +368 -0
- package/dist/commands/porch/artifacts.js.map +1 -0
- package/dist/commands/porch/checks.d.ts +8 -1
- package/dist/commands/porch/checks.d.ts.map +1 -1
- package/dist/commands/porch/checks.js +98 -1
- package/dist/commands/porch/checks.js.map +1 -1
- package/dist/commands/porch/index.d.ts +12 -7
- package/dist/commands/porch/index.d.ts.map +1 -1
- package/dist/commands/porch/index.js +216 -61
- package/dist/commands/porch/index.js.map +1 -1
- package/dist/commands/porch/next.d.ts.map +1 -1
- package/dist/commands/porch/next.js +72 -74
- package/dist/commands/porch/next.js.map +1 -1
- package/dist/commands/porch/notify.d.ts +2 -2
- package/dist/commands/porch/notify.js +5 -5
- package/dist/commands/porch/notify.js.map +1 -1
- package/dist/commands/porch/prompts.d.ts +2 -1
- package/dist/commands/porch/prompts.d.ts.map +1 -1
- package/dist/commands/porch/prompts.js +19 -7
- package/dist/commands/porch/prompts.js.map +1 -1
- package/dist/commands/porch/state.d.ts +27 -2
- package/dist/commands/porch/state.d.ts.map +1 -1
- package/dist/commands/porch/state.js +96 -9
- package/dist/commands/porch/state.js.map +1 -1
- package/dist/commands/porch/types.d.ts +8 -0
- package/dist/commands/porch/types.d.ts.map +1 -1
- package/dist/lib/config.d.ts +14 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +7 -0
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/forge-contracts.d.ts +9 -0
- package/dist/lib/forge-contracts.d.ts.map +1 -1
- package/dist/lib/forge-contracts.js.map +1 -1
- package/dist/lib/forge.js +1 -1
- package/dist/lib/forge.js.map +1 -1
- package/dist/lib/team-github.d.ts +49 -0
- package/dist/lib/team-github.d.ts.map +1 -1
- package/dist/lib/team-github.js +115 -6
- package/dist/lib/team-github.js.map +1 -1
- package/dist/terminal/pty-manager.d.ts.map +1 -1
- package/dist/terminal/pty-manager.js +2 -0
- package/dist/terminal/pty-manager.js.map +1 -1
- package/dist/terminal/ws-protocol.d.ts +10 -8
- package/dist/terminal/ws-protocol.d.ts.map +1 -1
- package/dist/terminal/ws-protocol.js +3 -0
- package/dist/terminal/ws-protocol.js.map +1 -1
- package/package.json +28 -25
- package/scripts/forge/gitea/auth-status.sh +0 -0
- package/scripts/forge/gitea/issue-comment.sh +0 -0
- package/scripts/forge/gitea/issue-list.sh +0 -0
- package/scripts/forge/gitea/issue-view.sh +0 -0
- package/scripts/forge/gitea/pr-exists.sh +4 -1
- package/scripts/forge/gitea/pr-list.sh +0 -0
- package/scripts/forge/gitea/pr-merge.sh +0 -0
- package/scripts/forge/gitea/pr-view.sh +0 -0
- package/scripts/forge/gitea/recently-closed.sh +0 -0
- package/scripts/forge/gitea/recently-merged.sh +0 -0
- package/scripts/forge/gitea/repo-archive.sh +0 -0
- package/scripts/forge/gitea/user-identity.sh +0 -0
- package/scripts/forge/github/auth-status.sh +0 -0
- package/scripts/forge/github/issue-comment.sh +0 -0
- package/scripts/forge/github/issue-list.sh +2 -2
- package/scripts/forge/github/issue-view.sh +0 -0
- package/scripts/forge/github/on-it-timestamps.sh +0 -0
- package/scripts/forge/github/pr-diff.sh +0 -0
- package/scripts/forge/github/pr-exists.sh +3 -1
- package/scripts/forge/github/pr-list.sh +2 -2
- package/scripts/forge/github/pr-merge.sh +0 -0
- package/scripts/forge/github/pr-search.sh +0 -0
- package/scripts/forge/github/pr-view.sh +0 -0
- package/scripts/forge/github/recently-closed.sh +0 -0
- package/scripts/forge/github/recently-merged.sh +0 -0
- package/scripts/forge/github/repo-archive.sh +0 -0
- package/scripts/forge/github/team-activity.sh +0 -0
- package/scripts/forge/github/user-identity.sh +0 -0
- package/scripts/forge/gitlab/auth-status.sh +0 -0
- package/scripts/forge/gitlab/issue-comment.sh +0 -0
- package/scripts/forge/gitlab/issue-list.sh +0 -0
- package/scripts/forge/gitlab/issue-view.sh +0 -0
- package/scripts/forge/gitlab/pr-diff.sh +0 -0
- package/scripts/forge/gitlab/pr-exists.sh +3 -1
- package/scripts/forge/gitlab/pr-list.sh +0 -0
- package/scripts/forge/gitlab/pr-merge.sh +0 -0
- package/scripts/forge/gitlab/pr-search.sh +0 -0
- package/scripts/forge/gitlab/pr-view.sh +0 -0
- package/scripts/forge/gitlab/recently-closed.sh +0 -0
- package/scripts/forge/gitlab/recently-merged.sh +0 -0
- package/scripts/forge/gitlab/repo-archive.sh +0 -0
- package/scripts/forge/gitlab/user-identity.sh +0 -0
- package/scripts/postinstall.mjs +51 -0
- package/skeleton/.claude/skills/afx/SKILL.md +144 -0
- package/skeleton/.claude/skills/codev/SKILL.md +3 -3
- package/skeleton/.claude/skills/consult/SKILL.md +1 -1
- package/skeleton/.claude/skills/porch/SKILL.md +2 -2
- package/skeleton/DEPENDENCIES.md +1 -1
- package/skeleton/builders.md +4 -4
- package/skeleton/protocol-schema.json +2 -2
- package/skeleton/protocols/air/builder-prompt.md +6 -6
- package/skeleton/protocols/air/prompts/pr.md +17 -5
- package/skeleton/protocols/air/protocol.md +1 -2
- package/skeleton/protocols/aspir/builder-prompt.md +28 -6
- package/skeleton/protocols/aspir/prompts/review.md +11 -0
- package/skeleton/protocols/aspir/protocol.json +9 -1
- package/skeleton/protocols/aspir/protocol.md +1 -1
- package/skeleton/protocols/aspir/templates/plan.md +0 -20
- package/skeleton/protocols/aspir/templates/spec.md +0 -28
- package/skeleton/protocols/bugfix/builder-prompt.md +6 -6
- package/skeleton/protocols/bugfix/prompts/pr.md +16 -4
- package/skeleton/protocols/experiment/builder-prompt.md +15 -0
- package/skeleton/protocols/experiment/protocol.md +1 -6
- package/skeleton/protocols/maintain/builder-prompt.md +12 -11
- package/skeleton/protocols/maintain/prompts/maintain.md +88 -0
- package/skeleton/protocols/maintain/prompts/review.md +84 -0
- package/skeleton/protocols/maintain/protocol.json +14 -68
- package/skeleton/protocols/maintain/protocol.md +111 -409
- package/skeleton/protocols/maintain/templates/maintenance-run.md +18 -49
- package/skeleton/protocols/protocol-schema.json +1 -1
- package/skeleton/protocols/research/builder-prompt.md +85 -0
- package/skeleton/protocols/research/protocol.json +118 -0
- package/skeleton/protocols/research/protocol.md +169 -0
- package/skeleton/protocols/spike/builder-prompt.md +1 -1
- package/skeleton/protocols/spike/protocol.md +4 -4
- package/skeleton/protocols/spir/builder-prompt.md +28 -5
- package/skeleton/protocols/spir/prompts/review.md +11 -0
- package/skeleton/protocols/spir/protocol.json +9 -1
- package/skeleton/protocols/spir/protocol.md +2 -2
- package/skeleton/protocols/spir/templates/plan.md +0 -20
- package/skeleton/protocols/spir/templates/spec.md +0 -28
- package/skeleton/resources/commands/agent-farm.md +84 -84
- package/skeleton/resources/commands/codev.md +1 -1
- package/skeleton/resources/commands/consult.md +16 -7
- package/skeleton/resources/commands/overview.md +14 -15
- package/skeleton/resources/risk-triage.md +1 -1
- package/skeleton/resources/workflow-reference.md +14 -14
- package/skeleton/roles/architect.md +39 -39
- package/skeleton/roles/builder.md +22 -14
- package/skeleton/templates/AGENTS.md +5 -3
- package/skeleton/templates/CLAUDE.md +5 -3
- package/skeleton/templates/cheatsheet.md +12 -12
- package/templates/3d-viewer.html +16 -18
- package/templates/tower.html +1 -1
- package/dashboard/dist/assets/index-CTrlY11L.js +0 -194
- package/dashboard/dist/assets/index-CTrlY11L.js.map +0 -1
- package/skeleton/.claude/skills/af/SKILL.md +0 -146
- package/skeleton/porch/prompts/understand.md +0 -61
- package/skeleton/porch/prompts/verify.md +0 -58
- package/skeleton/protocols/maintain/prompts/audit.md +0 -111
- package/skeleton/protocols/maintain/prompts/clean.md +0 -91
- package/skeleton/protocols/maintain/prompts/sync.md +0 -113
- package/skeleton/protocols/maintain/prompts/verify.md +0 -110
- package/skeleton/protocols/tick/builder-prompt.md +0 -65
- package/skeleton/protocols/tick/consult-types/impl-review.md +0 -72
- package/skeleton/protocols/tick/consult-types/plan-review.md +0 -59
- package/skeleton/protocols/tick/consult-types/pr-review.md +0 -72
- package/skeleton/protocols/tick/consult-types/spec-review.md +0 -55
- package/skeleton/protocols/tick/protocol.json +0 -151
- package/skeleton/protocols/tick/protocol.md +0 -277
- package/skeleton/protocols/tick/templates/plan.md +0 -67
- package/skeleton/protocols/tick/templates/review.md +0 -89
- package/skeleton/protocols/tick/templates/spec.md +0 -61
|
@@ -26,7 +26,7 @@ Quick reference for the 7-stage project workflow. For protocol details, see `cod
|
|
|
26
26
|
│ IMPLEMENTATION │
|
|
27
27
|
├─────────────────────────────────────────────────────────────────────────────────────┤
|
|
28
28
|
│ → 4. IMPLEMENTING │
|
|
29
|
-
│ Architect spawns builder:
|
|
29
|
+
│ Architect spawns builder: afx spawn XXXX │
|
|
30
30
|
│ Builder reads spec and plan │
|
|
31
31
|
│ For each phase: Implement → Defend → Evaluate │
|
|
32
32
|
│ Builder commits after each phase │
|
|
@@ -78,38 +78,38 @@ AI agents must stop and wait for human action at these gates.
|
|
|
78
78
|
|
|
79
79
|
```bash
|
|
80
80
|
# Start the workspace
|
|
81
|
-
|
|
81
|
+
afx workspace start
|
|
82
82
|
|
|
83
83
|
# Spawn a builder for a project
|
|
84
|
-
|
|
84
|
+
afx spawn 44 --protocol spir
|
|
85
85
|
|
|
86
86
|
# Check all builder statuses
|
|
87
|
-
|
|
87
|
+
afx status
|
|
88
88
|
|
|
89
89
|
# Send message to builder
|
|
90
|
-
|
|
90
|
+
afx send 44 "Check PR comments and address feedback"
|
|
91
91
|
|
|
92
92
|
# Open a file for review
|
|
93
|
-
|
|
93
|
+
afx open codev/specs/44-name.md
|
|
94
94
|
|
|
95
95
|
# Clean up after merge
|
|
96
|
-
|
|
96
|
+
afx cleanup -p 44
|
|
97
97
|
|
|
98
98
|
# Stop everything
|
|
99
|
-
|
|
99
|
+
afx workspace stop
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
### Builder Commands
|
|
103
103
|
|
|
104
104
|
```bash
|
|
105
105
|
# Check your own status
|
|
106
|
-
|
|
106
|
+
afx status
|
|
107
107
|
|
|
108
108
|
# Send message to architect
|
|
109
|
-
|
|
109
|
+
afx send architect "Question about the spec..."
|
|
110
110
|
|
|
111
111
|
# Open a file in the annotation viewer
|
|
112
|
-
|
|
112
|
+
afx open src/path/to/file.ts
|
|
113
113
|
```
|
|
114
114
|
|
|
115
115
|
### Protocol Import
|
|
@@ -212,7 +212,7 @@ gh pr merge N --merge --delete-branch
|
|
|
212
212
|
### Post-Merge Cleanup (Architect)
|
|
213
213
|
```bash
|
|
214
214
|
git pull # Get merged changes
|
|
215
|
-
|
|
215
|
+
afx cleanup -p XXXX # Clean up builder worktree
|
|
216
216
|
```
|
|
217
217
|
|
|
218
218
|
## Troubleshooting
|
|
@@ -221,7 +221,7 @@ af cleanup -p XXXX # Clean up builder worktree
|
|
|
221
221
|
|
|
222
222
|
1. Check builder terminal for blocker message
|
|
223
223
|
2. Review any `// REVIEW(@architect):` comments in code
|
|
224
|
-
3. Provide guidance via `
|
|
224
|
+
3. Provide guidance via `afx send XXXX "guidance here"`
|
|
225
225
|
4. Builder will resume work after receiving help
|
|
226
226
|
|
|
227
227
|
### PR Has Conflicts
|
|
@@ -238,7 +238,7 @@ af cleanup -p XXXX # Clean up builder worktree
|
|
|
238
238
|
git worktree list
|
|
239
239
|
|
|
240
240
|
# Force cleanup (only if work is committed/pushed)
|
|
241
|
-
|
|
241
|
+
afx cleanup -p XXXX --force
|
|
242
242
|
```
|
|
243
243
|
|
|
244
244
|
## Related Documentation
|
|
@@ -8,7 +8,7 @@ The Architect is the **project manager and gatekeeper** who decides what to buil
|
|
|
8
8
|
|
|
9
9
|
Builders work autonomously in isolated git worktrees. The Architect:
|
|
10
10
|
1. **Decides** what to build
|
|
11
|
-
2. **Spawns** builders via `
|
|
11
|
+
2. **Spawns** builders via `afx spawn`
|
|
12
12
|
3. **Approves** gates (spec-approval, plan-approval) when in strict mode
|
|
13
13
|
4. **Reviews** PRs for integration concerns
|
|
14
14
|
|
|
@@ -16,8 +16,8 @@ Builders work autonomously in isolated git worktrees. The Architect:
|
|
|
16
16
|
|
|
17
17
|
| Mode | Command | Use When |
|
|
18
18
|
|------|---------|----------|
|
|
19
|
-
| **Strict** (default) | `
|
|
20
|
-
| **Soft** | `
|
|
19
|
+
| **Strict** (default) | `afx spawn XXXX --protocol spir` | Porch orchestrates - runs autonomously to completion |
|
|
20
|
+
| **Soft** | `afx spawn XXXX --protocol spir --soft` | AI follows protocol - you verify compliance |
|
|
21
21
|
|
|
22
22
|
**Strict mode** (default): Porch orchestrates the builder with automated gates, 3-way consultations, and enforced phase transitions. More likely to complete autonomously without intervention.
|
|
23
23
|
|
|
@@ -25,34 +25,34 @@ Builders work autonomously in isolated git worktrees. The Architect:
|
|
|
25
25
|
|
|
26
26
|
### Pre-Spawn Checklist
|
|
27
27
|
|
|
28
|
-
**Before every `
|
|
28
|
+
**Before every `afx spawn`, complete these steps:**
|
|
29
29
|
|
|
30
30
|
1. **`git status`** — Ensure worktree is clean (no uncommitted changes)
|
|
31
31
|
2. **Commit if needed** — Builders branch from HEAD; uncommitted specs/plans are invisible
|
|
32
|
-
3. **`
|
|
32
|
+
3. **`afx spawn N --protocol <name>`** — `--protocol` is **REQUIRED** (spir, aspir, air, bugfix, etc.)
|
|
33
33
|
|
|
34
34
|
The spawn command will refuse if the worktree is dirty (override with `--force`, but your builder won't see uncommitted files).
|
|
35
35
|
|
|
36
36
|
## Key Tools
|
|
37
37
|
|
|
38
|
-
### Agent Farm CLI (`
|
|
38
|
+
### Agent Farm CLI (`afx`)
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
afx spawn 1 --protocol spir # Strict mode (default) - porch-driven
|
|
42
|
+
afx spawn 1 --protocol spir -t "feature" # Strict mode with title (no spec yet)
|
|
43
|
+
afx spawn 1 --resume # Resume existing porch state
|
|
44
|
+
afx spawn 1 --protocol spir --soft # Soft mode - protocol-guided
|
|
45
|
+
afx spawn --task "fix the bug" # Ad-hoc task builder (soft mode)
|
|
46
|
+
afx spawn --worktree # Worktree with no initial prompt
|
|
47
|
+
afx status # Check all builders
|
|
48
|
+
afx cleanup -p 0001 # Remove completed builder
|
|
49
|
+
afx workspace start/stop # Workspace management
|
|
50
|
+
afx send 0001 "message" # Short message to builder
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
> **Note:** `--protocol` is REQUIRED for all numbered spawns. Only `--task`, `--shell`, and `--worktree` spawns skip it.
|
|
54
54
|
|
|
55
|
-
**Note:** `
|
|
55
|
+
**Note:** `afx`, `consult`, `porch`, and `codev` are global commands. They work from any directory.
|
|
56
56
|
|
|
57
57
|
### Porch CLI (for strict mode)
|
|
58
58
|
|
|
@@ -95,16 +95,16 @@ wait
|
|
|
95
95
|
# 3. Spawn the builder (--protocol is REQUIRED)
|
|
96
96
|
|
|
97
97
|
# Default: Strict mode (porch-driven with gates)
|
|
98
|
-
|
|
98
|
+
afx spawn 42 --protocol spir
|
|
99
99
|
|
|
100
100
|
# With project title (if no spec exists yet)
|
|
101
|
-
|
|
101
|
+
afx spawn 42 --protocol spir -t "user-authentication"
|
|
102
102
|
|
|
103
103
|
# Or: Soft mode (builder follows protocol independently)
|
|
104
|
-
|
|
104
|
+
afx spawn 42 --protocol spir --soft
|
|
105
105
|
|
|
106
106
|
# For bugfixes
|
|
107
|
-
|
|
107
|
+
afx spawn 42 --protocol bugfix
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
### 2. Approving Gates (Strict Mode Only)
|
|
@@ -120,7 +120,7 @@ cat .builders/spir-0042-feature-name/codev/specs/0042-feature-name.md
|
|
|
120
120
|
(cd .builders/spir-0042-feature-name && porch approve 0042 spec-approval --a-human-explicitly-approved-this)
|
|
121
121
|
|
|
122
122
|
# IMPORTANT: Always message the builder after approving a gate
|
|
123
|
-
|
|
123
|
+
afx send 0042 "Spec approved. Continue to plan phase."
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
**plan-approval** - After builder writes the plan
|
|
@@ -132,13 +132,13 @@ cat .builders/spir-0042-feature-name/codev/plans/0042-feature-name.md
|
|
|
132
132
|
(cd .builders/spir-0042-feature-name && porch approve 0042 plan-approval --a-human-explicitly-approved-this)
|
|
133
133
|
|
|
134
134
|
# IMPORTANT: Always message the builder after approving a gate
|
|
135
|
-
|
|
135
|
+
afx send 0042 "Plan approved. Continue to implement phase."
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
### 3. Monitoring Progress
|
|
139
139
|
|
|
140
140
|
```bash
|
|
141
|
-
|
|
141
|
+
afx status # Overview of all builders
|
|
142
142
|
porch status 0042 # Detailed state for one project (strict mode)
|
|
143
143
|
```
|
|
144
144
|
|
|
@@ -182,7 +182,7 @@ Low-risk change. [Summary of what changed and why.]
|
|
|
182
182
|
---
|
|
183
183
|
Architect review"
|
|
184
184
|
|
|
185
|
-
|
|
185
|
+
afx send 0042 "PR approved, please merge"
|
|
186
186
|
```
|
|
187
187
|
|
|
188
188
|
**Medium risk** — single-model review:
|
|
@@ -194,7 +194,7 @@ gh pr comment 83 --body "## Architect Integration Review
|
|
|
194
194
|
...
|
|
195
195
|
Architect integration review"
|
|
196
196
|
|
|
197
|
-
|
|
197
|
+
afx send 0042 "PR approved, please merge"
|
|
198
198
|
```
|
|
199
199
|
|
|
200
200
|
**High risk** — full 3-way CMAP:
|
|
@@ -209,7 +209,7 @@ gh pr comment 83 --body "## Architect Integration Review
|
|
|
209
209
|
...
|
|
210
210
|
Architect integration review"
|
|
211
211
|
|
|
212
|
-
|
|
212
|
+
afx send 0042 "PR approved, please merge"
|
|
213
213
|
```
|
|
214
214
|
|
|
215
215
|
### 5. Cleanup
|
|
@@ -221,7 +221,7 @@ After builder merges and work is integrated:
|
|
|
221
221
|
gh issue close 42
|
|
222
222
|
|
|
223
223
|
# 2. Clean up the builder worktree
|
|
224
|
-
|
|
224
|
+
afx cleanup -p 0042
|
|
225
225
|
```
|
|
226
226
|
|
|
227
227
|
**Always close the GitHub Issue when the PR merges.** This is the architect's responsibility — builders don't close issues.
|
|
@@ -231,9 +231,9 @@ af cleanup -p 0042
|
|
|
231
231
|
### NEVER Do These:
|
|
232
232
|
1. **DO NOT merge PRs yourself** - Let builders merge their own PRs
|
|
233
233
|
2. **DO NOT commit directly to main** - All changes go through builder PRs
|
|
234
|
-
3. **DO NOT use `
|
|
235
|
-
4. **DO NOT run `
|
|
236
|
-
5. **DO NOT `cd` into a builder worktree** - All CLI tools (`
|
|
234
|
+
3. **DO NOT use `afx send` for long messages** - Use GitHub PR comments instead
|
|
235
|
+
4. **DO NOT run `afx` commands from inside a builder worktree** - All `afx` commands must be run from the repository root on `main`. Spawning from a worktree nests builders inside it, breaking everything.
|
|
236
|
+
5. **DO NOT `cd` into a builder worktree** - All CLI tools (`afx`, `porch`, `consult`, `codev`) are global commands that work from any directory. If a command fails, debug it — don't cd into the worktree. Use absolute paths with the Read tool to inspect builder files (e.g., `Read /path/to/.builders/0042/codev/specs/...`).
|
|
237
237
|
|
|
238
238
|
### ALWAYS Do These:
|
|
239
239
|
1. **Create GitHub Issues first** - Track projects as issues before spawning
|
|
@@ -261,9 +261,9 @@ Update status as projects progress:
|
|
|
261
261
|
|
|
262
262
|
When a builder reports blocked:
|
|
263
263
|
|
|
264
|
-
1. Check their status: `
|
|
264
|
+
1. Check their status: `afx status` or `porch status <id>`
|
|
265
265
|
2. Read their output in the terminal: `http://localhost:<port>`
|
|
266
|
-
3. Provide guidance via short `
|
|
266
|
+
3. Provide guidance via short `afx send` message
|
|
267
267
|
4. Or answer their question directly if they asked one
|
|
268
268
|
|
|
269
269
|
## Release Management
|
|
@@ -295,10 +295,10 @@ Before approving implementations with UX requirements:
|
|
|
295
295
|
|
|
296
296
|
| Task | Command |
|
|
297
297
|
|------|---------|
|
|
298
|
-
| Start feature (strict, default) | `
|
|
299
|
-
| Start feature (soft) | `
|
|
300
|
-
| Start bugfix | `
|
|
301
|
-
| Check all builders | `
|
|
298
|
+
| Start feature (strict, default) | `afx spawn <id> --protocol spir` |
|
|
299
|
+
| Start feature (soft) | `afx spawn <id> --protocol spir --soft` |
|
|
300
|
+
| Start bugfix | `afx spawn <id> --protocol bugfix` |
|
|
301
|
+
| Check all builders | `afx status` |
|
|
302
302
|
| Check one project | `porch status <id>` |
|
|
303
303
|
| Approve spec | `porch approve <id> spec-approval` |
|
|
304
304
|
| Approve plan | `porch approve <id> plan-approval` |
|
|
@@ -306,5 +306,5 @@ Before approving implementations with UX requirements:
|
|
|
306
306
|
| Assess PR risk | `gh pr diff --stat N` |
|
|
307
307
|
| Integration review (medium) | `consult -m claude --type integration pr N` |
|
|
308
308
|
| Integration review (high) | 3-way CMAP (see Section 4) |
|
|
309
|
-
| Message builder | `
|
|
310
|
-
| Cleanup builder | `
|
|
309
|
+
| Message builder | `afx send <id> "short message"` |
|
|
310
|
+
| Cleanup builder | `afx cleanup -p <id>` |
|
|
@@ -8,12 +8,12 @@ Builders run in one of two modes, determined by how they were spawned:
|
|
|
8
8
|
|
|
9
9
|
| Mode | Command | Behavior |
|
|
10
10
|
|------|---------|----------|
|
|
11
|
-
| **Strict** (default) | `
|
|
12
|
-
| **Soft** | `
|
|
11
|
+
| **Strict** (default) | `afx spawn XXXX` | Porch orchestrates - runs autonomously to completion |
|
|
12
|
+
| **Soft** | `afx spawn XXXX --soft` | AI follows protocol - architect verifies compliance |
|
|
13
13
|
|
|
14
14
|
## Strict Mode (Default)
|
|
15
15
|
|
|
16
|
-
Spawned with: `
|
|
16
|
+
Spawned with: `afx spawn XXXX`
|
|
17
17
|
|
|
18
18
|
In strict mode, porch orchestrates your work and drives the protocol to completion autonomously. Your job is simple: **run porch until the project completes**.
|
|
19
19
|
|
|
@@ -68,7 +68,7 @@ You must:
|
|
|
68
68
|
|
|
69
69
|
## Soft Mode
|
|
70
70
|
|
|
71
|
-
Spawned with: `
|
|
71
|
+
Spawned with: `afx spawn XXXX --soft` or `afx spawn --task "..."`
|
|
72
72
|
|
|
73
73
|
In soft mode, you follow the protocol document yourself. The architect monitors your work and verifies you're adhering to the protocol correctly.
|
|
74
74
|
|
|
@@ -85,12 +85,13 @@ cat codev/protocols/spir/protocol.md
|
|
|
85
85
|
# Start implementing
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
### The SPIR Protocol (Specify → Plan → Implement → Review)
|
|
88
|
+
### The SPIR Protocol (Specify → Plan → Implement → Review (→ Verify))
|
|
89
89
|
|
|
90
90
|
1. **Specify**: Read or create the spec at `codev/specs/XXXX-name.md`
|
|
91
91
|
2. **Plan**: Read or create the plan at `codev/plans/XXXX-name.md`
|
|
92
92
|
3. **Implement**: Write code following the plan phases
|
|
93
93
|
4. **Review**: Write lessons learned and create PR
|
|
94
|
+
5. **Verify** (optional): After PR merge, verify the feature works in the integrated codebase
|
|
94
95
|
|
|
95
96
|
### Consultations
|
|
96
97
|
|
|
@@ -129,27 +130,27 @@ wait
|
|
|
129
130
|
|
|
130
131
|
If you're blocked or need help:
|
|
131
132
|
```bash
|
|
132
|
-
|
|
133
|
+
afx send architect "Question about the spec..."
|
|
133
134
|
```
|
|
134
135
|
|
|
135
136
|
### Checking Status
|
|
136
137
|
|
|
137
138
|
```bash
|
|
138
139
|
porch status # (strict mode) Your project status
|
|
139
|
-
|
|
140
|
+
afx status # All builders
|
|
140
141
|
```
|
|
141
142
|
|
|
142
143
|
## Notifications
|
|
143
144
|
|
|
144
|
-
**ALWAYS notify the architect** via `
|
|
145
|
+
**ALWAYS notify the architect** via `afx send` at these key moments:
|
|
145
146
|
|
|
146
147
|
| When | What to send |
|
|
147
148
|
|------|-------------|
|
|
148
|
-
| **Gate reached** | `
|
|
149
|
-
| **PR ready** | `
|
|
150
|
-
| **PR merged** | `
|
|
151
|
-
| **Blocked/stuck** | `
|
|
152
|
-
| **Escalation needed** | `
|
|
149
|
+
| **Gate reached** | `afx send architect "Project XXXX: <gate-name> ready for approval"` |
|
|
150
|
+
| **PR ready** | `afx send architect "PR #N ready for review"` |
|
|
151
|
+
| **PR merged** | `afx send architect "Project XXXX complete. PR merged. Entering verify phase."` |
|
|
152
|
+
| **Blocked/stuck** | `afx send architect "Blocked on X — need guidance"` |
|
|
153
|
+
| **Escalation needed** | `afx send architect "Issue too complex — recommend escalating to SPIR"` |
|
|
153
154
|
|
|
154
155
|
The architect may be working on other tasks and won't know you need attention unless you send a message. **Don't assume they're watching** — always notify explicitly.
|
|
155
156
|
|
|
@@ -158,7 +159,7 @@ The architect may be working on other tasks and won't know you need attention un
|
|
|
158
159
|
If you encounter issues you can't resolve:
|
|
159
160
|
|
|
160
161
|
1. **Output a clear blocker message** describing the problem and options
|
|
161
|
-
2. **Use `
|
|
162
|
+
2. **Use `afx send architect "..."` to notify the Architect**
|
|
162
163
|
3. **Wait for guidance** before proceeding
|
|
163
164
|
|
|
164
165
|
Example:
|
|
@@ -171,6 +172,13 @@ Can't find the auth helper mentioned in spec. Options:
|
|
|
171
172
|
Waiting for Architect guidance.
|
|
172
173
|
```
|
|
173
174
|
|
|
175
|
+
## Multi-PR Workflow
|
|
176
|
+
|
|
177
|
+
Builders may submit multiple sequential PRs within a single worktree session. The worktree persists across PRs -- it is not cleaned up automatically after merge. This allows builders to do follow-up work (e.g., addressing review feedback in a second PR, or splitting large features across checkpoint PRs).
|
|
178
|
+
|
|
179
|
+
- **Worktree cleanup is architect-driven** -- the architect decides when to run `afx cleanup`, not the builder
|
|
180
|
+
- If a builder session is interrupted, use `afx spawn XXXX --resume` to reconnect to the existing worktree
|
|
181
|
+
|
|
174
182
|
## Constraints
|
|
175
183
|
|
|
176
184
|
- **Stay in scope** - Only implement what's in the spec
|
|
@@ -10,9 +10,11 @@ This project uses **Codev** for AI-assisted development.
|
|
|
10
10
|
|
|
11
11
|
- **SPIR**: Multi-phase development with consultation (`codev/protocols/spir/protocol.md`)
|
|
12
12
|
- **ASPIR**: Autonomous SPIR — no human gates on spec/plan (`codev/protocols/aspir/protocol.md`)
|
|
13
|
-
- **
|
|
13
|
+
- **AIR**: Autonomous Implement & Review for small features (`codev/protocols/air/protocol.md`)
|
|
14
|
+
- **BUGFIX**: Bug fixes from GitHub issues (`codev/protocols/bugfix/protocol.md`)
|
|
14
15
|
- **EXPERIMENT**: Disciplined experimentation (`codev/protocols/experiment/protocol.md`)
|
|
15
16
|
- **MAINTAIN**: Codebase maintenance (`codev/protocols/maintain/protocol.md`)
|
|
17
|
+
- **RESEARCH**: Multi-agent research with 3-way investigation, synthesis, and critique (`codev/protocols/research/protocol.md`)
|
|
16
18
|
|
|
17
19
|
## Key Locations
|
|
18
20
|
|
|
@@ -50,7 +52,7 @@ Commit messages format:
|
|
|
50
52
|
Codev provides three CLI tools:
|
|
51
53
|
|
|
52
54
|
- **codev**: Project management (init, adopt, update, doctor)
|
|
53
|
-
- **
|
|
55
|
+
- **afx**: Agent Farm orchestration (start, spawn, status, cleanup)
|
|
54
56
|
- **consult**: AI consultation for reviews (general, protocol, stats)
|
|
55
57
|
|
|
56
58
|
For complete reference, see `codev/resources/commands/`:
|
|
@@ -61,7 +63,7 @@ For complete reference, see `codev/resources/commands/`:
|
|
|
61
63
|
|
|
62
64
|
## Configuration
|
|
63
65
|
|
|
64
|
-
Agent Farm is configured via
|
|
66
|
+
Agent Farm is configured via `.codev/config.json` at the project root. Created during `codev init` or `codev adopt`. Override via CLI flags: `--architect-cmd`, `--builder-cmd`, `--shell-cmd`.
|
|
65
67
|
|
|
66
68
|
```json
|
|
67
69
|
{
|
|
@@ -8,9 +8,11 @@ This project uses **Codev** for AI-assisted development.
|
|
|
8
8
|
|
|
9
9
|
- **SPIR**: Multi-phase development with consultation (`codev/protocols/spir/protocol.md`)
|
|
10
10
|
- **ASPIR**: Autonomous SPIR — no human gates on spec/plan (`codev/protocols/aspir/protocol.md`)
|
|
11
|
-
- **
|
|
11
|
+
- **AIR**: Autonomous Implement & Review for small features (`codev/protocols/air/protocol.md`)
|
|
12
|
+
- **BUGFIX**: Bug fixes from GitHub issues (`codev/protocols/bugfix/protocol.md`)
|
|
12
13
|
- **EXPERIMENT**: Disciplined experimentation (`codev/protocols/experiment/protocol.md`)
|
|
13
14
|
- **MAINTAIN**: Codebase maintenance (`codev/protocols/maintain/protocol.md`)
|
|
15
|
+
- **RESEARCH**: Multi-agent research with 3-way investigation, synthesis, and critique (`codev/protocols/research/protocol.md`)
|
|
14
16
|
|
|
15
17
|
## Key Locations
|
|
16
18
|
|
|
@@ -48,7 +50,7 @@ Commit messages format:
|
|
|
48
50
|
Codev provides three CLI tools:
|
|
49
51
|
|
|
50
52
|
- **codev**: Project management (init, adopt, update, doctor)
|
|
51
|
-
- **
|
|
53
|
+
- **afx**: Agent Farm orchestration (start, spawn, status, cleanup)
|
|
52
54
|
- **consult**: AI consultation for reviews (general, protocol, stats)
|
|
53
55
|
|
|
54
56
|
For complete reference, see `codev/resources/commands/`:
|
|
@@ -59,7 +61,7 @@ For complete reference, see `codev/resources/commands/`:
|
|
|
59
61
|
|
|
60
62
|
## Configuration
|
|
61
63
|
|
|
62
|
-
Agent Farm is configured via
|
|
64
|
+
Agent Farm is configured via `.codev/config.json` at the project root. Created during `codev init` or `codev adopt`. Override via CLI flags: `--architect-cmd`, `--builder-cmd`, `--shell-cmd`.
|
|
63
65
|
|
|
64
66
|
```json
|
|
65
67
|
{
|
|
@@ -41,7 +41,7 @@ Just like structuring a human team—clear roles, defined processes, explicit ha
|
|
|
41
41
|
|
|
42
42
|
| Component | Purpose |
|
|
43
43
|
|-----------|---------|
|
|
44
|
-
| Protocols | Define HOW work happens (SPIR,
|
|
44
|
+
| Protocols | Define HOW work happens (SPIR, ASPIR, etc.) |
|
|
45
45
|
| Roles | Define WHO does what (Architect, Builder, Consultant) |
|
|
46
46
|
| Parallelism | Scale by running multiple builders simultaneously |
|
|
47
47
|
|
|
@@ -61,9 +61,9 @@ A **protocol** is a structured workflow that defines how work progresses from id
|
|
|
61
61
|
| Protocol | Use For | Phases |
|
|
62
62
|
|----------|---------|--------|
|
|
63
63
|
| **SPIR** | New features | Specify → Plan → Implement → Review |
|
|
64
|
-
| **TICK** | Amendments to existing specs | Task Identification → Coding → Kickout |
|
|
65
64
|
| **MAINTAIN** | Codebase hygiene | Dead code removal, documentation sync |
|
|
66
65
|
| **EXPERIMENT** | Research & prototyping | Hypothesis → Experiment → Conclude |
|
|
66
|
+
| **RESEARCH** | Multi-agent research | Scope → Investigate (3-way) → Synthesize → Critique (3-way) |
|
|
67
67
|
|
|
68
68
|
### Roles
|
|
69
69
|
|
|
@@ -105,21 +105,21 @@ Project management commands. Typically used by **humans** to set up and maintain
|
|
|
105
105
|
| `codev update` | Update Codev framework |
|
|
106
106
|
| `codev import` | Import specs from another project |
|
|
107
107
|
|
|
108
|
-
### agent-farm (
|
|
108
|
+
### agent-farm (afx)
|
|
109
109
|
|
|
110
110
|
Architect-Builder orchestration. Used by both **humans and agents**—agents use it more frequently.
|
|
111
111
|
|
|
112
112
|
| Command | Description |
|
|
113
113
|
|---------|-------------|
|
|
114
|
-
| `
|
|
115
|
-
| `
|
|
116
|
-
| `
|
|
117
|
-
| `
|
|
118
|
-
| `
|
|
119
|
-
| `
|
|
120
|
-
| `
|
|
121
|
-
| `
|
|
122
|
-
| `
|
|
114
|
+
| `afx workspace start` | Start workspace (port 4200, 4300, etc.) |
|
|
115
|
+
| `afx workspace stop` | Stop all processes |
|
|
116
|
+
| `afx spawn <id> --protocol spir` | Spawn a builder for project |
|
|
117
|
+
| `afx status` | Check status of all builders |
|
|
118
|
+
| `afx send <target> <msg>` | Send message (builder↔architect) |
|
|
119
|
+
| `afx cleanup -p <id>` | Clean up a builder worktree |
|
|
120
|
+
| `afx shell` | Spawn a utility shell |
|
|
121
|
+
| `afx open <file>` | Open file in workspace viewer |
|
|
122
|
+
| `afx tower start` | Start cross-project tower |
|
|
123
123
|
|
|
124
124
|
### consult
|
|
125
125
|
|
package/templates/3d-viewer.html
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
body {
|
|
15
|
-
background: #
|
|
15
|
+
background: #4D4D4D;
|
|
16
16
|
color: #e0e0e0;
|
|
17
17
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
18
18
|
overflow: hidden;
|
|
@@ -276,7 +276,7 @@
|
|
|
276
276
|
function init() {
|
|
277
277
|
// Scene
|
|
278
278
|
scene = new THREE.Scene();
|
|
279
|
-
scene.background = new THREE.Color(
|
|
279
|
+
scene.background = new THREE.Color(0x4D4D4D);
|
|
280
280
|
|
|
281
281
|
// Cameras (Z-up coordinate system)
|
|
282
282
|
const aspect = container.clientWidth / container.clientHeight;
|
|
@@ -378,21 +378,20 @@
|
|
|
378
378
|
geometry.computeBoundingBox();
|
|
379
379
|
const center = new THREE.Vector3();
|
|
380
380
|
geometry.boundingBox.getCenter(center);
|
|
381
|
-
|
|
381
|
+
// Only center in XY; Three.js translate() auto-updates boundingBox
|
|
382
|
+
geometry.translate(-center.x, -center.y, 0);
|
|
382
383
|
|
|
383
384
|
// Move to sit on grid (Z=0 plane)
|
|
384
|
-
|
|
385
|
-
geometry.translate(0, 0, -minZ);
|
|
385
|
+
geometry.translate(0, 0, -geometry.boundingBox.min.z);
|
|
386
386
|
|
|
387
|
-
//
|
|
388
|
-
geometry.
|
|
387
|
+
// Compute vertex normals for smooth Phong shading
|
|
388
|
+
geometry.computeVertexNormals();
|
|
389
389
|
|
|
390
390
|
// Material
|
|
391
391
|
const material = new THREE.MeshPhongMaterial({
|
|
392
392
|
color: 0x3b82f6,
|
|
393
|
-
specular:
|
|
394
|
-
shininess:
|
|
395
|
-
flatShading: false
|
|
393
|
+
specular: 0x222222,
|
|
394
|
+
shininess: 60
|
|
396
395
|
});
|
|
397
396
|
|
|
398
397
|
model = new THREE.Mesh(geometry, material);
|
|
@@ -775,21 +774,20 @@
|
|
|
775
774
|
geometry.computeBoundingBox();
|
|
776
775
|
const center = new THREE.Vector3();
|
|
777
776
|
geometry.boundingBox.getCenter(center);
|
|
778
|
-
|
|
777
|
+
// Only center in XY; Three.js translate() auto-updates boundingBox
|
|
778
|
+
geometry.translate(-center.x, -center.y, 0);
|
|
779
779
|
|
|
780
780
|
// Move to sit on grid (Z=0 plane)
|
|
781
|
-
|
|
782
|
-
geometry.translate(0, 0, -minZ);
|
|
781
|
+
geometry.translate(0, 0, -geometry.boundingBox.min.z);
|
|
783
782
|
|
|
784
|
-
//
|
|
785
|
-
geometry.
|
|
783
|
+
// Compute vertex normals for smooth Phong shading
|
|
784
|
+
geometry.computeVertexNormals();
|
|
786
785
|
|
|
787
786
|
// Create new material
|
|
788
787
|
const material = new THREE.MeshPhongMaterial({
|
|
789
788
|
color: 0x3b82f6,
|
|
790
|
-
specular:
|
|
791
|
-
shininess:
|
|
792
|
-
flatShading: false
|
|
789
|
+
specular: 0x222222,
|
|
790
|
+
shininess: 60
|
|
793
791
|
});
|
|
794
792
|
|
|
795
793
|
model = new THREE.Mesh(geometry, material);
|
package/templates/tower.html
CHANGED
|
@@ -1162,7 +1162,7 @@
|
|
|
1162
1162
|
<div class="empty-state">
|
|
1163
1163
|
<div class="icon">📭</div>
|
|
1164
1164
|
<h2>No running workspaces</h2>
|
|
1165
|
-
<p>Start a new workspace below or run <code>
|
|
1165
|
+
<p>Start a new workspace below or run <code>afx workspace start</code> in a workspace directory.</p>
|
|
1166
1166
|
</div>
|
|
1167
1167
|
`;
|
|
1168
1168
|
} else {
|