Skip to content

refactor(aidd-context): rework 10-learn around scoring and explicit confirm#282

Merged
blafourcade merged 1 commit into
mainfrom
refactor/aidd-context-learn
Jun 17, 2026
Merged

refactor(aidd-context): rework 10-learn around scoring and explicit confirm#282
blafourcade merged 1 commit into
mainfrom
refactor/aidd-context-learn

Conversation

@blafourcade

Copy link
Copy Markdown
Contributor

Stacked on #279 (project-memory). Base is refactor/aidd-context-project-init; review/merge that first. learn depends on the restructured memory bank, update_memory.js, and the 02-project-memory rename.

🎯 What & why

Rework aidd-context:10-learn so 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

  • Four actions (SKILL.md): gather (pick a source, collect, drop noise), assess (score, route, confirm), write (apply approved items), sync (refresh the memory block). Standard Input/Output/Process/Test anatomy; the router gains a plain Destinations block so the routing is legible.
  • assess reconciles (02-assess.md): each candidate gets a 0-10 score and is classified against its destination's current content — new, already covered, or supersedes. A reworded repeat is not re-added; a reversal replaces the stale entry. This is the single mechanism behind both dedup and contradiction handling.
  • Four destinations: Memory (fold into the matching file), Decision (a record in aidd_docs/memory/internal/decisions/ from one clean template — update_memory.js lists it on-demand), Rule and Skill (handed to 05-rule-generate / 04-skill-generate, never authored here).
  • Honest description: advertises only the directive triggers it reliably auto-fires on. Dropped the DEC-XXX/ADR.md ceremony.

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=x then diff against the committed CATALOG.md.
  • In a project with aidd-context enabled 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.
  • Validated this branch via headless 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).

⚠️ Heads-up

  • A captured decision is the only new file learn authors (a record under internal/decisions/); Memory is always an in-place update; Rule/Skill are generator handoffs.
  • Passively-stated conventions ("from now on X") do not reliably auto-trigger learn — they need a directive ("capture this") or explicit invocation. A nudge hook was prototyped and dropped as not worth the per-prompt cost.

✅ I certify

  • I DO CERTIFY I READ EACH LINE OF THE PULL REQUEST BECAUSE I AM A SOFTWARE ENGINEER, NOT A AI PUPPY.

Base automatically changed from refactor/aidd-context-project-init to main June 17, 2026 06:58
…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>
@blafourcade blafourcade force-pushed the refactor/aidd-context-learn branch from 4c14ad5 to 05a40ce Compare June 17, 2026 06:59
@blafourcade blafourcade merged commit 89935c0 into main Jun 17, 2026
8 checks passed
@blafourcade blafourcade deleted the refactor/aidd-context-learn branch June 17, 2026 07:00
@aidd-bot aidd-bot Bot mentioned this pull request Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant