Skip to content

Commit 8af4588

Browse files
committed
Add more plugins
1 parent 5026648 commit 8af4588

File tree

34 files changed

+1145
-213
lines changed

34 files changed

+1145
-213
lines changed

.eca-plugin/marketplace.json

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,76 @@
5959
"author": "licht1stein",
6060
"icon": "🔮",
6161
"featured": false
62+
},
63+
{
64+
"name": "tdd",
65+
"description": "Test-Driven Development workflow skill: write a failing test first, implement minimum code to pass, then refactor",
66+
"source": "plugins/tdd",
67+
"category": "Development",
68+
"tags": ["testing", "tdd", "skill", "workflow", "quality"],
69+
"author": "editor-code-assistant",
70+
"icon": "🧪",
71+
"featured": true
72+
},
73+
{
74+
"name": "adr",
75+
"description": "Architecture Decision Record subagent that guides you through structured decision documentation",
76+
"source": "plugins/adr",
77+
"category": "Development",
78+
"tags": ["architecture", "documentation", "subagent", "adr"],
79+
"author": "editor-code-assistant",
80+
"icon": "📐",
81+
"featured": false
82+
},
83+
{
84+
"name": "changelog",
85+
"description": "Changelog subagent that analyzes git history and generates Keep a Changelog formatted entries",
86+
"source": "plugins/changelog",
87+
"category": "Workflow",
88+
"tags": ["changelog", "git", "subagent", "release"],
89+
"author": "editor-code-assistant",
90+
"icon": "📋",
91+
"featured": false
92+
},
93+
{
94+
"name": "secret-guard",
95+
"description": "Pre-write hook that scans file content for hardcoded secrets, API keys, and tokens before saving",
96+
"source": "plugins/secret-guard",
97+
"category": "Security",
98+
"tags": ["security", "secrets", "hooks", "guard"],
99+
"author": "editor-code-assistant",
100+
"icon": "🛡️",
101+
"featured": true
102+
},
103+
{
104+
"name": "security-review",
105+
"description": "Security-focused code reviewer subagent analyzing vulnerabilities following OWASP guidelines",
106+
"source": "plugins/security-review",
107+
"category": "Security",
108+
"tags": ["security", "review", "subagent", "owasp"],
109+
"author": "editor-code-assistant",
110+
"icon": "🔒",
111+
"featured": true
112+
},
113+
{
114+
"name": "pomodoro",
115+
"description": "Pomodoro Technique timer that reminds you to take breaks after 25 minutes of coding",
116+
"source": "plugins/pomodoro",
117+
"category": "Productivity",
118+
"tags": ["productivity", "hooks", "timer", "wellness"],
119+
"author": "editor-code-assistant",
120+
"icon": "🍅",
121+
"featured": false
122+
},
123+
{
124+
"name": "session-journal",
125+
"description": "Automatic dev journal that logs session timestamps, chat IDs, and workspaces to daily markdown files",
126+
"source": "plugins/session-journal",
127+
"category": "Productivity",
128+
"tags": ["productivity", "hooks", "journal", "logging"],
129+
"author": "editor-code-assistant",
130+
"icon": "📓",
131+
"featured": false
62132
}
63133
]
64134
}

AGENTS.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# AGENTS.md
2+
3+
## Build & Dev
4+
- Website only: `cd website && npm run dev` / `npm run build` / `npm run preview`
5+
- No test framework or linter is configured in this repo.
6+
7+
## Project Layout
8+
- `plugins/` — Plugin definitions (Markdown, JSON, shell scripts). No JS/TS here.
9+
- `website/` — Astro 5 static site (marketplace UI). All code lives in `website/src/`.
10+
- `.eca-plugin/marketplace.json` — Plugin registry read at build time.
11+
12+
## Code Style (website)
13+
- **Formatting**: 2-space indent, semicolons, single quotes in JS/TS, double quotes in HTML attributes.
14+
- **Imports**: Named imports for libraries, default for local `.astro` components. Use `node:` prefix for Node built-ins. Order: third-party → local components → styles → data.
15+
- **Naming**: camelCase variables/functions, PascalCase interfaces, BEM-style CSS classes (`filter-pill--active`).
16+
- **Types**: `interface` for props/data shapes. Type inference preferred over explicit return types.
17+
- **Error handling**: Guard clauses, try/catch with silent fallback, graceful degradation.
18+
- **No JS frameworks** — vanilla JS in `<script>` tags, scoped `<style>` per component.
19+
20+
## Shell Scripts (plugins)
21+
- Always start with `set -euo pipefail`. Use `|| true` for optional commands.

plugins/adr/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# ADR
2+
3+
Generate Architecture Decision Records (ADRs) through a guided conversation — capture the context, alternatives, decision, and consequences in a structured markdown document.
4+
5+
## What it provides
6+
7+
- **`adr` subagent** — Interviews you about an architectural decision and produces a numbered ADR file under `docs/adr/`.
8+
9+
## ADR format
10+
11+
Each generated record follows the standard ADR template:
12+
13+
```
14+
# <Number>. <Title>
15+
Date: YYYY-MM-DD
16+
17+
## Status
18+
Proposed | Accepted | Deprecated | Superseded
19+
20+
## Context
21+
The problem and forces at play.
22+
23+
## Decision
24+
What was decided and why.
25+
26+
## Consequences
27+
### Positive
28+
### Negative
29+
### Neutral
30+
```
31+
32+
## Usage
33+
34+
```
35+
Create an ADR for our decision to switch from REST to gRPC
36+
```
37+
38+
```
39+
I need to record an architecture decision
40+
```
41+
42+
Credits: By the ECA team.

plugins/adr/agents/adr.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
mode: subagent
3+
description: Generates Architecture Decision Records (ADRs) by gathering context, exploring the codebase, and producing structured markdown documents.
4+
---
5+
6+
<goal>
7+
You are an ADR author. Your job is to collaborate with the user to produce a well-structured Architecture Decision Record and save it as a numbered markdown file under `docs/adr/`.
8+
</goal>
9+
10+
<instructions>
11+
12+
### 1. Gather context
13+
14+
Interview the user with focused questions, one group at a time:
15+
16+
1. **Decision context** — What problem is being solved? What triggered this decision?
17+
2. **Alternatives considered** — Ask for at least 2-3 options that were evaluated.
18+
3. **Chosen decision** — Which option was selected and why?
19+
4. **Consequences** — What are the expected positive, negative, and neutral outcomes?
20+
21+
Use `eca__directory_tree` and `eca__read_file` to explore the codebase when you need additional technical context to write a better ADR.
22+
23+
### 2. Generate the ADR
24+
25+
Produce a markdown document following this template:
26+
27+
```markdown
28+
# <NUMBER>. <Title>
29+
30+
Date: <YYYY-MM-DD>
31+
32+
## Status
33+
34+
<Proposed | Accepted | Deprecated | Superseded>
35+
36+
## Context
37+
38+
<The problem statement and forces at play.>
39+
40+
## Decision
41+
42+
<What was decided and why.>
43+
44+
## Consequences
45+
46+
### Positive
47+
- ...
48+
49+
### Negative
50+
- ...
51+
52+
### Neutral
53+
- ...
54+
```
55+
56+
### 3. Save the file
57+
58+
- Check if `docs/adr/` exists using `eca__directory_tree`.
59+
- If it exists, read the directory to find the highest existing number and auto-increment.
60+
- If it does not exist, offer to create it.
61+
- Save the file as `docs/adr/NNNN-<kebab-case-title>.md` (e.g., `docs/adr/0001-use-postgresql.md`).
62+
63+
</instructions>
64+
65+
<return>
66+
After saving, confirm the file path and print a short summary of the recorded decision.
67+
</return>

plugins/changelog/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Changelog
2+
3+
A subagent that generates Keep a Changelog entries by analyzing your git history and categorizing commits into user-facing descriptions.
4+
5+
## What it provides
6+
7+
- **`changelog` subagent** — Analyzes commits since the last git tag, categorizes them, and produces a formatted changelog entry ready for your `CHANGELOG.md`.
8+
9+
## How it works
10+
11+
When you ask ECA to generate a changelog, the subagent:
12+
13+
1. Finds the latest version tag and collects all commits since then
14+
2. Reads the existing `CHANGELOG.md` to match its style and conventions
15+
3. Categorizes commits into standard sections (Added, Changed, Deprecated, Removed, Fixed, Security)
16+
4. Rewrites raw commit messages into concise, user-facing descriptions
17+
5. Presents the entry for review and offers to update the file directly
18+
19+
## Usage
20+
21+
```
22+
Generate a changelog entry
23+
```
24+
25+
```
26+
Update the changelog for version 1.3.0
27+
```
28+
29+
```
30+
What changed since the last release?
31+
```
32+
33+
By the ECA team.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
mode: subagent
3+
description: Generates changelog entries by analyzing git history, categorizing commits, and producing Keep a Changelog formatted output.
4+
---
5+
6+
<goal>
7+
Analyze the git history of the current repository and generate a well-structured changelog entry following the Keep a Changelog (https://keepachangelog.com) format. Produce concise, user-facing descriptions grouped by change category.
8+
</goal>
9+
10+
<instructions>
11+
### 1. Gather Git Context
12+
13+
Use `eca__shell_command` to run the following commands:
14+
15+
- `git tag --sort=-version:refname` — Find the latest version tag.
16+
- `git log <last-tag>..HEAD --oneline` — Get all commits since the last tag. If no tags exist, use `git log --oneline` for the full history.
17+
- `git diff --stat <last-tag>..HEAD` — Get a high-level overview of what files changed and how much.
18+
19+
### 2. Read Existing Changelog
20+
21+
If a `CHANGELOG.md` (or `HISTORY.md`, `CHANGES.md`) exists in the repository root, read it with `eca__read_file` to match its existing style, heading conventions, and tone.
22+
23+
### 3. Categorize Commits
24+
25+
Sort each commit into the appropriate Keep a Changelog section:
26+
27+
- **Added** — New features or capabilities.
28+
- **Changed** — Changes to existing functionality.
29+
- **Deprecated** — Features that will be removed in a future release.
30+
- **Removed** — Features that were removed.
31+
- **Fixed** — Bug fixes.
32+
- **Security** — Vulnerability patches or security improvements.
33+
34+
Omit any section that has no entries. Use your judgment to interpret commit messages — merge commits, chore commits, and CI-only changes should generally be excluded unless they affect users.
35+
36+
### 4. Write User-Facing Descriptions
37+
38+
Do NOT copy raw commit messages verbatim. Rewrite each entry as a concise, user-facing description that explains the impact of the change. Group related commits into a single entry when appropriate.
39+
40+
### 5. Generate the Entry
41+
42+
Place the new entries under an `## [Unreleased]` heading by default. If the user provides a version number, use `## [<version>] - <YYYY-MM-DD>` instead.
43+
44+
### 6. Offer to Apply
45+
46+
After presenting the generated changelog entry for review, ask the user whether to:
47+
- Write it directly into the existing `CHANGELOG.md` file.
48+
- Output it so they can paste it manually.
49+
</instructions>
50+
51+
<output_format>
52+
Use standard Keep a Changelog markdown:
53+
54+
```markdown
55+
## [Unreleased]
56+
57+
### Added
58+
- Description of new feature.
59+
60+
### Fixed
61+
- Description of bug fix.
62+
```
63+
64+
Only include sections that have entries. Maintain consistent bullet style and tense (imperative or past, matching the existing file).
65+
</output_format>

plugins/pomodoro/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Pomodoro
2+
3+
A lightweight Pomodoro Technique integration for ECA that reminds you to take breaks while coding.
4+
5+
## What it provides
6+
7+
- **pomodoro-start** (`chatStart` hook) — Silently records the session start timestamp when a chat begins.
8+
- **pomodoro-check** (`postRequest` hook) — Checks elapsed time after each request and nudges you to take a break once 25 minutes have passed.
9+
10+
## How it works
11+
12+
When a chat session starts, the current timestamp is saved to `/tmp/eca-pomodoro-start`. After every request, the plugin calculates how many minutes have elapsed since the timer started. If 25 or more minutes have passed, it displays a friendly reminder to take a 5-minute break and resets the timer automatically.
13+
14+
## Customization
15+
16+
Fork this plugin and adjust the `25`-minute interval in `pomodoro-check.sh` to match your preferred work/break cadence.
17+
18+
---
19+
20+
By the ECA team.

plugins/pomodoro/hooks/hooks.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"pomodoro-start": {
3+
"type": "chatStart",
4+
"visible": false,
5+
"actions": [
6+
{
7+
"type": "shell",
8+
"shell": "date +%s > /tmp/eca-pomodoro-start"
9+
}
10+
]
11+
},
12+
"pomodoro-check": {
13+
"type": "postRequest",
14+
"visible": true,
15+
"actions": [
16+
{
17+
"type": "shell",
18+
"file": "pomodoro-check.sh"
19+
}
20+
]
21+
}
22+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
3+
TIMER_FILE="/tmp/eca-pomodoro-start"
4+
5+
if [ ! -f "$TIMER_FILE" ]; then
6+
date +%s > "$TIMER_FILE"
7+
exit 0
8+
fi
9+
10+
start=$(cat "$TIMER_FILE")
11+
now=$(date +%s)
12+
elapsed=$(( (now - start) / 60 ))
13+
14+
if [ "$elapsed" -ge 25 ]; then
15+
echo "🍅 You've been coding for ${elapsed} minutes! Consider a 5-minute break to recharge."
16+
date +%s > "$TIMER_FILE"
17+
fi
18+
19+
exit 0

0 commit comments

Comments
 (0)