mirror of
https://github.com/harivansh-afk/claude-continual-learning.git
synced 2026-04-15 18:01:26 +00:00
skill updates
This commit is contained in:
parent
df061cab9f
commit
5fe2f8795e
3 changed files with 154 additions and 28 deletions
|
|
@ -24,6 +24,42 @@ and leverage proven approaches.
|
|||
3. **Follow conventions**: Adhere to project conventions discovered in learnings
|
||||
4. **Note discoveries**: When you find something new (pattern, failure, edge case), mention it
|
||||
|
||||
## Code Simplicity
|
||||
|
||||
**Default to the simplest solution that works.** Resist the urge to over-engineer.
|
||||
|
||||
### Write Less Code
|
||||
|
||||
- Solve the actual problem, not hypothetical future problems
|
||||
- If a function is called once, consider inlining it
|
||||
- Three similar lines are better than a premature abstraction
|
||||
- Use standard library and built-ins before writing custom code
|
||||
- Delete code paths that can't happen
|
||||
|
||||
### Keep It Flat
|
||||
|
||||
- Use early returns and guard clauses to reduce nesting
|
||||
- Avoid callback pyramids - flatten with async/await or composition
|
||||
- One level of abstraction per function
|
||||
|
||||
### Avoid Premature Abstraction
|
||||
|
||||
- Don't add parameters "in case we need them later"
|
||||
- Don't create base classes until you have 2+ implementations
|
||||
- Don't add config for things that could be hardcoded
|
||||
- Don't create wrapper functions that just call another function
|
||||
|
||||
### Trust Your Code
|
||||
|
||||
- Don't defensively code against impossible internal states
|
||||
- Don't catch errors you can't meaningfully handle
|
||||
- Don't validate data that's already validated upstream
|
||||
- Validate at system boundaries (user input, external APIs), trust internal code
|
||||
|
||||
### When in Doubt
|
||||
|
||||
Ask: "What's the least code that makes this work?" Write that first. Add complexity only when reality demands it.
|
||||
|
||||
## Codebase Context
|
||||
|
||||
<!-- POPULATED BY /setup-agent -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue