@cluesmith/codev 3.0.0-rc.0 → 3.0.0-rc.10
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 +8 -0
- package/{dashboard/dist/assets/index-nr0cXxtf.css → dashboard-dist/assets/index-Bs8I7N2s.css} +1 -1
- package/dashboard-dist/assets/index-CkNo2z6t.js +195 -0
- package/dashboard-dist/assets/index-CkNo2z6t.js.map +1 -0
- package/dashboard-dist/dist/assets/index-Bs8I7N2s.css +32 -0
- package/dashboard-dist/dist/assets/index-CkNo2z6t.js +195 -0
- package/dashboard-dist/dist/assets/index-CkNo2z6t.js.map +1 -0
- package/{dashboard → dashboard-dist}/dist/index.html +2 -2
- package/dashboard-dist/index.html +14 -0
- package/dist/agent-farm/cli.d.ts.map +1 -1
- package/dist/agent-farm/cli.js +21 -13
- 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/cleanup.d.ts.map +1 -1
- package/dist/agent-farm/commands/cleanup.js +10 -5
- package/dist/agent-farm/commands/cleanup.js.map +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.d.ts +4 -1
- package/dist/agent-farm/commands/send.d.ts.map +1 -1
- package/dist/agent-farm/commands/send.js +8 -5
- 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 +2 -1
- package/dist/agent-farm/commands/spawn-roles.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn-roles.js +1 -1
- package/dist/agent-farm/commands/spawn-roles.js.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.d.ts +49 -10
- package/dist/agent-farm/commands/spawn-worktree.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.js +357 -49
- 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 +182 -74
- 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.d.ts.map +1 -1
- package/dist/agent-farm/commands/team-update.js +8 -5
- package/dist/agent-farm/commands/team-update.js.map +1 -1
- package/dist/agent-farm/commands/team.d.ts +7 -1
- package/dist/agent-farm/commands/team.d.ts.map +1 -1
- package/dist/agent-farm/commands/team.js +36 -4
- package/dist/agent-farm/commands/team.js.map +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.d.ts +1 -0
- package/dist/agent-farm/commands/tower.d.ts.map +1 -1
- package/dist/agent-farm/commands/tower.js +54 -3
- 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 +10 -8
- package/dist/agent-farm/servers/overview.d.ts.map +1 -1
- package/dist/agent-farm/servers/overview.js +78 -38
- 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 +24 -15
- 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 +9 -16
- package/dist/agent-farm/servers/tower-routes.js.map +1 -1
- package/dist/agent-farm/servers/tower-server.js +15 -1
- package/dist/agent-farm/servers/tower-server.js.map +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 +64 -36
- 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 +13 -7
- package/dist/agent-farm/servers/tower-utils.js.map +1 -1
- package/dist/agent-farm/types.d.ts +13 -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 +39 -17
- 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/agent-farm/utils/roles.d.ts +11 -4
- package/dist/agent-farm/utils/roles.d.ts.map +1 -1
- package/dist/agent-farm/utils/roles.js +21 -6
- package/dist/agent-farm/utils/roles.js.map +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +118 -5
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +16 -45
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/consult/index.d.ts +6 -2
- package/dist/commands/consult/index.d.ts.map +1 -1
- package/dist/commands/consult/index.js +231 -183
- package/dist/commands/consult/index.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +121 -31
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +13 -43
- 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 +14 -3
- package/dist/commands/porch/checks.d.ts.map +1 -1
- package/dist/commands/porch/checks.js +150 -4
- package/dist/commands/porch/checks.js.map +1 -1
- package/dist/commands/porch/config.d.ts +6 -9
- package/dist/commands/porch/config.d.ts.map +1 -1
- package/dist/commands/porch/config.js +12 -37
- package/dist/commands/porch/config.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 +273 -82
- 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 +142 -75
- 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 +34 -38
- package/dist/commands/porch/prompts.js.map +1 -1
- package/dist/commands/porch/protocol.d.ts +4 -3
- package/dist/commands/porch/protocol.d.ts.map +1 -1
- package/dist/commands/porch/protocol.js +21 -21
- package/dist/commands/porch/protocol.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 +100 -9
- package/dist/commands/porch/state.js.map +1 -1
- package/dist/commands/porch/types.d.ts +10 -2
- package/dist/commands/porch/types.d.ts.map +1 -1
- package/dist/commands/sync.d.ts +26 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +207 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/update.d.ts +15 -2
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +159 -202
- package/dist/commands/update.js.map +1 -1
- package/dist/lib/config.d.ts +96 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +165 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/forge-contracts.d.ts +100 -0
- package/dist/lib/forge-contracts.d.ts.map +1 -0
- package/dist/lib/forge-contracts.js +35 -0
- package/dist/lib/forge-contracts.js.map +1 -0
- package/dist/lib/forge.d.ts +102 -0
- package/dist/lib/forge.d.ts.map +1 -0
- package/dist/lib/forge.js +376 -0
- package/dist/lib/forge.js.map +1 -0
- package/dist/lib/github.d.ts +68 -60
- package/dist/lib/github.d.ts.map +1 -1
- package/dist/lib/github.js +160 -169
- package/dist/lib/github.js.map +1 -1
- package/dist/lib/skeleton.d.ts +15 -5
- package/dist/lib/skeleton.d.ts.map +1 -1
- package/dist/lib/skeleton.js +82 -7
- package/dist/lib/skeleton.js.map +1 -1
- package/dist/lib/team-github.d.ts +7 -3
- package/dist/lib/team-github.d.ts.map +1 -1
- package/dist/lib/team-github.js +29 -19
- package/dist/lib/team-github.js.map +1 -1
- package/dist/lib/team.d.ts.map +1 -1
- package/dist/lib/team.js +4 -1
- package/dist/lib/team.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 -24
- package/scripts/forge/gitea/auth-status.sh +3 -0
- package/scripts/forge/gitea/issue-comment.sh +3 -0
- package/scripts/forge/gitea/issue-list.sh +3 -0
- package/scripts/forge/gitea/issue-view.sh +3 -0
- package/scripts/forge/gitea/pr-exists.sh +6 -0
- package/scripts/forge/gitea/pr-list.sh +3 -0
- package/scripts/forge/gitea/pr-merge.sh +3 -0
- package/scripts/forge/gitea/pr-view.sh +3 -0
- package/scripts/forge/gitea/recently-closed.sh +3 -0
- package/scripts/forge/gitea/recently-merged.sh +3 -0
- package/scripts/forge/gitea/repo-archive.sh +11 -0
- package/scripts/forge/gitea/user-identity.sh +3 -0
- package/scripts/forge/github/auth-status.sh +4 -0
- package/scripts/forge/github/issue-comment.sh +5 -0
- package/scripts/forge/github/issue-list.sh +4 -0
- package/scripts/forge/github/issue-view.sh +5 -0
- package/scripts/forge/github/on-it-timestamps.sh +8 -0
- package/scripts/forge/github/pr-diff.sh +10 -0
- package/scripts/forge/github/pr-exists.sh +7 -0
- package/scripts/forge/github/pr-list.sh +4 -0
- package/scripts/forge/github/pr-merge.sh +5 -0
- package/scripts/forge/github/pr-search.sh +5 -0
- package/scripts/forge/github/pr-view.sh +11 -0
- package/scripts/forge/github/recently-closed.sh +15 -0
- package/scripts/forge/github/recently-merged.sh +15 -0
- package/scripts/forge/github/repo-archive.sh +10 -0
- package/scripts/forge/github/team-activity.sh +5 -0
- package/scripts/forge/github/user-identity.sh +4 -0
- package/scripts/forge/gitlab/auth-status.sh +3 -0
- package/scripts/forge/gitlab/issue-comment.sh +3 -0
- package/scripts/forge/gitlab/issue-list.sh +3 -0
- package/scripts/forge/gitlab/issue-view.sh +3 -0
- package/scripts/forge/gitlab/pr-diff.sh +3 -0
- package/scripts/forge/gitlab/pr-exists.sh +5 -0
- package/scripts/forge/gitlab/pr-list.sh +3 -0
- package/scripts/forge/gitlab/pr-merge.sh +3 -0
- package/scripts/forge/gitlab/pr-search.sh +3 -0
- package/scripts/forge/gitlab/pr-view.sh +3 -0
- package/scripts/forge/gitlab/recently-closed.sh +3 -0
- package/scripts/forge/gitlab/recently-merged.sh +3 -0
- package/scripts/forge/gitlab/repo-archive.sh +12 -0
- package/scripts/forge/gitlab/user-identity.sh +3 -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 +2 -2
- package/skeleton/protocols/air/protocol.md +1 -2
- package/skeleton/protocols/aspir/builder-prompt.md +28 -6
- 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 +1 -1
- 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 +72 -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/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/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 +55 -43
- package/skeleton/roles/builder.md +22 -14
- package/skeleton/templates/AGENTS.md +4 -3
- package/skeleton/templates/CLAUDE.md +4 -3
- package/skeleton/templates/cheatsheet.md +11 -12
- package/templates/3d-viewer.html +16 -18
- package/templates/tower.html +1 -1
- package/dashboard/dist/assets/index-CiIBsixF.js +0 -194
- package/dashboard/dist/assets/index-CiIBsixF.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
|
@@ -2,456 +2,162 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
MAINTAIN is a
|
|
5
|
+
MAINTAIN is a single-pass maintenance protocol for keeping codebases healthy. The builder does all maintenance work in one phase, then creates a PR with a 3-way review.
|
|
6
6
|
|
|
7
|
-
**Core Principle**:
|
|
7
|
+
**Core Principle**: Do the work in one pass. Don't over-ceremonialize housekeeping.
|
|
8
8
|
|
|
9
|
-
**Key Documents
|
|
10
|
-
- `codev/resources/arch.md` - Architecture documentation
|
|
9
|
+
**Key Documents** MAINTAIN keeps current:
|
|
10
|
+
- `codev/resources/arch.md` - Architecture documentation
|
|
11
11
|
- `codev/resources/lessons-learned.md` - Extracted wisdom from reviews
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## When to Use
|
|
14
14
|
|
|
15
|
-
## When to Use MAINTAIN
|
|
16
|
-
|
|
17
|
-
- When the user/architect requests it
|
|
18
15
|
- Before a release (clean slate for shipping)
|
|
19
|
-
- Quarterly maintenance window
|
|
20
16
|
- After completing a major feature
|
|
17
|
+
- Quarterly maintenance window
|
|
21
18
|
- When the codebase feels "crusty"
|
|
22
19
|
|
|
23
20
|
## Execution Model
|
|
24
21
|
|
|
25
|
-
MAINTAIN is orchestrated by porch with 4 sequential phases:
|
|
26
|
-
|
|
27
22
|
```
|
|
28
|
-
|
|
23
|
+
afx spawn --protocol maintain
|
|
29
24
|
↓
|
|
30
|
-
1.
|
|
31
|
-
↓ (3-way review)
|
|
32
|
-
2.
|
|
33
|
-
↓ (3-way review + build/test checks)
|
|
34
|
-
3. SYNC: Update documentation
|
|
35
|
-
↓ (3-way review)
|
|
36
|
-
4. VERIFY: Final validation + PR
|
|
25
|
+
1. MAINTAIN: Audit → Clean → Sync docs (single pass)
|
|
26
|
+
↓ (build + test checks, 3-way review)
|
|
27
|
+
2. REVIEW: Create PR
|
|
37
28
|
↓ (3-way review)
|
|
38
|
-
PR with maintenance changes
|
|
39
|
-
↓
|
|
40
29
|
Architect reviews → Merge
|
|
41
30
|
```
|
|
42
31
|
|
|
43
|
-
|
|
32
|
+
Two phases total. One consultation during the maintain phase, one before PR.
|
|
44
33
|
|
|
45
34
|
## Prerequisites
|
|
46
35
|
|
|
47
|
-
Before starting
|
|
48
|
-
1. Check `codev/maintain/` for last
|
|
49
|
-
2. Note the base commit
|
|
50
|
-
3. Focus on changes since
|
|
36
|
+
Before starting:
|
|
37
|
+
1. Check `codev/maintain/` for the last run number
|
|
38
|
+
2. Note the base commit: `git log --oneline -1` on the last run file
|
|
39
|
+
3. Focus on changes since then: `git log --oneline <base-commit>..HEAD`
|
|
51
40
|
|
|
52
41
|
---
|
|
53
42
|
|
|
54
|
-
##
|
|
55
|
-
|
|
56
|
-
Each maintenance run creates a numbered file in `codev/maintain/`:
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
codev/maintain/
|
|
60
|
-
├── 1.md
|
|
61
|
-
├── 2.md
|
|
62
|
-
└── ...
|
|
63
|
-
```
|
|
43
|
+
## The Maintain Phase (Single Pass)
|
|
64
44
|
|
|
65
|
-
|
|
45
|
+
The builder works through these tasks in order, committing as they go.
|
|
66
46
|
|
|
67
|
-
|
|
68
|
-
- Base commit (starting point)
|
|
69
|
-
- Tasks completed
|
|
70
|
-
- Findings and deferred items
|
|
71
|
-
- Summary
|
|
47
|
+
### Step 1: Audit
|
|
72
48
|
|
|
73
|
-
|
|
49
|
+
Identify what needs fixing. Don't fix yet — just catalog.
|
|
74
50
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
### Code Hygiene Tasks
|
|
78
|
-
|
|
79
|
-
| Task | Parallelizable | Human Review? | Description |
|
|
80
|
-
|------|----------------|---------------|-------------|
|
|
81
|
-
| Remove dead code | Yes | No | Delete unused functions, imports, unreachable code |
|
|
82
|
-
| Remove unused dependencies | Yes | Yes | Check package.json/requirements.txt for unused packages |
|
|
83
|
-
| Clean unused flags | Yes | No | Remove feature flags that are always on/off |
|
|
84
|
-
| Fix flaky tests | No | Yes | Investigate and fix intermittently failing tests |
|
|
85
|
-
| Update outdated dependencies | Yes | Yes | Bump dependencies with breaking change review |
|
|
86
|
-
| Identify duplicate code | Yes | Yes | Find repeated patterns that should be utility functions |
|
|
87
|
-
|
|
88
|
-
**Tools**:
|
|
51
|
+
**Dead code**:
|
|
89
52
|
```bash
|
|
90
|
-
# TypeScript
|
|
91
|
-
npx ts-prune
|
|
92
|
-
npx depcheck # Find unused dependencies
|
|
93
|
-
npx jscpd . # Find copy-paste code (optional)
|
|
53
|
+
# Find unused exports (TypeScript)
|
|
54
|
+
npx ts-prune 2>/dev/null || echo "ts-prune not available"
|
|
94
55
|
|
|
95
|
-
#
|
|
96
|
-
|
|
56
|
+
# Find unused dependencies
|
|
57
|
+
npx depcheck 2>/dev/null || echo "depcheck not available"
|
|
97
58
|
```
|
|
98
59
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
| Update arch.md | Yes | No | Sync architecture doc with actual codebase |
|
|
104
|
-
| Generate lessons-learned.md | Yes | Yes | Extract wisdom from review documents |
|
|
105
|
-
| Sync CLAUDE.md ↔ AGENTS.md | Yes | No | Ensure both files match |
|
|
106
|
-
| Prune documentation | Yes | Yes | Remove obsolete info, keep CLAUDE.md/README.md under 400 lines |
|
|
107
|
-
| Check spec/plan/review consistency | Yes | Yes | Find specs without reviews, plans that don't match code |
|
|
108
|
-
| Remove stale doc references | Yes | No | Delete references to deleted code/files |
|
|
109
|
-
|
|
110
|
-
### Project Tracking Tasks
|
|
111
|
-
|
|
112
|
-
| Task | Parallelizable | Human Review? | Description |
|
|
113
|
-
|------|----------------|---------------|-------------|
|
|
114
|
-
| Update GitHub Issue statuses | Yes | No | Close completed issues, update labels |
|
|
115
|
-
|
|
116
|
-
### Framework Tasks
|
|
117
|
-
|
|
118
|
-
| Task | Parallelizable | Human Review? | Description |
|
|
119
|
-
|------|----------------|---------------|-------------|
|
|
120
|
-
| Run codev update | No | Yes | Update codev framework to latest version |
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## Task Details
|
|
125
|
-
|
|
126
|
-
### Update arch.md
|
|
127
|
-
|
|
128
|
-
Scan the actual codebase and update `codev/resources/arch.md`:
|
|
129
|
-
|
|
130
|
-
**Discovery phase**:
|
|
131
|
-
1. `git log --oneline <base-commit>..HEAD` - what changed since last maintenance
|
|
132
|
-
2. `ls -R` key directories to find new files/modules
|
|
133
|
-
3. `grep` for new exports, classes, key functions
|
|
134
|
-
4. Review new/modified specs: `git diff <base-commit>..HEAD --name-only -- codev/specs/`
|
|
135
|
-
5. Review new/modified plans: `git diff <base-commit>..HEAD --name-only -- codev/plans/`
|
|
136
|
-
|
|
137
|
-
**Update arch.md**:
|
|
138
|
-
1. Verify directory structure matches documented structure
|
|
139
|
-
2. Update component descriptions for changed modules
|
|
140
|
-
3. Add new utilities/helpers discovered
|
|
141
|
-
4. Remove references to deleted code
|
|
142
|
-
5. Update technology stack if dependencies changed
|
|
143
|
-
6. Document new integration points or APIs
|
|
144
|
-
7. Capture architectural decisions from new specs/plans
|
|
145
|
-
|
|
146
|
-
**Primary sources** (specs/plans):
|
|
147
|
-
- Architectural decisions from specs
|
|
148
|
-
- Component relationships from plans
|
|
149
|
-
- Design rationale and tradeoffs
|
|
150
|
-
|
|
151
|
-
**Secondary sources** (code):
|
|
152
|
-
- File locations and their purpose
|
|
153
|
-
- Key functions/classes and what they do
|
|
154
|
-
- Data flow and dependencies
|
|
155
|
-
- Configuration options
|
|
156
|
-
- CLI commands and flags
|
|
157
|
-
|
|
158
|
-
**What NOT to include**:
|
|
159
|
-
- Implementation details that change frequently
|
|
160
|
-
- Line numbers (they go stale)
|
|
161
|
-
- Full API documentation (use JSDoc/docstrings for that)
|
|
162
|
-
|
|
163
|
-
**Primary Purpose**: arch.md should enable a developer (or AI agent) to rapidly understand the entire system - not just file locations, but **how things actually work**.
|
|
164
|
-
|
|
165
|
-
**Recommended Document Structure**:
|
|
166
|
-
```markdown
|
|
167
|
-
# Project Architecture
|
|
168
|
-
|
|
169
|
-
## Overview
|
|
170
|
-
[High-level description: what the system does, core design philosophy, 2-3 sentences]
|
|
171
|
-
|
|
172
|
-
## Quick Start for Developers
|
|
173
|
-
[The fastest path to understanding: "To understand X, read Y first"]
|
|
174
|
-
|
|
175
|
-
## Technology Stack
|
|
176
|
-
[Technologies, frameworks, key dependencies with versions]
|
|
177
|
-
|
|
178
|
-
## Directory Structure
|
|
179
|
-
[Complete directory tree with explanations for each major directory]
|
|
180
|
-
|
|
181
|
-
## Major Components
|
|
182
|
-
|
|
183
|
-
### [Component Name] (e.g., Agent Farm)
|
|
184
|
-
- **Purpose**: What problem it solves
|
|
185
|
-
- **Location**: path/to/component
|
|
186
|
-
- **How It Works**:
|
|
187
|
-
- Step-by-step explanation of the mechanism
|
|
188
|
-
- Key technologies used (e.g., "uses shellper processes for terminal persistence")
|
|
189
|
-
- Runtime behavior (e.g., "spawns a shellper process per builder terminal")
|
|
190
|
-
- State management (e.g., "state stored in SQLite at .agent-farm/state.db")
|
|
191
|
-
- **Key Files**:
|
|
192
|
-
- `file.ts` - does X
|
|
193
|
-
- `other.ts` - handles Y
|
|
194
|
-
- **Configuration**: How to customize behavior
|
|
195
|
-
- **Common Operations**: Examples of typical usage
|
|
196
|
-
|
|
197
|
-
[Repeat for each major component - be thorough about HOW, not just WHAT]
|
|
198
|
-
|
|
199
|
-
## Utility Functions & Helpers
|
|
200
|
-
### [Utility Category]
|
|
201
|
-
- **File**: path/to/utility.ts
|
|
202
|
-
- **Functions**: `functionName()` - Description and use case
|
|
203
|
-
- **When to Use**: Guidance on appropriate usage
|
|
204
|
-
|
|
205
|
-
## Data Flow
|
|
206
|
-
[How data moves through the system, with concrete examples]
|
|
207
|
-
|
|
208
|
-
## Key Design Decisions
|
|
209
|
-
[Important architectural choices and their rationale - the WHY]
|
|
210
|
-
|
|
211
|
-
## Integration Points
|
|
212
|
-
[External services, APIs, databases, and how they connect]
|
|
213
|
-
|
|
214
|
-
## Development Patterns
|
|
215
|
-
[Common patterns used throughout the codebase]
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
**Critical: The "How It Works" Requirement**
|
|
219
|
-
|
|
220
|
-
For each major component, arch.md MUST explain the implementation mechanism, not just the purpose. Examples of good vs bad:
|
|
221
|
-
|
|
222
|
-
| Bad (just WHAT) | Good (includes HOW) |
|
|
223
|
-
|-----------------|---------------------|
|
|
224
|
-
| "Agent Farm manages builders" | "Agent Farm spawns builders in isolated git worktrees. Each builder runs in a shellper-backed terminal session. The Tower dashboard exposes terminals via WebSocket. State is persisted in SQLite." |
|
|
225
|
-
| "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." |
|
|
226
|
-
|
|
227
|
-
This level of detail enables rapid onboarding and debugging.
|
|
228
|
-
|
|
229
|
-
**Content Quality Standards**:
|
|
230
|
-
- **Be Specific**: Include exact file paths, actual function names, concrete examples
|
|
231
|
-
- **Maintain Accuracy**: Cross-reference specs/plans with actual implementation; flag discrepancies
|
|
232
|
-
- **Optimize for Quick Understanding**: Use clear hierarchy, highlight commonly used components
|
|
233
|
-
- **Stay Current**: Reflect actual state, not aspirational; remove deprecated components
|
|
234
|
-
|
|
235
|
-
**Special Attention Areas**:
|
|
236
|
-
|
|
237
|
-
1. **Utility Functions** (critical for productivity):
|
|
238
|
-
- Document every utility function with exact location
|
|
239
|
-
- Explain what each does and when to use it
|
|
240
|
-
- Include parameter types and return types
|
|
241
|
-
|
|
242
|
-
2. **Directory Structure** (often first thing referenced):
|
|
243
|
-
- Keep directory tree up-to-date and complete
|
|
244
|
-
- Explain purpose of each major directory
|
|
245
|
-
- Highlight where specific types of files should be placed
|
|
246
|
-
|
|
247
|
-
3. **Integration Points** (critical for understanding system boundaries):
|
|
248
|
-
- Document all external dependencies and APIs
|
|
249
|
-
- Explain how different parts connect
|
|
250
|
-
- Note special configuration requirements
|
|
251
|
-
|
|
252
|
-
**Quality Assurance Before Finalizing**:
|
|
253
|
-
- [ ] All file paths are correct and current
|
|
254
|
-
- [ ] All documented functions actually exist
|
|
255
|
-
- [ ] Directory structure matches reality
|
|
256
|
-
- [ ] Architectural decisions are accurately represented
|
|
257
|
-
- [ ] Document is internally consistent
|
|
258
|
-
|
|
259
|
-
**Constraints**:
|
|
260
|
-
- Never invent structure - only document what exists or is in specs/plans
|
|
261
|
-
- Never make architectural decisions - document them, don't make them
|
|
262
|
-
- Always verify documentation against actual implementation
|
|
263
|
-
|
|
264
|
-
### Generate lessons-learned.md
|
|
265
|
-
|
|
266
|
-
Extract actionable wisdom from review documents into `codev/resources/lessons-learned.md`:
|
|
267
|
-
|
|
268
|
-
**Discovery phase**:
|
|
269
|
-
1. Find new/modified reviews: `git diff <base-commit>..HEAD --name-only -- codev/reviews/`
|
|
270
|
-
2. Read each new/modified review file
|
|
271
|
-
|
|
272
|
-
**Extract from reviews**:
|
|
273
|
-
1. Read all files in `codev/reviews/`
|
|
274
|
-
2. Extract lessons that are:
|
|
275
|
-
- Actionable (not just "we learned X")
|
|
276
|
-
- Durable (still relevant)
|
|
277
|
-
- General (applicable beyond one project)
|
|
278
|
-
3. Organize by topic (Testing, Architecture, Process, etc.)
|
|
279
|
-
4. Link back to source review
|
|
280
|
-
5. Prune outdated lessons
|
|
281
|
-
|
|
282
|
-
**Template**:
|
|
283
|
-
```markdown
|
|
284
|
-
# Lessons Learned
|
|
285
|
-
|
|
286
|
-
## Testing
|
|
287
|
-
- [From 1] Always use XDG sandboxing in tests to avoid touching real $HOME
|
|
288
|
-
- [From 9] Verify dependencies actually export what you expect
|
|
289
|
-
|
|
290
|
-
## Architecture
|
|
291
|
-
- [From 8] Single source of truth beats distributed state
|
|
292
|
-
- [From 31] SQLite with WAL mode handles concurrency better than JSON files
|
|
60
|
+
**Stale documentation**:
|
|
61
|
+
```bash
|
|
62
|
+
# What changed since last maintenance?
|
|
63
|
+
git log --oneline <base-commit>..HEAD
|
|
293
64
|
|
|
294
|
-
|
|
295
|
-
- [
|
|
65
|
+
# Check arch.md references still exist
|
|
66
|
+
grep -oE '[a-zA-Z]+/[a-zA-Z/]+\.[a-z]+' codev/resources/arch.md | sort -u | while read f; do
|
|
67
|
+
[ -e "$f" ] || echo "Missing: $f"
|
|
68
|
+
done
|
|
296
69
|
```
|
|
297
70
|
|
|
298
|
-
|
|
71
|
+
**Stale project tracking**:
|
|
72
|
+
- GitHub Issues that should be closed
|
|
73
|
+
- Labels that need updating
|
|
299
74
|
|
|
300
|
-
|
|
75
|
+
Record findings in the maintenance run file (`codev/maintain/NNNN.md`).
|
|
301
76
|
|
|
302
|
-
|
|
303
|
-
2. Identify divergence
|
|
304
|
-
3. Update the stale one to match
|
|
305
|
-
4. Both should be identical (per AGENTS.md standard)
|
|
77
|
+
### Step 2: Clean
|
|
306
78
|
|
|
307
|
-
|
|
79
|
+
For each finding from the audit:
|
|
80
|
+
1. Verify it's truly unused (grep the codebase)
|
|
81
|
+
2. Remove it (use `git rm` for tracked files)
|
|
82
|
+
3. Verify build + tests still pass
|
|
83
|
+
4. Commit with `[Maintain] Remove unused X`
|
|
308
84
|
|
|
309
|
-
**
|
|
85
|
+
**Rules**:
|
|
86
|
+
- One removal at a time — don't batch unrelated changes
|
|
87
|
+
- Verify after each removal — build must pass
|
|
88
|
+
- Use soft deletion for untracked files: `mv file codev/maintain/.trash/$(date +%Y-%m-%d)/`
|
|
89
|
+
- Never use `git add -A` or `git add .`
|
|
310
90
|
|
|
311
|
-
|
|
91
|
+
### Step 3: Sync Documentation
|
|
312
92
|
|
|
313
|
-
**
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
- `VERBOSE` - Can be condensed without losing meaning
|
|
320
|
-
3. **Decision** - Delete, move, or keep with note
|
|
93
|
+
**arch.md**: Compare documented structure with actual codebase. Update:
|
|
94
|
+
- Directory structure
|
|
95
|
+
- Component descriptions (explain HOW things work, not just WHAT)
|
|
96
|
+
- Key files and their purposes
|
|
97
|
+
- Remove references to deleted code
|
|
98
|
+
- Add new components/utilities
|
|
321
99
|
|
|
322
|
-
**
|
|
323
|
-
```markdown
|
|
324
|
-
## Documentation Changes
|
|
325
|
-
|
|
326
|
-
### arch.md
|
|
327
|
-
| Section | Action | Reason |
|
|
328
|
-
|---------|--------|--------|
|
|
329
|
-
| "Old API docs" | DELETED | OBSOLETE - API removed in v1.2 |
|
|
330
|
-
| "Installation" | MOVED | To INSTALL.md for brevity |
|
|
331
|
-
| "Architecture patterns" | KEPT | Still relevant, referenced by builders |
|
|
332
|
-
```
|
|
100
|
+
**lessons-learned.md**: Scan `codev/reviews/` for new reviews since last run. Extract lessons that are actionable, durable, and general.
|
|
333
101
|
|
|
334
|
-
**
|
|
335
|
-
- `codev/resources/arch.md` - remove references to deleted code/modules
|
|
336
|
-
- `codev/resources/lessons-learned.md` - remove outdated lessons
|
|
337
|
-
- `CLAUDE.md` / `AGENTS.md` - target ~400 lines (guideline, not hard limit)
|
|
338
|
-
- `README.md` - target ~400 lines (guideline, not hard limit)
|
|
102
|
+
**CLAUDE.md / AGENTS.md**: Diff the two files. They must be identical. Update the stale one.
|
|
339
103
|
|
|
340
|
-
**
|
|
104
|
+
**Documentation pruning**:
|
|
105
|
+
- Remove obsolete references
|
|
106
|
+
- ~400 line guideline for CLAUDE.md/README.md (not a hard limit)
|
|
107
|
+
- Document every deletion with justification (OBSOLETE, DUPLICATIVE, MOVED, VERBOSE)
|
|
341
108
|
- When in doubt, KEEP the content
|
|
342
|
-
- If unsure, ASK the architect before deleting
|
|
343
|
-
- Prefer MOVING over DELETING
|
|
344
|
-
- Never delete "development patterns" or "best practices" sections without explicit approval
|
|
345
|
-
|
|
346
|
-
**What to extract (move, don't delete)**:
|
|
347
|
-
- Detailed command references → `codev/resources/commands/`
|
|
348
|
-
- Protocol details → `codev/protocols/*/protocol.md`
|
|
349
|
-
- Tool configuration → `codev/resources/`
|
|
350
|
-
|
|
351
|
-
**What to ALWAYS keep in CLAUDE.md**:
|
|
352
|
-
- Git prohibitions and safety rules
|
|
353
|
-
- Critical workflow instructions
|
|
354
|
-
- Protocol selection guidance
|
|
355
|
-
- Consultation requirements
|
|
356
|
-
- Links to detailed docs
|
|
357
|
-
|
|
358
|
-
**Good candidates for deletion from CLAUDE.md**:
|
|
359
|
-
- Content duplicated elsewhere (e.g., in protocol files, role files, docs/)
|
|
360
|
-
- **When removing duplicated content**: Replace with a pointer to the canonical location
|
|
361
|
-
```markdown
|
|
362
|
-
## Consult Tool
|
|
363
|
-
|
|
364
|
-
See `codev/resources/commands/consult.md` for full documentation.
|
|
365
|
-
```
|
|
366
|
-
- This keeps CLAUDE.md as an index/guide rather than duplicating detailed docs
|
|
367
|
-
|
|
368
|
-
### Remove Dead Code
|
|
369
|
-
|
|
370
|
-
Use static analysis to find and remove unused code:
|
|
371
|
-
|
|
372
|
-
1. Run analysis tools (ts-prune, depcheck, ruff)
|
|
373
|
-
2. Review findings for false positives
|
|
374
|
-
3. Use `git rm` to remove confirmed dead code
|
|
375
|
-
4. Commit with descriptive message
|
|
376
|
-
|
|
377
|
-
**Important**: Use `git rm`, not `rm`. Git history preserves deleted files.
|
|
378
|
-
|
|
379
|
-
### Update Dependencies
|
|
380
109
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
1. Run `npm outdated` or equivalent
|
|
384
|
-
2. Categorize updates:
|
|
385
|
-
- Patch: Safe to auto-update
|
|
386
|
-
- Minor: Review changelog
|
|
387
|
-
- Major: Requires human review for breaking changes
|
|
388
|
-
3. Update and test
|
|
389
|
-
4. Document any migration steps
|
|
390
|
-
|
|
391
|
-
### Run codev update
|
|
392
|
-
|
|
393
|
-
Update the codev framework to the latest version:
|
|
110
|
+
### Step 4: Final Checks
|
|
394
111
|
|
|
395
112
|
```bash
|
|
396
|
-
|
|
113
|
+
# Build and test from the package directory
|
|
114
|
+
cd packages/codev && pnpm build && pnpm test
|
|
397
115
|
```
|
|
398
116
|
|
|
399
|
-
|
|
117
|
+
Both must pass before moving to the review phase.
|
|
400
118
|
|
|
401
119
|
---
|
|
402
120
|
|
|
403
|
-
##
|
|
121
|
+
## Maintenance Run File
|
|
404
122
|
|
|
405
|
-
|
|
123
|
+
Each run creates `codev/maintain/NNNN.md`:
|
|
406
124
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
- [ ] No import/module errors
|
|
410
|
-
- [ ] Documentation links resolve
|
|
411
|
-
- [ ] Linter passes
|
|
125
|
+
```markdown
|
|
126
|
+
# Maintenance Run NNNN
|
|
412
127
|
|
|
413
|
-
|
|
128
|
+
**Date**: YYYY-MM-DD
|
|
129
|
+
**Base Commit**: <hash>
|
|
130
|
+
**PR**: #NNN
|
|
414
131
|
|
|
415
|
-
|
|
132
|
+
## Changes Since Last Run
|
|
416
133
|
|
|
417
|
-
|
|
134
|
+
<key commits summary>
|
|
418
135
|
|
|
419
|
-
|
|
136
|
+
## What Was Done
|
|
420
137
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
consult -m codex --protocol maintain --type pr &
|
|
425
|
-
consult -m claude --protocol maintain --type pr &
|
|
426
|
-
wait
|
|
427
|
-
```
|
|
138
|
+
### Dead Code Removed
|
|
139
|
+
- `path/to/file.ts`: `unusedFunction()` — not imported anywhere
|
|
140
|
+
- Removed `some-package` dependency — zero imports
|
|
428
141
|
|
|
429
|
-
|
|
430
|
-
-
|
|
431
|
-
-
|
|
432
|
-
- Are lessons-learned.md entries actionable?
|
|
433
|
-
- Any regressions or side effects?
|
|
142
|
+
### Documentation Updated
|
|
143
|
+
- arch.md: Added VS Code extension section, removed old dashboard-server refs
|
|
144
|
+
- lessons-learned.md: Extracted 3 lessons from reviews 653, 672
|
|
434
145
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
146
|
+
### Documentation Changes Log
|
|
147
|
+
| Document | Section | Action | Reason |
|
|
148
|
+
|----------|---------|--------|--------|
|
|
149
|
+
| arch.md | "Dashboard Server" | DELETED | OBSOLETE — replaced by Tower |
|
|
439
150
|
|
|
440
|
-
|
|
151
|
+
## Deferred
|
|
441
152
|
|
|
442
|
-
|
|
153
|
+
- Items found but not worth fixing now
|
|
443
154
|
|
|
444
|
-
##
|
|
155
|
+
## Summary
|
|
445
156
|
|
|
446
|
-
|
|
447
|
-
```bash
|
|
448
|
-
# Git history preserves everything
|
|
449
|
-
git log --all --full-history -- path/to/file
|
|
450
|
-
git checkout <commit>~1 -- path/to/file
|
|
157
|
+
<2-3 sentences>
|
|
451
158
|
```
|
|
452
159
|
|
|
453
|
-
|
|
454
|
-
Move to `codev/maintain/.trash/YYYY-MM-DD/` before deleting. Retained for 30 days.
|
|
160
|
+
Keep it factual and short. The run file documents what happened, not what might happen.
|
|
455
161
|
|
|
456
162
|
---
|
|
457
163
|
|
|
@@ -459,49 +165,45 @@ Move to `codev/maintain/.trash/YYYY-MM-DD/` before deleting. Retained for 30 day
|
|
|
459
165
|
|
|
460
166
|
```
|
|
461
167
|
[Maintain] Remove 5 unused exports
|
|
462
|
-
[Maintain]
|
|
463
|
-
[Maintain]
|
|
168
|
+
[Maintain] Remove http-proxy dependency
|
|
169
|
+
[Maintain] Update arch.md — add VS Code extension, remove dashboard-server refs
|
|
170
|
+
[Maintain] Generate lessons-learned.md from reviews 653, 672
|
|
464
171
|
[Maintain] Sync CLAUDE.md with AGENTS.md
|
|
465
|
-
[Maintain] Update dependencies (patch)
|
|
466
172
|
```
|
|
467
173
|
|
|
468
174
|
---
|
|
469
175
|
|
|
470
176
|
## Governance
|
|
471
177
|
|
|
472
|
-
MAINTAIN is an
|
|
178
|
+
MAINTAIN is an operational protocol, not a feature protocol:
|
|
473
179
|
|
|
474
180
|
| Document | Required? |
|
|
475
181
|
|----------|-----------|
|
|
476
182
|
| Spec | No |
|
|
477
183
|
| Plan | No |
|
|
478
|
-
| Review | No |
|
|
479
|
-
|
|
|
184
|
+
| Review | No (maintenance run file serves this purpose) |
|
|
185
|
+
| Consultation | Yes — 3-way review before PR |
|
|
480
186
|
|
|
481
|
-
|
|
187
|
+
If maintenance reveals need for architectural changes, those should follow SPIR.
|
|
482
188
|
|
|
483
189
|
---
|
|
484
190
|
|
|
485
|
-
##
|
|
191
|
+
## Rules
|
|
486
192
|
|
|
487
|
-
1. **Don't be aggressive
|
|
488
|
-
2. **Check git blame
|
|
489
|
-
3. **Run full test suite
|
|
490
|
-
4. **Group related changes
|
|
491
|
-
5. **Document
|
|
492
|
-
6. **
|
|
493
|
-
7. **
|
|
494
|
-
8. **Size targets are guidelines**: Never sacrifice clarity to hit a line count
|
|
495
|
-
|
|
496
|
-
---
|
|
193
|
+
1. **Don't be aggressive** — when in doubt, KEEP the content
|
|
194
|
+
2. **Check git blame** — understand why code/docs exist before removing
|
|
195
|
+
3. **Run full test suite** — not just affected tests
|
|
196
|
+
4. **Group related changes** — one commit per logical change
|
|
197
|
+
5. **Document every deletion** — what, why, and where (if moved)
|
|
198
|
+
6. **Prefer moving over deleting** — extract to another file rather than removing
|
|
199
|
+
7. **Size targets are guidelines** — never sacrifice clarity to hit a line count
|
|
497
200
|
|
|
498
201
|
## Anti-Patterns
|
|
499
202
|
|
|
500
|
-
1.
|
|
501
|
-
2.
|
|
502
|
-
3.
|
|
503
|
-
4.
|
|
504
|
-
5.
|
|
505
|
-
6.
|
|
506
|
-
7.
|
|
507
|
-
8. **Making changes the architect can't review**: Big deletions need clear explanations
|
|
203
|
+
1. Aggressive rewriting without explanation
|
|
204
|
+
2. Deleting without documenting why
|
|
205
|
+
3. Hitting line count targets at all costs
|
|
206
|
+
4. Removing "patterns" or "best practices" sections without explicit approval
|
|
207
|
+
5. Deleting everything the audit finds — review each item individually
|
|
208
|
+
6. Skipping validation — "it looked dead" is not validation
|
|
209
|
+
7. Using `rm` instead of `git rm`
|