Skip to content

AI-authored changesets (chronus add --ai + GitHub agentic workflow) #586

Description

@timotheeguerin

Summary

Add AI-authored changesets: let Chronus propose the change kind + message for each changed package from the diff/PR context, instead of the author writing them by hand. Extend the existing AI plumbing (currently only ai-release-notes) to changeset authoring, and expose it through both the CLI and a GitHub agentic workflow.

Motivation

Writing changesets is the biggest friction point of the changeset model, and the main reason contributors forget or write low-quality entries. Chronus already has AI infrastructure for ai-release-notes (copilot/claude tooling, prompt templates, change context). Reusing it for authoring turns a differentiator we already have into a headline feature Changesets lacks.

Proposed behavior

CLI

  • chronus add --ai (or chronus add --suggest):
    • Detects changed packages (as today).
    • Reads the diff (and PR context when available) and proposes, per package, a kind (constrained to configured changeKinds) and a message.
    • Presents the suggestions in the interactive flow for the author to accept/edit before writing the changeset file(s).
  • Reuse releaseNotes.tool config (copilot / claude / none) and prompt-template mechanism.

GitHub agentic workflow integration

  • A workflow / Copilot coding-agent entry point that, on a PR missing changesets (i.e. chronus verify fails), invokes the agent to:
    • Generate proposed changesets from the PR diff.
    • Push a commit adding .chronus/changes/*.md, or post them via the existing PR-comment "add from comment" path.
  • Should integrate cleanly with the existing @chronus/github PR commenter and the (proposed) official GitHub Action.

Open questions

  • Constrain kind selection strictly to configured changeKinds; how to handle multi-package diffs where kinds differ per package.
  • Where the agent runs (Action step vs Copilot agentic workflow) and how auth/token flows.
  • Guardrails so AI never silently commits without a review surface.

References

  • packages/chronus/src/cli/commands/release-notes.ts and packages/chronus/src/release-notes/* (existing AI plumbing)
  • packages/chronus/src/cli/commands/add-changeset.ts
  • @chronus/github PR commenter (packages/github/src/pull-requests/*)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions