From 8a3651588a08476a750e80bf153a29e0f6e12b21 Mon Sep 17 00:00:00 2001 From: Affaan Mustafa Date: Sun, 5 Apr 2026 17:51:56 -0700 Subject: [PATCH] feat: restore review and planning bundles --- AGENTS.md | 6 +-- README.md | 10 ++--- README.zh-CN.md | 2 +- WORKING-CONTEXT.md | 1 + agents/code-architect.md | 71 +++++++++++++++++++++++++++++++++ agents/code-explorer.md | 69 ++++++++++++++++++++++++++++++++ agents/code-simplifier.md | 47 ++++++++++++++++++++++ agents/comment-analyzer.md | 45 +++++++++++++++++++++ agents/pr-test-analyzer.md | 45 +++++++++++++++++++++ agents/silent-failure-hunter.md | 50 +++++++++++++++++++++++ agents/type-design-analyzer.md | 41 +++++++++++++++++++ commands/feature-dev.md | 49 +++++++++++++++++++++++ commands/review-pr.md | 37 +++++++++++++++++ docs/zh-CN/AGENTS.md | 6 +-- docs/zh-CN/README.md | 10 ++--- 15 files changed, 472 insertions(+), 17 deletions(-) create mode 100644 agents/code-architect.md create mode 100644 agents/code-explorer.md create mode 100644 agents/code-simplifier.md create mode 100644 agents/comment-analyzer.md create mode 100644 agents/pr-test-analyzer.md create mode 100644 agents/silent-failure-hunter.md create mode 100644 agents/type-design-analyzer.md create mode 100644 commands/feature-dev.md create mode 100644 commands/review-pr.md diff --git a/AGENTS.md b/AGENTS.md index 8fbb6b8e..9aad5972 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # Everything Claude Code (ECC) — Agent Instructions -This is a **production-ready AI coding plugin** providing 40 specialized agents, 180 skills, 77 commands, and automated hook workflows for software development. +This is a **production-ready AI coding plugin** providing 47 specialized agents, 180 skills, 79 commands, and automated hook workflows for software development. **Version:** 1.10.0 @@ -145,9 +145,9 @@ Troubleshoot failures: check test isolation → verify mocks → fix implementat ## Project Structure ``` -agents/ — 40 specialized subagents +agents/ — 47 specialized subagents skills/ — 180 workflow skills and domain knowledge -commands/ — 77 slash commands +commands/ — 79 slash commands hooks/ — Trigger-based automations rules/ — Always-follow guidelines (common + per-language) scripts/ — Cross-platform Node.js utilities diff --git a/README.md b/README.md index d434fbba..eb856afa 100644 --- a/README.md +++ b/README.md @@ -236,7 +236,7 @@ For manual install instructions see the README in the `rules/` folder. When copy /plugin list ecc@ecc ``` -**That's it!** You now have access to 40 agents, 180 skills, and 77 legacy command shims. +**That's it!** You now have access to 47 agents, 180 skills, and 79 legacy command shims. ### Multi-model commands require additional setup @@ -1152,8 +1152,8 @@ The configuration is automatically detected from `.opencode/opencode.json`. | Feature | Claude Code | OpenCode | Status | |---------|-------------|----------|--------| -| Agents | PASS: 40 agents | PASS: 12 agents | **Claude Code leads** | -| Commands | PASS: 77 commands | PASS: 31 commands | **Claude Code leads** | +| Agents | PASS: 47 agents | PASS: 12 agents | **Claude Code leads** | +| Commands | PASS: 79 commands | PASS: 31 commands | **Claude Code leads** | | Skills | PASS: 180 skills | PASS: 37 skills | **Claude Code leads** | | Hooks | PASS: 8 event types | PASS: 11 events | **OpenCode has more!** | | Rules | PASS: 29 rules | PASS: 13 instructions | **Claude Code leads** | @@ -1261,8 +1261,8 @@ ECC is the **first plugin to maximize every major AI coding tool**. Here's how e | Feature | Claude Code | Cursor IDE | Codex CLI | OpenCode | |---------|------------|------------|-----------|----------| -| **Agents** | 40 | Shared (AGENTS.md) | Shared (AGENTS.md) | 12 | -| **Commands** | 77 | Shared | Instruction-based | 31 | +| **Agents** | 47 | Shared (AGENTS.md) | Shared (AGENTS.md) | 12 | +| **Commands** | 79 | Shared | Instruction-based | 31 | | **Skills** | 180 | Shared | 10 (native format) | 37 | | **Hook Events** | 8 types | 15 types | None yet | 11 types | | **Hook Scripts** | 20+ scripts | 16 scripts (DRY adapter) | N/A | Plugin hooks | diff --git a/README.zh-CN.md b/README.zh-CN.md index cc40da8d..86849294 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -106,7 +106,7 @@ cp -r everything-claude-code/rules/perl ~/.claude/rules/ /plugin list ecc@ecc ``` -**完成!** 你现在可以使用 40 个代理、180 个技能和 77 个命令。 +**完成!** 你现在可以使用 47 个代理、180 个技能和 79 个命令。 ### multi-* 命令需要额外配置 diff --git a/WORKING-CONTEXT.md b/WORKING-CONTEXT.md index e5c1d94d..49906e48 100644 --- a/WORKING-CONTEXT.md +++ b/WORKING-CONTEXT.md @@ -163,3 +163,4 @@ Keep this file detailed for only the current sprint, blockers, and next actions. - 2026-04-05: Re-audited `origin/feat/hermes-generated-ops-skills` by full diff. The branch is still not mergeable: it deletes current ECC-native surfaces, regresses packaging/install metadata, and removes newer `main` content. Continued the selective-salvage policy instead of branch merge. - 2026-04-05: Selectively salvaged `skills/frontend-design` from the Hermes branch as a self-contained ECC-native skill, mirrored it into `.agents`, wired it into `framework-language`, and re-synced the catalog to `180` skills after validation. The branch itself remains reference-only until every remaining unique file is either ported intentionally or rejected. - 2026-04-05: Selectively salvaged the `hookify` command bundle plus the supporting `conversation-analyzer` agent from the Hermes branch. `hookify-rules` already existed as the canonical skill; this pass restores the user-facing command surfaces (`/hookify`, `/hookify-help`, `/hookify-list`, `/hookify-configure`) without pulling in any external runtime or branch-wide regressions. Catalog truth is now `40` agents, `77` commands, and `180` skills. +- 2026-04-05: Selectively salvaged the self-contained review/development bundle from the Hermes branch: `review-pr`, `feature-dev`, and the supporting analyzer/architecture agents (`code-architect`, `code-explorer`, `code-simplifier`, `comment-analyzer`, `pr-test-analyzer`, `silent-failure-hunter`, `type-design-analyzer`). This adds ECC-native command surfaces around PR review and feature planning without merging the branch's broader regressions. Catalog truth is now `47` agents, `79` commands, and `180` skills. diff --git a/agents/code-architect.md b/agents/code-architect.md new file mode 100644 index 00000000..8cd5b318 --- /dev/null +++ b/agents/code-architect.md @@ -0,0 +1,71 @@ +--- +name: code-architect +description: Designs feature architectures by analyzing existing codebase patterns and conventions, then providing implementation blueprints with concrete files, interfaces, data flow, and build order. +model: sonnet +tools: [Read, Grep, Glob, Bash] +--- + +# Code Architect Agent + +You design feature architectures based on a deep understanding of the existing codebase. + +## Process + +### 1. Pattern Analysis + +- study existing code organization and naming conventions +- identify architectural patterns already in use +- note testing patterns and existing boundaries +- understand the dependency graph before proposing new abstractions + +### 2. Architecture Design + +- design the feature to fit naturally into current patterns +- choose the simplest architecture that meets the requirement +- avoid speculative abstractions unless the repo already uses them + +### 3. Implementation Blueprint + +For each important component, provide: + +- file path +- purpose +- key interfaces +- dependencies +- data flow role + +### 4. Build Sequence + +Order the implementation by dependency: + +1. types and interfaces +2. core logic +3. integration layer +4. UI +5. tests +6. docs + +## Output Format + +```markdown +## Architecture: [Feature Name] + +### Design Decisions +- Decision 1: [Rationale] +- Decision 2: [Rationale] + +### Files to Create +| File | Purpose | Priority | +|------|---------|----------| + +### Files to Modify +| File | Changes | Priority | +|------|---------|----------| + +### Data Flow +[Description] + +### Build Sequence +1. Step 1 +2. Step 2 +``` diff --git a/agents/code-explorer.md b/agents/code-explorer.md new file mode 100644 index 00000000..51fcfddf --- /dev/null +++ b/agents/code-explorer.md @@ -0,0 +1,69 @@ +--- +name: code-explorer +description: Deeply analyzes existing codebase features by tracing execution paths, mapping architecture layers, and documenting dependencies to inform new development. +model: sonnet +tools: [Read, Grep, Glob, Bash] +--- + +# Code Explorer Agent + +You deeply analyze codebases to understand how existing features work before new work begins. + +## Analysis Process + +### 1. Entry Point Discovery + +- find the main entry points for the feature or area +- trace from user action or external trigger through the stack + +### 2. Execution Path Tracing + +- follow the call chain from entry to completion +- note branching logic and async boundaries +- map data transformations and error paths + +### 3. Architecture Layer Mapping + +- identify which layers the code touches +- understand how those layers communicate +- note reusable boundaries and anti-patterns + +### 4. Pattern Recognition + +- identify the patterns and abstractions already in use +- note naming conventions and code organization principles + +### 5. Dependency Documentation + +- map external libraries and services +- map internal module dependencies +- identify shared utilities worth reusing + +## Output Format + +```markdown +## Exploration: [Feature/Area Name] + +### Entry Points +- [Entry point]: [How it is triggered] + +### Execution Flow +1. [Step] +2. [Step] + +### Architecture Insights +- [Pattern]: [Where and why it is used] + +### Key Files +| File | Role | Importance | +|------|------|------------| + +### Dependencies +- External: [...] +- Internal: [...] + +### Recommendations for New Development +- Follow [...] +- Reuse [...] +- Avoid [...] +``` diff --git a/agents/code-simplifier.md b/agents/code-simplifier.md new file mode 100644 index 00000000..d3c034a1 --- /dev/null +++ b/agents/code-simplifier.md @@ -0,0 +1,47 @@ +--- +name: code-simplifier +description: Simplifies and refines code for clarity, consistency, and maintainability while preserving behavior. Focus on recently modified code unless instructed otherwise. +model: sonnet +tools: [Read, Write, Edit, Bash, Grep, Glob] +--- + +# Code Simplifier Agent + +You simplify code while preserving functionality. + +## Principles + +1. clarity over cleverness +2. consistency with existing repo style +3. preserve behavior exactly +4. simplify only where the result is demonstrably easier to maintain + +## Simplification Targets + +### Structure + +- extract deeply nested logic into named functions +- replace complex conditionals with early returns where clearer +- simplify callback chains with `async` / `await` +- remove dead code and unused imports + +### Readability + +- prefer descriptive names +- avoid nested ternaries +- break long chains into intermediate variables when it improves clarity +- use destructuring when it clarifies access + +### Quality + +- remove stray `console.log` +- remove commented-out code +- consolidate duplicated logic +- unwind over-abstracted single-use helpers + +## Approach + +1. read the changed files +2. identify simplification opportunities +3. apply only functionally equivalent changes +4. verify no behavioral change was introduced diff --git a/agents/comment-analyzer.md b/agents/comment-analyzer.md new file mode 100644 index 00000000..5513bc75 --- /dev/null +++ b/agents/comment-analyzer.md @@ -0,0 +1,45 @@ +--- +name: comment-analyzer +description: Analyze code comments for accuracy, completeness, maintainability, and comment rot risk. +model: sonnet +tools: [Read, Grep, Glob, Bash] +--- + +# Comment Analyzer Agent + +You ensure comments are accurate, useful, and maintainable. + +## Analysis Framework + +### 1. Factual Accuracy + +- verify claims against the code +- check parameter and return descriptions against implementation +- flag outdated references + +### 2. Completeness + +- check whether complex logic has enough explanation +- verify important side effects and edge cases are documented +- ensure public APIs have complete enough comments + +### 3. Long-Term Value + +- flag comments that only restate the code +- identify fragile comments that will rot quickly +- surface TODO / FIXME / HACK debt + +### 4. Misleading Elements + +- comments that contradict the code +- stale references to removed behavior +- over-promised or under-described behavior + +## Output Format + +Provide advisory findings grouped by severity: + +- `Inaccurate` +- `Stale` +- `Incomplete` +- `Low-value` diff --git a/agents/pr-test-analyzer.md b/agents/pr-test-analyzer.md new file mode 100644 index 00000000..04c76318 --- /dev/null +++ b/agents/pr-test-analyzer.md @@ -0,0 +1,45 @@ +--- +name: pr-test-analyzer +description: Review pull request test coverage quality and completeness, with emphasis on behavioral coverage and real bug prevention. +model: sonnet +tools: [Read, Grep, Glob, Bash] +--- + +# PR Test Analyzer Agent + +You review whether a PR's tests actually cover the changed behavior. + +## Analysis Process + +### 1. Identify Changed Code + +- map changed functions, classes, and modules +- locate corresponding tests +- identify new untested code paths + +### 2. Behavioral Coverage + +- check that each feature has tests +- verify edge cases and error paths +- ensure important integrations are covered + +### 3. Test Quality + +- prefer meaningful assertions over no-throw checks +- flag flaky patterns +- check isolation and clarity of test names + +### 4. Coverage Gaps + +Rate gaps by impact: + +- critical +- important +- nice-to-have + +## Output Format + +1. coverage summary +2. critical gaps +3. improvement suggestions +4. positive observations diff --git a/agents/silent-failure-hunter.md b/agents/silent-failure-hunter.md new file mode 100644 index 00000000..46bcbfc7 --- /dev/null +++ b/agents/silent-failure-hunter.md @@ -0,0 +1,50 @@ +--- +name: silent-failure-hunter +description: Review code for silent failures, swallowed errors, bad fallbacks, and missing error propagation. +model: sonnet +tools: [Read, Grep, Glob, Bash] +--- + +# Silent Failure Hunter Agent + +You have zero tolerance for silent failures. + +## Hunt Targets + +### 1. Empty Catch Blocks + +- `catch {}` or ignored exceptions +- errors converted to `null` / empty arrays with no context + +### 2. Inadequate Logging + +- logs without enough context +- wrong severity +- log-and-forget handling + +### 3. Dangerous Fallbacks + +- default values that hide real failure +- `.catch(() => [])` +- graceful-looking paths that make downstream bugs harder to diagnose + +### 4. Error Propagation Issues + +- lost stack traces +- generic rethrows +- missing async handling + +### 5. Missing Error Handling + +- no timeout or error handling around network/file/db paths +- no rollback around transactional work + +## Output Format + +For each finding: + +- location +- severity +- issue +- impact +- fix recommendation diff --git a/agents/type-design-analyzer.md b/agents/type-design-analyzer.md new file mode 100644 index 00000000..efdfe0d1 --- /dev/null +++ b/agents/type-design-analyzer.md @@ -0,0 +1,41 @@ +--- +name: type-design-analyzer +description: Analyze type design for encapsulation, invariant expression, usefulness, and enforcement. +model: sonnet +tools: [Read, Grep, Glob, Bash] +--- + +# Type Design Analyzer Agent + +You evaluate whether types make illegal states harder or impossible to represent. + +## Evaluation Criteria + +### 1. Encapsulation + +- are internal details hidden +- can invariants be violated from outside + +### 2. Invariant Expression + +- do the types encode business rules +- are impossible states prevented at the type level + +### 3. Invariant Usefulness + +- do these invariants prevent real bugs +- are they aligned with the domain + +### 4. Enforcement + +- are invariants enforced by the type system +- are there easy escape hatches + +## Output Format + +For each type reviewed: + +- type name and location +- scores for the four dimensions +- overall assessment +- specific improvement suggestions diff --git a/commands/feature-dev.md b/commands/feature-dev.md new file mode 100644 index 00000000..808c1e73 --- /dev/null +++ b/commands/feature-dev.md @@ -0,0 +1,49 @@ +--- +description: Guided feature development with codebase understanding and architecture focus +--- + +A structured feature-development workflow that emphasizes understanding existing code before writing new code. + +## Phases + +### 1. Discovery + +- read the feature request carefully +- identify requirements, constraints, and acceptance criteria +- ask clarifying questions if the request is ambiguous + +### 2. Codebase Exploration + +- use `code-explorer` to analyze the relevant existing code +- trace execution paths and architecture layers +- understand integration points and conventions + +### 3. Clarifying Questions + +- present findings from exploration +- ask targeted design and edge-case questions +- wait for user response before proceeding + +### 4. Architecture Design + +- use `code-architect` to design the feature +- provide the implementation blueprint +- wait for approval before implementing + +### 5. Implementation + +- implement the feature following the approved design +- prefer TDD where appropriate +- keep commits small and focused + +### 6. Quality Review + +- use `code-reviewer` to review the implementation +- address critical and important issues +- verify test coverage + +### 7. Summary + +- summarize what was built +- list follow-up items or limitations +- provide testing instructions diff --git a/commands/review-pr.md b/commands/review-pr.md new file mode 100644 index 00000000..e0d3d99e --- /dev/null +++ b/commands/review-pr.md @@ -0,0 +1,37 @@ +--- +description: Comprehensive PR review using specialized agents +--- + +Run a comprehensive multi-perspective review of a pull request. + +## Usage + +`/review-pr [PR-number-or-URL] [--focus=comments|tests|errors|types|code|simplify]` + +If no PR is specified, review the current branch's PR. If no focus is specified, run the full review stack. + +## Steps + +1. Identify the PR: + - use `gh pr view` to get PR details, changed files, and diff +2. Find project guidance: + - look for `CLAUDE.md`, lint config, TypeScript config, repo conventions +3. Run specialized review agents: + - `code-reviewer` + - `comment-analyzer` + - `pr-test-analyzer` + - `silent-failure-hunter` + - `type-design-analyzer` + - `code-simplifier` +4. Aggregate results: + - dedupe overlapping findings + - rank by severity +5. Report findings grouped by severity + +## Confidence Rule + +Only report issues with confidence >= 80: + +- Critical: bugs, security, data loss +- Important: missing tests, quality problems, style violations +- Advisory: suggestions only when explicitly requested diff --git a/docs/zh-CN/AGENTS.md b/docs/zh-CN/AGENTS.md index ba75f68a..c22bd5d4 100644 --- a/docs/zh-CN/AGENTS.md +++ b/docs/zh-CN/AGENTS.md @@ -1,6 +1,6 @@ # Everything Claude Code (ECC) — 智能体指令 -这是一个**生产就绪的 AI 编码插件**,提供 40 个专业代理、180 项技能、77 条命令以及自动化钩子工作流,用于软件开发。 +这是一个**生产就绪的 AI 编码插件**,提供 47 个专业代理、180 项技能、79 条命令以及自动化钩子工作流,用于软件开发。 **版本:** 1.10.0 @@ -146,9 +146,9 @@ ## 项目结构 ``` -agents/ — 40 个专业子代理 +agents/ — 47 个专业子代理 skills/ — 180 个工作流技能和领域知识 -commands/ — 77 个斜杠命令 +commands/ — 79 个斜杠命令 hooks/ — 基于触发的自动化 rules/ — 始终遵循的指导方针(通用 + 每种语言) scripts/ — 跨平台 Node.js 实用工具 diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index cc8320a7..e81b8c3b 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -209,7 +209,7 @@ npx ecc-install typescript /plugin list ecc@ecc ``` -**搞定!** 你现在可以使用 40 个智能体、180 项技能和 77 个命令了。 +**搞定!** 你现在可以使用 47 个智能体、180 项技能和 79 个命令了。 *** @@ -1094,8 +1094,8 @@ opencode | 功能特性 | Claude Code | OpenCode | 状态 | |---------|-------------|----------|--------| -| 智能体 | PASS: 40 个 | PASS: 12 个 | **Claude Code 领先** | -| 命令 | PASS: 77 个 | PASS: 31 个 | **Claude Code 领先** | +| 智能体 | PASS: 47 个 | PASS: 12 个 | **Claude Code 领先** | +| 命令 | PASS: 79 个 | PASS: 31 个 | **Claude Code 领先** | | 技能 | PASS: 180 项 | PASS: 37 项 | **Claude Code 领先** | | 钩子 | PASS: 8 种事件类型 | PASS: 11 种事件 | **OpenCode 更多!** | | 规则 | PASS: 29 条 | PASS: 13 条指令 | **Claude Code 领先** | @@ -1206,8 +1206,8 @@ ECC 是**第一个最大化利用每个主要 AI 编码工具的插件**。以 | 功能特性 | Claude Code | Cursor IDE | Codex CLI | OpenCode | |---------|------------|------------|-----------|----------| -| **智能体** | 40 | 共享 (AGENTS.md) | 共享 (AGENTS.md) | 12 | -| **命令** | 77 | 共享 | 基于指令 | 31 | +| **智能体** | 47 | 共享 (AGENTS.md) | 共享 (AGENTS.md) | 12 | +| **命令** | 79 | 共享 | 基于指令 | 31 | | **技能** | 180 | 共享 | 10 (原生格式) | 37 | | **钩子事件** | 8 种类型 | 15 种类型 | 暂无 | 11 种类型 | | **钩子脚本** | 20+ 个脚本 | 16 个脚本 (DRY 适配器) | N/A | 插件钩子 |