You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: codev/maintain/0007.md
+25-3Lines changed: 25 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ Major features merged since run 0006 (partial list):
33
33
Other ts-prune/depcheck findings were investigated but retained:
34
34
35
35
-`@vitest/coverage-v8` — dynamically loaded by vitest config at `vitest.config.ts:30` (`provider: 'v8'`), depcheck can't detect this.
36
-
-`@xterm/xterm`missing-dep warning — used only in test file `src/__tests__/filePathLinkProvider.test.ts`, resolved transitively through `@cluesmith/codev-dashboard`; no runtime impact.
36
+
-`@xterm/xterm`— was flagged as transitively resolved; per Gemini's 3-way review, pinned explicitly in `devDependencies` (`^5.5.0`) since the test file imports it directly. Relying on a transitive dashboard dep was fragile.
37
37
-`state.ts` util/annotation/architect exports — used in test files; part of public state API surface.
38
38
-`forge.ts`, `github.ts`, `templates.ts`, `scaffold.ts`, `skeleton.ts`, `team.ts` unused exports — all used by their sibling test files. Conservative: keep public API stable.
39
39
-`cli.ts:378 run()` — exported for bin shims (`afx.js`, `consult.js`).
@@ -44,11 +44,13 @@ Other ts-prune/depcheck findings were investigated but retained:
- Refreshed `codev-skeleton/protocols/` subtree: added `aspir`, `air`, `bugfix`, `spike` (was stale — only listed `spir`, `experiment`, `maintain`).
48
50
- Updated version footer: `v2.0.0-rc.54` → `v3.0.0-rc.9`; date bumped to 2026-04-17.
49
51
50
52
**`codev/resources/lessons-learned.md`**:
51
-
- Added 3 lessons from Spec 653 (builder handling / TICK removal): start from structural insight, full-repo grep for protocol removal, single verify-pass consultation cadence.
53
+
- Added 3 lessons from Spec 653 (builder handling / TICK removal) at the end of the **Critical (Prevent Major Failures)** section: start from structural insight, full-repo grep for protocol removal, single verify-pass consultation cadence.
52
54
- Updated footer date.
53
55
54
56
**`AGENTS.md`**:
@@ -80,6 +82,26 @@ Other ts-prune/depcheck findings were investigated but retained:
80
82
-**arch.md full rewrite** — `arch.md` is 1,776 lines; ~90% still accurate. A full rewrite is out of scope for a pre-release MAINTAIN pass.
81
83
-**`ts-prune` noise from barrel files** — `terminal/index.ts` re-exports would need per-file annotation (`// ts-prune-ignore-next`) or a config file to silence. Low value.
82
84
85
+
## Consultation Log
86
+
87
+
3-way review run before opening PR (prompt at `/tmp/maintain-0007-consult-prompt.md`):
88
+
89
+
| Reviewer | Verdict | Key findings |
90
+
|----------|---------|--------------|
91
+
|**Gemini**| REQUEST_CHANGES | Missed `protocol-schema.json` in tree; `codev-skeleton/protocols/` subtree still stale; lessons placed under wrong section heading (ran report said Critical, actually appended to end of file); push back on deferring `@xterm/xterm` — one-line fix, just add the devDep. |
92
+
|**Codex**| APPROVE_WITH_COMMENTS |`spir/` subtree listed nonexistent `manifest.yaml`; `codev-skeleton/protocols/` still stale (same as Gemini); noted CLI examples elsewhere in arch.md (`afx util`, `afx tunnel`, `afx ports`) are stale but out of scope. |
93
+
|**Claude**| APPROVE_WITH_COMMENTS | All three trees and dep removal verified against filesystem. Noted pre-existing duplicate step numbering (`# 3`) in local-install section of CLAUDE.md/AGENTS.md (not introduced here). |
94
+
95
+
### Actions taken in response
96
+
97
+
- Added `protocol-schema.json` to `codev/protocols/` tree (Gemini)
98
+
- Fixed `spir/` subtree to match actual files (Codex)
- Moved Spec 653 lessons into the **Critical** section (Gemini)
101
+
- Added `@xterm/xterm` to `packages/codev` devDependencies (Gemini)
102
+
- Not addressed: the stale CLI examples elsewhere in arch.md — Codex flagged these as out-of-scope, and fixing them well would require a broader CLI audit. Deferred to a future MAINTAIN pass.
103
+
- Not addressed: duplicate `# 3` step numbering in CLAUDE.md/AGENTS.md. Pre-existing on `main`; belongs in a separate doc tweak.
104
+
83
105
## Summary
84
106
85
107
First run on the simplified (2-phase) MAINTAIN protocol. The dependency cleanup caught up on the one un-acted item from run 0006's findings (`http-proxy`). Documentation sync was the bulk of the work: arch.md's directory trees had drifted significantly over 1,751 commits (VS Code extension, codev-core split, pnpm migration, afx rename, TICK removal). Everything builds and all unit tests pass against the refreshed tree.
Copy file name to clipboardExpand all lines: codev/resources/lessons-learned.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,9 @@ Generalizable wisdom extracted from review documents, ordered by impact. Updated
38
38
-[From 0324]`detached: true` and `child.unref()` are necessary but not sufficient for process independence -- any pipe-based stdio (e.g., `stdio: ['ignore', 'pipe', 'pipe']`) creates a lifecycle dependency between parent and child processes. When the parent exits, the broken pipe triggers unhandled EPIPE errors in the child. Use file FDs or `'ignore'` for truly independent daemon children.
39
39
-[From bugfix-274] Startup ordering matters when multiple subsystems share resources (Shellper sockets). Initialization order creates implicit synchronization -- calling `initInstances()` before `reconcileTerminalSessions()` allowed dashboard polls to race with reconciliation. Document ordering constraints in comments.
40
40
-[From bugfix-274] Defense in depth for race conditions: the startup reorder closes the primary race path, but the `_reconciling` guard provides a safety net for code paths that bypass the primary fix (e.g., direct `/project/.../api/state` requests bypassing `getInstances()`).
41
+
-[From 653] Start from the structural insight, not the feature list. The first three spec drafts built elaborate gate-ceremony machinery (checkpoint PRs, feedback commands, verify notes) that was all eliminated once the core insight — break the 1:1 builder↔PR assumption — was identified. When a spec feels bloated, look for the one structural change that makes the ceremony unnecessary.
42
+
-[From 653] Protocol removal requires full-repo grep, not targeted searches. Removing a protocol touches ~50 files across source, docs, templates, skills, tests, and CLI help text. Scoped searches miss skeleton templates, test fixtures, and user-facing help strings. Run `rg` across the entire repo and verify zero hits before committing.
43
+
-[From 653] Single verify pass + rebuttal is the right consultation cadence. Multi-iteration consult loops (running `consult` manually after each fix) violate `max_iterations=1` and add little marginal value over one rigorous verify pass followed by rebuttals.
41
44
42
45
## Security
43
46
@@ -362,10 +365,6 @@ Generalizable wisdom extracted from review documents, ordered by impact. Updated
362
365
-[From 627] Lifecycle phases (initial-load → buffer-replay → interactive) eliminate magic thresholds. Instead of asking "is this scroll event real?", ask "what phase am I in?" to determine behavior.
363
366
-[From 627] Always add a `reset()` method to state machines that persist across reconnections. The ScrollController's phase transitions were one-way until reconnection revealed the need to return to initial-load.
364
367
365
-
-[From 653] Start from the structural insight, not the feature list. The first three spec drafts built elaborate gate-ceremony machinery (checkpoint PRs, feedback commands, verify notes) that was all eliminated once the core insight — break the 1:1 builder↔PR assumption — was identified. When a spec feels bloated, look for the one structural change that makes the ceremony unnecessary.
366
-
-[From 653] Protocol removal requires full-repo grep, not targeted searches. Removing a protocol touches ~50 files across source, docs, templates, skills, tests, and CLI help text. Scoped searches miss skeleton templates, test fixtures, and user-facing help strings. Run `rg` across the entire repo and verify zero hits before committing.
367
-
-[From 653] Single verify pass + rebuttal is the right consultation cadence. Multi-iteration consult loops (running `consult` manually after each fix) violate `max_iterations=1` and add little marginal value over one rigorous verify pass followed by rebuttals.
368
-
369
368
---
370
369
371
370
*Last updated: 2026-04-17 (Maintenance run 0007 — v3.0.0 pre-release)*
0 commit comments