What problem does it solve? Manually chasing compiler errors, linter warnings, and security issues after every code change is slow and error-prone. This Skill runs an automated feedback loop that collects LSP diagnostics and AST-grep scan results after each edit, then iterates until errors reach zero, tests pass, and coverage thresholds are met. ## Core Features & Use Cases - LSP Diagnostic Loop: Collects real-time diagnostics from language servers for 16 languages after every Write/Edit operation via a PostToolUse hook. - AST-grep Security Scanning: Detects structural issues such as SQL injection, XSS, and hardcoded secrets using configurable AST-grep rules. - Configurable Completion Conditions: Stops only when zero errors, passing tests, and coverage thresholds (default 85%) are satisfied, with a max-iteration safety limit. - Use Case: While implementing a new feature, activate the loop so every edit is immediately checked by the language server and security scanner, with the loop continuing automatically until all diagnostics are resolved. ## Quick Start Ask the AI to start the feedback loop with /moai:loop so it iteratively fixes all LSP errors and security findings until the code is clean.