agentleFS
peopleforresterpeopleforrester/claude-dotfiles/skills/optimization/continuous-learning-v2/SKILL.md

continuous-learning-v2

Skill3 starsChanged 8 months agoMITView on GitHub

Instinct-based learning system that observes development patterns via hooks and builds a knowledge base of reusable instincts with confidence scoring. Instincts evolve from observations into skills, commands, and agents.

23 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use configure-ecc, clickhouse-io and 3 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • saxon-ySkill

    configure-ecc

    Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.

    Also in 5 projects that use this

  • WorldFlowAISkill

    clickhouse-io

    ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.

    Also in 9 projects that use this

  • FaisalAlqarniSkill

    springboot-verification

    Verification loop for Spring Boot projects: build, static analysis, tests with coverage, security scans, and diff review before release or PR.

    Also in 5 projects that use this

  • FaisalAlqarniSkill

    jpa-patterns

    JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.

    Also in 7 projects that use this

  • yanhaoluo0Skill

    java-coding-standards

    阿里巴巴Java开发手册编程规约,包含命名风格、常量定义、代码格式、OOP规约、日期时间、集合处理、并发处理、控制语句、注释规约等。Use when writing Java code, reviewing code, or following Alibaba Java coding standards.

    Also in 7 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before tool execution, check if any instincts apply:

    line 72
  2. Distinctive:

    After tool execution, look for learnable patterns:

    line 84
  3. Distinctive:

    When instincts cluster around a domain, they can be promoted:

    line 123

“Common” is measured: kept by at least 6 in 10 of the 19 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Continuous Learning v2: Instinct-Based System

Learn from development sessions automatically using hook-based observation and confidence-scored instincts.

Why v2?

v1 used skills for learning (probabilistic activation, 50-80% reliability). v2 uses hooks (deterministic, 100% reliability) with structured instincts.

Core Concepts

Instincts

Atomic units of learned behavior with confidence scoring:

---
id: prefer-const-assertions
trigger: "when defining constant arrays or objects in TypeScript"
confidence: 0.7
domain: "code-style"
source: "session-observation"
---
# Use `as const` for constant definitions

TypeScript `as const` assertions provide literal types and readonly guarantees.

## Pattern
```typescript
const ROLES = ['admin', 'user', 'guest'] as const;
type Role = typeof ROLES[number];

Evidence

  • Applied in 3 sessions
  • Approved by reviewer each time
  • Matches TypeScript best practices

### Confidence Levels

| Score | Level | Behavior |
|-------|-------|----------|
| 0.3 | Tentative | Suggested, not enforced |
| 0.5 | Moderate | Applied when context matches |
| 0.7 | Strong | Auto-applied, can be overridden |
| 0.9 | Near-certain | Core behavior, always applied |

### Confidence Evolution
- New observation: starts at 0.3
- Repeated application without correction: +0.1 per session
- User correction/rejection: -0.2
- Maximum: 0.9 (never fully automatic)

## Observation Hooks

### PreToolUse Observer
Before tool execution, check if any instincts apply:
```json
{
  "matcher": "Write|Edit",
  "hooks": [{
    "type": "command",
    "command": "printf '%s' '{\"systemMessage\":\"Check instincts for applicable patterns before writing code.\"}'"
  }]
}

PostToolUse Observer

After tool execution, look for learnable patterns:

{
  "matcher": "Edit",
  "hooks": [{
    "type": "command",
    "command": "FILE=$(cat | jq -r '.tool_input.file_path') && echo \"Pattern observed: successful edit to $FILE\"",
    "async": true
  }]
}

Instinct Lifecycle

Observation → Instinct (0.3) → Strengthened (0.5-0.7) → Evolved (0.9)
                    ↓                                        ↓
              Weakened/Removed                    Promoted to Skill/Rule

Commands

CommandPurpose
/learnExtract patterns from current session
/checkpointSave state including instinct observations

Storage

Instincts stored in ~/.claude/instincts/ as markdown files:

~/.claude/instincts/
  prefer-const-assertions.md
  use-errgroup-for-goroutines.md
  validate-inputs-with-zod.md

Evolution Path

When instincts cluster around a domain, they can be promoted:

  • 3+ related instincts → candidate for a Skill
  • 5+ high-confidence instincts → candidate for a Rule
  • Domain-specific cluster → candidate for an Agent prompt

Best Practices

  • Review instincts periodically (monthly)
  • Export instincts when switching projects to preserve learning
  • Share instincts with team members for consistency
  • Prune instincts that haven't been triggered in 30+ days

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.