Merge dev to main: friction report format improvements#1314
Merged
Conversation
…dy, opt-in label PRs #1305 + #1311 closed the recruit→fire loop. Looking at the 5 reports filed live in prod 2026-05-10 (Trello cascade + Linear mongrel): - Title slugs read `frictionlow-...` because `[Friction][severity]` put brackets adjacent with no separator. Category — the most useful triage signal — wasn't in the title at all. - Body had 5 sections including `## What happened` (just repeats the summary already in the title), `## Classification` (now-redundant category/severity + the useful-but-buried whileDoing), and `## Timestamp` (the PM provider's native createdAt already shows this). - No PM-side label, so operators couldn't filter friction cards even though the alert flow already established the cascade-alert opt-in pattern via spec 019. Agents are already writing structured prose in `details` voluntarily (what they tried, error, workaround, impact). The win is in rendering, not in tightening the gadget input. Changes: - src/friction/format.ts: - Title: `[Friction · ${category} · ${severity}] ${summary}` — one bracket pair, dot separators, all three classification facets surfaced. Slugifies as `friction-tooling-low-...`. - Body has only two sections: `## Details` (agent prose verbatim, first because it's the most worth reading) and `## Run context` (bold-keyed bullets — Run / Work item / PR / Project / While doing). Italic `_Reported {iso}_` footer. Lines for absent fields drop entirely; no `_not provided_` placeholders for conditional context. - Compact bullets mirror src/integrations/alerting/_shared/format.ts. - src/pm/config.ts: add `getFrictionLabelId(project)` mirroring the `getAlertLabelId` opt-in pattern from spec 019. Reads `labels['cascade-friction']` (Trello) / `labels.cascadeFriction` (JIRA, Linear). Returns undefined when unconfigured — current prod cascade & ucho behavior is preserved. - src/integrations/pm/{jira,linear}/config-schema.ts: extend Zod schemas with the optional `cascadeFriction` label key. - src/friction/materialize.ts: pass `[labelId]` to createWorkItem when configured, `[]` otherwise. Back-compat — projects without the label configured continue to file unlabeled cards exactly as before. Tests: - tests/unit/friction/format.test.ts: re-pin title + body invariants (only `## Details` + `## Run context` headings; no `## What happened` / `## Classification` / `## Timestamp`), Run-context bullet shape (run link, work item with monospaced id, PR with branch + 12-char SHA, project key/repo/pmType, whileDoing). Pin absence of prior bracket-concat title form as a regression net. - tests/unit/friction/materialize.test.ts: add label-applied paths for Trello + JIRA + a label-absent regression net pinning `labels: []`. - tests/unit/pm/config-friction-slot.test.ts: cover getFrictionLabelId across providers + Zod schema acceptance for `labels.cascadeFriction`. Hand-rendered against a prod-shaped fixture confirms the new title slug (`friction-tooling-low-pm-add-checklist-...`) and dense body shape. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…tion-report-format chore(friction): improve report format — surface category, compact body, opt-in label
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[Friction · category · severity] summary(clean slugs, all 3 facets surfaced); body collapsed to## Details+## Run context(bold-keyed bullets, run link first); optionalcascade-frictionlabel applied at materialize time when configured (mirrors spec-019 cascade-alert opt-in).Test plan
report-frictionand verify the new title/body shape on the rendered Trello/Linear cards.🤖 Generated with Claude Code