harness-multitool

0028 — Journal todos become issues in a tracker

Why

The journal is the record of the work, but the owner also wants the work where a team sees it: the project's tracker, GitHub first. A todo should open an issue. What is linked to the todo should comment on it. Closing the todo should close the issue. Other trackers (GitLab, Asana, ClickUp) come later, behind the same interface.

Decision (draft)

Where it runs

The daemon owns the journals, so the daemon sends. No window sends, and no agent does. A journal write never waits on a tracker:

The interface

pub trait IssueTracker: Send + Sync {
    fn name(&self) -> &str;                                   // "github", "gitlab", "asana", "clickup"
    fn connected(&self, project: &ProjectPlace) -> Result<Account, TrackerError>; // as whom
    fn can_take_issues(&self, place: &ProjectPlace) -> Result<Visibility, TrackerError>; // and public or private
    fn open(&self, place: &ProjectPlace, title: &str, body: &str) -> Result<IssueRef, TrackerError>;
    fn comment(&self, place: &ProjectPlace, issue: &IssueRef, body: &str) -> Result<(), TrackerError>;
    fn close(&self, place: &ProjectPlace, issue: &IssueRef, how: Closing, note: &str) -> Result<(), TrackerError>; // Done | NotPlanned
    fn reopen(&self, place: &ProjectPlace, issue: &IssueRef) -> Result<(), TrackerError>;
}

ProjectPlace is the tracker's own address of the project:

GitHub is implemented through the gh CLI. GitLab, Asana and ClickUp are empty bodies that answer TrackerError::NotImplemented, and the Journal tab lists them as not available (CON-143).

GitHub through gh

The rules of CON-141 hold. The harness:

Connecting is gh auth login in that folder, run in the terminal like Claude Code's login. The calls:

What goes

JournalTracker
a todo, a bug flagged todo, or a bugreport addedan issue: the title is the first line (cut to 120 characters), the body is the entry, its flags, tags and journal#N
an entry linked to it (Implements, Verifies or Fixes in its branch; one that cites it)a comment: category, flags, journal#N, the body
the todo closedthe issue closed (completed), the resolution as its last comment
the todo abandonedthe issue closed (not planned)
the todo reopenedthe issue reopened

The map from todo to issue lives in <data dir>/journal-trackers/<project>/issues.json. A queue item carries the entry id and the action, so a replay after a restart sends nothing twice: the map is checked first.

Settings > Journal (per project, CON-142)

The tab shows:

The settings are the daemon's, in <data dir>/journal-trackers/<project>/settings.json, never in the repository.

Open questions for the owner (journal#939)

  1. 'В дашборду проекта': only the repository's issues, or also cards on a GitHub Projects board? If a board, which one, and in which column?
  2. When the option is turned on, are the open todos that exist already sent? The draft sends the open ones and none of the closed.
  3. What counts as linked? The draft takes the branch (Implements, Verifies, Fixes) and the entries that cite the todo.
  4. Labels: should issues carry journal and the entry's category? The draft adds the label journal if it exists, and creates no labels.

Rejected

This page's source