.pi — Pi Coding Agent Integration
This directory contains the Pi adapter for ECC — a thin extension that connects the @earendil-works/pi-coding-agent terminal coding agent to ECC's canonical skills, prompts, and lifecycle hooks.
Design Principle
ECC's canonical assets—skills, agents, commands, and hooks—remain the single source of truth. This adapter contains only the integration logic. No copies, no duplication.
What This Provides
- ECC's skills from
./skills/— available in Pi as/skill:<name> - ECC's commands from
./commands/— available in Pi as/<name> - ECC's engineering rules from
./rules/common/— injected into Pi's system prompt on every turn, so coding style, testing, security, git workflow, and code-review standards apply in Pi as they do in other harnesses - Session lifecycle hooks — ECC's SessionStart and SessionEnd hooks, run through ECC's own
run-with-flags.js, soECC_HOOK_PROFILEandECC_DISABLED_HOOKSkeep working under Pi - Session context injection — whatever ECC's SessionStart hook returns as
additionalContextis folded into Pi's system prompt for the next turn /ecc-doctor— diagnostic command to verify the integration
Verified against Pi 0.84.1: a global install exposes 285 skills and 94 commands, resolved directly from skills/ and commands/, with no generated copies.
Installation
Option 1: Global Installation (Recommended)
# Install ECC as a Pi package
pi install git:github.com/affaan-m/ECC
# Or from a local checkout
pi install /path/to/ECC
# Or project-local only
pi install -l /path/to/ECC
# Verify
pi listThen inside Pi, run /ecc-doctor to confirm skills, commands, and hooks are available.
To uninstall:
pi remove git:github.com/affaan-m/ECCOption 2: Zero-Install (Existing Claude Code Users)
If you already have ECC installed for Claude Code, point Pi at the same canonical directories from ~/.pi/agent/settings.json:
{
"skills": ["~/.claude/skills"],
"prompts": ["~/.claude/commands"]
}This gives you skills and commands directly. It does not include the lifecycle hook adapter or /ecc-doctor — use Option 1 for the full integration.
How It Works
The extensions/index.ts file handles:
- Skill and command mounting — Pi reads
./skillsand./commandsdirectly via thepikey inpackage.json. No transformation is needed: ECC'sSKILL.mdfiles already follow the Agent Skills standard Pi implements, and ECC's command frontmatter (description,argument-hint) is already Pi's prompt-template format - Lifecycle hooks — Maps Pi's
session_startto ECC'ssession:starthook (scripts/hooks/session-start.js) and Pi'ssession_shutdownto ECC'ssession:end:markerhook (scripts/hooks/session-end-marker.js), both invoked throughscripts/hooks/run-with-flags.jsso ECC's profile and disable flags are honored - Rule injection — Reads ECC's portable engineering rules from the canonical
rules/common/directory at runtime and appends them to the system prompt inside an