- Backend: FastAPI app with all models, services, schemas, routes - Admin Panel: Next.js dashboard with all modules (CRM, POS, repairs, warranties, billing, notifications, etc.) - Ecommerce: storefront (submodule) + product catalog - AI Agents: .agents/ skill library for Antigravity IDE - Docs: architecture, billing, notification gateway markdown - Submodules: Backend/OpenWA, Ecommerce/File 2/storefront
9.7 KiB
9.7 KiB
iFixKart Workspace Development Rules
These instructions define the workspace-wide development rules and custom coding skills for the iFixKart Unified Commerce & Service Platform.
Core Directives for Antigravity
This configuration works automatically, is always injected into the agent context, automatically discovers active skills under .agents/skills/, and forces me to follow these procedures without exception.
- Planning First: For any complex task, trigger planning_analysis and wait for explicit user approval before writing code.
- Context First: Before reading large portions of the repository or scanning files, trigger context_optimizer to inspect context-index.md.
- Impact First: For changes affecting multiple modules, APIs, or schemas, trigger feature_impact_analysis to assess regression risks.
- Tool Selection: Load and use only the MCP tools relevant to the active classified task.
- Implementation: Do not write code or apply edits until the implementation plan is approved.
- Documentation: After implementation is complete, trigger documentation_manager to update relevant markdown documents.
- Documentation Verification: Run documentation_drift for significant architectural, API, or database changes to verify code vs. docs parity.
- Testing: Run relevant testing skills such as add_tests or test_feature.
- Quality: Run security_review, performance_profiling, and sonarqube where applicable.
- Session Compression: At the end of significant work, update the compressed local state in
docs/12-ai/session-summary.mdusing session_compaction.
Master Workflow Orchestration
flowchart TD
Request([User Request]) --> CO[context_optimizer]
CO --> TC{Task Classifier}
TC --> |UI/Design| UI[figma_mcp / responsive_ui_audit / accessibility_audit]
TC --> |Backend/API| BE[fastapi_architecture / postman_mcp / api_design]
TC --> |Database/SQL| DB[mysql_toolbox / mysql_schema_review / mysql_query_optimizer]
UI & BE & DB --> ACG[api_contract_guard]
ACG --> T[Testing & Audits]
T --> Q[Quality & SonarQube]
Q --> DM[documentation_manager]
DM --> DD[documentation_drift]
DD --> SC[session_compaction]
SC --> Done([Done])
Conditional Execution & Tool Usage Policies
- Notion MCP: DO NOT use Notion as the primary source of truth for technical code context. Local markdown files inside
docs/are the primary technical context. Use Notion exclusively for human-facing documentation or business specs when requested. - PostHog: Use ONLY when the active task involves event tracking, analytics instrumentation, or conversion funnels.
- Perplexity: Use ONLY when external technical research, package comparison, or best-practice documentation lookup is required.
Active Skills List
| Skill Name | Directory | Category | Purpose |
|---|---|---|---|
| Core Intelligence | |||
| Planning and Analysis | .agents/skills/planning_analysis/ |
Core | Triggers before any execution to analyze requirements, evaluate trade-offs, and obtain user approval. |
| Context Optimizer | .agents/skills/context_optimizer/ |
Core | Enforces token-saving context retrieval, task classification, and targeted documentation/mcp tool loading rules. |
| Feature Impact Analysis | .agents/skills/feature_impact_analysis/ |
Core | Analyzes system dependencies to evaluate how code changes impact other modules. |
| Sequential Thinking | .agents/skills/sequential_thinking/ |
Core | Establishes a deep, step-by-step reasoning cycle for complex logic validation and edge-case prevention. |
| Session Compaction | .agents/skills/session_compaction/ |
Core | Compresses long conversation context, extracting decisions, changes, and remaining tasks. |
| UI / Frontend | |||
| Figma MCP | .agents/skills/figma_mcp/ |
UI | Tool adapter for retrieving and analyzing Figma mockups and layout specifications. |
| Responsive UI Audit | .agents/skills/responsive_ui_audit/ |
UI | Audits frontend layouts across mobile, tablet, and desktop viewports to prevent element overlap and overflow. |
| UI Design Review | .agents/skills/ui_design_review/ |
UI | Complements visual verification by comparing implemented UI screens against figma specifications. |
| Accessibility Audit | .agents/skills/accessibility_audit/ |
UI | Audits frontend files for WCAG/508 accessibility compliance. |
| Create Component | .agents/skills/create_component/ |
UI | Creates a new reusable component following UI component guidelines. |
| Backend | |||
| Postman MCP | .agents/skills/postman_mcp/ |
Backend | Tool adapter for executing API requests, testing status codes, and validating JSON schema payloads. |
| API Design | .agents/skills/api_design/ |
Backend | Enforce RESTful standards and schema contracts on backend controllers. |
| FastAPI Architecture | .agents/skills/fastapi_architecture/ |
Backend | Enforces standards for FastAPI route controllers, Pydantic data schemas, and dependency injection. |
| API Contract Guard | .agents/skills/api_contract_guard/ |
Backend | Verifies structural parity between frontend request objects, backend Pydantic schemas, and API response contracts. |
| Database | |||
| MySQL Toolbox | .agents/skills/mysql_toolbox/ |
Database | Tool adapter for executing direct verification queries, inspecting tables, and auditing row structures. |
| MySQL Schema Review | .agents/skills/mysql_schema_review/ |
Database | Reviews database tables, column types, default values, and foreign keys. |
| MySQL Query Optimizer | .agents/skills/mysql_query_optimizer/ |
Database | Audits query performance, explains query execution plans, and identifies index gaps. |
| MySQL Migration Safety | .agents/skills/mysql_migration_safety/ |
Database | Ensures database schema migrations are safe, non-blocking, and backwards-compatible. |
| Quality | |||
| SonarQube | .agents/skills/sonarqube/ |
Quality | Tool adapter to execute static analysis scans, verify code quality gates, and patch security hot spots. |
| Security Review | .agents/skills/security_review/ |
Quality | Review a Node.js TypeScript change or module for security and privacy risks. |
| Performance Profiling | .agents/skills/performance_profiling/ |
Quality | Identify database index gaps, slow queries, or CPU-bound visual rendering bottlenecks. |
| Code Review | .agents/skills/code_review/ |
Quality | Alias to the canonical Graphify-first backend review workflow. |
| Review | .agents/skills/review/ |
Quality | Comprehensive review for bugs, security, code quality, standards, and business-flow integration. |
| Documentation | |||
| Notion MCP | .agents/skills/notion_mcp/ |
Documentation | Tool adapter for reading and updating human-facing specifications and team knowledge base entries on Notion. |
| Documentation Manager | .agents/skills/documentation_manager/ |
Documentation | Identifies whether changes require updating files inside the docs/ hierarchy and synchronizes documentation. |
| Documentation Drift | .agents/skills/documentation_drift/ |
Documentation | Compares current code structures against markdown files in docs/ and reports discrepancies. |
| Product / Research | |||
| PostHog | .agents/skills/posthog/ |
Product/Research | Tool adapter for verifying event tracking instrumentation, analytics payloads, and conversion triggers. |
| Perplexity | .agents/skills/perplexity/ |
Product/Research | Tool adapter for performing technical research, comparing API standards, and validating external library features. |
| Existing & Utility | |||
| Graphify | .agents/skills/graphify/ |
Utility | Turn codebases, SQL schemas, configurations, and docs into interactive knowledge graphs. |
| GBrain | .agents/skills/gbrain/ |
Utility | Personal and company-wide knowledge brain layer providing semantic search and relationship traversal. |
| Add Tests | .agents/skills/add_tests/ |
Utility | Add or improve tests for existing or changed behavior. |
| Test Feature | .agents/skills/test_feature/ |
Utility | Automated browser testing for ReloPortal features using chrome-devtools MCP. |
| Database Migrations | .agents/skills/database_migrations/ |
Utility | Manage database schema migrations using Alembic in Python. |
| Logging Observability | .agents/skills/logging_observability/ |
Utility | Enforce structured logging standards and telemetry collection. |
| Dependency Updates | .agents/skills/dependency_updates/ |
Utility | Manage and audit third-party python packages and npm packages. |
| Commit | .agents/skills/commit/ |
Utility | Generates commit messages or PR descriptions for the current git staged changes. |
| Fix Bug | .agents/skills/fix_bug/ |
Utility | Reproduce a bug, patch the root cause, add regression coverage, and validate. |