@cluesmith/codev 1.5.24 → 1.5.26
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/dist/agent-farm/cli.d.ts.map +1 -1
- package/dist/agent-farm/cli.js +19 -2
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/cleanup.d.ts +2 -1
- package/dist/agent-farm/commands/cleanup.d.ts.map +1 -1
- package/dist/agent-farm/commands/cleanup.js +112 -22
- package/dist/agent-farm/commands/cleanup.js.map +1 -1
- package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn.js +157 -2
- package/dist/agent-farm/commands/spawn.js.map +1 -1
- package/dist/agent-farm/types.d.ts +5 -1
- package/dist/agent-farm/types.d.ts.map +1 -1
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +11 -1
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +11 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/lib/scaffold.d.ts +13 -0
- package/dist/lib/scaffold.d.ts.map +1 -1
- package/dist/lib/scaffold.js +34 -0
- package/dist/lib/scaffold.js.map +1 -1
- package/dist/lib/templates.js +1 -1
- package/dist/lib/templates.js.map +1 -1
- package/package.json +1 -1
- package/skeleton/resources/spikes.md +118 -0
- package/skeleton/roles/architect.md +35 -103
- package/templates/dashboard/css/files.css +18 -0
- package/templates/dashboard/js/main.js +16 -6
|
@@ -110,6 +110,34 @@ These rules are **non-negotiable** and must be followed at all times:
|
|
|
110
110
|
7. **Monitor progress** - Track Builder status, unblock when needed
|
|
111
111
|
8. **Review and integrate** - Review Builder PRs, let builders merge them
|
|
112
112
|
9. **Maintain quality** - Ensure consistency across Builder outputs
|
|
113
|
+
10. **Enforce spec compliance** - Verify implementations match specs exactly
|
|
114
|
+
|
|
115
|
+
## Spec Compliance Enforcement (CRITICAL)
|
|
116
|
+
|
|
117
|
+
**The spec is the source of truth. Code that doesn't match the spec is wrong, even if it "works".**
|
|
118
|
+
|
|
119
|
+
### The Trust Hierarchy
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
SPEC (source of truth)
|
|
123
|
+
↓
|
|
124
|
+
PLAN (implementation guide derived from spec)
|
|
125
|
+
↓
|
|
126
|
+
EXISTING CODE (NOT TRUSTED - must be validated against spec)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Never trust existing code over the spec.** Previous phases may have drifted. The spec is always authoritative.
|
|
130
|
+
|
|
131
|
+
### Before Each Implementation Phase
|
|
132
|
+
|
|
133
|
+
Ask yourself:
|
|
134
|
+
1. "Have I read the spec in the last 30 minutes?"
|
|
135
|
+
2. "Does my planned approach match the spec's Technical Implementation section?"
|
|
136
|
+
3. "If the spec has code examples, am I following them?"
|
|
137
|
+
4. "If the spec has 'Traps to Avoid', have I checked each one?"
|
|
138
|
+
5. "Does the existing code I'm building on match the spec?"
|
|
139
|
+
|
|
140
|
+
If ANY answer is "no" or "I'm not sure" → STOP and verify before proceeding.
|
|
113
141
|
|
|
114
142
|
## Project Tracking
|
|
115
143
|
|
|
@@ -225,111 +253,15 @@ The Architect monitors progress and provides guidance when the builder is blocke
|
|
|
225
253
|
|
|
226
254
|
## Spikes: De-risking Technical Unknowns
|
|
227
255
|
|
|
228
|
-
**
|
|
229
|
-
|
|
230
|
-
### What is a Spike?
|
|
231
|
-
|
|
232
|
-
The term comes from Extreme Programming (XP), coined in the late 1990s. The metaphor: a spike is like driving a railroad spike through all layers of a problem to see what's underneath. You're not building the whole foundation - you're just poking through to answer a specific question.
|
|
233
|
-
|
|
234
|
-
**Key characteristics:**
|
|
235
|
-
- **Time-boxed** - Has a hard stop, not open-ended research
|
|
236
|
-
- **Throwaway** - The code is discarded; only the knowledge is kept
|
|
237
|
-
- **Focused** - Answers ONE specific question
|
|
238
|
-
- **Reduces risk** - Done before committing to full implementation
|
|
239
|
-
|
|
240
|
-
| Type | Question |
|
|
241
|
-
|------|----------|
|
|
242
|
-
| Spike | "Can we?" / "Does it work?" |
|
|
243
|
-
| Implementation | "Build it" |
|
|
244
|
-
|
|
245
|
-
### When to Use Spikes
|
|
246
|
-
|
|
247
|
-
Use spikes when a spec has:
|
|
248
|
-
- **Untested external APIs** - Will the API actually behave as documented?
|
|
249
|
-
- **Architectural uncertainty** - Will this pattern work for our use case?
|
|
250
|
-
- **Integration questions** - Can these components work together?
|
|
251
|
-
- **Performance unknowns** - Will this approach be fast enough?
|
|
252
|
-
|
|
253
|
-
**Rule of thumb:** If the spec says "we believe X will work" or "according to docs, Y should happen" - that's a spike candidate.
|
|
254
|
-
|
|
255
|
-
### Spike Structure
|
|
256
|
-
|
|
257
|
-
Store spikes in `codev/spikes/{spec-number}/`:
|
|
258
|
-
|
|
259
|
-
```
|
|
260
|
-
codev/spikes/
|
|
261
|
-
└── 0062/
|
|
262
|
-
├── spike-api-behavior.ts
|
|
263
|
-
├── spike-event-handoff.ts
|
|
264
|
-
└── spike-storage-roundtrip.ts
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
Each spike file should:
|
|
268
|
-
|
|
269
|
-
```typescript
|
|
270
|
-
/**
|
|
271
|
-
* Spike: [Clear Name]
|
|
272
|
-
*
|
|
273
|
-
* Purpose: [What assumption are we validating?]
|
|
274
|
-
*
|
|
275
|
-
* Tests:
|
|
276
|
-
* 1. [Specific test case]
|
|
277
|
-
* 2. [Another test case]
|
|
278
|
-
* 3. [Edge case]
|
|
279
|
-
*
|
|
280
|
-
* Run with: npx tsx codev/spikes/0062/spike-name.ts
|
|
281
|
-
*/
|
|
282
|
-
|
|
283
|
-
// Self-contained, runnable code that validates the assumption
|
|
284
|
-
// Mock/simulate infrastructure where needed
|
|
285
|
-
// Print clear PASS/FAIL for each test
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
### Spike Workflow
|
|
289
|
-
|
|
290
|
-
1. **Identify unknowns** during Plan phase - what could break our assumptions?
|
|
291
|
-
2. **Create spikes** for each high-risk unknown
|
|
292
|
-
3. **Run spikes** and document results in spec/plan
|
|
293
|
-
4. **Adjust plan** based on spike findings
|
|
294
|
-
5. **Include spike results** in spec as "Research Findings"
|
|
295
|
-
|
|
296
|
-
### Example Spike Questions
|
|
297
|
-
|
|
298
|
-
| Unknown | Spike Purpose |
|
|
299
|
-
|---------|---------------|
|
|
300
|
-
| "Gemini 3 requires thought signatures" | Validate signature storage and replay works |
|
|
301
|
-
| "Two Inngest functions can hand off" | Test event emission and separate invocation |
|
|
302
|
-
| "Frontend handles sequence gaps" | Simulate gap and verify realignment |
|
|
303
|
-
| "Raw payload survives database round-trip" | Store and reconstruct exact API format |
|
|
304
|
-
|
|
305
|
-
### Spike vs Prototype vs POC
|
|
306
|
-
|
|
307
|
-
| Type | Scope | Output | Kept? |
|
|
308
|
-
|------|-------|--------|-------|
|
|
309
|
-
| **Spike** | Single question | PASS/FAIL + learnings | No (throwaway) |
|
|
310
|
-
| **Prototype** | Feature shape | Working UI/flow | Sometimes |
|
|
311
|
-
| **POC** | System viability | Minimal working system | Often becomes v1 |
|
|
312
|
-
|
|
313
|
-
Spikes are deliberately disposable - they exist to answer a question, not to become production code.
|
|
314
|
-
|
|
315
|
-
### Build Exclusion
|
|
316
|
-
|
|
317
|
-
**Always exclude spikes from the project's TypeScript build:**
|
|
318
|
-
|
|
319
|
-
```json
|
|
320
|
-
// tsconfig.json
|
|
321
|
-
{
|
|
322
|
-
"exclude": ["node_modules", "codev/spikes"]
|
|
323
|
-
}
|
|
324
|
-
```
|
|
256
|
+
When facing high-risk technical unknowns, use **spikes** - short, time-boxed experiments (1-2 hours max) that validate assumptions before full implementation.
|
|
325
257
|
|
|
326
|
-
|
|
327
|
-
- Spikes use experimental/mock code that may not compile cleanly
|
|
328
|
-
- Spikes may import packages not in production dependencies
|
|
329
|
-
- Keeps build fast and focused on production code
|
|
330
|
-
- Prevents spike code from accidentally shipping
|
|
258
|
+
**Full guide:** See [codev/resources/spikes.md](../resources/spikes.md)
|
|
331
259
|
|
|
332
|
-
|
|
260
|
+
**Quick reference:**
|
|
261
|
+
- Store in `codev/spikes/{spec-number}/`
|
|
262
|
+
- Typically 1-2 hours; check in if taking longer
|
|
263
|
+
- Output: PASS/FAIL + learnings (code is throwaway)
|
|
264
|
+
- Use when: Untested APIs, architectural uncertainty, integration questions
|
|
333
265
|
|
|
334
266
|
## Communication with Builders
|
|
335
267
|
|
|
@@ -498,6 +498,24 @@
|
|
|
498
498
|
text-align: center;
|
|
499
499
|
}
|
|
500
500
|
|
|
501
|
+
/* Action items for creating new shells/worktrees */
|
|
502
|
+
.dashboard-tab-action {
|
|
503
|
+
border: 1px dashed var(--border);
|
|
504
|
+
margin-bottom: 4px;
|
|
505
|
+
color: var(--text-muted);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.dashboard-tab-action:hover {
|
|
509
|
+
border-style: solid;
|
|
510
|
+
border-color: var(--accent);
|
|
511
|
+
color: var(--text-secondary);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.dashboard-tab-action .tab-icon {
|
|
515
|
+
color: var(--accent);
|
|
516
|
+
font-weight: 500;
|
|
517
|
+
}
|
|
518
|
+
|
|
501
519
|
/* Status indicators in dashboard tab list */
|
|
502
520
|
.dashboard-status-indicator {
|
|
503
521
|
width: 8px;
|
|
@@ -116,10 +116,6 @@ function renderDashboardTabContent() {
|
|
|
116
116
|
<div class="dashboard-section section-tabs ${sectionState.tabs ? '' : 'collapsed'}">
|
|
117
117
|
<div class="dashboard-section-header" onclick="toggleSection('tabs')">
|
|
118
118
|
<h3><span class="collapse-icon">▼</span> Tabs</h3>
|
|
119
|
-
<div class="header-actions" onclick="event.stopPropagation()">
|
|
120
|
-
<button onclick="spawnBuilder()" title="New Worktree">+ Worktree</button>
|
|
121
|
-
<button onclick="spawnShell()" title="New Shell">+ Shell</button>
|
|
122
|
-
</div>
|
|
123
119
|
</div>
|
|
124
120
|
<div class="dashboard-section-content">
|
|
125
121
|
<div class="dashboard-tabs-list" id="dashboard-tabs-list">
|
|
@@ -173,11 +169,23 @@ function renderDashboardTabContent() {
|
|
|
173
169
|
function renderDashboardTabsList() {
|
|
174
170
|
const terminalTabs = tabs.filter(t => t.type !== 'dashboard' && t.type !== 'files');
|
|
175
171
|
|
|
172
|
+
// Action items at the top of the list
|
|
173
|
+
const actionItems = `
|
|
174
|
+
<div class="dashboard-tab-item dashboard-tab-action" onclick="spawnShell()">
|
|
175
|
+
<span class="tab-icon">+</span>
|
|
176
|
+
<span class="tab-name">Create new shell</span>
|
|
177
|
+
</div>
|
|
178
|
+
<div class="dashboard-tab-item dashboard-tab-action" onclick="spawnBuilder()">
|
|
179
|
+
<span class="tab-icon">+</span>
|
|
180
|
+
<span class="tab-name">Create new worktree + shell</span>
|
|
181
|
+
</div>
|
|
182
|
+
`;
|
|
183
|
+
|
|
176
184
|
if (terminalTabs.length === 0) {
|
|
177
|
-
return
|
|
185
|
+
return actionItems;
|
|
178
186
|
}
|
|
179
187
|
|
|
180
|
-
|
|
188
|
+
const tabItems = terminalTabs.map(tab => {
|
|
181
189
|
const isActive = tab.id === activeTabId;
|
|
182
190
|
const icon = getTabIcon(tab.type);
|
|
183
191
|
const statusIndicator = getDashboardStatusIndicator(tab);
|
|
@@ -190,6 +198,8 @@ function renderDashboardTabsList() {
|
|
|
190
198
|
</div>
|
|
191
199
|
`;
|
|
192
200
|
}).join('');
|
|
201
|
+
|
|
202
|
+
return actionItems + tabItems;
|
|
193
203
|
}
|
|
194
204
|
|
|
195
205
|
// Get status indicator for dashboard tab list
|