fix: self-learning system — thresholds, single toggle, frontmatter, --reset#173
Merged
fix: self-learning system — thresholds, single toggle, frontmatter, --reset#173
Conversation
added 2 commits
April 6, 2026 09:47
- Extract magic number 0.33 into INITIAL_CONFIDENCE constant in json-helper.cjs - Fix inaccurate SYNC comment in learn.ts (batch_size is not in background-learning) - Add tests for stripLeadingFrontmatter via create-artifacts (duplicate frontmatter bug fix) - Add tests for cleanSelfLearningArtifacts (new learning-cleanup.ts utility)
…-reset - Raise promotion thresholds: 5 observations + 7-day spread (was 3/24h) - Single on/off toggle: hook presence in settings.json only (no learning.json enabled field) - Fix duplicate frontmatter: stripLeadingFrontmatter + no-frontmatter prompt instruction - Add `devflow learn --reset` for artifact + log + state cleanup - Add quality rules to background-learning prompt - Update CLAUDE.md to reflect new thresholds and mechanism - Remove existing self-learning artifacts from this project - New shared utility: learning-cleanup.ts
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
settings.jsonis the ONLY control, removed dual-stateenabledfield fromlearning.jsonstripLeadingFrontmatter()injson-helper.cjs+ no-frontmatter prompt instruction (belt-and-suspenders)devflow learn --reset— removes all self-learning artifacts + log + transient state with confirmation promptTest plan
stripLeadingFrontmatterhandles edge cases (no frontmatter, nested dashes, empty)--resetconfirms before deleting, acquires lock, releases on all pathssession-end-learningdefaults gracefully whenlearning.jsonmissing--enable/--disable/--configure/initnever writeenabledto config