Feat/pi integrations#2352
Conversation
…liance - Added .pi/extensions/index.ts to map Pi session hooks into ECC hooks - Created scripts/build-pi.js to generate Pi payloads (.pi/prompts, .pi/skills, .pi/agents) from canonical sources - Added planner.chain.md and reviewer.chain.md to .pi/chains/ - Updated package.json 'pi' block and 'files' array for package publication - Cleaned up research and planning artifacts - Updated harness-adapter-compliance.js to explicitly support Pi natively - Updated README.md with Pi integration details
The ECC Pi extension was failing to load with:
Failed to load extension: (0 , _piAgentCore.createModuleLogger) is not a function
Root cause:
- @earendil-works/pi-agent-core@0.80.2 does not export createModuleLogger
- CodeAgentEvents is not exported from @earendil-works/pi-coding-agent
Changes:
- Replace createModuleLogger import with a local console-based logger
- Use EventBus type (exported) instead of CodeAgentEvents
- Use app.events directly instead of app.get(Symbol.for('AgentEvents'))
- Fix factory return type: ExtensionFactory expects void | Promise<void>
|
Too many files changed for review. ( |
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
|
Important Review skippedToo many files! This PR contains 438 files, which is 288 over the limit of 150. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (438)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
daltino
left a comment
There was a problem hiding this comment.
DECISION: APPROVE
This PR adds several useful domain-specific agents to the .pi/agents directory, each with well-defined roles, tools, and focus areas. The descriptions, model specifications, and "Prompt Defense Baseline" sections are consistent and align with contribution guidelines. Documentation appears clear and the agents' scopes are appropriate and proactive. This is a solid contribution!
What Changed
This PR adds first-class support for the Pi coding agent runtime to ECC.
Pi package integration
Added Pi package metadata and resource declarations for global installation through
pi install.Added Pi-specific resources under
.pi/, including:Added global package loading support while preserving project-level override behavior.
ECC runtime integration
Skills and rules
Subagent support
Workflow chains
Hook and lifecycle integration
Documentation and tests
Why This Change
ECC supports multiple coding-agent harnesses, but Pi previously had no first-class integration.
Pi provides the extension lifecycle, package loading, skills, prompts, and tool APIs needed to run ECC workflows. The following companion extensions provide equivalents for several Claude-specific primitives used by ECC:
pi-subagentsfor bounded agent delegation and workflow chains@juicesharp/rpiv-ask-user-questionfor structured clarification and approval gates@juicesharp/rpiv-todofor persistent workflow and task stateThis integration allows Pi users to use ECC’s planning, TDD, verification, code-review, security-review, and delivery workflows without maintaining a separate copy of ECC content.
The implementation follows ECC’s cross-harness architecture:
The primary installation model is global:
This makes ECC available across Pi projects while still allowing repository-specific overrides through
.pi/.Testing Done
Package and installation testing
Tested loading the repository directly with Pi:
Tested global installation from a local checkout or Git source:
Verified that Pi discovers the package extensions, prompts, skills, agents, and chains.
Verified that the package can be removed without leaving managed package entries behind.
Verified global defaults and project-level override precedence.
Runtime testing
Verified ECC runtime startup and diagnostic commands.
Verified detection of:
pi-subagentsask_user_questiontodoVerified graceful degradation when an optional companion extension is unavailable.
Verified profile selection and resource filtering.
Verified rule injection without duplicate prompt content.
Workflow testing
Hook testing
Automated validation
node tests/run-all.js)Additional commands executed:
Type of Change
fix:Bug fixfeat:New featurerefactor:Code refactoringdocs:Documentationtest:Testschore:Maintenance/toolingci:CI/CD changesSecurity & Quality Checklist
ghp_,sk-,AKIA,xoxb, andxoxppatterns checked)Additional security considerations:
Documentation
Documentation includes:
Known Limitations
pi-subagents.@juicesharp/rpiv-ask-user-question.@juicesharp/rpiv-todo.Compatibility
Tested with:
<version>pi-subagents:<version>@juicesharp/rpiv-ask-user-question:<version>@juicesharp/rpiv-todo:<version><version><operating systems tested>Installation
Recommended companion packages:
After installation, run the ECC diagnostic command inside Pi to confirm that all resources and optional capabilities are available.