flurdy/agent-skills / skills/next
next
UnverifiedRank ready beads across validated workspace stores or one local store. List read-only, or claim one selected bead, show its details, and continue into its work.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 50.3 KB |
| pi/index.ts | script | 2.5 KB |
| pi/lease-selection.ts | script | 16.9 KB |
| references/dolt-recovery.md | markdown | 7.7 KB |
| references/source-scope.md | markdown | 12.5 KB |
| scripts/bd-showexecutable | script | 1.1 KB |
| scripts/collect.pyexecutable | script | 25.5 KB |
| scripts/next-bdexecutable | script | 16.5 KB |
| scripts/next-selectexecutable | script | 21.3 KB |
| tests/lease-extension.test.mjs | script | 7.4 KB |
| tests/lease-kernel.test.mjs | script | 3.7 KB |
| tests/lease-selection.test.mjs | script | 20.1 KB |
| tests/test_defer_dates.py | script | 6.8 KB |
| tests/test_dolt_recovery_contract.py | script | 3.3 KB |
| tests/test_machine_routing.py | script | 10.1 KB |
| tests/test_next_bd.py | script | 43.8 KB |
| tests/test_next_select.py | script | 36.2 KB |
| tests/test_ownership_contract.py | script | 2.8 KB |
| tests/test_read_deadlines.py | script | 8.2 KB |
| tests/test_related.py | script | 11.4 KB |
| tests/test_source_scope.py | script | 10.1 KB |
| tests/workspace_fixture.py | script | 10.8 KB |
pi/index.ts
View on GitHubimport { Type } from "@earendil-works/pi-ai";
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
import { inspectCandidates, renderSafeList } from "./lease-selection.ts";
type Observer = (roots: string[], options: { timeoutMs: number; signal: AbortSignal }) => Promise<unknown[]>;
export function registerNextSafe(pi: ExtensionAPI, loadObserver: () => Promise<Observer>) {
pi.registerTool({
name: "next_safe",
label: "Inspect task source leases",
description: "Read-only /next safe listing or fresh recheck of a qualified selector. Uses explicit bead source_scope declarations and the public in-process Pi lease observer. Never claims work or acquires/releases leases. Free observations are advisory, not reservations or source authority. For list, reproduce returned Markdown verbatim; do not reconstruct it from details.",
promptGuidelines: [
"For next_safe action=list, reproduce its returned Markdown verbatim in the final answer. This is the rendered report, not input for another summary.",
"Do not summarize, reorder, drop columns or rows, recompute counts, add empty sections, or rebuild the list from tool details. Keep its numbering and Lease check column.",
"For next_safe action=recheck, inspect the machine-readable queues; only eligible permits a safe tracking claim. Stop on occupied or a recheck error; ask first when tracker_overlap is non-empty. An explicitly picked unknown or unavailable row may be claimed only as ordinary work and must be reported as not lease-checked, never safe.",
],
parameters: Type.Object({
action: Type.Union([Type.Literal("list"), Type.Literal("recheck")]),
selector: Type.Optional(Type.String({ maxLength: 512 })),
}, { additionalProperties: false }),
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
async execute(_id, params, signal, _update, ctx) {
if ((params.action === "recheck") !== Boolean(params.selector)) throw new Error("Only recheck requires a qualified selector");
const result = await inspectCandidates(ctx.cwd, { selector: params.selector, signal, loadObserver });
const details = { ...result, sessionId: ctx.sessionManager.getSessionId(), cwd: ctx.cwd };
const text = params.action === "list" ? renderSafeList(result) : JSON.stringify(details);
return { content: [{ type: "text", text }], details };
},
});
}
export default function (pi: ExtensionAPI) {
registerNextSafe(pi, async () => (await import("@flurdy/pi-session-mode/lease-observer")).probeWorktreeLeaseOccupancies);
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |