New Feature·Pushed May 1, 2026·L
Gitpulse gains AI-powered PR storytelling with category scoring
Commits analyzed by gitpulse now produce full TechCrunch-style editorial copy — with headlines, story body, category classification, and a fact-check flag — instead of plain summaries.
Gitpulse now generates richer editorial output when analyzing commits. Each analyzed commit produces a headline, a one-sentence standfirst, a full story with context and why-it-matters framing, and a digest sentence for email. Most notably, the system assigns multiple categories (feature, bugfix, refactor, etc.) with relative scores that sum to 100 — making it clear how much of a change is new functionality versus cleanup or dependency work. A fact-check flag and issue list help surface potential discrepancies between the AI's narrative and what the diff actually shows.
The underlying prompt and schema were ported directly from gitsky's PR-analysis service, but adapted to work with commit-only data. Future work will add real GraphQL PR fetching for merge commits. The analysis now supports two API protocols: OpenAI-compatible endpoints (the default) and Anthropic (for Claude or MiniMax via its Anthropic-compatible endpoint).
Technical description
This PR ports the gitsky PR-analysis pipeline into gitpulse, enabling AI-powered editorial output for commit analysis.
**The core change is in [[code ref=1]]action/src/llm.ts[[/code]].** The [[code]]createSummarizer[[/code]] factory now inspects [[code]]protocol[[/code]] ('openai' | 'anthropic') and instantiates [[code]]ChatOpenAI[[/code]] or [[code]]ChatAnthropic[[/code]] accordingly. The system prompt (TechCrunch journalist persona) and per-section user instructions were lifted verbatim from gitsky's changes.ts — this is the same prompt that produces editorial copy for gitsky's PR reviews.
**Schema and categories** are defined in [[code ref=2]]action/src/schemas.ts[[/code]]. The [[code]]ChangesNodeOutputSchema[[/code]] captures categories (with score + reason), headline, standfirst, story, digestSentence, codeReferences, factCheckIssues, technicalDescription, and imageDirection. Category scores must sum to 100 — this constraint is enforced at the Zod level and drives the categorization display on the site.
**Commit context adaptation** lives in [[code ref=3]]action/src/commit-context.ts[[/code]]. Since gitpulse v0 lacks GraphQL PR fetching (Phase 2.3 will add it), [[code]]formatCommitAsPRContext[[/code]] transforms raw commit metadata into gitsky's PR-context format so the existing prompts work without modification.
**MiniMax compatibility** requires [[code ref=4]]action/src/strip-schema.ts[[/code]] — MiniMax's tool-calling mode rejects min/max constraints in JSON schema, so those are stripped when the model name starts with 'minimax'.
**Workflow changes** add [[code]]ai-protocol[[/code]] as a selectable input in analyze.yml, and self-deploy.yml explicitly sets protocol=openai with MiniMax-M2.7 — matching production. Temperature was lowered from 0.7 to 0, matching gitsky's setting for more deterministic output.
**Site rendering** updates ensure the richer story fields display properly: category badge + commit ref in card bylines, category with scores on detail pages, and the technical description collapsed by default to avoid overwhelming casual readers.
Files at a glance:
- [[code]]action/src/llm.ts[[/code]] — AI model factory, prompts, post-processing
- [[code]]action/src/schemas.ts[[/code]] — Zod schema for AI output
- [[code]]action/src/categories.ts[[/code]] — 12-category taxonomy
- [[code]]action/src/commit-context.ts[[/code]] — commit-to-PR-context adapter
- [[code]]action/src/strip-schema.ts[[/code]] — MiniMax schema workaround
- [[code]]action/src/render.ts[[/code]] — maps AI output to Story type
- [[code]].github/workflows/analyze.yml[[/code]] — new ai-protocol input
- [[code]]site/src/app/stories/[id]/page.tsx[[/code]] — richer story display
Categories
- New Feature (70%) — Core change is adding AI-powered PR analysis with richer output (categories, headlines, stories, fact-checking)
- Maintenance (20%) — Code was ported verbatim from gitsky to gitpulse, adapting for commit-only context
- Configuration (10%) — Workflow inputs added (ai-protocol, temperature default changed)