Use the PHP-Clean-Code skill.
Create a tax calculator function from the business specification taxes.md
Follow the 'Early Return' rule defined in that skill.
Use the PHP-Clean-Code skill.
Create a tax calculator function from the business specification taxes.md
Follow the 'Early Return' rule defined in that skill.
Here are 50 pages of our company coding standards and business rules.
Now, please write a simple function to calculate taxes.
Read @Dashboard.tsx and @api.ts. Do not write code yet.
Analyze the stack dump.
When you find the problem, explain it to me.
Then, write a Markdown plan to fix it, restricted to the REST API..
[Activate Code Mode]
Fix the probabilistic predictor in the Kessler Syndrome Monitor component using this stack dump.
Refactor this code and make it cleaner
Mejorá este código y hacelo más limpio
| git status # Check for uncommitted changes | |
| git add . # Stage all changes | |
| git commit -m "msg" # Commit with message | |
| git diff # See AI's changes | |
| git reset --hard HEAD # Revert AI changes |
| # You analyze git history first: | |
| # git log --format=format: --name-only | | |
| # grep -E '\.py$' | sort | uniq -c | sort -rn | |
| # Results show PaymentProcessor changed 47 times this month | |
| # And it doesn't have good enough coverage | |
| # LegacyAuthenticator: 0 changes in 3 years | |
| # Focus on the actual hotspot: | |
| class PaymentProcessor: |
| # This authentication module hasn't changed in 3 years | |
| # It's deprecated and will be removed next quarter | |
| # But you spend a week "improving" it | |
| class LegacyAuthenticator: | |
| def authenticate(self, user, pwd): | |
| # Original messy code from 2019 | |
| if user != None: | |
| if pwd != None: | |
| if len(pwd) > 5: |
| import unicodedata | |
| def normalize_email(email): | |
| # Convert to NFKC normalized form | |
| normalized = unicodedata.normalize('NFKC', email) | |
| # Ensure only ASCII characters | |
| try: | |
| normalized.encode('ascii') | |
| except UnicodeEncodeError: |