Skip to content

Add a new recap type 'fix' for when an issue identified in code review is fixed#961

Merged
acreeger merged 5 commits intomainfrom
feat/issue-960
Mar 23, 2026
Merged

Add a new recap type 'fix' for when an issue identified in code review is fixed#961
acreeger merged 5 commits intomainfrom
feat/issue-960

Conversation

@acreeger
Copy link
Copy Markdown
Collaborator

Fixes #960

Add a new recap type 'fix' for when an issue identified in code review is fixed


This PR was created automatically by iloom.

@acreeger
Copy link
Copy Markdown
Collaborator Author

acreeger commented Mar 23, 2026

Enhancement Analysis - Issue #960

  • Fetch issue details
  • Read project documentation (CLAUDE.md, README.md)
  • Research recap system context
  • Formulate questions and structured analysis
  • Post final enhancement specification

Enhancement Analysis

Questions for Reporter

Question Answer
Should the 'fix' type only be logged by agents automatically (e.g., the implementer after addressing review feedback), or should it also be available for manual use via the recap MCP tools during interactive sessions? @acreeger Assumed: available to all agents and interactive sessions, same as existing entry types.
Is there a specific visual treatment expected in the VS Code recap panel for 'fix' entries (e.g., a distinct icon or color), or should it follow the same display pattern as other entry types? Assumed: distinct visual treatment (icon/color) to differentiate fixes from insights/decisions, but specific design is left to implementation.
Should the deduplication logic for 'fix' entries work the same as other entry types (skip if same type+content already exists)? Assumed: yes, same deduplication behavior as all other entry types.

Problem Summary
The recap system currently supports five entry types (decision, insight, risk, assumption, other) but has no dedicated type for tracking when code review feedback has been addressed. When an agent fixes an issue raised during code review, there is no structured way to record that action in the recap panel.

User Impact
Reviewers and developers lose visibility into which code review issues have been resolved during a session, making it harder to track review progress in the VS Code recap panel.

Enhancement Goal
Add a new 'fix' recap entry type so that when an agent (or user) addresses feedback from code review, the fix can be logged as a distinct, trackable entry in the recap system. This gives reviewers clear visibility into what was addressed and when.

Next Steps

  • Reporter to confirm or adjust answers to questions above
  • Technical analysis to identify all touchpoints (type definitions, MCP server schema, VS Code extension, agent prompts)
  • Implementation planning and execution

Complete Context and Details (click to expand)

Current System State

  • Recap entry types are defined as a TypeScript union: 'decision' | 'insight' | 'risk' | 'assumption' | 'other' in src/mcp/recap-types.ts
  • The MCP recap server (src/mcp/recap-server.ts) exposes an add_entry tool that accepts these types via a Zod schema
  • Entries are displayed in the VS Code extension's recap sidebar panel
  • Deduplication prevents duplicate entries with the same type+content combination
  • The add_entry tool is available to all execution contexts (regular, swarm child, swarm orchestrator)

Scope of Change
This enhancement touches the recap entry type system. At minimum, the following areas need consideration:

  • Type definition (RecapEntryType union)
  • MCP server input validation schema
  • VS Code extension display logic (if it has type-specific rendering)
  • Agent prompt instructions (so agents know when/how to use the 'fix' type)
  • Documentation updates for the recap system

Relationship to Code Review Workflow
The 'fix' type bridges the gap between code review feedback and implementation response. Currently, when a reviewer identifies issues and the implementer addresses them, the only record is in commit messages or follow-up comments. A 'fix' entry in the recap panel creates a structured, scannable record of review resolutions.

@acreeger
Copy link
Copy Markdown
Collaborator Author

acreeger commented Mar 23, 2026

Analysis Phase - Issue #960

  • Fetch issue details
  • Research recap type system (types, MCP server schema, VS Code extension)
  • Trace all consumers of RecapEntryType
  • Research agent prompts that reference recap types
  • Map cross-cutting data flow for the new 'fix' type
  • Document findings

Executive Summary

Adding 'fix' to the RecapEntryType union is a cross-cutting change that touches 3 code layers (type definition, Zod schema validation x2, output schema validation x1) and 12 documentation/prompt files that enumerate valid entry types. The formatter and CLI rendering are generic and require no changes. The VS Code extension that renders the recap sidebar panel is in a separate repository and may need its own update for type-specific icons/colors.

Impact Summary

  • 3 lines of TypeScript code changes (type union + 2 Zod enum arrays + 1 output schema Zod enum)
  • 12 template/prompt/agent files with documentation listing valid entry types
  • 1 CLAUDE.md file (src/mcp/CLAUDE.md) referencing recap entry types in prose
  • 0 formatter/CLI changes needed (rendering is type-agnostic)
  • 0 test logic changes needed for existing tests (tests use specific types like 'decision', 'insight' -- the new type does not break them). New test coverage for the 'fix' type should be added.

Complete Technical Reference (click to expand for implementation details)

Problem Space Research

Problem Understanding

During code review (both manual and automated via iloom-code-reviewer), issues are identified and then fixed. Currently there is no dedicated recap entry type to track that a review-identified issue was addressed. Agents use 'insight' or 'decision' as workarounds, but these don't semantically convey "this was a fix for a review finding." A 'fix' type provides explicit traceability from review finding to resolution.

Architectural Context

The recap system is a structured knowledge capture mechanism that persists to JSON files in ~/.config/iloom-ai/recaps/. It consists of:

  1. Type definitions (recap-types.ts) -- TypeScript types
  2. MCP server (recap-server.ts) -- runtime validation via Zod schemas
  3. Agent prompts -- documentation telling agents what types are available
  4. Formatter (recap-formatter.ts) -- renders entries to markdown
  5. VS Code extension (external repo) -- renders entries in sidebar panel

Edge Cases Identified

  • Backward compatibility: Existing recap JSON files will never contain 'fix' entries, so no migration needed. New 'fix' entries in files read by older code will fail Zod validation if the older code has strict enum checks on read -- but get_recap's output schema (line 363) validates the entries, so an older server reading a file with 'fix' entries would reject them. This is only a concern if users downgrade.
  • VS Code extension: The extension reads recap JSON files directly. If it has hardcoded type lists or type-specific rendering, it will need a parallel update. This should be verified separately.

Codebase Research Findings

Affected Area: RecapEntryType definition

Entry Point: src/mcp/recap-types.ts:10
Current value: 'decision' | 'insight' | 'risk' | 'assumption' | 'other'

Affected Area: Zod schema validation in MCP server

Location 1: src/mcp/recap-server.ts:237 -- add_entry input schema

z.enum(['decision', 'insight', 'risk', 'assumption', 'other'])

Location 2: src/mcp/recap-server.ts:363 -- get_recap output schema (entries array type validation)

type: z.enum(['decision', 'insight', 'risk', 'assumption', 'other']),

Affected Area: Agent prompts that list valid types

These files contain inline documentation like "type (decision/insight/risk/assumption)" that agents read to know which types are valid. All need fix added:

  1. templates/prompts/issue-prompt.txt:71 -- "Call with type (decision/insight/risk/assumption)"
  2. templates/prompts/regular-prompt.txt:45 -- same pattern
  3. templates/prompts/pr-prompt.txt:45 -- same pattern
  4. templates/prompts/swarm-orchestrator-prompt.txt:26 -- same pattern
  5. templates/prompts/issue-prompt.txt:1416 -- "capture decisions, risks, insights, or assumptions"
  6. templates/prompts/regular-prompt.txt:803 -- same pattern
  7. templates/prompts/pr-prompt.txt:202 -- same pattern

Affected Area: Agent markdown files that reference recap types

  1. templates/agents/iloom-issue-analyzer.md:46 -- "Log with type: insight or risk"
  2. templates/agents/iloom-issue-complexity-evaluator.md:48 -- "Log with type: insight, risk, or assumption"
  3. templates/agents/iloom-issue-planner.md:43 -- "Log with type: decision or assumption"
  4. templates/agents/iloom-issue-enhancer.md:48 -- "Log with type: insight, risk, or assumption"
  5. templates/agents/iloom-issue-analyze-and-plan.md:43 -- "Log with appropriate type"
  6. templates/agents/iloom-code-reviewer.md:20 -- Lists risk, insight, decision -- this is the most relevant agent for fix type usage

Unaffected Areas (no changes needed)

  • src/utils/recap-formatter.ts:42 -- Uses entry.type generically: **[${entry.type}]**. Any new type renders automatically.
  • src/commands/recap.ts -- Reads and passes through recap data without type-specific logic.
  • src/utils/mcp.ts -- Only generates MCP server config, doesn't reference entry types.
  • Existing tests in src/mcp/recap-server.test.ts and src/utils/recap-formatter.test.ts -- use specific existing types and will not break.

CLAUDE.md Documentation

  • src/mcp/CLAUDE.md:21 -- Describes recap as "decisions, insights, risks, artifacts" in prose. Should include "fixes" for accuracy.

Architectural Flow Analysis

Data Flow: RecapEntryType 'fix'

Entry Point: Agent calls recap.add_entry({ type: 'fix', content: '...' })
Flow Path:

  1. src/mcp/recap-server.ts:237 -- Zod validates type against enum in add_entry input schema
  2. src/mcp/recap-server.ts:264-268 -- Creates RecapEntry object with type from recap-types.ts:32
  3. src/mcp/recap-server.ts:270-271 -- Writes to recap JSON file
  4. src/mcp/recap-server.ts:363 -- When get_recap is called, Zod validates type in output schema
  5. src/commands/recap.ts:64 -- CLI reads entries from file (no validation, pass-through)
  6. src/utils/recap-formatter.ts:42 -- Renders **[fix]** in markdown output (generic)

Affected Interfaces (ALL must be updated):

  • RecapEntryType at src/mcp/recap-types.ts:10 -- Add 'fix' to union
  • add_entry inputSchema at src/mcp/recap-server.ts:237 -- Add 'fix' to Zod enum
  • get_recap outputSchema entries type at src/mcp/recap-server.ts:363 -- Add 'fix' to Zod enum

Critical Implementation Note: The TypeScript type and Zod enums are independent -- updating one does not update the other. All three must be updated atomically.

Affected Files

Code changes (3 locations in 2 files):

  • src/mcp/recap-types.ts:10 -- Add 'fix' to RecapEntryType union
  • src/mcp/recap-server.ts:237 -- Add 'fix' to add_entry Zod enum
  • src/mcp/recap-server.ts:363 -- Add 'fix' to get_recap output Zod enum

Prompt/agent documentation changes (12 files):

  • templates/prompts/issue-prompt.txt:71 -- Add fix to type list
  • templates/prompts/issue-prompt.txt:1416 -- Add fixes to prose list
  • templates/prompts/regular-prompt.txt:45 -- Add fix to type list
  • templates/prompts/regular-prompt.txt:803 -- Add fixes to prose list
  • templates/prompts/pr-prompt.txt:45 -- Add fix to type list
  • templates/prompts/pr-prompt.txt:202 -- Add fixes to prose list
  • templates/prompts/swarm-orchestrator-prompt.txt:26 -- Add fix to type list
  • templates/agents/iloom-issue-analyzer.md:46 -- Consider adding fix to type list
  • templates/agents/iloom-issue-complexity-evaluator.md:48 -- Consider adding fix to type list
  • templates/agents/iloom-issue-planner.md:43 -- Consider adding fix to type list
  • templates/agents/iloom-issue-enhancer.md:48 -- Consider adding fix to type list
  • templates/agents/iloom-code-reviewer.md:20 -- Add fix to type list (most relevant agent)
  • templates/agents/iloom-issue-analyze-and-plan.md:43 -- Consider adding fix to type list

CLAUDE.md documentation:

  • src/mcp/CLAUDE.md:21 -- Update prose to include "fixes"

Tests to add:

  • src/mcp/recap-server.test.ts -- Add test case using 'fix' type in deduplication tests

@acreeger
Copy link
Copy Markdown
Collaborator Author

acreeger commented Mar 23, 2026

Implementation Plan for Issue #960

Summary

Add a new 'fix' recap entry type to the existing RecapEntryType union so agents can log when a code review issue has been addressed. This is a cross-cutting change touching the TypeScript type definition, two Zod validation schemas, and 13 documentation/prompt files that enumerate valid entry types.

Questions and Key Decisions

Question Answer Rationale
Should agent-specific type lists only include fix for agents that semantically use it? Yes -- only add fix to agents where it makes sense (reviewer, implementer prompts) Agents like analyzer and complexity-evaluator run before code review exists, so listing fix there would be misleading
Should session-summary-prompt.txt be updated? Yes -- it enumerates recap types in prose at lines 31-34 and 148 The session summary prompt needs to know about fix entries so it can incorporate them into summaries
Should iloom-issue-implementer.md get guidance on fix? Yes -- add recap entry type guidance to the implementer The implementer is the agent that actually fixes review issues, so it needs to know to log fix entries

High-Level Execution Phases

  1. Core type and schema updates: Update RecapEntryType union and both Zod enum arrays (3 code locations in 2 files)
  2. Prompt documentation updates: Add fix to all prompt files that enumerate recap entry types (4 prompt files, 7 locations)
  3. Agent documentation updates: Add fix to agent markdown files that list valid entry types (6 agent files, 6 locations)
  4. CLAUDE.md documentation: Update src/mcp/CLAUDE.md prose (1 file)
  5. Test coverage: Add test case for 'fix' type in recap-server.test.ts (1 file)
  6. Build verification: Run pnpm build to confirm TypeScript compiles

Quick Stats

  • 0 files for deletion
  • 2 source files to modify (recap-types.ts, recap-server.ts)
  • 0 new files to create
  • 11 template/documentation files to modify
  • 1 test file to modify
  • Dependencies: None
  • Estimated complexity: Simple

Complete Implementation Guide (click to expand for step-by-step details)

Automated Test Cases to Create

Test File: src/mcp/recap-server.test.ts (MODIFY)

Purpose: Verify that the 'fix' type works correctly with the deduplication logic, same as all other types.

// Add inside the 'when adding a new entry with unique type and content' describe block (after line 93):
it('should create a new fix entry and return skipped: false', async () => {
  // Call addEntryWithDeduplication with type 'fix' and content about addressing a review issue
  // Assert: skipped is false, entry is added to mockRecapFile.entries
})

Files to Modify

1. src/mcp/recap-types.ts:10

Change: Add 'fix' to the RecapEntryType union type.

Current: 'decision' | 'insight' | 'risk' | 'assumption' | 'other'
New: 'decision' | 'insight' | 'risk' | 'assumption' | 'fix' | 'other'

Also update the JSDoc comment at line 6 to mention "fixes" in the list.

2. src/mcp/recap-server.ts:237

Change: Add 'fix' to the add_entry input schema Zod enum.

Current: z.enum(['decision', 'insight', 'risk', 'assumption', 'other'])
New: z.enum(['decision', 'insight', 'risk', 'assumption', 'fix', 'other'])

3. src/mcp/recap-server.ts:363

Change: Add 'fix' to the get_recap output schema Zod enum.

Current: z.enum(['decision', 'insight', 'risk', 'assumption', 'other'])
New: z.enum(['decision', 'insight', 'risk', 'assumption', 'fix', 'other'])

4. templates/prompts/issue-prompt.txt:71

Change: Add fix to the type list in parentheses.

Current: Call with type (decision/insight/risk/assumption)
New: Call with type (decision/insight/risk/assumption/fix)

5. templates/prompts/issue-prompt.txt:1416

Change: Add fixes to the prose list.

Current: capture decisions, risks, insights, or assumptions
New: capture decisions, risks, insights, fixes, or assumptions

6. templates/prompts/regular-prompt.txt:45

Change: Add fix to the type list in parentheses.

Current: Call with type (decision/insight/risk/assumption)
New: Call with type (decision/insight/risk/assumption/fix)

7. templates/prompts/regular-prompt.txt:803

Change: Add fixes to the prose list.

Current: capture decisions, risks, insights, or assumptions
New: capture decisions, risks, insights, fixes, or assumptions

8. templates/prompts/pr-prompt.txt:45

Change: Add fix to the type list in parentheses.

Current: Call with type (decision/insight/risk/assumption)
New: Call with type (decision/insight/risk/assumption/fix)

9. templates/prompts/pr-prompt.txt:202

Change: Add fixes to the prose list.

Current: capture decisions, risks, insights, or assumptions
New: capture decisions, risks, insights, fixes, or assumptions

10. templates/prompts/swarm-orchestrator-prompt.txt:26

Change: Add fix to the type list in parentheses.

Current: Call with type (decision/insight/risk/assumption)
New: Call with type (decision/insight/risk/assumption/fix)

11. templates/prompts/session-summary-prompt.txt:31-34

Change: Add a Fixes bullet to the recap type descriptions list.

Add after line 34 (after the Assumptions bullet):

- **Fixes**: Code review issues that were identified and resolved

12. templates/prompts/session-summary-prompt.txt:148

Change: Add fixes to the prose enumeration in the validation checklist.

Current: decisions, insights, risks, and assumptions
New: decisions, insights, risks, fixes, and assumptions

13. templates/agents/iloom-issue-analyzer.md:46

Change: No change needed -- analyzer runs before code review, fix type is not relevant here.

14. templates/agents/iloom-issue-complexity-evaluator.md:48

Change: No change needed -- complexity evaluator runs before code review, fix type is not relevant here.

15. templates/agents/iloom-issue-planner.md:43

Change: No change needed -- planner runs before code review, fix type is not relevant here.

16. templates/agents/iloom-issue-enhancer.md:48

Change: No change needed -- enhancer runs before code review, fix type is not relevant here.

17. templates/agents/iloom-code-reviewer.md:20

Change: Add fix to the guidance about recap entry types. This is the most relevant agent because it's the one that identifies issues that agents then fix.

Current line 20: For each critical finding (95-100 confidence), add a 'risk' entry. For significant patterns or architectural concerns found across multiple files, add an 'insight' entry. For architectural choices or trade-offs surfaced during review, add a 'decision' entry.

Append to line 20: When a review finding is addressed in a subsequent implementation pass, the implementer should log a 'fix' entry describing what was resolved.

18. templates/agents/iloom-issue-analyze-and-plan.md:43

Change: No change needed -- uses generic phrasing "Log with appropriate type" which automatically covers any new type added to the schema.

19. templates/agents/iloom-issue-implementer.md

Change: Add guidance about using fix type after addressing code review issues. Currently the implementer has no add_entry type guidance. Add after line 44 (after the artifact logging paragraph):

- When addressing issues identified during code review, use `recap.add_entry` with type `fix` to log what was resolved (e.g., "Fixed null check in auth handler per review feedback").

20. src/mcp/CLAUDE.md:21

Change: Add "fixes" to the prose description.

Current: structured knowledge capture (decisions, insights, risks, artifacts)
New: structured knowledge capture (decisions, insights, risks, fixes, artifacts)

21. src/mcp/recap-server.test.ts (after line 93)

Change: Add a test case for the 'fix' type inside the existing 'when adding a new entry with unique type and content' describe block.

it('should create a new fix entry and return skipped: false', async () => {
    const result = await addEntryWithDeduplication(
        readRecapMock,
        writeRecapMock,
        'fix',
        'Fixed null check in auth handler per review feedback'
    )
    expect(result.skipped).toBe(false)
    expect(result.id).toBe('test-uuid-123')
    expect(mockRecapFile.entries).toHaveLength(1)
    expect(mockRecapFile.entries?.[0]).toMatchObject({
        type: 'fix',
        content: 'Fixed null check in auth handler per review feedback',
    })
})

Detailed Execution Order

Phase 1 (parallel): Core Changes + Documentation + Tests

All files being modified are independent (different files), so everything can run in parallel.

Step 1a: Core Type and Schema Updates

Files: src/mcp/recap-types.ts, src/mcp/recap-server.ts

  1. Add 'fix' to RecapEntryType union at recap-types.ts:10 -- Verify: TypeScript type includes 6 values
  2. Update JSDoc comment at recap-types.ts:6 to mention fixes
  3. Add 'fix' to Zod enum at recap-server.ts:237 -- Verify: add_entry input schema accepts 'fix'
  4. Add 'fix' to Zod enum at recap-server.ts:363 -- Verify: get_recap output schema includes 'fix'

Step 1b: Prompt Template Updates

Files: templates/prompts/issue-prompt.txt, templates/prompts/regular-prompt.txt, templates/prompts/pr-prompt.txt, templates/prompts/swarm-orchestrator-prompt.txt, templates/prompts/session-summary-prompt.txt

  1. Update issue-prompt.txt:71 -- add fix to parenthesized type list
  2. Update issue-prompt.txt:1416 -- add fixes to prose list
  3. Update regular-prompt.txt:45 -- add fix to parenthesized type list
  4. Update regular-prompt.txt:803 -- add fixes to prose list
  5. Update pr-prompt.txt:45 -- add fix to parenthesized type list
  6. Update pr-prompt.txt:202 -- add fixes to prose list
  7. Update swarm-orchestrator-prompt.txt:26 -- add fix to parenthesized type list
  8. Update session-summary-prompt.txt:34 -- add Fixes bullet after Assumptions
  9. Update session-summary-prompt.txt:148 -- add fixes to prose validation checklist

Step 1c: Agent Documentation Updates

Files: templates/agents/iloom-code-reviewer.md, templates/agents/iloom-issue-implementer.md

  1. Update iloom-code-reviewer.md:20 -- append guidance about fix entries
  2. Update iloom-issue-implementer.md after line 44 -- add fix type guidance for post-review implementation

Step 1d: CLAUDE.md + Test Updates

Files: src/mcp/CLAUDE.md, src/mcp/recap-server.test.ts

  1. Update src/mcp/CLAUDE.md:21 -- add "fixes" to prose
  2. Add test case for 'fix' type in recap-server.test.ts after line 93

Phase 2 (sequential): Build and Test Verification

Step 2: Build and Test

Files: None (verification only)

  1. Run pnpm build -- Verify: TypeScript compiles without errors
  2. Run pnpm test src/mcp/recap-server.test.ts -- Verify: new test passes
  3. Run pnpm test src/utils/recap-formatter.test.ts -- Verify: existing tests still pass

Execution Plan

  1. Run Steps 1a, 1b, 1c, 1d in parallel (all modify different files, no dependencies between them)
  2. Run Step 2 (sequential -- build + test verification depends on all code changes being complete)

Dependencies and Configuration

None

@acreeger
Copy link
Copy Markdown
Collaborator Author

acreeger commented Mar 23, 2026

Implementation Complete

Summary

Added a new recap entry type fix for tracking when code review findings are resolved. This enables the recap panel to distinguish between decisions, insights, risks, assumptions, and fixes — giving users clear visibility into what was addressed during review iterations.

Changes Made

  • src/mcp/recap-types.ts: Added 'fix' to RecapEntryType union type
  • src/mcp/recap-server.ts: Added 'fix' to both Zod enum validations (add_entry input + get_recap output)
  • src/mcp/recap-server.test.ts: Added test case verifying 'fix' type is accepted
  • src/mcp/CLAUDE.md: Updated documentation to mention fixes
  • templates/prompts/issue-prompt.txt: Added fix type to recap references (2 locations)
  • templates/prompts/regular-prompt.txt: Added fix type to recap references (2 locations)
  • templates/prompts/pr-prompt.txt: Added fix type to recap references (2 locations)
  • templates/prompts/swarm-orchestrator-prompt.txt: Added fix type to recap reference
  • templates/prompts/session-summary-prompt.txt: Added Fixes bullet + validation checklist entry
  • templates/agents/iloom-code-reviewer.md: Added guidance for implementers to log fix entries
  • templates/agents/iloom-issue-implementer.md: Added instruction to use fix type when addressing review feedback

Validation Results

  • ✅ Tests: 4988 passed / 4989 total (1 skipped)
  • ✅ Build: Passed
  • ✅ All 11 files modified across 2 core code files, 5 prompt templates, 2 agent docs, 1 test file, and 1 CLAUDE.md

acreeger and others added 5 commits March 22, 2026 23:18
Add a new recap entry type 'fix' so agents can log when code review
findings are addressed. Updated across type definitions, Zod schemas,
all prompt templates, agent docs, and tests.

Closes #960

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The code reviewer doesn't implement fixes — only the implementer does.
Move fix entry guidance to where it belongs (already in implementer).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The orchestrator decides what review findings get fixed and sometimes
handles simple fixes directly. Add fix type description to orchestrator
prompt recap lists and explicitly tell implementer not to log fix entries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add instructions to log fix recap entries at all four places where
review findings get addressed: one-shot mode, interactive mode, swarm
child, and post-swarm review. Also explicitly tell implementer not to
log fix entries since the orchestrator owns that.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@acreeger acreeger marked this pull request as ready for review March 23, 2026 03:18
@acreeger
Copy link
Copy Markdown
Collaborator Author

iloom Session Summary

Key Themes:

  • Adding a new recap type is a cross-cutting change touching type definitions, Zod schemas, and a wide surface area of agent prompt templates.
  • recap-formatter.ts renders entry types generically, so UI changes are never needed when adding new types — the JSON schema and prompts are the only real surface.
  • fix entry ownership belongs to the orchestrator (not the implementer) because the orchestrator decides what gets fixed and sometimes handles simple fixes directly.

Session Details (click to expand)

Key Insights

  • RecapEntryType in recap-types.ts:10 is a TypeScript union, but it's independently duplicated as Zod enums in recap-server.ts at lines 237 (input schema) and 363 (output schema). These three definitions must always be kept in sync manually — there is no single source of truth deriving all three.
  • recap-formatter.ts:42 renders entry types as **[${entry.type}]** generically, so any new type displays correctly in the VS Code panel without formatter changes.
  • The VS Code sidebar extension watches the recap JSON file directly and may have type-specific rendering (icons, colors) in a separate codebase not in this repo — worth checking if visual differentiation for fix entries is desired.
  • Adding a new recap type requires updates across 3 layers: (1) TypeScript type union, (2) Zod schema enums, (3) all prompt templates and agent markdown files that enumerate valid types by name.
  • session-summary-prompt.txt enumerates recap types in two places: a descriptions block (~line 31) and a validation checklist (~line 148). Both need updating when types are added.

Decisions Made

  • fix entries are owned by the orchestrator, not the implementer. The orchestrator sees the full set of review findings and decides what gets fixed (and may fix simple issues directly). The implementer is explicitly instructed not to log fix entries to prevent duplicates.
  • fix logging guidance was added at all four fix points: one-shot auto-fix mode, interactive mode (after user confirms), swarm child worker auto-fix, and swarm orchestrator post-swarm review fix agent.
  • Code reviewer does not log fix entries. The reviewer identifies findings; logging that a finding was resolved is the orchestrator's job after it acts on the review.
  • Agents using generic phrasing like "log with appropriate type" don't need changes — the MCP schema update makes fix available automatically. Only templates that enumerate specific type names by hand needed updating.

Challenges Resolved

  • Initial implementation added fix guidance to the code reviewer agent, but the reviewer never implements fixes — removing it and placing it only in the orchestrator flow was the correct boundary.
  • The implementer agent had overly restrictive guidance ("only use add_artifact for comments you create") that was inadvertently added during the fix-ownership cleanup — removed since the implementer also logs PRs and issues as artifacts.

Lessons Learned

  • When adding a recap type, audit for hardcoded type lists in: recap-types.ts, both Zod enums in recap-server.ts, all five prompt templates (issue-prompt.txt, regular-prompt.txt, pr-prompt.txt, swarm-orchestrator-prompt.txt, session-summary-prompt.txt), and relevant agent markdown files. Missing any one of these causes silent inconsistencies.
  • Source comments in recap-server.ts and src/utils/mcp.ts both contain prose descriptions of the supported entry types — easy to forget when expanding the type list.

Generated with 🤖❤️ by iloom.ai

@acreeger acreeger merged commit 544aac4 into main Mar 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add a new recap type 'fix' for when an issue identified in code review is fixed

1 participant