Skip to content

feat: Add release-notes-generator kit#205

Open
Mohdtalibakhtar wants to merge 3 commits into
Lamatic:mainfrom
Mohdtalibakhtar:feat/release-notes-generator
Open

feat: Add release-notes-generator kit#205
Mohdtalibakhtar wants to merge 3 commits into
Lamatic:mainfrom
Mohdtalibakhtar:feat/release-notes-generator

Conversation

@Mohdtalibakhtar

@Mohdtalibakhtar Mohdtalibakhtar commented Jul 10, 2026

Copy link
Copy Markdown

Problem

Writing release notes by hand is a repetitive chore: commit logs are noisy,
related changes are scattered, and breaking changes are easy to miss.

What this kit does

Release Notes Generator turns a raw list of merged PR titles / commit
messages into clean, categorized Markdown release notes — Highlights, ✨ Features,
🐛 Fixes, ⚠️ Breaking Changes, 🧹 Chore — with duplicates collapsed, #123
references preserved, and nothing fabricated.

How it works

A single Lamatic flow: API Request → Generate Notes (LLM) → API Response.
Prompts, guardrails (constitution), and model config are externalized via
@references. A minimal Next.js app provides the UI (with an optional
DEMO_MODE so the interface can be explored without credentials).

Type

Kit (Lamatic flow + Next.js app) — new folder kits/release-notes-generator/,
touches nothing else in the repo.

Testing

  • npm run build passes clean (no type/lint errors)
  • UI verified end-to-end locally
  • Structure follows CONTRIBUTING.md / CLAUDE.md (required files, @reference
    paths resolve, no .env committed)
  • Added kits/release-notes-generator release-notes-generator kit configuration and docs:
    • kits/release-notes-generator/.env.example
    • kits/release-notes-generator/.gitignore (ignores kit runtime artifacts and env files, unignores !.env.example)
    • kits/release-notes-generator/README.md
    • kits/release-notes-generator/agent.md
    • kits/release-notes-generator/lamatic.config.ts
    • kits/release-notes-generator/constitutions/default.md
    • kits/release-notes-generator/prompts/release-notes-generator_generate-notes_system.md
    • kits/release-notes-generator/prompts/release-notes-generator_generate-notes_user.md
    • kits/release-notes-generator/model-configs/release-notes-generator_generate-notes.ts
    • kits/release-notes-generator/flows/release-notes-generator.ts
  • Added the bundled Next.js UI and Lamatic client/orchestration:
    • kits/release-notes-generator/apps/.env.example
    • kits/release-notes-generator/apps/.gitignore
    • kits/release-notes-generator/apps/actions/orchestrate.ts (generateReleaseNotes server action; trims/validates input; supports DEMO_MODE; executes the Lamatic flow and returns { success, releaseNotes?, error? })
    • kits/release-notes-generator/apps/app/globals.css
    • kits/release-notes-generator/apps/app/layout.tsx
    • kits/release-notes-generator/apps/app/page.tsx (form with react-hook-form + Zod validation, renders Markdown via react-markdown, “Load sample”, and “Copy” output)
    • kits/release-notes-generator/apps/components/header.tsx
    • kits/release-notes-generator/apps/lib/demo.ts (demo Markdown generator)
    • kits/release-notes-generator/apps/lib/lamatic-client.ts (lazy Lamatic client creation with runtime env/credential checks)
    • kits/release-notes-generator/apps/next.config.mjs
    • kits/release-notes-generator/apps/package.json
    • kits/release-notes-generator/apps/package-lock.json
    • kits/release-notes-generator/apps/postcss.config.mjs
    • kits/release-notes-generator/apps/tsconfig.json
  • Flow behavior (from kits/release-notes-generator/flows/release-notes-generator.ts):
    • Node types
      • triggerNode_1 (type: triggerNode) exposes the API Request and declares an advance input schema for changes, version, and date.
      • LLMNode_200 (type: dynamicNode) runs the LLM using the referenced system/user prompts and referenced model config to produce generatedResponse.
      • graphqlResponseNode_300 (type: dynamicNode) is the API Response mapper that outputs releaseNotes from {{LLMNode_200.output.generatedResponse}}.
    • High-level wiring
      • triggerNode_1LLMNode_200 (default edge)
      • LLMNode_200graphqlResponseNode_300 (default edge)
      • triggerNode_1graphqlResponseNode_300 (response edge for completion)
    • What it does
      • Converts a newline-delimited list of merged PR titles/commit messages (optionally with version/date) into categorized Markdown release notes (Highlights/Features/Fixes/Breaking Changes/Chore & Internal) while relying on constitution/prompt guardrails to prevent fabrication and preserve #123 references.

Turns a raw list of merged pull requests / commit messages into clean,
categorized Markdown release notes (Highlights, Features, Fixes, Breaking
Changes, Chore) via a single Lamatic flow plus a Next.js app.
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Changes

The PR adds a Release Notes Generator kit with a Lamatic flow, configurable prompts and model references, server-side orchestration, demo mode, and a Next.js interface for generating and copying Markdown release notes.

Release Notes Generator

Layer / File(s) Summary
Flow definition and generation contract
kits/release-notes-generator/flows/..., constitutions/default.md, prompts/..., model-configs/...
Defines the API-to-LLM-to-response flow, Markdown output rules, grounding constraints, and model configuration references.
Runtime orchestration and app configuration
kits/release-notes-generator/apps/actions/..., apps/lib/..., apps/package.json, apps/*.config.*, apps/tsconfig.json
Adds input validation, demo-mode handling, Lamatic execution, credential loading, error mapping, and application tooling configuration.
Next.js generation interface
kits/release-notes-generator/apps/app/..., apps/components/header.tsx
Adds the input form, sample loader, loading and error states, Markdown rendering, clipboard copying, metadata, styling, and navigation.
Kit wiring and operating documentation
kits/release-notes-generator/lamatic.config.ts, README.md, agent.md, .env.example, .gitignore
Adds kit metadata, deployment and environment settings, ignore rules, local setup instructions, flow documentation, and agent guidance.

Suggested reviewers: amanintech, d-pamneja

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description covers purpose, flow, and testing, but it does not follow the required PR Checklist template. Rewrite it using the repository's PR Checklist headings and fill in the required type, file-structure, and validation items.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the new release-notes-generator kit and matches the main change.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Kit: kits/release-notes-generator

Check Results

Check Status
No edits to existing kits ✅ Pass
Required root files present ✅ Pass
Flow .ts files present ✅ Pass
lamatic.config.ts valid ✅ Pass
No changes outside kits/ ✅ Pass

🎉 All checks passed! This contribution follows the AgentKit structure.

Studio Phase 2 validation requires the GraphQL trigger to declare its input
schema. Declares changes, version and date so the flow loads in Studio.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@kits/release-notes-generator/.gitignore`:
- Around line 3-4: Update the ignore rules in .gitignore to exclude all dotenv
environment-specific variants while explicitly re-including the example template
file, such as .env.example. Preserve the existing exclusions for .env and
.env.local and ensure files like .env.production and .env.development are
covered.

In `@kits/release-notes-generator/agent.md`:
- Around line 3-45: Resolve MD022/MD058 markdownlint warnings in the agent guide
by adding blank lines before and after every affected heading and table,
including the headings and tables in the sections around Overview, Purpose,
Flows, Guardrails, Integration Reference, Environment Setup, Quickstart, and
Common Failure Modes; preserve all existing content.
- Around line 20-22: Update the `Input constraints` documentation to specify
that `changes` is a non-empty newline-delimited string, with one PR title or
commit message per line, matching the `input.changes?.trim()` handling in the
bundled orchestration flow; remove the misleading list terminology.

In `@kits/release-notes-generator/apps/actions/orchestrate.ts`:
- Around line 1-69: The flow ID lookup in generateReleaseNotes is hardcoded to
RELEASE_NOTES_GENERATOR instead of using the kit metadata. Import
../../lamatic.config, read the step’s envKey from the configured release-notes
generator step, and use that key for the process.env lookup and missing-variable
error while preserving the existing execution flow.

In `@kits/release-notes-generator/apps/app/page.tsx`:
- Around line 86-103: The “Load sample” button is incorrectly nested inside the
label associated with the textarea. In the form component, restructure the
markup so the button is outside the label, or replace the label association with
an appropriate heading and aria-labelledby relationship while preserving the
textarea’s accessible name and sample-loading behavior.
- Around line 61-126: Refactor the form in the page component to use
react-hook-form with a zod schema instead of raw useState field management.
Define validation for version, date, and changes, initialize useForm with the
schema resolver and defaults, register the inputs, and update handleSubmit to
receive validated form values while preserving loading, error, sample-loading,
and disabled-submit behavior.
- Around line 41-45: Guard the clipboard operation in handleCopy: verify
navigator.clipboard and writeText availability before calling it, wrap the
asynchronous call in try/catch, and handle failures without setting copied or
leaving an unhandled rejection. Preserve the success-only copied state and
timeout behavior, optionally providing user-facing failure feedback consistent
with the page.
- Around line 25-39: handleSubmit lacks exception handling around
generateReleaseNotes, leaving the form stuck in a loading state when the call
throws. Wrap the generateReleaseNotes invocation and success/error state updates
in try/catch, report thrown failures via setError, and place setLoading(false)
in a finally block so loading is always cleared.

In `@kits/release-notes-generator/apps/package.json`:
- Around line 16-23: Pin the lamatic dependency to a specific compatible version
instead of latest. Review the form implementation in page.tsx: either migrate
the plain useState form to react-hook-form with zod validation and add the
required dependencies plus shadcn/ui components, or document the intentional
exception if the simple form does not require them.

In `@kits/release-notes-generator/README.md`:
- Around line 22-32: Resolve markdownlint violations in the README examples by
adding blank lines before and after every fenced code block, including the
related section at lines 55–69, and specifying a language on each fence; use
text where no more specific language applies.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: bb9747d9-51c3-4c8a-82ac-a520d2321625

📥 Commits

Reviewing files that changed from the base of the PR and between dafde4c and 9613c0a.

⛔ Files ignored due to path filters (1)
  • kits/release-notes-generator/apps/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (23)
  • kits/release-notes-generator/.env.example
  • kits/release-notes-generator/.gitignore
  • kits/release-notes-generator/README.md
  • kits/release-notes-generator/agent.md
  • kits/release-notes-generator/apps/.env.example
  • kits/release-notes-generator/apps/.gitignore
  • kits/release-notes-generator/apps/actions/orchestrate.ts
  • kits/release-notes-generator/apps/app/globals.css
  • kits/release-notes-generator/apps/app/layout.tsx
  • kits/release-notes-generator/apps/app/page.tsx
  • kits/release-notes-generator/apps/components/header.tsx
  • kits/release-notes-generator/apps/lib/demo.ts
  • kits/release-notes-generator/apps/lib/lamatic-client.ts
  • kits/release-notes-generator/apps/next.config.mjs
  • kits/release-notes-generator/apps/package.json
  • kits/release-notes-generator/apps/postcss.config.mjs
  • kits/release-notes-generator/apps/tsconfig.json
  • kits/release-notes-generator/constitutions/default.md
  • kits/release-notes-generator/flows/release-notes-generator.ts
  • kits/release-notes-generator/lamatic.config.ts
  • kits/release-notes-generator/model-configs/release-notes-generator_generate-notes.ts
  • kits/release-notes-generator/prompts/release-notes-generator_generate-notes_system.md
  • kits/release-notes-generator/prompts/release-notes-generator_generate-notes_user.md

Comment thread kits/release-notes-generator/.gitignore Outdated
Comment thread kits/release-notes-generator/agent.md
Comment thread kits/release-notes-generator/agent.md
Comment thread kits/release-notes-generator/apps/actions/orchestrate.ts
Comment thread kits/release-notes-generator/apps/app/page.tsx Outdated
Comment thread kits/release-notes-generator/apps/app/page.tsx
Comment thread kits/release-notes-generator/apps/app/page.tsx Outdated
Comment thread kits/release-notes-generator/apps/app/page.tsx Outdated
Comment thread kits/release-notes-generator/apps/package.json
Comment thread kits/release-notes-generator/README.md Outdated
- Harden .gitignore to exclude all dotenv variants, keep .env.example
- Refactor form to react-hook-form + zod with schema validation
- Move Load sample button out of the textarea label
- Guard clipboard write and submit call with try/catch
- Read flow envKey from lamatic.config (single source of truth)
- Pin lamatic dependency; add form libraries
- Fix markdownlint spacing in agent.md and README.md
- Document changes input as a newline-delimited string
@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
kits/release-notes-generator/agent.md (1)

16-16: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Mission check: keep the changes contract singular.

The flow is correctly documented here as a newline-delimited string, but the Guardrails section at Line 26 still calls it a “list.” Update that wording to “non-empty newline-delimited string” so integrations do not send an array that the app cannot process.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@kits/release-notes-generator/agent.md` at line 16, Update the Guardrails
section to describe `changes` as a “non-empty newline-delimited string” instead
of a “list,” preserving the singular input contract documented in the Input
format section.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@kits/release-notes-generator/agent.md`:
- Line 16: Update the Guardrails section to describe `changes` as a “non-empty
newline-delimited string” instead of a “list,” preserving the singular input
contract documented in the Input format section.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2ab4f50f-f267-408e-a83d-4ff2a0586cc6

📥 Commits

Reviewing files that changed from the base of the PR and between 1046085 and 44e9b4e.

⛔ Files ignored due to path filters (1)
  • kits/release-notes-generator/apps/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (8)
  • kits/release-notes-generator/.gitignore
  • kits/release-notes-generator/README.md
  • kits/release-notes-generator/agent.md
  • kits/release-notes-generator/apps/.gitignore
  • kits/release-notes-generator/apps/actions/orchestrate.ts
  • kits/release-notes-generator/apps/app/page.tsx
  • kits/release-notes-generator/apps/next.config.mjs
  • kits/release-notes-generator/apps/package.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant