refactor(aidd-context): rework 10-learn around scoring and explicit confirm#282
Merged
Conversation
…onfirm Rebuild the learn skill so it reads a source, scores each lesson, asks the user what to do with each, and writes only what they approve. - 4 actions (gather, assess, write, sync) with the Input/Output/Process/Test anatomy; the SKILL.md router gains a plain Destinations block. - assess scores each candidate 0-10, proposes a destination, and reconciles it against the destination's current content (new, already covered, or supersedes) so a reworded repeat is not re-added and a reversal replaces the stale entry. - four destinations: Memory (fold into the matching file), Decision (a record in aidd_docs/memory/internal/decisions/ from the template), Rule and Skill (handed to their generators, never authored here). - description advertises only the directive triggers it reliably fires on. - drop the old DEC-XXX / ADR.md ceremony and the command-frontmatter templates for one clean decision-record template. Validated end to end via headless claude -p: routes, the score brake, contradiction-supersede, multi-item, exact-duplicate dedup, and a French directive (the description matches intent across languages). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4c14ad5 to
05a40ce
Compare
Merged
1 task
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.
🎯 What & why
Rework
aidd-context:10-learnso capturing a lesson is deliberate, not automatic: it reads a source, scores each candidate, asks the user what to do with each, and writes only what they approve. The old skill had stale paths, scope creep (wrote into AIDD's own scaffold), and command-frontmatter templates.🛠️ How it works
gather(pick a source, collect, drop noise),assess(score, route, confirm),write(apply approved items),sync(refresh the memory block). StandardInput/Output/Process/Testanatomy; the router gains a plainDestinationsblock so the routing is legible.aidd_docs/memory/internal/decisions/from one clean template —update_memory.jslists it on-demand), Rule and Skill (handed to05-rule-generate/04-skill-generate, never authored here).DEC-XXX/ADR.mdceremony.Why this shape: the user confirms before any write (the score is the brake, not the AI), and learn never writes a rule or skill file (the generators own per-tool placement, so learn stays tool-agnostic).
🧪 How to verify
node scripts/summarize-markdown.js plugins/aidd-context/ /tmp/cat.md --depth=4 --fields=description,argument-hint --title=x --tagline=xthen diff against the committedCATALOG.md.aidd-contextenabled and a memory bank, ask in natural language to "record decision X with the reasoning": learn scores it, proposes a destination, and on a contradiction supersedes the stale entry rather than duplicating.claude -p: route coverage (memory/decision/rule-handoff/skill-pending), the score brake (low items dropped), contradiction-supersede, multi-item, exact-duplicate dedup, and a French directive (the description matches intent across languages).internal/decisions/); Memory is always an in-place update; Rule/Skill are generator handoffs.✅ I certify