detached 98154ef

fix(tasked-phases): guide continuous checklist updates

commit
98154ef2ca1153182a0007905a6fc0a4dd41a29b
author
brice · · 2026-08-05 07:30 UTC
committer
brice · · 2026-08-05 07:33 UTC
parent
1839ad7
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
4 files · +29 -4
M examples/extensions/tasked-phases/README.md +5 -3
@@ -57,6 +57,8 @@ available, the plan is also stored as extension-owned state on each session
5757 branch and restored when sessions are opened, switched, or forked.
5858
5959 Before each model turn, the extension supplies only the active phase, its goal,
60-and a bounded set of incomplete tasks as hidden context. Completed phases and
61-future phases are not repeated in every provider request; use `get_status` or
62-`/phases` when the full checklist is needed.
60+and a bounded set of incomplete tasks as hidden context. The same context
61+reminds the model to update the checklist continuously, mark each task as soon
62+as it is completed, and advance the current phase when work moves forward.
63+Completed phases and future phases are not repeated in every provider request;
64+use `get_status` or `/phases` when the full checklist is needed.
@@ -57,6 +57,8 @@ available, the plan is also stored as extension-owned state on each session
57 branch and restored when sessions are opened, switched, or forked.57 branch and restored when sessions are opened, switched, or forked.
58 58
59 Before each model turn, the extension supplies only the active phase, its goal,59 Before each model turn, the extension supplies only the active phase, its goal,
60-and a bounded set of incomplete tasks as hidden context. Completed phases and60+and a bounded set of incomplete tasks as hidden context. The same context
61-future phases are not repeated in every provider request; use `get_status` or61+reminds the model to update the checklist continuously, mark each task as soon
62-`/phases` when the full checklist is needed.62+as it is completed, and advance the current phase when work moves forward.
63+Completed phases and future phases are not repeated in every provider request;
64+use `get_status` or `/phases` when the full checklist is needed.
M examples/extensions/tasked-phases/main.go +1 -1
@@ -118,7 +118,7 @@ func main() {
118118 })
119119
120120 e.Tool(toolName,
121- "Persist and update a structured spec, phased plan, current phase, and checklist tasks. Use it for spec-driven planning and progress tracking.",
121+ "Persist and update a structured spec, phased plan, current phase, and checklist tasks. Keep the plan current throughout implementation: update it continuously, call set_task_checked immediately after each completed checklist task, and call set_current_phase when moving to another phase.",
122122 json.RawMessage(toolSchema), a.handleTool)
123123 e.Command("phases", "Show the current spec, phases, and checklist state", a.handleCommand)
124124 e.OnPanelKey(panelID, a.handlePanelKey, a.handlePanelClose)
@@ -118,7 +118,7 @@ func main() {
118 })118 })
119 119
120 e.Tool(toolName,120 e.Tool(toolName,
121- "Persist and update a structured spec, phased plan, current phase, and checklist tasks. Use it for spec-driven planning and progress tracking.",121+ "Persist and update a structured spec, phased plan, current phase, and checklist tasks. Keep the plan current throughout implementation: update it continuously, call set_task_checked immediately after each completed checklist task, and call set_current_phase when moving to another phase.",
122 json.RawMessage(toolSchema), a.handleTool)122 json.RawMessage(toolSchema), a.handleTool)
123 e.Command("phases", "Show the current spec, phases, and checklist state", a.handleCommand)123 e.Command("phases", "Show the current spec, phases, and checklist state", a.handleCommand)
124 e.OnPanelKey(panelID, a.handlePanelKey, a.handlePanelClose)124 e.OnPanelKey(panelID, a.handlePanelKey, a.handlePanelClose)
M examples/extensions/tasked-phases/state.go +7 -0
@@ -915,7 +915,14 @@ func buildTurnContext(state PlanState) string {
915915 return ""
916916 }
917917 lines := []string{
918+ "[TASKED PHASES STATE - SOURCE OF TRUTH]",
918919 "Tasked phases focus:",
920+ "Call tasked_phases get_status if the exact full checklist is needed.",
921+ "Update tasked_phases continuously while implementing, not only at the end.",
922+ "After completing each checklist task, immediately call tasked_phases set_task_checked.",
923+ "After moving to another phase, immediately call tasked_phases set_current_phase.",
924+ "When a phase is shown as Title [id], pass phaseId as the raw id only, without brackets.",
925+ "Do not rely on prose alone for completion state.",
919926 fmt.Sprintf("Current phase: %s [%s]", formatPhaseTitle(*phase), formatTurnContextID(phase.ID)),
920927 }
921928 if phase.Goal != "" {
@@ -915,7 +915,14 @@ func buildTurnContext(state PlanState) string {
915 return ""915 return ""
916 }916 }
917 lines := []string{917 lines := []string{
918+ "[TASKED PHASES STATE - SOURCE OF TRUTH]",
918 "Tasked phases focus:",919 "Tasked phases focus:",
920+ "Call tasked_phases get_status if the exact full checklist is needed.",
921+ "Update tasked_phases continuously while implementing, not only at the end.",
922+ "After completing each checklist task, immediately call tasked_phases set_task_checked.",
923+ "After moving to another phase, immediately call tasked_phases set_current_phase.",
924+ "When a phase is shown as Title [id], pass phaseId as the raw id only, without brackets.",
925+ "Do not rely on prose alone for completion state.",
919 fmt.Sprintf("Current phase: %s [%s]", formatPhaseTitle(*phase), formatTurnContextID(phase.ID)),926 fmt.Sprintf("Current phase: %s [%s]", formatPhaseTitle(*phase), formatTurnContextID(phase.ID)),
920 }927 }
921 if phase.Goal != "" {928 if phase.Goal != "" {
M examples/extensions/tasked-phases/state_test.go +16 -0
@@ -238,6 +238,22 @@ func TestTurnContextContainsOnlyCurrentFocus(t *testing.T) {
238238 }
239239 }
240240
241+func TestTurnContextRemindsAgentToTrackProgressContinuously(t *testing.T) {
242+ context := buildTurnContext(sampleState())
243+ for _, want := range []string{
244+ "[TASKED PHASES STATE - SOURCE OF TRUTH]",
245+ "Update tasked_phases continuously while implementing, not only at the end.",
246+ "After completing each checklist task, immediately call tasked_phases set_task_checked.",
247+ "After moving to another phase, immediately call tasked_phases set_current_phase.",
248+ "When a phase is shown as Title [id], pass phaseId as the raw id only, without brackets.",
249+ "Do not rely on prose alone for completion state.",
250+ } {
251+ if !strings.Contains(context, want) {
252+ t.Errorf("turn context missing continuous-tracking guidance %q: %s", want, context)
253+ }
254+ }
255+}
256+
241257 func TestTurnContextIsBoundedForUntrustedIdentifiers(t *testing.T) {
242258 state := sampleState()
243259 state.Phases[1].ID = strings.Repeat("phase-id-", 1000)
@@ -238,6 +238,22 @@ func TestTurnContextContainsOnlyCurrentFocus(t *testing.T) {
238 }238 }
239 }239 }
240 240
241+func TestTurnContextRemindsAgentToTrackProgressContinuously(t *testing.T) {
242+ context := buildTurnContext(sampleState())
243+ for _, want := range []string{
244+ "[TASKED PHASES STATE - SOURCE OF TRUTH]",
245+ "Update tasked_phases continuously while implementing, not only at the end.",
246+ "After completing each checklist task, immediately call tasked_phases set_task_checked.",
247+ "After moving to another phase, immediately call tasked_phases set_current_phase.",
248+ "When a phase is shown as Title [id], pass phaseId as the raw id only, without brackets.",
249+ "Do not rely on prose alone for completion state.",
250+ } {
251+ if !strings.Contains(context, want) {
252+ t.Errorf("turn context missing continuous-tracking guidance %q: %s", want, context)
253+ }
254+ }
255+}
256+
241 func TestTurnContextIsBoundedForUntrustedIdentifiers(t *testing.T) {257 func TestTurnContextIsBoundedForUntrustedIdentifiers(t *testing.T) {
242 state := sampleState()258 state := sampleState()
243 state.Phases[1].ID = strings.Repeat("phase-id-", 1000)259 state.Phases[1].ID = strings.Repeat("phase-id-", 1000)

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 477

↑↓ moveenter openesc close