convez.ai
Agente
ailin546

claude-triple-system-level8

ailin546/claude-triple-system-level8

Ver no GitHub
InicialPluginScore · de 0 a 100

Triple-System (ECC + Superpowers + Agency Agents) + Level 8 Autonomous Agent Framework for Claude Code

Instalação

$npx convez-ai ailin546/claude-triple-system-level8

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
5
Forks
1
Acompanhando
0
Saúde
28%
Último commit
há 1 mês
Versão
—
Issues abertas
0
Contribuidores
6

README

A tradução para o português deste README ainda está na fila.

Claude Triple-System + Level 8

中文 | English


中文

一套为 Claude Code 打造的完整开发框架,整合三个开源系统并扩展多 Agent 协作能力。

系统架构

框架由三层系统 + 一层协作层组成:

┌─────────────────────────────────────────────────────────┐
│  Level 8: 多 Agent 协作层                                │
│  shared-state (任务板) · sprint-memory (跨会话记忆)       │
├─────────────────────────────────────────────────────────┤
│                                                         │
│  ECC (基础设施)         hooks · 记忆 · 28 个命令         │
│  Superpowers (流程)     TDD · 调试 · 头脑风暴 · 质量门   │
│  Agency Agents (专业)   26 个领域专家 Agent               │
│                                                         │
└─────────────────────────────────────────────────────────┘
层系统来源提供什么
基础设施ECCaffaan-mHooks 生命周期管理、共享记忆、模式学习、28 个斜杠命令
流程SuperpowersobraTDD 铁律、系统化调试、头脑风暴、验证门控
专业Agency Agentsmsitarzewski26 个领域专家(安全、架构、前端、DevOps 等)
协作Level 8(本仓库)本项目多 Agent 共享状态、跨会话记忆、自治权限

工作原理

1. Hook 驱动的自动化

框架通过 Claude Code 的 Hook 机制在关键节点自动执行逻辑,无需手动干预:

时机自动执行的操作
会话启动 (SessionStart)恢复上次会话状态、加载共享记忆、重置模式为 Fast
工具调用前 (PreToolUse)拦截危险命令(rm -rf、DROP TABLE)、编辑范围守卫、自动模式升档
工具调用后 (PostToolUse)轻量格式化、console.log 警告、漂移检测、类型检查
会话结束 (Stop)抽取高价值记忆、持久化会话状态、成本追踪
上下文压缩前 (PreCompact)保存当前状态避免压缩丢失

2. 三档模式路由

每个任务自动分配流程强度,Hook 按模式分层启用:

模式触发条件自动启用
Fast(默认)写文档、单文件小改、配置微调基础 Hook(安全守卫 + 轻量格式化 + 记忆摘要)
Standard跨文件功能开发、一般 bugfixFast + 漂移检测、质量门、类型检查、决策记忆
Heavy认证/支付/权限/迁移/部署Standard + 共享状态、冲突检测、跨会话记忆

自动升档:pre-tool-escalate.js 检测风险关键词(auth/payment/deploy)和跨文件累积(3 文件 → Standard,6 文件 → Heavy),5 分钟空闲自动重置。

3. 共享记忆系统

三层记忆架构,跨会话、跨工具持久化知识:

.memory/
├── today.md       ← 当日工作日志(会话结束自动写入)
├── weekly.md      ← 本周摘要(次日自动归档)
└── long-term.md   ← 永久知识库
  • 会话启动时自动加载 long-term.md → weekly.md → today.md
  • 会话结束时自动抽取高价值信息(决策、约束、未完成事项)写入 today.md
  • 跨日自动归档(today → weekly)

4. 专家 Agent 自动路由

根据任务类型自动选择合适的专家 Agent:

任务Agent任务Agent
React/Vue/CSSfrontend-developer安全审计security-engineer
API/数据库backend-architectCI/CD/Dockerdevops-automator
AI/MLai-engineer代码审查code-reviewer
系统设计software-architect快速原型rapid-prototyper

安装方式

方式一:直接使用(学习/体验)

git clone https://github.com/ailin546/claude-triple-system-level8.git
cd claude-triple-system-level8
claude   # 启动 Claude Code

方式二:作为子模块集成到现有项目

cd your-project
bash <(curl -sL https://raw.githubusercontent.com/ailin546/claude-triple-system-level8/main/install.sh) \
  https://github.com/ailin546/claude-triple-system-level8.git

这会自动:

  1. 将框架添加为 .claude-system/ 子模块
  2. 符号链接 agents、skills、commands、rules 等到 .claude/
  3. 复制 settings.json(Hook 配置)
  4. 安装 git hook(后续 pull/checkout 自动重新链接)

更新框架:

bash .claude-system/install.sh --update

手动命令

以下命令在 Claude Code 对话中通过 /命令名 调用:

核心命令

命令说明适用模式
/plan分析需求,生成分步实现计划,等待确认后再动手Standard+
/tdd强制测试驱动:先写失败测试 → 最小实现 → 重构Standard+
/verify运行 lint、类型检查、测试,用实际输出验证结果所有模式
/code-review对已写代码进行安全和质量审查Standard+
/build-fix分析构建错误并修复所有模式

会话管理

命令说明适用模式
/save-session保存当前会话状态到文件,便于日后恢复Standard+
/resume-session加载上次保存的会话,恢复完整上下文Standard+
/learn从当前会话提取可复用模式,保存为 instinctStandard+

安全与控制

命令说明适用模式
/careful开关危险命令守卫(拦截 rm -rf 等)所有模式
/freeze锁定编辑范围到指定目录,防止越界修改所有模式
/unfreeze解除编辑范围锁所有模式
/harness-audit审计当前 Hook 和配置状态所有模式

设计与审查

命令说明适用模式
/design-consultation多角度设计咨询(UI + UX + 无障碍)Standard+
/design-review实现完成后的设计审查Standard+
/codex:review / /codex:adversarial-review / /codex:rescue通过官方 codex-plugin-cc 插件进行跨 AI 代码审查与任务委派(首次使用 /codex:setup)Standard+
/e2e生成并运行 Playwright E2E 测试Standard+

推荐工作流

Fast 模式:    直接做 → /verify
Standard 模式: /plan → 实施 → /verify
Heavy 模式:    /plan → /tdd → 实施 → /code-review → /verify

手动模式控制

模式通常自动判定,但可手动覆盖:

# 在 Claude Code 对话中让 Claude 执行:
node .claude/scripts/hooks/set-mode.js standard   # 升档到 Standard
node .claude/scripts/hooks/set-mode.js heavy       # 升档到 Heavy
node .claude/scripts/hooks/set-mode.js --reset     # 重置为 Fast

也可直接告诉 Claude:

  • "直接做" / "走轻量流程" → 降档
  • "需要完整审查" / "按重型流程来" → 升档

目录结构

.
├── CLAUDE.md                  ← 项目指令(Claude Code 自动加载)
├── install.sh                 ← 一键安装脚本(子模块模式)
├── setup-claude.sh            ← 链接脚本(符号链接框架到 .claude/)
├── .memory/                   ← 跨工具共享记忆
│   ├── today.md               ← 当日日志
│   ├── weekly.md              ← 周度摘要
│   └── long-term.md           ← 永久知识库
└── .claude/
    ├── settings.json          ← Hook 配置(所有 Hook 常驻注册,脚本内模式门控)
    ├── agents/                ← 26 个专家 Agent 定义
    ├── skills/                ← 38 个 Skill(流程模板)
    ├── commands/              ← 28 个斜杠命令
    ├── rules/                 ← 11 个规则文件
    ├── scripts/hooks/         ← 29 个 Hook 脚本
    ├── strategies/            ← Playbook 和 Runbook
    ├── shared-state/          ← 多 Agent 任务板(Heavy 模式)
    ├── mcp-configs/           ← MCP server 模板
    └── examples/              ← 工作流示例

许可证

MIT

来源


English

A comprehensive development framework for Claude Code, integrating three open-source systems with multi-agent coordination capabilities.

Architecture

The framework consists of three systems + one coordination layer:

┌─────────────────────────────────────────────────────────┐
│  Level 8: Multi-Agent Coordination                       │
│  shared-state (task board) · sprint-memory (cross-session)│
├─────────────────────────────────────────────────────────┤
│                                                         │
│  ECC (Infrastructure)    hooks · memory · 28 commands    │
│  Superpowers (Process)   TDD · debugging · quality gates │
│  Agency Agents (Expertise) 26 domain expert agents       │
│                                                         │
└─────────────────────────────────────────────────────────┘
LayerSystemSourceWhat It Provides
InfrastructureECCaffaan-mHook lifecycle, shared memory, pattern learning, 28 slash commands
ProcessSuperpowersobraTDD discipline, systematic debugging, brainstorming, verification gates
ExpertiseAgency Agentsmsitarzewski26 domain experts (security, architecture, frontend, DevOps, etc.)
CoordinationLevel 8 (this repo)This projectMulti-agent shared state, cross-session memory, autonomous permissions

How It Works

1. Hook-Driven Automation

The framework uses Claude Code's Hook mechanism to automatically execute logic at key lifecycle points — no manual intervention needed:

TimingAutomated Actions
Session Start (SessionStart)Restore previous session state, load shared memory, reset mode to Fast
Before Tool Use (PreToolUse)Block dangerous commands (rm -rf, DROP TABLE), edit scope guard, auto mode escalation
After Tool Use (PostToolUse)Light formatting, console.log warnings, drift detection, type checking
Session End (Stop)Extract high-value memory, persist session state, cost tracking
Before Compaction (PreCompact)Save state before context compression

2. Three-Tier Mode Routing

Each task is automatically assigned a process intensity level. Hooks are layered by mode:

ModeTriggerAuto-Enabled
Fast (default)Docs, single-file edits, config tweaksBasic hooks (safety guard + light formatting + memory summary)
StandardMulti-file feature dev, general bugfixesFast + drift detection, quality gate, type checking, decision memory
HeavyAuth/payment/permissions/migration/deployStandard + shared state, conflict detection, cross-session memory

Auto-escalation: pre-tool-escalate.js detects risk keywords (auth/payment/deploy) and cross-file accumulation (3 files → Standard, 6 files → Heavy). Resets after 5 minutes idle.

3. Shared Memory System

Three-layer memory architecture for cross-session, cross-tool knowledge persistence:

.memory/
├── today.md       ← Daily work log (auto-written at session end)
├── weekly.md      ← Weekly summary (auto-archived next day)
└── long-term.md   ← Permanent knowledge base
  • Auto-loaded at session start: long-term.md → weekly.md → today.md
  • High-value information (decisions, constraints, open items) auto-extracted at session end
  • Cross-day auto-archival (today → weekly)

4. Expert Agent Auto-Routing

The appropriate expert agent is automatically selected based on task type:

TaskAgentTaskAgent
React/Vue/CSSfrontend-developerSecurity auditsecurity-engineer
API/Databasebackend-architectCI/CD/Dockerdevops-automator
AI/MLai-engineerCode reviewcode-reviewer
System designsoftware-architectRapid prototyperapid-prototyper

Installation

Option 1: Direct Use (learning/exploration)

git clone https://github.com/ailin546/claude-triple-system-level8.git
cd claude-triple-system-level8
claude   # Start Claude Code

Option 2: Integrate as Submodule into Existing Project

cd your-project
bash <(curl -sL https://raw.githubusercontent.com/ailin546/claude-triple-system-level8/main/install.sh) \
  https://github.com/ailin546/claude-triple-system-level8.git

This automatically:

  1. Adds the framework as a .claude-system/ submodule
  2. Symlinks agents, skills, commands, rules, etc. to .claude/
  3. Copies settings.json (hook configuration)
  4. Installs git hooks (auto-relinks on subsequent pull/checkout)

Update the framework:

bash .claude-system/install.sh --update

Manual Commands

These commands are invoked via /command-name within a Claude Code conversation:

Core Commands

CommandDescriptionMode
/planAnalyze requirements, generate step-by-step plan, wait for confirmationStandard+
/tddEnforce test-driven: write failing test → minimal impl → refactorStandard+
/verifyRun lint, type check, tests; verify with actual outputAll modes
/code-reviewSecurity and quality review of written codeStandard+
/build-fixAnalyze and fix build errorsAll modes

Session Management

CommandDescriptionMode
/save-sessionSave current session state for later restorationStandard+
/resume-sessionLoad last saved session with full contextStandard+
/learnExtract reusable patterns from current sessionStandard+

Safety & Control

CommandDescriptionMode
/carefulToggle dangerous command guard (blocks rm -rf, etc.)All modes
/freezeLock edits to a specific directoryAll modes
/unfreezeRemove edit scope lockAll modes
/harness-auditAudit current hook and config statusAll modes

Design & Review

CommandDescriptionMode
/design-consultationMulti-perspective design consultation (UI + UX + a11y)Standard+
/design-reviewPost-implementation design reviewStandard+
/codex:review / /codex:adversarial-review / /codex:rescueCross-AI code review and task delegation via the official codex-plugin-cc plugin (first-time: /codex:setup)Standard+
/e2eGenerate and run Playwright E2E testsStandard+

Recommended Workflows

Fast mode:     Just do it → /verify
Standard mode: /plan → implement → /verify
Heavy mode:    /plan → /tdd → implement → /code-review → /verify

Manual Mode Control

Mode is usually auto-determined, but can be manually overridden:

# Ask Claude to run in the conversation:
node .claude/scripts/hooks/set-mode.js standard   # Escalate to Standard
node .claude/scripts/hooks/set-mode.js heavy       # Escalate to Heavy
node .claude/scripts/hooks/set-mode.js --reset     # Reset to Fast

Or tell Claude directly:

  • "Just do it" / "keep it lightweight" → downgrade
  • "Full review needed" / "use heavy process" → upgrade

Directory Structure

.
├── CLAUDE.md                  ← Project instructions (auto-loaded by Claude Code)
├── install.sh                 ← One-click installer (submodule mode)
├── setup-claude.sh            ← Linker script (symlinks framework to .claude/)
├── .memory/                   ← Cross-tool shared memory
│   ├── today.md               ← Daily log
│   ├── weekly.md              ← Weekly summary
│   └── long-term.md           ← Permanent knowledge base
└── .claude/
    ├── settings.json          ← Hook config (all hooks registered, mode-gated in scripts)
    ├── agents/                ← 26 expert agent definitions
    ├── skills/                ← 38 skills (process templates)
    ├── commands/              ← 28 slash commands
    ├── rules/                 ← 11 rule files
    ├── scripts/hooks/         ← 29 hook scripts
    ├── strategies/            ← Playbooks and runbooks
    ├── shared-state/          ← Multi-agent task board (Heavy mode)
    ├── mcp-configs/           ← MCP server templates
    └── examples/              ← Workflow examples

License

MIT

Sources

Ver o original no GitHub

Bom para

Relacionados