Ticket file discovery, parsing, and numbering helpers. Port of clawrecipes/src/lib/ticket-finder.ts. Pure file I/O on the lane directories — no Hermes API dependencies.
# Source: https://github.com/JIGGAI/hermes-recipes | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
"""Ticket file discovery, parsing, and numbering helpers.
Port of clawrecipes/src/lib/ticket-finder.ts. Pure file I/O on the lane
directories — no Hermes API dependencies.
"""
import re
from pathlib import Path
from typing import Iterable, Literal, Optional
from hermes_recipes.lanes import ticket_stage_dir
TicketLane = Literal["backlog", "in-progress", "testing", "done"]
LANE_SEARCH_ORDER: tuple[TicketLane, ...] = ("backlog", "in-progress", "testing", "done")
# Ticket filenames are 0001-some-slug.md.
TICKET_FILENAME_RE = re.compile(r"^(\d{4})-(.+)\.md$")
def lane_dir(team_dir:
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key