simiancraft/simiancraft-skills / skills/appraise-github-issues
appraise-github-issues
VerifiedAppraise a GitHub issue backlog unattended: for each issue, decide whether it is still real and how big it is, then apply the answer to the tracker as a size label, a needs-decision or needs-human label with the question stated, or a close carrying a re-checkable receipt. A close is confirmed by a second engine before it is made. Runs once, on one issue, over the whole backlog, or as a periodic heartbeat, and is the sizing stage of burn-down-github-issues. Use when the task is "size the backlog", "appraise every issue in this repo", "close what is already done", "triage recent issues without fixing them", or "keep the backlog sized". Requires a per-repository config (its own, or the burndown's) and the codex and claude CLIs for the default seats. Skip for fixing anything; this skill never writes to the repository.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 7.1 KB |
| appraise.ts | script | 12.7 KB |
| lib/appraise.test.ts | script | 2.8 KB |
| lib/appraise.ts | script | 30.9 KB |
| lib/callbacks.ts | script | 4.1 KB |
| prompts/appraise.md | markdown | 6.2 KB |
| prompts/confirm-close.md | markdown | 3.3 KB |
| references/adopting.md | markdown | 4.0 KB |
| references/callbacks.md | markdown | 3.4 KB |
lib/callbacks.ts
View on GitHub/**
* Size callbacks: what happens after an issue is sized is not the appraiser's to decide. A
* producer (the issue burndown, a person, another skill) puts files named for a size into a
* directory, and the appraiser looks one up for the points it just applied and runs it, knowing
* nothing about what it does. The lookup is a ladder so a Fibonacci scale does not need a file
* per rung:
*
* on-size-<N> exactly this size
* on-size-over-<M> the largest M below N that has a file
* on-size anything sized
*
* Each name may exist as an executable (run with the appraisal outcome as JSON on stdin) and as a
* `.md` prompt (an agent turn on the callback seat, rendered with the issue vocabulary). The
* executable is for anything load-bearing; the prompt is for anything that needs judgement, such
* as invoking another skill to break the issue apart.
*/
import { readdirSync } from 'node:fs';
import { type CallbackVerdict, CALLBACK_FILE, hasCallback, runCallback, runCallbackPrompt } from '../../fix-github-issue/lib/callbacks.ts';
import type { Context } from '../../fix-github-issue/lib/context.ts';
import type { Seat } from '../../fix-github-issue/lib/engines.ts';
import type { Issue } from '../../fix-github-issue/lib/pipeline.ts';
/** What the appraiser hands a size callback, on stdin and as prompt vocabulary. */
export type SizePayload = {
issue: number;
title: string;
points: number;
priorPoints: number | null;
verdict: 'valid';
reason: string;
repo: string;
baseBranch: string;
/** The main checkout, so an executable can run a command from the repository root. */
repoRoot: string;
};
export { type CallbackVerdict, CALLBACK_FILE };
export type SizeCallbackResult = {
/** The slot name that matched, or null when the directory holds nothing for this size. */
name: string | null;
executable?: { exitCode: number };
prompt?: { exitCode: number; verdict: CallbackVerdict | null };
};
/** The slot name the ladder resolves to for `points`, or null. */
export function resolveSizeCallback(dir: string, points: number): string | null {
const exact = `on-size-${points}`;
if (hasCallback(dir, exact)) return exact;
let names: string[];
try {
names = readdirSync(dir);
} catch {
return null;
}
let best: number | null = null;
for (const file of names) {
const match = /^on-size-over-(\d+)(?:\.md)?$/.exec(file);
if (!match) continue;
const threshold = Number(match[1]);
if (threshold < points && (best === null || threshold > best) && hasCallback(dir, `on-size-over-${threshold}`)) {
best = threshold;
}
}
if (best !== null) return `on-size-over-${best}`;
return hasCallback(dir, 'on-size') ? 'on-size' : null;
}
/**
* Runs whatever the directory holds for this size. The executable runs first with the payload on
* stdin; the prompt, when present, is one agent turn in its own scratch directory. Neither can
* fail the appraisal: the size is already on the issue, and what follows is the producer's
* business.
*/
export async function runSizeCallback(
ctx: Context,
dir: string,
seat: Seat,
issue: Issue,
payload: SizePayload,
say: (message: string) => void,
options: { timeoutMs?: number } = {},
): Promise<SizeCallbackResult> {
const name = resolveSizeCallback(dir, payload.points);
if (!name) return { name: null };
say(`size callback ${name} for ${payload.points} points`);
const result: SizeCallbackResult = { name };
const slot = await runCallback(dir, name, payload, say, options);
if (slot.ran && slot.exitCode !== undefined) result.executable = { exitCode: slot.exitCode };
if (slot.prompt === undefined) return result;
if (ctx.dryRun) {
say(`DRY RUN would run the ${name}.md prompt on ${seat.engine}`);
return result;
}
const run = await runCallbackPrompt(
ctx,
seat,
name,
slot.prompt,
{
ISSUE: String(payload.issue),
TITLE: payload.title,
POINTS: String(payload.points),
PRIOR_POINTS: payload.priorPoints === null ? 'none' : String(payload.priorPoints),
REASON: payload.reason,
},
issue.number,
say,
);
result.prompt = run;
return result;
}
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 |