Skip to content

Practical patterns, starters & CLI tools for loop engineering with AI coding agents. Design systems that prompt and orchestrate agents (inspired by Addy Osmani and Boris Cherny). Includes loop-audit, loop-init, loop-cost.

2.2 KB
Raw Blame

Changelog Drafter — Opencode

Scan merged PRs and commits, produce categorized release notes. Excellent low-risk L1 loop — pairs naturally with Post-Merge Cleanup.

Prerequisites

mkdir -p skills/changelog-scan skills/draft-release-notes
cp templates/SKILL.md.loop-triage skills/changelog-scan/SKILL.md          # adapt for merge scan
cp templates/SKILL.md.loop-triage skills/draft-release-notes/SKILL.md     # adapt for drafting
cp starters/minimal-loop-opencode/opencode.json.example opencode.json
cp starters/changelog-drafter-opencode/changelog-drafter-state.md.example changelog-drafter-state.md

L1 — Report + Draft (Week 1)

opencode run \
  "Run skills/changelog-scan/SKILL.md. Read changelog-drafter-state.md. Scan merges to main since the last tag (or last 7 days). Produce a clean categorized draft in RELEASE_NOTES_DRAFT.md using skills/draft-release-notes/SKILL.md. Update state with the scanned window and draft status. Do not publish, tag, or create any PRs." \
  --title "Changelog drafter"

Cron (daily, after merges settle):

0 3 * * * cd /repo && opencode run "Scan merges since last tag, draft categorized release notes, update state. Human review only."

L2 — PR Proposal (Week 3+)

Once drafts are consistently well-structured, let the loop open a draft PR with the approved notes:

opencode run \
  "Run changelog-scan and draft-release-notes. If the draft looks good, create a new branch and commit RELEASE_NOTES_DRAFT.md. Open a draft PR titled 'chore: release notes draft'. Flag breaking changes and security items explicitly in the PR body. Do not merge." \
  --agent implementer

What the Loop Maintains

  • changelog-drafter-state.md — last scanned window, draft status, human feedback
  • RELEASE_NOTES_DRAFT.md — overwritten or versioned each run

Safety

  • Draft-only in week one. No tags, no PRs, no publishes without human approval.
  • Breaking changes and security items must be surfaced explicitly for human sign-off.
  • After L2 graduation: draft PRs only, never auto-merge.

References