ワンクリックで
ai-harness
AI layer embeds the Pi SDK. Load when touching AI module, harness integration, providers, MCP decision, or chat UI.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
AI layer embeds the Pi SDK. Load when touching AI module, harness integration, providers, MCP decision, or chat UI.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | ai-harness |
| description | AI layer embeds the Pi SDK. Load when touching AI module, harness integration, providers, MCP decision, or chat UI. |
| triggers | ["ai","llm","harness","pi","pi-agent-core","pi-ai","mcp","skill","extension","claude","openai","ollama"] |
We do not build our own agent runtime. We embed earendil-works/pi as the AI layer.
Pi is the minimalist coding harness by Mario Zechner. Its philosophy is identical to what we wrote in culture: 4 tools, no spaceships, skills via npm/git. Adopting it instead of reinventing reduces our code, reuses an existing ecosystem of Pi Packages, and keeps the cultural fit.
| Package | Purpose |
|---|---|
@earendil-works/pi-agent-core | General-purpose agent runtime: transport, state management, attachments |
@earendil-works/pi-ai | Unified LLM API with model discovery and provider config |
@earendil-works/pi-coding-agent | Coding agent with Read/Bash/Edit/Write + session management. SDK mode: createAgentSession(...) |
@earendil-works/pi-tui | TUI library with differential rendering (optional, for future TUI mode) |
Pi runs in four modes: interactive, print/JSON, RPC, and SDK for embedding. We use the SDK mode.
pi-coding-agent ships these built-in. We do not reimplement:
Read(path) — file with line numbers, gitignore-awareWrite(path, content) — refuses to overwriteEdit(path, old, new) — exact-string replaceBash(command, cwd?) — streaming command executionEverything else (web search, image gen, planning, etc.) is a Pi Package (a Skill or Extension), not a built-in.
pi-ai)Provider config lives in pi-ai. Supported (current list — check upstream): Anthropic, OpenAI, OpenAI-compat (Ollama, MLX server), Groq, Cerebras, XAI, and more.
Our job is to expose Settings UI that writes Pi's provider config (or pass it programmatically when we instantiate the session).
Pi explicitly rejects native MCP. From the upstream README:
"No MCP. Build CLI tools with READMEs (see Skills), or build an extension that adds MCP support." — Mario Zechner: What if you don't need MCP?
This is a deliberate philosophical choice. Pi's stance: most "tools" are better expressed as CLI binaries with --help text the agent can read, rather than as MCP servers.
For nyxterm we have three options. Do not pick one in this skill — that's a decision for epic #15:
engram as MCP server, ship an engram CLI binary; instead of context7 MCP, write a thin CLI fetcher. The agent uses Bash to invoke them. Pro: aligned with Pi. Con: re-implements MCP work the user already did in their dotfiles.Mcp tool. Pro: MCP servers (engram, context7, etc.) keep working. Con: we own that extension.Pick the option in epic #15. Until then, this skill stays agnostic.
Pi has its own extension system. We reuse it; we don't build a parallel one.
For nyxterm-specific behavior (e.g., theme-aware output, pane-aware Bash routing, Engram memory injection), we publish our own Pi Packages under @nyxterm/pi-*.
This means epic #21 ("Plugin / extension API") shrinks: we don't design our own API; we contribute upstream-shaped packages to Pi's ecosystem and document how nyxterm-flavored extensions are loaded.
Before sending each request, we inject:
<env>
<workspace-root>...</workspace-root>
<active-pane-cwd>...</active-pane-cwd>
<git-branch>...</git-branch>
<git-dirty>...</git-dirty>
<privacy-mode>...</privacy-mode>
</env>
<project-memory>
<!-- top relevant Engram observations, cap 8 KB -->
</project-memory>
Implementation: we hook into Pi's session via the SDK (likely via a pre-request hook or a custom extension that runs before the LLM call). Specifics TBD when the harness is wired in epic #12.
pi-coding-agent streams tool calls and text deltas natively. The chat UI binds to those streams. No buffering.
pi-agent-core + pi-coding-agent.pi-ai already does it.nyxterm window (or tmux pane) running another Pi session.rm, git reset, git push --force requires a confirm UI on top of Pi's tool-call event.Ctrl+;) — NL → bash via a Pi Skill that constrains output to a single shell command. User reviews + Enter to run.Bash tool calls with a nyxterm confirm UI for destructive patterns (configurable allowlist in Settings).Write outside workspace → explicit user confirm.createAgentSession({...}) from pi-coding-agent is the entry point. See packages/coding-agent/docs/usage.md upstream.pi-ai exposes provider config via constructor args or env vars — we want programmatic config from Settings, so pass them in code, not env.~/.config/pi/ (upstream default). We may want a nyxterm-scoped location too — confirm during integration.Overall stack and module shape for nyxterm. Load when touching Tauri commands, PTY wiring, frontend↔backend IPC, or xterm rendering.
Conventional Commits, work-unit commits, NO Co-Authored-By. Load before creating any commit.
Project philosophy and decision-making heuristics. Load before scope debates, feature proposals, or refactors.
Engram embedded + MCP fallback. Topic key conventions. Load when touching anything memory-related or starting/closing a session.
Native windows/splits/panes (absorb tmux). Load when touching multiplex module, keybinds, or session persistence.
Flake structure, Home Manager module, nixGL wrapper. Load when touching flake.nix, packaging, or NixOS integration.