/adev:learnfrom adev
Captures user-taught lessons as structured heuristics in the project's memory store. Invoked explicitly via slash command when the user says 'remember this' or shares a rule/pattern to persist across sessions.
Ships in adev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Explicit user-driven capture of lessons the automated lifecycle missed. Takes a free-text lesson and distills it into a structured heuristic entry in .context-index/memory/heuristics/.
Announce at start: "I'm using the /adev:learn skill to capture this lesson as a heuristic."
/adev:learn "always run tests before committing hook changes"/adev:learn "the repomap parser chokes on re-exports — use named exports"--module <module>: Target module scope (e.g., hooks, cli). If omitted, infer from context or ask.--anti-pattern <text>: Explicit counter-rule ("don't do this"). If omitted, attempt to derive one.--list: List all heuristics, optionally filtered by --module.--promote <id>: Promote a heuristic's confidence one level up.--demote <id>: Demote a heuristic's confidence one level down.--archive <id> --reason <text>: Archive a heuristic with a reason..context-index/ must exist. If not, stop and suggest /adev:init.lib/heuristics.mjs must be accessible (it provides the storage API). Derive the plugin root from this skill file's base directory by stripping the skills/<name>/ suffix. Use <ADEV_ROOT>/lib/heuristics.mjs for imports.If the user provided a positional argument, use it as the raw lesson text.
If no argument was provided, ask:
What lesson should I capture? Describe:
- What to do (or what not to do)
- Why (what went wrong or what worked)
Wait for the user's response.
Load Skill Extensions: Load any skill extension instructions before proceeding:
adev skill-ext load --skill learn
If the output is not __NONE__, incorporate it as additional standing instructions that apply to this skill's entire execution. Frame it as: "The following skill extension instructions apply to this invocation (source: installed domain extensions and/or project-level overrides)." If the output is __NONE__, continue normally.
The scope maps to a module slug from manifest.yaml. Heuristics scoped to a module are injected into agent context when working on that module.
If --module was provided, validate it exists as a module in the manifest or use _global. Proceed.
If no scope, infer from the lesson text:
This seems related to the **hooks** module. Use that scope? (yes / different / global)
Which module does this apply to?
1. hooks
2. cli
3. implementation
...
N. Global (applies to all modules)
Transform the raw lesson into the structured heuristic format. This is the critical step — the goal is to generalize the lesson so it's useful in future contexts, not to record a specific incident.
Generate these fields:
| Field | How to derive |
|---|---|
title | Short imperative summary (max 120 chars). e.g., "Verify hook JSON contract after edits" |
pattern | The "do this" rule (max 500 chars). Write as a concrete instruction an agent can follow. |
anti-pattern | The "don't do this" counter-rule (max 500 chars). Derive from the lesson's failure case, or from --anti-pattern if provided. |
id | Safe-slug derived from the title: lowercase, kebab-case, max 64 chars. e.g., verify-hook-json-after-edits |
confidence | Start at medium for first-time lessons. If the lesson is a guess not yet confirmed by a concrete failure, or the user signals low certainty, use low instead. If the user says "this has happened multiple times" or "we keep hitting this", use high. |
Redaction check: Ensure the pattern and anti-pattern do NOT contain:
If any are detected, redact and link to evidence instead.
Show the user the proposed heuristic before writing:
Proposed heuristic:
Scope: hooks
ID: verify-hook-json-after-edits
Title: Verify hook JSON contract after edits
Pattern: After editing any hook script or hooks.json, run the hook
test suite to confirm the stdin/stdout JSON contract is intact.
Anti-pattern: Assume a hook edit is correct based on a manual dry-run alone.
Confidence: medium
Save this? (yes / edit / cancel)
Terse form: Renders the scope, id, title, and confidence lines, the pattern and anti-pattern text in full, and the "Save this? (yes / edit / cancel)" prompt — no heuristic is written yet, so no artifact path exists to substitute for them.
Construct the heuristic entry object:
{
id: "<generated-id>",
scope: "<scope>",
title: "<title>",
pattern: "<pattern>",
antiPattern: "<anti-pattern>",
confidence: "medium",
evidence: [{
path: "<current-session-file-or-conversation-ref>",
date: "<today YYYY-MM-DD>",
source: "learn"
}],
contradictedBy: [],
created: "<today YYYY-MM-DD>",
updated: "<today YYYY-MM-DD>"
}
Write the entry to .context-index/memory/heuristics/<scope>.md using the YAML frontmatter format documented in _format.md. If the scope file doesn't exist yet, create it with a heading.
File format:
# Heuristics: <scope>
---
id: <id>
scope: <scope>
title: <title>
pattern: <pattern>
anti-pattern: <anti-pattern>
confidence: medium
evidence:
- path: <evidence-path>
date: <today>
source: learn
contradicted-by: []
created: <today>
updated: <today>
---
If the file already exists with other entries, append the new frontmatter block after the last existing block.
Duplicate check: Before writing, read existing heuristics for the scope. If an entry with a similar title or pattern exists (fuzzy match), offer to update it instead:
Similar heuristic already exists:
ID: existing-hook-validation
Title: Run hook tests after changes
Options:
1. Update existing (add evidence, merge patterns)
2. Create new anyway (different enough)
3. Cancel
Saved heuristic: <id> (scope: <scope>, confidence: medium)
This lesson will be surfaced when agents work on the <scope> module
via /adev:implement, /adev:plan, and /adev:debug.
To strengthen it: /adev:learn --promote <id>
To remove it: /adev:learn --archive <id> --reason "no longer relevant"
Terse form: Renders the saved id, scope, and confidence, and the two follow-on invocations (/adev:learn --promote <id>, /adev:learn --archive <id> --reason "…"). Substitutes the surfacing-context sentence with the repo-relative store path .context-index/memory/heuristics/<scope>.md, which now holds the full record.
--list)When --list is provided:
--module is provided, filter to that scope.templates/verbosity/terse.md, templates/verbosity/normal.md, and templates/verbosity/deep.md: when the resolved verbosity is terse and this section carries a **Terse form:** block, that block is the section's declared rendering at terse verbosity. See skills/status/SKILL.md:12 for the full terse-form marker grammar and table-substitution recipe.Heuristics (scope: hooks)
| ID | Title | Confidence | Evidence | Updated |
|----|-------|------------|----------|---------|
| verify-hook-json-after-edits | Verify hook JSON contract after edits | low | 1 | 2026-04-13 |
| always-test-exit-codes | Always test exit codes in hooks | high | 4 | 2026-04-10 |
Total: 2 heuristics (1 high, 0 medium, 1 low)
Terse form: Renders the heuristics table narrowed to id, title, and confidence, and the totals line. Substitutes the Evidence and Updated columns with a count of heuristics and /adev:learn --list --module <scope> for the narrower listing that carries per-entry evidence and update dates.
--promote <id>: Read the heuristic, bump confidence one level, write back. Report the change.
--demote <id>: Read the heuristic, lower confidence one level. If already low, offer to archive instead.
--archive <id> --reason <text>: Move the entry to archive/<scope>-<id>.md. Require a reason.
medium, not low. The store auto-promotes as evidence accumulates.learn. This distinguishes user-captured heuristics from auto-extracted ones.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub agentic-development/adev-plugin --plugin adev31 skills in this plugin
/assessadev:assessAssess codebase readiness for agentic development. Scans the codebase using static file inspection and outputs maturity scores across 8 structural dimensions (raw mode) or 11 dimensions (adev mode). Use when you want to evaluate how well-suited a codebase is for AI-assisted development, identify improvement areas, or track progress over time./brainstormadev:brainstormExplore a feature idea interactively and produce a Feature Charter. Validates against constitution and existing charters. Use before building any new feature or module, when the user mentions a new capability, or says 'let us build X'./bugfix-loopadev:bugfix-loopSelf-re-invoking, one-bug-per-turn loop that drains eligible P2/P3 bugs from the issue board unattended, using /adev:debug --auto for each attempt./buildadev:buildEnd-to-end build orchestrator. Chains review, plan, route, implement, and validate for one or more specs through a full lifecycle pipeline. Use when the user says 'build', 'end to end', 'full pipeline', 'build the spec', 'build the milestone', 'run the whole pipeline', or wants to execute multiple lifecycle steps in sequence without manual handoffs./codehealthadev:codehealthProactively scan source code for dead exports, orphan files, unused dependencies, stale code, and duplicate logic. Produces severity-tiered reports from repomap artifacts. Use when the user says 'check code health', 'find dead code', 'unused exports', 'stale files', 'orphan files', 'unused dependencies', or wants to identify cleanup opportunities before refactoring./debugadev:debugContext-aware systematic debugging. Checks ADRs for known issues, specs for expected behavior, and orientation for architecture context before investigating. Use when encountering any bug, test failure, or unexpected behavior. Trigger on 'fix this', 'fix the bug', 'something is broken', 'this test fails', 'unexpected error', 'why is this not working', 'this doesn't work', 'can you fix', 'there's an error', 'it's failing', or any request to fix, debug, or investigate a problem.Other plugins' skills for the same job