From junjak-ai-harness
Extract reusable patterns from sessions, manage session state, and evolve learnings into skills. Use at session end, after completing features, or when patterns emerge during work.
How this skill is triggered — by the user, by Claude, or both
Slash command
/junjak-ai-harness:continuous-learningThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Capture, evaluate, and evolve reusable patterns from coding sessions. Three modes: session state tracking, pattern extraction, skill evolution.
Capture, evaluate, and evolve reusable patterns from coding sessions. Three modes: session state tracking, pattern extraction, skill evolution.
During any non-trivial session, maintain .claude/session-state/current.md:
# Session State — {date}
## Current Task
{what you're working on}
## Progress
- [x] Completed steps
- [ ] Remaining steps
## Verified Approaches
{approach}: {evidence it works}
## Failed Approaches
{approach}: {why it failed}
## Key Decisions
- {decision}: {rationale}
## Discoveries
- {non-obvious findings about the codebase}
| Trigger | Action |
|---|---|
| Starting a task | Write initial state with task description |
| Completing a milestone | Update progress, add verified approaches |
| Failed approach | Document what failed and why |
| Before compaction | Full state snapshot (pre-compact hook reminds you) |
| Before session end | Final state with remaining work items |
Session start → Load .claude/session-state/last-session.md (if exists)
During session → Write/update .claude/session-state/current.md
Session end → Stop hook archives current.md → last-session.md
Next session → SessionStart hook outputs last-session.md
Extract patterns that are:
| Category | Example |
|---|---|
| Debugging | "This error always means X, fix with Y" |
| Architecture | "This codebase uses pattern X for Y" |
| Tooling | "Use X tool with Y flags for best results" |
| Domain | "Business rule: X always requires Y" |
| Performance | "Query X is slow because Y, use Z instead" |
After completing a significant task:
.claude/session-state/learnings/# {Pattern Name}
**Confidence**: low | medium | high
**Category**: debugging | architecture | tooling | domain | performance
**Discovered**: {date}
**Last validated**: {date}
## Pattern
{Concise description of the reusable pattern}
## Evidence
{How this was validated — test results, build success, etc.}
## When to Apply
{Trigger conditions — when should this pattern be used?}
## Anti-patterns
{What NOT to do — common mistakes this pattern prevents}
When 3+ related learnings cluster around a topic, evaluate skill evolution using the criteria below.
Individual learnings → Cluster by topic → Draft skill → Validate → Install as SKILL.md
---
name: {skill-name}
description: "{when to activate this skill}"
---
# {Skill Name}
## When to Activate
{Conditions that trigger this skill}
## Core Concepts
{Distilled from clustered learnings}
## Practical Examples
{From validated evidence in learnings}
## Anti-Patterns
{From failed approaches across learnings}
Observation → Pending instinct (30-day TTL)
↓ validated
Active instinct (confidence scored)
↓ 3+ related instincts
Skill candidate
↓ evolved
SKILL.md installed
| Score | Meaning | Action |
|---|---|---|
| 1 (low) | Single observation | Keep as pending, monitor |
| 2 (medium) | Confirmed across 2-3 sessions | Promote to active |
| 3 (high) | Validated repeatedly, never contradicted | Candidate for skill |
After each team workflow completion:
State file: .claude/session-state/current.md (update during session)
Learnings: .claude/session-state/learnings/{topic}.md
Archive: .claude/session-state/archive/ (auto-managed by hooks)
Extract: After milestones — identify, validate, generalize, score, store
Evolve: 3+ related high-confidence learnings → new SKILL.md
Prune: 30-day TTL for pending, immediate for contradicted
npx claudepluginhub junjak/ai-harness --plugin junjak-ai-harnessGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.