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/preflight.test.ts
View on GitHubimport '../../../test/no-real-gh.preload.ts';
import { describe, expect, it } from 'bun:test';
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import type { Context } from '../../fix-github-issue/lib/context.ts';
import { reportPreflight } from './preflight.ts';
function fixture(protection: string[] | Error, requiredChecks: string[] = [], checks = 'required') {
const messages: string[] = [];
const reads: string[][] = [];
const ctx = {
project: { repo: 'fixture/project', baseBranch: 'release' },
knobs: { requiredChecks, checks },
dryRun: true,
log: (message: string) => messages.push(message),
} as unknown as Context;
const io = {
say: ctx.log,
read: (argv: string[]) => {
reads.push(argv);
expect(argv).toEqual(['gh', 'api', 'repos/fixture/project/branches/release/protection/required_status_checks', '--jq', '[.contexts[]?, .checks[]?.context] | unique']);
if (protection instanceof Error) throw protection;
return JSON.stringify(protection);
},
};
return { ctx, io, messages, reads };
}
describe('landing preflight', () => {
for (const [name, protection, configured, expected] of [
['protection only', ['build'], [], ['build']],
['config only', [], ['test'], ['test']],
['overlapping union', ['build', 'test', 'build'], ['test', 'lint', 'lint'], ['test', 'lint', 'build']],
] as const) {
it(name, () => {
const f = fixture([...protection], [...configured]);
reportPreflight(f.ctx, f.io);
expect(f.messages[1]).toEndWith(JSON.stringify(expected));
expect(f.messages).toHaveLength(2);
expect(f.reads).toHaveLength(1);
});
}
it('names the empty list and both remedies in required mode', () => {
const f = fixture([]);
reportPreflight(f.ctx, f.io);
expect(f.messages[1]).toEndWith('[]');
expect(f.messages[2]).toContain('required landing check list is empty');
expect(f.messages[2]).toContain('Configure requiredChecks or required status checks on base release');
});
it('uses the landing fallback when protection is unavailable', () => {
const f = fixture(new Error('no protection or no read access'), ['build']);
reportPreflight(f.ctx, f.io);
expect(f.messages[1]).toEndWith('["build"]');
});
it('reports none mode without the required-mode warning', () => {
const f = fixture([], [], 'none');
reportPreflight(f.ctx, f.io);
expect(f.messages.join('\n')).not.toContain('WARNING');
expect(f.messages[2]).toContain('gate is disabled');
});
});
// Exercise the command's actual main body with explicit boundaries, as in pressure.test.ts.
// Unknown dependencies fail rather than reaching a live tracker or starting a process.
async function dryRunMain(f: ReturnType<typeof fixture>, backlog: unknown[]) {
const source = readFileSync(new URL('../loop.ts', import.meta.url), 'utf8');
const start = source.indexOf('async function main():');
const body = source.slice(start, source.indexOf('\n}', start) + 2);
const noop = () => {};
const seat = (engine: string) => ({ engine });
const deps = {
CLOSURE_PROBE: null, teeConsole: noop, join, RUN_DIR: '.', step: noop,
PROJECT: { name: 'fixture' }, BASE: 'release', CONFIG: { concurrency: 1 },
MAX_POINTS: 2, SEATS: { appraiser: seat('a'), confirmer: seat('b'), worker: seat('a'), reviewer: seat('b'), carver: seat('a'), carveConfirmer: seat('b') },
seatLabel: (s: { engine: string }) => s.engine, DRY_RUN: true, ctx: f.ctx,
log: f.io.say, reportPreflight: (ctx: Context) => reportPreflight(ctx, f.io),
claimLock: () => noop, startPulse: () => noop, SILENT: true, PULSE_MINUTES: 5,
process: { pid: 1, on: noop }, installStopHandler: noop, FLOOR_MODE: null,
FLOOR: null, BOARD: null, ensureLabels: noop, CARVING: { sweep: noop },
allIssues: () => backlog, placeBacklog: async (issues: unknown[]) => issues,
SKIP_APPRAISAL: true, LIMIT: 2, selectCandidates: () => [], pulse: noop,
ADMISSION: { start: noop, admit: async () => [] },
};
const js = new Bun.Transpiler({ loader: 'ts' }).transformSync(body);
await new Function(...Object.keys(deps), `${js}\nreturn main();`)(...Object.values(deps));
}
it('the command reports before selection, including an empty backlog, without mutations or seats', async () => {
for (const backlog of [[], [{ number: 1 }]]) {
const f = fixture(['build']);
await dryRunMain(f, backlog);
expect(f.reads).toHaveLength(1);
expect(f.messages.some((line) => line.endsWith('["build"]'))).toBe(true);
expect(f.messages.some((line) => line.startsWith('nothing in Ready'))).toBe(true);
}
});
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 |