| name | meta-gods-fix |
| description | Execute automated fixes for issues identified by /meta-gods analysis |
| category | quality |
| author | Ormus |
Meta-Gods Fix - Automated Issue Resolution
You are executing remediation for issues identified by the /meta-gods seven-ray Hermetic transformation analysis.
History Persistence
IMPORTANT: Before running diagnostics, check for and load previous analysis history. After completing, save the current analysis.
Load Previous History
HISTORY_FILE=".meta-gods-history.json"
if [ -f "$HISTORY_FILE" ]; then
echo "๐ Previous analysis found:"
cat "$HISTORY_FILE" | jq -r '.lastRun, .summary'
fi
Or read the file directly: .meta-gods-history.json
History File Format
{
"version": "1.0",
"projectName": "project-name",
"lastRun": "2026-01-24T12:00:00Z",
"runs": [
{
"timestamp": "2026-01-24T12:00:00Z",
"summary": {
"mars": { "found": 5, "fixed": 5, "remaining": 0 },
"saturn": { "found": 3, "fixed": 2, "remaining": 1 },
"mercury": { "found": 2, "fixed": 2, "remaining": 0 },
"jupiter": { "found": 0, "fixed": 0, "remaining": 0 },
"venus": { "found": 1, "fixed": 1, "remaining": 0 },
"moon": { "found": 0, "fixed": 0, "remaining": 0 },
"sun": { "found": 0, "fixed": 0, "remaining": 0 }
},
"issues": [
{
"domain": "mars",
"type": "react-purity-violation",
"file": "src/pages/survey.tsx",
"line": 69,
"description": "Math.random() at module level",
"status": "fixed",
"fixApplied": "Converted to useState with lazy init"
}
],
"verification": {
"lint": { "status": "pass", "errors": 0, "warnings": 0 },
"typeCheck": { "status": "pass", "errors": 0 },
"build": { "status": "pass" }
}
}
]
}
Save History After Run
After completing the fix session, create or update .meta-gods-history.json in the project root with:
- Current timestamp
- Summary of issues found/fixed per domain
- List of specific issues and their status
- Verification results
Compare With Previous Run
When history exists, show a delta report:
## Comparison with Previous Run (2026-01-20)
### Progress
- Mars: 5 โ 0 issues (-5) โ
- Saturn: 3 โ 1 issues (-2) ๐ถ
- Mercury: 2 โ 0 issues (-2) โ
### New Issues Since Last Run
- None / List of new issues
### Persistent Issues
- saturn: Missing sitemap entry for /admin routes (deferred)
Context
The /meta-gods analysis identified issues across these planetary domains:
- Mars (Production): Build errors, lint failures, missing error handling
- Saturn (Structure): Architecture issues, missing patterns
- Mercury (Communication): Accessibility, SEO gaps
- Jupiter (Growth): Missing features, scalability issues
- Venus (Aesthetics): Design inconsistencies, animation issues
- Moon (Empathy): UX problems, form validation gaps
- Sun (Identity): Brand inconsistencies, trust signals
Execution Protocol
1. Diagnose Current State
Run comprehensive diagnostics:
npm run lint 2>&1
npx tsc --noEmit 2>&1
npm run build 2>&1
2. Fix Categories
Mars Fixes (Production Hardening)
- React Purity Violations: Replace
Math.random() with useId() hook
- Unescaped Entities: Use
“ ” for quotes
- Missing Error Boundaries: Add
error.tsx at route levels
- Missing Loading States: Add
loading.tsx at route levels
- Missing 404 Pages: Add
not-found.tsx at app level
- Environment URLs: Replace hardcoded URLs with env vars
Saturn Fixes (Structure)
- Unused Imports: Remove with eslint
--fix or manual cleanup
- Effect Anti-patterns: Replace
setState in effects with lazy initialization
- Missing Sitemap Entries: Update sitemap.ts for all routes
Mercury Fixes (Communication)
- Missing Meta Tags: Add title, description, keywords
- Missing Schema.org: Add structured data for pages
- Missing Alt Text: Add alt attributes to images
3. Verification Loop
After each fix category:
- Run
npm run lint
- Run
npm run build
- Report remaining issues
- Continue to next fix category
4. Common Fix Patterns
Math.random() to useId()
import { forwardRef } from "react";
const id = someId || `input-${Math.random().toString(36).substr(2, 9)}`;
import { forwardRef, useId } from "react";
const generatedId = useId();
const id = someId || `input-${generatedId}`;
setState in Effect to Lazy Init
const [isSupported, setIsSupported] = useState(true);
useEffect(() => {
setIsSupported(checkSupport());
}, []);
const [isSupported] = useState(checkSupport);
Unescaped Entities
<p>This is "quoted text" here</p>
<p>This is “quoted text” here</p>
Success Criteria
The fix session is complete when:
Output Format
After fixing, report:
## Meta-Gods Fix Report
### Fixes Applied
- [ ] Category: Description of fix
### Verification
- Lint: PASS/FAIL (X errors, Y warnings)
- Build: PASS/FAIL
- TypeCheck: PASS/FAIL
### Remaining Issues
- None / List of deferred items