flyee 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +134 -0
  3. package/bin/install.js +357 -0
  4. package/bridge/bridge.py +1780 -0
  5. package/bridge/local_tracker.py +722 -0
  6. package/core/agents/backend-specialist.md +266 -0
  7. package/core/agents/code-archaeologist.md +106 -0
  8. package/core/agents/database-architect.md +226 -0
  9. package/core/agents/debugger.md +225 -0
  10. package/core/agents/devops-engineer.md +323 -0
  11. package/core/agents/documentation-writer.md +104 -0
  12. package/core/agents/explorer-agent.md +73 -0
  13. package/core/agents/frontend-specialist.md +743 -0
  14. package/core/agents/game-developer.md +162 -0
  15. package/core/agents/mobile-developer.md +377 -0
  16. package/core/agents/orchestrator.md +416 -0
  17. package/core/agents/penetration-tester.md +188 -0
  18. package/core/agents/performance-optimizer.md +187 -0
  19. package/core/agents/product-manager.md +112 -0
  20. package/core/agents/product-owner.md +95 -0
  21. package/core/agents/project-planner.md +470 -0
  22. package/core/agents/qa-automation-engineer.md +103 -0
  23. package/core/agents/security-auditor.md +170 -0
  24. package/core/agents/seo-specialist.md +111 -0
  25. package/core/agents/stitch-designer.md +190 -0
  26. package/core/agents/tdd-reviewer.md +282 -0
  27. package/core/agents/test-engineer.md +158 -0
  28. package/core/scripts/auto_preview.py +148 -0
  29. package/core/scripts/checklist.py +243 -0
  30. package/core/scripts/cost_report.py +149 -0
  31. package/core/scripts/doc-sync-check.py +461 -0
  32. package/core/scripts/parse_user_stories.py +79 -0
  33. package/core/scripts/prepare_notion_updates.py +172 -0
  34. package/core/scripts/print_create_payload.py +18 -0
  35. package/core/scripts/session_manager.py +120 -0
  36. package/core/scripts/task_complete.py +127 -0
  37. package/core/scripts/verify_all.py +327 -0
  38. package/core/skills/analytics-strategy/SKILL.md +128 -0
  39. package/core/skills/api-patterns/SKILL.md +81 -0
  40. package/core/skills/api-patterns/api-style.md +42 -0
  41. package/core/skills/api-patterns/auth.md +24 -0
  42. package/core/skills/api-patterns/documentation.md +26 -0
  43. package/core/skills/api-patterns/graphql.md +41 -0
  44. package/core/skills/api-patterns/rate-limiting.md +31 -0
  45. package/core/skills/api-patterns/response.md +37 -0
  46. package/core/skills/api-patterns/rest.md +40 -0
  47. package/core/skills/api-patterns/scripts/api_validator.py +211 -0
  48. package/core/skills/api-patterns/security-testing.md +122 -0
  49. package/core/skills/api-patterns/trpc.md +41 -0
  50. package/core/skills/api-patterns/versioning.md +22 -0
  51. package/core/skills/app-builder/SKILL.md +75 -0
  52. package/core/skills/app-builder/agent-coordination.md +71 -0
  53. package/core/skills/app-builder/feature-building.md +53 -0
  54. package/core/skills/app-builder/project-detection.md +34 -0
  55. package/core/skills/app-builder/scaffolding.md +118 -0
  56. package/core/skills/app-builder/tech-stack.md +40 -0
  57. package/core/skills/app-builder/templates/SKILL.md +39 -0
  58. package/core/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
  59. package/core/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
  60. package/core/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  61. package/core/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
  62. package/core/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
  63. package/core/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
  64. package/core/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
  65. package/core/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
  66. package/core/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
  67. package/core/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
  68. package/core/skills/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
  69. package/core/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
  70. package/core/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
  71. package/core/skills/architecture/SKILL.md +55 -0
  72. package/core/skills/architecture/context-discovery.md +43 -0
  73. package/core/skills/architecture/examples.md +94 -0
  74. package/core/skills/architecture/pattern-selection.md +68 -0
  75. package/core/skills/architecture/patterns-reference.md +50 -0
  76. package/core/skills/architecture/trade-off-analysis.md +77 -0
  77. package/core/skills/atomic-design/SKILL.md +282 -0
  78. package/core/skills/atomic-design/references/classification-guide.md +132 -0
  79. package/core/skills/atomic-design/references/quality-checklist.md +60 -0
  80. package/core/skills/atomic-design/references/stacks/stack-blade.md +254 -0
  81. package/core/skills/atomic-design/references/stacks/stack-nextjs.md +272 -0
  82. package/core/skills/atomic-design/references/stacks/stack-react.md +239 -0
  83. package/core/skills/atomic-design/references/stacks/stack-vue.md +224 -0
  84. package/core/skills/bash-linux/SKILL.md +199 -0
  85. package/core/skills/behavioral-modes/SKILL.md +242 -0
  86. package/core/skills/brainstorming/SKILL.md +163 -0
  87. package/core/skills/brainstorming/dynamic-questioning.md +373 -0
  88. package/core/skills/checkpointing-patterns/SKILL.md +163 -0
  89. package/core/skills/clean-code/SKILL.md +201 -0
  90. package/core/skills/code-review-checklist/SKILL.md +109 -0
  91. package/core/skills/code-truth-validation/SKILL.md +149 -0
  92. package/core/skills/component-library-discovery/SKILL.md +154 -0
  93. package/core/skills/content-strategy/SKILL.md +222 -0
  94. package/core/skills/context-budget/SKILL.md +155 -0
  95. package/core/skills/context-gathering-patterns/SKILL.md +278 -0
  96. package/core/skills/cost-tracking/SKILL.md +206 -0
  97. package/core/skills/database-design/SKILL.md +52 -0
  98. package/core/skills/database-design/database-selection.md +43 -0
  99. package/core/skills/database-design/indexing.md +39 -0
  100. package/core/skills/database-design/migrations.md +48 -0
  101. package/core/skills/database-design/optimization.md +36 -0
  102. package/core/skills/database-design/orm-selection.md +30 -0
  103. package/core/skills/database-design/schema-design.md +56 -0
  104. package/core/skills/database-design/scripts/schema_validator.py +172 -0
  105. package/core/skills/deployment-procedures/SKILL.md +295 -0
  106. package/core/skills/design-md/README.md +34 -0
  107. package/core/skills/design-md/SKILL.md +172 -0
  108. package/core/skills/design-md/examples/DESIGN.md +154 -0
  109. package/core/skills/design-system-enforcement/SKILL.md +339 -0
  110. package/core/skills/doc.md +177 -0
  111. package/core/skills/document-registry/SKILL.md +130 -0
  112. package/core/skills/documentation-publishing/SKILL.md +174 -0
  113. package/core/skills/documentation-templates/SKILL.md +194 -0
  114. package/core/skills/enhance-prompt/README.md +34 -0
  115. package/core/skills/enhance-prompt/SKILL.md +204 -0
  116. package/core/skills/enhance-prompt/references/KEYWORDS.md +114 -0
  117. package/core/skills/frontend-design/SKILL.md +430 -0
  118. package/core/skills/frontend-design/animation-guide.md +331 -0
  119. package/core/skills/frontend-design/color-system.md +311 -0
  120. package/core/skills/frontend-design/decision-trees.md +418 -0
  121. package/core/skills/frontend-design/motion-graphics.md +306 -0
  122. package/core/skills/frontend-design/scripts/accessibility_checker.py +183 -0
  123. package/core/skills/frontend-design/scripts/ux_audit.py +722 -0
  124. package/core/skills/frontend-design/typography-system.md +345 -0
  125. package/core/skills/frontend-design/ux-psychology.md +541 -0
  126. package/core/skills/frontend-design/visual-effects.md +383 -0
  127. package/core/skills/game-development/2d-games/SKILL.md +119 -0
  128. package/core/skills/game-development/3d-games/SKILL.md +135 -0
  129. package/core/skills/game-development/SKILL.md +167 -0
  130. package/core/skills/game-development/game-art/SKILL.md +185 -0
  131. package/core/skills/game-development/game-audio/SKILL.md +190 -0
  132. package/core/skills/game-development/game-design/SKILL.md +129 -0
  133. package/core/skills/game-development/mobile-games/SKILL.md +108 -0
  134. package/core/skills/game-development/multiplayer/SKILL.md +132 -0
  135. package/core/skills/game-development/pc-games/SKILL.md +144 -0
  136. package/core/skills/game-development/vr-ar/SKILL.md +123 -0
  137. package/core/skills/game-development/web-games/SKILL.md +150 -0
  138. package/core/skills/geo-fundamentals/SKILL.md +156 -0
  139. package/core/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
  140. package/core/skills/git-workflow/SKILL.md +263 -0
  141. package/core/skills/history-check-patterns/SKILL.md +125 -0
  142. package/core/skills/i18n-localization/SKILL.md +154 -0
  143. package/core/skills/i18n-localization/scripts/i18n_checker.py +241 -0
  144. package/core/skills/integration-completeness/SKILL.md +219 -0
  145. package/core/skills/intelligent-routing/SKILL.md +370 -0
  146. package/core/skills/lint-and-validate/SKILL.md +45 -0
  147. package/core/skills/lint-and-validate/scripts/lint_runner.py +173 -0
  148. package/core/skills/lint-and-validate/scripts/type_coverage.py +173 -0
  149. package/core/skills/local-verification/SKILL.md +195 -0
  150. package/core/skills/mcp-builder/SKILL.md +176 -0
  151. package/core/skills/mobile-design/SKILL.md +394 -0
  152. package/core/skills/mobile-design/decision-trees.md +516 -0
  153. package/core/skills/mobile-design/mobile-backend.md +491 -0
  154. package/core/skills/mobile-design/mobile-color-system.md +420 -0
  155. package/core/skills/mobile-design/mobile-debugging.md +122 -0
  156. package/core/skills/mobile-design/mobile-design-thinking.md +357 -0
  157. package/core/skills/mobile-design/mobile-navigation.md +458 -0
  158. package/core/skills/mobile-design/mobile-performance.md +767 -0
  159. package/core/skills/mobile-design/mobile-testing.md +356 -0
  160. package/core/skills/mobile-design/mobile-typography.md +433 -0
  161. package/core/skills/mobile-design/platform-android.md +666 -0
  162. package/core/skills/mobile-design/platform-ios.md +561 -0
  163. package/core/skills/mobile-design/scripts/mobile_audit.py +670 -0
  164. package/core/skills/mobile-design/touch-psychology.md +537 -0
  165. package/core/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
  166. package/core/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
  167. package/core/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
  168. package/core/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
  169. package/core/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
  170. package/core/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
  171. package/core/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
  172. package/core/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
  173. package/core/skills/nextjs-react-expert/SKILL.md +267 -0
  174. package/core/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
  175. package/core/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
  176. package/core/skills/nodejs-best-practices/SKILL.md +333 -0
  177. package/core/skills/notion-task-patterns/SKILL.md +2529 -0
  178. package/core/skills/page-specifications/SKILL.md +367 -0
  179. package/core/skills/parallel-agents/SKILL.md +175 -0
  180. package/core/skills/performance-profiling/SKILL.md +143 -0
  181. package/core/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
  182. package/core/skills/plan-writing/SKILL.md +190 -0
  183. package/core/skills/powershell-windows/SKILL.md +167 -0
  184. package/core/skills/project-foundation/SKILL.md +117 -0
  185. package/core/skills/project-setup/SKILL.md +141 -0
  186. package/core/skills/project-tracking-patterns/SKILL.md +357 -0
  187. package/core/skills/project-type-discovery/SKILL.md +239 -0
  188. package/core/skills/python-patterns/SKILL.md +441 -0
  189. package/core/skills/qa-test-generation/SKILL.md +156 -0
  190. package/core/skills/react-components/README.md +36 -0
  191. package/core/skills/react-components/SKILL.md +47 -0
  192. package/core/skills/react-components/examples/gold-standard-card.tsx +80 -0
  193. package/core/skills/react-components/package-lock.json +231 -0
  194. package/core/skills/react-components/package.json +16 -0
  195. package/core/skills/react-components/resources/architecture-checklist.md +15 -0
  196. package/core/skills/react-components/resources/component-template.tsx +37 -0
  197. package/core/skills/react-components/resources/stitch-api-reference.md +14 -0
  198. package/core/skills/react-components/resources/style-guide.json +27 -0
  199. package/core/skills/react-components/scripts/fetch-stitch.sh +30 -0
  200. package/core/skills/react-components/scripts/validate.js +68 -0
  201. package/core/skills/red-team-tactics/SKILL.md +199 -0
  202. package/core/skills/remotion/README.md +105 -0
  203. package/core/skills/remotion/SKILL.md +393 -0
  204. package/core/skills/remotion/examples/WalkthroughComposition.tsx +78 -0
  205. package/core/skills/remotion/examples/screens.json +56 -0
  206. package/core/skills/remotion/resources/composition-checklist.md +124 -0
  207. package/core/skills/remotion/resources/screen-slide-template.tsx +123 -0
  208. package/core/skills/remotion/scripts/download-stitch-asset.sh +38 -0
  209. package/core/skills/seo-fundamentals/SKILL.md +129 -0
  210. package/core/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
  211. package/core/skills/server-management/SKILL.md +161 -0
  212. package/core/skills/session-resilience/SKILL.md +199 -0
  213. package/core/skills/shadcn-ui/README.md +248 -0
  214. package/core/skills/shadcn-ui/SKILL.md +326 -0
  215. package/core/skills/shadcn-ui/examples/auth-layout.tsx +177 -0
  216. package/core/skills/shadcn-ui/examples/data-table.tsx +313 -0
  217. package/core/skills/shadcn-ui/examples/form-pattern.tsx +177 -0
  218. package/core/skills/shadcn-ui/resources/component-catalog.md +481 -0
  219. package/core/skills/shadcn-ui/resources/customization-guide.md +516 -0
  220. package/core/skills/shadcn-ui/resources/migration-guide.md +463 -0
  221. package/core/skills/shadcn-ui/resources/setup-guide.md +412 -0
  222. package/core/skills/shadcn-ui/scripts/verify-setup.sh +134 -0
  223. package/core/skills/state-machine/SKILL.md +264 -0
  224. package/core/skills/stitch-loop/README.md +54 -0
  225. package/core/skills/stitch-loop/SKILL.md +203 -0
  226. package/core/skills/stitch-loop/examples/SITE.md +73 -0
  227. package/core/skills/stitch-loop/examples/next-prompt.md +25 -0
  228. package/core/skills/stitch-loop/resources/baton-schema.md +61 -0
  229. package/core/skills/stitch-loop/resources/site-template.md +104 -0
  230. package/core/skills/systematic-debugging/SKILL.md +109 -0
  231. package/core/skills/tailwind-patterns/SKILL.md +284 -0
  232. package/core/skills/tdd-validation/SKILL.md +243 -0
  233. package/core/skills/tdd-workflow/SKILL.md +284 -0
  234. package/core/skills/testing-patterns/SKILL.md +196 -0
  235. package/core/skills/testing-patterns/scripts/test_runner.py +219 -0
  236. package/core/skills/ui-ux-discovery/SKILL.md +329 -0
  237. package/core/skills/ui-validation/SKILL.md +190 -0
  238. package/core/skills/ui-validation/scripts/ui_antipattern_check.py +317 -0
  239. package/core/skills/verification-gate/SKILL.md +205 -0
  240. package/core/skills/vulnerability-scanner/SKILL.md +276 -0
  241. package/core/skills/vulnerability-scanner/checklists.md +121 -0
  242. package/core/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
  243. package/core/skills/web-design-guidelines/SKILL.md +57 -0
  244. package/core/skills/webapp-testing/SKILL.md +187 -0
  245. package/core/skills/webapp-testing/scripts/playwright_runner.py +173 -0
  246. package/core/templates/ARCHITECTURE.template.md +407 -0
  247. package/core/templates/project-resources.example.json +71 -0
  248. package/core/workflows/atomic.md +182 -0
  249. package/core/workflows/brainstorm.md +134 -0
  250. package/core/workflows/check-task.md +242 -0
  251. package/core/workflows/copy-collect.md +306 -0
  252. package/core/workflows/create-agent.md +33 -0
  253. package/core/workflows/create-skill.md +39 -0
  254. package/core/workflows/create-workflow.md +33 -0
  255. package/core/workflows/create.md +92 -0
  256. package/core/workflows/debug.md +186 -0
  257. package/core/workflows/demand.md +443 -0
  258. package/core/workflows/deploy.md +260 -0
  259. package/core/workflows/discovery.md +267 -0
  260. package/core/workflows/document.md +272 -0
  261. package/core/workflows/ds-components.md +296 -0
  262. package/core/workflows/ds-init.md +58 -0
  263. package/core/workflows/ds-refactor.md +245 -0
  264. package/core/workflows/ds-references.md +197 -0
  265. package/core/workflows/ds-styleguide.md +237 -0
  266. package/core/workflows/ds-token-diff.md +103 -0
  267. package/core/workflows/ds-tokens.md +317 -0
  268. package/core/workflows/ds-validate.md +309 -0
  269. package/core/workflows/execute.md +483 -0
  270. package/core/workflows/extract-template.md +278 -0
  271. package/core/workflows/fix-failed-tests.md +160 -0
  272. package/core/workflows/init-project.md +386 -0
  273. package/core/workflows/legacy-project.md +849 -0
  274. package/core/workflows/log.md +97 -0
  275. package/core/workflows/new-project.md +610 -0
  276. package/core/workflows/new-project.md.bak +3292 -0
  277. package/core/workflows/new-task.md +404 -0
  278. package/core/workflows/orchestrate.md +237 -0
  279. package/core/workflows/page-build.md +296 -0
  280. package/core/workflows/plan.md +89 -0
  281. package/core/workflows/prd.md +255 -0
  282. package/core/workflows/preview.md +81 -0
  283. package/core/workflows/review-page.md +304 -0
  284. package/core/workflows/status.md +86 -0
  285. package/core/workflows/stitch.md +226 -0
  286. package/core/workflows/task-complete.md +473 -0
  287. package/core/workflows/task-update.md +163 -0
  288. package/core/workflows/tdd.md +344 -0
  289. package/core/workflows/test.md +251 -0
  290. package/core/workflows/ui-ux-pro-max.md +437 -0
  291. package/core/workflows/ux-mobile-optimize.md +262 -0
  292. package/core/workflows/ux-mobile-validate.md +297 -0
  293. package/engine-files/GEMINI.md +69 -0
  294. package/package.json +47 -0
  295. package/runtime-adapters/antigravity.js +26 -0
  296. package/runtime-adapters/claude.js +57 -0
  297. package/runtime-adapters/codex.js +51 -0
  298. package/runtime-adapters/copilot.js +51 -0
  299. package/runtime-adapters/cursor.js +51 -0
  300. package/runtime-adapters/gemini-cli.js +30 -0
  301. package/runtime-adapters/opencode.js +51 -0
  302. package/runtime-adapters/windsurf.js +51 -0
@@ -0,0 +1,219 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ SEO Checker - Search Engine Optimization Audit
4
+ Checks HTML/JSX/TSX pages for SEO best practices.
5
+
6
+ PURPOSE:
7
+ - Verify meta tags, titles, descriptions
8
+ - Check Open Graph tags for social sharing
9
+ - Validate heading hierarchy
10
+ - Check image accessibility (alt attributes)
11
+
12
+ WHAT IT CHECKS:
13
+ - HTML files (actual web pages)
14
+ - JSX/TSX files (React page components)
15
+ - Only files that are likely PUBLIC pages
16
+
17
+ Usage:
18
+ python seo_checker.py <project_path>
19
+ """
20
+ import sys
21
+ import json
22
+ import re
23
+ from pathlib import Path
24
+ from datetime import datetime
25
+
26
+ # Fix Windows console encoding
27
+ try:
28
+ sys.stdout.reconfigure(encoding='utf-8', errors='replace')
29
+ except:
30
+ pass
31
+
32
+
33
+ # Directories to skip
34
+ SKIP_DIRS = {
35
+ 'node_modules', '.next', 'dist', 'build', '.git', '.github',
36
+ '__pycache__', '.vscode', '.idea', 'coverage', 'test', 'tests',
37
+ '__tests__', 'spec', 'docs', 'documentation', 'examples'
38
+ }
39
+
40
+ # Files to skip (not pages)
41
+ SKIP_PATTERNS = [
42
+ 'config', 'setup', 'util', 'helper', 'hook', 'context', 'store',
43
+ 'service', 'api', 'lib', 'constant', 'type', 'interface', 'mock',
44
+ '.test.', '.spec.', '_test.', '_spec.'
45
+ ]
46
+
47
+
48
+ def is_page_file(file_path: Path) -> bool:
49
+ """Check if this file is likely a public-facing page."""
50
+ name = file_path.name.lower()
51
+ stem = file_path.stem.lower()
52
+
53
+ # Skip utility/config files
54
+ if any(skip in name for skip in SKIP_PATTERNS):
55
+ return False
56
+
57
+ # Check path - pages in specific directories are likely pages
58
+ parts = [p.lower() for p in file_path.parts]
59
+ page_dirs = ['pages', 'app', 'routes', 'views', 'screens']
60
+
61
+ if any(d in parts for d in page_dirs):
62
+ return True
63
+
64
+ # Filename indicators for pages
65
+ page_names = ['page', 'index', 'home', 'about', 'contact', 'blog',
66
+ 'post', 'article', 'product', 'landing', 'layout']
67
+
68
+ if any(p in stem for p in page_names):
69
+ return True
70
+
71
+ # HTML files are usually pages
72
+ if file_path.suffix.lower() in ['.html', '.htm']:
73
+ return True
74
+
75
+ return False
76
+
77
+
78
+ def find_pages(project_path: Path) -> list:
79
+ """Find page files to check."""
80
+ patterns = ['**/*.html', '**/*.htm', '**/*.jsx', '**/*.tsx']
81
+
82
+ files = []
83
+ for pattern in patterns:
84
+ for f in project_path.glob(pattern):
85
+ # Skip excluded directories
86
+ if any(skip in f.parts for skip in SKIP_DIRS):
87
+ continue
88
+
89
+ # Check if it's likely a page
90
+ if is_page_file(f):
91
+ files.append(f)
92
+
93
+ return files[:50] # Limit to 50 files
94
+
95
+
96
+ def check_page(file_path: Path) -> dict:
97
+ """Check a single page for SEO issues."""
98
+ issues = []
99
+
100
+ try:
101
+ content = file_path.read_text(encoding='utf-8', errors='ignore')
102
+ except Exception as e:
103
+ return {"file": str(file_path.name), "issues": [f"Error: {e}"]}
104
+
105
+ # Detect if this is a layout/template file (has Head component)
106
+ is_layout = 'Head>' in content or '<head' in content.lower()
107
+
108
+ # 1. Title tag
109
+ has_title = '<title' in content.lower() or 'title=' in content or 'Head>' in content
110
+ if not has_title and is_layout:
111
+ issues.append("Missing <title> tag")
112
+
113
+ # 2. Meta description
114
+ has_description = 'name="description"' in content.lower() or 'name=\'description\'' in content.lower()
115
+ if not has_description and is_layout:
116
+ issues.append("Missing meta description")
117
+
118
+ # 3. Open Graph tags
119
+ has_og = 'og:' in content or 'property="og:' in content.lower()
120
+ if not has_og and is_layout:
121
+ issues.append("Missing Open Graph tags")
122
+
123
+ # 4. Heading hierarchy - multiple H1s
124
+ h1_matches = re.findall(r'<h1[^>]*>', content, re.I)
125
+ if len(h1_matches) > 1:
126
+ issues.append(f"Multiple H1 tags ({len(h1_matches)})")
127
+
128
+ # 5. Images without alt
129
+ img_pattern = r'<img[^>]+>'
130
+ imgs = re.findall(img_pattern, content, re.I)
131
+ for img in imgs:
132
+ if 'alt=' not in img.lower():
133
+ issues.append("Image missing alt attribute")
134
+ break
135
+ if 'alt=""' in img or "alt=''" in img:
136
+ issues.append("Image has empty alt attribute")
137
+ break
138
+
139
+ # 6. Check for canonical link (nice to have)
140
+ # has_canonical = 'rel="canonical"' in content.lower()
141
+
142
+ return {
143
+ "file": str(file_path.name),
144
+ "issues": issues
145
+ }
146
+
147
+
148
+ def main():
149
+ project_path = Path(sys.argv[1] if len(sys.argv) > 1 else ".").resolve()
150
+
151
+ print(f"\n{'='*60}")
152
+ print(f" SEO CHECKER - Search Engine Optimization Audit")
153
+ print(f"{'='*60}")
154
+ print(f"Project: {project_path}")
155
+ print(f"Time: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
156
+ print("-"*60)
157
+
158
+ # Find pages
159
+ pages = find_pages(project_path)
160
+
161
+ if not pages:
162
+ print("\n[!] No page files found.")
163
+ print(" Looking for: HTML, JSX, TSX in pages/app/routes directories")
164
+ output = {"script": "seo_checker", "files_checked": 0, "passed": True}
165
+ print("\n" + json.dumps(output, indent=2))
166
+ sys.exit(0)
167
+
168
+ print(f"Found {len(pages)} page files to analyze\n")
169
+
170
+ # Check each page
171
+ all_issues = []
172
+ for f in pages:
173
+ result = check_page(f)
174
+ if result["issues"]:
175
+ all_issues.append(result)
176
+
177
+ # Summary
178
+ print("=" * 60)
179
+ print("SEO ANALYSIS RESULTS")
180
+ print("=" * 60)
181
+
182
+ if all_issues:
183
+ # Group by issue type
184
+ issue_counts = {}
185
+ for item in all_issues:
186
+ for issue in item["issues"]:
187
+ issue_counts[issue] = issue_counts.get(issue, 0) + 1
188
+
189
+ print("\nIssue Summary:")
190
+ for issue, count in sorted(issue_counts.items(), key=lambda x: -x[1]):
191
+ print(f" [{count}] {issue}")
192
+
193
+ print(f"\nAffected files ({len(all_issues)}):")
194
+ for item in all_issues[:5]:
195
+ print(f" - {item['file']}")
196
+ if len(all_issues) > 5:
197
+ print(f" ... and {len(all_issues) - 5} more")
198
+ else:
199
+ print("\n[OK] No SEO issues found!")
200
+
201
+ total_issues = sum(len(item["issues"]) for item in all_issues)
202
+ passed = total_issues == 0
203
+
204
+ output = {
205
+ "script": "seo_checker",
206
+ "project": str(project_path),
207
+ "files_checked": len(pages),
208
+ "files_with_issues": len(all_issues),
209
+ "issues_found": total_issues,
210
+ "passed": passed
211
+ }
212
+
213
+ print("\n" + json.dumps(output, indent=2))
214
+
215
+ sys.exit(0 if passed else 1)
216
+
217
+
218
+ if __name__ == "__main__":
219
+ main()
@@ -0,0 +1,161 @@
1
+ ---
2
+ name: server-management
3
+ description: Server management principles and decision-making. Process management, monitoring strategy, and scaling decisions. Teaches thinking, not commands.
4
+ allowed-tools: Read, Write, Edit, Glob, Grep, Bash
5
+ ---
6
+
7
+ # Server Management
8
+
9
+ > Server management principles for production operations.
10
+ > **Learn to THINK, not memorize commands.**
11
+
12
+ ---
13
+
14
+ ## 1. Process Management Principles
15
+
16
+ ### Tool Selection
17
+
18
+ | Scenario | Tool |
19
+ |----------|------|
20
+ | **Node.js app** | PM2 (clustering, reload) |
21
+ | **Any app** | systemd (Linux native) |
22
+ | **Containers** | Docker/Podman |
23
+ | **Orchestration** | Kubernetes, Docker Swarm |
24
+
25
+ ### Process Management Goals
26
+
27
+ | Goal | What It Means |
28
+ |------|---------------|
29
+ | **Restart on crash** | Auto-recovery |
30
+ | **Zero-downtime reload** | No service interruption |
31
+ | **Clustering** | Use all CPU cores |
32
+ | **Persistence** | Survive server reboot |
33
+
34
+ ---
35
+
36
+ ## 2. Monitoring Principles
37
+
38
+ ### What to Monitor
39
+
40
+ | Category | Key Metrics |
41
+ |----------|-------------|
42
+ | **Availability** | Uptime, health checks |
43
+ | **Performance** | Response time, throughput |
44
+ | **Errors** | Error rate, types |
45
+ | **Resources** | CPU, memory, disk |
46
+
47
+ ### Alert Severity Strategy
48
+
49
+ | Level | Response |
50
+ |-------|----------|
51
+ | **Critical** | Immediate action |
52
+ | **Warning** | Investigate soon |
53
+ | **Info** | Review daily |
54
+
55
+ ### Monitoring Tool Selection
56
+
57
+ | Need | Options |
58
+ |------|---------|
59
+ | Simple/Free | PM2 metrics, htop |
60
+ | Full observability | Grafana, Datadog |
61
+ | Error tracking | Sentry |
62
+ | Uptime | UptimeRobot, Pingdom |
63
+
64
+ ---
65
+
66
+ ## 3. Log Management Principles
67
+
68
+ ### Log Strategy
69
+
70
+ | Log Type | Purpose |
71
+ |----------|---------|
72
+ | **Application logs** | Debug, audit |
73
+ | **Access logs** | Traffic analysis |
74
+ | **Error logs** | Issue detection |
75
+
76
+ ### Log Principles
77
+
78
+ 1. **Rotate logs** to prevent disk fill
79
+ 2. **Structured logging** (JSON) for parsing
80
+ 3. **Appropriate levels** (error/warn/info/debug)
81
+ 4. **No sensitive data** in logs
82
+
83
+ ---
84
+
85
+ ## 4. Scaling Decisions
86
+
87
+ ### When to Scale
88
+
89
+ | Symptom | Solution |
90
+ |---------|----------|
91
+ | High CPU | Add instances (horizontal) |
92
+ | High memory | Increase RAM or fix leak |
93
+ | Slow response | Profile first, then scale |
94
+ | Traffic spikes | Auto-scaling |
95
+
96
+ ### Scaling Strategy
97
+
98
+ | Type | When to Use |
99
+ |------|-------------|
100
+ | **Vertical** | Quick fix, single instance |
101
+ | **Horizontal** | Sustainable, distributed |
102
+ | **Auto** | Variable traffic |
103
+
104
+ ---
105
+
106
+ ## 5. Health Check Principles
107
+
108
+ ### What Constitutes Healthy
109
+
110
+ | Check | Meaning |
111
+ |-------|---------|
112
+ | **HTTP 200** | Service responding |
113
+ | **Database connected** | Data accessible |
114
+ | **Dependencies OK** | External services reachable |
115
+ | **Resources OK** | CPU/memory not exhausted |
116
+
117
+ ### Health Check Implementation
118
+
119
+ - Simple: Just return 200
120
+ - Deep: Check all dependencies
121
+ - Choose based on load balancer needs
122
+
123
+ ---
124
+
125
+ ## 6. Security Principles
126
+
127
+ | Area | Principle |
128
+ |------|-----------|
129
+ | **Access** | SSH keys only, no passwords |
130
+ | **Firewall** | Only needed ports open |
131
+ | **Updates** | Regular security patches |
132
+ | **Secrets** | Environment vars, not files |
133
+ | **Audit** | Log access and changes |
134
+
135
+ ---
136
+
137
+ ## 7. Troubleshooting Priority
138
+
139
+ When something's wrong:
140
+
141
+ 1. **Check if running** (process status)
142
+ 2. **Check logs** (error messages)
143
+ 3. **Check resources** (disk, memory, CPU)
144
+ 4. **Check network** (ports, DNS)
145
+ 5. **Check dependencies** (database, APIs)
146
+
147
+ ---
148
+
149
+ ## 8. Anti-Patterns
150
+
151
+ | ❌ Don't | ✅ Do |
152
+ |----------|-------|
153
+ | Run as root | Use non-root user |
154
+ | Ignore logs | Set up log rotation |
155
+ | Skip monitoring | Monitor from day one |
156
+ | Manual restarts | Auto-restart config |
157
+ | No backups | Regular backup schedule |
158
+
159
+ ---
160
+
161
+ > **Remember:** A well-managed server is boring. That's the goal.
@@ -0,0 +1,199 @@
1
+ ---
2
+ name: session-resilience
3
+ description: Crash recovery and session persistence. Lock files, continue protocol, crash detection and automatic resume. Absorbed from GSD-2 crash-recovery.ts patterns.
4
+ ---
5
+
6
+ # Session Resilience
7
+
8
+ > **Absorbed from:** GSD-2 `crash-recovery.ts`, `session-lock.ts`, `continue.md`
9
+ > **Purpose:** Never lose work. Detect crashes. Resume exactly where you stopped.
10
+
11
+ ---
12
+
13
+ ## 🎯 PURPOSE
14
+
15
+ AI coding sessions can be interrupted by:
16
+ - Token limits reached
17
+ - Connection drops
18
+ - IDE restarts
19
+ - User closes terminal
20
+
21
+ Without resilience, all context is lost. The agent starts over, potentially:
22
+ - Re-doing completed work
23
+ - Missing where it left off
24
+ - Forgetting decisions made
25
+
26
+ ---
27
+
28
+ ## 🔒 SESSION LOCK
29
+
30
+ **File:** `.flyee/session-lock.json` (gitignored)
31
+
32
+ Written when agent starts working. Deleted on clean exit.
33
+
34
+ ```json
35
+ {
36
+ "pid": 12345,
37
+ "startedAt": "2026-03-31T17:00:00Z",
38
+ "runtime": "antigravity",
39
+ "activeSprint": "S09",
40
+ "activePhase": "P02",
41
+ "activeTask": "T03",
42
+ "lastAction": "Implementing BlogCard component",
43
+ "lastUpdate": "2026-03-31T17:30:00Z"
44
+ }
45
+ ```
46
+
47
+ ### Lock Lifecycle
48
+
49
+ ```
50
+ Session Start → Check for orphan lock
51
+ ├── No lock → Acquire lock → Work
52
+ └── Lock exists → Check PID alive?
53
+ ├── PID alive → Another session running. WARN user.
54
+ └── PID dead → CRASH DETECTED
55
+ → Read continue.md
56
+ → Display crash info
57
+ → Resume from continue point
58
+ → Clear old lock, acquire new
59
+ ```
60
+
61
+ ### Crash Detection
62
+
63
+ If `session-lock.json` exists AND the PID is dead:
64
+ ```
65
+ ⚠️ Previous session was interrupted.
66
+ Sprint: S09 | Phase: P02 | Task: T03
67
+ Last action: Implementing BlogCard component
68
+ Crashed at: 2026-03-31T17:30:00Z
69
+
70
+ Resuming from continue.md...
71
+ ```
72
+
73
+ ---
74
+
75
+ ## 📝 CONTINUE PROTOCOL
76
+
77
+ **File:** `.flyee/sprints/S{NN}/phases/P{NN}/continue.md` (gitignored)
78
+
79
+ Written when:
80
+ - Agent detects it's approaching token/context limits
81
+ - Agent is about to be interrupted (explicit stop)
82
+ - After completing a significant sub-step within a task
83
+
84
+ Deleted after successful resume.
85
+
86
+ ### Continue File Format
87
+
88
+ ```markdown
89
+ ---
90
+ sprint: S09
91
+ phase: P02
92
+ task: T03
93
+ step: 4
94
+ total_steps: 7
95
+ saved_at: 2026-03-31T17:30:00Z
96
+ reason: approaching_context_limit
97
+ ---
98
+
99
+ ## Completed Work
100
+ - BlogCard component skeleton created (`src/components/BlogCard.tsx`)
101
+ - Props interface defined (Post type)
102
+ - Basic layout with title and excerpt
103
+
104
+ ## Pending Work
105
+ - [ ] Connect to usePosts hook (step 5)
106
+ - [ ] Implement responsive image handling (step 6)
107
+ - [ ] Add hover animation per design tokens (step 7)
108
+
109
+ ## Decisions Made This Session
110
+ - Using CSS Modules (not Tailwind) — consistent with project
111
+ - Image: next/image with blur placeholder
112
+
113
+ ## Files Modified
114
+ - `src/components/BlogCard.tsx` — created (87 lines)
115
+ - `src/components/BlogCard.module.css` — created (42 lines)
116
+
117
+ ## Context for Next Session
118
+ The BlogCard renders static data. Need to wire it to the usePosts()
119
+ hook which calls GET /api/posts. The hook already exists in
120
+ `src/hooks/usePosts.ts` from T02.
121
+
122
+ ## Next Action
123
+ Import usePosts hook in BlogList page and pass posts array to BlogCard.
124
+ ```
125
+
126
+ ### When to Write continue.md
127
+
128
+ | Trigger | Action |
129
+ |---------|--------|
130
+ | Token/context limit approaching | Write continue.md with full state |
131
+ | User says "stop" or "pause" | Write continue.md |
132
+ | After completing a task step | Update continue.md (overwrite) |
133
+ | Task fully completed | DELETE continue.md |
134
+ | Phase completed | DELETE all continue.md in phase |
135
+
136
+ ### Resume Protocol
137
+
138
+ ```
139
+ 1. Read continue.md
140
+ 2. Display summary to user:
141
+ "Resuming S09/P02/T03 — step 4/7.
142
+ ✅ BlogCard skeleton done
143
+ 📋 Next: connect usePosts hook"
144
+ 3. Load ONLY the files listed in "Files Modified"
145
+ 4. Continue from "Next Action"
146
+ 5. Delete continue.md
147
+ 6. Acquire new session lock
148
+ ```
149
+
150
+ ---
151
+
152
+ ## 🛡️ ATOMIC WRITES
153
+
154
+ All state file writes use atomic pattern:
155
+ 1. Write to `.flyee/temp-{random}`
156
+ 2. Rename to target file
157
+ 3. This prevents corruption if process dies mid-write
158
+
159
+ ```python
160
+ # In bridge.py / scripts
161
+ import tempfile, os
162
+
163
+ def atomic_write(filepath, content):
164
+ dir = os.path.dirname(filepath)
165
+ fd, tmp = tempfile.mkstemp(dir=dir, prefix='flyee-tmp-')
166
+ try:
167
+ os.write(fd, content.encode('utf-8'))
168
+ os.close(fd)
169
+ os.rename(tmp, filepath)
170
+ except:
171
+ os.close(fd)
172
+ os.unlink(tmp)
173
+ raise
174
+ ```
175
+
176
+ ---
177
+
178
+ ## ⚡ QUICK REFERENCE
179
+
180
+ ### Agent Session Start Checklist
181
+
182
+ ```
183
+ 1. [ ] Check .flyee/session-lock.json
184
+ - Exists + PID dead? → Crash recovery
185
+ - Exists + PID alive? → Warn "another session active"
186
+ - Not exists? → Normal start
187
+ 2. [ ] Read .flyee/STATE.md → know where you are
188
+ 3. [ ] Check continue.md in active phase → resume if exists
189
+ 4. [ ] Acquire session lock
190
+ 5. [ ] Begin work
191
+ ```
192
+
193
+ ### Agent Session End Checklist
194
+
195
+ ```
196
+ 1. [ ] Write continue.md if mid-task
197
+ 2. [ ] Update STATE.md
198
+ 3. [ ] Release session lock (delete session-lock.json)
199
+ ```