Does a path or bean exist on main or any open PR

Answer whether a path, a path prefix or a bean id appears on a repository’s default branch or on the head of any of its open pull requests, and where: the PR number, head branch, first commit author and creation time. A path or prefix matches files at the default branch and files each open PR changes; a bean id matches PR titles, bodies and head branch names. Repositories or PRs that could not be read are listed, so an empty answer is never mistaken for absence.

Skills it satisfies

A skill states the capability; this Tool is one way to exercise it. Each skill’s declared input and output contract follows, where it has one.

bean-coordination

Pointer to the bean-based session work-plan system (the beans CLI flat-file issue tracker, data under beans/). Operational usage lives in todo-manager.md / session-intent.md; this file is the canonical copy of the coordinator logic that downstream repositories sync from.

Source: cat-harness/work-plan/skills/work-plan/bean-coordination.md.

Also satisfied by: bean-claim-check, bean-query, beans-cli, beans-manual, drain-queue, sibling-sessions, work-plan-prime, workflow-complete, workflow-start.

The skill declares no I/O contract (schemas/skills/bean-coordination/{input,output}.schema.json).

Inputs and outputs

Each port names a shared type by IRI, so two Tools for one skill can be checked for interchangeability.

porttyperequireddescriptionconstraint
inpathRepoPathAn exact repository path.string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments.
inprefixRepoPathA directory or file-name prefix; every path under or starting with it matches.string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments.
inbeanBeanIdA bean id, full or short.string · pattern ^[a-z0-9-]+$ · A bean identifier, e.g. folio-assistant-1dfh
inrepoRepoFullNameRepositories to search. Repeat. Defaults to the current checkout’s origin.string · pattern ^[A-Za-z0-9][A-Za-z0-9._-]*\\/[A-Za-z0-9][A-Za-z0-9._-]*$ · A forge repository’s full name, owner/name
injsonFlagEmit definitions.lookup as JSON.boolean · A boolean switch — projects to a bare flag, with no value word
outlookupMarkdownOne line per hit: repository, default branch or PR number, head, author, when, and what matched. Then what could not be read. Exactly one of path, prefix or bean must be given. With –json, definitions.lookup of schemas/skills/bean-drain/output.schema.json.string · Markdown text. Not admissible as a command-line argument — see INJECTION_SAFE.
outresultOpenWorkLookupWith –json, the hits as one OpenWorkLookup record, with what could not be read. Programs read this; people read lookup.object · Where a path, prefix or bean id exists on main or an open PR head; unread names what could not be read.

Processes and tasks

Steps this Tool can carry out, because each names a skill it satisfies:

processsteplanevia skill
Close the beanRecord the blocker and hand backAgent (this session)bean-coordination
Drain the beansBuild the queue, grouped by ownerQueue keeperbean-coordination
Drain the beansTake the next beanDrainerbean-coordination
Drain the beansOpen the beanDrainerbean-coordination
Drain the beansMark it skip on the queueDrainerbean-coordination
Agent bean lifecycleOpen the beanAgent (this session)bean-coordination
Open the beanLeave it alone (coordinate instead)Sibling session or human (not yours to close)bean-coordination
Open the beanClaim it (status: in-progress)Agent (this session)bean-coordination
Code change and reviewOpen the beanAuthoring agentbean-coordination
A refused merge-train memberRecord the merge commit as evidenceMerge stewardbean-coordination
A refused merge-train memberScrap the bean, with the reasonMerge stewardbean-coordination
A refused merge-train memberOpen the beanMerge stewardbean-coordination
A merge trainFix the PR, then re-signal readySibling sessionbean-coordination
Stalled-agent triage: collect handovers, consolidate themes, recommend, re-routeRecord the triage and claim the picked-up workTriage agentbean-coordination
Test Data Curation — Fixed Sets and Generated RecipesOpen the beanAuthoring agentbean-coordination
Test-plan executionOpen the beanRequester / system under testbean-coordination
Watching a pinned upstream dependencyOpen the beanAgentbean-coordination
Adopting an upstream version bumpOpen the beanAgentbean-coordination
Getting startedOpen the beanOnboarding agent (system)bean-coordination
Authoring a documentOpen the beanWork plan (beans)bean-coordination
Content Change and ReviewOpen the beanFolio-Assistant Agentbean-coordination
Content lifecycleOpen the beanEditors + authoring agentsbean-coordination
Draft, review and publishOpen the beanBuild pipeline (system)bean-coordination
Editing and HCI validationOpen the beanAuthoring agent (system)bean-coordination
L1 document ingestion — a document to the L1 source knowledge graphOpen the beanIngestion Engine (agent, runs unattended)bean-coordination
Data sharing agreement document life cycleOpen the beanAuthor and policy authorbean-coordination
Data sharing agreement document life cycleOpen the beanAuthor and policy authorbean-coordination
Authoring a paperOpen the beanWork plan (beans)bean-coordination
DIIG — from a health system bottleneck to a costed implementation planOpen the beanProgramme managerbean-coordination
L2 DAK authoringOpen the beanWork plan — beans (shared by humans and agents)bean-coordination

How it is deployed and reached

  • Command line. From the repository root: bun run cat lookup:open-work. cat lookup:open-work runs bun run cat-harness-tools/scripts/open-work-lookup.ts (declared in cat-harness-tools/package.json).
  • In process. scripts/open-work-lookup.ts — loaded by the harness directly, with no server.
  • GitHub Actions. No workflow in this checkout runs its command.

As an API: its operation in the OpenAPI document and the MCP tool list of its layer.

installnone
runtimebun
networkyes

When a host it reaches is refused:

host / errorremedy
api.github.comnone: No declared Tool lists open PRs another way. A session with the GitHub MCP server can list them with list_pull_requests and read each one’s files.
when to choose it
whenBefore starting work that a sibling may already have in flight, and before publishing that a path or a piece of work does not exist.
limitsOpen PRs only, not unpushed local branches or closed PRs. It uses the GitHub REST API, not GraphQL, because cloud sessions are refused GraphQL. A PR’s changed-file list is capped by the API at 3000 files; a bigger PR is listed under unread rather than guessed. For the current checkout alone, git show origin/main:<path> in its own command is enough.
costOne paged REST listing of open PRs per repository, plus one files listing per open PR for a path or prefix query.

What it is made of

Its module imports, one hop:

Linked data

The Tool is published as its own JSON-LD document at its IRI, https://litlfred.github.io/folio-assistant/cat-harness/tools/open-work-lookup.jsonld, partOf its layer’s document. The node below is the definition this page was drawn from, and is embedded in the page as application/ld+json.

{
  "@context": "https://litlfred.github.io/folio-assistant/cat-harness/cat-harness.context.jsonld",
  "@id": "https://litlfred.github.io/folio-assistant/cat-harness/tools/open-work-lookup.jsonld",
  "@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
  "partOf": "https://litlfred.github.io/folio-assistant/cat-harness/cat-harness.jsonld",
  "name": "open-work-lookup",
  "title": "Does a path or bean exist on main or any open PR",
  "description": "Answer whether a path, a path prefix or a bean id appears on a repository's default branch or on the head of any of its open pull requests, and where: the PR number, head branch, first commit author and creation time. A path or prefix matches files at the default branch and files each open PR changes; a bean id matches PR titles, bodies and head branch names. Repositories or PRs that could not be read are listed, so an empty answer is never mistaken for absence.",
  "install": {
    "none": true
  },
  "invoke": {
    "shell": "bun run cat lookup:open-work",
    "inProcess": {
      "module": "scripts/open-work-lookup.ts"
    }
  },
  "io": {
    "inputs": [
      {
        "name": "path",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "An exact repository path.",
        "required": false,
        "arg": {
          "flag": "--path"
        }
      },
      {
        "name": "prefix",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "A directory or file-name prefix; every path under or starting with it matches.",
        "required": false,
        "arg": {
          "flag": "--prefix"
        }
      },
      {
        "name": "bean",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/BeanId",
        "description": "A bean id, full or short.",
        "required": false,
        "arg": {
          "flag": "--bean"
        }
      },
      {
        "name": "repo",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoFullName",
        "description": "Repositories to search. Repeat. Defaults to the current checkout's origin.",
        "required": false,
        "repeated": true,
        "arg": {
          "flag": "--repo"
        }
      },
      {
        "name": "json",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Flag",
        "description": "Emit `definitions.lookup` as JSON.",
        "required": false,
        "arg": {
          "flag": "--json"
        }
      }
    ],
    "outputs": [
      {
        "name": "lookup",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Markdown",
        "description": "One line per hit: repository, default branch or PR number, head, author, when, and what matched. Then what could not be read. Exactly one of path, prefix or bean must be given. With --json, `definitions.lookup` of schemas/skills/bean-drain/output.schema.json."
      },
      {
        "name": "result",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/OpenWorkLookup",
        "description": "With --json, the hits as one `OpenWorkLookup` record, with what could not be read. Programs read this; people read `lookup`."
      }
    ]
  },
  "satisfies": [
    "bean-coordination"
  ],
  "requirements": {
    "runtime": [
      "bun"
    ],
    "network": true
  },
  "remedies": [
    {
      "host": "api.github.com",
      "none": "No declared Tool lists open PRs another way. A session with the GitHub MCP server can list them with `list_pull_requests` and read each one's files."
    }
  ],
  "selection": {
    "when": "Before starting work that a sibling may already have in flight, and before publishing that a path or a piece of work does not exist.",
    "limits": "Open PRs only, not unpushed local branches or closed PRs. It uses the GitHub REST API, not GraphQL, because cloud sessions are refused GraphQL. A PR's changed-file list is capped by the API at 3000 files; a bigger PR is listed under unread rather than guessed. For the current checkout alone, `git show origin/main:<path>` in its own command is enough.",
    "cost": "One paged REST listing of open PRs per repository, plus one files listing per open PR for a path or prefix query."
  }
}

folio-assistant — code under the Apache License 2.0, documentation under CC BY 3.0. Generated schema and API references are rebuilt from source on every push to main.

deployed dev