openloops.pile#
The pile: GTD’s In list, kept as GitHub issues in a private repo, and its clarify step.
A capture (an Apple Shortcut, the gh CLI, anything that can send a request to the issues
API) is one open issue labelled pile in the owner’s pile repo. This module is the one
place that reads and changes that pile, so the agent skill (openloops-pile), the
ol pile-* commands and a voice surface (bosun) all do the same thing:
propose(): a first proposal per item, from a model-free heuristic by default (proposer=is the seam an agent’s own reading replaces);plan(): the steps that carry out one decision the owner said yes to (a loop, an idea, an issue in another repo, work handed to a session, done, dropped), ending with a signed comment on the pile item saying where it went. **openloops never writes to GitHub** (ADR-008, ADR-014): the caller runs the steps with its own tools;signed(): a signed progress note, for a session working on an item;nudge(): keep one reminder loop pending while items wait too long. It never acts on an item.
Every write is signed (signature()): the agent’s name and, on private repos, a
link to its session, so an idea’s development can always be traced back to who did it.
Public destinations get no private content: an issue filed in a public repo carries
only the text the caller wrote for it, no dictation, no pile link and no session link.
Nothing here runs on capture and nothing acts without being called: no Action, no
webhook (the owner’s rule). GitHub is only read, through gh (run_gh=); the one
write is nudge()’s reminder loop, through openloops’ own reminder runner.
>>> parse_item({"number": 7, "title": "call about zodal", "body": "call about zodal\n\n— pile: inbox",
... "labels": [{"name": "pile"}, {"name": "inbox"}], "createdAt": "2026-11-20T10:00:00Z",
... "url": "https://github.com/o/_pile/issues/7"}).hint
'inbox'
Module Attributes
The label every untriaged capture carries. |
|
What |
|
An item older than this many days makes |
|
one per pile, found again by this. |
|
The placeholder a plan's later steps carry for what the first step produced (an issue URL, a loop id, an idea id). |
Functions
|
The pile repo: |
|
A |
|
The open items carrying |
|
One item with its comments (any state). |
|
A first guess from the words alone. |
|
One proposal per item. |
|
The last lines of every comment an agent writes here. |
|
Who is writing: |
|
|
|
The steps that carry out one decision the owner said yes to, as data. |
|
True only for a |
|
Keep one reminder coming while any pile item waits longer than |
Classes
|
One capture. |
- openloops.pile.DFLT_STALE_DAYS = 3.0#
An item older than this many days makes
nudge()keep a reminder pending.
- openloops.pile.KINDS = ('loop', 'idea', 'issue', 'work', 'done', 'drop', 'ask')#
What
apply()can do with an item.
- openloops.pile.NUDGE_SOURCE = 'pile-nudge'#
one per pile, found again by this.
- Type:
The
sourceof the nudge loop
- openloops.pile.PILE_LABEL = 'pile'#
The label every untriaged capture carries.
- class openloops.pile.PileItem(number, title, said, hint, labels, created, url, state='open', comments=tuple())[source]#
Bases:
objectOne capture.
saidis the dictation, with the Shortcut’s hint line removed.
- openloops.pile.RESULT = '{result}'#
The placeholder a plan’s later steps carry for what the first step produced (an issue URL, a loop id, an idea id). The caller substitutes it.
- openloops.pile.agent_identity(by=None, session=None, *, env=None)[source]#
Who is writing:
by(an agent or session name) andsession(a URL or address).Defaults:
OPENLOOPS_AGENT; then Claude Code’s own variables, the Remote Control session (https://claude.ai/code/<CLAUDE_CODE_BRIDGE_SESSION_ID>) or the local session id (claude-code:<CLAUDE_CODE_SESSION_ID>).session="none"signs with the name alone (a surface that is not this Claude Code session, such as a connector started from one, passes it rather than borrow the session it inherited).>>> agent_identity(env={"CLAUDE_CODE_BRIDGE_SESSION_ID": "session_01X"})["session"] 'https://claude.ai/code/session_01X' >>> agent_identity("bosun@tw", "none", env={"CLAUDE_CODE_SESSION_ID": "abc"}) {'by': 'bosun@tw', 'session': None}
- openloops.pile.heuristic_propose(item)[source]#
A first guess from the words alone. An agent’s reading replaces it (
proposer=).>>> it = parse_item({"number": 3, "title": "x", "body": "Remind me to call Ana tomorrow", ... "labels": [], "createdAt": "2026-11-20T10:00:00Z", "url": "u"}) >>> heuristic_propose(it)["kind"] 'loop'
- openloops.pile.is_own_private(repo, *, owner, run_gh=None)[source]#
True only for a
PRIVATErepo ofowner: anything else is treated as public.Fails closed: an internal repo, another owner’s private repo (a client’s, shared with other people), or a visibility that cannot be read all get the public treatment.
- Return type:
- openloops.pile.items(*, repo=None, label='pile', run_gh=None)[source]#
The open items carrying
label(default: untriaged), oldest first. Read-only.
- openloops.pile.nudge(*, stale_days=3.0, at='09:00', repo=None, run_gh=None, loops_api=None, now=None)[source]#
Keep one reminder coming while any pile item waits longer than
stale_days.Idempotent; run it from a timer. An item counts while it is on the pile (
pile) or handed to a session (working): a session that died leaves it there. When something is stale, no nudge is still to come, and none was made in the lastNUDGE_EVERY_HOURS, it closes the nudges that already fired and makes one loop (sourcepile-nudge) for the nextatin the owner’s zone. The push says only the count and the oldest age (it crosses a public relay). When nothing is stale, every open nudge is withdrawn. It never touches a pile item.
- openloops.pile.parse_item(raw)[source]#
A
PileItemfromgh’s JSON for one issue. Pure.The hint is the first label that is not a status label, else the body’s
— pile: <hint>line (kept by the Shortcut in case a label is dropped).>>> parse_item({"number": 1, "title": "t", "body": "no hint here", "labels": [], ... "createdAt": "2026-11-20T10:00:00Z", "url": "u"}).hint is None True
- Return type:
- openloops.pile.pile_repo(repo=None, *, run_gh=None)[source]#
The pile repo:
repo, elseOPENLOOPS_PILE_REPO, else<gh login>/_pile.- Return type:
- openloops.pile.plan(number, kind, *, reading=None, by=None, session=None, title=None, when=None, reveal=False, place=None, target_repo=None, issue_body=None, tags=None, reason=None, force=False, repo=None, run_gh=None, method=None)[source]#
The steps that carry out one decision the owner said yes to, as data. Changes nothing.
openloops never writes to GitHub (ADR-008, ADR-014): the caller runs the steps in order, with its own tools (
ghin a Claude Code session, the connector’s comment and create tools on a voice surface), substitutingRESULTin later steps with what the first step produced.readingis the agent’s interpretation, and opens the signed comment. Perkind:loop:remind(ol remind; source = the item’s URL), then close as routed;titleis required withreveal(the push crosses a public relay);idea:idea(ideadump addwith the dictation verbatim), then close as routed;issue:create_issueintarget_repo(title+issue_bodyrequired); anything but a private repo of the pile’s owner gets that text only, no pile link and no session link;work: hand-off to a session; labelledworkingand left open; the session postssigned()notes and finishes withdone;done: close as routed,reason= the evidence;drop: close as not planned,reasonrequired (never silent);ask: stays on the pile, labelledneeds-owner,reason= the question.
A destination already recorded on the item (a
→ issue/loop/idealine from an earlier, half-run plan) refuses a second one unlessforce: finish that plan’s remaining steps instead. The pile itself must be a private repo of its owner.Step ops:
remind,idea,create_issue,comment,labels,close(reasoningh’s spelling,rest_reasonin the REST API’s).
- openloops.pile.propose(found, *, proposer=<function heuristic_propose>)[source]#
One proposal per item. Proposals change nothing;
apply()acts on a yes.
- openloops.pile.show(number, *, repo=None, run_gh=None)[source]#
One item with its comments (any state).
- Return type:
- openloops.pile.signature(by, session=None, *, public=False)[source]#
The last lines of every comment an agent writes here.
On a public repo only the name: a session link is private context.
>>> print(signature("gtd-capture@mac", "https://claude.ai/code/session_01X")) — Agent: gtd-capture@mac Claude-Session: https://claude.ai/code/session_01X >>> signature("gtd-capture@mac", "https://claude.ai/code/session_01X", public=True).splitlines()[-1] 'Agent: gtd-capture@mac'
- Return type:
- openloops.pile.signed(text, *, by=None, session=None, to_repo=None, run_gh=None)[source]#
textwith the writer’s signature, for a comment onto_repo(default: the pile).The session link is kept only when
to_repois a private repo of the pile’s owner; anywhere else (public, internal, a client’s, unreadable) the name alone.