Skip to content

src/index.ts

33 lines · 1.9 KB · TypeScript
Raw
/**
 * @kentcdodds/ship-pr overview: the progressive ship-pr loop and export map.
 * Start with `./tick`; everything else is a helper the tick points at.
 *
 * @returns Export map, loop summary, and the preferred invoke form.
 *
 * @example
 * import overview from 'kody:@kentcdodds/ship-pr'
 * const info = overview()
 * // => { loop: [...], exports: { './tick': '…', ... } }
 */
export default function overview() {
	return {
		package: '@kentcdodds/ship-pr',
		invoke: `npx @kodycodes/cli execute --local --code 'import run from "kody:@kentcdodds/ship-pr/tick"; export default (p) => run(p)' --params '{"prUrl":"…","risk":"medium","applySafeAutomations":true}'`,
		invokeNote: '@kodycodes/cli rejects --local with --invoke (--invoke runs in Kody cloud), so local runs use a static-import --code passthrough.',
		loop: [
			'Invoke ./tick with prUrl + risk (low | medium | high).',
			'Read checklist, done[], remaining[]; only the focus step carries details + exampleInvokes. Re-tick with brief: true (the examples do) for compact output.',
			'Decide: fix + push, reply (./reply-review), record a 7-day decision (./decide), merge (./merge).',
			'Invoke ./tick again until exit.done. Wrap up with friction-log/file and ./send-summary when tick focuses them.',
		],
		exports: {
			'./tick': 'Main brain: status, Bugbot trigger, review sort, decisions, merge/deploy/wrap-up progress.',
			'./decide': 'Record ignored | skipped | wontfix | accepted (reason required, ≤ 7 days) for a thread, check, or step.',
			'./reply-review': 'Reply on a review thread as kody-bot; optional resolve.',
			'./review-sort': 'Full Bugbot / Devin / Seer review-bot sort (optional invalid replies).',
			'./merge': 'Preflighted squash-merge as kody-bot, pinned to head SHA.',
			'./send-summary': 'Discord ship summary via @kentcdodds/discord/send-shipped-pr; marks report done.',
		},
		never: ['hosted MCP execute', 'commenting "bugbot run" as kody-bot', 'pasting tokens'],
	}
}