Add this skill
npx mdskills install PatrickJS/cursor-angular-novo-elementsComprehensive Angular/Novo Elements coding guidelines with strong software engineering principles
1# .cursor23rules45# General rules67- Do not apologize8- Do not thank me9- Talk to me like a human10- Verify information before making changes11- Preserve existing code structures12- Provide concise and relevant responses13- Verify all information before making changes1415You will be penalized if you:16- Skip steps in your thought process17- Add placeholders or TODOs for other developers18- Deliver code that is not production-ready1920I'm tipping $9000 for an optimal, elegant, minimal world-class solution that meets all specifications. Your code changes should be specific and complete. Think through the problem step-by-step.2122YOU MUST:23- Follow the User's intent PRECISELY24- NEVER break existing functionality by removing/modifying code or CSS without knowing exactly how to restore the same function25- Always strive to make your diff as tiny as possible2627# File-by-file changes2829- Make changes in small, incremental steps30- Test changes thoroughly before committing31- Document changes clearly in commit messages3233# Code style and formatting3435- Follow the project's coding standards36- Use consistent naming conventions37- Avoid using deprecated functions or libraries3839# Debugging and testing4041- Include debug information in log files42- Write unit tests for new code43- Ensure all tests pass before merging4445# Project structure4647- Maintain a clear and organized project structure48- Use meaningful names for files and directories49- Avoid clutter by removing unnecessary files5051# Clean Code5253Don't Repeat Yourself (DRY)5455Duplication of code can make code very difficult to maintain. Any change in logic can make the code prone to bugs or can make the code change difficult. This can be fixed by doing code reuse (DRY Principle).5657The DRY principle is stated as "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system".5859The way to achieve DRY is by creating functions and classes to make sure that any logic should be written in only one place.6061Curly's Law - Do One Thing6263Curly's Law is about choosing a single, clearly defined goal for any particular bit of code: Do One Thing.6465Curly's Law: A entity (class, function, variable) should mean one thing, and one thing only. It should not mean one thing in one circumstance and carry a different value from a different domain some other time. It should not mean two things at once. It should mean One Thing and should mean it all of the time.6667Keep It Simple Stupid (KISS)6869The KISS principle states that most systems work best if they are kept simple rather than made complicated; therefore, simplicity should be a key goal in design, and unnecessary complexity should be avoided.7071Simple code has the following benefits:72less time to write73less chances of bugs74easier to understand, debug and modify7576Do the simplest thing that could possibly work.7778Don't make me think7980Code should be easy to read and understand without much thinking. If it isn't then there is a prospect of simplification.8182You Aren't Gonna Need It (YAGNI)8384You Aren't Gonna Need It (YAGNI) is an Extreme Programming (XP) practice which states: "Always implement things when you actually need them, never when you just foresee that you need them."8586Even if you're totally, totally, totally sure that you'll need a feature, later on, don't implement it now. Usually, it'll turn out either:87you don't need it after all, or88what you actually need is quite different from what you foresaw needing earlier.8990This doesn't mean you should avoid building flexibility into your code. It means you shouldn't overengineer something based on what you think you might need later on.9192There are two main reasons to practice YAGNI:93You save time because you avoid writing code that you turn out not to need.94Your code is better because you avoid polluting it with 'guesses' that turn out to be more or less wrong but stick around anyway.9596Premature Optimization is the Root of All Evil9798Programmers waste enormous amounts of time thinking about or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered.99100We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.101102- Donald Knuth103104Boy-Scout Rule105106Any time someone sees some code that isn't as clear as it should be, they should take the opportunity to fix it right there and then - or at least within a few minutes.107108This opportunistic refactoring is referred to by Uncle Bob as following the boy-scout rule - always leave the code behind in a better state than you found it.109110The code quality tends to degrade with each change. This results in technical debt. The Boy-Scout Principle saves us from that.111112Code for the Maintainer113114Code maintenance is an expensive and difficult process. Always code considering someone else as the maintainer and making changes accordingly even if you're the maintainer. After a while, you'll remember the code as much as a stranger.115116Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live.117118Principle of Least Astonishment119120Principle of Least Astonishment states that a component of a system should behave in a way that most users will expect it to behave. The behavior should not astonish or surprise users.121122Code should do what the name and comments suggest. Conventions should be followed. Surprising side effects should be avoided as much as possible.123124# Project specific rules125126I'm using angular with standalone components127I'm integrating novo elements which is the novo-elements module128129Documentation is here: https://bullhorn.github.io/novo-elements/docs/#/home130Github is here: https://github.com/bullhorn/novo-elements131132I don''t have a module file. I am using standalone components133134@Docs{135 "library_name": "Novo Elements",136 "documentation": "https://bullhorn.github.io/novo-elements/docs/#/home"137}138139@Docs{140 "library_name": "Novo Elements",141 "documentation": "https://github.com/bullhorn/novo-elements"142}143144
Full transparency — inspect the skill content before installing.