Skip to content

feat(insights): delivery metrics — first-try rate, fix rounds, time to merge - #272

Merged
hoangsnowy merged 1 commit into
mainfrom
feat/delivery-metrics
Oct 23, 2026
Merged

hoangsnowy merged 1 commit into
mainfrom
feat/delivery-metrics

Conversation

@hoangsnowy

Copy link
Copy Markdown
Owner

Summary

Self-improvement starts with measurement ("metrics first"): is the AI team getting better?

  • Tasks record FixRounds (each change sent back to the Coding agent: checks, conflicts, review, acceptance, Orchestrator retry, or a person's Ask for changes) and MergedAtUtc (stamped when every change merged). EF migration AddDeliveryMetrics (Sessions module) — two columns.
  • ISessionRepository.GetDeliveryForTenantAsync → DeliverySummary (merged, first-try, avg fix rounds, median hours to merge, stuck now), tenant-explicit.
  • Insights › Delivery: Tasks merged · Passed first try · Avg fix rounds · Median time to merge · Waiting for you.

Test plan

  • DeliveryMetricsTests: summary maths (median, first-try, average), repository counts rounds + stamps merge + excludes other tenants, duration wording.
  • Full suite green (1617).
  • Standalone Web: Delivery panel renders (screenshot).
  • Lab (real data): after the next merges, Delivery shows real values.
  • Claude Design: push the Delivery panel (/design-sync).

🤖 Generated with Claude Code

https://claude.ai/code/session_018WAdQ7Rm24xss5QDSvXtJB

…o merge

Step one of "self-improving": measure whether the AI team gets better. Each task now records its fix rounds (every
change sent back to the Coding agent — red checks, conflicts, review, acceptance, Orchestrator retries or a person's
"Ask for changes") and when its last change merged (migration AddDeliveryMetrics in the Sessions module).
Insights › Delivery shows tasks merged, passed first try (no change sent back), average fix rounds, median time from
task start to merge, and what is waiting for a person — tenant-scoped, for the selected range.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WAdQ7Rm24xss5QDSvXtJB
@hoangsnowy
hoangsnowy merged commit 0a93ed3 into main Oct 23, 2026
4 checks passed
hoangsnowy added a commit that referenced this pull request Oct 23, 2026
…ces every agent follows

Self-improvement, step two. After a ticket merges (MAF workflow or step by step), the Retrospective agent runs in the
background on the member's computer: it reads the project's raw lessons (reviews, failing checks, failed acceptance)
next to its current practices and returns the project's practices — at most 15 short, actionable, project-specific
sentences — plus the lessons they now cover.

- Knowledge graph: MemoryKinds.Practice (content-keyed), IMemoryStore.ListAsync(kind), ProjectMemory.PracticesBlock.
- Readers: the Coding agent gets the practices before the closest lessons; the Reviewer checks the change against
  them (breaking one is a must-fix finding).
- Guardrails (RetrospectiveService): once per project every 10 minutes, one at a time; pinned practices and lessons
  are never removed; only lessons the agent was shown can be cleared; an empty or failed answer changes nothing.
  The run is recorded in Insights; the Autopilot log says what changed.
- Board › Knowledge: a Practices panel (pin to keep word for word, forget) above the lessons.
- Insights › Delivery (#272) shows whether first-try passes go up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WAdQ7Rm24xss5QDSvXtJB
hoangsnowy added a commit that referenced this pull request Oct 23, 2026
…ces every agent follows (#273)

Self-improvement, step two. After a ticket merges (MAF workflow or step by step), the Retrospective agent runs in the
background on the member's computer: it reads the project's raw lessons (reviews, failing checks, failed acceptance)
next to its current practices and returns the project's practices — at most 15 short, actionable, project-specific
sentences — plus the lessons they now cover.

- Knowledge graph: MemoryKinds.Practice (content-keyed), IMemoryStore.ListAsync(kind), ProjectMemory.PracticesBlock.
- Readers: the Coding agent gets the practices before the closest lessons; the Reviewer checks the change against
  them (breaking one is a must-fix finding).
- Guardrails (RetrospectiveService): once per project every 10 minutes, one at a time; pinned practices and lessons
  are never removed; only lessons the agent was shown can be cleared; an empty or failed answer changes nothing.
  The run is recorded in Insights; the Autopilot log says what changed.
- Board › Knowledge: a Practices panel (pin to keep word for word, forget) above the lessons.
- Insights › Delivery (#272) shows whether first-try passes go up.


Claude-Session: https://claude.ai/code/session_018WAdQ7Rm24xss5QDSvXtJB

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
hoangsnowy added a commit that referenced this pull request Oct 23, 2026
The agent-led retry count lived in memory, so every lab update gave a stuck task two more tries (seen on #42). It now
comes from the task's persisted FixRounds (#272 — every change sent back to the Coding agent, by anyone): the rules'
3 rounds plus the agent's 2, capped, so a restart grants nothing new.


Claude-Session: https://claude.ai/code/session_018WAdQ7Rm24xss5QDSvXtJB

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant