Skip to content
项目

关于

Attention is what your coding agents need.

开发工具

这些数字如何统计

实测星标增长

24小时
0
7天
+1
15天
+1
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Wisdom

Wisdom — The intent behind every change your coding agent makes, readable by you and by any agent

npm: @oqura/wisdom Docs: wisdom-docs License: Apache 2.0 Node 24+

Wisdom records Claude Code, Codex and Pi sessions on your machine and links every file change to the request, the reasoning and the commands that produced it. You browse sessions in Usage, a local viewer, and any of your agents can query them through a skill, so the next agent starts from what was actually asked, tried and changed.

Why Wisdom

Agent sessions can add useful context to a diff: what you asked for, what the agent tried and how it checked the result. Revisiting that context can take a little digging, especially across different tools.

Wisdom keeps a local record you and your agents can read:

  • File diffs alongside the requests and tool calls recorded around them.
  • A common way to browse Claude Code, Codex and Pi sessions, one turn at a time.
  • Session history to help with reviews, follow-up work and handoffs between agents.
  • Each commit linked back to the recorded steps that made it.

How it works

Claude Code, Codex CLI and Pi send events through hooks or an extension to a local daemon on 127.0.0.1, which saves them in .wisdom/ (SQLite, diffs, transcript copies). At each commit, Wisdom keeps a record in your repository's .git that links each change to the step that made it. Usage, the CLI (glance, open, glance --commit) and the agent skill read it. In team mode, which is opt-in, git push sends records and sessions to your own git remote for teammates and CI.

The agent's own hooks send each event to a small daemon on your machine. The daemon saves it in the project's .wisdom/ folder, along with a byte-for-byte copy of the agent's transcript and the diffs of the files it watches. If the daemon is down, events are kept and recorded when it comes back; the agent is never blocked. When you commit, Wisdom keeps a record in your repository's .git that links each change to the step that made it.

Quick start

Step 1: Install

npm install -g @oqura/wisdom

Step 2: Connect a project

cd your-project
wisdom connect

Step 3: Use your agent as usual

claude      # or codex, or pi

Sessions are recorded with your normal login. Open them with:

wisdom usage

The first time in a project, Codex asks you to trust it and to approve Wisdom's hooks in /hooks, and Pi asks you to trust it. On Windows PowerShell with scripts blocked, use wisdom.cmd and npm.cmd.

Your settings for the project are in wisdom.yaml, which wisdom connect writes with every default shown: the guide model, the Usage port and what to leave out of recordings. Git ignores it. See settings.

Supported agents

Agent Tested with Records through Notes
  Claude Code 2.1.319 Hooks Start it in the project's folder
  Codex CLI 0.166.0 Hooks Trust the project and approve the hooks once
  Pi 1.2.0 Extension Start it in the project's folder and trust the project once

Two ways to record

  • wisdom connect (above) records claude, codex and pi with your normal login. It adds Wisdom's hook to the project's agent settings and keeps those files out of git. Claude Code and Pi are recorded when started in the project's folder.
  • wisdom init, then wisdom track claude (or codex, pi), gives each agent its own home inside .wisdom/ and touches nothing else. Each agent logs in once for that project. Use it to keep everything in one folder, or to record sessions started from a subfolder.

Details in two ways to record.

Commands

Command What it does
wisdom glance [latest] List sessions, or show one session turn by turn
wisdom open t3 --capture latest One turn in full: replies, tool calls with output, diffs
wisdom usage Print the address of Usage, the local session viewer (wisdom dashboard too)
wisdom commits Print the address of Commits: main and your branches, each commit and the sessions behind it, live
wisdom resume <id> Continue a session, still recording
wisdom handoff codex Start another agent that reads the last session first (--emit: in the background, reading only)
wisdom share <id> / wisdom import <file> Send a session to a teammate, read one you received
wisdom export <id> --out session.md A session as Markdown, for a PR or an issue
wisdom glance --commit HEAD Which recorded steps made each piece of a commit, with its guide
wisdom guide model enable / disable Whether a model writes each commit's guide, instead of the plain one
wisdom guide <commit> [--model] Write one commit's guide now, plain or by a model; --ignore "<session>: <reason>" leaves a session out
wisdom team init Turn on team mode: write wisdom-team.yaml to commit
wisdom team trust Read and allow the commands the team file runs on your machine
wisdom team fetch / push Read teammates' sessions, or send yours without a git push
wisdom team delete <id> Remove a pushed session for everyone
wisdom commits deploy Set up Commits for the whole team, from your git remote, behind a GitHub sign-in
wisdom check --range A..B In CI: each agent commit has a guide and its sessions are pushed
wisdom doctor Check the setup and print the fix for each problem
wisdom disconnect Stop recording a connected project; recordings are kept

Full reference in usage.

Finding the intent behind a change

Wisdom puts a skill in each connected agent that teaches it two moves: glance to see a session's turns, and open to read one turn in full. The session can come from any agent: Codex can read what Claude Code did, and the other way round. Ask something like "which session changed tool.py, and was that on purpose?" and the agent finds the turn and reads it:

t3  in        Add a one-line docstring to main() in jev_router/tool.py.

c4  Edit src/optim_jev/tools/jev_router/tool.py · ok · → p1
reply     I added a one-line docstring to main().

p1  src/optim_jev/tools/jev_router/tool.py · modify · +2 −1 · observed during c4
     def main() -> None:
    -    mode = sys.argv[1] if len(sys.argv) > 1 else ""
    +    """Dispatch a JSON request from stdin to the handler named by argv[1]."""
    +    mode =sys.argv[1] if len(sys.argv) > 1 else ""

The request and the reply both say docstring; the diff shows the line below changed too. The agent sees the change, the request behind it, and where they differ. More in agents.

From a commit back to its sessions

New in 0.6.0.

wisdom glance --commit HEAD lists each piece of a commit with the recorded step that made it, and says not recorded for anything no session explains. Start from git blame and you get from a line of code to the turn that wrote it. Wisdom keeps that answer for each commit you make while it runs, in your own .git, never on a branch.

Each commit with agent work can also get a short guide: what changed and why, citing the steps. Outside team mode, Wisdom builds a plain one from the record each time you read it; wisdom guide model enable has a cheap model (Claude Haiku through your own Claude Code) read the sessions since your last commit and write it.

wisdom commits shows the same in the browser: what landed on main and how, your other branches, each commit with its pieces, guide and sessions, and a session's turns down to the chat view. Every status is checked again against your recordings, and the page follows along live as you or an agent commit, amend or rebase. More in Commits on this machine.

Team mode

Team mode lets teammates read the sessions behind each other's commits. It's opt-in per repository, and everything travels through your own git remote as hidden refs, never on a branch and never to Wisdom.

Maya works with Claude Code, Sam with Codex and Lee with Pi. Each pushes to the same git remote, origin, as usual. Beside the branches, under refs/wisdom/ and the repository's ID, it keeps a record for each commit and every teammate's sessions. Anyone on the team runs wisdom team fetch and reads any commit with wisdom glance --commit, and CI checks every pull request with wisdom check.

wisdom team init                  # writes wisdom-team.yaml; commit and push it
wisdom connect                    # every teammate, after pulling it: installs Wisdom's git hooks
wisdom team trust                 # only if it names a check or guides.command: read them, then allow
git commit && git push            # as usual
wisdom team fetch                 # bring teammates' sessions here, read-only
wisdom glance --commit <commit>   # any commit, with the steps that made it and its guide
  • On commit, Wisdom adds a Wisdom-Record: line to the message as a readable backup. A background job then keeps the record, and for agent work Wisdom's plain guide. Run wisdom guide model enable to have a model write it instead.
  • When a commit gets a new sha (an amend, a rebase, a squash or rebase merge on GitHub), a commit link leads from it to the records of the commits it came from: git's own hook writes it on your machine, and a CI job (wisdom team relink) writes it for merges GitHub makes. wisdom team sync on has git pull bring them.
  • On push, your git push waits for any guide still being written, up to five minutes, then sends the commit links, the sessions and the records, every possible secret redacted. A failure here never stops your push.
  • In CI, wisdom check --range origin/main..HEAD fails a pull request whose agent commits have no guide, or whose sessions aren't on the remote.
  • To remove a pushed session for everyone, run wisdom team delete <id>. wisdom team prune removes sessions older than retentionDays in wisdom-team.yaml.
  • For the whole team in the browser, wisdom commits deploy sets up Commits from the remote, rebuilt by CI on each pull request and merge, behind a GitHub sign-in: only people who can read the repository see its data. It runs on Vercel; a company needs Vercel Pro. See Commits for your team.

Tested with GitHub so far, not yet GitLab, and a pull request from a fork can't push sessions. Details in team mode.

Usage, the session viewer

wisdom usage prints the address of Usage, a local viewer for every session in the project, live while the agent runs.

Overview Chat view
Overview: every session across Claude Code, Codex and Pi, with tokens and the most-changed files Chat view: one request with its steps, a failed test run and the fix
Dev view An agent reading a session
Dev view: the tree of request, tool calls and file changes, with a diff in the inspector Claude Code answering from the record with wisdom glance and wisdom open

More in Usage.

Privacy

Everything stays in the project's .wisdom/ folder on your machine. Git ignores it, but it holds sessions unredacted, so keep it out of shared drives and zips. wisdom share and wisdom export check for API keys, tokens, email addresses and similar before writing anything. In team mode, sessions and commit records are redacted the same way before a push, and go only to your own git remote; your recorded sessions are never changed. The check finds known shapes only, and a team can add its own scanner. Recording uses no model, and Wisdom calls one only to write the commit guides you turn on, by default through your own Claude Code.

Status

Early. Tested on Windows, macOS and Linux. See limitations and the roadmap.

Documentation

Installation · Usage · Usage viewer · Agents · Harnesses · Team mode · Architecture · All docs

The documentation site, with guides and examples: wisdomlayer.github.io/wisdom-docs.

Contributing

git clone https://github.com/wisdomlayer/wisdom.git && cd wisdom
npm ci && npm test

Read CONTRIBUTING.md first: it says which automated and live checks your change needs. See also development and the data policy. Coding agents working on this repository should start with AGENTS.md.

License

Apache 2.0

探索相关项目

加载中…