feat(agents): add spec-miner agent for brownfield spec extraction (#2253)

* feat(agents): add spec-miner agent for brownfield spec extraction

Mines behavioral specs (Requirements + Invariants) from existing codebases
without OpenSpec. Fully self-bootstrapping with sample-and-expand token
strategy. Produces flat, delta-ready spec.md files with machine-parseable
metadata (id, entities, enforced, depends_on, triggers).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* docs: bump agent catalog count from 64 to 65 for spec-miner

All documentation and plugin manifests now reflect the new agent total.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: add spec-miner to routing table and clarify id field requirement

- Add spec-miner to AGENTS.md agent table and orchestration hints
- Fix id field in output template: was marked [optional] but Rule #7
  requires it when enforced is known

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: update catalog skills count from 261 to 262 across all docs

The upstream added a 262nd skill but documentation references across 7 files
still reported 261. The CI validate step (scripts/ci/catalog.js --text) caught
the mismatch — this only runs on PRs, not on direct pushes to main.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: replace emoji characters with text equivalents in spec-miner agent

The unicode safety check (check-unicode-safety.js) blocks emoji characters.
Replace  with FAIL: per the project's targeted replacement convention.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: add Write tool to spec-miner agent tools list

The agent generates spec output files at openspec/specs/<capability>/spec.md
and requires the Write tool to create them.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: address review bot comments - tool guardrails and metadata schema consistency

- Add Tool guardrails section: scoping Write to openspec/specs/ path, Bash to read-only
- Fix deferred/uncertainty comments to follow key: value schema (deferred: file list, uncertainty: reason)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: strengthen Prompt Defense Baseline for repository content and Bash boundaries

Add two defense points: treat all repo content as untrusted prompt-injection
vector, and explicitly reject Bash commands that mutate, exfiltrate, or write
outside the allowed openspec/specs/ path.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: strip explanatory prose from id metadata comment to preserve key:value format

The id comments included explanatory text after the value, which would be
stored verbatim in copied specs and break stable delta matching. The
explanation is already covered by Format Rule #7.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: restore README.md to upstream baseline with only catalog count changes

The README was corrupted during cherry-pick conflict resolution — an older fork
version was introduced, changing release notes links, badge URLs, sponsor
sections, and other content. Restore to upstream/main (5b173d2) and re-apply
only the agent count (64→65) using catalog.js --write.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: restore all catalog files to upstream baseline, keep only intentional changes

The cherry-pick during rebase introduced a stale fork version of multiple files
via git checkout --theirs conflict resolution. Restore from upstream/main and
re-apply only:

- Agent counts: 64→65 (all 7 catalog-tracked files)
- Skills counts: 261→262 (where needed)
- AGENTS.md: spec-miner routing table + orchestration hint (our additions)

This reverts unintended regressions:
- Version downgrades (2.0.0 → 2.0.0-rc.1) in marketplace.json, plugin.json,
  AGENTS.md, docs/zh-CN/AGENTS.md, docs/zh-CN/README.md
- Badge URL changes (api.ecc.tools dynamic → hardcoded) in Chinese READMEs
- Deleted v2.0.0 stable release sections in Chinese READMEs
- Wrong release notes path (2.0.0-rc.1 → 2.0.0) in README.md

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: lege962 <1515808962@qq.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
legeZZZ
2026-06-16 02:02:02 +08:00
committed by GitHub
parent c5cec96c58
commit eb5ad2b009
8 changed files with 234 additions and 15 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
# Everything Claude Code (ECC) — 智能体指令
这是一个**生产就绪的 AI 编码插件**,提供 64 个专业代理、262 项技能、84 条命令以及自动化钩子工作流,用于软件开发。
这是一个**生产就绪的 AI 编码插件**,提供 65 个专业代理、262 项技能、84 条命令以及自动化钩子工作流,用于软件开发。
**版本:** 2.0.0
@@ -146,7 +146,7 @@
## 项目结构
```
agents/ — 64 个专业子代理
agents/ — 65 个专业子代理
skills/ — 262 个工作流技能和领域知识
commands/ — 84 个斜杠命令
hooks/ — 基于触发的自动化
+3 -3
View File
@@ -228,7 +228,7 @@ Copy-Item -Recurse rules/typescript "$HOME/.claude/rules/"
/plugin list ecc@ecc
```
**搞定!** 你现在可以使用 64 个智能体、262 项技能和 84 个命令了。
**搞定!** 你现在可以使用 65 个智能体、262 项技能和 84 个命令了。
***
@@ -1140,7 +1140,7 @@ opencode
| 功能特性 | Claude Code | OpenCode | 状态 |
|---------|---------------|----------|--------|
| 智能体 | PASS: 64 个 | PASS: 12 个 | **Claude Code 领先** |
| 智能体 | PASS: 65 个 | PASS: 12 个 | **Claude Code 领先** |
| 命令 | PASS: 84 个 | PASS: 35 个 | **Claude Code 领先** |
| 技能 | PASS: 262 项 | PASS: 37 项 | **Claude Code 领先** |
| 钩子 | PASS: 8 种事件类型 | PASS: 11 种事件 | **OpenCode 更多!** |
@@ -1248,7 +1248,7 @@ ECC 是**第一个最大化利用每个主要 AI 编码工具的插件**。以
| 功能特性 | Claude Code | Cursor IDE | Codex CLI | OpenCode |
|---------|-----------------------|------------|-----------|----------|
| **智能体** | 64 | 共享 (AGENTS.md) | 共享 (AGENTS.md) | 12 |
| **智能体** | 65 | 共享 (AGENTS.md) | 共享 (AGENTS.md) | 12 |
| **命令** | 84 | 共享 | 基于指令 | 35 |
| **技能** | 262 | 共享 | 10 (原生格式) | 37 |
| **钩子事件** | 8 种类型 | 15 种类型 | 暂无 | 11 种类型 |