simiancraft/simiancraft-skills / skills/burn-down-github-issues
burn-down-github-issues
UnverifiedRun an unattended burndown of a GitHub issue backlog as cards on a per-operator GitHub Projects board whose lanes are an explicit state machine: appraise and size the inbox, carve what is over the ceiling, fix the ready ones in parallel git worktrees, prove each fix on a draft pull request, have an isolated second-engine reviewer judge it, land one branch at a time with freshness checks, and dead-letter per phase whatever a machine cannot finish. Use when the task is "work the backlog unattended", "triage and fix recent issues", "run the issue loop", "burn down issues", or "where is issue N on the board". Requires a per-repository burn-down-github-issues.config.ts at the target repo's root (the loop refuses to start without it), the prove-work-on-github skill, the codex and claude CLIs for the default seats, and a gh token with the project scope for the board. Skip for one-off fixes to a known issue you are already working interactively, and for backlogs whose issues are mostly product decisions rather than code.
lib/board-writer.test.ts
View on GitHubimport { afterAll, beforeAll, describe, expect, it } from 'bun:test';
import { mkdtempSync, rmSync, writeFileSync } from 'node:fs';
import { join } from 'node:path';
import { createBoardWriter, waitForBoard } from './board-writer.ts';
let scratch: string;
beforeAll(() => { scratch = mkdtempSync(join(import.meta.dir, '.board-writer-')); });
afterAll(() => { rmSync(scratch, { recursive: true, force: true }); });
/** Exercise the real stop handler in a child, synchronizing signals with its output. */
async function drive(resolveAfter: number | null, timeoutMs?: number, twice = false) {
const script = join(scratch, `driver-${Math.random().toString(36).slice(2)}.ts`);
writeFileSync(script, `
import { waitForBoard } from '${join(import.meta.dir, 'board-writer.ts')}';
import { installStopHandler } from '${join(import.meta.dir, '../../fix-github-issue/lib/stop.ts')}';
installStopHandler(console.log, async () => {
console.log('WAITING');
const start = performance.now();
await waitForBoard({ settled: () => new Promise(resolve => {
${resolveAfter === null ? '' : `setTimeout(() => { console.log('SETTLED'); resolve(); }, ${resolveAfter});`}
}) }${timeoutMs === undefined ? '' : `, ${timeoutMs}`});
console.log('DRAINED ' + (performance.now() - start));
});
setInterval(() => {}, 1000);
console.log('READY');
`);
const proc = Bun.spawn([process.execPath, script], { stdout: 'pipe', stderr: 'pipe' });
const reader = proc.stdout.getReader();
let out = '';
const until = async (marker: string) => {
while (!out.includes(marker)) {
const chunk = await reader.read();
if (chunk.done) throw new Error(`child ended before ${marker}: ${out}`);
out += new TextDecoder().decode(chunk.value);
}
};
const watchdog = setTimeout(() => proc.kill('SIGKILL'), 4000);
try {
await until('READY');
proc.kill('SIGTERM');
await until('WAITING');
const start = performance.now();
if (twice) proc.kill('SIGTERM');
for (;;) {
const chunk = await reader.read();
if (chunk.done) break;
out += new TextDecoder().decode(chunk.value);
}
return { code: await proc.exited, out, elapsed: performance.now() - start };
} finally {
clearTimeout(watchdog);
if (proc.exitCode === null) {
proc.kill('SIGKILL');
await proc.exited;
}
}
}
describe('board writer settlement', () => {
it('settles an idle writer and permits a driver without a board', async () => {
const writer = createBoardWriter({ id: 'board', number: 1, title: 'Board', owner: 'owner', url: 'url' }, 'o/r', () => {});
await writer.settled();
await waitForBoard(undefined);
});
it('bounds a never-settling writer during SIGTERM', async () => {
const run = await drive(null, 300);
expect(run.code).toBe(143);
const duration = Number(run.out.match(/DRAINED ([\d.]+)/)?.[1]);
expect(duration).toBeGreaterThanOrEqual(280);
expect(duration).toBeLessThan(2000);
});
it('finishes as soon as the writer settles, inside the default bound', async () => {
const run = await drive(100);
expect(run.code).toBe(143);
expect(run.out.indexOf('SETTLED')).toBeLessThan(run.out.indexOf('DRAINED'));
const duration = Number(run.out.match(/DRAINED ([\d.]+)/)?.[1]);
expect(duration).toBeGreaterThanOrEqual(90);
expect(duration).toBeLessThan(2000);
});
it('exits on a second SIGTERM while the writer is still pending', async () => {
const run = await drive(null, undefined, true);
expect(run.code).toBe(143);
expect(run.out).toContain('again; exiting now');
expect(run.out).not.toContain('DRAINED');
expect(run.elapsed).toBeLessThan(2000);
});
});
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |