ai-session-flow
Track what every AI coding session is doing, right on your GitHub Project board.
When you run dozens of AI sessions in parallel (Claude Code, Codex, Cursor, …), it is hard to tell which ones are still working, which ones are waiting for you and which ones are done. ai-session-flow makes each session publish its status on the issue it is working on, so the board becomes the single place to follow all of them.
Status: early development, usable: the CLI, the Claude Code plugin, sync after merge, the session card, the scheduled workflow and the AGENTS.md snippet for other agents. The specification is in docs/spec.md and the validation protocol in docs/validation.md.
In one picture
Each issue card on the Project shows two fields, written by the session that owns it:
| Field | Values |
|---|
| Session stage | planning → experimentation → implementation ⇄ testing → review → validation → done · abandoned |
| Session attention | 🟢 working · 🟡 waiting for you · ⚪ stopped |
- The AI assists every stage, including review, validation and done: it writes the validation script, watches logs and hardware while a person tests, checks that the required tests were really done and writes the final report.
- One session per issue. Parallel work goes into sub-issues.
- A new session can start at any stage (for example, straight into validation) and links to the previous one, so the history stays on the issue.
Getting started
Requirements: Node.js 20 or newer, and a GitHub token with the repo and project scopes. The CLI uses GH_TOKEN, then GITHUB_TOKEN, then the login of the GitHub CLI (gh auth login --scopes project).
npm install -g https://github.com/wjsan/ai-session-flow/tarball/v0.4.1
- Configure. Copy examples/ai-session-flow.yml to
.ai-session-flow.yml in your repository and set the Project owner and number. The CLI looks for the file from the current folder upwards, so one file in a parent folder covers several repositories.
- Create the fields.
ai-session-flow init creates the session fields on the Project and checks the board map. It never changes existing fields; --dry-run shows what it would do.
- Use it in a session:
ai-session-flow start --agent claude-code # prints the session id
ai-session-flow bind 42 # issue #42 of the current repo; takes the lock
ai-session-flow stage implementation # issue from the branch (42-slug) or the focus
ai-session-flow stage testing
ai-session-flow attention waiting
ai-session-flow stage review
ai-session-flow status # sessions on this machine
Claude Code: automatic tracking
With the plugin, you don't call the CLI by hand: hooks follow the session.
/plugin marketplace add wjsan/ai-session-flow
/plugin install ai-session-flow@ai-session-flow
In the VS Code extension /plugin is not available: use the claude command line (the extension ships one, e.g. %USERPROFILE%\.vscode\extensions\anthropic.claude-code-<version>\resources\native-binary\claude.exe on Windows), from the project folder:
claude plugin marketplace add wjsan/ai-session-flow
claude plugin install ai-session-flow@ai-session-flow --scope project
Start a new session afterwards: plugins load when a session starts.
The plugin brings its own copy of the CLI (Node.js 20+ is still required). It acts only in folders where a .ai-session-flow.yml is found, so it is safe to install for every project.
| Event | Effect |
|---|
| Session start | Tells Claude how the session is tracked and how to bind an issue. |
| Prompt sent, tool finished | Attention 🟢 working. |
| Permission requested, end of turn, idle | Attention 🟡 waiting (after the debounce). |
| Session end | Attention ⚪ stopped. |
File edited in a git repository (edit tools, shell redirections, sed -i, commits) | Stage implementation. |
| Build, test or run command | Stage experimentation before any code change, testing after. |
gh pr create | Stage review. |
Switch to or work on a branch named <issue>-slug | Binds that issue (repositories of the Project owner, or repos in the config). |
Your prompt names an issue (#N, owner/repo#N, URL) while none is bound | Binds that issue. |