@cluesmith/codev 2.0.0-rc.69 → 2.0.0-rc.70

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 (139) hide show
  1. package/dashboard/dist/assets/{index-CG7nUttd.js → index-CDAINZKT.js} +21 -21
  2. package/dashboard/dist/assets/{index-CG7nUttd.js.map → index-CDAINZKT.js.map} +1 -1
  3. package/dashboard/dist/index.html +1 -1
  4. package/dist/agent-farm/cli.js +2 -2
  5. package/dist/agent-farm/cli.js.map +1 -1
  6. package/dist/agent-farm/commands/architect.d.ts +3 -3
  7. package/dist/agent-farm/commands/architect.d.ts.map +1 -1
  8. package/dist/agent-farm/commands/architect.js +20 -142
  9. package/dist/agent-farm/commands/architect.js.map +1 -1
  10. package/dist/agent-farm/commands/attach.d.ts.map +1 -1
  11. package/dist/agent-farm/commands/attach.js +13 -50
  12. package/dist/agent-farm/commands/attach.js.map +1 -1
  13. package/dist/agent-farm/commands/cleanup.d.ts.map +1 -1
  14. package/dist/agent-farm/commands/cleanup.js +1 -11
  15. package/dist/agent-farm/commands/cleanup.js.map +1 -1
  16. package/dist/agent-farm/commands/send.d.ts +1 -1
  17. package/dist/agent-farm/commands/send.d.ts.map +1 -1
  18. package/dist/agent-farm/commands/send.js +35 -92
  19. package/dist/agent-farm/commands/send.js.map +1 -1
  20. package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
  21. package/dist/agent-farm/commands/spawn.js +26 -58
  22. package/dist/agent-farm/commands/spawn.js.map +1 -1
  23. package/dist/agent-farm/commands/status.js +1 -1
  24. package/dist/agent-farm/commands/status.js.map +1 -1
  25. package/dist/agent-farm/commands/stop.d.ts.map +1 -1
  26. package/dist/agent-farm/commands/stop.js +9 -44
  27. package/dist/agent-farm/commands/stop.js.map +1 -1
  28. package/dist/agent-farm/commands/tower-cloud.d.ts.map +1 -1
  29. package/dist/agent-farm/commands/tower-cloud.js +18 -1
  30. package/dist/agent-farm/commands/tower-cloud.js.map +1 -1
  31. package/dist/agent-farm/db/index.d.ts.map +1 -1
  32. package/dist/agent-farm/db/index.js +61 -0
  33. package/dist/agent-farm/db/index.js.map +1 -1
  34. package/dist/agent-farm/db/migrate.d.ts.map +1 -1
  35. package/dist/agent-farm/db/migrate.js +6 -9
  36. package/dist/agent-farm/db/migrate.js.map +1 -1
  37. package/dist/agent-farm/db/schema.d.ts +2 -2
  38. package/dist/agent-farm/db/schema.d.ts.map +1 -1
  39. package/dist/agent-farm/db/schema.js +3 -4
  40. package/dist/agent-farm/db/schema.js.map +1 -1
  41. package/dist/agent-farm/db/types.d.ts +0 -3
  42. package/dist/agent-farm/db/types.d.ts.map +1 -1
  43. package/dist/agent-farm/db/types.js +0 -3
  44. package/dist/agent-farm/db/types.js.map +1 -1
  45. package/dist/agent-farm/lib/tower-client.d.ts +4 -0
  46. package/dist/agent-farm/lib/tower-client.d.ts.map +1 -1
  47. package/dist/agent-farm/lib/tower-client.js +10 -0
  48. package/dist/agent-farm/lib/tower-client.js.map +1 -1
  49. package/dist/agent-farm/lib/tunnel-client.d.ts.map +1 -1
  50. package/dist/agent-farm/lib/tunnel-client.js +6 -13
  51. package/dist/agent-farm/lib/tunnel-client.js.map +1 -1
  52. package/dist/agent-farm/servers/tower-server.js +482 -494
  53. package/dist/agent-farm/servers/tower-server.js.map +1 -1
  54. package/dist/agent-farm/state.d.ts.map +1 -1
  55. package/dist/agent-farm/state.js +6 -10
  56. package/dist/agent-farm/state.js.map +1 -1
  57. package/dist/agent-farm/types.d.ts +0 -7
  58. package/dist/agent-farm/types.d.ts.map +1 -1
  59. package/dist/agent-farm/utils/deps.d.ts.map +1 -1
  60. package/dist/agent-farm/utils/deps.js +0 -16
  61. package/dist/agent-farm/utils/deps.js.map +1 -1
  62. package/dist/agent-farm/utils/gate-watcher.js +4 -4
  63. package/dist/agent-farm/utils/gate-watcher.js.map +1 -1
  64. package/dist/agent-farm/utils/session.d.ts +6 -6
  65. package/dist/agent-farm/utils/session.d.ts.map +1 -1
  66. package/dist/agent-farm/utils/session.js +4 -4
  67. package/dist/agent-farm/utils/session.js.map +1 -1
  68. package/dist/agent-farm/utils/shell.d.ts +4 -4
  69. package/dist/agent-farm/utils/shell.js +4 -4
  70. package/dist/cli.d.ts.map +1 -1
  71. package/dist/cli.js +2 -0
  72. package/dist/cli.js.map +1 -1
  73. package/dist/commands/consult/index.d.ts +1 -0
  74. package/dist/commands/consult/index.d.ts.map +1 -1
  75. package/dist/commands/consult/index.js +19 -5
  76. package/dist/commands/consult/index.js.map +1 -1
  77. package/dist/commands/doctor.d.ts.map +1 -1
  78. package/dist/commands/doctor.js +0 -12
  79. package/dist/commands/doctor.js.map +1 -1
  80. package/dist/commands/porch/next.d.ts.map +1 -1
  81. package/dist/commands/porch/next.js +90 -8
  82. package/dist/commands/porch/next.js.map +1 -1
  83. package/dist/commands/porch/prompts.d.ts.map +1 -1
  84. package/dist/commands/porch/prompts.js +26 -4
  85. package/dist/commands/porch/prompts.js.map +1 -1
  86. package/dist/commands/porch/verdict.d.ts +0 -8
  87. package/dist/commands/porch/verdict.d.ts.map +1 -1
  88. package/dist/commands/porch/verdict.js +0 -13
  89. package/dist/commands/porch/verdict.js.map +1 -1
  90. package/dist/terminal/pty-manager.d.ts +9 -0
  91. package/dist/terminal/pty-manager.d.ts.map +1 -1
  92. package/dist/terminal/pty-manager.js +45 -2
  93. package/dist/terminal/pty-manager.js.map +1 -1
  94. package/dist/terminal/pty-session.d.ts +27 -4
  95. package/dist/terminal/pty-session.d.ts.map +1 -1
  96. package/dist/terminal/pty-session.js +112 -4
  97. package/dist/terminal/pty-session.js.map +1 -1
  98. package/dist/terminal/ring-buffer.d.ts +10 -3
  99. package/dist/terminal/ring-buffer.d.ts.map +1 -1
  100. package/dist/terminal/ring-buffer.js +25 -5
  101. package/dist/terminal/ring-buffer.js.map +1 -1
  102. package/dist/terminal/session-manager.d.ts +115 -0
  103. package/dist/terminal/session-manager.d.ts.map +1 -0
  104. package/dist/terminal/session-manager.js +582 -0
  105. package/dist/terminal/session-manager.js.map +1 -0
  106. package/dist/terminal/shepherd-client.d.ts +58 -0
  107. package/dist/terminal/shepherd-client.d.ts.map +1 -0
  108. package/dist/terminal/shepherd-client.js +212 -0
  109. package/dist/terminal/shepherd-client.js.map +1 -0
  110. package/dist/terminal/shepherd-main.d.ts +19 -0
  111. package/dist/terminal/shepherd-main.d.ts.map +1 -0
  112. package/dist/terminal/shepherd-main.js +153 -0
  113. package/dist/terminal/shepherd-main.js.map +1 -0
  114. package/dist/terminal/shepherd-process.d.ts +75 -0
  115. package/dist/terminal/shepherd-process.d.ts.map +1 -0
  116. package/dist/terminal/shepherd-process.js +279 -0
  117. package/dist/terminal/shepherd-process.js.map +1 -0
  118. package/dist/terminal/shepherd-protocol.d.ts +115 -0
  119. package/dist/terminal/shepherd-protocol.d.ts.map +1 -0
  120. package/dist/terminal/shepherd-protocol.js +214 -0
  121. package/dist/terminal/shepherd-protocol.js.map +1 -0
  122. package/dist/terminal/shepherd-replay-buffer.d.ts +38 -0
  123. package/dist/terminal/shepherd-replay-buffer.d.ts.map +1 -0
  124. package/dist/terminal/shepherd-replay-buffer.js +94 -0
  125. package/dist/terminal/shepherd-replay-buffer.js.map +1 -0
  126. package/package.json +1 -1
  127. package/skeleton/.claude/skills/codev/SKILL.md +1 -1
  128. package/skeleton/DEPENDENCIES.md +2 -34
  129. package/skeleton/consult-types/impl-review.md +9 -9
  130. package/skeleton/consult-types/integration-review.md +1 -1
  131. package/skeleton/consult-types/plan-review.md +1 -1
  132. package/skeleton/consult-types/pr-ready.md +1 -1
  133. package/skeleton/consult-types/spec-review.md +1 -1
  134. package/skeleton/protocols/bugfix/prompts/pr.md +23 -4
  135. package/skeleton/protocols/maintain/protocol.md +3 -3
  136. package/skeleton/resources/commands/agent-farm.md +2 -3
  137. package/skeleton/resources/commands/codev.md +0 -2
  138. package/skeleton/roles/architect.md +1 -1
  139. package/skeleton/roles/consultant.md +6 -6
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shepherd-replay-buffer.d.ts","sourceRoot":"","sources":["../../src/terminal/shepherd-replay-buffer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,SAAS,CAAK;IAEtB;;;OAGG;gBACS,QAAQ,GAAE,MAAe;IAIrC;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IA0CnC;;;OAGG;IACH,aAAa,IAAI,MAAM;IAMvB,sCAAsC;IACtC,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,0CAA0C;IAC1C,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,+BAA+B;IAC/B,KAAK,IAAI,IAAI;CAKd"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Standalone replay buffer for the shepherd process.
3
+ *
4
+ * Unlike RingBuffer (which stores lines), this stores raw byte chunks
5
+ * to preserve exact terminal output including escape sequences. It tracks
6
+ * the total bytes stored and evicts oldest chunks when the limit is exceeded.
7
+ *
8
+ * This module has NO dependencies beyond Node.js built-ins so the shepherd
9
+ * process doesn't need to pull in the full package dependency tree.
10
+ */
11
+ export class ShepherdReplayBuffer {
12
+ chunks = [];
13
+ totalBytes = 0;
14
+ maxLines;
15
+ lineCount = 0;
16
+ /**
17
+ * @param maxLines Maximum number of lines to retain. Lines are delimited
18
+ * by newline characters in the raw data stream.
19
+ */
20
+ constructor(maxLines = 10_000) {
21
+ this.maxLines = maxLines;
22
+ }
23
+ /**
24
+ * Append raw PTY output data to the buffer.
25
+ * Evicts oldest chunks if the line count exceeds maxLines.
26
+ */
27
+ append(data) {
28
+ const buf = typeof data === 'string' ? Buffer.from(data, 'utf-8') : data;
29
+ if (buf.length === 0)
30
+ return;
31
+ // Count newlines in this chunk
32
+ let newLines = 0;
33
+ for (let i = 0; i < buf.length; i++) {
34
+ if (buf[i] === 0x0a)
35
+ newLines++;
36
+ }
37
+ this.chunks.push(buf);
38
+ this.totalBytes += buf.length;
39
+ this.lineCount += newLines;
40
+ // Evict oldest chunks if we've exceeded the line limit
41
+ while (this.lineCount > this.maxLines && this.chunks.length > 1) {
42
+ const oldest = this.chunks[0];
43
+ let removedLines = 0;
44
+ for (let i = 0; i < oldest.length; i++) {
45
+ if (oldest[i] === 0x0a)
46
+ removedLines++;
47
+ }
48
+ this.chunks.shift();
49
+ this.totalBytes -= oldest.length;
50
+ this.lineCount -= removedLines;
51
+ }
52
+ // Handle edge case: single chunk exceeds line limit.
53
+ // Trim from the front to keep only the last maxLines lines.
54
+ if (this.lineCount > this.maxLines && this.chunks.length === 1) {
55
+ const chunk = this.chunks[0];
56
+ let linesToSkip = this.lineCount - this.maxLines;
57
+ let offset = 0;
58
+ while (linesToSkip > 0 && offset < chunk.length) {
59
+ if (chunk[offset] === 0x0a)
60
+ linesToSkip--;
61
+ offset++;
62
+ }
63
+ this.chunks[0] = chunk.subarray(offset);
64
+ this.totalBytes = this.chunks[0].length;
65
+ this.lineCount = this.maxLines;
66
+ }
67
+ }
68
+ /**
69
+ * Get all buffered data as a single concatenated Buffer.
70
+ * Used for the REPLAY frame on reconnection.
71
+ */
72
+ getReplayData() {
73
+ if (this.chunks.length === 0)
74
+ return Buffer.alloc(0);
75
+ if (this.chunks.length === 1)
76
+ return this.chunks[0];
77
+ return Buffer.concat(this.chunks);
78
+ }
79
+ /** Current number of bytes stored. */
80
+ get size() {
81
+ return this.totalBytes;
82
+ }
83
+ /** Approximate number of lines stored. */
84
+ get lines() {
85
+ return this.lineCount;
86
+ }
87
+ /** Clear all buffered data. */
88
+ clear() {
89
+ this.chunks = [];
90
+ this.totalBytes = 0;
91
+ this.lineCount = 0;
92
+ }
93
+ }
94
+ //# sourceMappingURL=shepherd-replay-buffer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shepher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AM,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACpD,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IAED,sCAAsC;IACtC,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,0CAA0C;IAC1C,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,+BAA+B;IAC/B,KAAK;QACH,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;IACrB,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cluesmith/codev",
3
- "version": "2.0.0-rc.69",
3
+ "version": "2.0.0-rc.70",
4
4
  "description": "Codev CLI - AI-assisted software development framework",
5
5
  "type": "module",
6
6
  "bin": {
@@ -31,7 +31,7 @@ Adds codev to the **current directory**. Detects existing CLAUDE.md/AGENTS.md an
31
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
32
 
33
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).
34
+ Checks that all required dependencies are installed: Node.js (>=18), git (>=2.5), gh (authenticated), and at least one AI CLI (Claude, Gemini, or Codex).
35
35
 
36
36
  ## Common Mistakes
37
37
 
@@ -37,26 +37,6 @@ sudo apt install -y nodejs
37
37
  node --version # Should show v18.x or higher
38
38
  ```
39
39
 
40
- ### tmux
41
-
42
- | Requirement | Value |
43
- |-------------|-------|
44
- | Minimum Version | 3.0 |
45
- | Purpose | Terminal multiplexer for managing builder sessions |
46
-
47
- **Installation:**
48
-
49
- ```bash
50
- # macOS
51
- brew install tmux
52
-
53
- # Ubuntu/Debian
54
- sudo apt install tmux
55
-
56
- # Verify
57
- tmux -V # Should show tmux 3.x or higher
58
- ```
59
-
60
40
  ### git
61
41
 
62
42
  | Requirement | Value |
@@ -169,7 +149,6 @@ codex --version
169
149
  | Dependency | Minimum Version | Required? |
170
150
  |------------|-----------------|-----------|
171
151
  | Node.js | 18.0.0 | Yes |
172
- | tmux | 3.0 | Yes |
173
152
  | git | 2.5.0 | Yes |
174
153
  | gh | latest | Yes |
175
154
  | Claude Code | latest | At least one AI CLI |
@@ -186,7 +165,7 @@ All dependencies are available via Homebrew:
186
165
 
187
166
  ```bash
188
167
  # Install all core dependencies at once
189
- brew install node tmux gh
168
+ brew install node gh
190
169
 
191
170
  # Git is included with Xcode command line tools
192
171
  xcode-select --install
@@ -198,7 +177,7 @@ Most dependencies are available via apt:
198
177
 
199
178
  ```bash
200
179
  # Core dependencies
201
- sudo apt install nodejs npm tmux git
180
+ sudo apt install nodejs npm git
202
181
 
203
182
  # gh requires adding GitHub's apt repository (see above)
204
183
  ```
@@ -230,17 +209,6 @@ echo $PATH
230
209
  export PATH="$PATH:$(npm config get prefix)/bin"
231
210
  ```
232
211
 
233
- ### tmux version too old
234
-
235
- Ubuntu LTS versions often have older tmux. Install from source or use a PPA:
236
-
237
- ```bash
238
- # Add tmux PPA for newer versions
239
- sudo add-apt-repository ppa:pi-rho/dev
240
- sudo apt update
241
- sudo apt install tmux
242
- ```
243
-
244
212
  ### Terminal connection issues
245
213
 
246
214
  Ensure no firewall is blocking the ports (default: 4200-4299):
@@ -1,38 +1,38 @@
1
1
  # Implementation Review Prompt
2
2
 
3
3
  ## Context
4
- You are reviewing implementation work at Stage 4 (IMPLEMENTING) of the workflow. A builder has completed a phase (Implement + Defend) and needs feedback before proceeding. Your job is to verify the implementation matches the spec and plan.
4
+ You are reviewing implementation work during the Implement phase. A builder has completed a plan phase and needs feedback before proceeding. Your job is to verify the implementation matches the spec and plan.
5
+
6
+ ## CRITICAL: Verify Before Flagging
7
+
8
+ Before requesting changes for missing configuration, incorrect patterns, or framework issues:
9
+ 1. **Check `package.json`** for actual dependency versions — framework conventions change between major versions
10
+ 2. **Read the actual config files** (or confirm their deliberate absence) before flagging missing configs
11
+ 3. **Do not assume** your training data reflects the version in use — verify against project files
12
+ 4. If "Previous Iteration Context" is provided, read it carefully before re-raising concerns that were already disputed
5
13
 
6
14
  ## Focus Areas
7
15
 
8
16
  1. **Spec Adherence**
9
17
  - Does the implementation fulfill the spec requirements for this phase?
10
18
  - Are acceptance criteria met?
11
- - Are there deviations from the spec that need explanation?
12
19
 
13
20
  2. **Code Quality**
14
21
  - Is the code readable and maintainable?
15
22
  - Are there obvious bugs or issues?
16
23
  - Are error cases handled appropriately?
17
- - Does it follow project conventions?
18
24
 
19
25
  3. **Test Coverage**
20
26
  - Are the tests adequate for this phase?
21
27
  - Do tests cover the main paths AND edge cases?
22
- - Are tests testing the right things (behavior, not implementation)?
23
- - Would the tests catch regressions?
24
28
 
25
29
  4. **Plan Alignment**
26
30
  - Does the implementation follow the plan?
27
- - Are there deviations that make sense?
28
31
  - Are there plan items skipped or partially completed?
29
32
 
30
33
  5. **UX Verification** (if spec has UX requirements)
31
34
  - Does the actual user experience match what the spec describes?
32
35
  - If spec says "async" or "non-blocking", is it actually async?
33
- - If spec says "immediate response", does user get one quickly?
34
- - Do any flow diagrams in the spec match the actual behavior?
35
- - **CRITICAL:** A synchronous implementation that passes tests can completely fail UX requirements
36
36
 
37
37
  ## Verdict Format
38
38
 
@@ -1,7 +1,7 @@
1
1
  # Integration Review Prompt
2
2
 
3
3
  ## Context
4
- You are performing an integration review at Stage 6 (COMMITTED) of the workflow. The builder has created a PR and you are evaluating whether this change fits well into the broader system. This is the architect's review, focusing on how the change integrates rather than whether it works.
4
+ You are performing an integration review of a pull request. The builder has created a PR and you are evaluating whether this change fits well into the broader system. This is the architect's review, focusing on how the change integrates rather than whether it works.
5
5
 
6
6
  ## Focus Areas
7
7
 
@@ -1,7 +1,7 @@
1
1
  # Plan Review Prompt
2
2
 
3
3
  ## Context
4
- You are reviewing an implementation plan at Stage 2 (SPECIFIED) of the workflow. The spec has been approved - now you must evaluate whether the plan adequately describes HOW to implement it.
4
+ You are reviewing an implementation plan during the Plan phase. The spec has been approved - now you must evaluate whether the plan adequately describes HOW to implement it.
5
5
 
6
6
  ## Focus Areas
7
7
 
@@ -1,7 +1,7 @@
1
1
  # PR Ready Review Prompt
2
2
 
3
3
  ## Context
4
- You are performing a final self-check at Stage 5 (IMPLEMENTED) of the workflow. The builder has completed all implementation phases and is about to create a PR. This is the last check before the work goes to the architect for integration review.
4
+ You are performing a final self-check during the Review phase. The builder has completed all implementation phases and is about to create a PR. This is the last check before the work goes to the architect for integration review.
5
5
 
6
6
  ## Focus Areas
7
7
 
@@ -1,7 +1,7 @@
1
1
  # Specification Review Prompt
2
2
 
3
3
  ## Context
4
- You are reviewing a feature specification at Stage 1 (CONCEIVED) of the workflow. Your role is to ensure the spec is complete, correct, and feasible before it moves to human approval.
4
+ You are reviewing a feature specification during the Specify phase. Your role is to ensure the spec is complete, correct, and feasible before it moves to human approval.
5
5
 
6
6
  ## Focus Areas
7
7
 
@@ -4,7 +4,7 @@ You are executing the **PR** phase of the BUGFIX protocol.
4
4
 
5
5
  ## Your Goal
6
6
 
7
- Create a pull request and notify the architect. The architect handles review, merge, and cleanup.
7
+ Create a pull request, run CMAP review, and address feedback.
8
8
 
9
9
  ## Context
10
10
 
@@ -42,9 +42,28 @@ EOF
42
42
  )"
43
43
  ```
44
44
 
45
- ### 2. Notify Architect
45
+ ### 2. Run CMAP Review
46
46
 
47
- After the PR is created, notify the architect and signal completion. The architect handles review, merge, and cleanup from here.
47
+ Run 3-way parallel consultation on the PR:
48
+
49
+ ```bash
50
+ consult --model gemini pr <PR_NUMBER> &
51
+ consult --model codex pr <PR_NUMBER> &
52
+ consult --model claude pr <PR_NUMBER> &
53
+ ```
54
+
55
+ All three should run in the background (`run_in_background: true`).
56
+
57
+ ### 3. Address Feedback
58
+
59
+ Review the consultation results:
60
+ - Fix any issues identified by reviewers
61
+ - Push updates to the PR branch
62
+ - Re-run CMAP if substantial changes were made
63
+
64
+ ### 4. Notify Architect
65
+
66
+ After CMAP review is complete and feedback is addressed, notify the architect:
48
67
 
49
68
  ```bash
50
69
  af send architect "PR #<number> ready for review (fixes issue #{{issue.number}})"
@@ -52,7 +71,7 @@ af send architect "PR #<number> ready for review (fixes issue #{{issue.number}})
52
71
 
53
72
  ## Signals
54
73
 
55
- When PR is created and architect is notified:
74
+ When PR is created and reviews are complete:
56
75
 
57
76
  ```
58
77
  <signal>PHASE_COMPLETE</signal>
@@ -186,8 +186,8 @@ Scan the actual codebase and update `codev/resources/arch.md`:
186
186
  - **Location**: path/to/component
187
187
  - **How It Works**:
188
188
  - Step-by-step explanation of the mechanism
189
- - Key technologies used (e.g., "uses tmux for terminal multiplexing")
190
- - Runtime behavior (e.g., "spawns a tmux session per builder")
189
+ - Key technologies used (e.g., "uses shepherd processes for terminal persistence")
190
+ - Runtime behavior (e.g., "spawns a shepherd process per builder terminal")
191
191
  - State management (e.g., "state stored in SQLite at .agent-farm/state.db")
192
192
  - **Key Files**:
193
193
  - `file.ts` - does X
@@ -222,7 +222,7 @@ For each major component, arch.md MUST explain the implementation mechanism, not
222
222
 
223
223
  | Bad (just WHAT) | Good (includes HOW) |
224
224
  |-----------------|---------------------|
225
- | "Agent Farm manages builders" | "Agent Farm spawns builders in isolated git worktrees. Each builder runs in a tmux session (named `builder-{id}`). The dashboard uses ttyd to expose terminals via HTTP on ports 4201-4299. State is persisted in SQLite." |
225
+ | "Agent Farm manages builders" | "Agent Farm spawns builders in isolated git worktrees. Each builder runs in a shepherd-backed terminal session. The Tower dashboard exposes terminals via WebSocket. State is persisted in SQLite." |
226
226
  | "Consult tool queries AI models" | "Consult shells out to external CLIs (gemini-cli, codex, claude). It writes the consultant role to a temp file, sets environment variables, and streams stdout/stderr back to the user." |
227
227
 
228
228
  This level of detail enables rapid onboarding and debugging.
@@ -43,7 +43,7 @@ af dash start [options]
43
43
  Starts the agent-farm dashboard with:
44
44
  - Architect terminal (Claude session with architect role)
45
45
  - Web-based UI for monitoring builders
46
- - tmux session management
46
+ - Terminal session management (shepherd processes)
47
47
 
48
48
  The dashboard is accessible via browser at `http://localhost:<port>`.
49
49
 
@@ -132,8 +132,7 @@ af dash stop
132
132
  **Description:**
133
133
 
134
134
  Stops all running agent-farm processes including:
135
- - tmux sessions
136
- - ttyd processes
135
+ - Terminal sessions (shepherd processes)
137
136
  - Dashboard servers
138
137
 
139
138
  Does NOT clean up worktrees - use `af cleanup` for that.
@@ -95,7 +95,6 @@ Verifies that all required dependencies are installed and properly configured:
95
95
 
96
96
  **Core Dependencies (required):**
97
97
  - Node.js (>= 18.0.0)
98
- - tmux (>= 3.0)
99
98
  - ttyd (>= 1.7.0)
100
99
  - git (>= 2.5.0)
101
100
  - gh (GitHub CLI, authenticated)
@@ -123,7 +122,6 @@ Codev Doctor - Checking your environment
123
122
  Core Dependencies (required for Agent Farm)
124
123
 
125
124
  ✓ Node.js 20.10.0
126
- ✓ tmux 3.4
127
125
  ✓ ttyd 1.7.4
128
126
  ✓ git 2.42.0
129
127
  ✓ gh authenticated
@@ -160,7 +160,7 @@ af cleanup -p 0042
160
160
  ### ALWAYS Do These:
161
161
  1. **Reserve project numbers first** - Update projectlist.md before spawning
162
162
  2. **Review artifacts before approving gates** - (Strict mode) Read the spec/plan carefully
163
- 3. **Use PR comments for feedback** - Not tmux send-keys
163
+ 3. **Use PR comments for feedback** - Not terminal send-keys
164
164
  4. **Let builders own their work** - Guide, don't take over
165
165
 
166
166
  ## Project Tracking
@@ -5,16 +5,16 @@ You are a consultant providing a second perspective to support decision-making.
5
5
  ## Responsibilities
6
6
 
7
7
  1. **Understand context** - Grasp the problem and constraints being presented
8
- 2. **Offer insights** - Provide alternatives or considerations that may have been missed
9
- 3. **Be constructive** - Help improve the solution, don't just critique
10
- 4. **Be direct** - Give honest, clear feedback without excessive hedging
11
- 5. **Collaborate** - Work toward the best outcome alongside the primary agent
8
+ 2. **Verify before flagging** - Check actual project files (package.json, configs) before claiming something is wrong or missing. Framework conventions change between major versions.
9
+ 3. **Offer insights** - Provide alternatives or considerations that may have been missed
10
+ 4. **Be constructive** - Help improve the solution, don't just critique
11
+ 5. **Be direct** - Give honest, clear feedback without excessive hedging
12
12
 
13
13
  ## You Are NOT
14
14
 
15
15
  - An adversary or gatekeeper
16
16
  - A rubber stamp that just agrees
17
- - A code generator (unless specifically asked for snippets)
17
+ - A source of generic advice that ignores actual project context
18
18
 
19
19
  ## Relationship to Other Roles
20
20
 
@@ -24,4 +24,4 @@ You are a consultant providing a second perspective to support decision-making.
24
24
  | Builder | Implements in isolation |
25
25
  | Consultant | Provides perspective, supports decisions |
26
26
 
27
- You think alongside the other agents, helping them see blind spots.
27
+ You think alongside the other agents, helping them see blind spots. You have filesystem access — use it to verify your claims against the actual codebase.