@cluesmith/codev 1.1.0 → 1.2.0
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 -0
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/cleanup.d.ts.map +1 -1
- package/dist/agent-farm/commands/cleanup.js +18 -1
- package/dist/agent-farm/commands/cleanup.js.map +1 -1
- package/dist/agent-farm/commands/consult.d.ts +16 -0
- package/dist/agent-farm/commands/consult.d.ts.map +1 -0
- package/dist/agent-farm/commands/consult.js +51 -0
- package/dist/agent-farm/commands/consult.js.map +1 -0
- package/dist/agent-farm/commands/open.js +6 -6
- package/dist/agent-farm/commands/open.js.map +1 -1
- package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn.js +51 -42
- package/dist/agent-farm/commands/spawn.js.map +1 -1
- package/dist/agent-farm/commands/start.d.ts.map +1 -1
- package/dist/agent-farm/commands/start.js +9 -14
- package/dist/agent-farm/commands/start.js.map +1 -1
- package/dist/agent-farm/commands/util.js +2 -2
- package/dist/agent-farm/commands/util.js.map +1 -1
- package/dist/agent-farm/db/errors.d.ts +4 -0
- package/dist/agent-farm/db/errors.d.ts.map +1 -1
- package/dist/agent-farm/db/errors.js +8 -0
- package/dist/agent-farm/db/errors.js.map +1 -1
- package/dist/agent-farm/servers/dashboard-server.js +125 -71
- package/dist/agent-farm/servers/dashboard-server.js.map +1 -1
- package/dist/agent-farm/servers/open-server.d.ts +9 -0
- package/dist/agent-farm/servers/open-server.d.ts.map +1 -0
- package/dist/agent-farm/servers/{annotate-server.js → open-server.js} +17 -15
- package/dist/agent-farm/servers/open-server.js.map +1 -0
- package/dist/agent-farm/servers/tower-server.js +4 -7
- package/dist/agent-farm/servers/tower-server.js.map +1 -1
- package/dist/agent-farm/state.d.ts +5 -0
- package/dist/agent-farm/state.d.ts.map +1 -1
- package/dist/agent-farm/state.js +17 -0
- package/dist/agent-farm/state.js.map +1 -1
- package/dist/agent-farm/types.d.ts +1 -1
- package/dist/agent-farm/types.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.js +13 -7
- package/dist/agent-farm/utils/config.js.map +1 -1
- package/dist/agent-farm/utils/port-registry.d.ts +1 -1
- package/dist/agent-farm/utils/port-registry.d.ts.map +1 -1
- package/dist/agent-farm/utils/port-registry.js +1 -1
- package/dist/agent-farm/utils/port-registry.js.map +1 -1
- package/dist/agent-farm/utils/shell.d.ts +19 -0
- package/dist/agent-farm/utils/shell.d.ts.map +1 -1
- package/dist/agent-farm/utils/shell.js +28 -0
- package/dist/agent-farm/utils/shell.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +33 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.d.ts +3 -0
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +31 -25
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/consult/index.d.ts +3 -2
- package/dist/commands/consult/index.d.ts.map +1 -1
- package/dist/commands/consult/index.js +128 -54
- package/dist/commands/consult/index.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +88 -36
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/eject.d.ts +18 -0
- package/dist/commands/eject.d.ts.map +1 -0
- package/dist/commands/eject.js +149 -0
- package/dist/commands/eject.js.map +1 -0
- package/dist/commands/import.d.ts +16 -0
- package/dist/commands/import.d.ts.map +1 -0
- package/dist/commands/import.js +278 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +32 -27
- package/dist/commands/init.js.map +1 -1
- package/dist/lib/projectlist-parser.d.ts +70 -0
- package/dist/lib/projectlist-parser.d.ts.map +1 -0
- package/dist/lib/projectlist-parser.js +200 -0
- package/dist/lib/projectlist-parser.js.map +1 -0
- package/dist/lib/skeleton.d.ts +41 -0
- package/dist/lib/skeleton.d.ts.map +1 -0
- package/dist/lib/skeleton.js +110 -0
- package/dist/lib/skeleton.js.map +1 -0
- package/dist/lib/templates.d.ts +2 -1
- package/dist/lib/templates.d.ts.map +1 -1
- package/dist/lib/templates.js +11 -10
- package/dist/lib/templates.js.map +1 -1
- package/package.json +5 -4
- package/{templates → skeleton}/DEPENDENCIES.md +3 -48
- package/skeleton/bin/agent-farm +7 -0
- package/skeleton/docs/commands/agent-farm.md +469 -0
- package/skeleton/docs/commands/codev.md +253 -0
- package/skeleton/docs/commands/consult.md +286 -0
- package/skeleton/docs/commands/overview.md +108 -0
- package/skeleton/maintain/.gitkeep +2 -0
- package/{templates → skeleton}/protocols/experiment/protocol.md +2 -2
- package/skeleton/protocols/maintain/protocol.md +502 -0
- package/skeleton/protocols/maintain/templates/maintenance-run.md +64 -0
- package/{templates → skeleton}/protocols/spider/protocol.md +9 -9
- package/{templates/protocols/spider-solo → skeleton/protocols/spider}/templates/plan.md +22 -1
- package/{templates/protocols/spider-solo → skeleton/protocols/spider}/templates/spec.md +30 -1
- package/skeleton/protocols/tick/protocol.md +277 -0
- package/skeleton/resources/lessons-learned.md +30 -0
- package/skeleton/resources/workflow-reference.md +242 -0
- package/skeleton/roles/architect.md +283 -0
- package/{templates → skeleton}/roles/builder.md +2 -0
- package/skeleton/roles/review-types/impl-review.md +56 -0
- package/skeleton/roles/review-types/integration-review.md +68 -0
- package/skeleton/roles/review-types/plan-review.md +59 -0
- package/skeleton/roles/review-types/pr-ready.md +72 -0
- package/skeleton/roles/review-types/spec-review.md +55 -0
- package/skeleton/templates/lessons-learned.md +28 -0
- package/{templates → skeleton}/templates/projectlist.md +17 -16
- package/dist/agent-farm/servers/annotate-server.d.ts +0 -9
- package/dist/agent-farm/servers/annotate-server.d.ts.map +0 -1
- package/dist/agent-farm/servers/annotate-server.js.map +0 -1
- package/templates/agents/architecture-documenter.md +0 -189
- package/templates/agents/codev-updater.md +0 -276
- package/templates/agents/spider-protocol-updater.md +0 -118
- package/templates/annotate.html +0 -903
- package/templates/bin/agent-farm +0 -18
- package/templates/bin/annotate-server.js +0 -140
- package/templates/dashboard-split.html +0 -1679
- package/templates/dashboard.html +0 -149
- package/templates/protocols/maintain/protocol.md +0 -235
- package/templates/protocols/spider/templates/plan.md +0 -169
- package/templates/protocols/spider/templates/review.md +0 -207
- package/templates/protocols/spider/templates/spec.md +0 -140
- package/templates/protocols/spider-solo/protocol.md +0 -619
- package/templates/protocols/tick/protocol.md +0 -250
- package/templates/roles/architect.md +0 -230
- package/templates/tower.html +0 -1032
- /package/{templates/AGENTS.md → skeleton/AGENTS.md.template} +0 -0
- /package/{templates/CLAUDE.md → skeleton/CLAUDE.md.template} +0 -0
- /package/{templates → skeleton}/bin/codev-doctor +0 -0
- /package/{templates → skeleton}/builders.md +0 -0
- /package/{templates → skeleton}/config.json +0 -0
- /package/{templates → skeleton}/plans/.gitkeep +0 -0
- /package/{templates → skeleton}/protocols/experiment/templates/notes.md +0 -0
- /package/{templates/protocols/spider-solo → skeleton/protocols/spider}/templates/review.md +0 -0
- /package/{templates → skeleton}/protocols/tick/templates/plan.md +0 -0
- /package/{templates → skeleton}/protocols/tick/templates/review.md +0 -0
- /package/{templates → skeleton}/protocols/tick/templates/spec.md +0 -0
- /package/{templates → skeleton}/reviews/.gitkeep +0 -0
- /package/{templates → skeleton}/roles/consultant.md +0 -0
- /package/{templates → skeleton}/specs/.gitkeep +0 -0
package/templates/dashboard.html
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<title>AF: {{PROJECT_NAME}}</title>
|
|
5
|
-
<style>
|
|
6
|
-
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
7
|
-
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; padding: 20px; background: #1a1a1a; color: #fff; }
|
|
8
|
-
h1 { margin-bottom: 20px; font-size: 24px; font-weight: 600; }
|
|
9
|
-
h2 { font-size: 16px; font-weight: 500; margin-bottom: 15px; color: #888; }
|
|
10
|
-
|
|
11
|
-
.layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
|
|
12
|
-
.layout.no-builders { grid-template-columns: 1fr; }
|
|
13
|
-
|
|
14
|
-
.architect-section { }
|
|
15
|
-
.builders-section { }
|
|
16
|
-
|
|
17
|
-
.terminal-card { background: #2a2a2a; border-radius: 8px; overflow: hidden; margin-bottom: 15px; }
|
|
18
|
-
.terminal-header { padding: 10px 15px; background: #333; display: flex; justify-content: space-between; align-items: center; }
|
|
19
|
-
.terminal-header h3 { font-size: 14px; font-weight: 500; }
|
|
20
|
-
.terminal-status { font-size: 12px; padding: 2px 8px; border-radius: 4px; font-weight: 500; }
|
|
21
|
-
|
|
22
|
-
.status-architect { background: #8b5cf6; }
|
|
23
|
-
.status-spawning { background: #6366f1; }
|
|
24
|
-
.status-implementing { background: #3b82f6; }
|
|
25
|
-
.status-blocked { background: #ef4444; }
|
|
26
|
-
.status-pr-ready { background: #22c55e; }
|
|
27
|
-
.status-reviewing { background: #f59e0b; }
|
|
28
|
-
.status-complete { background: #10b981; }
|
|
29
|
-
|
|
30
|
-
iframe { width: 100%; height: 500px; border: none; background: #000; }
|
|
31
|
-
.builders-section iframe { height: 400px; }
|
|
32
|
-
|
|
33
|
-
.no-terminal { text-align: center; padding: 60px 40px; color: #666; background: #2a2a2a; border-radius: 8px; }
|
|
34
|
-
.no-terminal code { background: #333; padding: 4px 8px; border-radius: 4px; font-size: 13px; }
|
|
35
|
-
|
|
36
|
-
.instructions { margin-top: 20px; padding: 15px; background: #2a2a2a; border-radius: 8px; font-size: 13px; }
|
|
37
|
-
.instructions code { background: #333; padding: 2px 6px; border-radius: 3px; }
|
|
38
|
-
.instructions strong { color: #888; }
|
|
39
|
-
|
|
40
|
-
.refresh-btn {
|
|
41
|
-
position: fixed; top: 20px; right: 20px;
|
|
42
|
-
background: #333; color: #fff; border: none; padding: 8px 16px;
|
|
43
|
-
border-radius: 6px; cursor: pointer; font-size: 13px;
|
|
44
|
-
}
|
|
45
|
-
.refresh-btn:hover { background: #444; }
|
|
46
|
-
|
|
47
|
-
.builder-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
|
|
48
|
-
@media (min-width: 1400px) {
|
|
49
|
-
.builder-grid { grid-template-columns: 1fr 1fr; }
|
|
50
|
-
.builders-section iframe { height: 350px; }
|
|
51
|
-
}
|
|
52
|
-
</style>
|
|
53
|
-
</head>
|
|
54
|
-
<body>
|
|
55
|
-
<button class="refresh-btn" onclick="location.reload()">Refresh</button>
|
|
56
|
-
<h1>Agent Farm - {{PROJECT_NAME}}</h1>
|
|
57
|
-
|
|
58
|
-
<div class="layout" id="layout">
|
|
59
|
-
<!-- Content inserted by JavaScript -->
|
|
60
|
-
</div>
|
|
61
|
-
|
|
62
|
-
<div class="instructions">
|
|
63
|
-
<strong>Commands:</strong>
|
|
64
|
-
<code>architect start</code> ·
|
|
65
|
-
<code>architect spawn --project XXXX</code> ·
|
|
66
|
-
<code>architect open XXXX FILE</code> ·
|
|
67
|
-
<code>architect stop</code>
|
|
68
|
-
</div>
|
|
69
|
-
|
|
70
|
-
<script>
|
|
71
|
-
// Configuration - updated by architect CLI
|
|
72
|
-
const architectPort = 7680;
|
|
73
|
-
const builders = [];
|
|
74
|
-
|
|
75
|
-
const layout = document.getElementById('layout');
|
|
76
|
-
|
|
77
|
-
// Check if architect console is running
|
|
78
|
-
const architectRunning = architectPort > 0;
|
|
79
|
-
|
|
80
|
-
// Build architect section
|
|
81
|
-
let architectHtml = '';
|
|
82
|
-
if (architectRunning) {
|
|
83
|
-
architectHtml = `
|
|
84
|
-
<div class="architect-section">
|
|
85
|
-
<h2>Architect Console</h2>
|
|
86
|
-
<div class="terminal-card">
|
|
87
|
-
<div class="terminal-header">
|
|
88
|
-
<h3>Architect</h3>
|
|
89
|
-
<span class="terminal-status status-architect">active</span>
|
|
90
|
-
</div>
|
|
91
|
-
<iframe src="http://localhost:${architectPort}" title="Architect Console" allow="clipboard-read; clipboard-write"></iframe>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
`;
|
|
95
|
-
} else {
|
|
96
|
-
architectHtml = `
|
|
97
|
-
<div class="architect-section">
|
|
98
|
-
<h2>Architect Console</h2>
|
|
99
|
-
<div class="no-terminal">
|
|
100
|
-
<p style="margin-bottom: 15px;">Architect console not running.</p>
|
|
101
|
-
<p>Run <code>architect start</code> to begin.</p>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
`;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// Build builders section
|
|
108
|
-
let buildersHtml = '';
|
|
109
|
-
if (builders.length > 0) {
|
|
110
|
-
buildersHtml = `
|
|
111
|
-
<div class="builders-section">
|
|
112
|
-
<h2>Builders (${builders.length})</h2>
|
|
113
|
-
<div class="builder-grid">
|
|
114
|
-
${builders.map(b => {
|
|
115
|
-
const statusClass = 'status-' + b.status.replace(/[^a-z]/g, '');
|
|
116
|
-
return `
|
|
117
|
-
<div class="terminal-card">
|
|
118
|
-
<div class="terminal-header">
|
|
119
|
-
<h3>Builder ${b.id}: ${b.name}</h3>
|
|
120
|
-
<span class="terminal-status ${statusClass}">${b.status} (${b.phase})</span>
|
|
121
|
-
</div>
|
|
122
|
-
<iframe src="http://localhost:${b.port}" title="Builder ${b.id}" allow="clipboard-read; clipboard-write"></iframe>
|
|
123
|
-
</div>
|
|
124
|
-
`;
|
|
125
|
-
}).join('')}
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
`;
|
|
129
|
-
} else {
|
|
130
|
-
buildersHtml = `
|
|
131
|
-
<div class="builders-section">
|
|
132
|
-
<h2>Builders</h2>
|
|
133
|
-
<div class="no-terminal">
|
|
134
|
-
<p style="margin-bottom: 15px;">No active builders.</p>
|
|
135
|
-
<p>Run <code>architect spawn --project XXXX</code></p>
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
`;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// Adjust layout if no builders
|
|
142
|
-
if (builders.length === 0) {
|
|
143
|
-
layout.classList.add('no-builders');
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
layout.innerHTML = architectHtml + buildersHtml;
|
|
147
|
-
</script>
|
|
148
|
-
</body>
|
|
149
|
-
</html>
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
# MAINTAIN Protocol
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
MAINTAIN is a periodic maintenance protocol for keeping codebases healthy. Unlike SPIDER/TICK (which have sequential phases), MAINTAIN is a **task list** where tasks can run in parallel and some require human review.
|
|
6
|
-
|
|
7
|
-
**Core Principle**: Regular maintenance prevents technical debt accumulation.
|
|
8
|
-
|
|
9
|
-
## When to Use MAINTAIN
|
|
10
|
-
|
|
11
|
-
### Triggers
|
|
12
|
-
- Before a release (clean slate for shipping)
|
|
13
|
-
- Quarterly maintenance window
|
|
14
|
-
- After completing a major feature
|
|
15
|
-
- When the codebase feels "crusty"
|
|
16
|
-
- Before major refactoring efforts
|
|
17
|
-
|
|
18
|
-
### Skip MAINTAIN for
|
|
19
|
-
- Active development branches with pending PRs
|
|
20
|
-
- Emergency production issues
|
|
21
|
-
- When tests are failing (fix tests first)
|
|
22
|
-
|
|
23
|
-
## Execution Model
|
|
24
|
-
|
|
25
|
-
MAINTAIN is executed by a Builder, spawned by the Architect:
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
Architect: "Time for maintenance"
|
|
29
|
-
↓
|
|
30
|
-
af spawn --protocol maintain
|
|
31
|
-
↓
|
|
32
|
-
Builder works through task list
|
|
33
|
-
↓
|
|
34
|
-
PR with maintenance changes
|
|
35
|
-
↓
|
|
36
|
-
Architect reviews → Builder merges
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Prerequisites
|
|
40
|
-
|
|
41
|
-
Before starting MAINTAIN:
|
|
42
|
-
- [ ] Git working directory is clean
|
|
43
|
-
- [ ] All tests are passing
|
|
44
|
-
- [ ] No pending merges or PRs in flight
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## Task List
|
|
49
|
-
|
|
50
|
-
### Code Hygiene Tasks
|
|
51
|
-
|
|
52
|
-
| Task | Parallelizable | Human Review? | Description |
|
|
53
|
-
|------|----------------|---------------|-------------|
|
|
54
|
-
| Remove dead code | Yes | No | Delete unused functions, imports, unreachable code |
|
|
55
|
-
| Remove unused dependencies | Yes | Yes | Check package.json/requirements.txt for unused packages |
|
|
56
|
-
| Clean unused flags | Yes | No | Remove feature flags that are always on/off |
|
|
57
|
-
| Fix flaky tests | No | Yes | Investigate and fix intermittently failing tests |
|
|
58
|
-
| Update outdated dependencies | Yes | Yes | Bump dependencies with breaking change review |
|
|
59
|
-
|
|
60
|
-
**Tools**:
|
|
61
|
-
```bash
|
|
62
|
-
# TypeScript/JavaScript
|
|
63
|
-
npx ts-prune # Find unused exports
|
|
64
|
-
npx depcheck # Find unused dependencies
|
|
65
|
-
|
|
66
|
-
# Python
|
|
67
|
-
ruff check --select F401 # Find unused imports
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### Documentation Sync Tasks
|
|
71
|
-
|
|
72
|
-
| Task | Parallelizable | Human Review? | Description |
|
|
73
|
-
|------|----------------|---------------|-------------|
|
|
74
|
-
| Update arch.md | Yes | No | Sync architecture doc with actual codebase |
|
|
75
|
-
| Generate lessons-learned.md | Yes | Yes | Extract wisdom from review documents |
|
|
76
|
-
| Sync CLAUDE.md ↔ AGENTS.md | Yes | No | Ensure both files match |
|
|
77
|
-
| Check spec/plan/review consistency | Yes | Yes | Find specs without reviews, plans that don't match code |
|
|
78
|
-
| Remove stale doc references | Yes | No | Delete references to deleted code/files |
|
|
79
|
-
|
|
80
|
-
### Project Tracking Tasks
|
|
81
|
-
|
|
82
|
-
| Task | Parallelizable | Human Review? | Description |
|
|
83
|
-
|------|----------------|---------------|-------------|
|
|
84
|
-
| Update projectlist.md status | Yes | No | Update project statuses |
|
|
85
|
-
| Archive terminal projects | Yes | No | Move completed/abandoned to terminal section |
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## Task Details
|
|
90
|
-
|
|
91
|
-
### Update arch.md
|
|
92
|
-
|
|
93
|
-
Scan the actual codebase and update `codev/resources/arch.md`:
|
|
94
|
-
|
|
95
|
-
1. Verify directory structure matches documented structure
|
|
96
|
-
2. Update component descriptions
|
|
97
|
-
3. Add new utilities/helpers discovered
|
|
98
|
-
4. Remove references to deleted code
|
|
99
|
-
5. Update technology stack if changed
|
|
100
|
-
|
|
101
|
-
### Generate lessons-learned.md
|
|
102
|
-
|
|
103
|
-
Extract actionable wisdom from review documents into `codev/resources/lessons-learned.md`:
|
|
104
|
-
|
|
105
|
-
1. Read all files in `codev/reviews/`
|
|
106
|
-
2. Extract lessons that are:
|
|
107
|
-
- Actionable (not just "we learned X")
|
|
108
|
-
- Durable (still relevant)
|
|
109
|
-
- General (applicable beyond one project)
|
|
110
|
-
3. Organize by topic (Testing, Architecture, Process, etc.)
|
|
111
|
-
4. Link back to source review
|
|
112
|
-
5. Prune outdated lessons
|
|
113
|
-
|
|
114
|
-
**Template**:
|
|
115
|
-
```markdown
|
|
116
|
-
# Lessons Learned
|
|
117
|
-
|
|
118
|
-
## Testing
|
|
119
|
-
- [From 0001] Always use XDG sandboxing in tests to avoid touching real $HOME
|
|
120
|
-
- [From 0009] Verify dependencies actually export what you expect
|
|
121
|
-
|
|
122
|
-
## Architecture
|
|
123
|
-
- [From 0008] Single source of truth beats distributed state
|
|
124
|
-
- [From 0031] SQLite with WAL mode handles concurrency better than JSON files
|
|
125
|
-
|
|
126
|
-
## Process
|
|
127
|
-
- [From 0001] Multi-agent consultation catches issues humans miss
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### Sync CLAUDE.md ↔ AGENTS.md
|
|
131
|
-
|
|
132
|
-
Ensure both instruction files contain the same content:
|
|
133
|
-
|
|
134
|
-
1. Diff the two files
|
|
135
|
-
2. Identify divergence
|
|
136
|
-
3. Update the stale one to match
|
|
137
|
-
4. Both should be identical (per AGENTS.md standard)
|
|
138
|
-
|
|
139
|
-
### Remove Dead Code
|
|
140
|
-
|
|
141
|
-
Use static analysis to find and remove unused code:
|
|
142
|
-
|
|
143
|
-
1. Run analysis tools (ts-prune, depcheck, ruff)
|
|
144
|
-
2. Review findings for false positives
|
|
145
|
-
3. Use `git rm` to remove confirmed dead code
|
|
146
|
-
4. Commit with descriptive message
|
|
147
|
-
|
|
148
|
-
**Important**: Use `git rm`, not `rm`. Git history preserves deleted files.
|
|
149
|
-
|
|
150
|
-
### Update Dependencies
|
|
151
|
-
|
|
152
|
-
Review and update outdated dependencies:
|
|
153
|
-
|
|
154
|
-
1. Run `npm outdated` or equivalent
|
|
155
|
-
2. Categorize updates:
|
|
156
|
-
- Patch: Safe to auto-update
|
|
157
|
-
- Minor: Review changelog
|
|
158
|
-
- Major: Requires human review for breaking changes
|
|
159
|
-
3. Update and test
|
|
160
|
-
4. Document any migration steps
|
|
161
|
-
|
|
162
|
-
---
|
|
163
|
-
|
|
164
|
-
## Validation
|
|
165
|
-
|
|
166
|
-
After completing tasks, validate the codebase:
|
|
167
|
-
|
|
168
|
-
- [ ] All tests pass
|
|
169
|
-
- [ ] Build succeeds
|
|
170
|
-
- [ ] No import/module errors
|
|
171
|
-
- [ ] Documentation links resolve
|
|
172
|
-
- [ ] Linter passes
|
|
173
|
-
|
|
174
|
-
If validation fails, investigate and fix before creating PR.
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
|
|
178
|
-
## Rollback Strategy
|
|
179
|
-
|
|
180
|
-
### For code changes
|
|
181
|
-
```bash
|
|
182
|
-
# Git history preserves everything
|
|
183
|
-
git log --all --full-history -- path/to/file
|
|
184
|
-
git checkout <commit>~1 -- path/to/file
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
### For untracked files
|
|
188
|
-
Move to `codev/maintain/.trash/YYYY-MM-DD/` before deleting. Retained for 30 days.
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
|
-
## Commit Messages
|
|
193
|
-
|
|
194
|
-
```
|
|
195
|
-
[Maintain] Remove 5 unused exports
|
|
196
|
-
[Maintain] Update arch.md with new utilities
|
|
197
|
-
[Maintain] Generate lessons-learned.md
|
|
198
|
-
[Maintain] Sync CLAUDE.md with AGENTS.md
|
|
199
|
-
[Maintain] Update dependencies (patch)
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
---
|
|
203
|
-
|
|
204
|
-
## Governance
|
|
205
|
-
|
|
206
|
-
MAINTAIN is an **operational protocol**, not a feature development protocol:
|
|
207
|
-
|
|
208
|
-
| Document | Required? |
|
|
209
|
-
|----------|-----------|
|
|
210
|
-
| Spec | No |
|
|
211
|
-
| Plan | No |
|
|
212
|
-
| Review | No |
|
|
213
|
-
| Consultation | No (human review of PR is sufficient) |
|
|
214
|
-
|
|
215
|
-
**Exception**: If MAINTAIN reveals need for architectural changes, those should follow SPIDER.
|
|
216
|
-
|
|
217
|
-
---
|
|
218
|
-
|
|
219
|
-
## Best Practices
|
|
220
|
-
|
|
221
|
-
1. **Don't be aggressive**: When in doubt, keep the code
|
|
222
|
-
2. **Check git blame**: Understand why code exists before deleting
|
|
223
|
-
3. **Run full test suite**: Not just affected tests
|
|
224
|
-
4. **Group related changes**: One commit per logical change
|
|
225
|
-
5. **Document decisions**: Note why things were kept or removed
|
|
226
|
-
|
|
227
|
-
---
|
|
228
|
-
|
|
229
|
-
## Anti-Patterns
|
|
230
|
-
|
|
231
|
-
1. **Deleting everything the audit finds**: Review each item
|
|
232
|
-
2. **Skipping validation**: "It looked dead" is not validation
|
|
233
|
-
3. **Using `rm` instead of `git rm`**: Lose history
|
|
234
|
-
4. **Maintaining during active development**: Wait for PRs to merge
|
|
235
|
-
5. **Ignoring false positives**: Fix audit logic if it's wrong
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
# Plan: [Title]
|
|
2
|
-
|
|
3
|
-
## Metadata
|
|
4
|
-
- **ID**: plan-[YYYY-MM-DD]-[short-name]
|
|
5
|
-
- **Status**: draft
|
|
6
|
-
- **Specification**: [Link to codev/specs/spec-file.md]
|
|
7
|
-
- **Created**: [YYYY-MM-DD]
|
|
8
|
-
|
|
9
|
-
## Executive Summary
|
|
10
|
-
[Brief overview of the implementation approach chosen and why. Reference the specification's selected approach.]
|
|
11
|
-
|
|
12
|
-
## Success Metrics
|
|
13
|
-
[Copy from specification and add implementation-specific metrics]
|
|
14
|
-
- [ ] All specification criteria met
|
|
15
|
-
- [ ] Test coverage >90%
|
|
16
|
-
- [ ] Performance benchmarks achieved
|
|
17
|
-
- [ ] Zero critical security issues
|
|
18
|
-
- [ ] Documentation complete
|
|
19
|
-
|
|
20
|
-
## Phase Breakdown
|
|
21
|
-
|
|
22
|
-
### Phase 1: [Descriptive Name]
|
|
23
|
-
**Dependencies**: None
|
|
24
|
-
|
|
25
|
-
#### Objectives
|
|
26
|
-
- [Clear, single objective for this phase]
|
|
27
|
-
- [What value does this phase deliver?]
|
|
28
|
-
|
|
29
|
-
#### Deliverables
|
|
30
|
-
- [ ] [Specific deliverable 1]
|
|
31
|
-
- [ ] [Specific deliverable 2]
|
|
32
|
-
- [ ] [Tests for this phase]
|
|
33
|
-
- [ ] [Documentation updates]
|
|
34
|
-
|
|
35
|
-
#### Implementation Details
|
|
36
|
-
[Specific technical approach for this phase. Include:
|
|
37
|
-
- Key files/modules to create or modify
|
|
38
|
-
- Architectural decisions
|
|
39
|
-
- API contracts
|
|
40
|
-
- Data models]
|
|
41
|
-
|
|
42
|
-
#### Acceptance Criteria
|
|
43
|
-
- [ ] [Testable criterion 1]
|
|
44
|
-
- [ ] [Testable criterion 2]
|
|
45
|
-
- [ ] All tests pass
|
|
46
|
-
- [ ] Code review completed
|
|
47
|
-
|
|
48
|
-
#### Test Plan
|
|
49
|
-
- **Unit Tests**: [What to test]
|
|
50
|
-
- **Integration Tests**: [What to test]
|
|
51
|
-
- **Manual Testing**: [Scenarios to verify]
|
|
52
|
-
|
|
53
|
-
#### Rollback Strategy
|
|
54
|
-
[How to revert this phase if issues arise]
|
|
55
|
-
|
|
56
|
-
#### Risks
|
|
57
|
-
- **Risk**: [Specific risk for this phase]
|
|
58
|
-
- **Mitigation**: [How to address]
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
### Phase 2: [Descriptive Name]
|
|
63
|
-
**Dependencies**: Phase 1
|
|
64
|
-
|
|
65
|
-
[Repeat structure for each phase]
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
### Phase 3: [Descriptive Name]
|
|
70
|
-
**Dependencies**: Phase 2
|
|
71
|
-
|
|
72
|
-
[Continue for all phases]
|
|
73
|
-
|
|
74
|
-
## Dependency Map
|
|
75
|
-
```
|
|
76
|
-
Phase 1 ──→ Phase 2 ──→ Phase 3
|
|
77
|
-
↓
|
|
78
|
-
Phase 4 (optional)
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## Resource Requirements
|
|
82
|
-
### Development Resources
|
|
83
|
-
- **Engineers**: [Expertise needed]
|
|
84
|
-
- **Environment**: [Dev/staging requirements]
|
|
85
|
-
|
|
86
|
-
### Infrastructure
|
|
87
|
-
- [Database changes]
|
|
88
|
-
- [New services]
|
|
89
|
-
- [Configuration updates]
|
|
90
|
-
- [Monitoring additions]
|
|
91
|
-
|
|
92
|
-
## Integration Points
|
|
93
|
-
### External Systems
|
|
94
|
-
- **System**: [Name]
|
|
95
|
-
- **Integration Type**: [API/Database/Message Queue]
|
|
96
|
-
- **Phase**: [Which phase needs this]
|
|
97
|
-
- **Fallback**: [What if unavailable]
|
|
98
|
-
|
|
99
|
-
### Internal Systems
|
|
100
|
-
[Repeat structure]
|
|
101
|
-
|
|
102
|
-
## Risk Analysis
|
|
103
|
-
### Technical Risks
|
|
104
|
-
| Risk | Probability | Impact | Mitigation | Owner |
|
|
105
|
-
|------|------------|--------|------------|-------|
|
|
106
|
-
| [Risk 1] | L/M/H | L/M/H | [Strategy] | [Name] |
|
|
107
|
-
|
|
108
|
-
### Schedule Risks
|
|
109
|
-
| Risk | Probability | Impact | Mitigation | Owner |
|
|
110
|
-
|------|------------|--------|------------|-------|
|
|
111
|
-
| [Risk 1] | L/M/H | L/M/H | [Strategy] | [Name] |
|
|
112
|
-
|
|
113
|
-
## Validation Checkpoints
|
|
114
|
-
1. **After Phase 1**: [What to validate]
|
|
115
|
-
2. **After Phase 2**: [What to validate]
|
|
116
|
-
3. **Before Production**: [Final checks]
|
|
117
|
-
|
|
118
|
-
## Monitoring and Observability
|
|
119
|
-
### Metrics to Track
|
|
120
|
-
- [Metric 1: Description and threshold]
|
|
121
|
-
- [Metric 2: Description and threshold]
|
|
122
|
-
|
|
123
|
-
### Logging Requirements
|
|
124
|
-
- [What to log and at what level]
|
|
125
|
-
- [Retention requirements]
|
|
126
|
-
|
|
127
|
-
### Alerting
|
|
128
|
-
- [Alert condition and severity]
|
|
129
|
-
- [Who to notify]
|
|
130
|
-
|
|
131
|
-
## Documentation Updates Required
|
|
132
|
-
- [ ] API documentation
|
|
133
|
-
- [ ] Architecture diagrams
|
|
134
|
-
- [ ] Runbooks
|
|
135
|
-
- [ ] User guides
|
|
136
|
-
- [ ] Configuration guides
|
|
137
|
-
|
|
138
|
-
## Post-Implementation Tasks
|
|
139
|
-
- [ ] Performance validation
|
|
140
|
-
- [ ] Security audit
|
|
141
|
-
- [ ] Load testing
|
|
142
|
-
- [ ] User acceptance testing
|
|
143
|
-
- [ ] Monitoring validation
|
|
144
|
-
|
|
145
|
-
## Expert Review
|
|
146
|
-
**Date**: [YYYY-MM-DD]
|
|
147
|
-
**Model**: [Model consulted]
|
|
148
|
-
**Key Feedback**:
|
|
149
|
-
- [Feasibility assessment]
|
|
150
|
-
- [Missing considerations]
|
|
151
|
-
- [Risk identification]
|
|
152
|
-
- [Alternative suggestions]
|
|
153
|
-
|
|
154
|
-
**Plan Adjustments**:
|
|
155
|
-
- [How the plan was modified based on feedback]
|
|
156
|
-
|
|
157
|
-
## Approval
|
|
158
|
-
- [ ] Technical Lead Review
|
|
159
|
-
- [ ] Engineering Manager Approval
|
|
160
|
-
- [ ] Resource Allocation Confirmed
|
|
161
|
-
- [ ] Expert AI Consultation Complete
|
|
162
|
-
|
|
163
|
-
## Change Log
|
|
164
|
-
| Date | Change | Reason | Author |
|
|
165
|
-
|------|--------|--------|--------|
|
|
166
|
-
| [Date] | [What changed] | [Why] | [Who] |
|
|
167
|
-
|
|
168
|
-
## Notes
|
|
169
|
-
[Additional context, assumptions, or considerations]
|