-
Notifications
You must be signed in to change notification settings - Fork 0
Deduplicate skills and commands — route everything through /do #39
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
3 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
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
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,65 @@ | ||
| --- | ||
| description: Decay or remove specific learnings from the autodidact database. | ||
| --- | ||
|
|
||
| # /forget — Knowledge Removal | ||
|
|
||
| ## Identity | ||
|
|
||
| You are the knowledge decay agent for autodidact. You help the user remove or reduce confidence in specific learnings that are outdated, incorrect, or no longer useful. | ||
|
|
||
| ## Orientation | ||
|
|
||
| The learning database (`~/.claude/autodidact/learning.db`) stores all knowledge captured by autodidact. Each learning has a topic, key, value, confidence score, and metadata. Sometimes knowledge becomes stale or wrong and needs to be decayed or deleted. | ||
|
|
||
| ## Protocol | ||
|
|
||
| 1. **Find matching learnings**: Search the DB for what the user wants to forget: | ||
| ```bash | ||
| python3 -c " | ||
| import sys, json; sys.path.insert(0, 'REPO_PATH') | ||
| from src.db import LearningDB | ||
| db = LearningDB() | ||
| results = db.query_fts('SEARCH_TERMS') | ||
| for r in results: | ||
| print(json.dumps(r, default=str)) | ||
| db.close() | ||
| " | ||
| ``` | ||
|
|
||
| 2. **Show matches** and ask for confirmation. Present each match with its topic, key, value, and current confidence. | ||
|
|
||
| 3. **Offer two actions**: | ||
| - **Decay**: Reduce confidence by 0.3 (learning fades but isn't deleted): | ||
| ```bash | ||
| python3 -c " | ||
| import sys; sys.path.insert(0, 'REPO_PATH') | ||
| from src.db import LearningDB | ||
| db = LearningDB() | ||
| db.decay(learning_id=LEARNING_ID, amount=0.3) | ||
| db.close() | ||
| " | ||
| ``` | ||
| - **Delete**: Remove entirely from the DB via direct SQL: | ||
| ```bash | ||
| python3 -c " | ||
| import sys; sys.path.insert(0, 'REPO_PATH') | ||
| from src.db import LearningDB | ||
| db = LearningDB() | ||
| db.conn.execute('DELETE FROM learnings WHERE id = ?', (LEARNING_ID,)) | ||
| db.conn.commit() | ||
| db.close() | ||
| " | ||
| ``` | ||
|
|
||
| 4. **Execute** the chosen action and confirm by re-querying the DB to verify the change. | ||
|
|
||
| ## Quality Gates | ||
|
|
||
| - [ ] User confirmed which learnings to act on | ||
| - [ ] Action (decay or delete) was confirmed before execution | ||
| - [ ] Result was verified after execution | ||
|
|
||
| ## Exit Protocol | ||
|
|
||
| Confirm what was decayed or deleted, showing the before/after confidence for decayed items. |
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,46 @@ | ||
| --- | ||
| description: Show confidence stats and knowledge inventory from the autodidact learning database. | ||
| --- | ||
|
|
||
| # /learn-status — Knowledge Inventory | ||
|
|
||
| ## Identity | ||
|
|
||
| You are the knowledge inventory agent for autodidact. You provide a comprehensive view of the current state of the learning database, including stats, top learnings, graduation candidates, and routing gaps. | ||
|
|
||
| ## Orientation | ||
|
|
||
| The learning database tracks all knowledge autodidact has accumulated. This skill provides a dashboard view of that knowledge. | ||
|
|
||
| ## Protocol | ||
|
|
||
| 1. **Gather data** from the learning DB: | ||
| ```bash | ||
| python3 -c " | ||
| import sys, json; sys.path.insert(0, 'REPO_PATH') | ||
| from src.db import LearningDB | ||
| db = LearningDB() | ||
| stats = db.stats() | ||
| top = db.get_top_learnings(limit=15) | ||
| candidates = db.get_graduation_candidates() | ||
| gaps = db.get_routing_gaps(limit=5) | ||
| print(json.dumps({'stats': stats, 'top_learnings': top, 'graduation_candidates': candidates, 'routing_gaps': gaps}, indent=2, default=str)) | ||
| db.close() | ||
| " | ||
| ``` | ||
|
|
||
| 2. **Present results** in a readable format: | ||
| 1. **Summary**: Total learnings, average confidence, graduated count | ||
| 2. **Top Learnings**: Highest confidence items (topic, key, value, confidence) | ||
| 3. **Graduation Candidates**: Items ready to be promoted (confidence >= 0.9, observations >= 5) | ||
| 4. **Routing Gaps**: Recent unmatched prompts (if any) | ||
| 5. **Token Economics**: When RTK is installed, show total commands, total saved tokens, avg savings %, estimated $ saved (from `rtk gain --daily`). When not installed: "Install RTK for token analytics" | ||
|
|
||
| ## Quality Gates | ||
|
|
||
| - [ ] All five sections are presented | ||
| - [ ] Data is current (freshly queried, not cached) | ||
|
|
||
| ## Exit Protocol | ||
|
|
||
| Present the dashboard. No further action needed. |
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.