agentleFS
89jobrien89jobrien/godmode/skills/pattern-learner/SKILL.md

godmode:pattern-learner

Skill1 starsChanged 56 days agoMITView on GitHub

Cross-session pattern extraction. Analyzes session traces, git history, and self-reflection data to discover recurring workflows, crate coupling patterns, and problem-solving conventions. Writes findings to memory-bank.

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 10 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After completing multiple sessions of work (5+ sessions preferred)

    line 18
  2. Distinctive:

    When asked to "find patterns", "learn from sessions", "what do I keep doing"

    line 19
  3. Distinctive:

    Do certain skills always precede or follow others?

    line 33
  4. Distinctive:

    Do certain modules always require parallel updates?

    line 56
  5. Distinctive:

    Do the same tests fail repeatedly?

    line 76
  6. Distinctive:

    Do function signatures follow a consistent pattern?

    line 100
  7. Distinctive:

    All patterns must be documented as structured entries:

    line 118
  8. Very specific:

    If a pattern has fewer than 3 supporting observations, mark it Confidence: low.

    line 132
  9. Very specific:

    If a single failure-fix pair solves a blocking issue 2+ times, mark as medium even with 2 occurrences.

    line 145
  10. Very specific:

    If a naming convention appears in 100% of recent agents (>5), mark as high even with fewer observations.

    line 147
  11. Very specific:

    If a pattern contradicts a documented convention, flag as Confidence: low and investigate before promoting.

    line 149
  12. Distinctive:

    Read-only analysis: Never modify source code, tests, or agent definitions.

    line 154
  13. Distinctive:

    Ground in evidence: Every pattern must cite specific commits, session IDs, or files.

    line 161
  14. Distinctive:

    Flag contradictions: If a new pattern contradicts an existing one, note the conflict and suggest investigation.

    line 163

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “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

Pattern Learner

Extract recurring patterns from session history and codebases to discover your workflow conventions, crate coupling relationships, and preferred API shapes.

When to Use

  • After completing multiple sessions of work (5+ sessions preferred)
  • When asked to "find patterns", "learn from sessions", "what do I keep doing"
  • To audit recurring failure modes and their fixes
  • To document emerging conventions before they become implicit
  • To identify which skills, tools, and crates form your core workflow

Analysis Dimensions

1. Skill Co-occurrence

Identify which skills are invoked together in sessions:

What to measure:

  • Which skill pairs or triplets appear together consistently?
  • Do certain skills always precede or follow others?
  • What is the most frequent skill ordering in your workflow?

Output:

Skill co-occurrence: [skill-a, skill-b]
Occurrences: 5/8 sessions
Confidence: high
Pattern: skill-a always runs before skill-b in code-review workflows

Confidence threshold: Require 3+ occurrences out of recent 8 sessions for high confidence. Fewer occurrences = medium or low.

2. Crate Coupling

Identify which crates change together in commits:

What to measure:

  • Which crate pairs consistently update in the same commit?
  • Are there obvious source-of-truth dependencies revealed by change patterns?
  • Do certain modules always require parallel updates?

Output:

Crate coupling: crux-core ↔ devkit
Occurrences: 5/8 recent commits
Confidence: high
Pattern: Changes to core runtime (crux-core) trigger toolkit updates (devkit)

Confidence threshold: Require 3+ occurrences in recent 10 commits for high confidence.

3. Failure-Fix Pairs

Identify recurring test failure → fix sequences:

What to measure:

  • Do the same tests fail repeatedly?
  • What command sequence fixes each failure type?
  • Is there a root-cause pattern (e.g., "missing unsafe block comment")?

Output:

Failure-fix pair: clippy unsafe warnings
Failure cause: Missing SAFETY comment on unsafe block
Fix sequence: [1. Add SAFETY doc comment, 2. Run taskit check lint, 3. Commit]
Frequency: 3/10 recent sessions
Confidence: high

Confidence threshold: Require 3+ occurrences for a pattern to be high confidence. One or two occurrences = low.

4. Conventions and API Shapes

Identify recurring naming, structure, and coding patterns:

What to measure:

  • Are there preferred naming schemes (e.g., godmode:domain-service)?
  • Do function signatures follow a consistent pattern?
  • What error handling style dominates?
  • Are there recurring doc comment templates or structures?

Output:

Naming convention: godmode:<domain>-<service>
Examples: godmode:pattern-learner, godmode:code-review, godmode:introspection
Frequency: 7/8 recent agent definitions
Confidence: high
Rationale: Consistent naming aids discoverability and mental model alignment

Confidence threshold: Require 60%+ adherence in recent samples for high.

Output Format

All patterns must be documented as structured entries:

## Patterns — <YYYY-MM-DD>

### <Pattern Category>: <Pattern Name>

**Frequency**: X/Y recent observations
**Confidence**: [high|medium|low]
**Description**: One-sentence summary of the pattern
**Evidence**: Numbered list of recent examples (commits, sessions, files)
**Recommended actions**: Optional; what to do with this knowledge

If a pattern has fewer than 3 supporting observations, mark it Confidence: low. Do not promote uncertain patterns to established knowledge.

Confidence Rules

ObservationsConfidenceAction
1–2lowRecord as tentative; flag for monitoring
3–5mediumLikely real; worth documenting
6+highEstablished pattern; apply widely

Special cases:

  • If a single failure-fix pair solves a blocking issue 2+ times, mark as medium even with 2 occurrences.
  • If a naming convention appears in 100% of recent agents (>5), mark as high even with fewer observations.
  • If a pattern contradicts a documented convention, flag as Confidence: low and investigate before promoting.

Guardrails

  • Read-only analysis: Never modify source code, tests, or agent definitions.
  • Append-only memory: Append new patterns to memory-bank; never delete or overwrite existing patterns.
  • Minimum evidence threshold: Require 3+ occurrences before declaring a pattern "established". Use low confidence liberally for emerging patterns.
  • Date all patterns: Include the observation date; older patterns may become stale.
  • Ground in evidence: Every pattern must cite specific commits, session IDs, or files. Never invent patterns from intuition alone.
  • Flag contradictions: If a new pattern contradicts an existing one, note the conflict and suggest investigation.

See Also

  • .ctx/godmode/memory-bank/patterns.md — main pattern repository
  • skills/introspection/SKILL.md — plugin and skill consistency auditing
  • agents/pattern-learner-agent.md — agent definition

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.