-
Notifications
You must be signed in to change notification settings - Fork 11
move agent integrations into new folder #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| platform-integrations/bob/kaizen-lite |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "mcpServers": { | ||
| "kaizen": { | ||
| "command": "docker", | ||
| "args": [ | ||
| "run", "-i", "--rm", | ||
| "1lleatmyhat/kaizen:latest-core" | ||
| ], | ||
| "disabled": false | ||
| } | ||
| } | ||
| } |
5 changes: 5 additions & 0 deletions
5
platform-integrations/bob/kaizen-lite/commands/kaizen:learn.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| name: kaizen:learn | ||
| description: Run the learn skill on the current conversation | ||
| --- | ||
| Use the learn skill on the current conversation. Follow the skill's instructions exactly. |
5 changes: 5 additions & 0 deletions
5
platform-integrations/bob/kaizen-lite/commands/kaizen:recall.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| name: kaizen:recall | ||
| description: Run the recall skill on the current conversation | ||
| --- | ||
| Use the recall skill on the current conversation. Follow the skill's instructions exactly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| customModes: | ||
| - slug: kaizen-lite | ||
| name: Kaizen Lite | ||
| roleDefinition: |- | ||
| You are Kaizen Lite — a learning mode that improves from every interaction. | ||
|
|
||
| ⚠️ CRITICAL: THE FOLLOWING WORKFLOW IS ABSOLUTELY MANDATORY AND CANNOT BE SKIPPED ⚠️ | ||
|
|
||
| WORKFLOW (4 steps, strict order): | ||
|
|
||
| 0. ⚠️ BEFORE FIRST USE (MANDATORY): Read each skill's SKILL.md file before using it for the first time in a conversation. | ||
| - This applies to BOTH kaizen-recall AND kaizen-learn | ||
| - If you have not read a skill's SKILL.md in this conversation, STOP and read it before using the skill | ||
| 1. ⚠️ FIRST ACTION (MANDATORY): Use the kaizen-recall skill to retrieve relevant guidelines. | ||
| - This MUST be your FIRST tool use in EVERY conversation | ||
| - NO exceptions - even for simple tasks like "echo hello world" | ||
| 2. WORK: Complete the user's request. When a retrieved guideline applies, cite it in your reasoning. | ||
| 3. ⚠️ LAST ACTION (MANDATORY): Use the kaizen-learn skill to extract and save learnings. | ||
| - This MUST happen BEFORE attempt_completion | ||
| - NO exceptions - even if you think there's nothing to learn | ||
|
|
||
| ⚠️ ENFORCEMENT RULES ⚠️ | ||
| - Do not skip steps. Do not reorder steps. | ||
| - Step 0 must happen before using any skill for the first time in a conversation. | ||
| - Step 1 must happen before ANY other tool use (including execute_command, read_file, etc.) | ||
| - Step 3 must happen before attempt_completion. | ||
| - If you forget Step 1, STOP and call kaizen-recall immediately. | ||
| - If you reach attempt_completion without Step 3, STOP and call kaizen-learn first. | ||
| customInstructions: |- | ||
| - ALWAYS read a skill's SKILL.md before using it for the first time in a conversation | ||
| - If kaizen-recall returns no guidelines, that is normal — proceed with the task. | ||
| - If kaizen-learn reports no new entities, that counts as successful completion — do not retry. | ||
| - If no errors or non-obvious discoveries occurred, saving zero entities is correct — do not force low-quality entities. | ||
|
|
||
|
|
||
| PRE-COMPLETION GATE: | ||
| Before calling attempt_completion, ask yourself: | ||
| ┌──────────────────────────────────────────────────────┐ | ||
| │ Did I run kaizen-recall at the start? │ | ||
| │ Did I run kaizen-learn and see its output? │ | ||
| │ │ | ||
| │ ❌ NO → STOP. Go back and complete the step. │ | ||
| │ ✅ YES → Proceed with attempt_completion. │ | ||
| └──────────────────────────────────────────────────────┘ | ||
|
|
||
| Rules: | ||
|
|
||
| - Before using a skill for the first time, read its SKILL.md file to understand the correct usage syntax. | ||
| - ALWAYS call kaizen-learn before attempt_completion, even if the task seems simple or you think there's nothing to learn. | ||
| - The workflow is non-negotiable: recall → work → learn → complete. | ||
| - Skipping kaizen-learn violates the core purpose of this mode. | ||
|
|
||
| groups: | ||
| - read | ||
| - edit | ||
| - command | ||
| - browser |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
plugins/kaizen/.claude-plugin/plugin.json → ...ns/kaizen-lite/.claude-plugin/plugin.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
plugins/kaizen/README.md → ...ions/claude/plugins/kaizen-lite/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
205 changes: 205 additions & 0 deletions
205
platform-integrations/claude/plugins/kaizen-lite/skills/learn/SKILL.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,205 @@ | ||
| --- | ||
| name: learn | ||
| description: Extract actionable entities from conversation trajectories. Systematically identifies errors, failures, and inefficiencies to generate proactive entities that prevent them from recurring. | ||
| --- | ||
|
|
||
| # Entity Generator | ||
|
|
||
| ## Overview | ||
|
|
||
| This skill analyzes conversation trajectories to extract actionable entities that would help on similar tasks in the future. It **prioritizes errors encountered during the conversation** — tool failures, exceptions, wrong approaches, retry loops — and transforms them into proactive recommendations that prevent those errors from recurring. | ||
|
|
||
| ## Workflow | ||
|
|
||
| ### Step 1: Analyze the Conversation | ||
|
|
||
| Identify from your current conversation: | ||
|
|
||
| - **Task/Request**: What was the user asking for? | ||
| - **Steps Taken**: What reasoning, actions, and observations occurred? | ||
| - **What Worked**: Which approaches succeeded? | ||
| - **What Failed**: Which approaches didn't work and why? | ||
| - **Errors Encountered**: Tool failures, exceptions, permission errors, retry loops, dead ends, and wrong initial approaches | ||
|
|
||
| ### Step 2: Identify Errors and Root Causes | ||
|
|
||
| Scan the conversation for these error signals: | ||
|
|
||
| 1. **Tool/command failures**: Non-zero exit codes, error messages, exceptions, stack traces | ||
| 2. **Permission/access errors**: "Permission denied", "not found", sandbox restrictions | ||
| 3. **Wrong initial approach**: First attempt abandoned in favor of a different strategy | ||
| 4. **Retry loops**: Same action attempted multiple times with variations before succeeding | ||
| 5. **Missing prerequisites**: Missing dependencies, packages, configs discovered mid-task | ||
| 6. **Silent failures**: Actions that appeared to succeed but produced wrong results | ||
|
|
||
| For each error found, document: | ||
|
|
||
| | | Error Example | Root Cause | Resolution | Prevention Guideline | | ||
| |---|---|---|---|---| | ||
| | 1 | `exiftool: command not found` | System tool unavailable in sandbox | Switched to Python PIL | Use PIL for image metadata in sandboxed environments | | ||
| | 2 | `git push` rejected (no upstream) | Branch not tracked to remote | Added `-u origin branch` | Always set upstream when pushing a new branch | | ||
| | 3 | Tried regex parsing of HTML, got wrong results | Regex can't handle nested tags | Switched to BeautifulSoup | Use a proper HTML parser (BeautifulSoup/lxml), never regex | | ||
|
|
||
| > **If no errors are found**, proceed to Step 3 and extract entities from successful patterns. | ||
|
|
||
| ### Step 3: Extract Entities | ||
|
|
||
| Extract 3-5 proactive entities. **Prioritize entities derived from errors identified in Step 2.** | ||
|
|
||
| Follow these principles: | ||
|
|
||
| 1. **Reframe failures as proactive recommendations:** | ||
| - If an approach failed due to permissions → recommend the alternative FIRST | ||
| - If a system tool wasn't available → recommend what worked instead | ||
| - If an approach hit environment constraints → recommend the constraint-aware approach | ||
|
|
||
| 2. **Focus on what worked, stated as the primary approach:** | ||
| - Bad: "If exiftool fails, use PIL instead" | ||
| - Good: "In sandboxed environments, use Python libraries (PIL/Pillow) for image metadata extraction" | ||
|
|
||
| 3. **Triggers should be situational context, not failure conditions:** | ||
| - Bad trigger: "When apt-get fails" | ||
| - Good trigger: "When working in containerized/sandboxed environments" | ||
|
|
||
| 4. **For retry loops, recommend the final working approach as the starting point:** | ||
| - If 3 variations were tried before one worked, the entity should recommend the working variation directly | ||
| - Eliminate the trial-and-error by encoding the answer | ||
|
|
||
| ### Step 4: Output Entities JSON | ||
|
|
||
| Output entities in the following JSON format: | ||
|
|
||
| ```json | ||
| { | ||
| "entities": [ | ||
| { | ||
| "content": "Proactive entity stating what TO DO", | ||
| "rationale": "Why this approach works better", | ||
| "type": "guideline", | ||
| "trigger": "Situational context when this applies" | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| ### Step 5: Save Entities | ||
|
|
||
| After generating the entities JSON, save them using the save_entities.py script: | ||
|
|
||
| #### Method 1: Direct Pipe (Recommended) | ||
|
|
||
| ```bash | ||
| echo '<your-json-output>' | python3 ${CLAUDE_PLUGIN_ROOT}/skills/learn/scripts/save_entities.py | ||
| ``` | ||
|
|
||
| #### Method 2: From File | ||
|
|
||
| ```bash | ||
| cat entities.json | python3 ${CLAUDE_PLUGIN_ROOT}/skills/learn/scripts/save_entities.py | ||
| ``` | ||
|
|
||
| #### Method 3: Interactive | ||
|
|
||
| ```bash | ||
| python3 ${CLAUDE_PLUGIN_ROOT}/skills/learn/scripts/save_entities.py | ||
| # Then paste your JSON and press Ctrl+D | ||
| ``` | ||
|
|
||
| The script will: | ||
| - Find or create the entities directory (`.kaizen/entities/`) | ||
| - Write each entity as a markdown file in `{type}/` subdirectories | ||
| - Deduplicate against existing entities (avoiding duplicates) | ||
| - Display confirmation with the total count | ||
|
|
||
| **Example:** | ||
| ```bash | ||
| echo '{ | ||
| "entities": [ | ||
| { | ||
| "content": "Use Python PIL/Pillow for image metadata extraction", | ||
| "rationale": "System tools may not be available in sandboxed environments", | ||
| "type": "guideline", | ||
| "trigger": "When extracting image metadata in containerized environments" | ||
| } | ||
| ] | ||
| }' | python3 ${CLAUDE_PLUGIN_ROOT}/skills/learn/scripts/save_entities.py | ||
| ``` | ||
|
|
||
| **Output:** | ||
| ```text | ||
| Created new entities dir: /path/to/project/.kaizen/entities | ||
| Added 1 new entity(ies). Total: 1 | ||
| Entities stored in: /path/to/project/.kaizen/entities | ||
| ``` | ||
|
|
||
| **Note:** Entities are also automatically saved when a conversation ends via the Stop hook. | ||
|
|
||
| ## Examples | ||
|
|
||
| ### Good vs Bad Entities | ||
|
|
||
| **BAD (reactive):** | ||
| ```json | ||
| { | ||
| "content": "Fall back to Python PIL when exiftool is not available", | ||
| "trigger": "When exiftool command fails" | ||
| } | ||
| ``` | ||
|
|
||
| **GOOD (proactive):** | ||
| ```json | ||
| { | ||
| "content": "Use Python PIL/Pillow for image metadata extraction in sandboxed environments", | ||
| "rationale": "System tools like exiftool may not be available; PIL is always installable via pip", | ||
| "type": "guideline", | ||
| "trigger": "When extracting image metadata in containerized or sandboxed environments" | ||
| } | ||
| ``` | ||
|
|
||
| ### Error-Prevention Entity Examples | ||
|
|
||
| **From a retry loop** (tried 3 git push variations): | ||
| ```json | ||
| { | ||
| "content": "When pushing a new branch, always use 'git push -u origin <branch>' to set upstream tracking", | ||
| "rationale": "Plain 'git push' fails on new branches without upstream configured; -u sets it in one step", | ||
| "type": "guideline", | ||
| "trigger": "When pushing a newly created git branch for the first time" | ||
| } | ||
| ``` | ||
|
|
||
| **From a wrong initial approach** (tried regex, switched to parser): | ||
| ```json | ||
| { | ||
| "content": "Use BeautifulSoup or lxml for HTML content extraction, never regex", | ||
| "rationale": "Regex cannot reliably handle nested/malformed HTML; a proper parser handles edge cases", | ||
| "type": "guideline", | ||
| "trigger": "When extracting data from HTML documents or web pages" | ||
| } | ||
| ``` | ||
|
|
||
| **From a permission error** (apt-get blocked in sandbox): | ||
| ```json | ||
| { | ||
| "content": "Install Python packages with pip/uv instead of system package managers in sandboxed environments", | ||
| "rationale": "apt-get and brew require root/sudo which sandboxed environments block; pip works in user space", | ||
| "type": "guideline", | ||
| "trigger": "When installing dependencies in containerized or sandboxed environments" | ||
| } | ||
| ``` | ||
|
|
||
| ## Best Practices | ||
|
|
||
| 1. **Prioritize error-derived entities**: Errors are the highest-signal source of learnings — extract entities from them first | ||
| 2. **One error, one entity**: Each distinct error should produce exactly one prevention entity | ||
| 3. **Be specific**: Generic entities are less useful than context-specific ones | ||
| 4. **Be actionable**: Entities should clearly state what to do | ||
| 5. **Include rationale**: Explain why the approach works | ||
| 6. **Use situational triggers**: Context-based triggers are more useful than failure-based ones | ||
| 7. **Limit to 3-5 entities**: Focus on the most impactful learnings | ||
| 8. **Resolving Rules 2 vs 7**: When more than 5 distinct errors are found, start from Rule 2 (one error, one entity) then reduce to 3-5 entities using these steps: | ||
| - **Merge**: Combine errors with the same root cause or fix into a single prevention entity | ||
| - **Rank**: Select among remaining entities by severity > frequency > user impact > recency | ||
| - **Drop**: Discard lowest-ranked entities that exceed the cap | ||
|
|
||
| *Example*: A session hits 8 errors — 3 timeout variants (connect, read, DNS), 2 auth failures (expired token, missing header), 1 file-not-found, 1 permission error, 1 import error. Apply: merge the 3 timeouts into one network-resilience entity and the 2 auth failures into one auth-validation entity, then rank the resulting 5 entities (network-resilience, auth-validation, file-not-found, permission, import) and keep the top 3-5. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: AgentToolkit/kaizen
Length of output: 767
Marketplace manifest is out of sync with renamed plugin directory.
The plugin has been renamed to
kaizen-lite(evident from the directory and this plugin.json), butplatform-integrations/claude/marketplace.jsonstill references:"name": "kaizen""source": "./plugins/kaizen"The plugin directory is now at
./plugins/kaizen-lite, so the marketplace will fail to locate and load this plugin. Update marketplace.json to reference the correct plugin name and path.🤖 Prompt for AI Agents