agentleFS
fagemxfagemx/edda/.claude/skills/project-principles/SKILL.md

Project Principles

Skill36 starsChanged 2 months agoApache-2.0View on GitHub

Core architectural and code quality principles that guide all development decisions in the edda project

The file

Show its rules and text

We split this skill into the rules it gives an agent

25 rules. About 0 are common, 14 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Start with the simplest solution that works

    line 17
  2. Distinctive:

    Delete unused code aggressively

    line 19
  3. Distinctive:

    When coding: Ask "Do we need this NOW?" If not, don't add it.

    line 22
  4. Distinctive:

    Only handle errors when you can meaningfully recover

    line 31
  5. Very specific:

    Avoid .unwrap() in library code - use ?

    line 33
  6. Distinctive:

    When coding: Only add explicit error handling when you have specific recovery logic.

    line 36
  7. Very specific:

    Use newtypes for domain concepts (SessionId(Uuid) not raw Uuid)

    line 45
  8. Very specific:

    Use thiserror for library errors, anyhow for application errors

    line 47
  9. Distinctive:

    When coding: If a domain concept uses a primitive type, wrap it in a newtype.

    line 50
  10. Very specific:

    Never add #[allow(...)] to suppress warnings

    line 59
  11. Very specific:

    Never add #[allow(clippy::...)] to bypass clippy lints

    line 60
  12. Very specific:

    Run cargo clippy -- -D warnings before committing

    line 62
  13. Distinctive:

    When coding: If clippy complains, fix the code, not the linter.

    line 64
  14. Distinctive:

    Before writing any code, verify:

    line 70
  15. Very specific:

    Starting a new feature?: Read yagni.md first

    line 78
  16. Very specific:

    Handling errors?: Read no-defensive.md

    line 79
  17. Very specific:

    Defining types?: Read type-safety.md

    line 80
  18. Very specific:

    Getting clippy warnings?: Read zero-lint.md

    line 81
  19. Distinctive:

    While writing code: - Follow type safety and proper error handling

    line 87
  20. Very specific:

    Before committing: - Ensure zero warnings with cargo clippy -- -D warnings

    line 88
  21. Distinctive:

    During code review: - Verify adherence to all principles

    line 89
  22. Distinctive:

    Keep the codebase simple and maintainable

    line 94
  23. Distinctive:

    Ensure high code quality

    line 96
  24. Distinctive:

    If principles seem to conflict:

    line 103
  25. Distinctive:

    When in doubt, choose the simpler solution

    line 106

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Project Principles Skill

This skill defines the fundamental design principles and coding standards for the edda project. These principles are MANDATORY for all code written in this project and should guide every development decision.

The Four Core Principles

1. YAGNI (You Aren't Gonna Need It) - CORE PRINCIPLE

Don't add functionality until it's actually needed.

Quick rules:

  • Start with the simplest solution that works
  • Avoid premature abstractions
  • Delete unused code aggressively
  • No "just in case" features

When coding: Ask "Do we need this NOW?" If not, don't add it.

For detailed guidelines and examples, read yagni.md

2. Proper Error Handling (Not Defensive Programming)

Use Result/Option and ? propagation. Don't panic or swallow errors.

Quick rules:

  • Only handle errors when you can meaningfully recover
  • Let errors propagate with ? to where they can be properly addressed
  • Avoid .unwrap() in library code - use ? or .expect("reason")
  • Trust the type system and Rust's ownership model

When coding: Only add explicit error handling when you have specific recovery logic.

For detailed guidelines and examples, read no-defensive.md

3. Leverage Rust's Type System

Use the type system to enforce correctness at compile time.

Quick rules:

  • Use newtypes for domain concepts (SessionId(Uuid) not raw Uuid)
  • Make invalid states unrepresentable with enums
  • Use thiserror for library errors, anyhow for application errors
  • Define structs and enums for all data structures

When coding: If a domain concept uses a primitive type, wrap it in a newtype.

For detailed guidelines and examples, read type-safety.md

4. Zero Tolerance for Warnings

All code must compile without warnings. Clippy warnings are errors.

Quick rules:

  • Never add #[allow(...)] to suppress warnings
  • Never add #[allow(clippy::...)] to bypass clippy lints
  • Fix the underlying issue, don't suppress the warning
  • Run cargo clippy -- -D warnings before committing

When coding: If clippy complains, fix the code, not the linter.

For detailed guidelines and examples, read zero-lint.md

Quick Reference: Code Quality Checklist

Before writing any code, verify:

  • Is this feature needed NOW? (YAGNI)
  • Am I propagating errors properly with ?? (Error Handling)
  • Are domain concepts wrapped in newtypes? (Type Safety)
  • Will this pass cargo clippy -- -D warnings? (Zero Warnings)

When to Load Additional Context

  • Starting a new feature? Read yagni.md first
  • Handling errors? Read no-defensive.md
  • Defining types? Read type-safety.md
  • Getting clippy warnings? Read zero-lint.md

Integration with Workflow

These principles should be applied:

  1. Before writing code - Plan with YAGNI in mind
  2. While writing code - Follow type safety and proper error handling
  3. Before committing - Ensure zero warnings with cargo clippy -- -D warnings
  4. During code review - Verify adherence to all principles

Philosophy

These principles exist to:

  • Keep the codebase simple and maintainable
  • Prevent technical debt accumulation
  • Ensure high code quality
  • Make the project easy to understand and modify

They may feel restrictive at first, but they lead to cleaner, more maintainable code.

Conflict Resolution

If principles seem to conflict:

  1. YAGNI takes precedence - simplicity wins
  2. Type safety is non-negotiable
  3. When in doubt, choose the simpler solution

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.