okl statusline for Claude Code: briefed and drifted counts at a glance

Open
#243 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
git, python

Research direction

Read the existing okl drift and okl recap command paths to understand how they count drift and read the transcript, then inspect okl init --claude for its registration and dry-run behavior. Implementing the statusline also requires a cache keyed by HEAD and verification time, session briefed counts, and runtime coverage. Done when the acceptance cases pass, including reverify updating the count without a new commit and warm-cache median runtime under 100 ms.

Written by the indexing model from the issue text.

Description

enhancement

Problem

okl's only visible sign inside a Claude Code session is the hook's line per prompt ("okl · briefed N lesson(s): … · K need re-checking"), which scrolls away. There is no standing indicator of what the store did this session or whether anything is drifted right now, so the loop is invisible until a push is refused.

Where it stands (verified 2026-10-20)

  • Claude Code's documentation describes a user-configured statusline command, run periodically, whose one line is shown in the UI. Nothing in this repo uses it.
  • The store has most of what a statusline needs: okl drift for the drifted count (it runs git, so not free on every refresh), and the briefing log for the briefed count. The briefing log has no session column today, so a per-session count needs either that column or the transcript, which okl recap already reads for briefed lessons.

Proposal

okl statusline: prints okl · 9 briefed · 2 drifted (or okl · not configured outside an okl repo), reading the briefed count from the transcript the way okl recap does (or from the briefing log once it carries a session id) and a drift result cached per HEAD commit plus the store's last verification time under .okl/, so the git work runs once per commit, not per refresh. okl init --claude offers to register it (--statusline, off by default), and --dry-run lists what it would write. It writes nothing to the store and never blocks anything.

Acceptance

  • In a repo with one planted drift, the line reads … · 1 drifted; after okl reverify, 0 drifted without a new commit.
  • Outside an okl repo the command prints the not-configured line and exits 0, so a statusline never shows an error.
  • Median runtime under 100 ms with a warm cache, measured in a test on the fixture repo.
Dominant language
Python
Stars
1
Forks
1
Avg merge
5h 45m
Merged PRs (30d)
118

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from emeraldleaf/okl

All issues in emeraldleaf/okl

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.