warp-context/rightStage

Sync AI context across every terminal window. 3 seconds to know what to work on next.

aiflow – Keep your AI prompt context in sync across terminal windows

What it is

  • A tiny, shell‑script‑based utility that lets you store a single markdown file (.ai/progress.md) describing the current state of a project and automatically injects a concise, token‑efficient context block for any LLM you’re chatting with.
  • No background daemon, server, or heavyweight configuration – just three scripts (ai_inject, ai_progress, ai_done) and a markdown file.

Why it matters

  • When you switch terminals you often forget what you were working on and have to rewrite the same context for the AI model. aiflow eliminates that friction by making the context a single source of truth that every shell can read.
  • It also keeps the task list up‑to‑date by parsing your Git commit messages, so the “current/next” tasks stay accurate without manual editing.

Key commands

Command What it does
ai_inject [options] [project_dir] ["prompt"] Reads .ai/progress.md and the auto‑generated files in .ai/ctx/, builds a short context block (CURRENT, NEXT, GOAL, API, CONSTRAINT, ISSUES) and prints it. Options let you copy the output to the clipboard (-c) or skip the Git‑based auto‑update (-n).
ai_progress [project_dir] Scans the Git log for task numbers (e.g., [2]) and updates progress.md: marks completed tasks as done, the first unfinished task as doing, the rest as todo. Called automatically by ai_inject.
ai_done [project_dir] Manually marks the current doing task as done and promotes the next todo to doing.

Typical workflow

  1. Create a task list once per repo:
    mkdir -p .ai && cat > .ai/progress.md <<'EOF'
    [1] Login UI        done
    [2] API integration doing
    [3] Error handling  todo
    [4] Unit tests       todo
    EOF
    
  2. Inject context whenever you need to talk to an LLM:
    ai_inject .                     # prints the context
    ai_inject -c .                  # prints and copies to clipboard
    ai_inject -c . "Help me fix retry logic"  # includes your prompt
    
  3. Keep the list in sync by using task numbers in commit messages:
    git commit -m "[2] API integration complete"
    
    The next time you run ai_inject, task 2 will be marked done automatically.

File layout

project/
└── .ai/
    ├── progress.md          # your hand‑written task list
    └── ctx/
        ├── 00_goal.md       # optional project goal (write once)
        ├── 02_current.md   # generated – current task
        ├── 03_next.md      # generated – next task
        ├── 04_constraint.md# optional constraints
        ├── 05_api.md       # optional API spec
        └── 07_issue.md     # optional known issues

A global fallback directory (~/.ai/ctx/) can hold defaults shared across projects.

Installation

curl -fsSL https://raw.githubusercontent.com/warp-context/rightStage/main/install.sh | bash

Or clone the repo and run bash install.sh manually.

Supported platforms

  • macOS (zsh/bash)
  • Linux (bash)
  • Windows Git Bash

Integration

  • Works with any LLM that accepts plain text (Warp AI, Claude, ChatGPT, Cursor, GitHub Copilot, etc.).
  • A Rust‑based port is being discussed for native integration in the Warp Terminal, which would let the terminal read .ai/progress.md directly without invoking the shell scripts.

Design principles

  1. Context is runtime state for the model, not human documentation.
  2. Show the current task first, then the next one, then minimal supporting info.
  3. Auto‑update from Git to avoid stale manual edits.
  4. Keep the injected block under ~100 lines to stay token‑efficient.

Uninstall

rm ~/.local/bin/ai_inject ~/.local/bin/ai_progress ~/.local/bin/ai_done
rm -rf ~/.ai   # optional, removes global fallback

License: MIT.


Bottom line: aiflow is a lightweight, shell‑script toolkit that streamlines the hand‑off between your development terminal and any LLM by keeping a single, auto‑synchronised context file. It’s useful for developers who regularly use AI assistants for coding, debugging, or design tasks and want to avoid repetitive copy‑paste of project state.

Related

  • Project
  • Project
  • Project
  • Project