mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 13:43:26 +08:00
Compare commits
1 Commits
ecc-tools/
...
ecc-tools/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c41b3f5bbc |
@@ -5,7 +5,7 @@ description: Development conventions and patterns for everything-claude-code. Ja
|
||||
|
||||
# Everything Claude Code Conventions
|
||||
|
||||
> Generated from [affaan-m/everything-claude-code](https://github.com/affaan-m/everything-claude-code) on 2026-03-24
|
||||
> Generated from [affaan-m/everything-claude-code](https://github.com/affaan-m/everything-claude-code) on 2026-03-20
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -33,14 +33,14 @@ Follow these commit message conventions based on 500 analyzed commits.
|
||||
|
||||
### Prefixes Used
|
||||
|
||||
- `feat`
|
||||
- `fix`
|
||||
- `docs`
|
||||
- `test`
|
||||
- `feat`
|
||||
- `docs`
|
||||
|
||||
### Message Guidelines
|
||||
|
||||
- Average message length: ~62 characters
|
||||
- Average message length: ~65 characters
|
||||
- Keep first line concise and descriptive
|
||||
- Use imperative mood ("Add feature" not "Added feature")
|
||||
|
||||
@@ -48,49 +48,49 @@ Follow these commit message conventions based on 500 analyzed commits.
|
||||
*Commit message example*
|
||||
|
||||
```text
|
||||
feat: add everything-claude-code ECC bundle (.claude/commands/add-or-update-skill.md)
|
||||
feat(rules): add C# language support
|
||||
```
|
||||
|
||||
*Commit message example*
|
||||
|
||||
```text
|
||||
perf(hooks): move post-edit-format and post-edit-typecheck to strict-only (#757)
|
||||
chore(deps-dev): bump flatted (#675)
|
||||
```
|
||||
|
||||
*Commit message example*
|
||||
|
||||
```text
|
||||
fix: safe Codex config sync — merge AGENTS.md + add-only MCP servers (#723)
|
||||
fix: auto-detect ECC root from plugin cache when CLAUDE_PLUGIN_ROOT is unset (#547) (#691)
|
||||
```
|
||||
|
||||
*Commit message example*
|
||||
|
||||
```text
|
||||
docs(zh-CN): translate code block(plain text) (#753)
|
||||
docs: add Antigravity setup and usage guide (#552)
|
||||
```
|
||||
|
||||
*Commit message example*
|
||||
|
||||
```text
|
||||
security: remove supply chain risks, external promotions, and unauthorized credits
|
||||
merge: PR #529 — feat(skills): add documentation-lookup, bun-runtime, nextjs-turbopack; feat(agents): add rust-reviewer
|
||||
```
|
||||
|
||||
*Commit message example*
|
||||
|
||||
```text
|
||||
feat: add everything-claude-code ECC bundle (.claude/commands/feature-development.md)
|
||||
Revert "Add Kiro IDE support (.kiro/) (#548)"
|
||||
```
|
||||
|
||||
*Commit message example*
|
||||
|
||||
```text
|
||||
feat: add everything-claude-code ECC bundle (.claude/commands/database-migration.md)
|
||||
Add Kiro IDE support (.kiro/) (#548)
|
||||
```
|
||||
|
||||
*Commit message example*
|
||||
|
||||
```text
|
||||
feat: add everything-claude-code ECC bundle (.claude/enterprise/controls.md)
|
||||
feat: add block-no-verify hook for Claude Code and Cursor (#649)
|
||||
```
|
||||
|
||||
## Architecture
|
||||
@@ -196,20 +196,21 @@ Database schema changes with migration files
|
||||
3. Generate/update types
|
||||
|
||||
**Files typically involved**:
|
||||
- `**/schema.*`
|
||||
- `migrations/*`
|
||||
|
||||
**Example commit sequence**:
|
||||
```
|
||||
Add Turkish (tr) docs and update README (#744)
|
||||
docs(zh-CN): translate code block(plain text) (#753)
|
||||
fix(install): add rust, cpp, csharp to legacy language alias map (#747)
|
||||
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**: ~26 times per month
|
||||
**Frequency**: ~22 times per month
|
||||
|
||||
**Steps**:
|
||||
1. Add feature implementation
|
||||
@@ -218,136 +219,204 @@ Standard feature implementation workflow
|
||||
|
||||
**Files typically involved**:
|
||||
- `manifests/*`
|
||||
- `schemas/*`
|
||||
- `**/*.test.*`
|
||||
- `**/api/**`
|
||||
|
||||
**Example commit sequence**:
|
||||
```
|
||||
Merge pull request #736 from pvgomes/docs/add-brazilian-portuguese-translation
|
||||
fix: bump plugin.json and marketplace.json to v1.9.0
|
||||
Add Turkish (tr) docs and update README (#744)
|
||||
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 Or Update Skill
|
||||
### Add Language Rules
|
||||
|
||||
Adds or updates a skill in the ECC system, including documentation and provenance.
|
||||
Adds a new programming language to the rules system, including coding style, hooks, patterns, security, and testing guidelines.
|
||||
|
||||
**Frequency**: ~3 times per month
|
||||
**Frequency**: ~2 times per month
|
||||
|
||||
**Steps**:
|
||||
1. Create or update SKILL.md in the appropriate skills directory (e.g., skills/{skill-name}/SKILL.md or .claude/skills/{skill-name}/SKILL.md)
|
||||
2. Optionally add or update agent YAML files (e.g., .agents/skills/{skill-name}/agents/*.yaml)
|
||||
3. Optionally update provenance or placement policy files (e.g., schemas/provenance.schema.json, docs/SKILL-PLACEMENT-POLICY.md)
|
||||
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**:
|
||||
- `skills/*/SKILL.md`
|
||||
- `.claude/skills/*/SKILL.md`
|
||||
- `.agents/skills/*/SKILL.md`
|
||||
- `.agents/skills/*/agents/*.yaml`
|
||||
- `schemas/provenance.schema.json`
|
||||
- `docs/SKILL-PLACEMENT-POLICY.md`
|
||||
- `rules/*/coding-style.md`
|
||||
- `rules/*/hooks.md`
|
||||
- `rules/*/patterns.md`
|
||||
- `rules/*/security.md`
|
||||
- `rules/*/testing.md`
|
||||
|
||||
**Example commit sequence**:
|
||||
```
|
||||
Create or update SKILL.md in the appropriate skills directory (e.g., skills/{skill-name}/SKILL.md or .claude/skills/{skill-name}/SKILL.md)
|
||||
Optionally add or update agent YAML files (e.g., .agents/skills/{skill-name}/agents/*.yaml)
|
||||
Optionally update provenance or placement policy files (e.g., schemas/provenance.schema.json, docs/SKILL-PLACEMENT-POLICY.md)
|
||||
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 Or Update Command Documentation
|
||||
### Add New Skill
|
||||
|
||||
Adds or updates documentation for a command, often as part of a new feature or workflow.
|
||||
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 or update .claude/commands/{command-name}.md
|
||||
2. Optionally update localized docs (e.g., docs/zh-CN/commands/{command-name}.md, docs/tr/commands/{command-name}.md, docs/pt-BR/commands/{command-name}.md)
|
||||
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**:
|
||||
- `.claude/commands/*.md`
|
||||
- `docs/zh-CN/commands/*.md`
|
||||
- `docs/tr/commands/*.md`
|
||||
- `docs/pt-BR/commands/*.md`
|
||||
- `skills/*/SKILL.md`
|
||||
- `skills/*/scripts/*.sh`
|
||||
- `skills/*/scripts/*.js`
|
||||
|
||||
**Example commit sequence**:
|
||||
```
|
||||
Create or update .claude/commands/{command-name}.md
|
||||
Optionally update localized docs (e.g., docs/zh-CN/commands/{command-name}.md, docs/tr/commands/{command-name}.md, docs/pt-BR/commands/{command-name}.md)
|
||||
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 Or Update Localized Documentation
|
||||
### Add New Agent
|
||||
|
||||
Adds or updates documentation in a new or existing language (localization).
|
||||
Adds a new agent to the system for code review, build resolution, or other automated tasks.
|
||||
|
||||
**Frequency**: ~2 times per month
|
||||
|
||||
**Steps**:
|
||||
1. Add or update files in docs/{locale}/ (where locale is zh-CN, tr, pt-BR, etc.)
|
||||
2. Update README.md to reflect new language support
|
||||
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**:
|
||||
- `docs/zh-CN/**/*`
|
||||
- `docs/tr/**/*`
|
||||
- `docs/pt-BR/**/*`
|
||||
- `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**:
|
||||
```
|
||||
Add or update files in docs/{locale}/ (where locale is zh-CN, tr, pt-BR, etc.)
|
||||
Update README.md to reflect new language support
|
||||
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
|
||||
```
|
||||
|
||||
### Update Or Add Hooks
|
||||
### Add Cross Harness Skill Copies
|
||||
|
||||
Adds or updates hooks for validation, config protection, or workflow automation.
|
||||
Adds skill copies for different agent harnesses (e.g., Codex, Cursor, Antigravity) to ensure compatibility across platforms.
|
||||
|
||||
**Frequency**: ~2 times per month
|
||||
|
||||
**Steps**:
|
||||
1. Edit hooks/hooks.json to add or update hook definitions
|
||||
2. Create or update scripts/hooks/*.js or .ts for hook logic
|
||||
3. Optionally update plugin files (e.g., .opencode/plugins/ecc-hooks.ts)
|
||||
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`
|
||||
- `.opencode/plugins/*.ts`
|
||||
- `tests/hooks/*.test.js`
|
||||
- `.cursor/hooks.json`
|
||||
|
||||
**Example commit sequence**:
|
||||
```
|
||||
Edit hooks/hooks.json to add or update hook definitions
|
||||
Create or update scripts/hooks/*.js or .ts for hook logic
|
||||
Optionally update plugin files (e.g., .opencode/plugins/ecc-hooks.ts)
|
||||
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/
|
||||
```
|
||||
|
||||
### Add Or Update Ecc Bundle
|
||||
### Address Review Feedback
|
||||
|
||||
Adds or updates a set of ECC configuration, command, or skill files as a bundle.
|
||||
Addresses code review feedback by updating documentation, scripts, or configuration for clarity, correctness, or convention alignment.
|
||||
|
||||
**Frequency**: ~2 times per month
|
||||
**Frequency**: ~4 times per month
|
||||
|
||||
**Steps**:
|
||||
1. Create or update files in .claude/ (commands, skills, rules, team, identity, etc.)
|
||||
2. Optionally update .codex/agents/*.toml and .agents/skills/*
|
||||
3. Repeat for each bundle component as needed
|
||||
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**:
|
||||
- `.claude/commands/*.md`
|
||||
- `.claude/skills/*/SKILL.md`
|
||||
- `.claude/rules/*.md`
|
||||
- `.claude/team/*.json`
|
||||
- `.claude/identity.json`
|
||||
- `.claude/ecc-tools.json`
|
||||
- `.codex/agents/*.toml`
|
||||
- `skills/*/SKILL.md`
|
||||
- `agents/*.md`
|
||||
- `commands/*.md`
|
||||
- `.agents/skills/*/SKILL.md`
|
||||
- `.agents/skills/*/agents/*.yaml`
|
||||
- `.cursor/skills/*/SKILL.md`
|
||||
|
||||
**Example commit sequence**:
|
||||
```
|
||||
Create or update files in .claude/ (commands, skills, rules, team, identity, etc.)
|
||||
Optionally update .codex/agents/*.toml and .agents/skills/*
|
||||
Repeat for each bundle component as needed
|
||||
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
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
---
|
||||
name: add-or-update-skill-documentation
|
||||
description: Workflow command scaffold for add-or-update-skill-documentation in everything-claude-code.
|
||||
allowed_tools: ["Bash", "Read", "Write", "Grep", "Glob"]
|
||||
---
|
||||
|
||||
# /add-or-update-skill-documentation
|
||||
|
||||
Use this workflow when working on **add-or-update-skill-documentation** in `everything-claude-code`.
|
||||
|
||||
## Goal
|
||||
|
||||
Adds a new skill or updates documentation for an existing skill, typically in the form of a SKILL.md file under skills/ or skills/*/SKILL.md.
|
||||
|
||||
## Common Files
|
||||
|
||||
- `skills/*/SKILL.md`
|
||||
- `AGENTS.md`
|
||||
- `README.md`
|
||||
|
||||
## Suggested Sequence
|
||||
|
||||
1. Understand the current state and failure mode before editing.
|
||||
2. Make the smallest coherent change that satisfies the workflow goal.
|
||||
3. Run the most relevant verification for touched files.
|
||||
4. Summarize what changed and what still needs review.
|
||||
|
||||
## Typical Commit Signals
|
||||
|
||||
- Create or update skills/<skill-name>/SKILL.md
|
||||
- Optionally update AGENTS.md or README.md to reflect new skill
|
||||
- Optionally add architecture diagrams or implementation notes
|
||||
|
||||
## Notes
|
||||
|
||||
- Treat this as a scaffold, not a hard-coded script.
|
||||
- Update the command if the workflow evolves materially.
|
||||
@@ -1,40 +0,0 @@
|
||||
---
|
||||
name: add-or-update-skill
|
||||
description: Workflow command scaffold for add-or-update-skill in everything-claude-code.
|
||||
allowed_tools: ["Bash", "Read", "Write", "Grep", "Glob"]
|
||||
---
|
||||
|
||||
# /add-or-update-skill
|
||||
|
||||
Use this workflow when working on **add-or-update-skill** in `everything-claude-code`.
|
||||
|
||||
## Goal
|
||||
|
||||
Adds or updates a skill in the ECC system, including documentation and provenance.
|
||||
|
||||
## Common Files
|
||||
|
||||
- `skills/*/SKILL.md`
|
||||
- `.claude/skills/*/SKILL.md`
|
||||
- `.agents/skills/*/SKILL.md`
|
||||
- `.agents/skills/*/agents/*.yaml`
|
||||
- `schemas/provenance.schema.json`
|
||||
- `docs/SKILL-PLACEMENT-POLICY.md`
|
||||
|
||||
## Suggested Sequence
|
||||
|
||||
1. Understand the current state and failure mode before editing.
|
||||
2. Make the smallest coherent change that satisfies the workflow goal.
|
||||
3. Run the most relevant verification for touched files.
|
||||
4. Summarize what changed and what still needs review.
|
||||
|
||||
## Typical Commit Signals
|
||||
|
||||
- Create or update SKILL.md in the appropriate skills directory (e.g., skills/{skill-name}/SKILL.md or .claude/skills/{skill-name}/SKILL.md)
|
||||
- Optionally add or update agent YAML files (e.g., .agents/skills/{skill-name}/agents/*.yaml)
|
||||
- Optionally update provenance or placement policy files (e.g., schemas/provenance.schema.json, docs/SKILL-PLACEMENT-POLICY.md)
|
||||
|
||||
## Notes
|
||||
|
||||
- Treat this as a scaffold, not a hard-coded script.
|
||||
- Update the command if the workflow evolves materially.
|
||||
@@ -14,6 +14,7 @@ Database schema changes with migration files
|
||||
|
||||
## Common Files
|
||||
|
||||
- `**/schema.*`
|
||||
- `migrations/*`
|
||||
|
||||
## Suggested Sequence
|
||||
|
||||
@@ -15,6 +15,7 @@ Standard feature implementation workflow
|
||||
## Common Files
|
||||
|
||||
- `manifests/*`
|
||||
- `schemas/*`
|
||||
- `**/*.test.*`
|
||||
- `**/api/**`
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"version": "1.3",
|
||||
"schemaVersion": "1.0",
|
||||
"generatedBy": "ecc-tools",
|
||||
"generatedAt": "2026-03-24T10:44:06.345Z",
|
||||
"generatedAt": "2026-03-20T12:07:36.496Z",
|
||||
"repo": "https://github.com/affaan-m/everything-claude-code",
|
||||
"profiles": {
|
||||
"requested": "full",
|
||||
@@ -150,7 +150,7 @@
|
||||
".claude/enterprise/controls.md",
|
||||
".claude/commands/database-migration.md",
|
||||
".claude/commands/feature-development.md",
|
||||
".claude/commands/add-or-update-skill.md"
|
||||
".claude/commands/add-language-rules.md"
|
||||
],
|
||||
"packageFiles": {
|
||||
"runtime-core": [
|
||||
@@ -180,7 +180,7 @@
|
||||
"workflow-pack": [
|
||||
".claude/commands/database-migration.md",
|
||||
".claude/commands/feature-development.md",
|
||||
".claude/commands/add-or-update-skill.md"
|
||||
".claude/commands/add-language-rules.md"
|
||||
]
|
||||
},
|
||||
"moduleFiles": {
|
||||
@@ -211,7 +211,7 @@
|
||||
"workflow-pack": [
|
||||
".claude/commands/database-migration.md",
|
||||
".claude/commands/feature-development.md",
|
||||
".claude/commands/add-or-update-skill.md"
|
||||
".claude/commands/add-language-rules.md"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
@@ -297,8 +297,8 @@
|
||||
},
|
||||
{
|
||||
"moduleId": "workflow-pack",
|
||||
"path": ".claude/commands/add-or-update-skill.md",
|
||||
"description": "Workflow command scaffold for add-or-update-skill."
|
||||
"path": ".claude/commands/add-language-rules.md",
|
||||
"description": "Workflow command scaffold for add-language-rules."
|
||||
}
|
||||
],
|
||||
"workflows": [
|
||||
@@ -311,8 +311,8 @@
|
||||
"path": ".claude/commands/feature-development.md"
|
||||
},
|
||||
{
|
||||
"command": "add-or-update-skill",
|
||||
"path": ".claude/commands/add-or-update-skill.md"
|
||||
"command": "add-language-rules",
|
||||
"path": ".claude/commands/add-language-rules.md"
|
||||
}
|
||||
],
|
||||
"adapters": {
|
||||
@@ -322,7 +322,7 @@
|
||||
"commandPaths": [
|
||||
".claude/commands/database-migration.md",
|
||||
".claude/commands/feature-development.md",
|
||||
".claude/commands/add-or-update-skill.md"
|
||||
".claude/commands/add-language-rules.md"
|
||||
]
|
||||
},
|
||||
"codex": {
|
||||
|
||||
@@ -10,5 +10,5 @@
|
||||
"javascript"
|
||||
],
|
||||
"suggestedBy": "ecc-tools-repo-analysis",
|
||||
"createdAt": "2026-03-24T10:44:20.963Z"
|
||||
"createdAt": "2026-03-20T12:07:57.119Z"
|
||||
}
|
||||
@@ -18,4 +18,4 @@ Use this when the task is documentation-heavy, source-sensitive, or requires bro
|
||||
|
||||
- Primary language: JavaScript
|
||||
- Framework: Not detected
|
||||
- Workflows detected: 7
|
||||
- Workflows detected: 10
|
||||
@@ -4,7 +4,7 @@ Generated by ECC Tools from repository history. Review before treating it as a h
|
||||
|
||||
## Commit Workflow
|
||||
|
||||
- Prefer `conventional` commit messaging with prefixes such as feat, fix, docs, test.
|
||||
- Prefer `conventional` commit messaging with prefixes such as fix, test, feat, docs.
|
||||
- Keep new changes aligned with the existing pull-request and review flow already present in the repo.
|
||||
|
||||
## Architecture
|
||||
@@ -26,7 +26,7 @@ Generated by ECC Tools from repository history. Review before treating it as a h
|
||||
|
||||
- database-migration: Database schema changes with migration files
|
||||
- feature-development: Standard feature implementation workflow
|
||||
- add-or-update-skill: Adds or updates a skill in the ECC system, including documentation and provenance.
|
||||
- add-language-rules: Adds a new programming language to the rules system, including coding style, hooks, patterns, security, and testing guidelines.
|
||||
|
||||
## Review Reminder
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ description: Development conventions and patterns for everything-claude-code. Ja
|
||||
|
||||
# Everything Claude Code Conventions
|
||||
|
||||
> Generated from [affaan-m/everything-claude-code](https://github.com/affaan-m/everything-claude-code) on 2026-03-24
|
||||
> Generated from [affaan-m/everything-claude-code](https://github.com/affaan-m/everything-claude-code) on 2026-03-20
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -33,14 +33,14 @@ Follow these commit message conventions based on 500 analyzed commits.
|
||||
|
||||
### Prefixes Used
|
||||
|
||||
- `feat`
|
||||
- `fix`
|
||||
- `docs`
|
||||
- `test`
|
||||
- `feat`
|
||||
- `docs`
|
||||
|
||||
### Message Guidelines
|
||||
|
||||
- Average message length: ~62 characters
|
||||
- Average message length: ~65 characters
|
||||
- Keep first line concise and descriptive
|
||||
- Use imperative mood ("Add feature" not "Added feature")
|
||||
|
||||
@@ -48,49 +48,49 @@ Follow these commit message conventions based on 500 analyzed commits.
|
||||
*Commit message example*
|
||||
|
||||
```text
|
||||
feat: add everything-claude-code ECC bundle (.claude/commands/add-or-update-skill.md)
|
||||
feat(rules): add C# language support
|
||||
```
|
||||
|
||||
*Commit message example*
|
||||
|
||||
```text
|
||||
perf(hooks): move post-edit-format and post-edit-typecheck to strict-only (#757)
|
||||
chore(deps-dev): bump flatted (#675)
|
||||
```
|
||||
|
||||
*Commit message example*
|
||||
|
||||
```text
|
||||
fix: safe Codex config sync — merge AGENTS.md + add-only MCP servers (#723)
|
||||
fix: auto-detect ECC root from plugin cache when CLAUDE_PLUGIN_ROOT is unset (#547) (#691)
|
||||
```
|
||||
|
||||
*Commit message example*
|
||||
|
||||
```text
|
||||
docs(zh-CN): translate code block(plain text) (#753)
|
||||
docs: add Antigravity setup and usage guide (#552)
|
||||
```
|
||||
|
||||
*Commit message example*
|
||||
|
||||
```text
|
||||
security: remove supply chain risks, external promotions, and unauthorized credits
|
||||
merge: PR #529 — feat(skills): add documentation-lookup, bun-runtime, nextjs-turbopack; feat(agents): add rust-reviewer
|
||||
```
|
||||
|
||||
*Commit message example*
|
||||
|
||||
```text
|
||||
feat: add everything-claude-code ECC bundle (.claude/commands/feature-development.md)
|
||||
Revert "Add Kiro IDE support (.kiro/) (#548)"
|
||||
```
|
||||
|
||||
*Commit message example*
|
||||
|
||||
```text
|
||||
feat: add everything-claude-code ECC bundle (.claude/commands/database-migration.md)
|
||||
Add Kiro IDE support (.kiro/) (#548)
|
||||
```
|
||||
|
||||
*Commit message example*
|
||||
|
||||
```text
|
||||
feat: add everything-claude-code ECC bundle (.claude/enterprise/controls.md)
|
||||
feat: add block-no-verify hook for Claude Code and Cursor (#649)
|
||||
```
|
||||
|
||||
## Architecture
|
||||
@@ -196,20 +196,21 @@ Database schema changes with migration files
|
||||
3. Generate/update types
|
||||
|
||||
**Files typically involved**:
|
||||
- `**/schema.*`
|
||||
- `migrations/*`
|
||||
|
||||
**Example commit sequence**:
|
||||
```
|
||||
Add Turkish (tr) docs and update README (#744)
|
||||
docs(zh-CN): translate code block(plain text) (#753)
|
||||
fix(install): add rust, cpp, csharp to legacy language alias map (#747)
|
||||
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**: ~26 times per month
|
||||
**Frequency**: ~22 times per month
|
||||
|
||||
**Steps**:
|
||||
1. Add feature implementation
|
||||
@@ -218,136 +219,204 @@ Standard feature implementation workflow
|
||||
|
||||
**Files typically involved**:
|
||||
- `manifests/*`
|
||||
- `schemas/*`
|
||||
- `**/*.test.*`
|
||||
- `**/api/**`
|
||||
|
||||
**Example commit sequence**:
|
||||
```
|
||||
Merge pull request #736 from pvgomes/docs/add-brazilian-portuguese-translation
|
||||
fix: bump plugin.json and marketplace.json to v1.9.0
|
||||
Add Turkish (tr) docs and update README (#744)
|
||||
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 Or Update Skill
|
||||
### Add Language Rules
|
||||
|
||||
Adds or updates a skill in the ECC system, including documentation and provenance.
|
||||
Adds a new programming language to the rules system, including coding style, hooks, patterns, security, and testing guidelines.
|
||||
|
||||
**Frequency**: ~3 times per month
|
||||
**Frequency**: ~2 times per month
|
||||
|
||||
**Steps**:
|
||||
1. Create or update SKILL.md in the appropriate skills directory (e.g., skills/{skill-name}/SKILL.md or .claude/skills/{skill-name}/SKILL.md)
|
||||
2. Optionally add or update agent YAML files (e.g., .agents/skills/{skill-name}/agents/*.yaml)
|
||||
3. Optionally update provenance or placement policy files (e.g., schemas/provenance.schema.json, docs/SKILL-PLACEMENT-POLICY.md)
|
||||
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**:
|
||||
- `skills/*/SKILL.md`
|
||||
- `.claude/skills/*/SKILL.md`
|
||||
- `.agents/skills/*/SKILL.md`
|
||||
- `.agents/skills/*/agents/*.yaml`
|
||||
- `schemas/provenance.schema.json`
|
||||
- `docs/SKILL-PLACEMENT-POLICY.md`
|
||||
- `rules/*/coding-style.md`
|
||||
- `rules/*/hooks.md`
|
||||
- `rules/*/patterns.md`
|
||||
- `rules/*/security.md`
|
||||
- `rules/*/testing.md`
|
||||
|
||||
**Example commit sequence**:
|
||||
```
|
||||
Create or update SKILL.md in the appropriate skills directory (e.g., skills/{skill-name}/SKILL.md or .claude/skills/{skill-name}/SKILL.md)
|
||||
Optionally add or update agent YAML files (e.g., .agents/skills/{skill-name}/agents/*.yaml)
|
||||
Optionally update provenance or placement policy files (e.g., schemas/provenance.schema.json, docs/SKILL-PLACEMENT-POLICY.md)
|
||||
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 Or Update Command Documentation
|
||||
### Add New Skill
|
||||
|
||||
Adds or updates documentation for a command, often as part of a new feature or workflow.
|
||||
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 or update .claude/commands/{command-name}.md
|
||||
2. Optionally update localized docs (e.g., docs/zh-CN/commands/{command-name}.md, docs/tr/commands/{command-name}.md, docs/pt-BR/commands/{command-name}.md)
|
||||
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**:
|
||||
- `.claude/commands/*.md`
|
||||
- `docs/zh-CN/commands/*.md`
|
||||
- `docs/tr/commands/*.md`
|
||||
- `docs/pt-BR/commands/*.md`
|
||||
- `skills/*/SKILL.md`
|
||||
- `skills/*/scripts/*.sh`
|
||||
- `skills/*/scripts/*.js`
|
||||
|
||||
**Example commit sequence**:
|
||||
```
|
||||
Create or update .claude/commands/{command-name}.md
|
||||
Optionally update localized docs (e.g., docs/zh-CN/commands/{command-name}.md, docs/tr/commands/{command-name}.md, docs/pt-BR/commands/{command-name}.md)
|
||||
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 Or Update Localized Documentation
|
||||
### Add New Agent
|
||||
|
||||
Adds or updates documentation in a new or existing language (localization).
|
||||
Adds a new agent to the system for code review, build resolution, or other automated tasks.
|
||||
|
||||
**Frequency**: ~2 times per month
|
||||
|
||||
**Steps**:
|
||||
1. Add or update files in docs/{locale}/ (where locale is zh-CN, tr, pt-BR, etc.)
|
||||
2. Update README.md to reflect new language support
|
||||
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**:
|
||||
- `docs/zh-CN/**/*`
|
||||
- `docs/tr/**/*`
|
||||
- `docs/pt-BR/**/*`
|
||||
- `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**:
|
||||
```
|
||||
Add or update files in docs/{locale}/ (where locale is zh-CN, tr, pt-BR, etc.)
|
||||
Update README.md to reflect new language support
|
||||
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
|
||||
```
|
||||
|
||||
### Update Or Add Hooks
|
||||
### Add Cross Harness Skill Copies
|
||||
|
||||
Adds or updates hooks for validation, config protection, or workflow automation.
|
||||
Adds skill copies for different agent harnesses (e.g., Codex, Cursor, Antigravity) to ensure compatibility across platforms.
|
||||
|
||||
**Frequency**: ~2 times per month
|
||||
|
||||
**Steps**:
|
||||
1. Edit hooks/hooks.json to add or update hook definitions
|
||||
2. Create or update scripts/hooks/*.js or .ts for hook logic
|
||||
3. Optionally update plugin files (e.g., .opencode/plugins/ecc-hooks.ts)
|
||||
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`
|
||||
- `.opencode/plugins/*.ts`
|
||||
- `tests/hooks/*.test.js`
|
||||
- `.cursor/hooks.json`
|
||||
|
||||
**Example commit sequence**:
|
||||
```
|
||||
Edit hooks/hooks.json to add or update hook definitions
|
||||
Create or update scripts/hooks/*.js or .ts for hook logic
|
||||
Optionally update plugin files (e.g., .opencode/plugins/ecc-hooks.ts)
|
||||
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/
|
||||
```
|
||||
|
||||
### Add Or Update Ecc Bundle
|
||||
### Address Review Feedback
|
||||
|
||||
Adds or updates a set of ECC configuration, command, or skill files as a bundle.
|
||||
Addresses code review feedback by updating documentation, scripts, or configuration for clarity, correctness, or convention alignment.
|
||||
|
||||
**Frequency**: ~2 times per month
|
||||
**Frequency**: ~4 times per month
|
||||
|
||||
**Steps**:
|
||||
1. Create or update files in .claude/ (commands, skills, rules, team, identity, etc.)
|
||||
2. Optionally update .codex/agents/*.toml and .agents/skills/*
|
||||
3. Repeat for each bundle component as needed
|
||||
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**:
|
||||
- `.claude/commands/*.md`
|
||||
- `.claude/skills/*/SKILL.md`
|
||||
- `.claude/rules/*.md`
|
||||
- `.claude/team/*.json`
|
||||
- `.claude/identity.json`
|
||||
- `.claude/ecc-tools.json`
|
||||
- `.codex/agents/*.toml`
|
||||
- `skills/*/SKILL.md`
|
||||
- `agents/*.md`
|
||||
- `commands/*.md`
|
||||
- `.agents/skills/*/SKILL.md`
|
||||
- `.agents/skills/*/agents/*.yaml`
|
||||
- `.cursor/skills/*/SKILL.md`
|
||||
|
||||
**Example commit sequence**:
|
||||
```
|
||||
Create or update files in .claude/ (commands, skills, rules, team, identity, etc.)
|
||||
Optionally update .codex/agents/*.toml and .agents/skills/*
|
||||
Repeat for each bundle component as needed
|
||||
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
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"commandFiles": [
|
||||
".claude/commands/database-migration.md",
|
||||
".claude/commands/feature-development.md",
|
||||
".claude/commands/add-or-update-skill.md"
|
||||
".claude/commands/add-language-rules.md"
|
||||
],
|
||||
"updatedAt": "2026-03-24T10:44:06.345Z"
|
||||
"updatedAt": "2026-03-20T12:07:36.496Z"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
# Everything Claude Code (ECC) — Agent Instructions
|
||||
|
||||
This is a **production-ready AI coding plugin** providing 28 specialized agents, 116 skills, 60 commands, and automated hook workflows for software development.
|
||||
This is a **production-ready AI coding plugin** providing 28 specialized agents, 118 skills, 60 commands, and automated hook workflows for software development.
|
||||
|
||||
**Version:** 1.9.0
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@ For manual install instructions see the README in the `rules/` folder.
|
||||
/plugin list everything-claude-code@everything-claude-code
|
||||
```
|
||||
|
||||
✨ **That's it!** You now have access to 28 agents, 116 skills, and 60 commands.
|
||||
✨ **That's it!** You now have access to 28 agents, 118 skills, and 60 commands.
|
||||
|
||||
---
|
||||
|
||||
@@ -1085,7 +1085,7 @@ The configuration is automatically detected from `.opencode/opencode.json`.
|
||||
|---------|-------------|----------|--------|
|
||||
| Agents | ✅ 28 agents | ✅ 12 agents | **Claude Code leads** |
|
||||
| Commands | ✅ 60 commands | ✅ 31 commands | **Claude Code leads** |
|
||||
| Skills | ✅ 116 skills | ✅ 37 skills | **Claude Code leads** |
|
||||
| Skills | ✅ 118 skills | ✅ 37 skills | **Claude Code leads** |
|
||||
| Hooks | ✅ 8 event types | ✅ 11 events | **OpenCode has more!** |
|
||||
| Rules | ✅ 29 rules | ✅ 13 instructions | **Claude Code leads** |
|
||||
| MCP Servers | ✅ 14 servers | ✅ Full | **Full parity** |
|
||||
|
||||
@@ -13,10 +13,7 @@ pub enum MessageType {
|
||||
/// Response to a query
|
||||
Response { answer: String },
|
||||
/// Notification of completion
|
||||
Completed {
|
||||
summary: String,
|
||||
files_changed: Vec<String>,
|
||||
},
|
||||
Completed { summary: String, files_changed: Vec<String> },
|
||||
/// Conflict detected (e.g., two agents editing the same file)
|
||||
Conflict { file: String, description: String },
|
||||
}
|
||||
|
||||
@@ -2,16 +2,7 @@ use anyhow::Result;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(default)]
|
||||
pub struct RiskThresholds {
|
||||
pub review: f64,
|
||||
pub confirm: f64,
|
||||
pub block: f64,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(default)]
|
||||
pub struct Config {
|
||||
pub db_path: PathBuf,
|
||||
pub worktree_root: PathBuf,
|
||||
@@ -21,7 +12,6 @@ pub struct Config {
|
||||
pub heartbeat_interval_secs: u64,
|
||||
pub default_agent: String,
|
||||
pub theme: Theme,
|
||||
pub risk_thresholds: RiskThresholds,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
@@ -42,18 +32,11 @@ impl Default for Config {
|
||||
heartbeat_interval_secs: 30,
|
||||
default_agent: "claude".to_string(),
|
||||
theme: Theme::Dark,
|
||||
risk_thresholds: Self::RISK_THRESHOLDS,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub const RISK_THRESHOLDS: RiskThresholds = RiskThresholds {
|
||||
review: 0.35,
|
||||
confirm: 0.60,
|
||||
block: 0.85,
|
||||
};
|
||||
|
||||
pub fn load() -> Result<Self> {
|
||||
let config_path = dirs::home_dir()
|
||||
.unwrap_or_else(|| PathBuf::from("."))
|
||||
@@ -69,40 +52,3 @@ impl Config {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for RiskThresholds {
|
||||
fn default() -> Self {
|
||||
Config::RISK_THRESHOLDS
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::Config;
|
||||
|
||||
#[test]
|
||||
fn default_config_uses_default_risk_thresholds() {
|
||||
let config = Config::default();
|
||||
|
||||
assert_eq!(config.risk_thresholds, Config::RISK_THRESHOLDS);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn deserialization_defaults_risk_thresholds() {
|
||||
let config: Config = toml::from_str(
|
||||
r#"
|
||||
db_path = "/tmp/ecc2.db"
|
||||
worktree_root = "/tmp/ecc-worktrees"
|
||||
max_parallel_sessions = 8
|
||||
max_parallel_worktrees = 6
|
||||
session_timeout_secs = 3600
|
||||
heartbeat_interval_secs = 30
|
||||
default_agent = "claude"
|
||||
theme = "Dark"
|
||||
"#,
|
||||
)
|
||||
.expect("config should deserialize");
|
||||
|
||||
assert_eq!(config.risk_thresholds, Config::RISK_THRESHOLDS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
mod comms;
|
||||
mod config;
|
||||
mod observability;
|
||||
mod session;
|
||||
mod tui;
|
||||
mod worktree;
|
||||
mod observability;
|
||||
mod comms;
|
||||
|
||||
use anyhow::Result;
|
||||
use clap::Parser;
|
||||
@@ -63,13 +63,10 @@ async fn main() -> Result<()> {
|
||||
Some(Commands::Dashboard) | None => {
|
||||
tui::app::run(db, cfg).await?;
|
||||
}
|
||||
Some(Commands::Start {
|
||||
task,
|
||||
agent,
|
||||
worktree: use_worktree,
|
||||
}) => {
|
||||
let session_id =
|
||||
session::manager::create_session(&db, &cfg, &task, &agent, use_worktree).await?;
|
||||
Some(Commands::Start { task, agent, worktree: use_worktree }) => {
|
||||
let session_id = session::manager::create_session(
|
||||
&db, &cfg, &task, &agent, use_worktree,
|
||||
).await?;
|
||||
println!("Session started: {session_id}");
|
||||
}
|
||||
Some(Commands::Sessions) => {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use anyhow::Result;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::config::RiskThresholds;
|
||||
use crate::session::store::StateStore;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
@@ -14,203 +13,36 @@ pub struct ToolCallEvent {
|
||||
pub risk_score: f64,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub struct RiskAssessment {
|
||||
pub score: f64,
|
||||
pub reasons: Vec<String>,
|
||||
pub suggested_action: SuggestedAction,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum SuggestedAction {
|
||||
Allow,
|
||||
Review,
|
||||
RequireConfirmation,
|
||||
Block,
|
||||
}
|
||||
|
||||
impl ToolCallEvent {
|
||||
/// Compute risk from the tool type and input characteristics.
|
||||
pub fn compute_risk(
|
||||
tool_name: &str,
|
||||
input: &str,
|
||||
thresholds: &RiskThresholds,
|
||||
) -> RiskAssessment {
|
||||
let normalized_tool = tool_name.to_ascii_lowercase();
|
||||
let normalized_input = input.to_ascii_lowercase();
|
||||
let mut score = 0.0;
|
||||
let mut reasons = Vec::new();
|
||||
/// Compute risk score based on tool type and input patterns.
|
||||
pub fn compute_risk(tool_name: &str, input: &str) -> f64 {
|
||||
let mut score: f64 = 0.0;
|
||||
|
||||
let (base_score, base_reason) = base_tool_risk(&normalized_tool);
|
||||
score += base_score;
|
||||
if let Some(reason) = base_reason {
|
||||
reasons.push(reason.to_string());
|
||||
// Destructive tools get higher base risk
|
||||
match tool_name {
|
||||
"Bash" => score += 0.3,
|
||||
"Write" => score += 0.2,
|
||||
"Edit" => score += 0.1,
|
||||
_ => score += 0.05,
|
||||
}
|
||||
|
||||
let (file_sensitivity_score, file_sensitivity_reason) =
|
||||
assess_file_sensitivity(&normalized_input);
|
||||
score += file_sensitivity_score;
|
||||
if let Some(reason) = file_sensitivity_reason {
|
||||
reasons.push(reason);
|
||||
// Dangerous patterns in bash commands
|
||||
if tool_name == "Bash" {
|
||||
if input.contains("rm -rf") || input.contains("--force") {
|
||||
score += 0.4;
|
||||
}
|
||||
if input.contains("git push") || input.contains("git reset") {
|
||||
score += 0.3;
|
||||
}
|
||||
if input.contains("sudo") || input.contains("chmod 777") {
|
||||
score += 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
let (blast_radius_score, blast_radius_reason) = assess_blast_radius(&normalized_input);
|
||||
score += blast_radius_score;
|
||||
if let Some(reason) = blast_radius_reason {
|
||||
reasons.push(reason);
|
||||
}
|
||||
|
||||
let (irreversibility_score, irreversibility_reason) =
|
||||
assess_irreversibility(&normalized_input);
|
||||
score += irreversibility_score;
|
||||
if let Some(reason) = irreversibility_reason {
|
||||
reasons.push(reason);
|
||||
}
|
||||
|
||||
let score = score.clamp(0.0, 1.0);
|
||||
let suggested_action = SuggestedAction::from_score(score, thresholds);
|
||||
|
||||
RiskAssessment {
|
||||
score,
|
||||
reasons,
|
||||
suggested_action,
|
||||
}
|
||||
score.min(1.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl SuggestedAction {
|
||||
fn from_score(score: f64, thresholds: &RiskThresholds) -> Self {
|
||||
if score >= thresholds.block {
|
||||
Self::Block
|
||||
} else if score >= thresholds.confirm {
|
||||
Self::RequireConfirmation
|
||||
} else if score >= thresholds.review {
|
||||
Self::Review
|
||||
} else {
|
||||
Self::Allow
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn base_tool_risk(tool_name: &str) -> (f64, Option<&'static str>) {
|
||||
match tool_name {
|
||||
"bash" => (
|
||||
0.20,
|
||||
Some("shell execution can modify local or shared state"),
|
||||
),
|
||||
"write" | "multiedit" => (0.15, Some("writes files directly")),
|
||||
"edit" => (0.10, Some("modifies existing files")),
|
||||
_ => (0.05, None),
|
||||
}
|
||||
}
|
||||
|
||||
fn assess_file_sensitivity(input: &str) -> (f64, Option<String>) {
|
||||
const SECRET_PATTERNS: &[&str] = &[
|
||||
".env",
|
||||
"secret",
|
||||
"credential",
|
||||
"token",
|
||||
"api_key",
|
||||
"apikey",
|
||||
"auth",
|
||||
"id_rsa",
|
||||
".pem",
|
||||
".key",
|
||||
];
|
||||
const SHARED_INFRA_PATTERNS: &[&str] = &[
|
||||
"cargo.toml",
|
||||
"package.json",
|
||||
"dockerfile",
|
||||
".github/workflows",
|
||||
"schema",
|
||||
"migration",
|
||||
"production",
|
||||
];
|
||||
|
||||
if contains_any(input, SECRET_PATTERNS) {
|
||||
(
|
||||
0.25,
|
||||
Some("targets a sensitive file or credential surface".to_string()),
|
||||
)
|
||||
} else if contains_any(input, SHARED_INFRA_PATTERNS) {
|
||||
(
|
||||
0.15,
|
||||
Some("targets shared infrastructure or release-critical files".to_string()),
|
||||
)
|
||||
} else {
|
||||
(0.0, None)
|
||||
}
|
||||
}
|
||||
|
||||
fn assess_blast_radius(input: &str) -> (f64, Option<String>) {
|
||||
const LARGE_SCOPE_PATTERNS: &[&str] = &[
|
||||
"**",
|
||||
"/*",
|
||||
"--all",
|
||||
"--recursive",
|
||||
"entire repo",
|
||||
"all files",
|
||||
"across src/",
|
||||
"find ",
|
||||
" xargs ",
|
||||
];
|
||||
const SHARED_STATE_PATTERNS: &[&str] = &[
|
||||
"git push --force",
|
||||
"git push -f",
|
||||
"origin main",
|
||||
"origin master",
|
||||
"rm -rf .",
|
||||
"rm -rf /",
|
||||
];
|
||||
|
||||
if contains_any(input, SHARED_STATE_PATTERNS) {
|
||||
(
|
||||
0.35,
|
||||
Some("has a broad blast radius across shared state or history".to_string()),
|
||||
)
|
||||
} else if contains_any(input, LARGE_SCOPE_PATTERNS) {
|
||||
(
|
||||
0.25,
|
||||
Some("has a broad blast radius across multiple files or directories".to_string()),
|
||||
)
|
||||
} else {
|
||||
(0.0, None)
|
||||
}
|
||||
}
|
||||
|
||||
fn assess_irreversibility(input: &str) -> (f64, Option<String>) {
|
||||
const HIGH_IRREVERSIBILITY_PATTERNS: &[&str] = &[
|
||||
"rm -rf",
|
||||
"git reset --hard",
|
||||
"git clean -fd",
|
||||
"drop database",
|
||||
"drop table",
|
||||
"truncate ",
|
||||
"shred ",
|
||||
];
|
||||
const MODERATE_IRREVERSIBILITY_PATTERNS: &[&str] =
|
||||
&["rm -f", "git push --force", "git push -f", "delete from"];
|
||||
|
||||
if contains_any(input, HIGH_IRREVERSIBILITY_PATTERNS) {
|
||||
(
|
||||
0.45,
|
||||
Some("includes an irreversible or destructive operation".to_string()),
|
||||
)
|
||||
} else if contains_any(input, MODERATE_IRREVERSIBILITY_PATTERNS) {
|
||||
(
|
||||
0.40,
|
||||
Some("includes an irreversible or difficult-to-undo operation".to_string()),
|
||||
)
|
||||
} else {
|
||||
(0.0, None)
|
||||
}
|
||||
}
|
||||
|
||||
fn contains_any(input: &str, patterns: &[&str]) -> bool {
|
||||
patterns.iter().any(|pattern| input.contains(pattern))
|
||||
}
|
||||
|
||||
pub fn log_tool_call(db: &StateStore, event: &ToolCallEvent) -> Result<()> {
|
||||
db.send_message(
|
||||
&event.session_id,
|
||||
@@ -220,72 +52,3 @@ pub fn log_tool_call(db: &StateStore, event: &ToolCallEvent) -> Result<()> {
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::{SuggestedAction, ToolCallEvent};
|
||||
use crate::config::Config;
|
||||
|
||||
#[test]
|
||||
fn computes_sensitive_file_risk() {
|
||||
let assessment = ToolCallEvent::compute_risk(
|
||||
"Write",
|
||||
"Update .env.production with rotated API token",
|
||||
&Config::RISK_THRESHOLDS,
|
||||
);
|
||||
|
||||
assert!(assessment.score >= Config::RISK_THRESHOLDS.review);
|
||||
assert_eq!(assessment.suggested_action, SuggestedAction::Review);
|
||||
assert!(assessment
|
||||
.reasons
|
||||
.iter()
|
||||
.any(|reason| reason.contains("sensitive file")));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn computes_blast_radius_risk() {
|
||||
let assessment = ToolCallEvent::compute_risk(
|
||||
"Edit",
|
||||
"Apply the same replacement across src/**/*.rs",
|
||||
&Config::RISK_THRESHOLDS,
|
||||
);
|
||||
|
||||
assert!(assessment.score >= Config::RISK_THRESHOLDS.review);
|
||||
assert_eq!(assessment.suggested_action, SuggestedAction::Review);
|
||||
assert!(assessment
|
||||
.reasons
|
||||
.iter()
|
||||
.any(|reason| reason.contains("blast radius")));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn computes_irreversible_risk() {
|
||||
let assessment = ToolCallEvent::compute_risk(
|
||||
"Bash",
|
||||
"rm -f /tmp/ecc-temp.txt",
|
||||
&Config::RISK_THRESHOLDS,
|
||||
);
|
||||
|
||||
assert!(assessment.score >= Config::RISK_THRESHOLDS.confirm);
|
||||
assert_eq!(
|
||||
assessment.suggested_action,
|
||||
SuggestedAction::RequireConfirmation,
|
||||
);
|
||||
assert!(assessment
|
||||
.reasons
|
||||
.iter()
|
||||
.any(|reason| reason.contains("irreversible")));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn blocks_combined_high_risk_operations() {
|
||||
let assessment = ToolCallEvent::compute_risk(
|
||||
"Bash",
|
||||
"rm -rf . && git push --force origin main",
|
||||
&Config::RISK_THRESHOLDS,
|
||||
);
|
||||
|
||||
assert!(assessment.score >= Config::RISK_THRESHOLDS.block);
|
||||
assert_eq!(assessment.suggested_action, SuggestedAction::Block);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use anyhow::Result;
|
||||
use std::fmt;
|
||||
|
||||
use super::store::StateStore;
|
||||
use super::{Session, SessionMetrics, SessionState};
|
||||
use super::store::StateStore;
|
||||
use crate::config::Config;
|
||||
use crate::worktree;
|
||||
|
||||
|
||||
@@ -170,12 +170,16 @@ impl StateStore {
|
||||
|
||||
pub fn get_session(&self, id: &str) -> Result<Option<Session>> {
|
||||
let sessions = self.list_sessions()?;
|
||||
Ok(sessions
|
||||
.into_iter()
|
||||
.find(|s| s.id == id || s.id.starts_with(id)))
|
||||
Ok(sessions.into_iter().find(|s| s.id == id || s.id.starts_with(id)))
|
||||
}
|
||||
|
||||
pub fn send_message(&self, from: &str, to: &str, content: &str, msg_type: &str) -> Result<()> {
|
||||
pub fn send_message(
|
||||
&self,
|
||||
from: &str,
|
||||
to: &str,
|
||||
content: &str,
|
||||
msg_type: &str,
|
||||
) -> Result<()> {
|
||||
self.conn.execute(
|
||||
"INSERT INTO messages (from_session, to_session, content, msg_type, timestamp)
|
||||
VALUES (?1, ?2, ?3, ?4, ?5)",
|
||||
|
||||
@@ -4,8 +4,8 @@ use ratatui::{
|
||||
};
|
||||
|
||||
use crate::config::Config;
|
||||
use crate::session::store::StateStore;
|
||||
use crate::session::{Session, SessionState};
|
||||
use crate::session::store::StateStore;
|
||||
|
||||
pub struct Dashboard {
|
||||
db: StateStore,
|
||||
@@ -42,7 +42,7 @@ impl Dashboard {
|
||||
let chunks = Layout::default()
|
||||
.direction(Direction::Vertical)
|
||||
.constraints([
|
||||
Constraint::Length(3), // Header
|
||||
Constraint::Length(3), // Header
|
||||
Constraint::Min(10), // Main content
|
||||
Constraint::Length(3), // Status bar
|
||||
])
|
||||
@@ -79,11 +79,7 @@ impl Dashboard {
|
||||
}
|
||||
|
||||
fn render_header(&self, frame: &mut Frame, area: Rect) {
|
||||
let running = self
|
||||
.sessions
|
||||
.iter()
|
||||
.filter(|s| s.state == SessionState::Running)
|
||||
.count();
|
||||
let running = self.sessions.iter().filter(|s| s.state == SessionState::Running).count();
|
||||
let total = self.sessions.len();
|
||||
|
||||
let title = format!(" ECC 2.0 | {running} running / {total} total ");
|
||||
@@ -94,11 +90,7 @@ impl Dashboard {
|
||||
Pane::Output => 1,
|
||||
Pane::Metrics => 2,
|
||||
})
|
||||
.highlight_style(
|
||||
Style::default()
|
||||
.fg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD),
|
||||
);
|
||||
.highlight_style(Style::default().fg(Color::Cyan).add_modifier(Modifier::BOLD));
|
||||
|
||||
frame.render_widget(tabs, area);
|
||||
}
|
||||
@@ -118,18 +110,11 @@ impl Dashboard {
|
||||
SessionState::Pending => "◌",
|
||||
};
|
||||
let style = if i == self.selected_session {
|
||||
Style::default()
|
||||
.fg(Color::Cyan)
|
||||
.add_modifier(Modifier::BOLD)
|
||||
Style::default().fg(Color::Cyan).add_modifier(Modifier::BOLD)
|
||||
} else {
|
||||
Style::default()
|
||||
};
|
||||
let text = format!(
|
||||
"{state_icon} {} [{}] {}",
|
||||
&s.id[..8.min(s.id.len())],
|
||||
s.agent_type,
|
||||
s.task
|
||||
);
|
||||
let text = format!("{state_icon} {} [{}] {}", &s.id[..8.min(s.id.len())], s.agent_type, s.task);
|
||||
ListItem::new(text).style(style)
|
||||
})
|
||||
.collect();
|
||||
@@ -151,10 +136,7 @@ impl Dashboard {
|
||||
|
||||
fn render_output(&self, frame: &mut Frame, area: Rect) {
|
||||
let content = if let Some(session) = self.sessions.get(self.selected_session) {
|
||||
format!(
|
||||
"Agent output for session {}...\n\n(Live streaming coming soon)",
|
||||
session.id
|
||||
)
|
||||
format!("Agent output for session {}...\n\n(Live streaming coming soon)", session.id)
|
||||
} else {
|
||||
"No sessions. Press 'n' to start one.".to_string()
|
||||
};
|
||||
|
||||
@@ -28,11 +28,7 @@ pub fn create_for_session(session_id: &str, cfg: &Config) -> Result<WorktreeInfo
|
||||
anyhow::bail!("git worktree add failed: {stderr}");
|
||||
}
|
||||
|
||||
tracing::info!(
|
||||
"Created worktree at {} on branch {}",
|
||||
path.display(),
|
||||
branch
|
||||
);
|
||||
tracing::info!("Created worktree at {} on branch {}", path.display(), branch);
|
||||
|
||||
Ok(WorktreeInfo {
|
||||
path,
|
||||
|
||||
Reference in New Issue
Block a user