@gotgenes/pi-subagents 6.16.2 → 6.16.3
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/CHANGELOG.md +7 -0
- package/docs/retro/0146-narrow-ui-context.md +70 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [6.16.3](https://github.com/gotgenes/pi-packages/compare/pi-subagents-v6.16.2...pi-subagents-v6.16.3) (2026-05-23)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Documentation
|
|
12
|
+
|
|
13
|
+
* **retro:** add retro notes for issue [#146](https://github.com/gotgenes/pi-packages/issues/146) ([720fcb0](https://github.com/gotgenes/pi-packages/commit/720fcb07937fc62a1811e59448343d3dfbc1ab14))
|
|
14
|
+
|
|
8
15
|
## [6.16.2](https://github.com/gotgenes/pi-packages/compare/pi-subagents-v6.16.1...pi-subagents-v6.16.2) (2026-05-23)
|
|
9
16
|
|
|
10
17
|
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
issue: 146
|
|
3
|
+
issue_title: "Narrow UI context for menu handlers (Phase 9, Step N)"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Retro: #146 — Narrow UI context for menu handlers
|
|
7
|
+
|
|
8
|
+
## Final Retrospective (2026-05-23T10:00:00Z)
|
|
9
|
+
|
|
10
|
+
### Session summary
|
|
11
|
+
|
|
12
|
+
Introduced a `MenuUI` interface in `agent-menu.ts` capturing the 6 `ctx.ui` methods used by menu handlers.
|
|
13
|
+
Replaced `ExtensionContext` with `MenuUI` (plus explicit `ModelRegistry` and `ParentSnapshot`) in all inner functions across `agent-menu.ts`, `agent-config-editor.ts`, and `agent-creation-wizard.ts`.
|
|
14
|
+
Dissolved three ≤4-field dependency bags (`AgentConfigEditorDeps`, `GetResultDeps`, `SteerToolDeps`) into plain parameters; destructured `AgentMenuDeps` and `AgentCreationWizardDeps` in their factory signatures.
|
|
15
|
+
Eliminated 42 `ctx as any` casts across 5 test files.
|
|
16
|
+
Released as `pi-subagents-v6.16.2`.
|
|
17
|
+
|
|
18
|
+
### Observations
|
|
19
|
+
|
|
20
|
+
#### What went well
|
|
21
|
+
|
|
22
|
+
- **User-initiated plan review caught three ordering bugs before implementation.**
|
|
23
|
+
The user asked the agent to "review the plan and judge its quality and clarity" after the initial commit.
|
|
24
|
+
The review identified three execution-blocking problems in the TDD order: `MenuUI` not defined before consumers, `ParentSnapshot` not threaded through the handler return type, and `index.ts` call sites not updated alongside their factories.
|
|
25
|
+
All three were fixed before TDD execution began, saving significant implementation friction.
|
|
26
|
+
- The plan's TDD order (after fixes) worked well for a pure-refactoring change — all 806 tests stayed green throughout every step.
|
|
27
|
+
- The type checker served as an effective safety net: every call-site mismatch was caught immediately by `pnpm run check`, preventing runtime surprises.
|
|
28
|
+
|
|
29
|
+
#### What caused friction (agent side)
|
|
30
|
+
|
|
31
|
+
##### Planning session
|
|
32
|
+
|
|
33
|
+
- `missing-context` — The initial plan had three TDD ordering bugs: (1) `MenuUI` used before defined, (2) `ParentSnapshot` not threaded through handler return type, (3) `index.ts` call sites not updated alongside factory signature changes.
|
|
34
|
+
These were caught by a user-prompted plan review, not by the planning agent itself.
|
|
35
|
+
Impact: would have caused type-check failures during TDD execution; fixed before implementation started.
|
|
36
|
+
|
|
37
|
+
- `wrong-abstraction` — After fixing the plan, the agent ran `git commit --amend --no-edit` to update the plan commit, but it landed on the wrong commit (a stacked prompt-changes commit from a different session).
|
|
38
|
+
This caused divergent history with origin.
|
|
39
|
+
Recovery required `git reset --hard origin/main` and re-applying the plan fixes as a new commit (`3d5b591`).
|
|
40
|
+
Impact: ~5 minutes of git recovery and re-application of edits.
|
|
41
|
+
|
|
42
|
+
##### Implementation session
|
|
43
|
+
|
|
44
|
+
- `missing-context` — In Step 3, the plan listed the `WizardManager.spawnAndWait` signature change (to accept `ParentSnapshot`) and the `AgentMenuManager.spawnAndWait` change as separate steps (3 and 4).
|
|
45
|
+
But `agent-menu.ts` passes `deps.manager` (typed as `AgentMenuManager`) to `createAgentCreationWizard`, which expects `WizardManager`.
|
|
46
|
+
Changing `WizardManager` without also changing `AgentMenuManager` broke the type checker.
|
|
47
|
+
I had to pull the `AgentMenuManager` change forward from Step 4 into Step 3.
|
|
48
|
+
Impact: minor — a few minutes of diagnosis and one extra edit, no rework.
|
|
49
|
+
|
|
50
|
+
- `missing-context` — In Step 2, after dissolving `AgentConfigEditorDeps` and changing `showAgentDetail(ctx)` to `showAgentDetail(ui: MenuUI)`, I forgot to update the call site in `agent-menu.ts` from `editor.showAgentDetail(ctx, agentName)` to `editor.showAgentDetail(ctx.ui, agentName)`.
|
|
51
|
+
The type checker caught it immediately.
|
|
52
|
+
Impact: added friction but no rework — one extra `pnpm run check` cycle.
|
|
53
|
+
|
|
54
|
+
- `missing-context` — In Step 4, the `makeUI()` test helper used `modelRegistry: {}` which didn't satisfy the `ModelRegistry` interface (requires `find` and `getAll`).
|
|
55
|
+
Impact: one extra `pnpm run check` cycle and a one-line fix.
|
|
56
|
+
|
|
57
|
+
- `missing-context` — In Step 5, two tests called `createGetResultTool(makeDeps())` directly (not via the `execute()` helper).
|
|
58
|
+
After dissolving deps, the factory signature changed but I only updated `execute()`.
|
|
59
|
+
The type checker caught the two direct calls.
|
|
60
|
+
Impact: one extra `pnpm run check` cycle.
|
|
61
|
+
|
|
62
|
+
#### What caused friction (user side)
|
|
63
|
+
|
|
64
|
+
- None observed — the session ran autonomously with no user corrections needed.
|
|
65
|
+
|
|
66
|
+
#### What caused friction (user side — planning)
|
|
67
|
+
|
|
68
|
+
- The user had to explicitly ask for a plan review (“I'd like you to review the plan and judge its quality and clarity”) to surface three ordering bugs.
|
|
69
|
+
The planning agent should have caught these during plan authoring — the testing skill already contains rules about TDD step ordering and shared interface changes.
|
|
70
|
+
The user's intervention prevented significant implementation friction.
|