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.
| Tool | open-work-lookup |
| IRI | https://litlfred.github.io/folio-assistant/cat-harness/tools/open-work-lookup.jsonld |
| part of | https://litlfred.github.io/folio-assistant/cat-harness/cat-harness.jsonld |
| type | https://litlfred.github.io/cat-harness/v0/ns/Tool |
| declared by | cat-harness |
| invoked | inProcess shell |
| qa | qa-reports |
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.
| port | type | required | description | constraint | |
|---|---|---|---|---|---|
| in | path | RepoPath | An exact repository path. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. | |
| in | prefix | RepoPath | A 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. | |
| in | bean | BeanId | A bean id, full or short. | string · pattern ^[a-z0-9-]+$ · A bean identifier, e.g. folio-assistant-1dfh | |
| in | repo | RepoFullName | Repositories 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 | |
| in | json | Flag | Emit definitions.lookup as JSON. | boolean · A boolean switch — projects to a bare flag, with no value word | |
| out | lookup | Markdown | 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. | string · Markdown text. Not admissible as a command-line argument — see INJECTION_SAFE. | |
| out | result | OpenWorkLookup | With –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:
| process | step | lane | via skill |
|---|---|---|---|
| Close the bean | Record the blocker and hand back | Agent (this session) | bean-coordination |
| Drain the beans | Build the queue, grouped by owner | Queue keeper | bean-coordination |
| Drain the beans | Take the next bean | Drainer | bean-coordination |
| Drain the beans | Open the bean | Drainer | bean-coordination |
| Drain the beans | Mark it skip on the queue | Drainer | bean-coordination |
| Agent bean lifecycle | Open the bean | Agent (this session) | bean-coordination |
| Open the bean | Leave it alone (coordinate instead) | Sibling session or human (not yours to close) | bean-coordination |
| Open the bean | Claim it (status: in-progress) | Agent (this session) | bean-coordination |
| Code change and review | Open the bean | Authoring agent | bean-coordination |
| A refused merge-train member | Record the merge commit as evidence | Merge steward | bean-coordination |
| A refused merge-train member | Scrap the bean, with the reason | Merge steward | bean-coordination |
| A refused merge-train member | Open the bean | Merge steward | bean-coordination |
| A merge train | Fix the PR, then re-signal ready | Sibling session | bean-coordination |
| Stalled-agent triage: collect handovers, consolidate themes, recommend, re-route | Record the triage and claim the picked-up work | Triage agent | bean-coordination |
| Test Data Curation — Fixed Sets and Generated Recipes | Open the bean | Authoring agent | bean-coordination |
| Test-plan execution | Open the bean | Requester / system under test | bean-coordination |
| Watching a pinned upstream dependency | Open the bean | Agent | bean-coordination |
| Adopting an upstream version bump | Open the bean | Agent | bean-coordination |
| Getting started | Open the bean | Onboarding agent (system) | bean-coordination |
| Authoring a document | Open the bean | Work plan (beans) | bean-coordination |
| Content Change and Review | Open the bean | Folio-Assistant Agent | bean-coordination |
| Content lifecycle | Open the bean | Editors + authoring agents | bean-coordination |
| Draft, review and publish | Open the bean | Build pipeline (system) | bean-coordination |
| Editing and HCI validation | Open the bean | Authoring agent (system) | bean-coordination |
| L1 document ingestion — a document to the L1 source knowledge graph | Open the bean | Ingestion Engine (agent, runs unattended) | bean-coordination |
| Data sharing agreement document life cycle | Open the bean | Author and policy author | bean-coordination |
| Data sharing agreement document life cycle | Open the bean | Author and policy author | bean-coordination |
| Authoring a paper | Open the bean | Work plan (beans) | bean-coordination |
| DIIG — from a health system bottleneck to a costed implementation plan | Open the bean | Programme manager | bean-coordination |
| L2 DAK authoring | Open the bean | Work 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-workrunsbun run cat-harness-tools/scripts/open-work-lookup.ts(declared incat-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.
| install | none |
| runtime | bun |
| network | yes |
When a host it reaches is refused:
| host / error | remedy |
|---|---|
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. |
| when to choose it | |
|---|---|
| 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. |
What it is made of
| role | file | |
|---|---|---|
| in-process module | cat-harness-tools/scripts/open-work-lookup.ts | |
| script | cat-harness-tools/scripts/open-work-lookup.ts |
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."
}
}