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
feat: replace session manifest with distributed session-tracking notes
The monolithic run manifest (stored as a CC session task) had a 100%
creation failure rate. Replace it with distributed `session-tracking`
notes on each work item, enforced by schema gates.
- Add default schema fallback to YamlNoteSchemaService (one-line change)
- Add session-tracking note to feature-implementation, bug-fix, and
plugin-change schemas in config.yaml
- Create new `default` schema as catch-all for untagged items
- Rewrite session-retrospective skill to aggregate distributed notes
- Remove manifest section from workflow-orchestrator output style
- Add lightweight delegation-metadata pattern for orchestrator-side data
- Simplify retrospective nudge (remove manifest references)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .claude/skills/session-retrospective/SKILL.md
+65-62Lines changed: 65 additions & 62 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
name: session-retrospective
3
3
description: "Analyze the current implementation run — evaluate schema effectiveness, delegation alignment, note quality, plan-to-execution fit. Captures cross-session trends and proposes improvements when patterns repeat. Use after implementation runs, or when user says 'retrospective', 'session review', 'what did we learn', 'analyze this run', 'how did that go', 'evaluate our process', 'wrap up', 'end of session review'. Also use when the output style's retrospective nudge fires after complete_tree."
4
-
argument-hint: "[optional: --dry-run to preview without creating items]"
4
+
argument-hint: "[optional: root item UUID] [--dry-run to preview without creating items]"
5
5
---
6
6
7
7
# Session Retrospective
@@ -16,64 +16,82 @@ If `$ARGUMENTS` contains `--dry-run`, set **DRY_RUN = true**. In dry-run mode, p
16
16
17
17
---
18
18
19
-
## Step 1 — Load the Manifest
19
+
## Step 1 — Gather Scope
20
20
21
-
Search for the run manifest session task:
21
+
Determine which items to analyze by collecting distributed `session-tracking` notes.
22
+
23
+
### 1a. Identify items in scope
24
+
25
+
**If `$ARGUMENTS` contains a UUID (root item ID):**
Build scope from recently completed items (compare `modifiedAt` to current date). Discard items that appear stale (modified more than 24 hours ago).
41
+
42
+
### 1b. Collect distributed notes
43
+
44
+
For each item in scope (up to 20):
45
+
46
+
```
47
+
query_notes(itemId="<uuid>", includeBody=true)
35
48
```
36
49
37
-
Build a synthetic scope from items modified today (compare `modifiedAt` to current date). Discard items that appear stale. Note in the report: `**Fallback mode** — no run manifest found. Analysis based on MCP state queries.`
50
+
Extract:
51
+
- Notes with key `session-tracking` — these contain per-item outcome, files changed, deviations, friction, observations, and test results
52
+
- Notes with key `delegation-metadata` (optional) — orchestrator-recorded model and isolation data
38
53
39
-
**If neither manifest nor fallback produces any items in scope:** Exit early with:
54
+
### 1c. Early exit
55
+
56
+
**If no items are found in scope, or no `session-tracking` notes exist on any item:** Exit early with:
40
57
```
41
-
◆ No implementation run data found. Nothing to retrospect — run `/implement` first, then try again.
58
+
No implementation run data found. Nothing to retrospect — run `/implement` first, then try again.
42
59
```
43
60
44
61
---
45
62
46
-
## Step 2 — Gather Retrospective Data
63
+
## Step 2 — Aggregate Note Data
64
+
65
+
From the collected `session-tracking` notes, aggregate across all items:
47
66
48
-
Run these calls in parallel:
67
+
-**Total item count** and **outcome distribution** (success, partial, failed, skipped)
68
+
-**Combined files list** — all files changed across items, deduplicated
69
+
-**Combined friction list** — all friction entries from all items
70
+
-**Combined observations** — notable observations from all items
71
+
-**Test results summary** — pass/fail counts across items
49
72
50
-
1. For each item in `scope.preExistingItems` + `scope.adHocItems` (up to 20):
51
-
```
52
-
query_notes(itemId="<uuid>", includeBody=true)
53
-
```
54
-
2.`get_context()` — current state snapshot
73
+
If `delegation-metadata` notes exist on any items, extract:
74
+
- Model used per delegation (haiku, sonnet, opus)
75
+
- Isolation mode (inline, worktree)
76
+
- These feed into delegation alignment analysis (step 3b)
55
77
56
-
Cross-reference:
57
-
- Match `delegations[].itemId` to items — verify outcomes
58
-
- Match `schemaInteractions[].itemId` to notes — evaluate content quality
59
-
- Identify items in scope with no delegation entry → self-implemented
60
-
- Identify items with delegations but no notes → incomplete work
78
+
Run `get_context()` in parallel for the current state snapshot.
61
79
62
80
---
63
81
64
82
## Step 3 — Evaluate Across Dimensions
65
83
66
84
### 3a. Schema Effectiveness
67
85
68
-
For each `schemaInteraction` entry:
69
-
-Was `guidanceFollowed: true`for all notes?
86
+
For each item in scope, examine its actual notes (from step 1b):
87
+
-Which schema-required notes exist? Check for non-empty content.
70
88
- Token count per note: **<50 = sparse** (flag), **50-500 = appropriate**, **>500 = potentially verbose** (flag for status-type notes; specification notes are exempt from the upper bound)
71
-
- Were gate failures recorded? What caused them?
72
-
-**Score:** Fraction of notes where guidance was followed and content was appropriately sized
89
+
- Were any items missing required notes (indicating gate failures or schema-free items)?
90
+
-**Score:** Fraction of expected schema notes that exist with appropriately sized content
73
91
74
92
### 3b. Delegation Alignment
75
93
76
-
Cross-reference `delegations[]` against the output style delegation table:
94
+
**If `delegation-metadata` notes exist on items**, cross-reference against the delegation table:
77
95
78
96
| Task type | Expected model |
79
97
|-----------|---------------|
@@ -82,27 +100,28 @@ Cross-reference `delegations[]` against the output style delegation table:
body: "<Step 4 trend analysis: new trends, reinforced trends, proposals>"
182
201
}
183
202
])
184
203
```
@@ -202,7 +221,6 @@ Read `memory/retrospectives.md` from the auto memory directory. Update each sect
202
221
-**Schema Effectiveness:** Add or update entries from dimension 3a findings. Format: `- <schema-note-key>: <observation>. Sessions: N. Last seen: YYYY-MM-DD`
203
222
-**Delegation Patterns:** Add or update from dimension 3b. Format: `- <pattern>. Sessions: N. Last seen: YYYY-MM-DD`
204
223
-**Note Quality:** Add or update from dimension 3c. Format: `- <note-key>: <observation>. Sessions: N. Last seen: YYYY-MM-DD`
205
-
-**Extension Candidates:** Add entries from `manifest.extensions[]` that appeared in this run. Format: `- <key>: <value pattern>. Sessions: N. Promoted: no`
206
224
-**Improvement Proposals:** Add new proposal references if created in step 7.
207
225
208
226
Write the updated file.
@@ -243,14 +261,6 @@ The proposal should include a **concrete suggestion** — not just "this is a pr
243
261
- Output style adjustments: specify the zone and content
244
262
- Hook additions: specify the event, matcher, and purpose
245
263
246
-
### 7c. Extension promotions
247
-
248
-
If any `extensions[]` keys from the trend memory have `Sessions >= 2`:
249
-
- Create a proposal item with the proposed JSON schema addition (field name, type, enum values if applicable)
250
-
- Note which runs used the extension and what values they recorded
251
-
252
-
Update the Extension Candidates section in trend memory: set `Promoted: yes` for graduated entries.
| <key> | <typical value> | N | promote to core / keep observing |
321
325
```
322
326
323
-
**Conditional prefixes:**
327
+
**Conditional prefix:**
324
328
- Dry-run: `**Dry run** — no items created, no memory updated.`
325
-
- Fallback: `**Fallback mode** — no run manifest found. Analysis based on MCP state queries.`
326
329
327
-
Omit sections with no data (e.g., no extension promotions → omit that table).
330
+
Omit sections with no data (e.g., no improvement proposals -> omit that table). If `delegation-metadata` notes were present, include a delegations count in the header line.
328
331
329
332
---
330
333
331
334
## Troubleshooting
332
335
333
-
**No manifest found**
334
-
- Cause: Implementation run did not maintain a run manifest (output style not active, or short session)
335
-
- Solution: Skill falls back to MCP queries. Less precise but functional. The report notes fallback mode.
336
+
**No session-tracking notes found**
337
+
- Cause: Implementing agents did not fill their `session-tracking` notes. This happens when items have no matching note schema (schema-free items skip gate enforcement).
338
+
- Solution: Check `.taskorchestrator/config.yaml` for a `default` schema that includes `session-tracking` as a required note. Adding it ensures agents are prompted to fill tracking data.
336
339
337
340
**Schema not recognized (`expectedNotes` empty)**
338
341
- Cause: `session-retrospective` tag not in `.taskorchestrator/config.yaml`, or MCP not reconnected after config edit
Copy file name to clipboardExpand all lines: claude-plugins/task-orchestrator/output-styles/workflow-orchestrator.md
+7-69Lines changed: 7 additions & 69 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,80 +62,18 @@ Every delegation prompt must include: entity IDs, exact tool operations, expecte
62
62
63
63
Session tasks are ephemeral — they exist for the current session only. Do NOT use them for items that need to persist across sessions.
64
64
65
-
## Implementation Run Manifest
66
-
67
-
During any implementation run (triggered by `/implement` or `post-plan-workflow`), maintain a structured run manifest as a **session task** using `TaskCreate`/`TaskUpdate`. This provides durable in-session storage that survives context compaction.
68
-
69
-
**Lifecycle:**
70
-
1. At run start, `TaskCreate` a session task named `run-manifest:<root-item-short-id>` with the initial JSON
71
-
2. After each delegation return, `TaskUpdate` to append to `delegations[]`
72
-
3. After each schema interaction (note fill, gate failure), `TaskUpdate` to append to `schemaInteractions[]`
73
-
4. After each observation logged, `TaskUpdate` to append the UUID to `observations[]`
74
-
5. When friction is encountered, `TaskUpdate` to append to `friction[]`
75
-
6. For data worth tracking that does not fit core fields, append to `extensions[]` with a reason
-`model` and `rationale` use closed enums. Unknown rationales go in `extensions[]`.
126
-
-`selfImplemented: true` when the orchestrator implements directly instead of delegating.
127
-
- The manifest is consumed by `/session-retrospective` — do not display it to the user directly.
128
-
- If no implementation run is active, do not create a manifest.
67
+
After dispatching a subagent and receiving its return, optionally record delegation context on the work item via `manage_notes(operation="upsert")`:
129
68
130
-
## Retrospective Nudge
69
+
-**key:**`delegation-metadata`, **role:**`work`
70
+
-**body:** Model used, isolation mode, rationale, outcome
131
71
132
-
When **any** item that was part of an`/implement` run reaches terminal — whether via `advance_item`, `complete_tree`, or auto-cascade — check if the run is complete:
72
+
This is orchestrator-side data that agents cannot self-report. The`/session-retrospective` skill uses it for delegation alignment analysis when present.
133
73
134
-
-**Single-item run:** The item reaching terminal = run complete.
135
-
-**Multi-item run (manifest exists):** All items in `scope.preExistingItems` are terminal = run complete.
136
-
-**No manifest fallback:** 3+ items transition to terminal during a session = likely run complete.
74
+
## Retrospective Nudge
137
75
138
-
When the run is complete, append a one-line suggestion:
76
+
When items reach terminal after an implementation run — whether via `advance_item`, `complete_tree`, or auto-cascade — suggest running `/session-retrospective` to capture learnings.
139
77
140
78
```
141
79
↳ Implementation run complete. Consider running `/session-retrospective` to capture learnings.
0 commit comments