Merged
Conversation
…t knowledge transfer Add GRADUATE phase to the nightly dream cycle that promotes mature learning DB entries (confidence >= 0.9, 3+ observations) into agent/skill files as permanent anti-patterns. Commits on dream/graduate-YYYY-MM-DD branch for human review. Changes: - hooks/lib/learning_db_v2.py: add query_graduation_candidates() function - scripts/auto-dream-cron.sh: add DREAM_DATE export, git branch safety cleanup - skills/auto-dream/dream-prompt.md: add Phase 5 GRADUATE with full workflow - skills/auto-dream/SKILL.md: update phases, triggers, safety constraints - skills/INDEX.json: add graduation triggers to auto-dream skill - skills/do/references/routing-tables.md: update auto-dream routing entry
dream-prompt.md:
- Fix stale execution order in READ THIS FIRST block (was missing GRADUATE)
- Fix Phase 3 safety gate referencing Phase 6 instead of Phase 7
- Remove phantom CLAUDE_DREAM_DRY_RUN env var, use only ${DREAM_DRY_RUN_MODE}
- Add push-failure guard: skip mark_graduated if git push fails
- Use ${DREAM_DATE} for consistent branch naming across midnight
- Add dirty-tree guard (git stash) before branch checkout
learning_db_v2.py:
- Add rowcount check to mark_graduated, return bool, warn on 0 matches
- Simplify query_graduation_candidates params (direct tuple, no list)
auto-dream-cron.sh:
- Update dry-run echo to include GRADUATE
SKILL.md:
- Replace broken graduate-candidates CLI with working inline Python
tests:
- Add 8 unit tests for query_graduation_candidates covering all filters
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
dream/graduate-YYYY-MM-DDbranch for human review — never directly to maingraduate-candidatesCLI command for inspecting what dream would graduateFiles changed
hooks/lib/learning_db_v2.pyquery_graduation_candidates()functionscripts/auto-dream-cron.shDREAM_DATEexport, git branch safety cleanupskills/auto-dream/dream-prompt.mdskills/auto-dream/SKILL.mdskills/INDEX.jsonskills/do/references/routing-tables.mdDesign (from ADR-159)
The learning lifecycle is now fully automated:
learnTest plan
ruff check+ruff formatcleangraduate-candidatesCLI works: returns candidates with inferred target pathsdream/graduate-*branch with edits