Add learning

From encero-systems/incan · View interactive version

Add learning is an AI agent skill from the GitHub repository encero-systems/incan. Add a new learning to the agent learnings file. Use when the user says /add-learning, asks to record a lesson, or when an implementation produced a reusable insight worth preserving for future agents.

How to use this skill

Skill file

Add Learning — Incan Project

When to use

Add a learning when an implementation taught a durable, generalizable lesson that a future agent would get wrong without it. Good learnings are:

Do not add:

Workflow

Step 1: Identify the right section

Read .agents/learnings.md and determine which existing section the learning belongs in:

| Section | Add here if the learning is about... |

| --- | --- |

| General pipeline pitfalls | Typechecker/lowering/emission interactions, Program struct, type display |

| Testing strategy | Which tests to write, test coverage gaps, snapshot patterns |

| Parser and lexer patterns | Token handling, bracket depth, warning infrastructure, soft keywords |

| Stdlib and registry patterns | STDLIB_NAMESPACES, stub vs wiring, runtime facades |

| Wiring: CLI and LSP | Warning surfacing, feature gates, command coverage |

| Generic bounds and extern functions | Bounds storage, extern diagnostics, shared helpers |

| Docs and RFC tooling | RFC graph maintenance, docs generators, index/reference regeneration |

If no existing section fits, create a new one with a descriptive heading.

Step 2: Write the learning

Format as a bold-label bullet:

- **Concept in 3-5 words**: Explanation of the insight, why it matters, and what goes wrong without it. Include the triggering context (RFC number, issue number) in parentheses if applicable.

Guidelines:

Step 3: Append to the file

Add the bullet to the appropriate section in .agents/learnings.md. Maintain alphabetical or logical ordering within the section.

Step 3.5: Spot-check 1-2 existing entries in the same section

.agents/learnings.md is never mechanically checked against the code it describes — the only thing that catches a stale learning is an agent noticing while already in that section. So do that noticing on purpose, every time:

```markdown

```

This keeps a record that the learning was wrong and got corrected — which is more useful to a future agent than a silent edit, and is itself worth an /add-learning note if the reason it went stale is a generalizable lesson on its own.

Step 4: Verify

Read back the file to confirm:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.