@gotgenes/pi-subagents 7.2.7 → 7.2.8
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
CHANGED
|
@@ -5,6 +5,18 @@ 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
|
+
## [7.2.8](https://github.com/gotgenes/pi-packages/compare/pi-subagents-v7.2.7...pi-subagents-v7.2.8) (2026-05-25)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Performance Improvements
|
|
12
|
+
|
|
13
|
+
* remove <inherited_system_prompt> wrapper to maximise KV cache reuse ([#180](https://github.com/gotgenes/pi-packages/issues/180)) ([f35e7b1](https://github.com/gotgenes/pi-packages/commit/f35e7b1b4309f91656677932c201d762c4be5cf3))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Documentation
|
|
17
|
+
|
|
18
|
+
* **retro:** add retro notes for issue [#206](https://github.com/gotgenes/pi-packages/issues/206) ([f439057](https://github.com/gotgenes/pi-packages/commit/f439057bd42edc018df8ddd94783f8a9c89968e0))
|
|
19
|
+
|
|
8
20
|
## [7.2.7](https://github.com/gotgenes/pi-packages/compare/pi-subagents-v7.2.6...pi-subagents-v7.2.7) (2026-05-25)
|
|
9
21
|
|
|
10
22
|
|
|
@@ -34,3 +34,34 @@ Test count grew from 21 to 33 (+12 new unit tests for the two exported pure func
|
|
|
34
34
|
- `buildMenuOptions` extracted cleanly with early-return style (no `let menuOptions` intermediate); the refactored function passes all 5 new unit tests and all 21 existing integration tests.
|
|
35
35
|
- `handleEdit`, `handleDelete`, and `handleReset` are closure-internal; they drop the outer `if (file)` guard since the menu only shows those options when `file` is defined.
|
|
36
36
|
- `buildEjectContent` extracted from `ejectAgent` reduces `ejectAgent` to a thin IO function (~10 lines); no behavior change verified by the existing eject integration tests.
|
|
37
|
+
|
|
38
|
+
## Stage: Final Retrospective (2026-05-25T12:10:00Z)
|
|
39
|
+
|
|
40
|
+
### Session summary
|
|
41
|
+
|
|
42
|
+
Completed full lifecycle — Planning, TDD (3 `refactor:` + 1 `docs:` commits, +12 tests), Ship, and Release (`pi-subagents-v7.2.7`) — in a single session with no user corrections.
|
|
43
|
+
|
|
44
|
+
### Observations
|
|
45
|
+
|
|
46
|
+
#### What went well
|
|
47
|
+
|
|
48
|
+
- The three-stage workflow (plan → TDD → ship) executed without any user intervention between stages.
|
|
49
|
+
Each stage's retro notes provided clean context for the next.
|
|
50
|
+
- Pure-function extraction pattern worked cleanly: `buildMenuOptions` and `buildEjectContent` exported for unit testing; `handleEdit`, `handleDelete`, `handleReset` kept as closure-internal, tested via existing integration tests.
|
|
51
|
+
- The existing 21 integration tests caught no regressions across all 3 refactor commits — strong safety net for mechanical extraction.
|
|
52
|
+
|
|
53
|
+
#### What caused friction (agent side)
|
|
54
|
+
|
|
55
|
+
- `other` — Passed `newText: null` to the `Edit` tool during TDD step 1, injecting a literal `null` into `agent-config-editor.ts` and corrupting the file.
|
|
56
|
+
Self-identified immediately via Biome autoformat failure.
|
|
57
|
+
Impact: one wasted tool round-trip; recovered by rewriting the file with `Write`.
|
|
58
|
+
- `missing-context` — Used `thinking: "auto"` in a `buildEjectContent` test fixture without checking `ThinkingLevel` is `"minimal" | "low" | "medium" | "high" | "xhigh"`.
|
|
59
|
+
Self-identified by `pnpm run check` post-TDD gate.
|
|
60
|
+
Impact: one `--amend` fix, no extra commit.
|
|
61
|
+
- `missing-context` — Plan stated "18 tests" as the baseline count; actual baseline was 21.
|
|
62
|
+
Impact: none — just an inaccurate number in the plan text.
|
|
63
|
+
|
|
64
|
+
#### What caused friction (user side)
|
|
65
|
+
|
|
66
|
+
- No user-side friction observed.
|
|
67
|
+
The user triggered each stage sequentially without needing to redirect or correct.
|
package/package.json
CHANGED
package/src/session/prompts.ts
CHANGED
|
@@ -74,12 +74,13 @@ You are operating as a sub-agent invoked to handle a specific task.
|
|
|
74
74
|
: "";
|
|
75
75
|
|
|
76
76
|
// Place shared/stable content first so the LLM's KV cache can reuse the
|
|
77
|
-
// inherited prefix across all subagent invocations. The
|
|
78
|
-
//
|
|
77
|
+
// inherited prefix across all subagent invocations. The parent prompt is
|
|
78
|
+
// placed verbatim (no wrapper tag) so it forms an identical byte prefix
|
|
79
|
+
// with the parent session, maximising KV cache hits. The <active_agent>
|
|
80
|
+
// tag and env block vary per call and are placed after the cached prefix.
|
|
79
81
|
return (
|
|
80
|
-
"<inherited_system_prompt>\n" +
|
|
81
82
|
identity +
|
|
82
|
-
"\n
|
|
83
|
+
"\n\n" +
|
|
83
84
|
bridge +
|
|
84
85
|
"\n\n" +
|
|
85
86
|
activeAgentTag +
|