From design-workflow
Document a recurring pattern or mistake to avoid in future interactions
npx claudepluginhub cjuega/ai-plugins --plugin design-workflowThis skill uses the workspace's default tool permissions.
Document the correction the user just gave as a reusable lesson in `.aidocs/lessons/`: **$ARGUMENTS**
Records reusable lessons from resolved bug fixes, architectural changes, interface updates, or recurring pitfalls into project memory docs, anchored to git commits.
Captures coding mistakes as persistent, categorized rules with mistake and correction. Proposes formatted [LEARN] entries for user approval before storing/retrieving.
Captures and reviews lessons learned from coding sessions in ~/.claude/lessons.md. Structures insights on bugs, patterns, tools; enables grep searches, AI audits, and automation into git hooks/snippets.
Share bugs, ideas, or general feedback.
Document the correction the user just gave as a reusable lesson in .aidocs/lessons/: $ARGUMENTS
Read language configuration from .aidocs/config.yaml (or .aidocs/config.yml):
! cat .aidocs/config.yaml 2>/dev/null || cat .aidocs/config.yml 2>/dev/null || echo "language: en"
Extract the language field (default: en if neither file exists or the field is absent). All content written to .aidocs/ must be in this language.
Review existing lessons to avoid duplicates and check for related lessons to update instead:
! ls .aidocs/lessons/ 2>/dev/null || echo "No lessons yet"
Identify the pattern: extract the general, reusable principle from the specific correction. Focus on why the mistake happened and what rule prevents it — not the specific instance.
Determine the filename: use today's date and a kebab-case slug that describes the pattern.
YYYYMMDD-<pattern-slug>.md20260403-no-unit-tests-per-class.mdWrite the lesson in .aidocs/lessons/ using the template below. Every section is mandatory — do not skip any.
Present the lesson to the user for review before finishing.
# <Title: the pattern or rule, stated as a positive principle>
- **Date**: YYYY-MM-DD
- **Status**: Active | Superseded by [Lesson YYYYMMDD](./YYYYMMDD-slug.md)
## Rule
State the rule clearly and concisely in one or two sentences. Use imperative voice: "Do not...", "Always...", "Prefer...".
## Context
Describe in which situations this rule applies. What kind of task, file type, architecture layer, or workflow triggers this pattern? Be specific enough to be actionable but general enough to cover future cases.
## Why
Explain the reasoning behind the rule. What goes wrong when it is violated? What value does following it preserve (consistency, architecture, readability, testability, etc.)?
## Examples
### Wrong
// Concrete, minimal example showing the mistake
### Right
// Concrete, minimal example showing the correct approach
## Related Lessons
- List links to related lessons if any, or write "None".
Superseded by [Lesson YYYYMMDD](./YYYYMMDD-slug.md).