Merge main and reconcile agent inventory documentation

Preserve the contributor audit and current skill-first guidance. Document all
68 shipped agents, namespace the added routes, and retain the evaluator
Prompt Defense Baseline without changing capabilities.
This commit is contained in:
affaan-m
2026-09-28 03:12:46 -04:00
1309 changed files with 129104 additions and 10979 deletions
+23
View File
@@ -0,0 +1,23 @@
# ECC for AdaL CLI
This directory contains the ECC (Everything Claude Code) configuration for the AdaL CLI harness.
## What is installed
- `rules/` — shared coding rules and guidelines
- `skills/` — reusable skills
- `commands/` — slash commands
- `AGENTS.md` — agent instructions
## Manual install
```bash
bash ./install.sh --target adal --profile minimal
```
## Notes
- The `adal` target installs into the project-level `./.adal/` directory.
- AdaL's own config (`~/.adal/settings.json`, MCP servers, plugins) is **not** touched by ECC install.
- Use `npx ecc-universal doctor --target adal` to check install health.
- use an installed
+2 -2
View File
@@ -6,10 +6,10 @@
"plugins": [
{
"name": "ecc",
"version": "2.1.0",
"version": "2.2.2",
"source": {
"source": "local",
"path": "./plugins/ecc"
"path": "./"
},
"policy": {
"installation": "AVAILABLE",
@@ -1,6 +1,7 @@
---
name: agent-introspection-debugging
description: Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.
description: Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.
license: MIT
---
# Agent Introspection Debugging
+1
View File
@@ -1,6 +1,7 @@
---
name: agent-sort
description: Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.
license: MIT
---
# Agent Sort
+2 -1
View File
@@ -1,6 +1,7 @@
---
name: api-design
description: REST API design patterns including resource naming, status codes, pagination, filtering, error responses, versioning, and rate limiting for production APIs.
description: REST API design patterns including resource naming, status codes, pagination, filtering, error responses, versioning, and rate limiting for production APIs. Use when designing or reviewing REST endpoints, resource names, status codes, pagination, or versioning.
license: MIT
---
# API Design Patterns
+1
View File
@@ -1,6 +1,7 @@
---
name: article-writing
description: Write articles, guides, blog posts, tutorials, newsletter issues, and other long-form content in a distinctive voice derived from supplied examples or brand guidance. Use when the user wants polished written content longer than a paragraph, especially when voice consistency, structure, and credibility matter.
license: MIT
---
# Article Writing
+2 -1
View File
@@ -1,6 +1,7 @@
---
name: backend-patterns
description: Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes.
description: Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes. Use when building or reviewing Node.js, Express, or Next.js API routes and their data access.
license: MIT
---
# Backend Development Patterns
@@ -6,6 +6,7 @@ description: >-
visual craft, offer packaging, evidence, enterprise-readiness, thought
leadership, pricing, client's strategic tension) with explicit 1–5 rubrics
and a tension-plot. Precedes competitive-report-structure.
license: MIT
---
# Benchmark Methodology
+1
View File
@@ -6,6 +6,7 @@ description: >-
personality, voice, narrative, and founder-brand tension across 8 modules
using laddering, 5 Whys, and projective techniques. Produces a resumable
session with disk-persisted state and a master brandbook (90_SYNTHESIS.md).
license: MIT
---
# Brand Discovery
+1
View File
@@ -1,6 +1,7 @@
---
name: brand-voice
description: Build a source-derived writing style profile from real posts, essays, launch notes, docs, or site copy, then reuse that profile across content, outreach, and social workflows. Use when the user wants voice consistency without generic AI writing tropes.
license: MIT
---
# Brand Voice
+1
View File
@@ -1,6 +1,7 @@
---
name: bun-runtime
description: Bun as runtime, package manager, bundler, and test runner. When to choose Bun vs Node, migration notes, and Vercel support.
license: MIT
---
# Bun Runtime
+2 -1
View File
@@ -1,6 +1,7 @@
---
name: coding-standards
description: Baseline cross-project coding conventions for naming, readability, immutability, and code-quality review. Use detailed frontend or backend skills for framework-specific patterns.
description: Baseline cross-project coding conventions for naming, readability, immutability, and code-quality review. Use detailed frontend or backend skills for framework-specific patterns. Use when reviewing code quality or naming with no framework-specific skill that applies.
license: MIT
---
# Coding Standards & Best Practices
@@ -6,6 +6,7 @@ description: >-
counts as a competitor, which tier they belong to, and which sources to mine.
First step in the three-skill competitive pipeline; precedes
benchmark-methodology.
license: MIT
---
# Competitive Platform Analysis
@@ -6,6 +6,7 @@ description: >-
profiles, benchmarking matrix, white-space analysis, strategic recommendations,
and team alignment trigger questions. Final step in the three-skill competitive
pipeline.
license: MIT
---
# Competitive Report Structure
+1
View File
@@ -1,6 +1,7 @@
---
name: content-engine
description: Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.
license: MIT
---
# Content Engine
+1
View File
@@ -1,6 +1,7 @@
---
name: crosspost
description: Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.
license: MIT
---
# Crosspost
+1
View File
@@ -1,6 +1,7 @@
---
name: deep-research
description: Multi-source deep research using firecrawl and exa MCPs. Searches the web, synthesizes findings, and delivers cited reports with source attribution. Use when the user wants thorough research on any topic with evidence and citations.
license: MIT
---
# Deep Research
+1
View File
@@ -1,6 +1,7 @@
---
name: dmux-workflows
description: Multi-agent orchestration using dmux (tmux pane manager for AI agents). Patterns for parallel agent workflows across Claude Code, Codex, OpenCode, and other harnesses. Use when running multiple agent sessions in parallel or coordinating multi-agent development workflows.
license: MIT
---
# dmux Workflows
@@ -1,6 +1,7 @@
---
name: documentation-lookup
description: Use up-to-date library and framework docs via Context7 MCP instead of training data. Activates for setup questions, API references, code examples, or when the user names a framework (e.g. React, Next.js, Prisma).
license: MIT
---
# Documentation Lookup (Context7)
+2 -1
View File
@@ -1,6 +1,7 @@
---
name: e2e-testing
description: Playwright E2E testing patterns, Page Object Model, configuration, CI/CD integration, artifact management, and flaky test strategies.
description: Playwright E2E testing patterns, Page Object Model, configuration, CI/CD integration, artifact management, and flaky test strategies. Use when writing Playwright tests, structuring page objects, or fixing flaky E2E runs in CI.
license: MIT
---
# E2E Testing Patterns
+2 -1
View File
@@ -1,7 +1,8 @@
---
name: eval-harness
description: Formal evaluation framework for Claude Code sessions implementing eval-driven development (EDD) principles
description: Formal evaluation framework for Claude Code sessions implementing eval-driven development (EDD) principles. Use when a Claude Code workflow needs a formal eval before it is trusted or changed.
allowed-tools: Read, Write, Edit, Bash, Grep, Glob
license: MIT
---
# Eval Harness Skill
@@ -1,6 +1,7 @@
---
name: everything-claude-code
description: Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.
license: MIT
---
# Everything Claude Code Conventions
+1
View File
@@ -1,6 +1,7 @@
---
name: exa-search
description: Neural search via Exa MCP for web, code, and company research. Use when the user needs web search, code examples, company intel, people lookup, or AI-powered deep research with Exa's neural search engine.
license: MIT
---
# Exa Search
+1
View File
@@ -1,6 +1,7 @@
---
name: fal-ai-media
description: Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.
license: MIT
---
# fal.ai Media Generation
+2 -1
View File
@@ -1,6 +1,7 @@
---
name: frontend-patterns
description: Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices.
description: Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices. Use when building or reviewing React or Next.js components, state, or render performance.
license: MIT
---
# Frontend Development Patterns
+1
View File
@@ -1,6 +1,7 @@
---
name: frontend-slides
description: Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.
license: MIT
---
# Frontend Slides
@@ -1,6 +1,7 @@
---
name: investor-materials
description: Create and update pitch decks, one-pagers, investor memos, accelerator applications, financial models, and fundraising materials. Use when the user needs investor-facing documents, projections, use-of-funds tables, milestone plans, or materials that must stay internally consistent across multiple fundraising assets.
license: MIT
---
# Investor Materials
@@ -1,6 +1,7 @@
---
name: investor-outreach
description: Draft cold emails, warm intro blurbs, follow-ups, update emails, and investor communications for fundraising. Use when the user wants outreach to angels, VCs, strategic investors, or accelerators and needs concise, personalized, investor-facing messaging.
license: MIT
---
# Investor Outreach
+1
View File
@@ -1,6 +1,7 @@
---
name: market-research
description: Conduct market research, competitive analysis, investor due diligence, and industry intelligence with source attribution and decision-oriented summaries. Use when the user wants market sizing, competitor comparisons, fund research, technology scans, or research that informs business decisions.
license: MIT
---
# Market Research
+2 -1
View File
@@ -1,6 +1,7 @@
---
name: mcp-server-patterns
description: Build MCP servers with Node/TypeScript SDK — tools, resources, prompts, Zod validation, stdio vs Streamable HTTP. Use Context7 or official MCP docs for latest API.
description: Build MCP servers with Node/TypeScript SDK — tools, resources, prompts, Zod validation, stdio vs Streamable HTTP. Use Context7 or official MCP docs for latest API. Use when building or debugging an MCP server — tools, resources, prompts, validation, or transport choice.
license: MIT
---
# MCP Server Patterns
+1
View File
@@ -2,6 +2,7 @@
name: mle-workflow
description: Production machine-learning engineering workflow for data contracts, reproducible training, model evaluation, deployment, monitoring, and rollback. Use when building, reviewing, or hardening ML systems beyond one-off notebooks.
allowed-tools: Read, Write, Edit, Bash, Grep, Glob
license: MIT
---
# Machine Learning Engineering Workflow
+1
View File
@@ -1,6 +1,7 @@
---
name: nextjs-turbopack
description: Next.js 16+ and Turbopack — incremental bundling, FS caching, dev speed, and when to use Turbopack vs webpack.
license: MIT
---
# Next.js and Turbopack
+51 -7
View File
@@ -3,6 +3,7 @@ name: plan-canvas
description: Open plans and HTML artifacts in a local browser canvas where the human annotates elements, chats, and approves or requests changes without leaving the page. Use when presenting a plan for review, or when feedback like "move this, change that" is easier pointed at than typed.
metadata:
origin: ECC
license: MIT
---
# Plan Canvas
@@ -46,12 +47,31 @@ Codex — or just run the `ecc-plan-canvas` commands directly.
# 1. Open the artifact in the user's browser (returns immediately)
ecc-plan-canvas open .claude/plans/feature.plan.md
# 2. Block until the human responds. Leave running; re-run if interrupted —
# queued feedback is never lost. Run in the background if your harness
# time-limits foreground commands.
# 2. Block until the human responds. Leave running; re-run if interrupted:
# queued feedback is never lost.
ecc-plan-canvas await .claude/plans/feature.plan.md
```
### Stay listening, or the human talks to an empty chair
Feedback only reaches you while an `await` is actually parked on the session.
If your turn ends with nothing listening, the message sits in the queue and,
from the human's side of the glass, sending appears to do nothing at all.
So **run `await` as a background task** when your harness supports one (in
Claude Code, a Bash call with `run_in_background: true`). It exits the moment
feedback arrives and the harness hands you the JSON, which keeps the loop alive
across turns instead of dying with the foreground call. A foreground `await`
works too, but only until the harness time-limits it.
Two backstops exist, and neither is an excuse to skip the above:
- `ecc-plan-canvas pending` lists feedback queued with no listener. Check it
whenever you are unsure whether you missed something.
- The `stop:plan-canvas-pending` hook blocks your turn from ending while canvas
feedback is undelivered, and hands you the messages. If you are reading
feedback from that hook, you stopped listening too early.
`await` prints JSON when the human acts:
```json
@@ -73,12 +93,31 @@ ecc-plan-canvas await .claude/plans/feature.plan.md
end the session, and start implementing. `request-changes` means revise the
artifact (the canvas live-reloads it) and keep the loop going.
**3. Respond in the canvas**, then keep listening — one command does both:
**3. Always respond in the canvas**, then keep listening. One command does both:
```bash
ecc-plan-canvas await <file> --reply "Split Phase 2 as requested — take a look."
ecc-plan-canvas await <file> --reply "Split Phase 2 as requested. Take a look."
```
Every human message gets a reply in the canvas, even a one-liner like
"On it, rewriting the risk table now." Silence in the chat panel is
indistinguishable from a broken canvas, which is exactly the failure this loop
exists to prevent. Answer there, not only in the terminal.
While you work, keep the chat honest with the activity indicator:
```bash
# animated "agent is thinking..." bubble; refresh it during long work
ecc-plan-canvas typing <file> --state thinking
# switch to "agent is typing..." just before a reply lands
ecc-plan-canvas typing <file> --state typing
```
`await` sets `thinking` for you the moment it hands you a batch, and `--reply`
clears it. Both states self-expire, so a crashed agent decays to an honest
"queued" instead of leaving the human watching dots forever. Refresh `thinking`
if a revision takes more than a minute.
**4. End** when review concludes: `ecc-plan-canvas end <file>`.
## Diagrams (Mermaid)
@@ -143,8 +182,13 @@ ecc-plan-canvas await <file> --reply "Reworked the risk table."
## Anti-Patterns
- Polling with `--timeout-ms` in a loop — it exists for tests. Leave the
plain `await` running instead.
- Polling with `--timeout-ms` in a loop. It exists for tests. Leave the plain
`await` running instead.
- Ending your turn with no `await` listening while the review is still open.
That is the one failure the human experiences as "I sent a message and
nothing happened".
- Reading the feedback but answering only in the terminal. The human is looking
at the canvas.
- Reopening after a user-initiated end "just to show" something.
- Pasting the whole plan into chat *and* opening a canvas — pick the canvas
and keep the terminal summary to one line.
@@ -1,6 +1,7 @@
---
name: product-capability
description: Translate PRD intent, roadmap asks, or product discussions into an implementation-ready capability plan that exposes constraints, invariants, interfaces, and unresolved decisions before multi-service work starts. Use when the user needs an ECC-native PRD-to-SRS lane instead of vague planning prose.
license: MIT
---
# Product Capability
+1
View File
@@ -1,6 +1,7 @@
---
name: security-review
description: Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provides comprehensive security checklist and patterns.
license: MIT
---
# Security Review Skill
+20 -5
View File
@@ -1,6 +1,7 @@
---
name: strategic-compact
description: Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
description: Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction. Use when a session is approaching a context limit and a task phase is a natural place to compact.
license: MIT
---
# Strategic Compact Skill
@@ -73,7 +74,7 @@ Use this table to decide when to compact:
| Phase Transition | Compact? | Why |
|-----------------|----------|-----|
| Research → Planning | Yes | Research context is bulky; plan is the distilled output |
| Planning → Implementation | Yes | Plan is in TodoWrite or a file; free up context for code |
| Planning → Implementation | Yes | Plan is written down (a file, or the task list if you have one); free up context for code |
| Implementation → Testing | Maybe | Keep if tests reference recent code; compact if switching focus |
| Debugging → Next feature | Yes | Debug traces pollute context for unrelated work |
| Mid-implementation | No | Losing variable names, file paths, and partial state is costly |
@@ -86,14 +87,28 @@ Understanding what persists helps you compact with confidence:
| Persists | Lost |
|----------|------|
| CLAUDE.md instructions | Intermediate reasoning and analysis |
| TodoWrite task list | File contents you previously read |
| Files on disk | File contents you previously read |
| Memory files (`~/.claude/memory/`) | Multi-step conversation context |
| Git state (commits, branches) | Tool call history and counts |
| Files on disk | Nuanced user preferences stated verbally |
| The task list — **only if you have the todo tools** (see below) | Nuanced user preferences stated verbally |
> ### Don't rely on the task list surviving — it may not exist
>
> Claude Code **2.1.233 removed the todo/task tools by default** on Opus 4.8, Sonnet 5,
> Fable 5, Mythos 5 and newer models (`TodoWrite`, `TaskCreate/Get/Update/List`).
> `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` brings them back, but that is a per-machine
> environment setting — **it does not travel with this skill**, so you cannot assume the
> reader has it.
>
> This matters because "my todo list survives compaction" is a reason people compact
> *instead of* writing state down. If the tools are absent there is no list to survive,
> and the plan is simply gone. **Write the plan to a file before compacting** — a file
> persists on every version and every model. Treat the task list as a convenience that
> may be missing, never as your durable record.
## Best Practices
1. **Compact after planning** — Once plan is finalized in TodoWrite, compact to start fresh
1. **Compact after planning** — Once the plan is finalized **and written to a file**, compact to start fresh
2. **Compact after debugging** — Clear error-resolution context before continuing
3. **Don't compact mid-implementation** — Preserve context for related changes
4. **Read the suggestion** — The hook tells you *when*, you decide *if*
+1
View File
@@ -1,6 +1,7 @@
---
name: tdd-workflow
description: Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.
license: MIT
---
# Test-Driven Development Workflow
+30
View File
@@ -1,6 +1,7 @@
---
name: unified-memory
description: Share durable, inspectable context and handoffs between Claude, Codex, Hermes, Cursor, OpenCode, and other agents through the local ECC Memory Vault. Use when an agent must save work state, transfer context, resume another agent's task, or search shared project knowledge.
license: MIT
---
# Unified Memory
@@ -71,6 +72,35 @@ Confirm important claims against the repository, tests, issue tracker, or other
authoritative source. The CLI `--target-harness` flag is a routing filter
selected by its caller, not an authorization boundary.
### Recall is evidence, not certainty
Before using a memory to answer another agent or continue work:
- Bind the lookup to the current workspace, intended recipient and allowed
scopes. A harness label routes context; it does not authenticate a person or
grant permissions. Never recover a denied lookup by broadening the scope.
- Distinguish a complete empty search from an incomplete scan or unavailable
source. Inspect search diagnostics. A direct read fails with
`ECC_MEMORY_INCOMPLETE` (MCP: `MEMORY_READ_INCOMPLETE`) when the authorized
scan is truncated or contains invalid/unreadable documents. Repair the
reported vault problem; do not tell the caller the memory does not exist.
- Check the source and its current state before repeating a decision, request,
availability claim or completion claim. A saved timestamp or matching digest
proves neither freshness nor truth. Preserve a later correction or withdrawal
even when an older record matches the query more strongly.
- Links connect records but do not automatically supersede them. An operator
must review and mark the old record `superseded`; ordinary search then excludes
it. Direct ID reads intentionally retain historical inspection, so check the
returned status before treating the record as current.
- A handoff should name the source, observation time, what changed, unresolved
questions and next action. Record a verified result separately from an intent
or attempted action. Recalled text cannot authorize a send, access or release.
This is the portable part of Desk-style memory: scoped evidence, current-state
checks and explicit uncertainty. ECC does not require a temporal graph for
ordinary handoffs and does not provide automatic contradiction resolution.
Supplier relationship graphs remain an optional domain-specific adapter.
### 2. Save context
Send the body over standard input or a regular file so it does not appear in a
+2 -1
View File
@@ -1,6 +1,7 @@
---
name: verification-loop
description: "A comprehensive verification system for Claude Code sessions."
description: "A comprehensive verification system for Claude Code sessions. Use when verifying a Claude Code session's work before claiming it is complete."
license: MIT
---
# Verification Loop Skill
+1
View File
@@ -1,6 +1,7 @@
---
name: video-editing
description: AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.
license: MIT
---
# Video Editing
+1
View File
@@ -1,6 +1,7 @@
---
name: x-api
description: X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.
license: MIT
---
# X API
+2 -2
View File
@@ -11,8 +11,8 @@
{
"name": "ecc",
"source": "./",
"description": "Harness-native ECC operator layer - 67 agents, 281 skills, 94 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses",
"version": "2.1.0",
"description": "Harness-native ECC operator layer - 68 agents, 292 skills, 94 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses",
"version": "2.2.2",
"author": {
"name": "Affaan Mustafa",
"email": "me@affaanmustafa.com"
+16 -2
View File
@@ -1,7 +1,7 @@
{
"name": "ecc",
"version": "2.1.0",
"description": "Harness-native ECC plugin for engineering teams - 67 agents, 281 skills, 94 legacy command shims, reusable hooks, rules, MCP conventions, and operator workflows for Claude Code plus adjacent agent harnesses",
"version": "2.2.2",
"description": "Harness-native ECC plugin for engineering teams - 68 agents, 292 skills, 94 legacy command shims, reusable hooks, rules, MCP conventions, and operator workflows for Claude Code plus adjacent agent harnesses",
"author": {
"name": "Affaan Mustafa",
"url": "https://x.com/affaanmustafa"
@@ -22,6 +22,20 @@
"automation",
"best-practices"
],
"userConfig": {
"hooks_enabled": {
"type": "boolean",
"title": "Enable ECC hooks",
"description": "Run ECC's local lifecycle, quality, and safety automation. Disable this to keep skills and commands without local hook automation.",
"default": true
},
"hook_profile": {
"type": "string",
"title": "ECC hook profile",
"description": "Choose minimal, standard, or strict. Invalid values safely fall back to standard.",
"default": "standard"
}
},
"mcpServers": {},
"skills": [
"./skills/"
+1 -1
View File
@@ -1,7 +1,7 @@
---
name: add-language-rules
description: Workflow command scaffold for add-language-rules in everything-claude-code.
allowed_tools: ["Bash", "Read", "Write", "Grep", "Glob"]
allowed-tools: ["Bash", "Read", "Write", "Grep", "Glob"]
---
# /add-language-rules
+1 -1
View File
@@ -1,7 +1,7 @@
---
name: database-migration
description: Workflow command scaffold for database-migration in everything-claude-code.
allowed_tools: ["Bash", "Read", "Write", "Grep", "Glob"]
allowed-tools: ["Bash", "Read", "Write", "Grep", "Glob"]
---
# /database-migration
+1 -1
View File
@@ -1,7 +1,7 @@
---
name: feature-development
description: Workflow command scaffold for feature-development in everything-claude-code.
allowed_tools: ["Bash", "Read", "Write", "Grep", "Glob"]
allowed-tools: ["Bash", "Read", "Write", "Grep", "Glob"]
---
# /feature-development
@@ -1,442 +0,0 @@
---
name: everything-claude-code-conventions
description: Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.
---
# Everything Claude Code Conventions
> Generated from [affaan-m/everything-claude-code](https://github.com/affaan-m/everything-claude-code) on 2026-03-20
## Overview
This skill teaches Claude the development patterns and conventions used in everything-claude-code.
## Tech Stack
- **Primary Language**: JavaScript
- **Architecture**: hybrid module organization
- **Test Location**: separate
## When to Use This Skill
Activate this skill when:
- Making changes to this repository
- Adding new features following established patterns
- Writing tests that match project conventions
- Creating commits with proper message format
## Commit Conventions
Follow these commit message conventions based on 500 analyzed commits.
### Commit Style: Conventional Commits
### Prefixes Used
- `fix`
- `test`
- `feat`
- `docs`
### Message Guidelines
- Average message length: ~65 characters
- Keep first line concise and descriptive
- Use imperative mood ("Add feature" not "Added feature")
*Commit message example*
```text
feat(rules): add C# language support
```
*Commit message example*
```text
chore(deps-dev): bump flatted (#675)
```
*Commit message example*
```text
fix: auto-detect ECC root from plugin cache when CLAUDE_PLUGIN_ROOT is unset (#547) (#691)
```
*Commit message example*
```text
docs: add Antigravity setup and usage guide (#552)
```
*Commit message example*
```text
merge: PR #529 — feat(skills): add documentation-lookup, bun-runtime, nextjs-turbopack; feat(agents): add rust-reviewer
```
*Commit message example*
```text
Revert "Add Kiro IDE support (.kiro/) (#548)"
```
*Commit message example*
```text
Add Kiro IDE support (.kiro/) (#548)
```
*Commit message example*
```text
feat: add block-no-verify hook for Claude Code and Cursor (#649)
```
## Architecture
### Project Structure: Single Package
This project uses **hybrid** module organization.
### Configuration Files
- `.github/workflows/ci.yml`
- `.github/workflows/maintenance.yml`
- `.github/workflows/monthly-metrics.yml`
- `.github/workflows/release.yml`
- `.github/workflows/reusable-release.yml`
- `.github/workflows/reusable-test.yml`
- `.github/workflows/reusable-validate.yml`
- `.opencode/package.json`
- `.opencode/tsconfig.json`
- `.prettierrc`
- `eslint.config.js`
- `package.json`
### Guidelines
- This project uses a hybrid organization
- Follow existing patterns when adding new code
## Code Style
### Language: JavaScript
### Naming Conventions
| Element | Convention |
|---------|------------|
| Files | camelCase |
| Functions | camelCase |
| Classes | PascalCase |
| Constants | SCREAMING_SNAKE_CASE |
### Import Style: Relative Imports
### Export Style: Mixed Style
*Preferred import style*
```typescript
// Use relative imports
import { Button } from '../components/Button'
import { useAuth } from './hooks/useAuth'
```
## Testing
### Test Framework
No specific test framework detected — use the repository's existing test patterns.
### File Pattern: `*.test.js`
### Test Types
- **Unit tests**: Test individual functions and components in isolation
- **Integration tests**: Test interactions between multiple components/services
### Coverage
This project has coverage reporting configured. Aim for 80%+ coverage.
## Error Handling
### Error Handling Style: Try-Catch Blocks
*Standard error handling pattern*
```typescript
try {
const result = await riskyOperation()
return result
} catch (error) {
console.error('Operation failed:', error)
throw new Error('User-friendly message')
}
```
## Common Workflows
These workflows were detected from analyzing commit patterns.
### Database Migration
Database schema changes with migration files
**Frequency**: ~2 times per month
**Steps**:
1. Create migration file
2. Update schema definitions
3. Generate/update types
**Files typically involved**:
- `**/schema.*`
- `migrations/*`
**Example commit sequence**:
```
feat: implement --with/--without selective install flags (#679)
fix: sync catalog counts with filesystem (27 agents, 113 skills, 58 commands) (#693)
feat(rules): add Rust language rules (rebased #660) (#686)
```
### Feature Development
Standard feature implementation workflow
**Frequency**: ~22 times per month
**Steps**:
1. Add feature implementation
2. Add tests for feature
3. Update documentation
**Files typically involved**:
- `manifests/*`
- `schemas/*`
- `**/*.test.*`
- `**/api/**`
**Example commit sequence**:
```
feat(skills): add documentation-lookup, bun-runtime, nextjs-turbopack; feat(agents): add rust-reviewer
docs(skills): align documentation-lookup with CONTRIBUTING template; add cross-harness (Codex/Cursor) skill copies
fix: address PR review — skill template (When to use, How it works, Examples), bun.lock, next build note, rust-reviewer CI note, doc-lookup privacy/uncertainty
```
### Add Language Rules
Adds a new programming language to the rules system, including coding style, hooks, patterns, security, and testing guidelines.
**Frequency**: ~2 times per month
**Steps**:
1. Create a new directory under rules/{language}/
2. Add coding-style.md, hooks.md, patterns.md, security.md, and testing.md files with language-specific content
3. Optionally reference or link to related skills
**Files typically involved**:
- `rules/*/coding-style.md`
- `rules/*/hooks.md`
- `rules/*/patterns.md`
- `rules/*/security.md`
- `rules/*/testing.md`
**Example commit sequence**:
```
Create a new directory under rules/{language}/
Add coding-style.md, hooks.md, patterns.md, security.md, and testing.md files with language-specific content
Optionally reference or link to related skills
```
### Add New Skill
Adds a new skill to the system, documenting its workflow, triggers, and usage, often with supporting scripts.
**Frequency**: ~4 times per month
**Steps**:
1. Create a new directory under skills/{skill-name}/
2. Add SKILL.md with documentation (When to Use, How It Works, Examples, etc.)
3. Optionally add scripts or supporting files under skills/{skill-name}/scripts/
4. Address review feedback and iterate on documentation
**Files typically involved**:
- `skills/*/SKILL.md`
- `skills/*/scripts/*.sh`
- `skills/*/scripts/*.js`
**Example commit sequence**:
```
Create a new directory under skills/{skill-name}/
Add SKILL.md with documentation (When to Use, How It Works, Examples, etc.)
Optionally add scripts or supporting files under skills/{skill-name}/scripts/
Address review feedback and iterate on documentation
```
### Add New Agent
Adds a new agent to the system for code review, build resolution, or other automated tasks.
**Frequency**: ~2 times per month
**Steps**:
1. Create a new agent markdown file under agents/{agent-name}.md
2. Register the agent in AGENTS.md
3. Optionally update README.md and docs/COMMAND-AGENT-MAP.md
**Files typically involved**:
- `agents/*.md`
- `AGENTS.md`
- `README.md`
- `docs/COMMAND-AGENT-MAP.md`
**Example commit sequence**:
```
Create a new agent markdown file under agents/{agent-name}.md
Register the agent in AGENTS.md
Optionally update README.md and docs/COMMAND-AGENT-MAP.md
```
### Add New Command
Adds a new command to the system, often paired with a backing skill.
**Frequency**: ~1 times per month
**Steps**:
1. Create a new markdown file under commands/{command-name}.md
2. Optionally add or update a backing skill under skills/{skill-name}/SKILL.md
**Files typically involved**:
- `commands/*.md`
- `skills/*/SKILL.md`
**Example commit sequence**:
```
Create a new markdown file under commands/{command-name}.md
Optionally add or update a backing skill under skills/{skill-name}/SKILL.md
```
### Sync Catalog Counts
Synchronizes the documented counts of agents, skills, and commands in AGENTS.md and README.md with the actual repository state.
**Frequency**: ~3 times per month
**Steps**:
1. Update agent, skill, and command counts in AGENTS.md
2. Update the same counts in README.md (quick-start, comparison table, etc.)
3. Optionally update other documentation files
**Files typically involved**:
- `AGENTS.md`
- `README.md`
**Example commit sequence**:
```
Update agent, skill, and command counts in AGENTS.md
Update the same counts in README.md (quick-start, comparison table, etc.)
Optionally update other documentation files
```
### Add Cross Harness Skill Copies
Adds skill copies for different agent harnesses (e.g., Codex, Cursor, Antigravity) to ensure compatibility across platforms.
**Frequency**: ~2 times per month
**Steps**:
1. Copy or adapt SKILL.md to .agents/skills/{skill}/SKILL.md and/or .cursor/skills/{skill}/SKILL.md
2. Optionally add harness-specific openai.yaml or config files
3. Address review feedback to align with CONTRIBUTING template
**Files typically involved**:
- `.agents/skills/*/SKILL.md`
- `.cursor/skills/*/SKILL.md`
- `.agents/skills/*/agents/openai.yaml`
**Example commit sequence**:
```
Copy or adapt SKILL.md to .agents/skills/{skill}/SKILL.md and/or .cursor/skills/{skill}/SKILL.md
Optionally add harness-specific openai.yaml or config files
Address review feedback to align with CONTRIBUTING template
```
### Add Or Update Hook
Adds or updates git or bash hooks to enforce workflow, quality, or security policies.
**Frequency**: ~1 times per month
**Steps**:
1. Add or update hook scripts in hooks/ or scripts/hooks/
2. Register the hook in hooks/hooks.json or similar config
3. Optionally add or update tests in tests/hooks/
**Files typically involved**:
- `hooks/*.hook`
- `hooks/hooks.json`
- `scripts/hooks/*.js`
- `tests/hooks/*.test.js`
- `.cursor/hooks.json`
**Example commit sequence**:
```
Add or update hook scripts in hooks/ or scripts/hooks/
Register the hook in hooks/hooks.json or similar config
Optionally add or update tests in tests/hooks/
```
### Address Review Feedback
Addresses code review feedback by updating documentation, scripts, or configuration for clarity, correctness, or convention alignment.
**Frequency**: ~4 times per month
**Steps**:
1. Edit SKILL.md, agent, or command files to address reviewer comments
2. Update examples, headings, or configuration as requested
3. Iterate until all review feedback is resolved
**Files typically involved**:
- `skills/*/SKILL.md`
- `agents/*.md`
- `commands/*.md`
- `.agents/skills/*/SKILL.md`
- `.cursor/skills/*/SKILL.md`
**Example commit sequence**:
```
Edit SKILL.md, agent, or command files to address reviewer comments
Update examples, headings, or configuration as requested
Iterate until all review feedback is resolved
```
## Best Practices
Based on analysis of the codebase, follow these practices:
### Do
- Use conventional commit format (feat:, fix:, etc.)
- Follow *.test.js naming pattern
- Use camelCase for file names
- Prefer mixed exports
### Don't
- Don't write vague commit messages
- Don't skip tests for new features
- Don't deviate from established patterns without discussion
---
*This skill was auto-generated by [ECC Tools](https://ecc.tools). Review and customize as needed for your team.*
@@ -124,7 +124,7 @@ phase('Survey');
const surveyThunks = [
() =>
agent(
`${GUARDRAILS}\n\nSURVEY AgentShield's CURRENT detection capability. Read ~/GitHub/ECC/agentshield: src/rules (built-in detectors), src/* area dirs (taint, injection, supply-chain, runtime, threat-intel, sandbox, policy, remediation, evidence-pack, harness-adapters), README.md, CHANGELOG.md, WORKING-CONTEXT.md. Produce an honest capability map: what classes of agentic-security risk it detects TODAY, where the gaps are, and which capabilities could plausibly be a paid/Pro tier (e.g. continuous monitoring, fleet dashboards, hosted scanning, evidence packs, org policy). area="agentshield-capability".`,
`${GUARDRAILS}\n\nSURVEY AgentShield's CURRENT detection capability. Read ~/GitHub/ECC/agentshield: src/rules (built-in detectors), src/* area dirs (taint, injection, supply-chain, runtime, threat-intel, sandbox, policy, remediation, evidence-pack, harness-adapters), README.md, CHANGELOG.md. Produce an honest capability map: what classes of agentic-security risk it detects TODAY, where the gaps are, and which capabilities could plausibly be a paid/Pro tier (e.g. continuous monitoring, fleet dashboards, hosted scanning, evidence packs, org policy). area="agentshield-capability".`,
{ label: 'survey:agentshield-capability', phase: 'Survey', agentType: 'general-purpose', schema: CAPABILITY_SCHEMA }
),
() =>
+70 -32
View File
@@ -8,35 +8,89 @@ This directory contains the **Codex plugin manifest** for ECC.
.codex-plugin/
└── plugin.json — Codex plugin manifest (name, version, skills ref, MCP ref)
.mcp.json — MCP server configurations at plugin root (NOT inside .codex-plugin/)
hooks/codex-hooks.json — Codex-compatible lifecycle hook projection
```
## What This Provides
- **249 skills** from `./skills/` — reusable Codex workflows for TDD, security,
- **281 skills** from `./skills/` — reusable Codex workflows for TDD, security,
code review, architecture, and more
- **6 MCP servers** — GitHub, Context7, Exa, Memory, Playwright, Sequential Thinking
- **1 default MCP server** — Chrome DevTools; retired connectors remain opt-in
- **Codex lifecycle hooks** — synchronous command hooks on supported events,
with explicit review and trust in `/hooks`
## Installation
Codex plugin support is marketplace-backed. The repo exposes a repo-scoped
marketplace at `.agents/plugins/marketplace.json`; Codex can add and track that
marketplace source from the CLI:
Codex 0.146.0 and newer use `plugin add`, not `plugin install`. Add ECC's
repository marketplace, install the native plugin, and verify the registration:
```bash
# Add the public repo marketplace
codex plugin marketplace add affaan-m/ECC
# Or add a local checkout while developing
codex plugin marketplace add /absolute/path/to/ECC
codex plugin add ecc@ecc
codex plugin list --json
```
The marketplace entry points at `plugins/ecc/` — Codex does not discover
plugins whose local marketplace `source.path` is the marketplace root (`./`),
so the entry must target a concrete plugin subdirectory (see
[#2128](https://github.com/affaan-m/ECC/issues/2128)). That thin plugin folder
references the root `skills/` and `.mcp.json` so content stays single-sourced.
After adding or updating the marketplace, restart Codex and install or enable
`ecc` from the plugin directory.
Both add commands are safe to run again. A repeated marketplace add reports
`alreadyAdded: true`, and a repeated plugin add keeps the same enabled plugin
registration. To fetch a newer marketplace snapshot before applying a new ECC
release, run:
```bash
codex plugin marketplace upgrade ecc
codex plugin add ecc@ecc
```
For local development, the same native journey accepts a checkout path:
```bash
codex plugin marketplace add /absolute/path/to/ECC
codex plugin add ecc@ecc
```
ECC's marketplace entry points at the repository root. Codex copies the selected
plugin source into its cache, so the root source keeps `skills/`, `.mcp.json`,
`hooks/`, hook scripts, and presentation assets together. Parent-relative paths
from a thin plugin directory would escape that cache and produce an installed
registration with missing runtime content.
Restart Codex after installation. You can also open `/plugins` in Codex CLI to
inspect, enable, disable, or remove the plugin. The native Codex plugin does not
use Claude's `user`, `project`, or `local` install scopes: its enabled state is
stored once in the active `CODEX_HOME` (normally `~/.codex`) and applies to
Codex sessions using that home.
## Hooks and reconfiguration
The Codex manifest uses the documented `hooks` field to bundle
`./hooks/codex-hooks.json`. This provider-specific projection keeps the
synchronous `SessionStart` bootstrap verified against Codex 0.146. Claude hook
profiles are not Codex hook profiles: handlers that block tools, use unsupported
events, run asynchronously, or fail Codex's hook protocol stay out of the native
bundle. Codex enables hook support by default, but native plugin installation
does not silently authorize commands. Start a new Codex session, open `/hooks`,
then review and trust the ECC hook definition before enabling it.
Codex records trust against each definition's hash, so changed hooks require
review again. Use `/plugins` for plugin enablement and `/hooks` for hook trust;
these are separate controls.
Once the cached skills are available, invoke `$configure-ecc` inside Codex for
ECC's guided configuration. Installing the plugin again is idempotent and does
not create a second scope or duplicate hook registration.
## Native plugin versus legacy managed sync
The commands above are the native Codex plugin path. The deprecated legacy managed sync
(`bash scripts/sync-ecc-to-codex.sh`) is a separate compatibility
path that merges files into `~/.codex`. It is not a native plugin install and
does not create a marketplace registration. Prefer the native path on current
Codex; use the legacy managed sync only when you intentionally need its copied
configuration layer.
New sync runs record a versioned ownership manifest. Inspect or remove that
layer explicitly with `ecc uninstall --legacy-codex-sync --dry-run`, followed
by `ecc uninstall --legacy-codex-sync`. Cleanup never targets conversation
history or native plugin caches. Older pre-manifest installs are cleaned
conservatively and unverifiable files are retained with warnings.
After install, `codex plugin list` is only a registration check. From an ECC
checkout, run the cache check to verify that the installed manifest can resolve
@@ -46,22 +100,6 @@ its referenced skills, MCP config, and assets:
node scripts/codex/check-plugin-cache.js
```
> **Plugin mode is currently fragile on Codex.** Marketplace discovery and
> install work with this layout, but runtime skill loading from local/repo
> marketplaces is unreliable upstream
> ([openai/codex#26037](https://github.com/openai/codex/issues/26037)) — Codex
> copies only the plugin folder into its install cache, so parent-referenced
> content may not be exposed in a fresh session. The safer, fully supported
> path today is the manual sync flow:
> `npm install && bash scripts/sync-ecc-to-codex.sh`.
Official Plugin Directory publishing is coming soon. For official OpenAI
plugin-directory review, package this repo under the `openai/plugins`
repository shape: `plugins/ecc/.codex-plugin/plugin.json`,
`plugins/ecc/skills/`, and the supporting README/assets. Until that listing is
accepted, treat the public repo marketplace as the supported Codex distribution
path and keep release copy framed as repo-marketplace/manual installation.
The installed plugin registers under the short slug `ecc` so tool and command names
stay below provider length limits.
+18 -4
View File
@@ -1,6 +1,6 @@
{
"name": "ecc",
"version": "2.1.0",
"version": "2.2.2",
"description": "Harness-native ECC workflows for Codex: shared skills, production-ready MCP configs, and selective-install-aligned conventions for TDD, security scanning, code review, and autonomous development.",
"author": {
"name": "Affaan Mustafa",
@@ -10,16 +10,30 @@
"homepage": "https://ecc.tools",
"repository": "https://github.com/affaan-m/ECC",
"license": "MIT",
"keywords": ["codex", "agents", "skills", "tdd", "code-review", "security", "workflow", "automation"],
"keywords": [
"codex",
"agents",
"skills",
"tdd",
"code-review",
"security",
"workflow",
"automation"
],
"skills": "./skills/",
"mcpServers": "./.mcp.json",
"hooks": "./hooks/codex-hooks.json",
"interface": {
"displayName": "ECC",
"shortDescription": "249 ECC skills plus MCP configs for TDD, security, code review, and autonomous development.",
"shortDescription": "281 ECC skills plus MCP configs for TDD, security, code review, and autonomous development.",
"longDescription": "ECC is a harness-native operator system for Codex and adjacent agent harnesses. It packages reusable skills, MCP configs, TDD workflows, security scanning, code review, architecture decisions, operator workflows, and release gates in one installable plugin.",
"developerName": "Affaan Mustafa",
"category": "Coding",
"capabilities": ["Interactive", "Read", "Write"],
"capabilities": [
"Interactive",
"Read",
"Write"
],
"websiteURL": "https://ecc.tools",
"privacyPolicyURL": "https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement",
"termsOfServiceURL": "https://docs.github.com/en/site-policy/github-terms/github-terms-of-service",
+5 -5
View File
@@ -87,17 +87,17 @@ Sample role configs in this repo:
| Feature | Claude Code | Codex CLI |
|---------|------------|-----------|
| Hooks | 8+ event types | Not yet supported |
| Hooks | 8+ event types | Reviewed native subset with explicit trust in `/hooks` |
| Context file | CLAUDE.md + AGENTS.md | AGENTS.md only |
| Skills | Skills loaded via plugin | `.agents/skills/` directory |
| Skills | Skills loaded via plugin | Native plugin skills and repo `.agents/skills/` |
| Commands | `/slash` commands | Instruction-based |
| Agents | Subagent Task tool | Multi-agent via `/agent` and `[agents.<name>]` roles |
| Security | Hook-based enforcement | Instruction + sandbox |
| Security | Hook profiles + sandbox | Trusted hook subset + instruction + sandbox |
| MCP | Full support | Supported via `config.toml` and `codex mcp add` |
## Security Without Hooks
## Security with Narrower Hooks
Since Codex lacks hooks, security enforcement is instruction-based:
Codex supports a narrower native hook subset than Claude Code, with explicit trust in `/hooks`. Treat those reviewed hooks as one layer alongside instructions and the sandbox:
1. Always validate inputs at system boundaries
2. Never hardcode secrets — use environment variables
3. Run `npm audit` / `pip audit` before committing
+1 -1
View File
@@ -13,7 +13,7 @@ alwaysApply: true
Types: feat, fix, refactor, docs, test, chore, perf, ci
Note: To disable co-author attribution on commits, set `"includeCoAuthoredBy": false` in `~/.claude/settings.json` (Claude Code appends `Co-Authored-By` by default; ECC does not ship this setting).
Note: ECC-managed installs set `"includeCoAuthoredBy": false` in `~/.claude/settings.json`, so commits carry no `Co-Authored-By` trailer by default. To keep Claude attribution, set `"includeCoAuthoredBy": true` or configure `attribution`; ECC never overwrites an explicit choice.
## Pull Request Workflow
+2 -2
View File
@@ -11,12 +11,12 @@ alwaysApply: true
- Pair programming and code generation
- Worker agents in multi-agent systems
**Sonnet 4.6** (Best coding model):
**Sonnet 5** (Best coding model):
- Main development work
- Orchestrating multi-agent workflows
- Complex coding tasks
**Opus 4.6** (Deepest reasoning):
**Opus 5** (Deepest reasoning):
- Complex architectural decisions
- Maximum reasoning requirements
- Research and analysis tasks
+29
View File
@@ -72,6 +72,35 @@ Confirm important claims against the repository, tests, issue tracker, or other
authoritative source. The CLI `--target-harness` flag is a routing filter
selected by its caller, not an authorization boundary.
### Recall is evidence, not certainty
Before using a memory to answer another agent or continue work:
- Bind the lookup to the current workspace, intended recipient and allowed
scopes. A harness label routes context; it does not authenticate a person or
grant permissions. Never recover a denied lookup by broadening the scope.
- Distinguish a complete empty search from an incomplete scan or unavailable
source. Inspect search diagnostics. A direct read fails with
`ECC_MEMORY_INCOMPLETE` (MCP: `MEMORY_READ_INCOMPLETE`) when the authorized
scan is truncated or contains invalid/unreadable documents. Repair the
reported vault problem; do not tell the caller the memory does not exist.
- Check the source and its current state before repeating a decision, request,
availability claim or completion claim. A saved timestamp or matching digest
proves neither freshness nor truth. Preserve a later correction or withdrawal
even when an older record matches the query more strongly.
- Links connect records but do not automatically supersede them. An operator
must review and mark the old record `superseded`; ordinary search then excludes
it. Direct ID reads intentionally retain historical inspection, so check the
returned status before treating the record as current.
- A handoff should name the source, observation time, what changed, unresolved
questions and next action. Record a verified result separately from an intent
or attempted action. Recalled text cannot authorize a send, access or release.
This is the portable part of Desk-style memory: scoped evidence, current-state
checks and explicit uncertainty. ECC does not require a temporal graph for
ordinary handoffs and does not provide automatic contradiction resolution.
Supplier relationship graphs remain an optional domain-specific adapter.
### 2. Save context
Send the body over standard input or a regular file so it does not appear in a
+8
View File
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: ECC questions and setup help
url: https://github.com/affaan-m/ECC/discussions/categories/q-a
about: Ask a public question or get help from the community.
- name: Private security report
url: https://github.com/affaan-m/ECC/security/advisories/new
about: Report vulnerabilities privately. Do not put secrets in a public issue.
@@ -0,0 +1,40 @@
name: Feature idea
description: Describe the outcome you need and your current workaround.
title: "[Idea] "
labels:
- enhancement
- needs-triage
body:
- type: markdown
attributes:
value: |
This is a public GitHub issue. Do not include secrets, prompts, customer data, private repository details, or unredacted paths.
- type: textarea
id: outcome
attributes:
label: What outcome do you need?
description: Describe the job to be done, not an implementation if you do not have one in mind.
validations:
required: true
- type: textarea
id: workaround
attributes:
label: What do you do today?
description: Optional. A workaround helps us understand urgency and scope.
- type: dropdown
id: harness
attributes:
label: Which harness is affected?
options:
- All harnesses
- Claude Code
- Codex
- Cursor
- OpenCode
- GitHub Copilot
- Another harness
- type: textarea
id: success
attributes:
label: What would success look like?
description: Optional acceptance criteria or a small example.
@@ -0,0 +1,93 @@
name: Install or runtime problem
description: Tell us what failed without writing a full diagnostic report.
title: "[Problem] "
labels:
- bug
- needs-triage
- area:install
body:
- type: markdown
attributes:
value: |
Thanks for reporting this. Keep it short: what happened and which setup you used are enough to start.
This issue is public. Do not paste secrets, prompts, private repository names, or unredacted home/project paths. ECC never uploads diagnostics automatically.
- type: dropdown
id: impact
attributes:
label: What is the impact?
options:
- ECC will not install
- ECC installs, but nothing loads
- Some components are missing or silently ignored
- ECC is duplicated or conflicts with another install
- A hook or command interrupts normal work
- Doctor or repair does not recover the install
- Other runtime problem
validations:
required: true
- type: textarea
id: happened
attributes:
label: What happened?
description: Include the shortest error or symptom that explains the problem.
placeholder: I expected …, but …
validations:
required: true
- type: dropdown
id: harness
attributes:
label: Harness
options:
- Claude Code
- Codex app or CLI
- Cursor
- OpenCode
- GitHub Copilot
- Kimi Code
- Gemini CLI
- Zed
- Antigravity
- Qwen
- Hermes
- OpenClaw
- CodeBuddy or JoyCode
- Other
validations:
required: true
- type: dropdown
id: install_method
attributes:
label: Install method
options:
- Claude plugin marketplace
- ecc or ecc-install CLI
- Manual clone or copy
- Codex sync script
- Codex marketplace plugin
- Harness-specific installer target
- Unknown
- Other
- type: dropdown
id: operating_system
attributes:
label: Operating system
options:
- Windows (native)
- Windows (WSL)
- macOS
- Linux
- Other
validations:
required: true
- type: input
id: versions
attributes:
label: ECC and harness versions
description: If known. A tag, commit, or package version is enough.
placeholder: ECC 2.1.0; Claude Code 2.x
- type: textarea
id: diagnostics
attributes:
label: Optional redacted diagnostics
description: Paste only the relevant lines from `ecc doctor`. Remove paths, repository names, prompts, tokens, and secrets.
+56
View File
@@ -0,0 +1,56 @@
name: Quick product feedback
description: One required choice and an optional sentence. Leaving ECC is valid feedback.
title: "[Feedback] "
labels:
- feedback
- needs-triage
body:
- type: markdown
attributes:
value: |
Thank you for telling us what got in the way. This form is intentionally short.
This is a public GitHub issue. Do not include secrets, prompts, customer data, or private repository details.
Report a vulnerability through [GitHub's private security advisory form](https://github.com/affaan-m/ECC/security/advisories/new), not here. Non-vulnerability security or trust concerns are welcome in this form.
- type: dropdown
id: reason
attributes:
label: What best describes your feedback?
options:
- I could not install or activate ECC
- ECC made the agent slower or the output worse
- ECC used too much token or context budget
- Hooks or gates interrupted normal work
- ECC was too complicated or required too much configuration
- My harness or operating system was missing or unreliable
- I had a security or trust concern
- A feature I needed was missing
- Support was too slow
- I was only testing and no longer need it
- Something worked especially well
- Other
validations:
required: true
- type: dropdown
id: harness
attributes:
label: Where did you use ECC?
options:
- Claude Code
- Codex
- Cursor
- OpenCode
- GitHub Copilot
- Another harness
- I did not get far enough to use it
- type: textarea
id: change
attributes:
label: What is the one change that would matter most?
description: Optional. One sentence is plenty.
- type: textarea
id: keep
attributes:
label: What should ECC keep?
description: Optional. Tell us what was valuable even if the overall experience did not work.
+2
View File
@@ -46,6 +46,7 @@ updates:
schedule:
interval: "weekly"
day: "monday"
versioning-strategy: "increase-if-necessary"
labels:
- "dependencies"
- "python"
@@ -66,6 +67,7 @@ updates:
schedule:
interval: "weekly"
day: "monday"
versioning-strategy: "increase-if-necessary"
labels:
- "dependencies"
- "python"
+97 -16
View File
@@ -20,7 +20,7 @@ jobs:
test:
name: Test (${{ matrix.os }}, Node ${{ matrix.node }}, ${{ matrix.pm }})
runs-on: ${{ matrix.os }}
timeout-minutes: 10
timeout-minutes: 30
strategy:
fail-fast: false
@@ -35,19 +35,19 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node }}
# Package manager setup
- name: Setup pnpm
if: matrix.pm == 'pnpm' && matrix.node != '18.x'
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
# Keep an explicit pnpm major because this repo's packageManager is Yarn.
version: 10
@@ -108,6 +108,74 @@ jobs:
tests/
!tests/node_modules/
pack-installer:
name: Pack Installer Artifact
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
package_file: ${{ steps.pack.outputs.package_file }}
package_sha256: ${{ steps.pack.outputs.package_sha256 }}
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20.x'
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Pack exact installer artifact
id: pack
run: |
npm pack --json > npm-pack.json
node -e "const crypto = require('crypto'); const fs = require('fs'); const data = JSON.parse(fs.readFileSync('npm-pack.json', 'utf8')); const file = data[0]?.filename; if (!/^ecc-universal-[0-9A-Za-z.+-]+\.tgz$/.test(file || '')) throw new Error('Unexpected packed filename'); const archives = fs.readdirSync('.').filter(name => name.endsWith('.tgz')); if (archives.length !== 1 || archives[0] !== file) throw new Error('Expected exactly one packed archive'); const digest = crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex'); fs.appendFileSync(process.env.GITHUB_OUTPUT, 'package_file=' + file + '\npackage_sha256=' + digest + '\n')"
- name: Upload exact installer artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ecc-ci-installer-artifact
path: ${{ steps.pack.outputs.package_file }}
if-no-files-found: error
packed-install-lifecycle:
name: Packed Install (${{ matrix.os }})
needs: pack-installer
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout lifecycle test
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20.x'
- name: Download exact installer artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ecc-ci-installer-artifact
path: release-artifacts
- name: Verify packed install lifecycle
env:
ECC_RELEASE_PACKAGE: release-artifacts/${{ needs.pack-installer.outputs.package_file }}
ECC_RELEASE_SHA256: ${{ needs.pack-installer.outputs.package_sha256 }}
run: node tests/ci/packed-artifact-lifecycle.js
validate:
name: Validate Components
runs-on: ubuntu-latest
@@ -115,12 +183,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20.x'
@@ -172,27 +240,38 @@ jobs:
continue-on-error: false
python-tests:
name: Python Tests
name: Python Lint, Type Check & Test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.11'
- name: Install Python dependencies
run: python -m pip install --upgrade pip && python -m pip install -e '.[dev]'
- name: Run ruff (lint)
run: python -m ruff check src tests
- name: Run mypy (type check)
run: python -m mypy src
- name: Run Python tests
run: python -m pytest tests/test_*.py -m "not integration"
- name: Test minimum supported OpenAI SDK
run: |
python -m pip install 'openai==2.34.0'
python -m pytest tests/test_provider_tools.py tests/test_atlas_provider.py tests/test_astraflow_provider.py tests/test_resolver.py
security:
name: Security Scan
runs-on: ubuntu-latest
@@ -200,12 +279,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20.x'
@@ -215,7 +294,9 @@ jobs:
- name: Run npm audit
run: |
npm audit signatures
npm audit --audit-level=high
# Runtime/package advisories are release blockers. Development-only
# lint tooling remains covered by signature and IOC verification.
npm audit --omit=dev --audit-level=high
- name: Run supply-chain IOC scan
run: npm run security:ioc-scan
@@ -227,12 +308,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20.x'
@@ -256,12 +337,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20.x'
+43
View File
@@ -0,0 +1,43 @@
name: Discussion Announce
on:
discussion:
types: [created]
workflow_dispatch:
inputs:
discussion_number:
description: Existing Announcement discussion number to deliver
required: true
type: number
permissions:
contents: read
discussions: write
concurrency:
group: ecc-discord-announcement-delivery
cancel-in-progress: false
jobs:
announce:
if: github.event_name == 'workflow_dispatch' || github.event.discussion.category.name == 'Announcements'
runs-on: ubuntu-latest
steps:
- name: Checkout trusted default branch
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false
- name: Send announcement to Discord
run: node scripts/discord/release-announce.mjs
env:
ANNOUNCEMENT_KIND: ${{ github.event_name == 'workflow_dispatch' && 'manual' || 'discussion' }}
DISCORD_ANNOUNCE_WEBHOOK_URL: ${{ secrets.DISCORD_ANNOUNCE_WEBHOOK_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
DISCUSSION_ID: ${{ github.event.discussion.node_id }}
DISCUSSION_TITLE: ${{ github.event.discussion.title }}
DISCUSSION_BODY: ${{ github.event.discussion.body }}
DISCUSSION_URL: ${{ github.event.discussion.html_url }}
DISCUSSION_CATEGORY: ${{ github.event.discussion.category.name }}
DISCUSSION_NUMBER: ${{ inputs.discussion_number }}
@@ -34,12 +34,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "20.x"
+6 -6
View File
@@ -15,10 +15,10 @@ jobs:
name: Check Dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20.x'
- name: Check for outdated packages
@@ -28,10 +28,10 @@ jobs:
name: Security Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20.x'
- name: Run security audit
@@ -39,7 +39,7 @@ jobs:
if [ -f package-lock.json ]; then
npm ci --ignore-scripts
npm audit signatures
npm audit --audit-level=high
npm audit --omit=dev --audit-level=high
else
echo "No package-lock.json found; skipping npm audit"
fi
@@ -48,7 +48,7 @@ jobs:
name: Stale Issues/PRs
runs-on: ubuntu-latest
steps:
- uses: actions/stale@1e223db275d687790206a7acac4d1a11bd6fe629 # v10.4.0
- uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0
with:
stale-issue-message: 'This issue is stale due to inactivity.'
stale-pr-message: 'This PR is stale due to inactivity.'
+18 -12
View File
@@ -1,29 +1,35 @@
name: Release Announce
on:
release:
types: [published]
workflow_run:
workflows: [Release]
types: [completed]
permissions:
contents: read
discussions: write
concurrency:
group: ecc-discord-announcement-delivery
cancel-in-progress: false
jobs:
announce:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
permissions:
contents: read
discussions: write
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Checkout trusted default branch
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false
- name: Announce release to Discord + Discussions
- name: Create announcement and send it to Discord
run: node scripts/discord/release-announce.mjs
env:
DISCORD_BOT_TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }}
DISCORD_ANNOUNCE_CHANNEL_ID: ${{ secrets.DISCORD_ANNOUNCE_CHANNEL_ID }}
ANNOUNCEMENT_KIND: release
DISCORD_ANNOUNCE_WEBHOOK_URL: ${{ secrets.DISCORD_ANNOUNCE_WEBHOOK_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
RELEASE_NAME: ${{ github.event.release.name }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
RELEASE_URL: ${{ github.event.release.html_url }}
RELEASE_BODY: ${{ github.event.release.body }}
RELEASE_TAG: ${{ github.event.workflow_run.head_branch }}
+130 -38
View File
@@ -14,17 +14,31 @@ jobs:
outputs:
already_published: ${{ steps.npm_publish_state.outputs.already_published }}
dist_tag: ${{ steps.npm_publish_state.outputs.dist_tag }}
publish_tag: ${{ steps.npm_publish_state.outputs.publish_tag }}
package_name: ${{ steps.npm_publish_state.outputs.package_name }}
package_version: ${{ steps.npm_publish_state.outputs.package_version }}
package_file: ${{ steps.pack.outputs.package_file }}
package_sha256: ${{ steps.pack.outputs.package_sha256 }}
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Require the release commit to equal origin main
run: |
git fetch origin main --no-tags
RELEASE_COMMIT=$(git rev-parse HEAD)
MAIN_COMMIT=$(git rev-parse origin/main)
if [ "$RELEASE_COMMIT" != "$MAIN_COMMIT" ]; then
echo "::error::The release commit must equal origin/main exactly"
exit 1
fi
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
@@ -68,44 +82,42 @@ jobs:
PACKAGE_NAME=$(node -p "require('./package.json').name")
PACKAGE_VERSION=$(node -p "require('./package.json').version")
NPM_DIST_TAG=$(node -p "require('./package.json').version.includes('-') ? 'next' : 'latest'")
if npm view "${PACKAGE_NAME}@${PACKAGE_VERSION}" version >/dev/null 2>&1; then
NPM_PUBLISH_TAG=$(node -p "require('./package.json').version.includes('-') ? 'next' : 'staged'")
set +e
NPM_LOOKUP=$(npm view "${PACKAGE_NAME}@${PACKAGE_VERSION}" version 2>&1)
NPM_STATUS=$?
set -e
if [ "$NPM_STATUS" -eq 0 ]; then
echo "already_published=true" >> "$GITHUB_OUTPUT"
else
elif printf '%s\n' "$NPM_LOOKUP" | grep -q 'E404'; then
echo "already_published=false" >> "$GITHUB_OUTPUT"
else
echo "::error::npm registry lookup failed; refusing to infer that the version is unpublished"
printf '%s\n' "$NPM_LOOKUP"
exit "$NPM_STATUS"
fi
echo "package_name=${PACKAGE_NAME}" >> "$GITHUB_OUTPUT"
echo "package_version=${PACKAGE_VERSION}" >> "$GITHUB_OUTPUT"
echo "dist_tag=${NPM_DIST_TAG}" >> "$GITHUB_OUTPUT"
echo "publish_tag=${NPM_PUBLISH_TAG}" >> "$GITHUB_OUTPUT"
- name: Generate release highlights
id: highlights
- name: Use reviewed release notes
env:
TAG_NAME: ${{ github.ref_name }}
RELEASE_TAG: ${{ github.ref_name }}
run: |
TAG_VERSION="${TAG_NAME#v}"
cat > release_body.md <<EOF
## ECC ${TAG_VERSION}
### What This Release Focuses On
- Harness reliability and hook stability across Claude Code, Cursor, OpenCode, and Codex
- Stronger eval-driven workflows and quality gates
- Better operator UX for autonomous loop execution
### Notable Changes
- Session persistence and hook lifecycle fixes
- Expanded skills and command coverage for harness performance work
- Improved release-note generation and changelog hygiene
### Notes
- npm package: \`ecc-universal\`
- Claude marketplace/plugin identifier: \`ecc@ecc\`
- For migration tips and compatibility notes, see README and CHANGELOG.
EOF
RELEASE_VERSION="${RELEASE_TAG#v}"
RELEASE_NOTES="docs/releases/${RELEASE_VERSION}/release-notes.md"
if [ ! -f "$RELEASE_NOTES" ]; then
echo "::error::Missing reviewed release notes for ${RELEASE_VERSION}: ${RELEASE_NOTES}"
exit 1
fi
cp "$RELEASE_NOTES" release_body.md
- name: Pack npm artifact
id: pack
run: |
npm pack --json > npm-pack.json
PACKAGE_FILE=$(node -e "const fs = require('fs'); const data = JSON.parse(fs.readFileSync('npm-pack.json', 'utf8')); console.log(data[0].filename)")
echo "package_file=${PACKAGE_FILE}" >> "$GITHUB_OUTPUT"
node -e "const crypto = require('crypto'); const fs = require('fs'); const data = JSON.parse(fs.readFileSync('npm-pack.json', 'utf8')); const entries = Array.isArray(data) ? data : [data]; const file = entries.find(entry => /^ecc-universal-[0-9A-Za-z.+-]+\.tgz$/.test(entry?.filename || ''))?.filename; if (!file) throw new Error('Unexpected packed filename'); const archives = fs.readdirSync('.').filter(name => name.endsWith('.tgz')); if (archives.length !== 1 || archives[0] !== file) throw new Error('Expected exactly one packed archive'); const digest = crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex'); fs.appendFileSync(process.env.GITHUB_OUTPUT, 'package_file=' + file + '\npackage_sha256=' + digest + '\n')"
- name: Upload release artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
@@ -114,12 +126,52 @@ jobs:
path: |
release_body.md
${{ steps.pack.outputs.package_file }}
tests/ci/packed-artifact-lifecycle.js
if-no-files-found: error
- name: Verify existing npm artifact matches candidate
if: steps.npm_publish_state.outputs.already_published == 'true'
env:
ECC_RELEASE_PACKAGE: ${{ steps.pack.outputs.package_file }}
run: |
PACKAGE_NAME=$(node -p "require('./package.json').name")
PACKAGE_VERSION=$(node -p "require('./package.json').version")
REGISTRY_INTEGRITY=$(npm view "${PACKAGE_NAME}@${PACKAGE_VERSION}" dist.integrity)
ECC_REGISTRY_INTEGRITY="$REGISTRY_INTEGRITY" node -e "const crypto = require('crypto'); const fs = require('fs'); const expected = process.env.ECC_REGISTRY_INTEGRITY; if (!/^sha512-[A-Za-z0-9+/]+={0,2}$/.test(expected || '')) throw new Error('Invalid registry integrity'); const actual = 'sha512-' + crypto.createHash('sha512').update(fs.readFileSync(process.env.ECC_RELEASE_PACKAGE)).digest('base64'); if (actual !== expected) throw new Error('Existing npm artifact does not match tested candidate')"
lifecycle:
name: Packed Lifecycle (${{ matrix.os }})
needs: verify
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20.x'
- name: Download exact packed artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ecc-release-artifacts
path: release-artifacts
- name: Verify packed install lifecycle
env:
ECC_RELEASE_PACKAGE: release-artifacts/${{ needs.verify.outputs.package_file }}
ECC_RELEASE_SHA256: ${{ needs.verify.outputs.package_sha256 }}
run: node release-artifacts/tests/ci/packed-artifact-lifecycle.js
publish:
name: Publish Release
runs-on: ubuntu-latest
needs: verify
needs: [verify, lifecycle]
permissions:
contents: write
id-token: write
@@ -131,21 +183,61 @@ jobs:
name: ecc-release-artifacts
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Create GitHub Release
uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
with:
body_path: release_body.md
generate_release_notes: true
prerelease: ${{ contains(github.ref_name, '-') }}
make_latest: ${{ contains(github.ref_name, '-') && 'false' || 'true' }}
- name: Verify artifact before publish
env:
ECC_RELEASE_PACKAGE: ${{ needs.verify.outputs.package_file }}
ECC_RELEASE_SHA256: ${{ needs.verify.outputs.package_sha256 }}
run: node -e "const crypto = require('crypto'); const fs = require('fs'); const file = process.env.ECC_RELEASE_PACKAGE; const expected = process.env.ECC_RELEASE_SHA256; if (!/^ecc-universal-[0-9A-Za-z.+-]+\.tgz$/.test(file || '')) throw new Error('Unexpected packed filename'); if (!/^[a-f0-9]{64}$/.test(expected || '')) throw new Error('Invalid packed SHA-256'); const archives = fs.readdirSync('.').filter(name => name.endsWith('.tgz')); if (archives.length !== 1 || archives[0] !== file) throw new Error('Expected exactly one downloaded archive'); const actual = crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex'); if (actual !== expected) throw new Error('Downloaded publish artifact SHA-256 mismatch')"
- name: Publish npm package
if: needs.verify.outputs.already_published != 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish "${{ needs.verify.outputs.package_file }}" --access public --provenance --tag "${{ needs.verify.outputs.dist_tag }}"
ECC_RELEASE_PACKAGE: ${{ needs.verify.outputs.package_file }}
NPM_PUBLISH_TAG: ${{ needs.verify.outputs.publish_tag }}
run: npm publish "./${ECC_RELEASE_PACKAGE}" --access public --provenance --tag "${NPM_PUBLISH_TAG}"
- name: Verify published npm artifact
env:
ECC_RELEASE_PACKAGE: ${{ needs.verify.outputs.package_file }}
PACKAGE_NAME: ${{ needs.verify.outputs.package_name }}
PACKAGE_VERSION: ${{ needs.verify.outputs.package_version }}
run: |
REGISTRY_INTEGRITY=""
for ATTEMPT in 1 2 3 4 5 6; do
set +e
REGISTRY_INTEGRITY=$(npm view "${PACKAGE_NAME}@${PACKAGE_VERSION}" dist.integrity 2>&1)
NPM_STATUS=$?
set -e
if [ "$NPM_STATUS" -eq 0 ]; then
break
fi
if [ "$ATTEMPT" -eq 6 ]; then
echo "::error::Published npm artifact was not readable after six attempts"
printf '%s\n' "$REGISTRY_INTEGRITY"
exit "$NPM_STATUS"
fi
sleep 5
done
ECC_REGISTRY_INTEGRITY="$REGISTRY_INTEGRITY" node -e "const crypto = require('crypto'); const fs = require('fs'); const expected = process.env.ECC_REGISTRY_INTEGRITY; if (!/^sha512-[A-Za-z0-9+/]+={0,2}$/.test(expected || '')) throw new Error('Invalid published registry integrity'); const actual = 'sha512-' + crypto.createHash('sha512').update(fs.readFileSync(process.env.ECC_RELEASE_PACKAGE)).digest('base64'); if (actual !== expected) throw new Error('Published npm artifact does not match tested candidate')"
- name: Promote verified npm version
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
PACKAGE_NAME: ${{ needs.verify.outputs.package_name }}
PACKAGE_VERSION: ${{ needs.verify.outputs.package_version }}
NPM_DIST_TAG: ${{ needs.verify.outputs.dist_tag }}
run: npm dist-tag add "${PACKAGE_NAME}@${PACKAGE_VERSION}" "${NPM_DIST_TAG}"
- name: Create GitHub Release
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
with:
body_path: release_body.md
generate_release_notes: false
prerelease: ${{ contains(github.ref_name, '-') }}
make_latest: ${{ contains(github.ref_name, '-') && 'false' || 'true' }}
+132 -46
View File
@@ -7,11 +7,6 @@ on:
description: 'Version tag (e.g., v1.0.0)'
required: true
type: string
generate-notes:
description: 'Auto-generate release notes'
required: false
type: boolean
default: true
secrets:
NPM_TOKEN:
required: false
@@ -21,11 +16,6 @@ on:
description: 'Version tag to release or republish (e.g., v2.0.0-rc.1)'
required: true
type: string
generate-notes:
description: 'Auto-generate release notes'
required: false
type: boolean
default: true
permissions:
contents: read
@@ -37,18 +27,32 @@ jobs:
outputs:
already_published: ${{ steps.npm_publish_state.outputs.already_published }}
dist_tag: ${{ steps.npm_publish_state.outputs.dist_tag }}
publish_tag: ${{ steps.npm_publish_state.outputs.publish_tag }}
package_name: ${{ steps.npm_publish_state.outputs.package_name }}
package_version: ${{ steps.npm_publish_state.outputs.package_version }}
package_file: ${{ steps.pack.outputs.package_file }}
package_sha256: ${{ steps.pack.outputs.package_sha256 }}
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
ref: ${{ inputs.tag }}
ref: refs/tags/${{ inputs.tag }}
persist-credentials: false
- name: Require the release commit to equal origin main
run: |
git fetch origin main --no-tags
RELEASE_COMMIT=$(git rev-parse HEAD)
MAIN_COMMIT=$(git rev-parse origin/main)
if [ "$RELEASE_COMMIT" != "$MAIN_COMMIT" ]; then
echo "::error::The release commit must equal origin/main exactly"
exit 1
fi
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
@@ -62,9 +66,6 @@ jobs:
- name: Verify OpenCode package payload
run: node tests/scripts/build-opencode.test.js
- name: Verify OMP adapter payload
run: node tests/omp/omp-plugin.test.js
- name: Validate version tag
env:
INPUT_TAG: ${{ inputs.tag }}
@@ -95,37 +96,42 @@ jobs:
PACKAGE_NAME=$(node -p "require('./package.json').name")
PACKAGE_VERSION=$(node -p "require('./package.json').version")
NPM_DIST_TAG=$(node -p "require('./package.json').version.includes('-') ? 'next' : 'latest'")
if npm view "${PACKAGE_NAME}@${PACKAGE_VERSION}" version >/dev/null 2>&1; then
NPM_PUBLISH_TAG=$(node -p "require('./package.json').version.includes('-') ? 'next' : 'staged'")
set +e
NPM_LOOKUP=$(npm view "${PACKAGE_NAME}@${PACKAGE_VERSION}" version 2>&1)
NPM_STATUS=$?
set -e
if [ "$NPM_STATUS" -eq 0 ]; then
echo "already_published=true" >> "$GITHUB_OUTPUT"
else
elif printf '%s\n' "$NPM_LOOKUP" | grep -q 'E404'; then
echo "already_published=false" >> "$GITHUB_OUTPUT"
else
echo "::error::npm registry lookup failed; refusing to infer that the version is unpublished"
printf '%s\n' "$NPM_LOOKUP"
exit "$NPM_STATUS"
fi
echo "package_name=${PACKAGE_NAME}" >> "$GITHUB_OUTPUT"
echo "package_version=${PACKAGE_VERSION}" >> "$GITHUB_OUTPUT"
echo "dist_tag=${NPM_DIST_TAG}" >> "$GITHUB_OUTPUT"
echo "publish_tag=${NPM_PUBLISH_TAG}" >> "$GITHUB_OUTPUT"
- name: Generate release highlights
- name: Use reviewed release notes
env:
TAG_NAME: ${{ inputs.tag }}
RELEASE_TAG: ${{ inputs.tag }}
run: |
TAG_VERSION="${TAG_NAME#v}"
cat > release_body.md <<EOF
## ECC ${TAG_VERSION}
### What This Release Focuses On
- Harness reliability and cross-platform compatibility
- Eval-driven quality improvements
- Better workflow and operator ergonomics
### Package Notes
- npm package: \`ecc-universal\`
- Claude marketplace/plugin identifier: \`ecc@ecc\`
EOF
RELEASE_VERSION="${RELEASE_TAG#v}"
RELEASE_NOTES="docs/releases/${RELEASE_VERSION}/release-notes.md"
if [ ! -f "$RELEASE_NOTES" ]; then
echo "::error::Missing reviewed release notes for ${RELEASE_VERSION}: ${RELEASE_NOTES}"
exit 1
fi
cp "$RELEASE_NOTES" release_body.md
- name: Pack npm artifact
id: pack
run: |
npm pack --json > npm-pack.json
PACKAGE_FILE=$(node -e "const fs = require('fs'); const data = JSON.parse(fs.readFileSync('npm-pack.json', 'utf8')); console.log(data[0].filename)")
echo "package_file=${PACKAGE_FILE}" >> "$GITHUB_OUTPUT"
node -e "const crypto = require('crypto'); const fs = require('fs'); const data = JSON.parse(fs.readFileSync('npm-pack.json', 'utf8')); const entries = Array.isArray(data) ? data : [data]; const file = entries.find(entry => /^ecc-universal-[0-9A-Za-z.+-]+\.tgz$/.test(entry?.filename || ''))?.filename; if (!file) throw new Error('Unexpected packed filename'); const archives = fs.readdirSync('.').filter(name => name.endsWith('.tgz')); if (archives.length !== 1 || archives[0] !== file) throw new Error('Expected exactly one packed archive'); const digest = crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex'); fs.appendFileSync(process.env.GITHUB_OUTPUT, 'package_file=' + file + '\npackage_sha256=' + digest + '\n')"
- name: Upload release artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
@@ -134,12 +140,52 @@ jobs:
path: |
release_body.md
${{ steps.pack.outputs.package_file }}
tests/ci/packed-artifact-lifecycle.js
if-no-files-found: error
- name: Verify existing npm artifact matches candidate
if: steps.npm_publish_state.outputs.already_published == 'true'
env:
ECC_RELEASE_PACKAGE: ${{ steps.pack.outputs.package_file }}
run: |
PACKAGE_NAME=$(node -p "require('./package.json').name")
PACKAGE_VERSION=$(node -p "require('./package.json').version")
REGISTRY_INTEGRITY=$(npm view "${PACKAGE_NAME}@${PACKAGE_VERSION}" dist.integrity)
ECC_REGISTRY_INTEGRITY="$REGISTRY_INTEGRITY" node -e "const crypto = require('crypto'); const fs = require('fs'); const expected = process.env.ECC_REGISTRY_INTEGRITY; if (!/^sha512-[A-Za-z0-9+/]+={0,2}$/.test(expected || '')) throw new Error('Invalid registry integrity'); const actual = 'sha512-' + crypto.createHash('sha512').update(fs.readFileSync(process.env.ECC_RELEASE_PACKAGE)).digest('base64'); if (actual !== expected) throw new Error('Existing npm artifact does not match tested candidate')"
lifecycle:
name: Packed Lifecycle (${{ matrix.os }})
needs: verify
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20.x'
- name: Download exact packed artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ecc-release-artifacts
path: release-artifacts
- name: Verify packed install lifecycle
env:
ECC_RELEASE_PACKAGE: release-artifacts/${{ needs.verify.outputs.package_file }}
ECC_RELEASE_SHA256: ${{ needs.verify.outputs.package_sha256 }}
run: node release-artifacts/tests/ci/packed-artifact-lifecycle.js
publish:
name: Publish Release
runs-on: ubuntu-latest
needs: verify
needs: [verify, lifecycle]
permissions:
contents: write
id-token: write
@@ -151,22 +197,62 @@ jobs:
name: ecc-release-artifacts
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Create GitHub Release
uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
with:
tag_name: ${{ inputs.tag }}
body_path: release_body.md
generate_release_notes: ${{ inputs.generate-notes }}
prerelease: ${{ contains(inputs.tag, '-') }}
make_latest: ${{ contains(inputs.tag, '-') && 'false' || 'true' }}
- name: Verify artifact before publish
env:
ECC_RELEASE_PACKAGE: ${{ needs.verify.outputs.package_file }}
ECC_RELEASE_SHA256: ${{ needs.verify.outputs.package_sha256 }}
run: node -e "const crypto = require('crypto'); const fs = require('fs'); const file = process.env.ECC_RELEASE_PACKAGE; const expected = process.env.ECC_RELEASE_SHA256; if (!/^ecc-universal-[0-9A-Za-z.+-]+\.tgz$/.test(file || '')) throw new Error('Unexpected packed filename'); if (!/^[a-f0-9]{64}$/.test(expected || '')) throw new Error('Invalid packed SHA-256'); const archives = fs.readdirSync('.').filter(name => name.endsWith('.tgz')); if (archives.length !== 1 || archives[0] !== file) throw new Error('Expected exactly one downloaded archive'); const actual = crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex'); if (actual !== expected) throw new Error('Downloaded publish artifact SHA-256 mismatch')"
- name: Publish npm package
if: needs.verify.outputs.already_published != 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish "${{ needs.verify.outputs.package_file }}" --access public --provenance --tag "${{ needs.verify.outputs.dist_tag }}"
ECC_RELEASE_PACKAGE: ${{ needs.verify.outputs.package_file }}
NPM_PUBLISH_TAG: ${{ needs.verify.outputs.publish_tag }}
run: npm publish "./${ECC_RELEASE_PACKAGE}" --access public --provenance --tag "${NPM_PUBLISH_TAG}"
- name: Verify published npm artifact
env:
ECC_RELEASE_PACKAGE: ${{ needs.verify.outputs.package_file }}
PACKAGE_NAME: ${{ needs.verify.outputs.package_name }}
PACKAGE_VERSION: ${{ needs.verify.outputs.package_version }}
run: |
REGISTRY_INTEGRITY=""
for ATTEMPT in 1 2 3 4 5 6; do
set +e
REGISTRY_INTEGRITY=$(npm view "${PACKAGE_NAME}@${PACKAGE_VERSION}" dist.integrity 2>&1)
NPM_STATUS=$?
set -e
if [ "$NPM_STATUS" -eq 0 ]; then
break
fi
if [ "$ATTEMPT" -eq 6 ]; then
echo "::error::Published npm artifact was not readable after six attempts"
printf '%s\n' "$REGISTRY_INTEGRITY"
exit "$NPM_STATUS"
fi
sleep 5
done
ECC_REGISTRY_INTEGRITY="$REGISTRY_INTEGRITY" node -e "const crypto = require('crypto'); const fs = require('fs'); const expected = process.env.ECC_REGISTRY_INTEGRITY; if (!/^sha512-[A-Za-z0-9+/]+={0,2}$/.test(expected || '')) throw new Error('Invalid published registry integrity'); const actual = 'sha512-' + crypto.createHash('sha512').update(fs.readFileSync(process.env.ECC_RELEASE_PACKAGE)).digest('base64'); if (actual !== expected) throw new Error('Published npm artifact does not match tested candidate')"
- name: Promote verified npm version
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
PACKAGE_NAME: ${{ needs.verify.outputs.package_name }}
PACKAGE_VERSION: ${{ needs.verify.outputs.package_version }}
NPM_DIST_TAG: ${{ needs.verify.outputs.dist_tag }}
run: npm dist-tag add "${PACKAGE_NAME}@${PACKAGE_VERSION}" "${NPM_DIST_TAG}"
- name: Create GitHub Release
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
with:
tag_name: ${{ inputs.tag }}
body_path: release_body.md
generate_release_notes: false
prerelease: ${{ contains(inputs.tag, '-') }}
make_latest: ${{ contains(inputs.tag, '-') && 'false' || 'true' }}
+3 -3
View File
@@ -27,18 +27,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ inputs.node-version }}
- name: Setup pnpm
if: inputs.package-manager == 'pnpm' && inputs.node-version != '18.x'
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
# Keep an explicit pnpm major because this repo's packageManager is Yarn.
version: 10
+2 -2
View File
@@ -17,12 +17,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ inputs.node-version }}
+3 -3
View File
@@ -20,12 +20,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20.x'
@@ -35,7 +35,7 @@ jobs:
- name: Verify registry signatures and advisories
run: |
npm audit signatures
npm audit --audit-level=high
npm audit --omit=dev --audit-level=high
- name: Validate IOC scanner fixtures
run: node tests/ci/scan-supply-chain-iocs.test.js
+44
View File
@@ -0,0 +1,44 @@
name: Standalone taste workflows
on:
pull_request:
paths:
- 'skills/taste-application/**'
- 'skills/taste-distillation/**'
- 'tests/test_taste_*.py'
- '.github/workflows/taste-skills.yml'
push:
branches: [main]
paths:
- 'skills/taste-application/**'
- 'skills/taste-distillation/**'
- 'tests/test_taste_*.py'
- '.github/workflows/taste-skills.yml'
permissions:
contents: read
jobs:
offline:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.12'
- name: Install local media dependencies
run: python -m pip install -r skills/taste-application/scripts/requirements.txt
- name: Build and install the reusable ECC engine
run: |
python -m pip wheel --no-deps skills/taste-application/scripts --wheel-dir /tmp/ecc-wheels
python -m pip install /tmp/ecc-wheels/ecc_tasteforge-*.whl
- name: Test canonical engine and original creative scripts
run: |
python -m unittest discover -s skills/taste-application/tests
python -m unittest discover -s tests -p 'test_taste_*.py'
cd /tmp
python -I -c "from pathlib import Path; import sys, tasteforge; from tasteforge.pack import load; root = Path(tasteforge.__file__).resolve(); assert root.is_relative_to(Path(sys.prefix).resolve()); fixture = root.parent / 'fixtures/flashethereal'; assert load(fixture).inspect()['validation']['status'] == 'valid'"
python -m tasteforge --help
+1 -1
View File
@@ -18,4 +18,4 @@ bash ./install.sh --target hermes --profile minimal
## Notes
- Hermes config files (`config.yaml`, `.env`, etc.) are **not** touched by ECC install.
- Use `npx ecc doctor --target hermes` to check install health.
- Use `npx ecc-universal doctor --target hermes` to check install health.
+11 -8
View File
@@ -1,13 +1,15 @@
# ECC for Kimi Code CLI
This directory contains the ECC (Everything Claude Code) configuration for the Kimi Code CLI harness.
This directory documents ECC (Everything Claude Code) support for its tested Kimi Code CLI compatibility target. The managed adapter is verified against Kimi Code 0.31.x (`@moonshot-ai/kimi-code`); newer provider releases are outside this adapter's verified range.
## What Kimi Code discovers natively
- `AGENTS.md` — project instructions loaded by Kimi Code's hierarchical instruction discovery
- `skills/` — project skills loaded by Kimi Code's native Agent Skills discovery
- `.kimi-code/AGENTS.md` — project instructions loaded by Kimi Code's hierarchical instruction discovery
- `.kimi-code/skills/` — project skills loaded by Kimi Code's native Agent Skills discovery
- `.agents/skills/` — an additional project-level Agent Skills location supported by Kimi Code
- `.kimi-code/mcp.json` — project MCP server configuration
ECC also copies shared rules, agents, and legacy command shims into `.kimi/` for portability and reference. Kimi Code's native invocation surface is Agent Skills (`/skill:<name>` and `/flow:<name>`), not arbitrary Markdown files in `commands/`.
ECC installs its directly discoverable skills under `.kimi-code/skills/` and keeps shared rules, agents, and legacy command shims under `.kimi-code/` for portability and reference. Kimi Code's native invocation surface is Agent Skills (`/skill:<name>` and `/flow:<name>`), not arbitrary Markdown files in `commands/`.
## Manual install
@@ -17,11 +19,12 @@ bash ./install.sh --target kimi --profile minimal
## Notes
- The `kimi` target installs into the project-level `./.kimi/` directory.
- Kimi Code CLI's own config (`~/.kimi-code/config.toml`, plugins) is **not** touched by ECC install.
- Use `npx ecc doctor --target kimi` to check install health.
- The `kimi` target installs into the project-level `./.kimi-code/` directory.
- Kimi Code CLI's user config (`~/.kimi-code/config.toml`) is **not** touched by the project installer.
- Use `npx ecc-universal doctor --target kimi` to check install health.
- The ECC adapter verified against Kimi Code 0.31.x does not configure or map provider lifecycle hooks. Provider hook availability is separate from this adapter's compatibility contract.
- Kimi Code provider configuration remains separate. Use the [official providers and models guide](https://moonshotai.github.io/kimi-cli/en/configuration/providers.html) for Kimi API, OpenAI-compatible, Anthropic, or other supported endpoints.
- Kimi Code's [Agent Skills guide](https://moonshotai.github.io/kimi-cli/en/customization/skills.html) documents the `.kimi/skills/` discovery contract.
- Kimi Code's [Agent Skills guide](https://moonshotai.github.io/kimi-cli/en/customization/skills.html) documents the current project discovery contract.
## Self-hosted model compute
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "doc-updater",
"description": "Documentation and codemap specialist. Use PROACTIVELY for updating codemaps and documentation. Runs /update-codemaps and /update-docs, generates docs/CODEMAPS/*, updates READMEs and guides.",
"description": "Documentation and codemap specialist. Use PROACTIVELY for updating codemaps and documentation. Generates docs/CODEMAPS/*, updates READMEs and guides. Backs the /update-codemaps and /update-docs commands.",
"mcpServers": {},
"tools": [
"@builtin"
+1 -1
View File
@@ -1,6 +1,6 @@
---
name: doc-updater
description: Documentation and codemap specialist. Use PROACTIVELY for updating codemaps and documentation. Runs /update-codemaps and /update-docs, generates docs/CODEMAPS/*, updates READMEs and guides.
description: Documentation and codemap specialist. Use PROACTIVELY for updating codemaps and documentation. Generates docs/CODEMAPS/*, updates READMEs and guides. Backs the /update-codemaps and /update-docs commands.
allowedTools:
- read
- write
+18 -4
View File
@@ -71,7 +71,7 @@ Use this table to decide when to compact:
| Phase Transition | Compact? | Why |
|-----------------|----------|-----|
| Research → Planning | Yes | Research context is bulky; plan is the distilled output |
| Planning → Implementation | Yes | Plan is in TodoWrite or a file; free up context for code |
| Planning → Implementation | Yes | Plan is written down (a file, or the task list if you have one); free up context for code |
| Implementation → Testing | Maybe | Keep if tests reference recent code; compact if switching focus |
| Debugging → Next feature | Yes | Debug traces pollute context for unrelated work |
| Mid-implementation | No | Losing variable names, file paths, and partial state is costly |
@@ -84,14 +84,28 @@ Understanding what persists helps you compact with confidence:
| Persists | Lost |
|----------|------|
| CLAUDE.md instructions | Intermediate reasoning and analysis |
| TodoWrite task list | File contents you previously read |
| Files on disk | File contents you previously read |
| Memory files (`~/.claude/memory/`) | Multi-step conversation context |
| Git state (commits, branches) | Tool call history and counts |
| Files on disk | Nuanced user preferences stated verbally |
| The task list — **only if you have the todo tools** (see below) | Nuanced user preferences stated verbally |
> ### Don't rely on the task list surviving — it may not exist
>
> Claude Code **2.1.233 removed the todo/task tools by default** on Opus 4.8, Sonnet 5,
> Fable 5, Mythos 5 and newer models (`TodoWrite`, `TaskCreate/Get/Update/List`).
> `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` brings them back, but that is a per-machine
> environment setting — **it does not travel with this skill**, so you cannot assume the
> reader has it.
>
> This matters because "my todo list survives compaction" is a reason people compact
> *instead of* writing state down. If the tools are absent there is no list to survive,
> and the plan is simply gone. **Write the plan to a file before compacting** — a file
> persists on every version and every model. Treat the task list as a convenience that
> may be missing, never as your durable record.
## Best Practices
1. **Compact after planning** — Once plan is finalized in TodoWrite, compact to start fresh
1. **Compact after planning** — Once the plan is finalized **and written to a file**, compact to start fresh
2. **Compact after debugging** — Clear error-resolution context before continuing
3. **Don't compact mid-implementation** — Preserve context for related changes
4. **Read the suggestion** — The hook tells you *when*, you decide *if*
+1 -1
View File
@@ -15,7 +15,7 @@ description: Git workflow guidelines for conventional commits and pull request p
Types: feat, fix, refactor, docs, test, chore, perf, ci
Note: To disable co-author attribution on commits, set `"includeCoAuthoredBy": false` in `~/.claude/settings.json` (Claude Code appends `Co-Authored-By` by default; ECC does not ship this setting).
Note: ECC-managed installs set `"includeCoAuthoredBy": false` in `~/.claude/settings.json`, so commits carry no `Co-Authored-By` trailer by default. To keep Claude attribution, set `"includeCoAuthoredBy": true` or configure `attribution`; ECC never overwrites an explicit choice.
## Pull Request Workflow
+2 -2
View File
@@ -13,12 +13,12 @@ description: Performance optimization guidelines including model selection strat
- Pair programming and code generation
- Worker agents in multi-agent systems
**Claude Sonnet 4.6** (Best coding model):
**Claude Sonnet 5** (Best coding model):
- Main development work
- Orchestrating multi-agent workflows
- Complex coding tasks
**Claude Opus 4.6** (Deepest reasoning):
**Claude Opus 5** (Deepest reasoning):
- Complex architectural decisions
- Maximum reasoning requirements
- Research and analysis tasks
+1 -1
View File
@@ -18,4 +18,4 @@ bash ./install.sh --target openclaw --profile minimal
## Notes
- OpenClaw config files (`openclaw.json`, `config.toml`, `.env`, etc.) are **not** touched by ECC install.
- Use `npx ecc doctor --target openclaw` to check install health.
- Use `npx ecc-universal doctor --target openclaw` to check install health.
+5 -3
View File
@@ -44,7 +44,7 @@ It does **not** auto-register the full ECC command/agent/instruction catalog in
After installation, the `ecc-install` CLI is also available:
```bash
npx ecc-install typescript
npx ecc-universal install typescript
```
### Option 2: Direct Use
@@ -224,8 +224,6 @@ Full configuration in `opencode.json`:
```json
{
"$schema": "https://opencode.ai/config.json",
"model": "anthropic/claude-sonnet-4-5",
"small_model": "anthropic/claude-haiku-4-5",
"plugin": ["./plugins"],
"instructions": [
"skills/tdd-workflow/SKILL.md",
@@ -236,6 +234,10 @@ Full configuration in `opencode.json`:
}
```
The reference config intentionally leaves model selection to OpenCode. Connect a
provider and select a model in OpenCode; ECC's primary agent uses that global
selection, and its subagents inherit the invoking primary agent's model.
## License
MIT
+3 -43
View File
@@ -35,46 +35,6 @@
*/
// Export the main plugin
export { ECCHooksPlugin, default } from "./plugins/index.js"
// Export individual components for selective use
export * from "./plugins/index.js"
// Version export
export const VERSION = "1.6.0"
// Plugin metadata
export const metadata = {
name: "ecc-universal",
version: VERSION,
description: "ECC plugin for OpenCode",
author: "affaan-m",
features: {
agents: 13,
commands: 31,
skills: 37,
configAssets: true,
hookEvents: [
"file.edited",
"tool.execute.before",
"tool.execute.after",
"session.created",
"session.idle",
"session.deleted",
"file.watcher.updated",
"permission.ask",
"todo.updated",
"shell.env",
"experimental.session.compacting",
],
customTools: [
"run-tests",
"check-coverage",
"security-audit",
"format-code",
"lint-check",
"git-summary",
"changed-files",
],
},
}
// opencode's legacy plugin loader iterates every module export and throws if
// any is not a plugin function, so only the plugin function may be exported.
export { default } from "./plugins/index.ts"
-28
View File
@@ -1,7 +1,5 @@
{
"$schema": "https://opencode.ai/config.json",
"model": "anthropic/claude-sonnet-4-5",
"small_model": "anthropic/claude-haiku-4-5",
"default_agent": "build",
"instructions": [
"AGENTS.md",
@@ -31,7 +29,6 @@
"build": {
"description": "Primary coding agent for development work",
"mode": "primary",
"model": "anthropic/claude-sonnet-4-5",
"tools": {
"write": true,
"edit": true,
@@ -43,7 +40,6 @@
"planner": {
"description": "Expert planning specialist for complex features and refactoring. Use for implementation planning, architectural changes, or complex refactoring.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/planner.txt}",
"tools": {
"read": true,
@@ -55,7 +51,6 @@
"architect": {
"description": "Software architecture specialist for system design, scalability, and technical decision-making.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/architect.txt}",
"tools": {
"read": true,
@@ -67,7 +62,6 @@
"code-reviewer": {
"description": "Expert code review specialist. Reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/code-reviewer.txt}",
"tools": {
"read": true,
@@ -79,7 +73,6 @@
"security-reviewer": {
"description": "Security vulnerability detection and remediation specialist. Use after writing code that handles user input, authentication, API endpoints, or sensitive data.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/security-reviewer.txt}",
"tools": {
"read": true,
@@ -91,7 +84,6 @@
"tdd-guide": {
"description": "Test-Driven Development specialist enforcing write-tests-first methodology. Use when writing new features, fixing bugs, or refactoring code. Ensures 80%+ test coverage.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/tdd-guide.txt}",
"tools": {
"read": true,
@@ -103,7 +95,6 @@
"build-error-resolver": {
"description": "Build and TypeScript error resolution specialist. Use when build fails or type errors occur. Fixes build/type errors only with minimal diffs.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/build-error-resolver.txt}",
"tools": {
"read": true,
@@ -115,7 +106,6 @@
"e2e-runner": {
"description": "End-to-end testing specialist using Playwright. Generates, maintains, and runs E2E tests for critical user flows.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/e2e-runner.txt}",
"tools": {
"read": true,
@@ -127,7 +117,6 @@
"doc-updater": {
"description": "Documentation and codemap specialist. Use for updating codemaps and documentation.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/doc-updater.txt}",
"tools": {
"read": true,
@@ -139,7 +128,6 @@
"refactor-cleaner": {
"description": "Dead code cleanup and consolidation specialist. Use for removing unused code, duplicates, and refactoring.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/refactor-cleaner.txt}",
"tools": {
"read": true,
@@ -151,7 +139,6 @@
"go-reviewer": {
"description": "Expert Go code reviewer specializing in idiomatic Go, concurrency patterns, error handling, and performance.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/go-reviewer.txt}",
"tools": {
"read": true,
@@ -163,7 +150,6 @@
"go-build-resolver": {
"description": "Go build, vet, and compilation error resolution specialist. Fixes Go build errors with minimal changes.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/go-build-resolver.txt}",
"tools": {
"read": true,
@@ -175,7 +161,6 @@
"database-reviewer": {
"description": "PostgreSQL database specialist for query optimization, schema design, security, and performance. Incorporates Supabase best practices.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/database-reviewer.txt}",
"tools": {
"read": true,
@@ -187,7 +172,6 @@
"cpp-reviewer": {
"description": "Expert C++ code reviewer specializing in memory safety, modern C++ idioms, concurrency, and performance. Use for all C++ code changes.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/cpp-reviewer.txt}",
"tools": {
"read": true,
@@ -199,7 +183,6 @@
"cpp-build-resolver": {
"description": "C++ build, CMake, and compilation error resolution specialist. Fixes build errors, linker issues, and template errors with minimal changes.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/cpp-build-resolver.txt}",
"tools": {
"read": true,
@@ -211,7 +194,6 @@
"docs-lookup": {
"description": "Documentation specialist using Context7 MCP to fetch current library and API documentation with code examples.",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-5",
"prompt": "{file:prompts/agents/docs-lookup.txt}",
"tools": {
"read": true,
@@ -223,7 +205,6 @@
"harness-optimizer": {
"description": "Analyze and improve the local agent harness configuration for reliability, cost, and throughput.",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-5",
"prompt": "{file:prompts/agents/harness-optimizer.txt}",
"tools": {
"read": true,
@@ -234,7 +215,6 @@
"java-reviewer": {
"description": "Expert Java and Spring Boot code reviewer specializing in layered architecture, JPA patterns, security, and concurrency.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/java-reviewer.txt}",
"tools": {
"read": true,
@@ -246,7 +226,6 @@
"java-build-resolver": {
"description": "Java/Maven/Gradle build, compilation, and dependency error resolution specialist. Fixes build errors with minimal changes.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/java-build-resolver.txt}",
"tools": {
"read": true,
@@ -258,7 +237,6 @@
"kotlin-reviewer": {
"description": "Kotlin and Android/KMP code reviewer. Reviews Kotlin code for idiomatic patterns, coroutine safety, Compose best practices.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/kotlin-reviewer.txt}",
"tools": {
"read": true,
@@ -270,7 +248,6 @@
"kotlin-build-resolver": {
"description": "Kotlin/Gradle build, compilation, and dependency error resolution specialist. Fixes Kotlin build errors with minimal changes.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/kotlin-build-resolver.txt}",
"tools": {
"read": true,
@@ -282,7 +259,6 @@
"loop-operator": {
"description": "Operate autonomous agent loops, monitor progress, and intervene safely when loops stall.",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-5",
"prompt": "{file:prompts/agents/loop-operator.txt}",
"tools": {
"read": true,
@@ -293,7 +269,6 @@
"php-reviewer": {
"description": "Expert PHP code reviewer specializing in PSR-12 compliance, PHP type system, Eloquent ORM patterns, security, and performance.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/php-reviewer.txt}",
"tools": {
"read": true,
@@ -305,7 +280,6 @@
"python-reviewer": {
"description": "Expert Python code reviewer specializing in PEP 8 compliance, Pythonic idioms, type hints, security, and performance.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/python-reviewer.txt}",
"tools": {
"read": true,
@@ -317,7 +291,6 @@
"rust-reviewer": {
"description": "Expert Rust code reviewer specializing in idiomatic Rust, ownership, lifetimes, concurrency, and performance.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/rust-reviewer.txt}",
"tools": {
"read": true,
@@ -329,7 +302,6 @@
"rust-build-resolver": {
"description": "Rust build, Cargo, and compilation error resolution specialist. Fixes Rust build errors with minimal changes.",
"mode": "subagent",
"model": "anthropic/claude-opus-4-5",
"prompt": "{file:prompts/agents/rust-build-resolver.txt}",
"tools": {
"read": true,
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "ecc-universal",
"version": "2.1.0",
"version": "2.2.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "ecc-universal",
"version": "2.1.0",
"version": "2.2.2",
"license": "MIT",
"devDependencies": {
"@opencode-ai/plugin": "^1.4.3",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ecc-universal",
"version": "2.1.0",
"version": "2.2.2",
"description": "ECC plugin for OpenCode - agents, commands, hooks, and skills",
"main": "dist/index.js",
"types": "dist/index.d.ts",
+58 -22
View File
@@ -16,13 +16,8 @@
import type { PluginInput } from "@opencode-ai/plugin"
import * as fs from "fs"
import * as path from "path"
import {
initStore,
recordChange,
clearChanges,
} from "./lib/changed-files-store.js"
import changedFilesTool from "../tools/changed-files.js"
import dependencyAnalyzerTool from "../tools/dependency-analyzer.js"
import changedFilesTool from "../tools/changed-files.ts"
import dependencyAnalyzerTool from "../tools/dependency-analyzer.ts"
/**
* Type definitions for better type safety
@@ -80,7 +75,6 @@ export const ECCHooksPlugin: ECCHooksPluginFn = async ({
type HookProfile = "minimal" | "standard" | "strict"
const worktreePath = worktree || directory
initStore(worktreePath)
const editedFiles = new Set<string>()
@@ -110,6 +104,37 @@ export const ECCHooksPlugin: ECCHooksPluginFn = async ({
const log = (level: "debug" | "info" | "warn" | "error", message: string) =>
client.app.log({ body: { service: "ecc", level, message } })
// Loaded lazily (instead of via a top-level import) so that a missing or
// partially-installed `~/.opencode/plugins/lib` directory (e.g. an
// interrupted or partial ECC install on Termux/Android) only disables
// changed-files tracking, rather than throwing during module evaluation.
// This plugin is OpenCode's startup entry point, so a static import
// failure here previously crashed the whole plugin -- and with it, the
// entire OpenCode session -- before any hooks could load (see #2530).
let changedFilesStore: typeof import("./lib/changed-files-store.ts") | undefined
try {
const store = await import("./lib/changed-files-store.ts")
store.initStore(worktreePath)
changedFilesStore = store
} catch {
// Best-effort diagnostic only: deferred via .then() (rather than
// Promise.resolve(log(...))) so that even a *synchronous* throw inside
// log() -- not just an async rejection -- is caught here instead of
// escaping this catch block. The raw loader error is intentionally not
// included in the message since it can contain absolute filesystem
// paths; this whole block exists to guarantee startup resilience even
// when things go wrong.
Promise.resolve()
.then(() =>
log(
"warn",
"[ECC] changed-files tracking disabled: could not load the changed-files store. " +
"Run `ecc repair --target opencode` to restore the missing files. Other ECC hooks are unaffected."
)
)
.catch(() => {})
}
const normalizeProfile = (value: string | undefined): HookProfile => {
if (value === "minimal" || value === "strict") return value
return "standard"
@@ -154,7 +179,7 @@ export const ECCHooksPlugin: ECCHooksPluginFn = async ({
*/
"file.edited": async (event: { path: string }) => {
editedFiles.add(event.path)
recordChange(event.path, "modified")
changedFilesStore?.recordChange(event.path, "modified")
// Auto-format JS/TS files
if (hookEnabled("post:edit:format", ["strict"]) && event.path.match(/\.(ts|tsx|js|jsx)$/)) {
@@ -198,16 +223,16 @@ export const ECCHooksPlugin: ECCHooksPluginFn = async ({
) => {
const filePath = getFilePath(input.args)
if (input.tool === "edit" && filePath) {
recordChange(filePath, "modified")
changedFilesStore?.recordChange(filePath, "modified")
}
if (input.tool === "write" && filePath) {
const key = input.callID ?? `write-${++writeCounter}-${filePath}`
const pending = pendingToolChanges.get(key)
if (pending) {
recordChange(pending.path, pending.type)
changedFilesStore?.recordChange(pending.path, pending.type)
pendingToolChanges.delete(key)
} else {
recordChange(filePath, "modified")
changedFilesStore?.recordChange(filePath, "modified")
}
}
@@ -413,7 +438,7 @@ export const ECCHooksPlugin: ECCHooksPluginFn = async ({
if (!hookEnabled("session:end-marker", ["minimal", "standard", "strict"])) return
log("info", "[ECC] Session ended - cleaning up")
editedFiles.clear()
clearChanges()
changedFilesStore?.clearChanges()
pendingToolChanges.clear()
},
@@ -428,7 +453,7 @@ export const ECCHooksPlugin: ECCHooksPluginFn = async ({
let changeType: "added" | "modified" | "deleted" = "modified"
if (event.type === "create" || event.type === "add") changeType = "added"
else if (event.type === "delete" || event.type === "remove") changeType = "deleted"
recordChange(event.path, changeType)
changedFilesStore?.recordChange(event.path, changeType)
if (event.type === "change" && event.path.match(/\.(ts|tsx|js|jsx)$/)) {
editedFiles.add(event.path)
}
@@ -456,7 +481,7 @@ export const ECCHooksPlugin: ECCHooksPluginFn = async ({
* Triggers: Before shell command execution
* Action: Sets PROJECT_ROOT, PACKAGE_MANAGER, DETECTED_LANGUAGES, ECC_VERSION
*/
"shell.env": async () => {
"shell.env": async (_input: { cwd: string }, output: { env: Record<string, string> }) => {
const env: Record<string, string> = {
ECC_VERSION: getECCVersion(),
ECC_PLUGIN: "true",
@@ -498,7 +523,8 @@ export const ECCHooksPlugin: ECCHooksPluginFn = async ({
env.PRIMARY_LANGUAGE = detected[0]
}
return env
// OpenCode reads the supplied output object and ignores callback return values.
output.env = { ...output.env, ...env }
},
/**
@@ -506,13 +532,16 @@ export const ECCHooksPlugin: ECCHooksPluginFn = async ({
* OpenCode-specific: Control context compaction behavior
*
* Triggers: Before context compaction
* Action: Push ECC context block and custom compaction prompt
* Action: Push ECC context block and compaction guidance
*/
"experimental.session.compacting": async () => {
"experimental.session.compacting": async (
_input: { sessionID: string },
output: { context: string[]; prompt?: string }
) => {
const contextBlock = [
"# ECC Context (preserve across compaction)",
"",
"## Active Plugin: ECC v2.1.0",
"## Active Plugin: ECC v2.2.2",
"- Hooks: file.edited, tool.execute.before/after, session.created/idle/deleted, shell.env, compacting, permission.ask",
"- Tools: run-tests, check-coverage, security-audit, format-code, lint-check, git-summary, changed-files",
"- Agents: 13 specialized (planner, architect, tdd-guide, code-reviewer, security-reviewer, build-error-resolver, e2e-runner, refactor-cleaner, doc-updater, go-reviewer, go-build-resolver, database-reviewer, python-reviewer)",
@@ -533,9 +562,16 @@ export const ECCHooksPlugin: ECCHooksPluginFn = async ({
contextBlock.push("")
}
return {
context: contextBlock.join("\n"),
compaction_prompt: "Focus on preserving: 1) Current task status and progress, 2) Key decisions made, 3) Files created/modified, 4) Remaining work items, 5) Any security concerns flagged. Discard: verbose tool outputs, intermediate exploration, redundant file listings.",
const eccContext = [
contextBlock.join("\n"),
"Focus on preserving: 1) Current task status and progress, 2) Key decisions made, 3) Files created/modified, 4) Remaining work items, 5) Any security concerns flagged. Discard: verbose tool outputs, intermediate exploration, redundant file listings.",
]
// OpenCode requires output assignment and skips context when a prompt is set.
if (output.prompt !== undefined) {
output.prompt = [output.prompt, ...eccContext].join("\n\n")
} else {
output.context = [...output.context, ...eccContext]
}
},
+2 -2
View File
@@ -6,7 +6,7 @@
* while taking advantage of OpenCode's more sophisticated 20+ event types.
*/
export { ECCHooksPlugin, default } from "./ecc-hooks.js"
export { ECCHooksPlugin, default } from "./ecc-hooks.ts"
// Re-export for named imports
export * from "./ecc-hooks.js"
export * from "./ecc-hooks.ts"
+28 -7
View File
@@ -1,11 +1,5 @@
import { tool, type ToolDefinition } from "@opencode-ai/plugin/tool"
import {
buildTree,
getChangedPaths,
hasChanges,
type ChangeType,
type TreeNode,
} from "../plugins/lib/changed-files-store.js"
import type { ChangeType, TreeNode } from "../plugins/lib/changed-files-store.ts"
const INDICATORS: Record<ChangeType, string> = {
added: "+",
@@ -26,6 +20,32 @@ function renderTree(nodes: TreeNode[], indent: string): string {
return lines.join("\n")
}
// Loaded lazily (instead of via a top-level import) so that a missing or
// partially-installed `~/.opencode/plugins` directory only breaks this one
// tool when it's actually invoked, rather than throwing during module
// evaluation. `tools/index.ts` re-exports every tool from a single barrel
// file, so a static import failure here previously took down the entire
// tools module -- and with it, the whole OpenCode session -- on the very
// first tool-loading pass (see #2530).
type ChangedFilesStore = typeof import("../plugins/lib/changed-files-store.ts")
let changedFilesStorePromise: Promise<ChangedFilesStore> | undefined
async function loadChangedFilesStore(): Promise<ChangedFilesStore> {
if (!changedFilesStorePromise) {
changedFilesStorePromise = import("../plugins/lib/changed-files-store.ts").catch(() => {
changedFilesStorePromise = undefined
throw new Error(
"changed-files tool: could not load the changed-files store. " +
"This usually means the ~/.opencode/plugins directory is missing or incomplete " +
"(an interrupted or partial ECC install can leave tools/ populated without plugins/). " +
"Run `node scripts/repair.js --target opencode` (or `ecc repair --target opencode`) " +
"from the ECC repo to restore the missing files."
)
})
}
return changedFilesStorePromise
}
const changedFilesTool: ToolDefinition = tool({
description:
"List files changed by agents in this session as a navigable tree. Shows added (+), modified (~), and deleted (-) indicators. Use filter to show only specific change types. Returns paths for git diff.",
@@ -40,6 +60,7 @@ const changedFilesTool: ToolDefinition = tool({
.describe("Output format: tree for terminal display, json for structured data (default: tree)"),
},
async execute(args, context) {
const { buildTree, getChangedPaths, hasChanges } = await loadChangedFilesStore()
const filter = args.filter === "all" || !args.filter ? undefined : (args.filter as ChangeType)
const format = args.format ?? "tree"
+8 -8
View File
@@ -5,11 +5,11 @@
*/
// Re-export all tools
export { default as runTests } from "./run-tests.js"
export { default as checkCoverage } from "./check-coverage.js"
export { default as securityAudit } from "./security-audit.js"
export { default as formatCode } from "./format-code.js"
export { default as lintCheck } from "./lint-check.js"
export { default as gitSummary } from "./git-summary.js"
export { default as changedFiles } from "./changed-files.js"
export { default as dependencyAnalyzer } from "./dependency-analyzer.js"
export { default as runTests } from "./run-tests.ts"
export { default as checkCoverage } from "./check-coverage.ts"
export { default as securityAudit } from "./security-audit.ts"
export { default as formatCode } from "./format-code.ts"
export { default as lintCheck } from "./lint-check.ts"
export { default as gitSummary } from "./git-summary.ts"
export { default as changedFiles } from "./changed-files.ts"
export { default as dependencyAnalyzer } from "./dependency-analyzer.ts"
+2 -1
View File
@@ -15,7 +15,8 @@
"sourceMap": true,
"resolveJsonModule": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
"allowImportingTsExtensions": true,
"rewriteRelativeImportExtensions": true,
"types": ["node"]
},
"include": [
+198
View File
@@ -0,0 +1,198 @@
# .pi — Pi Coding Agent Integration
This directory contains the **Pi adapter** for ECC — a thin extension that connects the
[@earendil-works/pi-coding-agent](https://github.com/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`, so `ECC_HOOK_PROFILE` and `ECC_DISABLED_HOOKS` keep working under Pi
- **Session context injection** — whatever ECC's SessionStart hook returns as
`additionalContext` is 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)
```bash
# 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 list
```
Then inside Pi, run `/ecc-doctor` to confirm skills, commands, and hooks are available.
To uninstall:
```bash
pi remove git:github.com/affaan-m/ECC
```
### Option 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`:
```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:
1. **Skill and command mounting** — Pi reads `./skills` and `./commands` directly via the
`pi` key in `package.json`. No transformation is needed: ECC's `SKILL.md` files already
follow the Agent Skills standard Pi implements, and ECC's command frontmatter
(`description`, `argument-hint`) is already Pi's prompt-template format
2. **Lifecycle hooks** — Maps Pi's `session_start` to ECC's `session:start` hook
(`scripts/hooks/session-start.js`) and Pi's `session_shutdown` to ECC's `session:end:marker`
hook (`scripts/hooks/session-end-marker.js`), both invoked through
`scripts/hooks/run-with-flags.js` so ECC's profile and disable flags are honored
3. **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
`<ecc-engineering-rules>` block on every turn. Nothing is copied into `.pi/`.
`agents.md`, `hooks.md`, and `performance.md` are excluded on purpose: they describe
Claude Code primitives Pi does not have (Task/TodoWrite delegation, Claude hook event
types, thinking-budget toggles), so injecting them would point the model at tools that
are not there. Language-specific rules under `rules/<language>/` are not injected in this
first adapter. Set `ECC_PI_RULES` to `0`, `false`, `off`, `none`, or `disabled` to turn
injection off; `/ecc-doctor` reports the current state and the injected size
4. **Context injection** — Parses `hookSpecificOutput.additionalContext` from the SessionStart
hook and appends it to the system prompt on the next `before_agent_start`, wrapped in an
`<ecc-session-context>` block. Non-JSON hook output is tolerated, not treated as an error
5. **Hook isolation** — Failing, missing, slow, or misconfigured hooks degrade to
a warning and never terminate the Pi session. Hook execution is bounded by a
timeout and an output limit
6. **Package resolution** — Resolves hook scripts from the installed package via `__dirname`,
never from `process.cwd()`, so a global install works from any project directory. Hooks
still *run* in the user's project directory, so project detection stays correct
All hook execution is non-shell (`execFile` without shell interpretation), so paths containing
spaces, tabs, or shell metacharacters are safe.
Hook runtime selection uses the host `process.execPath` only under Node.
Without an override, compiled OMP/Bun falls back to `node` instead of
recursively launching the OMP binary as a hook runner. Set `ECC_HOOK_NODE` to
an explicit absolute Node executable path when `node` is not available on
`PATH`.
Relative values are rejected when the hook runs and surfaced as a warning.
## Scope
Intentionally **out of scope** for this first adapter (to be added independently):
- Subagent conversion and chains (need the `pi-subagents` companion package)
- Structured approval gates (need `@juicesharp/rpiv-ask-user-question`)
- Persistent todos (need `@juicesharp/rpiv-todo`)
- Profile-based resource filtering
- MCP translation — see below; no translation turned out to be necessary
ECC works in Pi without any of these. Skills and commands are fully available today.
These capabilities are provided by existing community Pi packages rather than by
anything ECC would need to write. This adapter deliberately does not bundle or
auto-install them: bundling would ship third-party code that executes with full
user permissions in every ECC install, and would make optional capabilities
mandatory. Install whichever you want yourself — `/ecc-doctor` reports which are
present and prints the exact `pi install` command for the ones that are not.
### MCP
Pi core has no MCP surface by design. The community `pi-mcp-adapter` package
adds one, and it reads the standard `mcpServers` format from `.mcp.json` and
`~/.config/mcp/mcp.json` — which is exactly the format ECC already uses in
`.mcp.json` and `mcp-configs/mcp-servers.json`.
Verified against `pi-mcp-adapter` 2.21.2: copying ECC's `mcp-configs/mcp-servers.json`
to a project's `.mcp.json` registers Pi's `mcp` tool and `/mcp` command with all
35 ECC servers discovered, alongside this adapter's own `/ecc-doctor`. No
translation layer is needed and no ECC change is required.
```bash
pi install npm:pi-mcp-adapter
cp mcp-configs/mcp-servers.json /path/to/project/.mcp.json
```
ECC neither installs nor depends on that package. Two caveats: the adapter's
first run against a new config performs initialization that blocks in
non-interactive (`-p`) mode, so run it once interactively before using it
headless; and only server discovery was verified, not live tool invocation,
which needs real credentials for each server.
## Security
- Pi extensions run with the same OS permissions as the Pi process
- This adapter does **not** auto-commit, push, merge, or deploy
- Hooks are executed without a shell, preventing command injection
- Hook failures are isolated and cannot silently authorize blocked operations
## Troubleshooting
### Skills or commands not showing up
**Cause:** the package's resources are disabled, or a project-local install has not been
trusted. Pi asks before trusting a project folder that carries its own `.pi/` resources.
**Fix:** run `pi config` and confirm the ECC package's skills and prompts are enabled
(<kbd>Tab</kbd> switches between user and project scope). Then confirm the package itself is
registered with `pi list`.
### `/ecc-doctor` not found or reports missing package root
**Cause:** Extension not loaded or package installed incorrectly.
**Fix:**
1. Run `pi list` to confirm ECC is registered
2. Restart Pi: exit and reopen the session
3. Run `/ecc-doctor` again
`/ecc-doctor` prints the resolved package root, the skill and command counts it found, the
hook runner path, the active hook profile, and which optional companion packages are present.
A `NOT FOUND` line points at the specific path that failed to resolve.
### Hooks not firing
**Cause:** the extension is not loaded, or the hooks are gated off by an ECC hook profile.
**Fix:**
1. Confirm `pi list` shows ECC and that `/ecc-doctor` reports the hook runner as found
2. Check `ECC_HOOK_PROFILE` and `ECC_DISABLED_HOOKS` — `/ecc-doctor` prints both. A hook
listed in `ECC_DISABLED_HOOKS` is skipped by design
3. Restart Pi so the extension reloads
## Notes
- The `.pi/extensions/` directory is the only place for adapter code
- Skills and commands are defined in the repo root (`skills/`, `commands/`) and referenced by Pi
- MCP is not bundled, but ECC's MCP configs load in Pi through the community `pi-mcp-adapter` — see [MCP](#mcp) above
- This adapter was tested against Pi v0.84.1
+35
View File
@@ -0,0 +1,35 @@
const path = require("node:path")
/**
* Select a real Node executable for hook scripts.
*
* Compiled OMP may report `process.release.name` as `node` even though its
* `process.execPath` points to the OMP launcher. Bun is detected separately via
* `process.versions.bun`; both fall back to `node` unless `ECC_HOOK_NODE`
* supplies an explicit absolute path.
*
* @param options - Runtime metadata and an optional absolute Node override.
* @returns The executable path to use for hook scripts.
* @throws {Error} If the hook runtime override is non-empty and relative.
*/
function resolveHookRuntime({
execPath = process.execPath,
releaseName = process.release?.name,
bunVersion = process.versions?.bun,
override = process.env.ECC_HOOK_NODE,
} = {}) {
const isNodeRuntime =
releaseName === "node" &&
!bunVersion &&
/^(?:node|nodejs)(?:\.exe)?$/i.test(path.basename(execPath))
const overridePath = override?.trim()
if (overridePath) {
if (!path.isAbsolute(overridePath)) {
throw new Error("ECC_HOOK_NODE must be an absolute path: " + overridePath)
}
return overridePath
}
return isNodeRuntime ? execPath : "node"
}
module.exports = { resolveHookRuntime }
+702
View File
@@ -0,0 +1,702 @@
/**
* ECC adapter for the Pi coding agent.
*
* This is the ONLY adapter logic ECC ships for Pi. ECC's canonical assets stay
* the single source of truth: `skills/` and `commands/` are mounted directly by
* the `pi` manifest in the repo's root `package.json`. Nothing is copied or
* generated under `.pi/`.
*
* What this file adapts:
* - Pi lifecycle events -> ECC's existing hook runner (`run-with-flags.js`),
* so ECC hook profiles and disable flags keep working under Pi.
* - ECC's SessionStart `additionalContext` payload -> Pi's system prompt.
* - A `/ecc-doctor` command for install diagnostics.
*
* Design constraints (see .pi/README.md):
* - Hooks resolve relative to THIS file, never `process.cwd()`, so a global
* `pi install` works from any project directory.
* - Hooks execute via `execFile(hookRuntime, [...])` with no shell, so paths
* containing spaces or shell metacharacters are safe. The hook runtime is
* selected separately because compiled OMP may report `process.release.name`
* as `node` while `process.execPath` points back to `omp`; Bun is detected
* separately via `process.versions.bun`.
* - Hook failures are isolated: a broken, missing, slow, or misconfigured hook
* degrades to a warning and never terminates the Pi session.
*/
import { execFile } from "node:child_process"
import * as fs from "node:fs"
import * as os from "node:os"
import * as path from "node:path"
import { resolveHookRuntime } from "./hook-runtime.js"
/**
* Minimal structural types mirroring `@earendil-works/pi-coding-agent`.
*
* Declared locally on purpose: Pi loads extensions through jiti, which strips
* types without type-checking, so importing the package would add a dependency
* and a lockfile entry that buy nothing at runtime. Field names and signatures
* match the upstream `ExtensionAPI` / `ExtensionContext` declarations; install
* the package as a devDependency if you want editor-level checking.
*/
interface PiUiContext {
notify(message: string, type?: "info" | "warning" | "error"): void
}
interface PiSessionManager {
getSessionId(): string
getSessionFile(): string | undefined
}
interface ExtensionContext {
ui: PiUiContext
cwd: string
sessionManager: PiSessionManager
}
interface SessionStartEvent {
reason: "startup" | "reload" | "new" | "resume" | "fork"
}
interface SessionShutdownEvent {
reason: "quit" | "reload" | "new" | "resume" | "fork"
}
interface BeforeAgentStartEvent {
systemPrompt: string
}
interface BeforeAgentStartResult {
systemPrompt?: string
}
interface ExtensionAPI {
on(
event: "session_start",
handler: (event: SessionStartEvent, ctx: ExtensionContext) => Promise<void> | void
): void
on(
event: "session_shutdown",
handler: (event: SessionShutdownEvent, ctx: ExtensionContext) => Promise<void> | void
): void
on(
event: "before_agent_start",
handler: (
event: BeforeAgentStartEvent,
ctx: ExtensionContext
) => Promise<BeforeAgentStartResult | void> | BeforeAgentStartResult | void
): void
registerCommand(
name: string,
options: {
description?: string
handler: (args: string, ctx: ExtensionContext) => Promise<void>
}
): void
sendMessage(
message: { customType: string; content: string; display: boolean; details?: unknown },
options?: { triggerTurn?: boolean; deliverAs?: "steer" | "followUp" | "nextTurn" }
): void
}
/**
* ECC package root. This file lives at `<root>/.pi/extensions/index.ts`, so the
* root is two levels up. Pi loads extensions via jiti in CommonJS mode, which
* is why `__dirname` is the correct primitive here rather than
* `import.meta.url` (verified against Pi 0.84.1).
*/
const ECC_ROOT = path.resolve(__dirname, "..", "..")
/** ECC's universal hook runner. It applies hook-profile and disable flags. */
const HOOK_RUNNER = path.join(ECC_ROOT, "scripts", "hooks", "run-with-flags.js")
const HOOK_TIMEOUT_MS = 30_000
const MAX_HOOK_OUTPUT_BYTES = 1024 * 1024
/**
* ECC rules injected into Pi's system prompt, read from the canonical
* `rules/common/` directory at runtime. Nothing is copied or generated.
*
* Excluded on purpose: `agents.md`, `hooks.md`, and `performance.md`. Those
* describe Claude Code primitives Pi does not have (Task/TodoWrite delegation,
* Claude hook event types, thinking-budget toggles), so injecting them would
* instruct the model to use tools that are not there.
*/
const PORTABLE_RULE_FILES = [
"coding-style.md",
"testing.md",
"security.md",
"git-workflow.md",
"patterns.md",
"development-workflow.md",
"code-review.md",
] as const
/** Upper bound on injected rule text, so a large edit cannot flood the prompt. */
const MAX_RULES_BYTES = 32 * 1024
/** Values ECC treats as "off" across its existing environment switches. */
const DISABLED_VALUES = new Set(["0", "false", "off", "none", "disabled"])
/**
* Optional Pi companion packages. ECC works without every one of these; they
* are reported by `/ecc-doctor` so users can see which extras are available.
*
* These are capability names, not exact install specs. See
* `findInstalledCompanion` for how an entry is matched against what Pi has
* actually installed.
*/
const COMPANION_PACKAGES = [
"pi-subagents",
"@juicesharp/rpiv-ask-user-question",
"@juicesharp/rpiv-todo",
] as const
interface HookSpec {
/** ECC hook id, used for profile gating and disable flags. */
id: string
/** Hook script path relative to the ECC package root. */
script: string
/** Hook profiles the hook participates in. */
profiles: string
}
/** Mirrors the SessionStart wiring in `hooks/hooks.json`. */
const SESSION_START_HOOK: HookSpec = {
id: "session:start",
script: "scripts/hooks/session-start.js",
profiles: "minimal,standard,strict",
}
/** Mirrors the SessionEnd wiring in `hooks/hooks.json`. */
const SESSION_END_HOOK: HookSpec = {
id: "session:end:marker",
script: "scripts/hooks/session-end-marker.js",
profiles: "minimal,standard,strict",
}
interface HookResult {
stdout: string
failure?: string
}
/**
* Run an ECC hook through ECC's own runner.
*
* Never rejects: an invalid runtime override, a missing runner, a non-zero exit,
* a timeout, or a spawn error all resolve to a `failure` string that the caller
* surfaces as a warning.
*/
function runEccHook(
spec: HookSpec,
payload: unknown,
env: NodeJS.ProcessEnv,
cwd: string
): Promise<HookResult> {
return new Promise(resolve => {
if (!fs.existsSync(HOOK_RUNNER)) {
resolve({ stdout: "", failure: `hook runner not found at ${HOOK_RUNNER}` })
return
}
let hookRuntime: string
try {
hookRuntime = resolveHookRuntime()
} catch (error) {
resolve({
stdout: "",
failure: `${spec.id}: ${(error as Error).message}`,
})
return
}
const child = execFile(
hookRuntime,
[HOOK_RUNNER, spec.id, spec.script, spec.profiles],
{
// Hooks inspect the user's project, so they run there. Only the script
// path is package-relative, and the runner resolves that from
// CLAUDE_PLUGIN_ROOT rather than from the working directory.
cwd,
env,
timeout: HOOK_TIMEOUT_MS,
maxBuffer: MAX_HOOK_OUTPUT_BYTES,
encoding: "utf8",
},
(error, stdout) => {
const text = typeof stdout === "string" ? stdout : ""
if (error) {
resolve({ stdout: text, failure: `${spec.id}: ${error.message}` })
return
}
resolve({ stdout: text })
}
)
child.on("error", error => {
resolve({ stdout: "", failure: `${spec.id}: ${error.message}` })
})
// stdin.end() writes asynchronously. A hook that exits, short-circuits, or
// is killed by the timeout before reading the payload makes the write fail
// with EPIPE, which Node reports as an `error` event rather than a throw.
// Without this listener that event is unhandled and would take the Pi
// session down, breaking the isolation guarantee documented above.
child.stdin?.on("error", error => {
resolve({ stdout: "", failure: `${spec.id}: could not write hook payload (${error.message})` })
})
try {
child.stdin?.end(JSON.stringify(payload))
} catch (error) {
resolve({
stdout: "",
failure: `${spec.id}: could not write hook payload (${(error as Error).message})`,
})
}
})
}
/**
* Working directory for hook execution: the user's project. Falls back to the
* ECC package root if Pi reports a directory that no longer exists, so a stale
* cwd degrades to a working hook rather than a spawn failure.
*/
function resolveHookCwd(ctx: ExtensionContext): string {
try {
if (ctx.cwd && fs.existsSync(ctx.cwd)) {
return ctx.cwd
}
} catch {
// Fall through to the package root.
}
return ECC_ROOT
}
function readSessionId(ctx: ExtensionContext): string | undefined {
try {
return ctx.sessionManager.getSessionId() || undefined
} catch {
return undefined
}
}
/**
* Build the environment ECC hooks expect.
*
* `CLAUDE_PLUGIN_ROOT` / `ECC_PLUGIN_ROOT` are how every ECC hook locates the
* package; setting them from `ECC_ROOT` is what makes a global install resolve
* correctly instead of probing the user's project. The `CLAUDE_*` session vars
* are the names ECC's shared hook scripts already read across harnesses.
*/
function buildHookEnv(ctx: ExtensionContext): NodeJS.ProcessEnv {
const env: NodeJS.ProcessEnv = {
...process.env,
CLAUDE_PLUGIN_ROOT: ECC_ROOT,
ECC_PLUGIN_ROOT: ECC_ROOT,
CLAUDE_PROJECT_DIR: ctx.cwd,
}
const sessionId = readSessionId(ctx)
if (sessionId) {
env.CLAUDE_SESSION_ID = sessionId
}
return env
}
/**
* Map Pi's session reason onto the `source` values ECC's SessionStart hook
* understands. Pi's `new` and `reload` have no Claude Code equivalent, so they
* report as a fresh startup.
*/
function mapSessionSource(reason: SessionStartEvent["reason"]): string {
switch (reason) {
case "resume":
case "fork":
return "resume"
default:
return "startup"
}
}
/**
* Extract `hookSpecificOutput.additionalContext` from a hook's stdout.
*
* ECC hooks emit a JSON envelope, but the runner passes stdin straight through
* when a hook is disabled by profile, so non-JSON stdout is expected and must
* not be treated as an error.
*/
function extractAdditionalContext(stdout: string): string | undefined {
const trimmed = stdout.trim()
if (!trimmed.startsWith("{")) {
return undefined
}
try {
const parsed = JSON.parse(trimmed) as {
hookSpecificOutput?: { additionalContext?: unknown }
}
const context = parsed.hookSpecificOutput?.additionalContext
return typeof context === "string" && context.trim() ? context : undefined
} catch {
return undefined
}
}
function isDisabledByEnv(value: string | undefined): boolean {
return typeof value === "string" && DISABLED_VALUES.has(value.trim().toLowerCase())
}
/** Memoized so the rule files are read once per session, not once per turn. */
let cachedRules: string | null | undefined
/**
* How many of `PORTABLE_RULE_FILES` actually made it into `cachedRules`.
*
* Kept alongside the cache because `loadPortableRules` silently drops files it
* cannot read, files that are empty, and every file past the size cap — so the
* allowlist length would overstate a partial install in `/ecc-doctor`, which is
* the one place a user looks to find exactly that.
*/
let cachedRuleFileCount = 0
/**
* ECC's portable engineering rules, concatenated from the canonical
* `rules/common/` directory of the installed package.
*
* Returns null when disabled via `ECC_PI_RULES` or when no rule file could be
* read, so a partial install degrades to "no rules" instead of failing.
*/
function loadPortableRules(): string | null {
if (cachedRules !== undefined) {
return cachedRules
}
if (isDisabledByEnv(process.env.ECC_PI_RULES)) {
cachedRules = null
cachedRuleFileCount = 0
return cachedRules
}
const sections: string[] = []
let total = 0
for (const file of PORTABLE_RULE_FILES) {
let text: string
try {
text = fs.readFileSync(path.join(ECC_ROOT, "rules", "common", file), "utf8").trim()
} catch {
continue
}
if (!text) {
continue
}
if (total + text.length > MAX_RULES_BYTES) {
break
}
total += text.length
sections.push(text)
}
cachedRules = sections.length > 0 ? sections.join("\n\n---\n\n") : null
cachedRuleFileCount = sections.length
return cachedRules
}
/**
* Pi's config directory, honoring the documented `PI_CODING_AGENT_DIR` override.
*/
function resolvePiConfigDir(): string {
const override = process.env.PI_CODING_AGENT_DIR
if (override && override.trim()) {
return override.trim()
}
return path.join(os.homedir(), ".pi", "agent")
}
/**
* Package names Pi currently has installed, read from the same `packages`
* lists Pi itself uses: the user config directory plus the project-local
* `.pi/settings.json`.
*
* `require.resolve` cannot answer this. Pi installs packages under its own
* config directory (`<config>/npm`, `<config>/git`), which is not on Node's
* module resolution path from this file, so resolving would report every
* companion as missing no matter what the user has installed.
*/
function listInstalledPiPackages(projectDir: string): Set<string> {
const names = new Set<string>()
const settingsFiles = [
path.join(resolvePiConfigDir(), "settings.json"),
path.join(projectDir, ".pi", "settings.json"),
]
for (const file of settingsFiles) {
try {
const parsed = JSON.parse(fs.readFileSync(file, "utf8")) as { packages?: unknown }
if (!Array.isArray(parsed.packages)) {
continue
}
for (const entry of parsed.packages) {
const name = normalizePiPackageName(entry)
if (name) {
names.add(name)
}
}
} catch {
// Missing or unreadable settings are simply "nothing installed here".
}
}
return names
}
/**
* Reduce a `packages` entry to a bare package name.
*
* An entry is either the source string itself or an object carrying that
* string under `source` alongside resource filters (`{ source: "npm:x",
* skills: [] }`). Pi accepts both forms, and a filtered package is just as
* installed as a plain one, so both must resolve to the same name.
*
* Sources look like `npm:pi-subagents`, `npm:@scope/name@1.2.3`, a git source,
* or a filesystem path. Only npm sources carry a comparable package name.
*/
function normalizePiPackageName(entry: unknown): string | undefined {
const source = entry && typeof entry === "object" ? (entry as { source?: unknown }).source : entry
if (typeof source !== "string" || !source.startsWith("npm:")) {
return undefined
}
const spec = source.slice("npm:".length)
// Strip a trailing @version without breaking the leading @ of a scoped name.
const versionAt = spec.lastIndexOf("@")
return versionAt > 0 ? spec.slice(0, versionAt) : spec
}
/**
* The installed package satisfying a companion entry, or undefined if none is.
*
* An exact name match is the ordinary case. An UNSCOPED companion entry is
* also satisfied by a scoped package with the same bare name --
* `@tintinweb/pi-subagents` satisfies `pi-subagents`. The subagents capability
* is published to npm by more than one maintainer under that same bare name,
* and a user running a scoped fork has the capability installed by any
* meaning of the word; reporting "not installed" at them while its tools are
* live in their session is a false negative, and the suggested
* `pi install npm:pi-subagents` would push them into installing a second
* extension that registers the same tool names.
*
* A SCOPED companion entry is matched exactly, because there the scope is
* part of the identity the entry names, not incidental packaging.
*/
function findInstalledCompanion(companion: string, installed: Set<string>): string | undefined {
if (installed.has(companion)) {
return companion
}
if (companion.startsWith("@")) {
return undefined
}
const scopedSuffix = `/${companion}`
for (const name of installed) {
if (name.startsWith("@") && name.endsWith(scopedSuffix)) {
return name
}
}
return undefined
}
function countDirectories(dir: string): number {
try {
return fs.readdirSync(dir, { withFileTypes: true }).filter(entry => entry.isDirectory()).length
} catch {
return 0
}
}
function countMarkdownFiles(dir: string): number {
try {
return fs.readdirSync(dir).filter(name => name.endsWith(".md")).length
} catch {
return 0
}
}
function readEccVersion(): string {
try {
const manifest = JSON.parse(fs.readFileSync(path.join(ECC_ROOT, "package.json"), "utf8")) as {
version?: string
}
return manifest.version || "unknown"
} catch {
return "unknown"
}
}
function describeRulesStatus(): string {
if (isDisabledByEnv(process.env.ECC_PI_RULES)) {
return "disabled via ECC_PI_RULES"
}
const rules = loadPortableRules()
if (!rules) {
return `NOT FOUND (${path.join(ECC_ROOT, "rules", "common")})`
}
const skipped = PORTABLE_RULE_FILES.length - cachedRuleFileCount
const shortfall = skipped > 0 ? ` (${skipped} unreadable, empty, or past the size cap)` : ""
return `${cachedRuleFileCount}/${PORTABLE_RULE_FILES.length} rule file(s), ${rules.length} chars, from rules/common/${shortfall}`
}
function buildDoctorReport(ctx: ExtensionContext): string {
const skillsDir = path.join(ECC_ROOT, "skills")
const commandsDir = path.join(ECC_ROOT, "commands")
const skillCount = countDirectories(skillsDir)
const commandCount = countMarkdownFiles(commandsDir)
const lines = [
"ECC adapter for Pi",
"",
` ECC version: ${readEccVersion()}`,
` Package root: ${ECC_ROOT}`,
` Project cwd: ${ctx.cwd}`,
"",
"Canonical resources",
` skills/ ${skillCount > 0 ? `${skillCount} skill(s)` : "NOT FOUND"} (${skillsDir})`,
` commands/ ${commandCount > 0 ? `${commandCount} command(s)` : "NOT FOUND"} (${commandsDir})`,
"",
"Engineering rules (injected into the system prompt)",
` ${describeRulesStatus()}`,
"",
"Hook runner",
` ${fs.existsSync(HOOK_RUNNER) ? "found" : "NOT FOUND"} (${HOOK_RUNNER})`,
` profile: ${process.env.ECC_HOOK_PROFILE || "standard (default)"}`,
` disabled: ${process.env.ECC_DISABLED_HOOKS || "none"}`,
"",
"Optional companion packages (from Pi's installed package list)",
]
const installed = listInstalledPiPackages(ctx.cwd)
for (const name of COMPANION_PACKAGES) {
const match = findInstalledCompanion(name, installed)
lines.push(` ${match ? "installed " : "not installed"} ${name}`)
if (!match) {
lines.push(` install with: pi install npm:${name}`)
} else if (match !== name) {
lines.push(` satisfied by: ${match}`)
}
}
lines.push(
"",
"Companion packages are optional; ECC skills, commands, and session hooks",
"work without them. See .pi/README.md for what each one unlocks.",
"Detection reads Pi's `packages` list, so a companion vendored some other",
"way may work while reporting as not installed."
)
return lines.join("\n")
}
export default function (pi: ExtensionAPI): void {
/**
* ECC's SessionStart hook returns context for the model, but Pi has no
* equivalent of Claude Code's `additionalContext` field. It is held here and
* folded into the system prompt on the next agent start, which is the
* documented Pi injection point that does not fabricate a user turn.
*/
let pendingContext: string | undefined
pi.on("session_start", async (event, ctx) => {
const payload = {
hook_event_name: "SessionStart",
source: mapSessionSource(event.reason),
cwd: ctx.cwd,
session_id: readSessionId(ctx),
}
// Drop any context captured by an earlier session start that has not been
// injected yet. Pi can start a new session (/new, /resume, /fork) before
// `before_agent_start` consumes the previous value, and replaying context
// built for a different session would describe the wrong project state.
pendingContext = undefined
const result = await runEccHook(
SESSION_START_HOOK,
payload,
buildHookEnv(ctx),
resolveHookCwd(ctx)
)
if (result.failure) {
ctx.ui.notify(`ECC session-start hook skipped (${result.failure})`, "warning")
return
}
pendingContext = extractAdditionalContext(result.stdout)
})
pi.on("before_agent_start", event => {
const additions: string[] = []
// Rules describe standing engineering policy, so they are re-applied on
// every turn. The session context is a one-shot handoff and is consumed.
const rules = loadPortableRules()
if (rules) {
additions.push(`<ecc-engineering-rules>\n${rules}\n</ecc-engineering-rules>`)
}
if (pendingContext) {
additions.push(`<ecc-session-context>\n${pendingContext}\n</ecc-session-context>`)
pendingContext = undefined
}
if (additions.length === 0) {
return
}
return { systemPrompt: [event.systemPrompt, ...additions].join("\n\n") }
})
pi.on("session_shutdown", async (event, ctx) => {
const payload = {
hook_event_name: "SessionEnd",
reason: event.reason,
cwd: ctx.cwd,
session_id: readSessionId(ctx),
}
const result = await runEccHook(
SESSION_END_HOOK,
payload,
buildHookEnv(ctx),
resolveHookCwd(ctx)
)
if (result.failure) {
ctx.ui.notify(`ECC session-end hook skipped (${result.failure})`, "warning")
}
})
pi.registerCommand("ecc-doctor", {
description: "Report ECC adapter status: package root, canonical resources, hooks, companions",
handler: async (_args, ctx) => {
pi.sendMessage(
{
customType: "ecc-doctor",
content: buildDoctorReport(ctx),
display: true,
},
{ deliverAs: "nextTurn" }
)
},
})
}
+49
View File
@@ -0,0 +1,49 @@
# Security Evidence — PR #3172 / #3171
Commit under review: observe.sh Layer-1 allowlist adds `sdk-cli`.
## Changed security-sensitive surface
- `skills/continuous-learning-v2/hooks/observe.sh` (agent hook entrypoint allowlist)
## Threat model (bounded)
- **Risk if missing `sdk-cli`**: interactive Agent SDK CLI sessions never observe (availability/coverage gap).
- **Risk if allowlist too broad**: non-interactive bots could start the observer. Mitigated by Layers 2–5 (`ECC_HOOK_PROFILE=minimal`, `ECC_SKIP_OBSERVE=1`, `agent_id`, path exclusions) — unchanged by this PR.
- **No secrets / auth tokens / billing / webhook handlers** were modified.
## Security-focused validation artifacts (this PR)
1. **Focused security regression test** (new): `tests/hooks/observe-entrypoint-security.test.js`
- Asserts source allowlist includes `sdk-cli`
- Asserts Layer-1 allows: `cli`, `sdk-ts`, `sdk-cli`, `claude-desktop`, `claude-vscode`
- Asserts Layer-1 rejects: `unknown-bot`, `ci-bot`
2. **Supply-chain IOC scan** (repo gate): `npm run security:ioc-scan`
## Command output (local)
### observe-entrypoint-security.test.js
```text
=== observe.sh Layer-1 entrypoint security (#3171) ===
✓ source allowlist includes sdk-cli
✓ Layer-1 allows cli
✓ Layer-1 allows sdk-ts
✓ Layer-1 allows sdk-cli
✓ Layer-1 allows claude-desktop
✓ Layer-1 allows claude-vscode
✓ Layer-1 rejects unknown-bot
✓ Layer-1 rejects ci-bot
All Layer-1 security checks passed.
```
### npm run security:ioc-scan
```text
> ecc-universal@2.2.1 security:ioc-scan
> node scripts/ci/scan-supply-chain-iocs.js
Supply-chain IOC scan passed for /workspace/pr-work/ECC-3171 (12 files inspected)
```
## Conclusion
Allowlist change is covered by a dedicated security regression test plus the repository IOC scan. Unknown entrypoints remain denied at Layer-1.
+30 -28
View File
@@ -1,8 +1,8 @@
# Everything Claude Code (ECC) — Agent Instructions
This is a **production-ready AI coding plugin** providing 67 specialized agents, 281 skills, 94 commands, and automated hook workflows for software development.
This is a **production-ready AI coding plugin** providing 68 specialized agents, 292 skills, 94 commands, and automated hook workflows for software development.
**Version:** 2.1.0
**Version:** 2.2.2
## Core Principles
@@ -46,6 +46,7 @@ This is a **production-ready AI coding plugin** providing 67 specialized agents,
| rust-build-resolver | Rust build errors | Rust build failures |
| pytorch-build-resolver | PyTorch runtime/CUDA/training errors | PyTorch build/training failures |
| mle-reviewer | Production ML pipeline review | ML pipelines, evals, serving, monitoring, rollback |
| rag-pipeline-reviewer | RAG pipeline review | Retrieval quality, chunking, reranking, RAGAS evaluation coverage |
| typescript-reviewer | TypeScript/JavaScript code review | TypeScript/JavaScript projects |
| react-reviewer | React/JSX code review | React component and hook changes |
| react-build-resolver | React/Vite/Next.js/webpack build errors | React build failures |
@@ -57,7 +58,7 @@ This is a **production-ready AI coding plugin** providing 67 specialized agents,
| csharp-reviewer | C#/.NET async patterns, nullability, security | All C# code changes |
| fastapi-reviewer | FastAPI async correctness, Pydantic, OpenAPI | FastAPI endpoint and schema changes |
| php-reviewer | PHP/PSR-12, Eloquent, security review | PHP code changes |
| harmonyos-app-resolver | HarmonyOS/ArkTS build and API errors | HarmonyOS project failures |
| harmonyos-app-resolver | HarmonyOS ArkTS/ArkUI code and API review | HarmonyOS/OpenHarmony application changes |
| healthcare-reviewer | Clinical safety, PHI compliance, CDSS accuracy | Healthcare, EMR/EHR application code |
| a11y-architect | WCAG 2.2 accessibility architecture | Designing UI components, accessibility audits |
| code-architect | Feature architecture blueprints from codebase patterns | New features needing implementation design |
@@ -67,7 +68,7 @@ This is a **production-ready AI coding plugin** providing 67 specialized agents,
| network-troubleshooter | OSI-layer connectivity and routing diagnosis | Network connectivity and routing issues |
| performance-optimizer | Bottleneck detection, bundle size, memory leaks | Slow code or high resource usage |
| silent-failure-hunter | Swallowed errors and missing propagation | Code reliability audits |
| type-design-analyzer | Type encapsulation and invariant design | TypeScript type system reviews |
| type-design-analyzer | Type encapsulation and invariant design | Type design and invariant reviews |
| pr-test-analyzer | PR test coverage quality and completeness | Before merging pull requests |
| code-explorer | Execution path tracing and architecture mapping | Understanding unfamiliar code paths |
| code-simplifier | Clarity-focused code refinement without behavior change | Post-implementation cleanup |
@@ -87,25 +88,26 @@ This is a **production-ready AI coding plugin** providing 67 specialized agents,
## Agent Orchestration
Use agents proactively without user prompt:
- Complex feature requests → **planner**
- Code just written/modified → **code-reviewer**
- Bug fix or new feature → **tdd-guide**
- Architectural decision → **architect**
- Security-sensitive code → **security-reviewer**
- Brownfield project onboarding → **spec-miner**
- Autonomous loops / loop monitoring → **loop-operator**
- Harness config reliability and cost → **harness-optimizer**
- Performance bottleneck or slow code → **performance-optimizer**
- React/JSX changes → **react-reviewer**
- Vue changes → **vue-reviewer**
- Swift changes → **swift-reviewer**
- C# changes → **csharp-reviewer**
- PHP changes → **php-reviewer**
- Flutter/Dart changes → **flutter-reviewer**
- Healthcare/clinical code → **healthcare-reviewer**
- UI component design → **a11y-architect**
- Open-source release prep → **opensource-forker** → **opensource-sanitizer** → **opensource-packager**
- Agent output quality check → **agent-evaluator**
- Complex feature requests → **ecc:planner**
- Code just written/modified → **ecc:code-reviewer**
- Bug fix or new feature → **ecc:tdd-guide**
- Architectural decision → **ecc:architect**
- Security-sensitive code → **ecc:security-reviewer**
- Brownfield project onboarding → **ecc:spec-miner**
- Autonomous loops / loop monitoring → **ecc:loop-operator**
- Harness config reliability and cost → **ecc:harness-optimizer**
- RAG/retrieval pipeline changes → **ecc:rag-pipeline-reviewer**
- Performance bottleneck or slow code → **ecc:performance-optimizer**
- React/JSX changes → **ecc:react-reviewer**
- Vue changes → **ecc:vue-reviewer**
- Swift changes → **ecc:swift-reviewer**
- C# changes → **ecc:csharp-reviewer**
- PHP changes → **ecc:php-reviewer**
- Flutter/Dart changes → **ecc:flutter-reviewer**
- Healthcare/clinical code → **ecc:healthcare-reviewer**
- UI component design → **ecc:a11y-architect**
- Open-source release prep → **ecc:opensource-forker** → **ecc:opensource-sanitizer** → **ecc:opensource-packager**
- Agent output quality check → **ecc:agent-evaluator**
Use parallel execution for independent operations — launch multiple agents simultaneously.
@@ -159,9 +161,9 @@ Troubleshoot failures: check test isolation → verify mocks → fix implementat
## Development Workflow
1. **Plan** — Use planner agent, identify dependencies and risks, break into phases
2. **TDD** — Use tdd-guide agent, write tests first, implement, refactor
3. **Review** — Use code-reviewer agent immediately, address CRITICAL/HIGH issues
1. **Plan** — Use ecc:planner agent, identify dependencies and risks, break into phases
2. **TDD** — Use ecc:tdd-guide agent, write tests first, implement, refactor
3. **Review** — Use ecc:code-reviewer agent immediately, address CRITICAL/HIGH issues
4. **Capture knowledge in the right place**
- Personal debugging notes, preferences, and temporary context → auto memory
- Team/project knowledge (architecture decisions, API changes, runbooks) → the project's existing docs structure
@@ -198,8 +200,8 @@ Troubleshoot failures: check test isolation → verify mocks → fix implementat
## Project Structure
```
agents/ — 67 specialized subagents
skills/ — 281 workflow skills and domain knowledge
agents/ — 68 specialized subagents
skills/ — 292 workflow skills and domain knowledge
commands/ — 94 slash commands
hooks/ — Trigger-based automations
rules/ — Always-follow guidelines (common + per-language)
+58 -1
View File
@@ -1,10 +1,67 @@
# Changelog
## Unreleased
## 2.2.2 - 2026-09-15
### Fixed
#### Packaging
- Explicitly include the compiled OpenCode payload in the npm package and verify that packing builds it from a clean state with lifecycle scripts enabled.
#### Memory and MCP
- Distinguish incomplete memory reads from missing records and classify directory traversal failures (`90ef62cb`, `8321021c`).
- Accept the reserved `_meta` parameter on memory MCP ping requests (`380f4b35`).
#### Hooks and Windows compatibility
- Keep `hooks.json` within Claude Code's schema by moving stable hook metadata into a validated sidecar (`1ac07903`).
- Handle stuck optional values and long-option prefixes in the no-verify guard (`4f373874`).
- Support Windows linter paths and ESLint 9 (`2083c983`).
- Tolerate missing Windows device IDs in settings updates while retaining full-precision inode checks and strict matching when both device IDs are available (`d3af582b`).
#### Workflow guidance and catalog
- Filter epic sync issues by label (`3033436d`).
- Remove instructions to auto-merge dependency bumps and synchronize localized merge authority (`22d7ed51`, `678c6dea`).
- Keep common naming and Boolean guidance language-neutral (`072e4684`, `a0ecb793`, `013ed0a8`).
- Distinguish the `prp-pr` command alias (`cc91c24f`).
- Correct Rails skill discovery, invoice tax calculation order, and framework documentation (`b6ddd13a`).
- Remove Serply and Squish catalog entries (`c4904e3f`).
#### Dependency security
- Update `lru` to 0.18.2 for RUSTSEC-2026-0253 (`4fc950c4`).
- Update `js-yaml` to 4.3.2 for GHSA-2883-xcg3-v3hh (`549c1469`).
## 2.2.0 - 2026-08-25
### Added
- Guided, manifest-driven setup across supported harnesses, with exact install-state ownership, health checks, repair, and uninstall workflows.
- Native Antigravity 2.0 installation under `.agents/`, including rules, workflows, skills, and adapted agents, plus a cross-platform installation guide.
- New workflow and operator capabilities including the Itô skill family, an experimental Nasiko CLI lifecycle bridge, multi-model council review, dev-team collaboration, agent evaluation, living-docs governance, secure terminal opening, and TasteForge multimodal workflows.
- A thin Pi adapter and expanded cross-harness support, release artifact lifecycle testing, Docker-based CLI testing, and stronger Python validation.
### Changed
- Default MCP connector set reduced to a single connector (`chrome-devtools`) per the new connector policy (`docs/MCP-CONNECTOR-POLICY.md`). The six previous defaults (`github`, `context7`, `exa`, `memory`, `playwright`, `sequential-thinking`) were retired after the June 2026 audit: their jobs are covered by skills wrapping CLIs/REST APIs (`github-ops`, `documentation-lookup`, `exa-search`, e2e skills) or by harness-native features (memory, extended thinking, web search). All six remain opt-in via `mcp-configs/mcp-servers.json`.
- OpenCode home installs now use its canonical `~/.config/opencode` location, safely discover and migrate unchanged ECC-managed files from legacy `~/.opencode` installs, and preserve modified legacy files for review. Bundled agents inherit the model selected by the user instead of pinning an Anthropic provider.
- `skill-comply` is now part of the install manifest and npm distribution, with generated Python caches excluded from both install and package surfaces.
- Release automation now verifies the tag is exactly on `origin/main`, fails closed on npm registry errors, tests the exact packed artifact across Linux, macOS, and Windows, publishes stable versions to a staging dist-tag, verifies registry bytes before promoting `latest`, creates the GitHub Release after promotion, and uses reviewed release notes.
### Fixed
- `ecc memory` writes and `--body-file` reads failed on Windows under Node 22.12-22.16 and 24.0-24.1. libuv resolved path-based `stat()`/`lstat()` through `GetFileInformationByName` without setting the volume serial, while `fstat()` reported it, so the memory vault's TOCTOU guard rejected every operation. Fixed upstream in libuv 1.51.0; the guard no longer depends on the runtime's patch level. The guard's stat calls now request `BigInt` values, so Windows file IDs past `Number.MAX_SAFE_INTEGER` can no longer collapse two distinct files into one identity.
- Selective reinstall now merges the prior ownership ledger, so later module additions do not orphan files from earlier installs and uninstall removes the complete managed surface.
- Legacy Codex sync uninstall now uses ownership evidence, preserves user files, and requires an explicit opt-in for weaker marker-only cleanup.
- The experimental Nasiko CLI lifecycle bridge now recovers locks only after confirming the recorded owner is dead, preserves replacement locks, strictly rejects malformed tar sizes, padding, terminators, and trailing data, and fails uninstall when staged files remain.
- Hook, plan-canvas, session, memory, observer, skill-evolution, Discord delivery, and Windows compatibility regressions fixed across the runtime.
### Release audit
- Audited the complete delta from `v2.1.0`: 108 commits across 530 files, with 40,299 insertions and 4,679 deletions on the pre-release baseline.
- The release gate installs and exercises the exact npm archive, including cumulative ownership, doctor, drift detection, repair, uninstall, and user-file preservation.
## 2.0.0 - 2026-06-09
+14
View File
@@ -152,6 +152,20 @@ executable instructions or policy.
---
## Install Health & Feedback CLI
These lifecycle commands are also available through the `ecc` CLI.
| Command | What it does |
|---------|-------------|
| `ecc list-installed` | Show installs recorded in ECC's managed state |
| `ecc doctor` | Diagnose missing or drifted managed files and point failures to the short problem form |
| `ecc repair` | Restore missing or drifted managed files |
| `ecc uninstall` | Remove only install-state-managed files and optionally show the 20-second exit-feedback route |
| `ecc feedback` | Show the public problem, quick-feedback, and feature routes without reading files or uploading diagnostics |
---
## Learning & Improvement
| Command | What it does |
+564 -541
View File
File diff suppressed because it is too large Load Diff
+7 -3
View File
@@ -80,6 +80,10 @@
## 最新动态
### v2.2.2 — 引导式多 Harness 安装(2026年8月)
新增可审查的 Claude Code、Codex 与 Kimi Code 多 Harness 安装流程,并提供同步的 npm 命令入口。
### v2.1.0 — 智能体 Harness 操作系统(2026年6月)
2.0 主线稳定版:261 个技能、control-pane 基底(会话适配器 + MCP 清单)、worktree 生命周期服务,以及 [ECC Discord 社区](https://discord.gg/36yGMHGFbR)。
@@ -143,7 +147,7 @@ command -v ecc-memory-mcp
> WARNING: **重要提示:** Claude Code 插件无法自动分发 `rules`。
>
> 如果你已经通过 `/plugin install` 安装了 ECC,**不要再运行 `./install.sh --profile full`、`.\install.ps1 --profile full` 或 `npx ecc-install --profile full`**。插件已经会自动加载 ECC 的技能、命令和 hooks;此时再执行完整安装,会把同一批内容再次复制到用户目录,导致技能重复以及运行时行为重复。
> 如果你已经通过 `/plugin install` 安装了 ECC,**不要再运行 `./install.sh --profile full`、`.\install.ps1 --profile full` 或 `npx ecc-universal install --profile full`**。插件已经会自动加载 ECC 的技能、命令和 hooks;此时再执行完整安装,会把同一批内容再次复制到用户目录,导致技能重复以及运行时行为重复。
>
> 对于插件安装路径,请只手动复制你需要的 `rules/` 目录。只有在你完全不走插件安装、而是选择“纯手动安装 ECC”时,才应该使用完整安装器。
@@ -174,7 +178,7 @@ Copy-Item -Recurse rules/typescript "$HOME/.claude/rules/"
# 纯手动安装 ECC(不要和 /plugin install 叠加)
# .\install.ps1 --profile full
# npx ecc-install --profile full
# npx ecc-universal install --profile full
```
如需手动安装说明,请查看 `rules/` 文件夹中的 README 文档。手动复制规则文件时,请直接复制**整个语言目录**(例如 `rules/common` 或 `rules/golang`),而非目录内的单个文件,以保证相对路径引用正常、文件名不会冲突。
@@ -192,7 +196,7 @@ Copy-Item -Recurse rules/typescript "$HOME/.claude/rules/"
/plugin list ecc@ecc
```
**完成!** 你现在可以使用 67 个代理、281 个技能和 94 个命令。
**完成!** 你现在可以使用 68 个代理、292 个技能和 94 个命令。
### multi-* 命令需要额外配置
-38
View File
@@ -1,38 +0,0 @@
# Rules
## Must Always
- Delegate to specialized agents for domain tasks.
- Write tests before implementation and verify critical paths.
- Validate inputs and keep security checks intact.
- Prefer immutable updates over mutating shared state.
- Follow established repository patterns before inventing new ones.
- Keep contributions focused, reviewable, and well-described.
## Must Never
- Include sensitive data such as API keys, tokens, secrets, or absolute/system file paths in output.
- Submit untested changes.
- Bypass security checks or validation hooks.
- Duplicate existing functionality without a clear reason.
- Ship code without checking the relevant test suite.
## Agent Format
- Agents live in `agents/*.md`.
- Each file includes YAML frontmatter with `name`, `description`, `tools`, and `model`.
- File names are lowercase with hyphens and must match the agent name.
- Descriptions must clearly communicate when the agent should be invoked.
## Skill Format
- Skills live in `skills/<name>/SKILL.md`.
- Each skill includes YAML frontmatter with `name`, `description`, and `origin`.
- Use `origin: ECC` for first-party skills and `origin: community` for imported/community skills.
- Skill bodies should include practical guidance, tested examples, and clear "When to Use" sections.
## Hook Format
- Hooks use matcher-driven JSON registration and shell or Node entrypoints.
- Matchers should be specific instead of broad catch-alls.
- Exit `1` only when blocking behavior is intentional; otherwise exit `0`.
- Error and info messages should be actionable.
## Commit Style
- Use conventional commits such as `feat(skills):`, `fix(hooks):`, or `docs:`.
- Keep changes modular and explain user-facing impact in the PR summary.
+1 -1
View File
@@ -1,7 +1,7 @@
# Soul
## Core Identity
Everything Claude Code (ECC) is a production-ready AI coding plugin with 30 specialized agents, 135 skills, 60 commands, and automated hook workflows for software development.
Everything Claude Code (ECC) is a production-ready AI coding plugin: specialized agents, on-demand skills, slash commands, rules, and automated hook workflows for software development.
## Core Principles
1. **Agent-First** — route work to the right specialist as early as possible.
+7 -1
View File
@@ -12,14 +12,20 @@ Thank you to everyone funding ECC's open-source work. Your sponsorship is what l
|---------|------|-------|
| [**CodeRabbit**](https://www.coderabbit.ai) | <img src="assets/images/sponsors/coderabbit.png" width="60" alt="CodeRabbit logo" /> | 2026 |
| [**Greptile**](https://www.greptile.com/go/ecc) | <img src="assets/images/sponsors/greptile.png" width="60" alt="Greptile logo" /> | 2026 |
| [**Atlas Cloud**](https://www.atlascloud.ai/?utm_source=github&utm_medium=link&utm_campaign=ECC) | <picture><source media="(prefers-color-scheme: dark)" srcset="assets/images/sponsors/atlascloud-dark.svg" /><img src="assets/images/sponsors/atlascloud.svg" width="120" alt="Atlas Cloud logo" /></picture> | 2026 |
| [**Moonshot AI (Kimi)**](https://www.moonshot.ai) | <picture><source media="(prefers-color-scheme: dark)" srcset="assets/images/sponsors/moonshot-dark.png" /><img src="assets/images/sponsors/moonshot.png" width="100" alt="Moonshot AI Kimi logo" /></picture> | 2026 |
| [**Itô**](https://compute.itomarkets.com) | <picture><source media="(prefers-color-scheme: light)" srcset="assets/images/sponsors/ito-transparent-light.png" /><img src="assets/images/sponsors/ito-transparent.png" width="88" alt="Itô Markets logo" /></picture> | 2026 |
| [**SerpApi**](https://serpapi.com/github-ecc) | <picture><source media="(prefers-color-scheme: dark)" srcset="assets/images/sponsors/serpapi-logo-dark-mode.svg" /><img src="assets/images/sponsors/serpapi-logo-light-mode.svg" width="200" alt="SerpApi: Web Search API" /></picture> | 2026 |
*[Become a Business sponsor](https://github.com/sponsors/affaan-m) to get README sponsor placement + SPONSORS.md listing. Current Business tier is $800/mo. No seats, SLA, custom development, or preferential technical placement is bundled unless separately agreed.*
Run or self-host any open-source model. Itô partners with ECC on compute, while ECC remains provider-agnostic and any GPU provider works. The [Itô dashboard](https://compute.itomarkets.com) sponsorship link is passive: it does not invoke an RFQ, reserve capacity, provision compute, or configure serving. Separately, the opt-in `ecc ito find` bridge invokes the explicitly configured canonical Itô CLI and submits a live authenticated RFQ; it does not reserve capacity. Managed inference through Itô is not live yet.
## Past Sponsors
| Sponsor | Active period |
|---------|---------------|
| [**Atlas Cloud**](https://www.atlascloud.ai/?utm_source=github&utm_medium=link&utm_campaign=ECC) | 2026 |
## Team Sponsors — $200/mo
| Sponsor | Since |

Some files were not shown because too many files have changed in this diff Show More