π§ A cognitive-neuroscience-inspired AI coding agent that lives in your terminal. A prediction-coding runtime (RPE, neuromodulation, attention, working memory), an LLM app layer with 16 tools and a supervisor judge, OpenAI/DeepSeek adapters, and a ratatui TUI.
| Feature | What it means for you | |
|---|---|---|
| π§ | Cognitive runtime | Prediction-error (RPE) learning signals, dopamine/norepinephrine/acetylcholine/serotonin modulation, attention salience, working memory, and metacognitive monitoring β all visible live in the TUI |
| π οΈ | 16-tool ecosystem | File read/edit/create, glob/grep search, terminal, web search & fetch, git diff, rules, skills, task scheduling β with an approval workflow and an LLM supervisor judge that catches bad calls before they run |
| π | Rules & Skills | Project and global rules with auto-attachment (globs/regex), and skills following the open Agent Skills standard (SKILL.md), loaded from shared ecosystem locations so skills installed for Codex/Cursor also work here |
| β‘ | Batch tool execution | Independent tool calls run in parallel; the model waits for the whole batch before generating again β no mid-batch guessing, no repeated calls |
| πΎ | Session memory | Full conversation history is always injected (never silently summarized); archive, resume, and re-inject past sessions with /history, /continue, /remember |
| π₯οΈ | Terminal-first UI | Model switching, approval keys, live cognitive signal panel, Markdown rendering (headings, lists, code, tables), diff folding, mouse-wheel scrolling |
No Rust, no compiler, no sudo required on machines where a prebuilt release exists:
bash <(curl -fsSL https://raw.githubusercontent.com/Mirakelor/Prognosis/master/install.sh)Or download and run it locally:
curl -fsSL -o install.sh https://raw.githubusercontent.com/Mirakelor/Prognosis/master/install.sh
bash install.shWhat the installer does, step by step:
- π Detects your platform (
linux/macosΓx86_64/aarch64) - π¦ Checks GitHub Releases for a matching prebuilt binary (
prognosis-<os>-<arch>.tar.gz) β if found, downloads, extracts, and installs it. Zero dependencies, zero sudo, done. - π§ No release for your platform? Falls back to building from source automatically:
- Installs Rust via rustup (user-level, no sudo, silent
-y --profile minimal) - Installs a C compiler if missing (
sudo apt-get install -y build-essentialon Debian/Ubuntu β the only sudo in the whole flow; on macOS it tells you to runxcode-select --install) - Clones the repository, runs
cargo build --release, installs the binary
- Installs Rust via rustup (user-level, no sudo, silent
- π Installs to
~/.local/bin/prognosis(override withPROGNOSIS_INSTALL_DIR) - π€οΈ Adds
~/.local/binto yourPATHin~/.bashrc/~/.zshrc/~/.profileif it isn't already there - π§Ή Cleans up temporary files; prints the next step (
/models)
The script is idempotent β re-run it anytime to update.
git clone https://github.com/Mirakelor/Prognosis.git
cd Prognosis
cargo build --release
./target/release/prognosisRequirements: Rust (stable) + a C linker (cc/gcc/clang). The dependency tree is 100% pure Rust β no OpenSSL, no system C libraries.
| Variable | Default | Purpose |
|---|---|---|
PROGNOSIS_INSTALL_DIR |
~/.local/bin |
Where the binary is installed |
PROGNOSIS_REPO |
Mirakelor/Prognosis |
Repository to fetch releases/source from |
PROGNOSIS_SKIP_RELEASE |
0 |
Set to 1 to skip the prebuilt download and always build from source |
PROGNOSIS_SKIP_BUILD_DEPS |
0 |
Set to 1 to refuse auto-installing a C compiler (fails with guidance instead) |
prognosis- Add a model: type
/models, choose add, and paste your API key. Keys are stored in~/.prognosis/models.jsonβ never in the project, so they can't leak into git. Supported: DeepSeek and any OpenAI-compatible endpoint (custombase_url). - Start working: type your request in any language β the agent replies in the same language.
- Approvals: some tool calls ask for confirmation before running:
Enterβ approve this callShift+Enterβ approve and remember the tool forever (no more prompts)Escβ deny
- Interrupting:
Escstops generation or cancels running tool calls;Ctrl+Cdoes the same;Ctrl+Dquits.
| Key | Action |
|---|---|
Enter |
Send message / approve / select |
Shift+Enter / Alt+Enter |
Insert a newline in the input box (Shift+Enter degrades to Alt+Enter on some terminals) |
Shift+Tab / y |
Approve and remember (fallback keys when Shift+Enter is not delivered by the terminal) |
Esc |
Cancel generation / deny approval / cancel running tools / close an overlay |
Tab |
Toggle the selected rule or skill in the rules/skills panel |
β β |
Navigate input history (or command list while typing /) |
β β Home End |
Move the cursor in the input box |
Ctrl+C |
Cancel generation or running tools; quit when idle |
Ctrl+D |
Quit |
| Mouse wheel | Scroll chat/panel content |
Prognosis splits configuration between your machine and each project:
| Path | Holds | Scope | Commit to git? |
|---|---|---|---|
~/.prognosis/models.json |
Model entries including API keys | All your projects | Never |
~/.prognosis/rules/ |
Your personal rules | All your projects | Never |
.prognosis/rules/ |
Team rules | This project | β Yes |
.prognosis/state.json |
Enabled/disabled toggles for rules & skills | This project | No |
.prognosis/history/ |
Archived sessions | This project | No |
.prognosis/approvals.json |
Remembered tool approvals | This project | No |
.agents/skills/ |
Project skills (SKILL.md folders) | This project | β Yes (copy mode) |
Model entries live globally so API keys never enter a repository. models.json looks like:
{
"entries": [
{
"name": "deepseek-v4-flash",
"kind": "deepseek",
"base_url": "https://api.deepseek.com",
"api_key": "sk-..."
}
],
"current": "deepseek-v4-flash"
}Rules are Markdown files with YAML frontmatter:
---
description: "Use named exports in TypeScript modules"
globs: "src/**/*.ts"
alwaysApply: false
---
Always use named exports. Never use default exports in this project.| Frontmatter | Meaning |
|---|---|
description |
When the rule should apply (used by the agent to decide) |
globs |
File patterns the rule attaches to (auto-attached when matching files are involved) |
regex |
Content pattern the rule attaches to |
alwaysApply |
true = always injected; false = agent decides |
- Global + project rules are merged; a project rule with the same name overrides the global one.
- The agent creates rules with the
create_rule_blocktool β pass"scope": "global"to store them in~/.prognosis/rules. - Manage enable/disable in the TUI (
/rulespanel,Tabto toggle).
Skills follow the open Agent Skills standard: a folder containing SKILL.md with YAML frontmatter (name, description, ...). Prognosis reads them from the shared ecosystem locations, so skills you installed for Codex, Cursor, or Gemini CLI are visible here too:
| Location | Scope |
|---|---|
.agents/skills/ |
This project |
~/.agents/skills/ |
Global (your machine) |
~/.config/agents/skills/ |
Global (your machine) |
Install skills with the npm ecosystem CLI (target the universal agent group):
# π Project-level: installs into .agents/skills/ (committed with the repo)
npx skills add <owner/repo> -a universal
# π Global-level: installs into ~/.config/agents/skills/
npx skills add <owner/repo> -g -a universalSkills are listed in the /skills panel (name + description) and their full instructions load lazily via the read_skill tool only when the agent needs them β many skills cost almost nothing in context until used.
Type / in the input box to open the command palette:
| Command | Purpose | Example |
|---|---|---|
/models |
List, switch, add, or remove models | /models β add DeepSeek key |
/rules |
List rules (project + ~/.prognosis) |
/rules β see all, Tab to toggle |
/skills |
List skills (.agents/skills + global) |
/skills β see what's available |
/history |
List past sessions and load one fully | /history β pick a session to restore |
/continue |
Resume the most recent session | /continue β keep working where you left off |
/remember |
Inject an archived session summary | /remember β bring back context from an old session |
/resume |
Resume a session by id | /resume 2026-08-09-... |
/compact |
Compress the conversation into a summary | use when the thread is very long |
/approvals |
Manage remembered tool approvals | /approvals β forget a remembered tool |
/status |
Show live cognitive signals | RPE, modulators, working memory |
/trace |
Show recent cognitive trace records | see what the runtime just did |
/task |
List or cancel scheduled tasks | /task β cancel a monitor task |
/supervisor |
Toggle the supervisor judge on/off | /supervisor β disable gating |
/clear |
Clear the conversation | start fresh |
/help |
Show key bindings and commands | /help |
The runtime runs cognitive actors over an internal event bus, in a continuous loop:
perception β attention β prediction β error computation β modulation β action selection
β β
working memory β metacognition
- π― Prediction β the agent predicts your next message before you send it; the prediction error (RPE) is a learning signal that shapes future behavior. Visible as live RPE values in
/status. - βοΈ Neuromodulation β dopamine raises the action-selection GO threshold (persistence when things go well), norepinephrine holds attention on the current content, acetylcholine gates reasoning effort, serotonin damps negative salience.
- ποΈ Attention & working memory β salient events (tool errors, denied calls, results) are flagged, stored in working-memory slots, and injected into the model as semantic reminders β never raw numbers.
- π§© Metacognition β monitors uncertainty/confidence/conflict; when thresholds are crossed it injects advisory reminders ("verify every claim with evidence") instead of dumping numeric state.
- π¦ Action selection β a stochastic GO/NO-GO process over candidate actions, gated by an LLM supervisor judge that reviews each tool call before execution (approval, correction, or rejection).
| Variable | Purpose |
|---|---|
PROGNOSIS_LOG_LLM |
Set to 1 to log raw LLM requests for debugging |
PROGNOSIS_CONFIG_DIR |
Override the global config dir (default ~/.prognosis) β used by tests and portable setups |
PROGNOSIS_SKILLS_HOME |
Override the home base for ecosystem skill dirs (testing) |
"linker 'cc' not found"
The C compiler is missing. The installer handles this automatically; manually: sudo apt-get install -y build-essential (Debian/Ubuntu) or xcode-select --install (macOS).
No prebuilt binary for my platform The installer falls back to a source build automatically. Build manually with the steps above.
"Repository not found" during install
The PROGNOSIS_REPO env var points at a repository that doesn't exist (or is private). Export the correct one and re-run.
npx not found
Skills can also be placed manually β each skill is just a folder containing a SKILL.md, dropped into any of the skill directories in the table above.
API key not working
Run /models, remove the entry, and re-add it with the correct key. Keys are read from ~/.prognosis/models.json only β environment variables like DEEPSEEK_API_KEY/OPENAI_API_KEY are also honored as fallbacks.
The TUI looks broken in a small window Resize to at least 80 columns; the layout adapts up to 120+ columns.
prognosis/
βββ src/
β βββ runtime/ # cognitive actors: perception, attention, prediction, modulation, ...
β βββ app/ # App layer: tools, models, supervisor, scheduler, remember
β βββ adapter/ # OpenAI / DeepSeek wire formats & HTTP clients
β βββ frontend/ # ratatui TUI: render, input, selectors, markdown
βββ install.sh # one-command installer
βββ .github/workflows/release.yml # tag β prebuilt binaries on GitHub Releases