Versioned Intent and Context History for Agentic Reasoning — capture the why behind AI agent decisions
Project description
VICHAR — विचार
Versioned Intent and Context History for Agentic Reasoning
VICHAR captures why AI agents make decisions — not just what they do. Every decision, open question, and task is recorded so the next session (or a different agent) starts with full context instead of zero.
Install
pip install vichar
Or from source:
git clone https://github.com/shivranjankolvankar/vichar
cd vichar
pip install -e .
Quick start
# Initialise in your project
cd my-project
vichar init
# Agents capture reasoning as they work
vichar capture "Use FastAPI over Flask" \
--type decision \
--author claude-code \
--body "Flask lacks async support. FastAPI gives us OpenAPI docs for free."
# At session start — read prior context
vichar log
# Confirm an entry (human ratification)
vichar ratify abc12345
# One-line project summary
vichar status
Core concept: the trust gradient
| Status | Meaning |
|---|---|
proposed |
Agent-written, unreviewed |
ratified |
Human-confirmed |
closed |
No longer relevant |
Agents write freely. Humans decide what to trust.
Commands
| Command | Description |
|---|---|
vichar init |
Stamp project, write agent files, inject into CLAUDE.md + .cursor/rules |
vichar capture "<text>" |
Capture a decision, thread, or task |
vichar ratify <id> |
Mark an entry as human-confirmed |
vichar close <id> |
Close an entry |
vichar log |
Show open entries (rich table) |
vichar status |
One-line project summary (add --json for machine output) |
vichar migrate |
Upgrade pre-schema entries to schema v1 |
vichar uninit |
Remove VICHAR injection from CLAUDE.md + .cursor/rules |
vichar-server |
Start HTTP server on port 7474 (fallback for shell-less agents) |
HTTP server (agent fallback)
When an agent cannot run shell commands, it can POST over HTTP instead:
vichar-server [--port 7474] [--host 127.0.0.1]
import urllib.request, json
def vichar(title, type="decision", body="", author="agent"):
data = json.dumps({"title": title, "type": type,
"body": body, "author": author}).encode()
req = urllib.request.Request(
"http://localhost:7474/capture", data=data,
headers={"Content-Type": "application/json"}, method="POST")
try:
with urllib.request.urlopen(req, timeout=2) as r:
return json.loads(r.read())
except Exception:
return None # never block on VICHAR
Server endpoints: GET / GET /status GET /log POST /capture POST /ratify POST /close
Agent integration
vichar init writes instruction files and injects them automatically:
- Claude Code (
CLAUDE.md): injects@.vichar/CLAUDE.mdimport line - Cursor (
.cursor/rules): inlines the full instruction block - Both injections are non-destructive (VICHAR START/END markers, idempotent)
The agent files tell Claude / Cursor when to capture, how to capture, and the HTTP fallback snippet.
What gets stored
Each entry in .vichar/entries.json has:
| Field | Description |
|---|---|
id |
8-char hex identifier |
type |
decision / thread / task |
status |
proposed / ratified / closed |
title |
One-line summary |
body |
Extended reasoning (markdown) |
author |
claude-code / cursor / human / agent |
schema |
"1" (schema version) |
Zero dependencies
VICHAR is pure Python stdlib — no rich, no colorama, no click.
It works in any Python 3.8+ environment without pip install overhead.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vichar-0.1.0.tar.gz.
File metadata
- Download URL: vichar-0.1.0.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1a2b4b59b32985bbed2785fddd4235075a6177a2e598ab97c55bb9de786cd19
|
|
| MD5 |
9464001596b0c4f7a98c9f3df9b9db54
|
|
| BLAKE2b-256 |
9f289e4b4e6330b3386cc27cb6bd512138ecc6531c17b14af9e8f5e405b0979d
|
File details
Details for the file vichar-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vichar-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
812033ac8669503a85df9c7dfe42c6e8709b0cd5894bc72295cfa42512feea09
|
|
| MD5 |
0993453d08acb0c547807132c661bdc1
|
|
| BLAKE2b-256 |
5bfad651be522be26de7ebc26071e6819d8a9c4f1a7758337957be69fc72d55f
|