Skip to content

BumpyClock/agent-templates / skills_archive/poteto-mode

poteto-mode

Verified

poteto's agent style for concise, detailed responses, deliberate subagents, unslopped prose, simple code, and verified work. Use for poteto, /poteto-mode, or requests to work in this style.

FileKindSize
SKILL.mdskill md19.4 KB
agents/openai.yamlconfig268 B
playbooks/authoring-a-skill.mdmarkdown956 B
playbooks/autonomous-run.mdmarkdown2.0 KB
playbooks/autopilot-full.mdmarkdown5.9 KB
playbooks/autopilot-stack.mdmarkdown5.5 KB
playbooks/babysit.mdmarkdown9.0 KB
playbooks/bug-fix.mdmarkdown2.5 KB
playbooks/eval.mdmarkdown3.0 KB
playbooks/feature.mdmarkdown3.0 KB
playbooks/hillclimb.mdmarkdown4.4 KB
playbooks/investigation.mdmarkdown1.1 KB
playbooks/multi-phase-plan.mdmarkdown10.7 KB
playbooks/opening-a-pr.mdmarkdown4.1 KB
playbooks/orchestrate.mdmarkdown17.2 KB
playbooks/pause-safely.mdmarkdown1.5 KB
playbooks/perf-issue.mdmarkdown3.5 KB
playbooks/prototype.mdmarkdown2.6 KB
playbooks/refactoring.mdmarkdown3.7 KB
playbooks/runtime-forensics.mdmarkdown1.4 KB
playbooks/session-pickup.mdmarkdown2.2 KB
playbooks/shipping.mdmarkdown5.3 KB
playbooks/trace-forensics.mdmarkdown2.1 KB
playbooks/visual-parity.mdmarkdown1.3 KB
playbooks/worktree-cleanup.mdmarkdown3.0 KB
references/principle-boundary-discipline.mdmarkdown1.6 KB
references/principle-build-the-lever.mdmarkdown2.2 KB
references/principle-encode-lessons-in-structure.mdmarkdown1.9 KB
references/principle-exhaust-the-design-space.mdmarkdown879 B
references/principle-experience-first.mdmarkdown1.0 KB
references/principle-fix-root-causes.mdmarkdown1.1 KB
references/principle-foundational-thinking.mdmarkdown1.4 KB
references/principle-guard-the-context-window.mdmarkdown883 B
references/principle-laziness-protocol.mdmarkdown1.2 KB
references/principle-make-operations-idempotent.mdmarkdown1.1 KB
references/principle-migrate-callers-then-delete-legacy-apis.mdmarkdown870 B
references/principle-minimize-reader-load.mdmarkdown1.8 KB
references/principle-model-the-domain.mdmarkdown1.8 KB
references/principle-never-block-on-the-human.mdmarkdown1.3 KB
references/principle-outcome-oriented-execution.mdmarkdown843 B
references/principle-prove-it-works.mdmarkdown150 B
references/principle-redesign-from-first-principles.mdmarkdown669 B
references/principle-separate-before-serializing-shared-state.mdmarkdown1.3 KB
references/principle-sequence-verifiable-units.mdmarkdown620 B
references/principle-subtract-before-you-add.mdmarkdown1.1 KB
references/principle-type-system-discipline.mdmarkdown4.7 KB
scripts/bootstrap.tsscript1.7 KB
scripts/bun.lockother6.5 KB
scripts/check-plan.mjsscript7.5 KB
scripts/orch/orch.test.tsscript18.0 KB
scripts/orch/orch.tsscript15.1 KB
scripts/orch/store.tsscript41.9 KB
scripts/package.jsonmanifest352 B
scripts/watch-pr/cli.test.tsscript6.0 KB
scripts/watch-pr/cli.tsscript6.8 KB
scripts/watch-pr/fakes.test-helper.tsscript2.9 KB
scripts/watch-pr/github.test.tsscript8.8 KB
scripts/watch-pr/github.tsscript23.5 KB
scripts/watch-pr/policy.test.tsscript12.1 KB
scripts/watch-pr/policy.tsscript24.5 KB
scripts/watch-pr/render.tsscript6.9 KB
scripts/watch-pr/tsconfig.jsonconfig270 B
scripts/watch-pr/types.compile.tsscript2.2 KB
scripts/watch-pr/types.tsscript12.1 KB
scripts/watch-pr/watch-prexecutablescript211 B
scripts/worktree-audit.shexecutablescript3.9 KB

scripts/watch-pr/cli.test.ts

View on GitHub
import { describe, expect, it } from "bun:test";
import { type CliRuntime, main, parseArgs } from "./cli.ts";
import { fakeReader, passingCheck } from "./fakes.test-helper.ts";
import { renderJson, renderPretty } from "./render.ts";
import type { GitHubReader, WatcherVerdict } from "./types.ts";
import { parsePrNumber } from "./types.ts";

const silentIo = { stdout: () => {}, stderr: () => {} };

function testRuntime(reader: GitHubReader): {
  readonly runtime: CliRuntime;
  readonly stdout: string[];
  readonly stderr: string[];
} {
  const stdout: string[] = [];
  const stderr: string[] = [];
  return {
    stdout,
    stderr,
    runtime: {
      reader,
      clock: {
        now: () => 0,
        observedAt: () => "2026-07-26T00:00:00.000Z",
        async sleep() {
          throw new Error("test unexpectedly slept");
        },
      },
      stdout: (value) => stdout.push(value),
      stderr: (value) => stderr.push(value),
    },
  };
}

describe("parseArgs", () => {
  it("uses the specified defaults", () => {
    expect(parseArgs([], silentIo)).toMatchObject({
      owner: null,
      repo: null,
      pr: null,
      mode: "single",
      stackPrs: [],
      statusOnly: false,
      pretty: false,
      polling: {
        interval: 60,
        sweepInterval: 300,
        timeout: 0,
        maxQueryErrors: 5,
        allowDraft: false,
      },
    });
  });

  it("parses a frozen queued stack bottom-to-top", () => {
    const parsed = parseArgs(
      [
        "--queued-stack",
        "--stack-prs",
        "#10, 11,#12",
        "--interval",
        "2.5",
        "--sweep-interval",
        "30",
        "--timeout",
        "0",
        "--max-query-errors",
        "3",
        "--allow-draft",
        "--pretty",
      ],
      silentIo
    );
    expect(parsed.mode).toBe("queued-stack");
    expect(parsed.stackPrs.map(Number)).toEqual([10, 11, 12]);
    expect(parsed.polling).toEqual({
      interval: 2.5,
      sweepInterval: 30,
      timeout: 0,
      maxQueryErrors: 3,
      allowDraft: true,
    });
    expect(parsed.pretty).toBe(true);
  });

  it("rejects every invalid mode and numeric shape as usage", async () => {
    const invalid = [
      ["--unknown"],
      ["--interval", "0"],
      ["--sweep-interval", "-1"],
      ["--timeout", "-1"],
      ["--max-query-errors", "1.5"],
      ["--stack", "--queued-stack"],
      ["--stack-prs", "1,2"],
      ["--queued-stack", "--stack-prs", "1,1"],
    ];
    for (const argv of invalid) {
      const harness = testRuntime(fakeReader());
      expect(await main(argv, harness.runtime)).toBe(64);
      expect(harness.stdout).toEqual([]);
      expect(harness.stderr.join("")).toContain("error:");
    }
  });
});

describe("rendering", () => {
  const context = {
    owner: "owner",
    repo: "repo",
    number: parsePrNumber(1),
  };
  const status = {
    schemaVersion: 1,
    sequence: 1,
    observedAt: "2026-07-26T00:00:00.000Z",
    mode: "single",
    kind: "STATUS",
    terminal: true,
    exitCode: 0,
    reason: "status-only",
    rows: [
      {
        kind: "merged",
        context,
        facts: {
          context,
          mergeable: "MERGEABLE",
          mergeStateStatus: "CLEAN",
          reviewDecision: "APPROVED",
          headRefOid: "head",
          headRefName: "feature",
          baseRefName: "main",
          state: "MERGED",
          mergedAt: "now",
          isDraft: false,
        },
      },
    ],
  } satisfies WatcherVerdict;

  it("emits compact valid JSON by default", () => {
    const rendered = renderJson(status);
    expect(rendered.endsWith("\n")).toBe(true);
    expect(JSON.parse(rendered)).toEqual(status);
  });

  it("renders the Markdown table from the same verdict only", () => {
    const rendered = renderPretty(status);
    expect(rendered).toContain("| PR | CI | Review | Merge |");
    expect(rendered).toContain(
      "| [#1](https://github.com/owner/repo/pull/1) | \u2014 | \u2014 | ✅ merged |"
    );
  });
});

describe("main", () => {
  it("returns EX_USAGE 64 and writes usage errors only to stderr", async () => {
    const harness = testRuntime(fakeReader());
    expect(await main(["--interval", "0"], harness.runtime)).toBe(64);
    expect(harness.stdout).toEqual([]);
    expect(harness.stderr.join("")).toContain(
      "option '--interval <seconds>' argument '0' is invalid"
    );
  });

  it("bypasses the queue machine for queued-stack status-only", async () => {
    const reader = fakeReader();
    const harness = testRuntime(reader);
    const code = await main(
      [
        "--owner",
        "owner",
        "--repo",
        "repo",
        "--queued-stack",
        "--stack-prs",
        "1",
        "--status-only",
      ],
      harness.runtime
    );
    expect(code).toBe(0);
    expect(harness.stdout).toHaveLength(1);
    const verdict: unknown = JSON.parse(harness.stdout[0]);
    expect(verdict).toMatchObject({
      kind: "STATUS",
      terminal: true,
      exitCode: 0,
      mode: "queued-stack",
    });
    expect(harness.stdout[0]).not.toContain('"kind":"QUEUE"');
  });

  it("returns exit 4 for a hidden GitHub-side CI refusal", async () => {
    const reader = fakeReader({
      facts: { mergeStateStatus: "BLOCKED" },
      fastPath: { kind: "checks", checks: [passingCheck()] },
      commitRollups: [{ oid: "head", state: "FAILURE" }],
    });
    const harness = testRuntime(reader);
    const code = await main(
      ["--owner", "owner", "--repo", "repo", "--pr", "1"],
      harness.runtime
    );
    expect(code).toBe(4);
    expect(harness.stdout).toHaveLength(1);
    expect(JSON.parse(harness.stdout[0])).toMatchObject({
      kind: "BLOCKER",
      exitCode: 4,
      blocker: {
        kind: "failing-checks",
        ci: { kind: "ci-github-rejected" },
      },
    });
  });

  it("shows help without touching the reader", async () => {
    const reader = fakeReader();
    const harness = testRuntime(reader);
    expect(await main(["--help"], harness.runtime)).toBe(0);
    expect(harness.stdout.join("")).toContain("JSON (NDJSON while polling)");
    expect(reader.calls).toEqual([]);
  });
});
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: 466kUpdated Claude CodeCodexVerifiedInstall
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: 466kUpdated Claude CodeCodexVerifiedInstall
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: 319kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 319kUpdated Claude CodeCodexVerifiedInstall