-
Notifications
You must be signed in to change notification settings - Fork 0
Restore clean main #238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Restore clean main #238
Conversation
…between Cyrano and standalone backend - Enhanced Cyrano tax-formulas.ts with complete CTC/ODC/ACTC/EITC credit calculations - Added calculateFederal() compatibility function matching standalone backend interface - Updated standalone backend to import from Cyrano instead of duplicating code - Updated Cyrano HTTP bridge to use calculateFederal() for complete credit calculations - Both implementations now share the same tax calculation logic while maintaining modularity
- Replace wouter dependency with react-router-dom in package.json - Update App.tsx to use BrowserRouter, Routes, and Route components - Convert all Route components from component prop to element prop - Replace useLocation hook with useNavigate in settings-panel, profile-panel, and onboarding - Update all Link components from wouter to react-router-dom (href -> to) - Add missing Button import in performance.tsx - Standardize routing across LexFiat, Arkiver, and Forecaster applications
📝 WalkthroughWalkthroughReplaced in-process tax calculations with a shared Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant HTTPBridge as HTTP Bridge
participant TaxFormulas as tax-formulas (calculateFederal)
participant PDFModule as tax-forecast-module (generate_pdf)
Client->>HTTPBridge: POST /api/forecast/tax (forecast_input)
HTTPBridge->>TaxFormulas: validate(forecast_input) via FederalTaxInputSchema
TaxFormulas-->>HTTPBridge: validationResult
HTTPBridge->>TaxFormulas: calculateFederal(validated_input)
TaxFormulas-->>HTTPBridge: FederalTaxResult
HTTPBridge-->>Client: JSON with calculated values
Client->>HTTPBridge: POST /api/forecast/tax/pdf (forecast_input)
HTTPBridge->>TaxFormulas: validate + calculateFederal(validated_input)
TaxFormulas-->>HTTPBridge: FederalTaxResult
HTTPBridge->>PDFModule: generate_pdf(formData populated from FederalTaxResult)
PDFModule-->>HTTPBridge: PDF binary
HTTPBridge-->>Client: PDF response
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codacy's Analysis Summary1 new issue (≤ 0 issue) Review Pull Request in Codacy →
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
apps/lexfiat/client/src/pages/settings.tsx (1)
12-17: Critical: Naming collision betweenLinkimports will break the icon rendering.The
Linkimported fromreact-router-dom(line 17) shadows theLinkicon imported fromlucide-react(line 12). This causes line 119 (<Link className="w-3 h-3 sm:w-4 sm:h-4" />) to render a react-router-domLinkcomponent instead of the intended lucide icon, which will fail since notoprop is provided.🐛 Proposed fix: Alias one of the imports
-import { Settings, User, Link, Bot, MessageSquare, Shield, Bell, ArrowLeft, Scale } from "lucide-react"; +import { Settings, User, Link as LinkIcon, Bot, MessageSquare, Shield, Bell, ArrowLeft, Scale } from "lucide-react";Then update line 119:
- <Link className="w-3 h-3 sm:w-4 sm:h-4" /> + <LinkIcon className="w-3 h-3 sm:w-4 sm:h-4" />apps/lexfiat/client/src/components/dashboard/profile-panel.tsx (1)
284-292: Remove redundantonClickhandler -Linkalready handles navigation.The
<Link to="/settings">component already handles navigation when clicked. The additionalonClick={() => navigate("/settings")}on the nested div is redundant and may cause double-navigation or performance overhead.🔧 Proposed fix: Remove redundant onClick
<Link to="/settings"> - <div className="insight-card info p-4 cursor-pointer hover:bg-black/40 transition-colors" onClick={() => navigate("/settings")}> + <div className="insight-card info p-4 cursor-pointer hover:bg-black/40 transition-colors"> <div className="flex items-center gap-3 mb-2"> <Edit className="h-5 w-5" /> <h3 className="font-semibold text-warm-white">Full Settings Page</h3> </div> <p className="text-sm text-muted-foreground">Access all settings, integrations, and preferences</p> </div> </Link>
🤖 Fix all issues with AI agents
In `@apps/forecaster/backend/src/tax/federal.ts`:
- Around line 9-15: Update the import path that brings in calculateFederal,
FederalTaxInput, FederalTaxResult, and FilingStatus from Cyrano: change the
relative path used in the import (currently
'../../../../Cyrano/src/modules/forecast/formulas/tax-formulas.js') to go five
levels up so it resolves to the repository root (use
'../../../../../Cyrano/src/modules/forecast/formulas/tax-formulas.js') so the
calculateFederal and related types import correctly.
In `@Cyrano/src/modules/forecast/formulas/tax-formulas.ts`:
- Around line 437-542: The request schema currently uses z.any() for
forecast_input, allowing invalid data to reach calculateFederal; define a Zod
schema named FederalTaxInputSchema mirroring the FederalTaxInput TS shape
(require year, filingStatus, wages and validate optional numeric fields like
selfEmploymentIncome, interestIncome, dividendIncome, capitalGains, otherIncome,
estimatedWithholding, itemizedDeductions, qualifyingChildrenUnder17,
otherDependents, filerAge, spouseAge and booleans like canBeClaimedAsDependent),
replace ForecastHttpRequestSchema.forecast_input's z.any() with z.lazy(() =>
FederalTaxInputSchema) (or the schema directly), and update the http-bridge
handler to parse/transform numeric strings to numbers via .transform or .refine
before calling calculateFederal so calculateFederal always receives validated,
typed input.
🧹 Nitpick comments (2)
Cyrano/src/modules/forecast/formulas/tax-formulas.ts (1)
332-348: Both branches are identical - the conditional serves no purpose.The
ifbranch (lines 336-340) andelsebranch (lines 343-347) perform exactly the same operation - summing optional credit values. The comment claims "Auto-compute credits" but no automatic computation occurs; both paths just sum whatever credits are provided.♻️ Proposed fix: Remove redundant branching
- // Calculate credits (use provided credits if available, otherwise compute automatically) - let credits = 0; - if (input.credits && (input.credits.earnedIncomeCredit !== undefined || input.credits.childTaxCredit !== undefined)) { - // Use provided credits - credits = - (input.credits.earnedIncomeCredit || 0) + - (input.credits.childTaxCredit || 0) + - (input.credits.educationCredit || 0) + - (input.credits.otherCredits || 0); - } else { - // Auto-compute credits (simplified - would need additional input fields for full computation) - credits = - (input.credits?.earnedIncomeCredit || 0) + - (input.credits?.childTaxCredit || 0) + - (input.credits?.educationCredit || 0) + - (input.credits?.otherCredits || 0); - } + // Sum provided credits + const credits = + (input.credits?.earnedIncomeCredit || 0) + + (input.credits?.childTaxCredit || 0) + + (input.credits?.educationCredit || 0) + + (input.credits?.otherCredits || 0);Cyrano/src/http-bridge.ts (1)
1113-1115: Credit field mappings correctly reference the newcreditsBreakdownstructure.The field names
earnedIncomeCreditRefundableandadditionalChildTaxCreditRefundablecorrectly match theFederalTaxResult.creditsBreakdownstructure fromtax-formulas.ts.Minor consideration on line 1115: Using
||for the fallback means ifcalculated?.totalPaymentsis0, it will usewithholdinginstead. This is likely fine sincetotalPayments = withholding + refundableCredits, so a zerototalPaymentsimplies zerowithholdinganyway. However, if you want to preserve explicit zero values, consider using??(nullish coalescing) instead:- totalPayments: Number(calculated?.totalPayments || withholding), + totalPayments: Number(calculated?.totalPayments ?? withholding),
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
Cyrano/src/http-bridge.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/tax/federal.tsapps/lexfiat/client/src/App.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/client/src/pages/todays-focus.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/package.json
🧰 Additional context used
📓 Path-based instructions (27)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Use ES module syntax with.jsextensions in imports (for TypeScript)
Use PascalCase for class names (e.g.,BaseEngine)
Use camelCase for function and variable names (e.g.,executeWorkflow)
Sanitize outputs to prevent XSS vulnerabilitiesNo
anytypes or unsafe casts are permitted in TypeScript codeFor TypeScript/Node.js same-codebase integrations, use direct import pattern with proper error handling and consider connection pooling for resource-intensive operations
**/*.{ts,tsx}: All imported code MUST be used - verify through grep for actual usage after import statements
Dead code must be identified and deleted immediately - any unused code, unused services, and unused configuration must be removed before approval
**/*.{ts,tsx}: Skills architecture must support domain categorization (forensic-finance, legal-reasoning, case-management, etc.) and align with domain-specific proficiencies
Skills must be designed for autonomous application within their domains - no manual invocation required
Skills must align with domain-specific engines - ensure skills architecture enables seamless integration with domain-appropriate execution engines
Never approve 'autonomous' features that require manual invocation - autonomy means automatic application without user action
Never approve 'invisible' features that require explicit user action - invisibility means automatic operation without requiring user invocation
**/*.{ts,tsx}: Ensure consistent use of Zod and Drizzle types across the codebase
Replace incomplete stubs, dummies, and placeholders with functional implementations
Enforce strong typing throughout the codebase and requirez.inferfor type derivation from Zod schemas
Require runtime validation at all boundaries using Zod schemas for HTTP requests, query parameters, path parameters, headers, environment variables, and external service responses
Avoidanytypes except at carefully documented boundaries
Ensure imports and exports match N...
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxCyrano/src/http-bridge.tsapps/lexfiat/client/src/pages/onboarding.tsxapps/forecaster/backend/src/tax/federal.tsapps/lexfiat/client/src/pages/todays-focus.tsxCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
{LexFiat,apps}/**/*.{tsx,ts}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
React components should use Radix UI and Lucide React icons for consistent UI
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/forecaster/backend/src/tax/federal.tsapps/lexfiat/client/src/pages/todays-focus.tsxapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
{LexFiat,apps}/**/*.{tsx,css}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use Tailwind CSS 4 for styling in React applications
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/todays-focus.tsxapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
{LexFiat,apps}/**/*.tsx
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
{LexFiat,apps}/**/*.tsx: Use TanStack Query (React Query) for state management in React applications
Use Wouter for routing in React applications
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/todays-focus.tsxapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
**/*.{ts,tsx,js,jsx,py,java,go,rb,php}
📄 CodeRabbit inference engine (.cursor/rules/auditor-general-agent.mdc)
**/*.{ts,tsx,js,jsx,py,java,go,rb,php}: Base all audit conclusions exclusively on verifiable code evidence, not documentation claims or assertions
Verify every claim by examining actual code execution, test results, and data structures
Examine all code files including tools, modules, engines, workflows, routines, services, and routes for real implementations versus stubs/placeholders
Check for real API calls and actual logic, not mocks, placeholders, or throw statements
Distinguish between fully implemented code, partially implemented code, code that is only documented but not implemented, and mock/placeholder code
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxCyrano/src/http-bridge.tsapps/lexfiat/client/src/pages/onboarding.tsxapps/forecaster/backend/src/tax/federal.tsapps/lexfiat/client/src/pages/todays-focus.tsxCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
**/*.{js,ts,tsx,jsx,py,java,cs,go,rb,php}
📄 CodeRabbit inference engine (.cursor/rules/inquisitor-agent.mdc)
Every function must be examined for correctness, efficiency, and error handling
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxCyrano/src/http-bridge.tsapps/lexfiat/client/src/pages/onboarding.tsxapps/forecaster/backend/src/tax/federal.tsapps/lexfiat/client/src/pages/todays-focus.tsxCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
**/*.{ts,tsx,java,cs,go}
📄 CodeRabbit inference engine (.cursor/rules/inquisitor-agent.mdc)
Every type must be verified for correctness and completeness
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxCyrano/src/http-bridge.tsapps/lexfiat/client/src/pages/onboarding.tsxapps/forecaster/backend/src/tax/federal.tsapps/lexfiat/client/src/pages/todays-focus.tsxCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
**/*.{js,ts,tsx,jsx,py,java,cs}
📄 CodeRabbit inference engine (.cursor/rules/inquisitor-agent.mdc)
**/*.{js,ts,tsx,jsx,py,java,cs}: All real API calls must be implemented; mock data and stubs are not acceptable for production code
Every tool, module, engine, and service must have a corresponding test file with passing tests; missing tests are immediate failures
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxCyrano/src/http-bridge.tsapps/lexfiat/client/src/pages/onboarding.tsxapps/forecaster/backend/src/tax/federal.tsapps/lexfiat/client/src/pages/todays-focus.tsxCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
**/*.{js,ts,tsx,jsx,py,java,cs,go}
📄 CodeRabbit inference engine (.cursor/rules/inquisitor-agent.mdc)
Every component must have comprehensive error handling that is verified to work, not bare throw statements
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxCyrano/src/http-bridge.tsapps/lexfiat/client/src/pages/onboarding.tsxapps/forecaster/backend/src/tax/federal.tsapps/lexfiat/client/src/pages/todays-focus.tsxCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
**/*.{js,ts,tsx,jsx}
📄 CodeRabbit inference engine (.cursor/rules/LEVEL_SET_REPORT_2025-12-29.md)
Update agent references in code comments when agent names change during refactoring activities
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxCyrano/src/http-bridge.tsapps/lexfiat/client/src/pages/onboarding.tsxapps/forecaster/backend/src/tax/federal.tsapps/lexfiat/client/src/pages/todays-focus.tsxCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/codebase-housekeeper-agent.mdc)
**/*.{js,ts,jsx,tsx}: Remove dead code including unused functions, classes, commented-out code blocks, unreachable code paths, and dead imports
Remove stubs and incomplete implementations that are no longer needed, including TODO comments for removed features and placeholder functions
Remove debug code, test code in main files, and development-only code from production source files
Fix broken imports and update cross-references after file moves, deletions, or consolidations
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxCyrano/src/http-bridge.tsapps/lexfiat/client/src/pages/onboarding.tsxapps/forecaster/backend/src/tax/federal.tsapps/lexfiat/client/src/pages/todays-focus.tsxCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/compliance-enforcement-agent.mdc)
**/*.{ts,tsx,js,jsx}: Enforce OWASP Top 10 compliance: A02:2021 – Cryptographic Failures - Verify encryption at rest and in transit, check key management, and verify secure algorithms
Enforce OWASP Top 10 compliance: A03:2021 – Injection - Prevent SQL injection, command injection, and implement input validation and sanitization
Enforce OWASP Top 10 compliance: A07:2021 – Authentication Failures - Implement secure authentication, session management, and password policies
Enforce OWASP Top 10 compliance: A09:2021 – Security Logging Failures - Implement security event logging, ensure log integrity, and establish log analysis procedures
Enforce OWASP Top 10 compliance: A10:2021 – Server-Side Request Forgery - Implement SSRF prevention, input validation, and network segmentation
Implement HIPAA Technical Safeguards: Access Control - Require unique user identification, emergency access procedures, automatic logoff, and encryption/decryption
Implement HIPAA Technical Safeguards: Audit Controls - Log all access to ePHI, all modifications, and all deletions
Implement HIPAA Technical Safeguards: Integrity - Ensure ePHI is not improperly altered or destroyed through integrity controls
Implement HIPAA Technical Safeguards: Transmission Security - Encrypt all data in transit and implement integrity controls
Validate all user inputs - Apply type checking, enforce length limits, and validate input format
Implement secure password storage using bcrypt or argon2 algorithms
Implement secure session management with session expiration, CSRF protection, and rate limiting on authentication endpoints
Implement authorization checks before access and enforce least privilege access control using role-based access control
Encrypt sensitive data at rest and in transit using strong encryption algorithms with securely managed encryption keys
Prevent information disclosure in error messages - Use generic error messages for users while logging detailed errors securely
Log security events and acc...
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxCyrano/src/http-bridge.tsapps/lexfiat/client/src/pages/onboarding.tsxapps/forecaster/backend/src/tax/federal.tsapps/lexfiat/client/src/pages/todays-focus.tsxCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/external-integrations-agent.mdc)
**/*.{ts,tsx,js}: Implement retry logic with exponential backoff for MCP Protocol and HTTP API calls (3 attempts minimum with exponential backoff delays)
Implement circuit breaker pattern for repeated failures (open after 5 failures in 60 seconds)
Implement timeout handling for API calls (30s timeout for API calls, 5s for health checks)
Implement graceful error handling for integrations with user-friendly error messages distinguishing between network errors, service unavailability, and other failure types
Use connection pooling and request batching to optimize performance for HTTP REST API integrations
Implement connection health monitoring and automatic reconnection mechanisms for resilient external integrations
Ensure HTTP API integrations use AbortSignal timeout for requests to prevent hanging connections
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxCyrano/src/http-bridge.tsapps/lexfiat/client/src/pages/onboarding.tsxapps/forecaster/backend/src/tax/federal.tsapps/lexfiat/client/src/pages/todays-focus.tsxCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
apps/{lexfiat/client,arkiver/frontend}/src/**/*.{tsx,ts,css}
📄 CodeRabbit inference engine (.cursor/rules/frontend-development-agent.mdc)
Implement responsive design using a mobile-first approach with standard breakpoints: Mobile < 640px, Tablet 640px-1024px, Desktop > 1024px. Ensure touch targets are minimum 44x44px
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/todays-focus.tsxapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
apps/{lexfiat/client,arkiver/frontend}/src/{components,pages}/**/*.{tsx,ts}
📄 CodeRabbit inference engine (.cursor/rules/frontend-development-agent.mdc)
Optimize frontend performance: implement code splitting by route, lazy load images and heavy components, optimize bundle size, use React.memo for expensive components, and debounce/throttle user interactions. Target metrics: FCP < 1.5s, TTI < 3.5s, LCP < 2.5s, CLS < 0.1
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/todays-focus.tsxapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsx
**/*.{ts,tsx,js,jsx,json,yml,yaml}
📄 CodeRabbit inference engine (.cursor/rules/skills-architect-agent.mdc)
Verify all configuration will be set before defining it - don't create configuration that won't be used
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/package.jsonapps/lexfiat/client/src/components/dashboard/profile-panel.tsxCyrano/src/http-bridge.tsapps/lexfiat/client/src/pages/onboarding.tsxapps/forecaster/backend/src/tax/federal.tsapps/lexfiat/client/src/pages/todays-focus.tsxCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts}
📄 CodeRabbit inference engine (.cursor/rules/frontend-development-agent.mdc)
apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts}: React components should follow existing component patterns and use shadcn/ui components where appropriate, ensuring TypeScript type safety and maintaining component documentation
Ensure WCAG 2.1 AA compliance with minimum 4.5:1 color contrast for text, keyboard navigation support, screen reader compatibility, and proper ARIA labels and roles
Use Tailwind responsive classes for mobile-first CSS, implement proper focus indicators for keyboard navigation, and ensure dark theme consistency through theme provider integration
Reuse existing components from the component library when possible, create new components following the design system, and document component props and usage examples
Implement loading states, skeleton screens, optimistic updates, and smooth animations to enhance user-perceived performance
Files:
apps/lexfiat/client/src/components/dashboard/profile-panel.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsx
apps/{lexfiat/client,arkiver/frontend}/src/{components,styles}/**/*.{tsx,ts,css}
📄 CodeRabbit inference engine (.cursor/rules/frontend-development-agent.mdc)
Maintain design system consistency including color palette (warm-white, accent-gold, aqua, alert-red, etc.), typography, spacing using 8px/4px grid system, and icon usage consistency
Files:
apps/lexfiat/client/src/components/dashboard/profile-panel.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsx
Cyrano/src/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use kebab-case for file names (e.g.,
base-tool.ts)
Files:
Cyrano/src/http-bridge.tsCyrano/src/modules/forecast/formulas/tax-formulas.ts
Cyrano/src/**/*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Cyrano/src/**/*.ts: Use structured error responses and sanitize errors for security
Use Zod schemas for input validation
Validate all user inputs with Zod schemas
Use parameterized queries for database operations
Files:
Cyrano/src/http-bridge.tsCyrano/src/modules/forecast/formulas/tax-formulas.ts
**/*.ts
📄 CodeRabbit inference engine (.cursor/rules/ethics-enforcement-agent.mdc)
Inject Ten Rules into tool-specific prompts and adapt rules to tool context for all AI-calling tools
Code must maintain TypeScript strict mode compliance
**/*.ts: Identify and eliminate PLACEHOLDER and TODO comments that block actual functionality in TypeScript implementations
Verify that tool registrations in tool composition and engine workflows match the actual tool files in the codebase
Remove mock implementations and mock fallbacks from tools, modules, and engines - use real implementations or error when credentials are unavailable
Verify error handling functions correctly when required credentials or API dependencies are missing, returning appropriate error messages instead of mock data
Files:
Cyrano/src/http-bridge.tsapps/forecaster/backend/src/tax/federal.tsCyrano/src/modules/forecast/formulas/tax-formulas.ts
**/http-bridge.ts
📄 CodeRabbit inference engine (.cursor/rules/architect-agent.mdc)
Tools must be registered in
http-bridge.ts/mcp/toolsendpoint for HTTP bridge support
Files:
Cyrano/src/http-bridge.ts
{Cyrano/src/integrations/**,apps/*/client/src/lib/cyrano-api.ts,Cyrano/src/http-bridge.ts,Cyrano/src/mcp-server.ts}
📄 CodeRabbit inference engine (.cursor/rules/external-integrations-agent.mdc)
Store integration code in
Cyrano/src/integrations/directory, client integration code inapps/*/client/src/lib/cyrano-api.ts, HTTP bridge inCyrano/src/http-bridge.ts, and MCP server inCyrano/src/mcp-server.ts
Files:
Cyrano/src/http-bridge.ts
Cyrano/src/http-bridge.ts
📄 CodeRabbit inference engine (.cursor/rules/mcp-tool-development-agent.mdc)
Register all tools in Cyrano/src/http-bridge.ts to ensure HTTP bridge compatibility
Files:
Cyrano/src/http-bridge.ts
Cyrano/src/modules/**/*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Modules must extend BaseModule and define constructor with name, description, and version properties
Test module actions and verify that module tool composition correctly chains tools together with proper error handling
Files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
**/modules/**/*
📄 CodeRabbit inference engine (.cursor/rules/architect-agent.mdc)
Module resources and prompts must be self-contained within the module directory
Files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
Cyrano/src/{tools,modules,engines,services}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/internal-integration-agent.mdc)
Cyrano/src/{tools,modules,engines,services}/**/*.{ts,tsx}: Verify all components inCyrano/src/tools/,Cyrano/src/modules/,Cyrano/src/engines/, andCyrano/src/services/are integrated before approval
All components MUST be seamlessly integrated with Pathfinder - verify automatic, invisible integration without manual user invocation required
All components MUST be seamlessly integrated with workflows - verify automatic application in workflow execution without manual invocation
Files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
🧠 Learnings (21)
📓 Common learnings
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to {LexFiat,apps}/**/*.tsx : Use Wouter for routing in React applications
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/frontend-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:04:50.672Z
Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/{components,pages}/**/*.{tsx,ts} : Optimize frontend performance: implement code splitting by route, lazy load images and heavy components, optimize bundle size, use React.memo for expensive components, and debounce/throttle user interactions. Target metrics: FCP < 1.5s, TTI < 3.5s, LCP < 2.5s, CLS < 0.1
📚 Learning: 2025-12-13T11:47:19.287Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to {LexFiat,apps}/**/*.tsx : Use Wouter for routing in React applications
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/package.jsonapps/lexfiat/client/src/components/dashboard/profile-panel.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/todays-focus.tsxapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
📚 Learning: 2026-01-07T00:04:50.672Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/frontend-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:04:50.672Z
Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/{components,pages}/**/*.{tsx,ts} : Optimize frontend performance: implement code splitting by route, lazy load images and heavy components, optimize bundle size, use React.memo for expensive components, and debounce/throttle user interactions. Target metrics: FCP < 1.5s, TTI < 3.5s, LCP < 2.5s, CLS < 0.1
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/package.jsonapps/lexfiat/client/src/components/dashboard/profile-panel.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/todays-focus.tsxapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
📚 Learning: 2026-01-07T00:04:50.672Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/frontend-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:04:50.672Z
Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts} : Implement loading states, skeleton screens, optimistic updates, and smooth animations to enhance user-perceived performance
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/todays-focus.tsxapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
📚 Learning: 2026-01-07T00:04:50.672Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/frontend-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:04:50.672Z
Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts} : Use Tailwind responsive classes for mobile-first CSS, implement proper focus indicators for keyboard navigation, and ensure dark theme consistency through theme provider integration
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/package.jsonapps/lexfiat/client/src/components/dashboard/profile-panel.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/todays-focus.tsxapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
📚 Learning: 2026-01-07T00:04:50.672Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/frontend-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:04:50.672Z
Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts} : React components should follow existing component patterns and use shadcn/ui components where appropriate, ensuring TypeScript type safety and maintaining component documentation
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/package.jsonapps/lexfiat/client/src/components/dashboard/profile-panel.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/todays-focus.tsxapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
📚 Learning: 2026-01-07T00:04:50.672Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/frontend-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:04:50.672Z
Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts} : Reuse existing components from the component library when possible, create new components following the design system, and document component props and usage examples
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/todays-focus.tsxapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
📚 Learning: 2026-01-07T00:04:50.672Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/frontend-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:04:50.672Z
Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts} : Ensure WCAG 2.1 AA compliance with minimum 4.5:1 color contrast for text, keyboard navigation support, screen reader compatibility, and proper ARIA labels and roles
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/components/dashboard/profile-panel.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/todays-focus.tsxapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
📚 Learning: 2025-12-13T11:47:19.287Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to {LexFiat,apps}/**/*.{tsx,ts} : React components should use Radix UI and Lucide React icons for consistent UI
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/package.jsonapps/lexfiat/client/src/components/dashboard/profile-panel.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/todays-focus.tsxapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/App.tsx
📚 Learning: 2025-12-13T11:47:19.287Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to {LexFiat,apps}/**/*.{tsx,css} : Use Tailwind CSS 4 for styling in React applications
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/package.jsonapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/todays-focus.tsxapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/App.tsx
📚 Learning: 2026-01-07T00:04:50.672Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/frontend-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:04:50.672Z
Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/{components,styles}/**/*.{tsx,ts,css} : Maintain design system consistency including color palette (warm-white, accent-gold, aqua, alert-red, etc.), typography, spacing using 8px/4px grid system, and icon usage consistency
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsx
📚 Learning: 2025-12-13T11:47:19.287Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to {LexFiat,apps}/**/*.tsx : Use TanStack Query (React Query) for state management in React applications
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/package.jsonapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/todays-focus.tsxapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/dashboard.tsxapps/lexfiat/client/src/components/dashboard/settings-panel.tsxapps/lexfiat/client/src/App.tsx
📚 Learning: 2026-01-07T00:03:06.043Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/codebase-housekeeper-agent.mdc:0-0
Timestamp: 2026-01-07T00:03:06.043Z
Learning: Applies to package.json : Remove unused npm packages and update package.json dependency references accordingly
Applied to files:
apps/lexfiat/package.json
📚 Learning: 2026-01-07T00:05:08.130Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/functional-assessment-agent.mdc:0-0
Timestamp: 2026-01-07T00:05:08.130Z
Learning: Applies to Cyrano/src/tools/document-processor.ts : Verify PDF form filling, Forecast branding, and redaction functionality are fully implemented and not mocked
Applied to files:
Cyrano/src/http-bridge.ts
📚 Learning: 2026-01-07T00:04:38.695Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/external-integrations-agent.mdc:0-0
Timestamp: 2026-01-07T00:04:38.695Z
Learning: Applies to {Cyrano/src/integrations/**,apps/*/client/src/lib/cyrano-api.ts,Cyrano/src/http-bridge.ts,Cyrano/src/mcp-server.ts} : Store integration code in `Cyrano/src/integrations/` directory, client integration code in `apps/*/client/src/lib/cyrano-api.ts`, HTTP bridge in `Cyrano/src/http-bridge.ts`, and MCP server in `Cyrano/src/mcp-server.ts`
Applied to files:
Cyrano/src/http-bridge.ts
📚 Learning: 2026-01-07T00:05:08.130Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/functional-assessment-agent.mdc:0-0
Timestamp: 2026-01-07T00:05:08.130Z
Learning: Applies to Cyrano/src/tools/**/*.ts : Verify external integrations (Clio, Gmail, Outlook, MiCourt) are fully implemented with real API calls, not mock implementations
Applied to files:
Cyrano/src/http-bridge.ts
📚 Learning: 2026-01-07T00:06:24.911Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/mcp-tool-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:06:24.911Z
Learning: Applies to Cyrano/src/http-bridge.ts : Register all tools in Cyrano/src/http-bridge.ts to ensure HTTP bridge compatibility
Applied to files:
Cyrano/src/http-bridge.ts
📚 Learning: 2026-01-07T00:05:08.130Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/functional-assessment-agent.mdc:0-0
Timestamp: 2026-01-07T00:05:08.130Z
Learning: Applies to Cyrano/src/tools/pdf-form-filler.ts : Test PDF form filling end-to-end to verify it correctly populates form fields and handles edge cases
Applied to files:
Cyrano/src/http-bridge.ts
📚 Learning: 2026-01-07T00:03:06.043Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/codebase-housekeeper-agent.mdc:0-0
Timestamp: 2026-01-07T00:03:06.043Z
Learning: Applies to **/*.{js,ts,jsx,tsx} : Fix broken imports and update cross-references after file moves, deletions, or consolidations
Applied to files:
apps/lexfiat/client/src/pages/todays-focus.tsx
📚 Learning: 2025-12-28T22:59:29.530Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/ethics-enforcement-agent.mdc:0-0
Timestamp: 2025-12-28T22:59:29.530Z
Learning: Applies to **/*ethics*dashboard*.{ts,tsx} : Implement ethics dashboard to track compliance scores, monitor rule violations, show compliance trends, and provide transparency
Applied to files:
apps/lexfiat/client/src/components/dashboard/settings-panel.tsx
📚 Learning: 2026-01-07T18:31:56.046Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/bulletproofing-agent.mdc:0-0
Timestamp: 2026-01-07T18:31:56.046Z
Learning: Applies to **/{routes,controllers,services}/**/*.{ts,tsx} : Use modular Router instances and maintain clear separation between routes, controllers, and services in Express
Applied to files:
apps/lexfiat/client/src/App.tsx
🧬 Code graph analysis (3)
Cyrano/src/http-bridge.ts (1)
Cyrano/src/modules/forecast/formulas/tax-formulas.ts (1)
calculateFederal(437-542)
Cyrano/src/modules/forecast/formulas/tax-formulas.ts (1)
apps/forecaster/backend/src/tax/federal.ts (4)
FilingStatus(18-18)FederalTaxInput(18-18)FederalTaxResult(18-18)calculateFederal(19-19)
apps/lexfiat/client/src/components/dashboard/settings-panel.tsx (1)
apps/lexfiat/client/src/components/theme/theme-provider.tsx (1)
useTheme(62-68)
🪛 Biome (2.1.2)
apps/lexfiat/client/src/pages/settings.tsx
[error] 17-17: Shouldn't redeclare 'Link'. Consider to delete it or rename it.
'Link' is defined here:
(lint/suspicious/noRedeclare)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (17)
apps/lexfiat/client/src/pages/performance.tsx (2)
9-9: Routing library migration contradicts established guidelines.The retrieved learnings specify "Use Wouter for routing in React applications" for this codebase. This PR migrates to react-router-dom, which deviates from the documented standard.
If this is an intentional architectural decision, please update the coding guidelines in
.github/copilot-instructions.mdand.cursor/rules/frontend-development-agent.mdcto reflect the new routing library choice.Based on learnings, the project guidelines mandate Wouter for routing.
43-45: LGTM!The
Linkcomponent correctly uses thetoprop as expected by react-router-dom, and wrapping theButtoninsideLinkis a valid navigation pattern.apps/lexfiat/client/src/pages/onboarding.tsx (2)
8-8: LGTM!The
useNavigatehook is the correct replacement for wouter'suseLocationwhen performing programmatic navigation in react-router-dom.
74-74: LGTM!The
useNavigatehook initialization and subsequentnavigate('/dashboard')call correctly implement programmatic navigation using react-router-dom's API.Also applies to: 313-313
apps/lexfiat/client/src/components/dashboard/settings-panel.tsx (1)
10-10: LGTM!The navigation implementation correctly uses
useNavigateand properly constructs the URL with optional query parameters for tab routing. ThehandleNavigatehelper maintains the expected behavior of closing the panel after navigation.Also applies to: 21-21, 25-28
apps/lexfiat/dashboard.tsx (1)
3-3: LGTM!The
Linkcomponent import and usage are correctly updated for react-router-dom, using thetoprop instead of wouter'shrefprop.Also applies to: 80-85
apps/lexfiat/client/src/pages/todays-focus.tsx (1)
9-9: LGTM - Routing migration is correct.The migration from wouter's
Linkwithhrefto react-router-dom'sLinkwithtoprop is correctly implemented. The import and usage align with react-router-dom v7 conventions.Note: This change deviates from the coding guideline "Use Wouter for routing in React applications." If this is an intentional migration, consider updating the coding guidelines to reflect the new routing library choice.
Also applies to: 48-50
apps/lexfiat/client/src/App.tsx (1)
2-2: LGTM - Clean react-router-dom migration.The routing setup correctly:
- Uses
BrowserRouteras the top-level router- Wraps routes with
Suspensefor lazy-loaded components- Uses
elementprop (react-router-dom v6+ convention)- Includes wildcard catch-all route for
NotFound- Preserves code-splitting via
lazy()Also applies to: 56-84
apps/lexfiat/client/src/pages/settings.tsx (1)
93-99: Navigation link usage is correct, pending the import collision fix.The
Link to="/"wrapping the back button is correctly migrated to react-router-dom syntax. Once the import collision is resolved, this will work as expected.apps/lexfiat/client/src/components/dashboard/profile-panel.tsx (1)
10-10: LGTM - Import and hook usage are correct.The react-router-dom import with both
LinkanduseNavigateis properly set up. TheuseNavigatehook is correctly initialized at the component level.Also applies to: 27-27
Cyrano/src/modules/forecast/formulas/tax-formulas.ts (3)
175-228: LGTM - Credit constants and helpers are well-structured.The constants for CTC/ODC/ACTC/EITC are properly typed with year-specific records, and the helper functions (
round2,clampKids) are correctly implemented. The documentation citing Tax-Calculator 6.3.0 policy parameters provides good traceability.
233-294: LGTM - EITC computation follows IRS rules correctly.The
computeEitcfunction properly handles:
- MFS ineligibility with appropriate warning
- Investment income limit checks
- Age/dependency rules for 0-kid EITC
- Phase-in and phase-out calculations with married filing joint addon
The warnings array mutation pattern is appropriate for collecting eligibility messages.
382-430: LGTM - Interfaces align with backend for cross-module compatibility.The
FederalTaxInputandFederalTaxResultinterfaces match the backend's structure (as shown in relevant code snippets), enabling consistent tax calculation across the Cyrano module and apps/forecaster/backend.apps/forecaster/backend/src/tax/federal.ts (1)
17-19: Clean re-export structure for backward compatibility.The re-export pattern correctly maintains the existing API surface while centralizing the implementation in Cyrano's shared module. This ensures existing consumers of
calculateFederal,FederalTaxInput,FederalTaxResult, andFilingStatuscontinue to work without changes.Cyrano/src/http-bridge.ts (3)
1052-1054: Calculation source correctly updated to use centralizedcalculateFederal.The switch to
calculateFederalfromtax-formulas.jscentralizes the tax calculation logic and ensures consistent credit calculations (CTC/ODC/ACTC/EITC) across both the standalone backend and HTTP bridge.Note: The dynamic import pattern is used here, which aligns with the lazy-loading approach documented at the top of this file. Node.js caches modules after the first import, so subsequent requests will not incur the full import overhead.
1081-1084: PDF endpoint correctly delegates calculation tocalculateFederal.This maintains the separation of concerns:
calculateFederalhandles the tax computation with complete credit calculations, whiletaxForecastModule(imported later at line 1122) handles the PDF generation. The consistent use of the same calculation source between/api/forecast/taxand/api/forecast/tax/pdfensures numerical consistency.
1122-1123: Correct separation: PDF generation remains withtaxForecastModule.The
taxForecastModuleis now used solely for itsgenerate_pdfaction, while all tax calculations are handled bycalculateFederal. This cleanly separates computation from presentation/rendering concerns.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
…safety warnings - Added tax brackets, standard deductions, and Social Security wage base for 2018-2022 - Added complete CTC/ODC/ACTC credit calculations for 2018-2022 - Added complete EITC credit calculations for 2018-2022 (including 2021 enhanced EITC) - Updated FederalTaxInput and FederalTaxResult interfaces to support 2018-2025 - Updated standalone backend validation schema to accept 2018-2025 - Enhanced safety warning messages to emphasize user sovereignty and risk assumption - Updated all warning dialogs to clearly state: 'LexFiat Forecaster simulates tax prep software - outputs are consistent with applicable law but NOT intended for actual tax preparation. These are SIMULATIONS for litigation and planning purposes only. Exercising full sovereignty means assuming full risk.' - Updated Forecast Engine error messages to match enhanced safety requirements - All versions now support tax years 2018-2025 with complete credit calculations
- Removed all-caps and second-person language from warning dialogs - Updated messages to professional, third-person tone appropriate for legal professionals - Fixed syntax errors (extra closing braces/parentheses) in multiple files - Warning messages now state: 'LexFiat Forecaster simulates tax preparation software. Outputs are consistent with applicable law and tax formulas, but are not intended for actual tax preparation. These forecasts are for litigation and planning purposes only. The user assumes responsibility for any consequences of using unlabeled outputs.'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
Cyrano/src/engines/forecast/forecast-engine.ts (1)
543-546: Remove orphan closing braces causing syntax error.The file contains 4 stray closing braces after the export statement that cause the pipeline failure. The class already closes properly at line 537.
🐛 Proposed fix
// Export singleton instance export const forecastEngine = new ForecastEngine(); - - -} -} -} -}apps/forecaster/backend/src/index.ts (1)
256-260: Critical: Syntax errors - orphan closing parentheses will break compilation.Lines 257-260 contain orphan
)characters that are not associated with any function or expression. This will cause a TypeScript/JavaScript syntax error and the backend will fail to compile or run.🐛 Proposed fix: Remove orphan characters
const port = Number(process.env.PORT || 3000); app.listen(port, () => { // eslint-disable-next-line no-console console.log(`✅ Forecaster backend listening on http://localhost:${port}`); }); - - -) -) -) -)apps/forecaster/frontend/src/pages/TaxForecast.tsx (1)
506-508: Critical: Syntax errors - orphan closing braces/parentheses will break compilation.Lines 506-508 contain orphan
}and)characters that are not associated with any function or expression. This will cause the frontend to fail to compile.🐛 Proposed fix: Remove orphan characters
</div> ); } - - -} -)
♻️ Duplicate comments (1)
Cyrano/src/modules/forecast/formulas/tax-formulas.ts (1)
493-512: FederalTaxInput lacks runtime Zod validation (previously flagged).This is a duplicate of the past review comment. The
FederalTaxInputinterface provides compile-time typing but no runtime validation schema. Per coding guidelines, boundaries should use Zod schemas for runtime validation. The http-bridge currently usesz.any()forforecast_input.
🧹 Nitpick comments (5)
apps/forecaster/backend/src/index.ts (2)
54-61: Avoidanytype cast for error statusCode.Per coding guidelines,
anytypes are not permitted. The pattern(err as any).statusCodeis used here and repeated elsewhere in this file (lines 108, 156, 197, 245).♻️ Proposed fix: Define a typed error interface
+interface HttpError extends Error { + statusCode?: number; +} + +function isHttpError(err: unknown): err is HttpError { + return err instanceof Error && 'statusCode' in err; +} + function requireRiskAck(mode: PresentationMode, riskAcknowledged: boolean | undefined) { if (mode !== 'none') return; if (!riskAcknowledged) { - const err = new Error('Risk acknowledgement required to remove the advisory/branding.'); - (err as any).statusCode = 400; + const err: HttpError = new Error('Risk acknowledgement required to remove the advisory/branding.'); + err.statusCode = 400; throw err; } }Then update the error handlers to use the type guard:
} catch (err) { const status = isHttpError(err) ? err.statusCode ?? 500 : 500; res.status(status).json({ success: false, error: err instanceof Error ? err.message : 'Unknown error' }); }
21-21: Review CORS configuration for security.The current
cors()call uses default settings which allow requests from any origin. Per OWASP guidelines, CORS should be configured with explicit allowed origins, especially for an API handling financial data.♻️ Proposed fix: Configure CORS with explicit origins
-app.use(cors()); +app.use(cors({ + origin: process.env.ALLOWED_ORIGINS?.split(',') || ['http://localhost:5173'], + credentials: true, +}));apps/forecaster/frontend/src/pages/TaxForecast.tsx (2)
27-27: Replaceanytype with proper typing for result state.Per coding guidelines,
anytypes are not permitted in TypeScript code. The result state should use the actual response type from the API.♻️ Proposed fix: Define and use proper type
+interface TaxForecastResult { + success: boolean; + error?: string; + forecastType?: string; + calculatedValues?: { + warnings?: string[]; + [key: string]: unknown; + }; + brandingApplied?: boolean; + presentationMode?: 'strip' | 'watermark' | 'none'; +} + export default function TaxForecast() { // ... - const [result, setResult] = useState<any>(null); + const [result, setResult] = useState<TaxForecastResult | null>(null);
444-456: Add timeout handling for fetch request.Per coding guidelines, HTTP API calls should use
AbortSignaltimeout to prevent hanging connections. The current fetch call has no timeout protection.♻️ Proposed fix: Add AbortSignal timeout
const resp = await fetch(`${apiBase}/api/forecast/tax/pdf`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, + signal: AbortSignal.timeout(30000), // 30s timeout per guidelines body: JSON.stringify({ forecast_input: request, branding: { presentationMode: brandingMode, userRole: 'other', licensedInAny: false, riskAcknowledged: brandingMode === 'none', }, }), });Cyrano/src/modules/forecast/formulas/tax-formulas.ts (1)
443-459: Dead code: Auto-compute credits branch has identical logic to provided credits branch.The comment says "Auto-compute credits" but both branches execute the same logic - summing the optional credit values from
input.credits. The auto-computation mentioned in the comment and AI summary does not actually occur incalculateTax(). The real auto-computation is incalculateFederal()(lines 575-620).Either remove the misleading comment and simplify, or implement actual auto-computation if intended for this function.
♻️ Proposed fix: Simplify to single logic path
- // Calculate credits (use provided credits if available, otherwise compute automatically) - let credits = 0; - if (input.credits && (input.credits.earnedIncomeCredit !== undefined || input.credits.childTaxCredit !== undefined)) { - // Use provided credits - credits = - (input.credits.earnedIncomeCredit || 0) + - (input.credits.childTaxCredit || 0) + - (input.credits.educationCredit || 0) + - (input.credits.otherCredits || 0); - } else { - // Auto-compute credits (simplified - would need additional input fields for full computation) - credits = - (input.credits?.earnedIncomeCredit || 0) + - (input.credits?.childTaxCredit || 0) + - (input.credits?.educationCredit || 0) + - (input.credits?.otherCredits || 0); - } + // Sum provided credits + const credits = + (input.credits?.earnedIncomeCredit || 0) + + (input.credits?.childTaxCredit || 0) + + (input.credits?.educationCredit || 0) + + (input.credits?.otherCredits || 0);
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
Cyrano/src/engines/forecast/forecast-engine.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/index.tsapps/forecaster/frontend/src/pages/CityTaxForecast.tsxapps/forecaster/frontend/src/pages/TaxForecast.tsx
✅ Files skipped from review due to trivial changes (1)
- apps/forecaster/frontend/src/pages/CityTaxForecast.tsx
🧰 Additional context used
📓 Path-based instructions (24)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Use ES module syntax with.jsextensions in imports (for TypeScript)
Use PascalCase for class names (e.g.,BaseEngine)
Use camelCase for function and variable names (e.g.,executeWorkflow)
Sanitize outputs to prevent XSS vulnerabilitiesNo
anytypes or unsafe casts are permitted in TypeScript codeFor TypeScript/Node.js same-codebase integrations, use direct import pattern with proper error handling and consider connection pooling for resource-intensive operations
**/*.{ts,tsx}: All imported code MUST be used - verify through grep for actual usage after import statements
Dead code must be identified and deleted immediately - any unused code, unused services, and unused configuration must be removed before approval
**/*.{ts,tsx}: Skills architecture must support domain categorization (forensic-finance, legal-reasoning, case-management, etc.) and align with domain-specific proficiencies
Skills must be designed for autonomous application within their domains - no manual invocation required
Skills must align with domain-specific engines - ensure skills architecture enables seamless integration with domain-appropriate execution engines
Never approve 'autonomous' features that require manual invocation - autonomy means automatic application without user action
Never approve 'invisible' features that require explicit user action - invisibility means automatic operation without requiring user invocation
**/*.{ts,tsx}: Ensure consistent use of Zod and Drizzle types across the codebase
Replace incomplete stubs, dummies, and placeholders with functional implementations
Enforce strong typing throughout the codebase and requirez.inferfor type derivation from Zod schemas
Require runtime validation at all boundaries using Zod schemas for HTTP requests, query parameters, path parameters, headers, environment variables, and external service responses
Avoidanytypes except at carefully documented boundaries
Ensure imports and exports match N...
Files:
Cyrano/src/engines/forecast/forecast-engine.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/index.tsapps/forecaster/frontend/src/pages/TaxForecast.tsx
Cyrano/src/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use kebab-case for file names (e.g.,
base-tool.ts)
Files:
Cyrano/src/engines/forecast/forecast-engine.tsCyrano/src/modules/forecast/formulas/tax-formulas.ts
Cyrano/src/**/*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Cyrano/src/**/*.ts: Use structured error responses and sanitize errors for security
Use Zod schemas for input validation
Validate all user inputs with Zod schemas
Use parameterized queries for database operations
Files:
Cyrano/src/engines/forecast/forecast-engine.tsCyrano/src/modules/forecast/formulas/tax-formulas.ts
Cyrano/src/engines/**/*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Cyrano/src/engines/**/*.ts: Engines must extend BaseEngine and define initialize() and execute() methods
Modules must be registered in the engine's initialize() methodTest engine workflows end-to-end and verify that workflow step execution correctly chains module actions with proper error propagation
Files:
Cyrano/src/engines/forecast/forecast-engine.ts
**/*.{ts,tsx,js,jsx,py,java,go,rb,php}
📄 CodeRabbit inference engine (.cursor/rules/auditor-general-agent.mdc)
**/*.{ts,tsx,js,jsx,py,java,go,rb,php}: Base all audit conclusions exclusively on verifiable code evidence, not documentation claims or assertions
Verify every claim by examining actual code execution, test results, and data structures
Examine all code files including tools, modules, engines, workflows, routines, services, and routes for real implementations versus stubs/placeholders
Check for real API calls and actual logic, not mocks, placeholders, or throw statements
Distinguish between fully implemented code, partially implemented code, code that is only documented but not implemented, and mock/placeholder code
Files:
Cyrano/src/engines/forecast/forecast-engine.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/index.tsapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/*.ts
📄 CodeRabbit inference engine (.cursor/rules/ethics-enforcement-agent.mdc)
Inject Ten Rules into tool-specific prompts and adapt rules to tool context for all AI-calling tools
Code must maintain TypeScript strict mode compliance
**/*.ts: Identify and eliminate PLACEHOLDER and TODO comments that block actual functionality in TypeScript implementations
Verify that tool registrations in tool composition and engine workflows match the actual tool files in the codebase
Remove mock implementations and mock fallbacks from tools, modules, and engines - use real implementations or error when credentials are unavailable
Verify error handling functions correctly when required credentials or API dependencies are missing, returning appropriate error messages instead of mock data
Files:
Cyrano/src/engines/forecast/forecast-engine.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/index.ts
**/*.{js,ts,tsx,jsx,py,java,cs,go,rb,php}
📄 CodeRabbit inference engine (.cursor/rules/inquisitor-agent.mdc)
Every function must be examined for correctness, efficiency, and error handling
Files:
Cyrano/src/engines/forecast/forecast-engine.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/index.tsapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/*.{ts,tsx,java,cs,go}
📄 CodeRabbit inference engine (.cursor/rules/inquisitor-agent.mdc)
Every type must be verified for correctness and completeness
Files:
Cyrano/src/engines/forecast/forecast-engine.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/index.tsapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/*.{js,ts,tsx,jsx,py,java,cs}
📄 CodeRabbit inference engine (.cursor/rules/inquisitor-agent.mdc)
**/*.{js,ts,tsx,jsx,py,java,cs}: All real API calls must be implemented; mock data and stubs are not acceptable for production code
Every tool, module, engine, and service must have a corresponding test file with passing tests; missing tests are immediate failures
Files:
Cyrano/src/engines/forecast/forecast-engine.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/index.tsapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/*.{js,ts,tsx,jsx,py,java,cs,go}
📄 CodeRabbit inference engine (.cursor/rules/inquisitor-agent.mdc)
Every component must have comprehensive error handling that is verified to work, not bare throw statements
Files:
Cyrano/src/engines/forecast/forecast-engine.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/index.tsapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/*.{js,ts,tsx,jsx}
📄 CodeRabbit inference engine (.cursor/rules/LEVEL_SET_REPORT_2025-12-29.md)
Update agent references in code comments when agent names change during refactoring activities
Files:
Cyrano/src/engines/forecast/forecast-engine.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/index.tsapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/codebase-housekeeper-agent.mdc)
**/*.{js,ts,jsx,tsx}: Remove dead code including unused functions, classes, commented-out code blocks, unreachable code paths, and dead imports
Remove stubs and incomplete implementations that are no longer needed, including TODO comments for removed features and placeholder functions
Remove debug code, test code in main files, and development-only code from production source files
Fix broken imports and update cross-references after file moves, deletions, or consolidations
Files:
Cyrano/src/engines/forecast/forecast-engine.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/index.tsapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/compliance-enforcement-agent.mdc)
**/*.{ts,tsx,js,jsx}: Enforce OWASP Top 10 compliance: A02:2021 – Cryptographic Failures - Verify encryption at rest and in transit, check key management, and verify secure algorithms
Enforce OWASP Top 10 compliance: A03:2021 – Injection - Prevent SQL injection, command injection, and implement input validation and sanitization
Enforce OWASP Top 10 compliance: A07:2021 – Authentication Failures - Implement secure authentication, session management, and password policies
Enforce OWASP Top 10 compliance: A09:2021 – Security Logging Failures - Implement security event logging, ensure log integrity, and establish log analysis procedures
Enforce OWASP Top 10 compliance: A10:2021 – Server-Side Request Forgery - Implement SSRF prevention, input validation, and network segmentation
Implement HIPAA Technical Safeguards: Access Control - Require unique user identification, emergency access procedures, automatic logoff, and encryption/decryption
Implement HIPAA Technical Safeguards: Audit Controls - Log all access to ePHI, all modifications, and all deletions
Implement HIPAA Technical Safeguards: Integrity - Ensure ePHI is not improperly altered or destroyed through integrity controls
Implement HIPAA Technical Safeguards: Transmission Security - Encrypt all data in transit and implement integrity controls
Validate all user inputs - Apply type checking, enforce length limits, and validate input format
Implement secure password storage using bcrypt or argon2 algorithms
Implement secure session management with session expiration, CSRF protection, and rate limiting on authentication endpoints
Implement authorization checks before access and enforce least privilege access control using role-based access control
Encrypt sensitive data at rest and in transit using strong encryption algorithms with securely managed encryption keys
Prevent information disclosure in error messages - Use generic error messages for users while logging detailed errors securely
Log security events and acc...
Files:
Cyrano/src/engines/forecast/forecast-engine.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/index.tsapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/external-integrations-agent.mdc)
**/*.{ts,tsx,js}: Implement retry logic with exponential backoff for MCP Protocol and HTTP API calls (3 attempts minimum with exponential backoff delays)
Implement circuit breaker pattern for repeated failures (open after 5 failures in 60 seconds)
Implement timeout handling for API calls (30s timeout for API calls, 5s for health checks)
Implement graceful error handling for integrations with user-friendly error messages distinguishing between network errors, service unavailability, and other failure types
Use connection pooling and request batching to optimize performance for HTTP REST API integrations
Implement connection health monitoring and automatic reconnection mechanisms for resilient external integrations
Ensure HTTP API integrations use AbortSignal timeout for requests to prevent hanging connections
Files:
Cyrano/src/engines/forecast/forecast-engine.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/index.tsapps/forecaster/frontend/src/pages/TaxForecast.tsx
Cyrano/src/{tools,modules,engines,services}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/internal-integration-agent.mdc)
Cyrano/src/{tools,modules,engines,services}/**/*.{ts,tsx}: Verify all components inCyrano/src/tools/,Cyrano/src/modules/,Cyrano/src/engines/, andCyrano/src/services/are integrated before approval
All components MUST be seamlessly integrated with Pathfinder - verify automatic, invisible integration without manual user invocation required
All components MUST be seamlessly integrated with workflows - verify automatic application in workflow execution without manual invocation
Files:
Cyrano/src/engines/forecast/forecast-engine.tsCyrano/src/modules/forecast/formulas/tax-formulas.ts
**/*.{ts,tsx,js,jsx,json,yml,yaml}
📄 CodeRabbit inference engine (.cursor/rules/skills-architect-agent.mdc)
Verify all configuration will be set before defining it - don't create configuration that won't be used
Files:
Cyrano/src/engines/forecast/forecast-engine.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/index.tsapps/forecaster/frontend/src/pages/TaxForecast.tsx
Cyrano/src/modules/**/*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Modules must extend BaseModule and define constructor with name, description, and version properties
Test module actions and verify that module tool composition correctly chains tools together with proper error handling
Files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
**/modules/**/*
📄 CodeRabbit inference engine (.cursor/rules/architect-agent.mdc)
Module resources and prompts must be self-contained within the module directory
Files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
{LexFiat,apps}/**/*.{tsx,ts}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
React components should use Radix UI and Lucide React icons for consistent UI
Files:
apps/forecaster/backend/src/index.tsapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/{server,app,index}.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/bulletproofing-agent.mdc)
**/{server,app,index}.{ts,tsx}: Verify Helmet configuration with appropriate security policies
Validate safe CORS configuration in Express
Files:
apps/forecaster/backend/src/index.ts
**/{app,server,index}.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/bulletproofing-agent.mdc)
Avoid embedding business logic in app.ts or server.ts files
Files:
apps/forecaster/backend/src/index.ts
**/{config,env,environment,server,app,index}.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/bulletproofing-agent.mdc)
Validate all environment variables at startup using Zod schemas and ensure required variables are present with clear error messages
Files:
apps/forecaster/backend/src/index.ts
{LexFiat,apps}/**/*.{tsx,css}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use Tailwind CSS 4 for styling in React applications
Files:
apps/forecaster/frontend/src/pages/TaxForecast.tsx
{LexFiat,apps}/**/*.tsx
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
{LexFiat,apps}/**/*.tsx: Use TanStack Query (React Query) for state management in React applications
Use Wouter for routing in React applications
Files:
apps/forecaster/frontend/src/pages/TaxForecast.tsx
🧠 Learnings (9)
📓 Common learnings
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to {LexFiat,apps}/**/*.tsx : Use Wouter for routing in React applications
📚 Learning: 2026-01-07T00:05:08.130Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/functional-assessment-agent.mdc:0-0
Timestamp: 2026-01-07T00:05:08.130Z
Learning: Applies to Cyrano/src/tools/document-processor.ts : Verify PDF form filling, Forecast branding, and redaction functionality are fully implemented and not mocked
Applied to files:
Cyrano/src/engines/forecast/forecast-engine.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/frontend/src/pages/TaxForecast.tsx
📚 Learning: 2026-01-07T00:05:08.130Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/functional-assessment-agent.mdc:0-0
Timestamp: 2026-01-07T00:05:08.130Z
Learning: Applies to Cyrano/src/tools/**/*.ts : Verify external integrations (Clio, Gmail, Outlook, MiCourt) are fully implemented with real API calls, not mock implementations
Applied to files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
📚 Learning: 2026-01-07T00:02:40.822Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/architect-agent.mdc:0-0
Timestamp: 2026-01-07T00:02:40.822Z
Learning: Applies to **/tools/*.ts : All tool inputs must be validated using Zod schemas before processing
Applied to files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
📚 Learning: 2025-12-13T11:47:19.287Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to Cyrano/src/**/*.ts : Validate all user inputs with Zod schemas
Applied to files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
📚 Learning: 2026-01-07T00:06:24.911Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/mcp-tool-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:06:24.911Z
Learning: Applies to Cyrano/src/tools/!(*.test).ts : Implement proper input validation using Zod schemas for all tool parameters
Applied to files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
📚 Learning: 2026-01-07T18:31:56.046Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/bulletproofing-agent.mdc:0-0
Timestamp: 2026-01-07T18:31:56.046Z
Learning: Applies to **/*.{ts,tsx} : Require runtime validation at all boundaries using Zod schemas for HTTP requests, query parameters, path parameters, headers, environment variables, and external service responses
Applied to files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
📚 Learning: 2025-12-13T11:47:19.287Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to Cyrano/src/**/*.ts : Use Zod schemas for input validation
Applied to files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
📚 Learning: 2026-01-07T00:04:50.672Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/frontend-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:04:50.672Z
Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts} : Ensure WCAG 2.1 AA compliance with minimum 4.5:1 color contrast for text, keyboard navigation support, screen reader compatibility, and proper ARIA labels and roles
Applied to files:
apps/forecaster/frontend/src/pages/TaxForecast.tsx
🧬 Code graph analysis (1)
Cyrano/src/modules/forecast/formulas/tax-formulas.ts (1)
apps/forecaster/backend/src/tax/federal.ts (4)
FilingStatus(18-18)FederalTaxInput(18-18)FederalTaxResult(18-18)calculateFederal(19-19)
🪛 GitHub Actions: Codacy analysis & coverage
Cyrano/src/engines/forecast/forecast-engine.ts
[error] 543-543: Unexpected '}' encountered during transformation.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Codacy Security Scan
🔇 Additional comments (6)
Cyrano/src/engines/forecast/forecast-engine.ts (1)
483-488: LGTM on the expanded disclaimer.The updated error message appropriately clarifies that forecast outputs are simulations for litigation and planning purposes, not actual tax preparation documents. This aligns with the risk acknowledgement requirements.
apps/forecaster/backend/src/index.ts (1)
26-29: Year range expansion looks correct.The expanded year validation (2018-2025) aligns with the tax policy data coverage in
tax-formulas.tswhich now includes brackets, standard deductions, and SE/SS base values for 2018-2025.apps/forecaster/frontend/src/pages/TaxForecast.tsx (1)
63-80: Enhanced warning messaging looks appropriate.The updated two-layer confirmation flow with clear sovereignty/risk messaging provides good UX for the dangerous operation of removing advisory branding. The warning emoji and structured message format improve visibility.
Cyrano/src/modules/forecast/formulas/tax-formulas.ts (3)
548-653: calculateFederal implementation is comprehensive and well-structured.The function correctly implements:
- Income aggregation with proper SE income handling
- Self-employment tax with 92.35% net earnings factor
- Standard vs. itemized deduction selection
- CTC/ODC with phase-out calculations
- ACTC refundable portion with earned income threshold
- EITC with full eligibility checks (MFS, investment income limits, age requirements)
- Proper rounding throughout
The warnings array provides good instrumentation for edge cases and eligibility issues.
250-329: Credit calculation constants are comprehensive.The CTC/ODC/ACTC/EITC policy parameters are well-organized with proper typing for year ranges. The constants correctly reflect:
- CTC increase to $2200 in 2025
- ACTC refundable limits increasing over time
- EITC phase-in/out rates and thresholds by number of qualifying children
- Investment income limits and married filing addon
64-122: Tax bracket and standard deduction data for 2018-2025 are accurate.The 2025 thresholds and standard deduction amounts match IRS 2025 tax adjustments: single brackets at [11925, 48475, 103350, 197300, 250525, 626350], married filing jointly at [23850, 96950, 206700, 394600, 501050, 751600], and standard deductions of $15,750 (single) and $31,500 (married filing jointly). The fallback to 2024 values for unlisted years and the bracket calculation logic are sound.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
|
@copilot please see the issues/comments/nitpicks from coderabbit and codacy. Some are minor but some are serious; please correct. @cursoragent I’m troubled by the number of errors you continue to make. |
|
@MightyPrytanis I've opened a new pull request, #239, to work on those changes. Once the pull request is ready, I'll request review from you. |
- Fix incorrect import path in apps/forecaster/backend/src/tax/federal.ts (4→5 levels up) - Remove extra closing braces in city-tax.ts and pdf-filler.ts causing build errors - Update tsconfig to allow cross-project imports from Cyrano - Install missing @types/node dependency Co-authored-by: MightyPrytanis <219587333+MightyPrytanis@users.noreply.github.com>
- Add FederalTaxInputSchema in tax-formulas.ts for runtime validation - Update http-bridge.ts to validate forecast_input with the new schema - Add validation for both /api/forecast/tax and /api/forecast/tax/pdf endpoints - Fix remaining syntax errors (extra closing braces) in Cyrano source files - Install Cyrano dependencies to support zod import Co-authored-by: MightyPrytanis <219587333+MightyPrytanis@users.noreply.github.com>
- Simplify year validation using z.number().int().min(2018).max(2025) for better maintainability - Improve ForecastHttpRequestSchema documentation to explain validation approach - Maintain two-stage validation to allow flexible input while ensuring type safety Co-authored-by: MightyPrytanis <219587333+MightyPrytanis@users.noreply.github.com>
The file Cyrano/src/modules/forecast/formulas/tax-formulas.js was a compiled JavaScript file that was accidentally committed in the previous changes. This build artifact should not be in version control as it's generated from the TypeScript source file. This resolves the Codacy error about numeric literal '0.10' by removing the generated file that triggered the warning. Co-authored-by: MightyPrytanis <219587333+MightyPrytanis@users.noreply.github.com>
## Summary Successfully addressed all critical and major issues identified by CodeRabbit and Codacy code review tools. ## Issues Resolved ### ✅ Critical Issues - [x] **Import Path Error** - Fixed incorrect relative import in `apps/forecaster/backend/src/tax/federal.ts` - Changed from 4 levels up (`../../../../`) to 5 levels up (`../../../../../`) - Now correctly resolves to repository root `/Cyrano/` - [x] **Syntax Errors** - Removed extra closing braces causing build failures - Fixed in `apps/forecaster/backend/src/city/city-tax.ts` - Fixed in `apps/forecaster/backend/src/pdf/pdf-filler.ts` - Fixed in multiple Cyrano engine files - [x] **TypeScript Configuration** - Updated tsconfig to support cross-project imports - Removed restrictive `rootDir` setting in forecaster backend - Added explicit include path for Cyrano tax formulas ### ✅ Major Issues - [x] **Missing Input Validation** - Added comprehensive Zod validation schema - Created `FederalTaxInputSchema` with proper type constraints - Validates required fields: `year` (2018-2025), `filingStatus`, `wages` (non-negative) - Validates optional numeric fields with appropriate constraints - Applied validation to both `/api/forecast/tax` and `/api/forecast/tax/pdf` endpoints ### ✅ Code Quality Improvements - [x] Simplified year validation for better maintainability - [x] Improved schema documentation - [x] Installed missing dependencies (@types/node) - [x] **Removed accidentally committed build artifact** (tax-formulas.js) - Resolves Codacy error about numeric literal '0.10' ## Verification ### Build Status - ✅ Cyrano TypeScript compilation: **SUCCESS** - ✅ Forecaster backend compilation: **SUCCESS** - ✅ No new build errors introduced ### Security - ✅ CodeQL analysis: **0 vulnerabilities found** - ✅ Input validation now prevents malformed data from reaching calculation functions - ✅ Proper error handling with detailed validation messages ## Commits - `92011d3` - Fix critical import path and syntax errors - `4234e46` - Add Zod validation schema for FederalTaxInput - `628b2a5` - Address code review suggestions - Latest - Remove accidentally committed build artifact <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
apps/forecaster/frontend/src/pages/CityTaxForecast.tsx (2)
18-23: Removeanyfrom React state (result)
useState<any>breaks the repo’s TS guideline (“noany/ unsafe casts”) and makes downstream rendering/error handling brittle.Proposed fix
- const [result, setResult] = useState<any>(null); + type CityTaxForecastResponse = Awaited<ReturnType<typeof generateCityTaxForecast>>; + const [result, setResult] = useState<CityTaxForecastResponse | null>(null);
44-85: Fix branding-removal cancel behavior + normalize confirmation input
- If the user was on Watermark and tries None then cancels, you currently force them back to Strip (Line 70-73, 76-79). Revert to the prior mode instead.
promptshould accept common input variance (trim()/ case-insensitive) (Line 75-79).- Consider softening “outputs are consistent with applicable law” wording (Line 56-58) to avoid over-claiming.
Proposed fix
- const requestBrandingModeChange = (mode: 'strip' | 'watermark' | 'none') => { - if (mode !== 'none') { + const requestBrandingModeChange = (nextMode: 'strip' | 'watermark' | 'none') => { + const previousMode = brandingMode; + if (nextMode !== 'none') { localStorage.removeItem(BRANDING_OVERRIDE_STORAGE_KEY); setBrandingOverrideExpiresAt(null); - setBrandingMode(mode); + setBrandingMode(nextMode); return; } @@ - if (!step1) { - setBrandingMode('strip'); + if (!step1) { + setBrandingMode(previousMode); return; } - const step2 = window.prompt('Type REMOVE to confirm removal of the advisory (expires after 24 hours):', ''); - if (step2 !== 'REMOVE') { - setBrandingMode('strip'); + const step2 = window.prompt('Type REMOVE to confirm removal of the advisory (expires after 24 hours):', ''); + if (step2?.trim().toUpperCase() !== 'REMOVE') { + setBrandingMode(previousMode); return; } @@ - localStorage.setItem(BRANDING_OVERRIDE_STORAGE_KEY, JSON.stringify({ mode: 'none', expiresAt })); + try { + localStorage.setItem(BRANDING_OVERRIDE_STORAGE_KEY, JSON.stringify({ mode: 'none', expiresAt })); + } catch { + // fall through: UI state still reflects the user's selection, but it won't persist + }
♻️ Duplicate comments (1)
Cyrano/src/modules/forecast/formulas/tax-formulas.ts (1)
520-537: FederalTaxInputSchema is used for validation, but z.any() remains in the initial request schema.The schema is properly imported (lines 1059, 1100) and validated in handlers (lines 1062–1068, 1103–1109). However, the ForecastHttpRequestSchema still uses
z.record(z.any())at line 1024 for the initialforecast_inputvalidation, allowing any properties to pass before the FederalTaxInputSchema safeParse. This creates a two-stage validation where invalid data could theoretically pass the first layer. Replace the z.lazy/z.record(z.any()) pattern with direct FederalTaxInputSchema usage in the request schema definition to enforce validation at the boundary immediately.Related code at http-bridge.ts
// Lines 1020-1024: Current schema definition const ForecastHttpRequestSchema = z.object({ forecast_input: z.lazy(() => { return z.record(z.any()); }),// Lines 1062-1068 & 1103-1109: Handler validation (occurs after initial schema passes) const validationResult = FederalTaxInputSchema.safeParse(forecast_input); if (!validationResult.success) { return res.status(400).json({ success: false, error: 'Invalid forecast_input data', details: validationResult.error.issues }); }
🧹 Nitpick comments (4)
apps/forecaster/frontend/src/pages/CityTaxForecast.tsx (1)
52-79: UI consistency: “Danger Zone” still shown in the select optionYou removed the “DANGER ZONE” phrasing from the confirm flow, but the dropdown still says
No Advisory/Branding (Danger Zone)(Line 144). Consider aligning the label with the new copy.Cyrano/src/modules/forecast/formulas/tax-formulas.ts (1)
496-496: Consider usingz.inferfor type derivation.The
FederalTaxInputinterface is defined separately fromFederalTaxInputSchema. Per coding guidelines, usingz.infer<typeof FederalTaxInputSchema>would ensure the type and schema stay synchronized and reduce maintenance burden.♻️ Suggested refactor using z.infer
-export interface FederalTaxInput { - year: 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025; - filingStatus: FilingStatus; - wages: number; - selfEmploymentIncome?: number; - interestIncome?: number; - dividendIncome?: number; - capitalGains?: number; - otherIncome?: number; - itemizedDeductions?: number; - standardDeduction?: number; - qualifyingChildrenUnder17?: number; - otherDependents?: number; - filerAge?: number; - spouseAge?: number; - canBeClaimedAsDependent?: boolean; - estimatedWithholding?: number; -} +export type FederalTaxInput = z.infer<typeof FederalTaxInputSchema>;Note: This would require moving the schema definition before the type export, and the year type would become
numberinstead of the literal union. If the literal union is required for downstream type checking, keep the interface but add a comment noting the intentional divergence.Cyrano/src/http-bridge.ts (2)
1018-1025: Unnecessary use ofz.lazy()for non-recursive schema.
z.lazy()is intended for recursive or circular schema definitions. Here it wrapsz.record(z.any())which doesn't benefit from lazy evaluation. The two-stage validation approach is valid, butz.lazy()can be removed:♻️ Suggested simplification
const ForecastHttpRequestSchema = z.object({ - forecast_input: z.lazy(() => { - // This will be validated in the handler after importing the schema - // Using z.record allows flexibility for additional properties - return z.record(z.any()); - }), + // Validated in handler with FederalTaxInputSchema after dynamic import + forecast_input: z.record(z.unknown()), branding: z.object({Note: Using
z.unknown()instead ofz.any()is preferred for better type safety per TypeScript guidelines.
1097-1112: Consider extractingyearafter validation for clearer control flow.Currently
yearis extracted at line 1097 before validation, though it's only used after validation succeeds. Reordering would make the logic clearer:♻️ Suggested reorder
const { forecast_input, branding } = parsed.data; - const year = forecast_input?.year || new Date().getFullYear(); // 1) Calculate values using calculateFederal() for complete credit calculations const { calculateFederal, FederalTaxInputSchema } = await import('./modules/forecast/formulas/tax-formulas.js'); // Validate forecast_input with Zod schema const validationResult = FederalTaxInputSchema.safeParse(forecast_input); if (!validationResult.success) { return res.status(400).json({ success: false, error: 'Invalid forecast_input data', details: validationResult.error.issues }); } const calculated = calculateFederal(validationResult.data); + const year = validationResult.data.year;This also ensures
yearcomes from the validated data rather than the raw input.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
apps/forecaster/backend/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (19)
Cyrano/src/engines/base-engine.tsCyrano/src/engines/chronometric/chronometric-engine.tsCyrano/src/engines/chronometric/modules/cost-estimation-module.tsCyrano/src/engines/chronometric/modules/pattern-learning-module.tsCyrano/src/engines/chronometric/modules/time-reconstruction-module.tsCyrano/src/engines/chronometric/services/baseline-config.tsCyrano/src/engines/chronometric/services/cost-estimation.tsCyrano/src/engines/chronometric/services/profitability-analyzer.tsCyrano/src/engines/forecast/forecast-engine.tsCyrano/src/http-bridge.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/package.jsonapps/forecaster/backend/src/city/city-tax.tsapps/forecaster/backend/src/index.tsapps/forecaster/backend/src/pdf/pdf-filler.tsapps/forecaster/backend/src/tax/federal.tsapps/forecaster/backend/tsconfig.jsonapps/forecaster/frontend/src/pages/CityTaxForecast.tsxapps/forecaster/frontend/src/pages/TaxForecast.tsx
💤 Files with no reviewable changes (9)
- Cyrano/src/engines/chronometric/modules/pattern-learning-module.ts
- Cyrano/src/engines/chronometric/services/cost-estimation.ts
- apps/forecaster/backend/src/city/city-tax.ts
- Cyrano/src/engines/chronometric/services/baseline-config.ts
- Cyrano/src/engines/chronometric/modules/cost-estimation-module.ts
- Cyrano/src/engines/base-engine.ts
- Cyrano/src/engines/chronometric/services/profitability-analyzer.ts
- Cyrano/src/engines/chronometric/chronometric-engine.ts
- Cyrano/src/engines/chronometric/modules/time-reconstruction-module.ts
✅ Files skipped from review due to trivial changes (1)
- apps/forecaster/backend/package.json
🚧 Files skipped from review as they are similar to previous changes (2)
- apps/forecaster/backend/src/index.ts
- Cyrano/src/engines/forecast/forecast-engine.ts
🧰 Additional context used
📓 Path-based instructions (23)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Use ES module syntax with.jsextensions in imports (for TypeScript)
Use PascalCase for class names (e.g.,BaseEngine)
Use camelCase for function and variable names (e.g.,executeWorkflow)
Sanitize outputs to prevent XSS vulnerabilitiesNo
anytypes or unsafe casts are permitted in TypeScript codeFor TypeScript/Node.js same-codebase integrations, use direct import pattern with proper error handling and consider connection pooling for resource-intensive operations
**/*.{ts,tsx}: All imported code MUST be used - verify through grep for actual usage after import statements
Dead code must be identified and deleted immediately - any unused code, unused services, and unused configuration must be removed before approval
**/*.{ts,tsx}: Skills architecture must support domain categorization (forensic-finance, legal-reasoning, case-management, etc.) and align with domain-specific proficiencies
Skills must be designed for autonomous application within their domains - no manual invocation required
Skills must align with domain-specific engines - ensure skills architecture enables seamless integration with domain-appropriate execution engines
Never approve 'autonomous' features that require manual invocation - autonomy means automatic application without user action
Never approve 'invisible' features that require explicit user action - invisibility means automatic operation without requiring user invocation
**/*.{ts,tsx}: Ensure consistent use of Zod and Drizzle types across the codebase
Replace incomplete stubs, dummies, and placeholders with functional implementations
Enforce strong typing throughout the codebase and requirez.inferfor type derivation from Zod schemas
Require runtime validation at all boundaries using Zod schemas for HTTP requests, query parameters, path parameters, headers, environment variables, and external service responses
Avoidanytypes except at carefully documented boundaries
Ensure imports and exports match N...
Files:
apps/forecaster/backend/src/pdf/pdf-filler.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/tax/federal.tsCyrano/src/http-bridge.tsapps/forecaster/frontend/src/pages/CityTaxForecast.tsxapps/forecaster/frontend/src/pages/TaxForecast.tsx
{LexFiat,apps}/**/*.{tsx,ts}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
React components should use Radix UI and Lucide React icons for consistent UI
Files:
apps/forecaster/backend/src/pdf/pdf-filler.tsapps/forecaster/backend/src/tax/federal.tsapps/forecaster/frontend/src/pages/CityTaxForecast.tsxapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/*.{ts,tsx,js,jsx,py,java,go,rb,php}
📄 CodeRabbit inference engine (.cursor/rules/auditor-general-agent.mdc)
**/*.{ts,tsx,js,jsx,py,java,go,rb,php}: Base all audit conclusions exclusively on verifiable code evidence, not documentation claims or assertions
Verify every claim by examining actual code execution, test results, and data structures
Examine all code files including tools, modules, engines, workflows, routines, services, and routes for real implementations versus stubs/placeholders
Check for real API calls and actual logic, not mocks, placeholders, or throw statements
Distinguish between fully implemented code, partially implemented code, code that is only documented but not implemented, and mock/placeholder code
Files:
apps/forecaster/backend/src/pdf/pdf-filler.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/tax/federal.tsCyrano/src/http-bridge.tsapps/forecaster/frontend/src/pages/CityTaxForecast.tsxapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/*.ts
📄 CodeRabbit inference engine (.cursor/rules/ethics-enforcement-agent.mdc)
Inject Ten Rules into tool-specific prompts and adapt rules to tool context for all AI-calling tools
Code must maintain TypeScript strict mode compliance
**/*.ts: Identify and eliminate PLACEHOLDER and TODO comments that block actual functionality in TypeScript implementations
Verify that tool registrations in tool composition and engine workflows match the actual tool files in the codebase
Remove mock implementations and mock fallbacks from tools, modules, and engines - use real implementations or error when credentials are unavailable
Verify error handling functions correctly when required credentials or API dependencies are missing, returning appropriate error messages instead of mock data
Files:
apps/forecaster/backend/src/pdf/pdf-filler.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/tax/federal.tsCyrano/src/http-bridge.ts
**/*.{js,ts,tsx,jsx,py,java,cs,go,rb,php}
📄 CodeRabbit inference engine (.cursor/rules/inquisitor-agent.mdc)
Every function must be examined for correctness, efficiency, and error handling
Files:
apps/forecaster/backend/src/pdf/pdf-filler.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/tax/federal.tsCyrano/src/http-bridge.tsapps/forecaster/frontend/src/pages/CityTaxForecast.tsxapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/*.{ts,tsx,java,cs,go}
📄 CodeRabbit inference engine (.cursor/rules/inquisitor-agent.mdc)
Every type must be verified for correctness and completeness
Files:
apps/forecaster/backend/src/pdf/pdf-filler.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/tax/federal.tsCyrano/src/http-bridge.tsapps/forecaster/frontend/src/pages/CityTaxForecast.tsxapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/*.{js,ts,tsx,jsx,py,java,cs}
📄 CodeRabbit inference engine (.cursor/rules/inquisitor-agent.mdc)
**/*.{js,ts,tsx,jsx,py,java,cs}: All real API calls must be implemented; mock data and stubs are not acceptable for production code
Every tool, module, engine, and service must have a corresponding test file with passing tests; missing tests are immediate failures
Files:
apps/forecaster/backend/src/pdf/pdf-filler.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/tax/federal.tsCyrano/src/http-bridge.tsapps/forecaster/frontend/src/pages/CityTaxForecast.tsxapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/*.{js,ts,tsx,jsx,py,java,cs,go}
📄 CodeRabbit inference engine (.cursor/rules/inquisitor-agent.mdc)
Every component must have comprehensive error handling that is verified to work, not bare throw statements
Files:
apps/forecaster/backend/src/pdf/pdf-filler.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/tax/federal.tsCyrano/src/http-bridge.tsapps/forecaster/frontend/src/pages/CityTaxForecast.tsxapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/*.{js,ts,tsx,jsx}
📄 CodeRabbit inference engine (.cursor/rules/LEVEL_SET_REPORT_2025-12-29.md)
Update agent references in code comments when agent names change during refactoring activities
Files:
apps/forecaster/backend/src/pdf/pdf-filler.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/tax/federal.tsCyrano/src/http-bridge.tsapps/forecaster/frontend/src/pages/CityTaxForecast.tsxapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/codebase-housekeeper-agent.mdc)
**/*.{js,ts,jsx,tsx}: Remove dead code including unused functions, classes, commented-out code blocks, unreachable code paths, and dead imports
Remove stubs and incomplete implementations that are no longer needed, including TODO comments for removed features and placeholder functions
Remove debug code, test code in main files, and development-only code from production source files
Fix broken imports and update cross-references after file moves, deletions, or consolidations
Files:
apps/forecaster/backend/src/pdf/pdf-filler.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/tax/federal.tsCyrano/src/http-bridge.tsapps/forecaster/frontend/src/pages/CityTaxForecast.tsxapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/compliance-enforcement-agent.mdc)
**/*.{ts,tsx,js,jsx}: Enforce OWASP Top 10 compliance: A02:2021 – Cryptographic Failures - Verify encryption at rest and in transit, check key management, and verify secure algorithms
Enforce OWASP Top 10 compliance: A03:2021 – Injection - Prevent SQL injection, command injection, and implement input validation and sanitization
Enforce OWASP Top 10 compliance: A07:2021 – Authentication Failures - Implement secure authentication, session management, and password policies
Enforce OWASP Top 10 compliance: A09:2021 – Security Logging Failures - Implement security event logging, ensure log integrity, and establish log analysis procedures
Enforce OWASP Top 10 compliance: A10:2021 – Server-Side Request Forgery - Implement SSRF prevention, input validation, and network segmentation
Implement HIPAA Technical Safeguards: Access Control - Require unique user identification, emergency access procedures, automatic logoff, and encryption/decryption
Implement HIPAA Technical Safeguards: Audit Controls - Log all access to ePHI, all modifications, and all deletions
Implement HIPAA Technical Safeguards: Integrity - Ensure ePHI is not improperly altered or destroyed through integrity controls
Implement HIPAA Technical Safeguards: Transmission Security - Encrypt all data in transit and implement integrity controls
Validate all user inputs - Apply type checking, enforce length limits, and validate input format
Implement secure password storage using bcrypt or argon2 algorithms
Implement secure session management with session expiration, CSRF protection, and rate limiting on authentication endpoints
Implement authorization checks before access and enforce least privilege access control using role-based access control
Encrypt sensitive data at rest and in transit using strong encryption algorithms with securely managed encryption keys
Prevent information disclosure in error messages - Use generic error messages for users while logging detailed errors securely
Log security events and acc...
Files:
apps/forecaster/backend/src/pdf/pdf-filler.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/tax/federal.tsCyrano/src/http-bridge.tsapps/forecaster/frontend/src/pages/CityTaxForecast.tsxapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/external-integrations-agent.mdc)
**/*.{ts,tsx,js}: Implement retry logic with exponential backoff for MCP Protocol and HTTP API calls (3 attempts minimum with exponential backoff delays)
Implement circuit breaker pattern for repeated failures (open after 5 failures in 60 seconds)
Implement timeout handling for API calls (30s timeout for API calls, 5s for health checks)
Implement graceful error handling for integrations with user-friendly error messages distinguishing between network errors, service unavailability, and other failure types
Use connection pooling and request batching to optimize performance for HTTP REST API integrations
Implement connection health monitoring and automatic reconnection mechanisms for resilient external integrations
Ensure HTTP API integrations use AbortSignal timeout for requests to prevent hanging connections
Files:
apps/forecaster/backend/src/pdf/pdf-filler.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/tax/federal.tsCyrano/src/http-bridge.tsapps/forecaster/frontend/src/pages/CityTaxForecast.tsxapps/forecaster/frontend/src/pages/TaxForecast.tsx
**/*.{ts,tsx,js,jsx,json,yml,yaml}
📄 CodeRabbit inference engine (.cursor/rules/skills-architect-agent.mdc)
Verify all configuration will be set before defining it - don't create configuration that won't be used
Files:
apps/forecaster/backend/src/pdf/pdf-filler.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/tax/federal.tsCyrano/src/http-bridge.tsapps/forecaster/frontend/src/pages/CityTaxForecast.tsxapps/forecaster/backend/tsconfig.jsonapps/forecaster/frontend/src/pages/TaxForecast.tsx
Cyrano/src/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use kebab-case for file names (e.g.,
base-tool.ts)
Files:
Cyrano/src/modules/forecast/formulas/tax-formulas.tsCyrano/src/http-bridge.ts
Cyrano/src/**/*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Cyrano/src/**/*.ts: Use structured error responses and sanitize errors for security
Use Zod schemas for input validation
Validate all user inputs with Zod schemas
Use parameterized queries for database operations
Files:
Cyrano/src/modules/forecast/formulas/tax-formulas.tsCyrano/src/http-bridge.ts
Cyrano/src/modules/**/*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Modules must extend BaseModule and define constructor with name, description, and version properties
Test module actions and verify that module tool composition correctly chains tools together with proper error handling
Files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
**/modules/**/*
📄 CodeRabbit inference engine (.cursor/rules/architect-agent.mdc)
Module resources and prompts must be self-contained within the module directory
Files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
Cyrano/src/{tools,modules,engines,services}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/internal-integration-agent.mdc)
Cyrano/src/{tools,modules,engines,services}/**/*.{ts,tsx}: Verify all components inCyrano/src/tools/,Cyrano/src/modules/,Cyrano/src/engines/, andCyrano/src/services/are integrated before approval
All components MUST be seamlessly integrated with Pathfinder - verify automatic, invisible integration without manual user invocation required
All components MUST be seamlessly integrated with workflows - verify automatic application in workflow execution without manual invocation
Files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
**/http-bridge.ts
📄 CodeRabbit inference engine (.cursor/rules/architect-agent.mdc)
Tools must be registered in
http-bridge.ts/mcp/toolsendpoint for HTTP bridge support
Files:
Cyrano/src/http-bridge.ts
{Cyrano/src/integrations/**,apps/*/client/src/lib/cyrano-api.ts,Cyrano/src/http-bridge.ts,Cyrano/src/mcp-server.ts}
📄 CodeRabbit inference engine (.cursor/rules/external-integrations-agent.mdc)
Store integration code in
Cyrano/src/integrations/directory, client integration code inapps/*/client/src/lib/cyrano-api.ts, HTTP bridge inCyrano/src/http-bridge.ts, and MCP server inCyrano/src/mcp-server.ts
Files:
Cyrano/src/http-bridge.ts
Cyrano/src/http-bridge.ts
📄 CodeRabbit inference engine (.cursor/rules/mcp-tool-development-agent.mdc)
Register all tools in Cyrano/src/http-bridge.ts to ensure HTTP bridge compatibility
Files:
Cyrano/src/http-bridge.ts
{LexFiat,apps}/**/*.{tsx,css}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use Tailwind CSS 4 for styling in React applications
Files:
apps/forecaster/frontend/src/pages/CityTaxForecast.tsxapps/forecaster/frontend/src/pages/TaxForecast.tsx
{LexFiat,apps}/**/*.tsx
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
{LexFiat,apps}/**/*.tsx: Use TanStack Query (React Query) for state management in React applications
Use Wouter for routing in React applications
Files:
apps/forecaster/frontend/src/pages/CityTaxForecast.tsxapps/forecaster/frontend/src/pages/TaxForecast.tsx
🧠 Learnings (34)
📓 Common learnings
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to {LexFiat,apps}/**/*.tsx : Use Wouter for routing in React applications
📚 Learning: 2026-01-07T00:05:08.130Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/functional-assessment-agent.mdc:0-0
Timestamp: 2026-01-07T00:05:08.130Z
Learning: Applies to Cyrano/src/tools/document-processor.ts : Verify PDF form filling, Forecast branding, and redaction functionality are fully implemented and not mocked
Applied to files:
apps/forecaster/backend/src/pdf/pdf-filler.tsCyrano/src/modules/forecast/formulas/tax-formulas.tsCyrano/src/http-bridge.ts
📚 Learning: 2026-01-07T00:05:08.130Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/functional-assessment-agent.mdc:0-0
Timestamp: 2026-01-07T00:05:08.130Z
Learning: Applies to Cyrano/src/tools/pdf-form-filler.ts : Test PDF form filling end-to-end to verify it correctly populates form fields and handles edge cases
Applied to files:
apps/forecaster/backend/src/pdf/pdf-filler.tsCyrano/src/http-bridge.ts
📚 Learning: 2026-01-07T00:03:06.043Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/codebase-housekeeper-agent.mdc:0-0
Timestamp: 2026-01-07T00:03:06.043Z
Learning: Applies to **/*.{js,ts,jsx,tsx} : Remove stubs and incomplete implementations that are no longer needed, including TODO comments for removed features and placeholder functions
Applied to files:
apps/forecaster/backend/src/pdf/pdf-filler.tsapps/forecaster/backend/tsconfig.json
📚 Learning: 2026-01-07T00:02:40.822Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/architect-agent.mdc:0-0
Timestamp: 2026-01-07T00:02:40.822Z
Learning: Applies to **/tools/*.ts : All tool inputs must be validated using Zod schemas before processing
Applied to files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
📚 Learning: 2025-12-13T11:47:19.287Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to Cyrano/src/**/*.ts : Validate all user inputs with Zod schemas
Applied to files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
📚 Learning: 2026-01-07T00:06:24.911Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/mcp-tool-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:06:24.911Z
Learning: Applies to Cyrano/src/tools/!(*.test).ts : Implement proper input validation using Zod schemas for all tool parameters
Applied to files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
📚 Learning: 2026-01-07T18:31:56.046Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/bulletproofing-agent.mdc:0-0
Timestamp: 2026-01-07T18:31:56.046Z
Learning: Applies to **/*.{ts,tsx} : Require runtime validation at all boundaries using Zod schemas for HTTP requests, query parameters, path parameters, headers, environment variables, and external service responses
Applied to files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
📚 Learning: 2025-12-13T11:47:19.287Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to Cyrano/src/**/*.ts : Use Zod schemas for input validation
Applied to files:
Cyrano/src/modules/forecast/formulas/tax-formulas.ts
📚 Learning: 2026-01-07T00:05:08.130Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/functional-assessment-agent.mdc:0-0
Timestamp: 2026-01-07T00:05:08.130Z
Learning: Applies to Cyrano/src/tools/**/*.ts : Verify external integrations (Clio, Gmail, Outlook, MiCourt) are fully implemented with real API calls, not mock implementations
Applied to files:
Cyrano/src/modules/forecast/formulas/tax-formulas.tsapps/forecaster/backend/src/tax/federal.tsCyrano/src/http-bridge.tsapps/forecaster/backend/tsconfig.json
📚 Learning: 2026-01-07T00:05:41.345Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/internal-integration-agent.mdc:0-0
Timestamp: 2026-01-07T00:05:41.345Z
Learning: Applies to Cyrano/src/{tools,modules,engines,services}/**/*.{ts,tsx} : All components MUST be seamlessly integrated with Pathfinder - verify automatic, invisible integration without manual user invocation required
Applied to files:
apps/forecaster/backend/src/tax/federal.tsapps/forecaster/backend/tsconfig.json
📚 Learning: 2026-01-07T00:05:41.345Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/internal-integration-agent.mdc:0-0
Timestamp: 2026-01-07T00:05:41.345Z
Learning: Applies to Cyrano/src/{tools,modules,engines,services}/**/*.{ts,tsx} : Verify all components in `Cyrano/src/tools/`, `Cyrano/src/modules/`, `Cyrano/src/engines/`, and `Cyrano/src/services/` are integrated before approval
Applied to files:
apps/forecaster/backend/src/tax/federal.tsapps/forecaster/backend/tsconfig.json
📚 Learning: 2026-01-07T00:04:38.695Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/external-integrations-agent.mdc:0-0
Timestamp: 2026-01-07T00:04:38.695Z
Learning: Applies to {Cyrano/src/integrations/**,apps/*/client/src/lib/cyrano-api.ts,Cyrano/src/http-bridge.ts,Cyrano/src/mcp-server.ts} : Store integration code in `Cyrano/src/integrations/` directory, client integration code in `apps/*/client/src/lib/cyrano-api.ts`, HTTP bridge in `Cyrano/src/http-bridge.ts`, and MCP server in `Cyrano/src/mcp-server.ts`
Applied to files:
apps/forecaster/backend/src/tax/federal.tsCyrano/src/http-bridge.ts
📚 Learning: 2026-01-07T00:03:06.043Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/codebase-housekeeper-agent.mdc:0-0
Timestamp: 2026-01-07T00:03:06.043Z
Learning: Applies to **/*.{js,ts,jsx,tsx} : Fix broken imports and update cross-references after file moves, deletions, or consolidations
Applied to files:
apps/forecaster/backend/src/tax/federal.tsapps/forecaster/backend/tsconfig.json
📚 Learning: 2026-01-07T00:05:41.345Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/internal-integration-agent.mdc:0-0
Timestamp: 2026-01-07T00:05:41.345Z
Learning: Applies to Cyrano/src/{tools,modules,engines,services}/**/*.{ts,tsx} : All components MUST be seamlessly integrated with workflows - verify automatic application in workflow execution without manual invocation
Applied to files:
apps/forecaster/backend/src/tax/federal.ts
📚 Learning: 2026-01-07T00:05:41.345Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/internal-integration-agent.mdc:0-0
Timestamp: 2026-01-07T00:05:41.345Z
Learning: Applies to **/*.{ts,tsx} : All imported code MUST be used - verify through grep for actual usage after import statements
Applied to files:
apps/forecaster/backend/src/tax/federal.ts
📚 Learning: 2026-01-07T00:05:41.345Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/internal-integration-agent.mdc:0-0
Timestamp: 2026-01-07T00:05:41.345Z
Learning: Applies to Cyrano/src/services/**/*.{ts,tsx} : All exported services MUST be called and instantiated - verify no unused services exist using grep for service calls and instantiations
Applied to files:
apps/forecaster/backend/src/tax/federal.ts
📚 Learning: 2026-01-07T00:05:08.130Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/functional-assessment-agent.mdc:0-0
Timestamp: 2026-01-07T00:05:08.130Z
Learning: Applies to Cyrano/src/engines/**/*.ts : Test engine workflows end-to-end and verify that workflow step execution correctly chains module actions with proper error propagation
Applied to files:
apps/forecaster/backend/src/tax/federal.ts
📚 Learning: 2026-01-07T00:06:24.911Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/mcp-tool-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:06:24.911Z
Learning: Applies to Cyrano/src/http-bridge.ts : Register all tools in Cyrano/src/http-bridge.ts to ensure HTTP bridge compatibility
Applied to files:
Cyrano/src/http-bridge.ts
📚 Learning: 2026-01-07T00:02:40.822Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/architect-agent.mdc:0-0
Timestamp: 2026-01-07T00:02:40.822Z
Learning: Applies to **/http-bridge.ts : Tools must be registered in `http-bridge.ts` `/mcp/tools` endpoint for HTTP bridge support
Applied to files:
Cyrano/src/http-bridge.ts
📚 Learning: 2026-01-07T00:06:14.578Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/level-set-agent.mdc:0-0
Timestamp: 2026-01-07T00:06:14.578Z
Learning: Compare tool counts across HTTP bridge toolImportMap in Cyrano/src/http-bridge.ts and MCP server tool definitions in Cyrano/src/mcp-server.ts
Applied to files:
Cyrano/src/http-bridge.ts
📚 Learning: 2026-01-07T18:31:56.046Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/bulletproofing-agent.mdc:0-0
Timestamp: 2026-01-07T18:31:56.046Z
Learning: Applies to tsconfig*.json : Consolidate and align tsconfig.json variants around a strict, modern baseline
Applied to files:
apps/forecaster/backend/tsconfig.json
📚 Learning: 2026-01-07T00:03:06.043Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/codebase-housekeeper-agent.mdc:0-0
Timestamp: 2026-01-07T00:03:06.043Z
Learning: Applies to **/*.{js,ts,jsx,tsx} : Remove debug code, test code in main files, and development-only code from production source files
Applied to files:
apps/forecaster/backend/tsconfig.json
📚 Learning: 2026-01-07T00:05:41.345Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/internal-integration-agent.mdc:0-0
Timestamp: 2026-01-07T00:05:41.345Z
Learning: Applies to **/*.{ts,tsx} : Dead code must be identified and deleted immediately - any unused code, unused services, and unused configuration must be removed before approval
Applied to files:
apps/forecaster/backend/tsconfig.json
📚 Learning: 2026-01-07T18:31:56.046Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/bulletproofing-agent.mdc:0-0
Timestamp: 2026-01-07T18:31:56.046Z
Learning: Applies to **/*.{ts,tsx} : Ensure imports and exports match Node ESM module system with `"type": "module"` and use `.js` extensions in import statements
Applied to files:
apps/forecaster/backend/tsconfig.json
📚 Learning: 2025-12-13T11:47:19.287Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to Cyrano/src/tools/**/*.ts : Cyrano tools are auto-discovered from src/tools/ directory and automatically registered with the MCP server
Applied to files:
apps/forecaster/backend/tsconfig.json
📚 Learning: 2025-12-13T11:47:19.287Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: TypeScript configuration target: ES2022
Applied to files:
apps/forecaster/backend/tsconfig.json
📚 Learning: 2025-12-13T11:47:19.287Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to **/*.{ts,tsx} : Use ES module syntax with `.js` extensions in imports (for TypeScript)
Applied to files:
apps/forecaster/backend/tsconfig.json
📚 Learning: 2026-01-07T18:31:56.046Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/bulletproofing-agent.mdc:0-0
Timestamp: 2026-01-07T18:31:56.046Z
Learning: Applies to tsconfig*.json : Verify TypeScript `module` and `moduleResolution` settings are configured for Node 16+/Node 20+/nodenext compatibility
Applied to files:
apps/forecaster/backend/tsconfig.json
📚 Learning: 2026-01-07T00:02:40.822Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/architect-agent.mdc:0-0
Timestamp: 2026-01-07T00:02:40.822Z
Learning: Applies to **/modules/*.ts : Modules located in `Cyrano/src/modules/` must be composable and have minimal coordination needs
Applied to files:
apps/forecaster/backend/tsconfig.json
📚 Learning: 2025-12-13T11:47:19.287Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to Cyrano/src/modules/**/*.ts : Modules must extend BaseModule and define constructor with name, description, and version properties
Applied to files:
apps/forecaster/backend/tsconfig.json
📚 Learning: 2025-12-13T11:47:19.287Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: TypeScript strict mode must be enabled
Applied to files:
apps/forecaster/backend/tsconfig.json
📚 Learning: 2025-12-28T22:59:29.530Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/ethics-enforcement-agent.mdc:0-0
Timestamp: 2025-12-28T22:59:29.530Z
Learning: Applies to **/ethics-reviewer.ts : Review all AI-generated recommendations, content, and suggestions for compliance with Ten Rules before output
Applied to files:
apps/forecaster/frontend/src/pages/TaxForecast.tsx
📚 Learning: 2026-01-07T00:04:50.672Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/frontend-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:04:50.672Z
Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts} : Ensure WCAG 2.1 AA compliance with minimum 4.5:1 color contrast for text, keyboard navigation support, screen reader compatibility, and proper ARIA labels and roles
Applied to files:
apps/forecaster/frontend/src/pages/TaxForecast.tsx
🧬 Code graph analysis (1)
Cyrano/src/http-bridge.ts (1)
Cyrano/src/modules/forecast/formulas/tax-formulas.ts (2)
FederalTaxInputSchema(520-537)calculateFederal(574-679)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (11)
apps/forecaster/backend/src/pdf/pdf-filler.ts (1)
141-141: Syntax cleanup looks good.The removal of extraneous closing braces/parentheses at the file end fixes the build error mentioned in the PR objectives. The
applyBrandingfunction now closes correctly.apps/forecaster/frontend/src/pages/TaxForecast.tsx (2)
63-79: Advisory removal messaging is clear and professional.The updated warning text appropriately communicates:
- LexFiat Forecaster is a simulation (not actual tax preparation)
- Outputs are for litigation/planning purposes only
- User responsibility for consequences of unlabeled outputs
This aligns with the PR objective to convert warning dialog text to a professional tone.
86-86: Confirmation prompt wording is concise.The updated prompt clearly indicates the 24-hour expiration for advisory removal.
Cyrano/src/modules/forecast/formulas/tax-formulas.ts (2)
12-12: Zod import enables runtime validation.The Zod import supports the new
FederalTaxInputSchemafor API boundary validation, aligning with coding guidelines requiring runtime validation at all boundaries.
574-679: calculateFederal implementation is comprehensive and correct.The function implements:
- SE tax calculation with proper wage base coordination
- Standard vs itemized deduction selection
- Progressive bracket tax computation
- CTC/ODC with phaseout calculations
- ACTC refundable portion with earned income threshold
- EITC with proper eligibility checks
The credit calculations use year-specific constants from Tax-Calculator policy parameters, ensuring accuracy across the 2018-2025 range.
apps/forecaster/backend/src/tax/federal.ts (2)
17-19: Re-export pattern maintains backward compatibility.The re-exports preserve the existing public API surface (
FederalTaxInput,FederalTaxResult,FilingStatus,calculateFederal) while delegating implementation to the centralized Cyrano module. This eliminates code duplication across the codebase.
9-15: Import path uses incorrect extension for source file.The import path
../../../../../Cyrano/src/modules/forecast/formulas/tax-formulas.jscorrectly navigates 5 levels fromapps/forecaster/backend/src/tax/to the repository root. However, the.jsextension is incorrect: the actual source file isCyrano/src/modules/forecast/formulas/tax-formulas.ts. There is no compiled.jsoutput in a dist directory.While
moduleResolution: bundlerpermits.js→.tsmapping during development with tsx, production deployment runsnode dist/index.js, which requires actual.jsfiles. The import will fail at runtime in production.Change the import extension to
.ts:Import fix
- } from '../../../../../Cyrano/src/modules/forecast/formulas/tax-formulas.js'; + } from '../../../../../Cyrano/src/modules/forecast/formulas/tax-formulas.ts';⛔ Skipped due to learnings
Learnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .cursor/rules/bulletproofing-agent.mdc:0-0 Timestamp: 2026-01-07T18:31:56.046Z Learning: Applies to **/*.{ts,tsx} : Ensure imports and exports match Node ESM module system with `"type": "module"` and use `.js` extensions in import statementsLearnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .github/copilot-instructions.md:0-0 Timestamp: 2025-12-13T11:47:19.287Z Learning: Applies to **/*.{ts,tsx} : Use ES module syntax with `.js` extensions in imports (for TypeScript)Learnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .cursor/rules/external-integrations-agent.mdc:0-0 Timestamp: 2026-01-07T00:04:38.695Z Learning: Applies to **/*.{ts,tsx} : For TypeScript/Node.js same-codebase integrations, use direct import pattern with proper error handling and consider connection pooling for resource-intensive operationsLearnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .cursor/rules/internal-integration-agent.mdc:0-0 Timestamp: 2026-01-07T00:05:41.345Z Learning: Applies to **/*.{ts,tsx} : All imported code MUST be used - verify through grep for actual usage after import statementsLearnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .cursor/rules/codebase-housekeeper-agent.mdc:0-0 Timestamp: 2026-01-07T00:03:06.043Z Learning: Applies to **/*.{js,ts,jsx,tsx} : Fix broken imports and update cross-references after file moves, deletions, or consolidationsLearnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .cursor/rules/functional-assessment-agent.mdc:0-0 Timestamp: 2026-01-07T00:05:08.130Z Learning: Applies to Cyrano/src/tools/**/*.ts : Verify external integrations (Clio, Gmail, Outlook, MiCourt) are fully implemented with real API calls, not mock implementationsLearnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .cursor/rules/bulletproofing-agent.mdc:0-0 Timestamp: 2026-01-07T18:31:56.046Z Learning: Applies to **/{utils,helpers,fs,file,io}/**/*.{ts,tsx} : Avoid `eval`, dynamic `require`, and unsafe path handling in file system operationsLearnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .cursor/rules/architect-agent.mdc:0-0 Timestamp: 2026-01-07T00:02:40.822Z Learning: Applies to **/*.ts : Code must maintain TypeScript strict mode complianceLearnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .cursor/rules/internal-integration-agent.mdc:0-0 Timestamp: 2026-01-07T00:05:41.345Z Learning: Applies to Cyrano/src/{tools,modules,engines,services}/**/*.{ts,tsx} : Verify all components in `Cyrano/src/tools/`, `Cyrano/src/modules/`, `Cyrano/src/engines/`, and `Cyrano/src/services/` are integrated before approvalLearnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .cursor/rules/architect-agent.mdc:0-0 Timestamp: 2026-01-07T00:02:40.822Z Learning: Applies to **/modules/*.ts : Modules located in `Cyrano/src/modules/` must be composable and have minimal coordination needsapps/forecaster/backend/tsconfig.json (1)
14-14: Include path resolves correctly and is actively used.The relative path
../../../Cyrano/src/modules/forecast/formulas/tax-formulas.tsin the tsconfig correctly navigates fromapps/forecaster/backend/to the repository root and into the Cyrano tax module. ThecalculateFederalfunction from this file is imported and actively used in the backend's tax forecast endpoints (lines 99 and 119 ofsrc/index.ts), confirming this configuration is not orphaned.Cyrano/src/http-bridge.ts (3)
1058-1071: LGTM!The validation flow is well-implemented:
- Dynamic import enables code splitting
safeParsewith proper 400 error response and detailed issues- Type-safe calculation via
validationResult.dataThis correctly implements runtime validation at the HTTP boundary as per coding guidelines.
1141-1143: LGTM!The new fields correctly map from
calculateFederal()output:
earnedIncomeCreditandadditionalChildTaxCreditproperly access thecreditsBreakdownobjecttotalPaymentshas an appropriate fallback towithholdingfor backward compatibility
1150-1151: LGTM!The PDF generation correctly remains with
taxForecastModulewhile calculations are now handled bycalculateFederal(). This separation of concerns is appropriate - calculation logic intax-formulas.jsand PDF form-filling intax-forecast-module.js.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
|
@MightyPrytanis I've opened a new pull request, #243, to work on those changes. Once the pull request is ready, I'll request review from you. |
Thanks for the feedback on #238. I've created this new PR, which merges into #238, to address your comment. I will work on the changes and keep this PR's description up to date as I make progress. Original PR: #238 Triggering review: #238 (comment) > i believe @copilot has corrected this issue - pls verify <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/MightyPrytanis/codebase/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.
|
@copilot codacy indicates an issue: HIGH 'React' must be in scope when using JSX apps/lexfiat/client/src/pages/ Track your productivity and automation metrics 42 43 44 Back to Dashboard 45 |
|
@MightyPrytanis I've opened a new pull request, #244, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: MightyPrytanis <219587333+MightyPrytanis@users.noreply.github.com>
MightyPrytanis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve.
Codacy flagged missing React imports in JSX files. The tsconfig uses
`"jsx": "preserve"` which requires React to be explicitly in scope.
## Changes
- Added `import React` to 4 page components that use JSX:
- `performance.tsx`
- `settings.tsx`
- `todays-focus.tsx`
- `onboarding.tsx`
These files were modified during the React Router migration but lacked
the React import required for JSX transformation.
```typescript
// Before
import { useQuery } from "@tanstack/react-query";
// After
import React from "react";
import { useQuery } from "@tanstack/react-query";
```
<!-- START COPILOT CODING AGENT TIPS -->
---
💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.
Codacy's Analysis Summary0 new issue (≤ 0 issue) Review Pull Request in Codacy →
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
apps/lexfiat/client/src/pages/onboarding.tsx (1)
1633-1681: Critical: Remove stray closing braces and parentheses causing syntax errors.The component properly closes at line 1631. Lines 1633-1681 contain invalid syntax (orphaned
},)characters) that will cause a build failure. These must be removed.🐛 Proposed fix: Delete lines 1633-1681
} - -} -) -} -) -} -) -} -) -} -) -} -) -} -) -} -) -} -) -} -) -} -) -} -) -} -) -} -) -} -} -} -} -} -) -} -) -} -) -} -} -} -) -} -) -} -) -} -} -)Delete all content after line 1632.
apps/lexfiat/client/src/pages/settings.tsx (2)
13-13: Critical: Naming collision betweenLinkicon andLinkrouter component.Line 13 imports
Linkfromlucide-react(an icon), and line 17 importsLinkfromreact-router-dom(a navigation component). The second import shadows the first, causing:
- Line 119 uses
<Link className="w-3 h-3 sm:w-4 sm:h-4" />expecting the Lucide icon, but it receives the router'sLinkcomponent instead- This will break the Integrations tab UI
🐛 Proposed fix: Rename the lucide-react icon import
-import { Settings, User, Link, Bot, MessageSquare, Shield, Bell, ArrowLeft, Scale } from "lucide-react"; +import { Settings, User, Link as LinkIcon, Bot, MessageSquare, Shield, Bell, ArrowLeft, Scale } from "lucide-react";Then update line 119:
- <Link className="w-3 h-3 sm:w-4 sm:h-4" /> + <LinkIcon className="w-3 h-3 sm:w-4 sm:h-4" />Also applies to: 17-17
379-386: Critical: Remove stray closing braces and parentheses causing syntax errors.The component properly closes at line 378. Lines 379-386 contain invalid syntax that will cause a build failure.
🐛 Proposed fix: Delete lines 379-386
} -} -) -} -) -} -} -} -)Delete all content after line 378.
🤖 Fix all issues with AI agents
In `@apps/lexfiat/client/src/pages/performance.tsx`:
- Around line 44-46: The current JSX nests <Button> inside <Link>, creating
invalid nested interactive elements; fix by using the Radix "asChild"
composition so the Link renders with Button styles: replace the
<Link><Button>...</Button></Link> pattern with <Button asChild><Link to="/">Back
to Dashboard</Link></Button>, referencing the Link and Button components and the
asChild prop in this page component so the final DOM is a single <a> with button
styling.
- Around line 7-10: The file imports Link from react-router-dom and nests a
Button inside that Link which causes invalid nested interactive elements;
replace the react-router-dom Link import with Wouter's Link (per project
guideline) and update the Button usage to use its asChild prop so the Link is
the child of Button: keep the explicit React import, change the import line to
import { Link } from "wouter", and refactor the JSX around the navigation button
to <Button asChild variant="outline"><Link to="/">Back to
Dashboard</Link></Button> so accessibility and coding guidelines are satisfied.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
apps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/settings.tsxapps/lexfiat/client/src/pages/todays-focus.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- apps/lexfiat/client/src/pages/todays-focus.tsx
🧰 Additional context used
📓 Path-based instructions (16)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Use ES module syntax with.jsextensions in imports (for TypeScript)
Use PascalCase for class names (e.g.,BaseEngine)
Use camelCase for function and variable names (e.g.,executeWorkflow)
Sanitize outputs to prevent XSS vulnerabilitiesNo
anytypes or unsafe casts are permitted in TypeScript codeFor TypeScript/Node.js same-codebase integrations, use direct import pattern with proper error handling and consider connection pooling for resource-intensive operations
**/*.{ts,tsx}: All imported code MUST be used - verify through grep for actual usage after import statements
Dead code must be identified and deleted immediately - any unused code, unused services, and unused configuration must be removed before approval
**/*.{ts,tsx}: Skills architecture must support domain categorization (forensic-finance, legal-reasoning, case-management, etc.) and align with domain-specific proficiencies
Skills must be designed for autonomous application within their domains - no manual invocation required
Skills must align with domain-specific engines - ensure skills architecture enables seamless integration with domain-appropriate execution engines
Never approve 'autonomous' features that require manual invocation - autonomy means automatic application without user action
Never approve 'invisible' features that require explicit user action - invisibility means automatic operation without requiring user invocation
**/*.{ts,tsx}: Ensure consistent use of Zod and Drizzle types across the codebase
Replace incomplete stubs, dummies, and placeholders with functional implementations
Enforce strong typing throughout the codebase and requirez.inferfor type derivation from Zod schemas
Require runtime validation at all boundaries using Zod schemas for HTTP requests, query parameters, path parameters, headers, environment variables, and external service responses
Avoidanytypes except at carefully documented boundaries
Ensure imports and exports match N...
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
{LexFiat,apps}/**/*.{tsx,ts}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
React components should use Radix UI and Lucide React icons for consistent UI
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
{LexFiat,apps}/**/*.{tsx,css}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use Tailwind CSS 4 for styling in React applications
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
{LexFiat,apps}/**/*.tsx
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
{LexFiat,apps}/**/*.tsx: Use TanStack Query (React Query) for state management in React applications
Use Wouter for routing in React applications
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
**/*.{ts,tsx,js,jsx,py,java,go,rb,php}
📄 CodeRabbit inference engine (.cursor/rules/auditor-general-agent.mdc)
**/*.{ts,tsx,js,jsx,py,java,go,rb,php}: Base all audit conclusions exclusively on verifiable code evidence, not documentation claims or assertions
Verify every claim by examining actual code execution, test results, and data structures
Examine all code files including tools, modules, engines, workflows, routines, services, and routes for real implementations versus stubs/placeholders
Check for real API calls and actual logic, not mocks, placeholders, or throw statements
Distinguish between fully implemented code, partially implemented code, code that is only documented but not implemented, and mock/placeholder code
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
**/*.{js,ts,tsx,jsx,py,java,cs,go,rb,php}
📄 CodeRabbit inference engine (.cursor/rules/inquisitor-agent.mdc)
Every function must be examined for correctness, efficiency, and error handling
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
**/*.{ts,tsx,java,cs,go}
📄 CodeRabbit inference engine (.cursor/rules/inquisitor-agent.mdc)
Every type must be verified for correctness and completeness
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
**/*.{js,ts,tsx,jsx,py,java,cs}
📄 CodeRabbit inference engine (.cursor/rules/inquisitor-agent.mdc)
**/*.{js,ts,tsx,jsx,py,java,cs}: All real API calls must be implemented; mock data and stubs are not acceptable for production code
Every tool, module, engine, and service must have a corresponding test file with passing tests; missing tests are immediate failures
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
**/*.{js,ts,tsx,jsx,py,java,cs,go}
📄 CodeRabbit inference engine (.cursor/rules/inquisitor-agent.mdc)
Every component must have comprehensive error handling that is verified to work, not bare throw statements
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
**/*.{js,ts,tsx,jsx}
📄 CodeRabbit inference engine (.cursor/rules/LEVEL_SET_REPORT_2025-12-29.md)
Update agent references in code comments when agent names change during refactoring activities
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/codebase-housekeeper-agent.mdc)
**/*.{js,ts,jsx,tsx}: Remove dead code including unused functions, classes, commented-out code blocks, unreachable code paths, and dead imports
Remove stubs and incomplete implementations that are no longer needed, including TODO comments for removed features and placeholder functions
Remove debug code, test code in main files, and development-only code from production source files
Fix broken imports and update cross-references after file moves, deletions, or consolidations
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/compliance-enforcement-agent.mdc)
**/*.{ts,tsx,js,jsx}: Enforce OWASP Top 10 compliance: A02:2021 – Cryptographic Failures - Verify encryption at rest and in transit, check key management, and verify secure algorithms
Enforce OWASP Top 10 compliance: A03:2021 – Injection - Prevent SQL injection, command injection, and implement input validation and sanitization
Enforce OWASP Top 10 compliance: A07:2021 – Authentication Failures - Implement secure authentication, session management, and password policies
Enforce OWASP Top 10 compliance: A09:2021 – Security Logging Failures - Implement security event logging, ensure log integrity, and establish log analysis procedures
Enforce OWASP Top 10 compliance: A10:2021 – Server-Side Request Forgery - Implement SSRF prevention, input validation, and network segmentation
Implement HIPAA Technical Safeguards: Access Control - Require unique user identification, emergency access procedures, automatic logoff, and encryption/decryption
Implement HIPAA Technical Safeguards: Audit Controls - Log all access to ePHI, all modifications, and all deletions
Implement HIPAA Technical Safeguards: Integrity - Ensure ePHI is not improperly altered or destroyed through integrity controls
Implement HIPAA Technical Safeguards: Transmission Security - Encrypt all data in transit and implement integrity controls
Validate all user inputs - Apply type checking, enforce length limits, and validate input format
Implement secure password storage using bcrypt or argon2 algorithms
Implement secure session management with session expiration, CSRF protection, and rate limiting on authentication endpoints
Implement authorization checks before access and enforce least privilege access control using role-based access control
Encrypt sensitive data at rest and in transit using strong encryption algorithms with securely managed encryption keys
Prevent information disclosure in error messages - Use generic error messages for users while logging detailed errors securely
Log security events and acc...
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/external-integrations-agent.mdc)
**/*.{ts,tsx,js}: Implement retry logic with exponential backoff for MCP Protocol and HTTP API calls (3 attempts minimum with exponential backoff delays)
Implement circuit breaker pattern for repeated failures (open after 5 failures in 60 seconds)
Implement timeout handling for API calls (30s timeout for API calls, 5s for health checks)
Implement graceful error handling for integrations with user-friendly error messages distinguishing between network errors, service unavailability, and other failure types
Use connection pooling and request batching to optimize performance for HTTP REST API integrations
Implement connection health monitoring and automatic reconnection mechanisms for resilient external integrations
Ensure HTTP API integrations use AbortSignal timeout for requests to prevent hanging connections
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
apps/{lexfiat/client,arkiver/frontend}/src/**/*.{tsx,ts,css}
📄 CodeRabbit inference engine (.cursor/rules/frontend-development-agent.mdc)
Implement responsive design using a mobile-first approach with standard breakpoints: Mobile < 640px, Tablet 640px-1024px, Desktop > 1024px. Ensure touch targets are minimum 44x44px
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
apps/{lexfiat/client,arkiver/frontend}/src/{components,pages}/**/*.{tsx,ts}
📄 CodeRabbit inference engine (.cursor/rules/frontend-development-agent.mdc)
Optimize frontend performance: implement code splitting by route, lazy load images and heavy components, optimize bundle size, use React.memo for expensive components, and debounce/throttle user interactions. Target metrics: FCP < 1.5s, TTI < 3.5s, LCP < 2.5s, CLS < 0.1
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
**/*.{ts,tsx,js,jsx,json,yml,yaml}
📄 CodeRabbit inference engine (.cursor/rules/skills-architect-agent.mdc)
Verify all configuration will be set before defining it - don't create configuration that won't be used
Files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
🧠 Learnings (12)
📓 Common learnings
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to {LexFiat,apps}/**/*.tsx : Use Wouter for routing in React applications
📚 Learning: 2025-12-13T11:47:19.287Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to {LexFiat,apps}/**/*.tsx : Use Wouter for routing in React applications
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
📚 Learning: 2026-01-07T00:04:50.672Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/frontend-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:04:50.672Z
Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/{components,pages}/**/*.{tsx,ts} : Optimize frontend performance: implement code splitting by route, lazy load images and heavy components, optimize bundle size, use React.memo for expensive components, and debounce/throttle user interactions. Target metrics: FCP < 1.5s, TTI < 3.5s, LCP < 2.5s, CLS < 0.1
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
📚 Learning: 2026-01-07T00:04:50.672Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/frontend-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:04:50.672Z
Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts} : React components should follow existing component patterns and use shadcn/ui components where appropriate, ensuring TypeScript type safety and maintaining component documentation
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
📚 Learning: 2026-01-07T00:04:50.672Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/frontend-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:04:50.672Z
Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts} : Implement loading states, skeleton screens, optimistic updates, and smooth animations to enhance user-perceived performance
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
📚 Learning: 2026-01-07T00:04:50.672Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/frontend-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:04:50.672Z
Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts} : Use Tailwind responsive classes for mobile-first CSS, implement proper focus indicators for keyboard navigation, and ensure dark theme consistency through theme provider integration
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
📚 Learning: 2026-01-07T00:04:50.672Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/frontend-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:04:50.672Z
Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts} : Reuse existing components from the component library when possible, create new components following the design system, and document component props and usage examples
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
📚 Learning: 2026-01-07T00:04:50.672Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/frontend-development-agent.mdc:0-0
Timestamp: 2026-01-07T00:04:50.672Z
Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts} : Ensure WCAG 2.1 AA compliance with minimum 4.5:1 color contrast for text, keyboard navigation support, screen reader compatibility, and proper ARIA labels and roles
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
📚 Learning: 2025-12-13T11:47:19.287Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to {LexFiat,apps}/**/*.{tsx,ts} : React components should use Radix UI and Lucide React icons for consistent UI
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
📚 Learning: 2025-12-13T11:47:19.287Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to {LexFiat,apps}/**/*.{tsx,css} : Use Tailwind CSS 4 for styling in React applications
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
📚 Learning: 2025-12-13T11:47:19.287Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-13T11:47:19.287Z
Learning: Applies to {LexFiat,apps}/**/*.tsx : Use TanStack Query (React Query) for state management in React applications
Applied to files:
apps/lexfiat/client/src/pages/performance.tsxapps/lexfiat/client/src/pages/onboarding.tsxapps/lexfiat/client/src/pages/settings.tsx
📚 Learning: 2025-12-28T22:59:29.530Z
Learnt from: CR
Repo: MightyPrytanis/codebase PR: 0
File: .cursor/rules/ethics-enforcement-agent.mdc:0-0
Timestamp: 2025-12-28T22:59:29.530Z
Learning: Applies to **/*ethics*dashboard*.{ts,tsx} : Implement ethics dashboard to track compliance scores, monitor rule violations, show compliance trends, and provide transparency
Applied to files:
apps/lexfiat/client/src/pages/settings.tsx
🪛 Biome (2.1.2)
apps/lexfiat/client/src/pages/settings.tsx
[error] 17-17: Shouldn't redeclare 'Link'. Consider to delete it or rename it.
'Link' is defined here:
(lint/suspicious/noRedeclare)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (5)
apps/lexfiat/client/src/pages/performance.tsx (3)
15-15: LGTM!The
Buttoncomponent import from the shared UI library aligns with the coding guidelines for using Radix UI components.
17-33: LGTM!The component structure with TanStack Query for data fetching, loading state with Skeleton, and proper refetch interval is well-implemented and follows established patterns.
49-140: LGTM!The card grid layout with responsive breakpoints, proper accessibility with icons and labels, and Tailwind styling follows the design system patterns. The optional chaining with fallback values for
workflowDataproperties handles the loading/error states gracefully.apps/lexfiat/client/src/pages/settings.tsx (1)
93-99: Routing migration to react-router-dom is correct, pending the naming collision fix.The
<Link to="/">usage for back navigation is properly implemented. Once theLinknaming collision (line 13 vs line 17) is resolved, this will work correctly.apps/lexfiat/client/src/pages/onboarding.tsx (1)
7-8: Fix critical syntax errors at end of file before approval.The file has severe syntax errors starting at line 52 with 48+ lines of stray closing braces
}and parentheses). The component properly closes at line 50, but lines 52-1680 contain invalid garbage syntax that will prevent the file from compiling.Additionally, the routing migration from Wouter to
react-router-domis correctly implemented withuseNavigate()and is consistent across all LexFiat client files.Syntax error evidence
Lines 50-75 show the proper component closure followed by invalid syntax:
} } ) } ) } ) ...repeated pattern continues to line 1680⛔ Skipped due to learnings
Learnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .github/copilot-instructions.md:0-0 Timestamp: 2025-12-13T11:47:19.287Z Learning: Applies to {LexFiat,apps}/**/*.tsx : Use Wouter for routing in React applicationsLearnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .cursor/rules/frontend-development-agent.mdc:0-0 Timestamp: 2026-01-07T00:04:50.672Z Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts} : React components should follow existing component patterns and use shadcn/ui components where appropriate, ensuring TypeScript type safety and maintaining component documentationLearnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .cursor/rules/frontend-development-agent.mdc:0-0 Timestamp: 2026-01-07T00:04:50.672Z Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts} : Reuse existing components from the component library when possible, create new components following the design system, and document component props and usage examplesLearnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .cursor/rules/frontend-development-agent.mdc:0-0 Timestamp: 2026-01-07T00:04:50.672Z Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts} : Implement loading states, skeleton screens, optimistic updates, and smooth animations to enhance user-perceived performanceLearnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .cursor/rules/frontend-development-agent.mdc:0-0 Timestamp: 2026-01-07T00:04:50.672Z Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/{components,pages}/**/*.{tsx,ts} : Optimize frontend performance: implement code splitting by route, lazy load images and heavy components, optimize bundle size, use React.memo for expensive components, and debounce/throttle user interactions. Target metrics: FCP < 1.5s, TTI < 3.5s, LCP < 2.5s, CLS < 0.1Learnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .cursor/rules/frontend-development-agent.mdc:0-0 Timestamp: 2026-01-07T00:04:50.672Z Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts} : Ensure WCAG 2.1 AA compliance with minimum 4.5:1 color contrast for text, keyboard navigation support, screen reader compatibility, and proper ARIA labels and rolesLearnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .cursor/rules/frontend-development-agent.mdc:0-0 Timestamp: 2026-01-07T00:04:50.672Z Learning: Applies to apps/{lexfiat/client,arkiver/frontend}/src/components/**/*.{tsx,ts} : Use Tailwind responsive classes for mobile-first CSS, implement proper focus indicators for keyboard navigation, and ensure dark theme consistency through theme provider integrationLearnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .cursor/rules/internal-integration-agent.mdc:0-0 Timestamp: 2026-01-07T00:05:41.345Z Learning: Applies to **/*.{ts,tsx} : Dead code must be identified and deleted immediately - any unused code, unused services, and unused configuration must be removed before approvalLearnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .github/copilot-instructions.md:0-0 Timestamp: 2025-12-13T11:47:19.287Z Learning: Applies to {LexFiat,apps}/**/*.{tsx,ts} : React components should use Radix UI and Lucide React icons for consistent UILearnt from: CR Repo: MightyPrytanis/codebase PR: 0 File: .cursor/rules/ethics-enforcement-agent.mdc:0-0 Timestamp: 2025-12-28T22:59:29.530Z Learning: Applies to **/*ethics*dashboard*.{ts,tsx} : Implement ethics dashboard to track compliance scores, monitor rule violations, show compliance trends, and provide transparency
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.