What problem does it solve? Manually chasing compiler errors, linter warnings, and security issues after every code edit is slow and error-prone. This Skill runs an automated feedback loop that collects LSP diagnostics and AST-grep scan results after each Write/Edit operation, then iterates until errors reach zero, tests pass, and coverage thresholds are met. ## Core Features & Use Cases - LSP Diagnostic Feedback Loop: PostToolUse hooks capture real-time diagnostics from language servers across 16 supported languages after every file edit. - AST-grep Security and Quality Scanning: Detects structural issues such as SQL injection, XSS, and hardcoded secrets using configurable AST-grep rules. - Configurable Completion Conditions: Loop terminates on zero errors, passing tests, and coverage thresholds, with graceful degradation to linters when LSP servers are unavailable. - Use Case: While implementing a new authentication module, the loop automatically reports type errors after each edit, guides fixes across iterations, and stops only when all diagnostics are clear and tests pass. ## Quick Start Ask the AI to start the feedback loop with /moai loop so it iteratively fixes LSP errors until the codebase is clean.