foliko 1.0.85 → 1.0.87

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 (178) hide show
  1. package/.agent/agents/code-assistant.json +14 -0
  2. package/.agent/agents/email-assistant.json +14 -0
  3. package/.agent/agents/file-assistant.json +15 -0
  4. package/.agent/agents/system-assistant.json +15 -0
  5. package/.agent/agents/web-assistant.json +12 -0
  6. package/.agent/data/ambient/goals.json +50 -0
  7. package/.agent/data/ambient/memories.json +7 -0
  8. package/.agent/data/default.json +21 -311
  9. package/.agent/data/plugins-state.json +162 -174
  10. package/.agent/data/scheduler/tasks.json +1 -0
  11. package/.agent/data/weixin.json +6 -0
  12. package/.agent/mcp_config.json +1 -0
  13. package/.agent/package.json +8 -0
  14. package/.agent/plugins/__pycache__/test_plugin.cpython-312.pyc +0 -0
  15. package/.agent/plugins/daytona/README.md +89 -0
  16. package/.agent/plugins/daytona/index.js +377 -0
  17. package/.agent/plugins/daytona/package.json +12 -0
  18. package/.agent/plugins/marknative/README.md +134 -0
  19. package/.agent/plugins/marknative/index.js +228 -0
  20. package/.agent/plugins/marknative/package.json +12 -0
  21. package/.agent/plugins/marknative/update-readme.js +134 -0
  22. package/.agent/plugins/system-info/index.js +387 -0
  23. package/.agent/plugins/system-info/package.json +4 -0
  24. package/.agent/plugins/system-info/test.js +40 -0
  25. package/.agent/plugins/temp-repo/LICENSE +201 -0
  26. package/.agent/plugins/test_plugin.py +304 -0
  27. package/.agent/plugins.json +14 -5
  28. package/.agent/python-scripts/test_sample.py +24 -0
  29. package/.agent/skills/agent-browser/SKILL.md +311 -0
  30. package/.agent/skills/agent-browser/TEST_PLAN.md +200 -0
  31. package/.agent/skills/sysinfo/SKILL.md +38 -0
  32. package/.agent/skills/sysinfo/system-info.sh +130 -0
  33. package/.agent/skills/workflow/SKILL.md +324 -0
  34. package/.agent/workflows/email-digest.json +50 -0
  35. package/.agent/workflows/file-backup.json +21 -0
  36. package/.agent/workflows/get-ip-notify.json +32 -0
  37. package/.agent/workflows/news-aggregator.json +93 -0
  38. package/.agent/workflows/news-dashboard-v2.json +94 -0
  39. package/.agent/workflows/notification-batch.json +32 -0
  40. package/.claude/settings.local.json +8 -7
  41. package/.env.example +56 -56
  42. package/README.md +441 -441
  43. package/examples/test-chat-debug.js +102 -0
  44. package/examples/test-chat-result.js +76 -0
  45. package/examples/test-chat-stream-diff.js +63 -0
  46. package/examples/test-concurrent-chat.js +60 -0
  47. package/examples/test-long-chat.js +77 -0
  48. package/examples/test-session-chat.js +93 -0
  49. package/package.json +2 -2
  50. package/plugins/ambient-agent/EventWatcher.js +4 -4
  51. package/plugins/extension-executor-plugin.js +44 -1
  52. package/plugins/file-system-plugin.js +44 -5
  53. package/plugins/session-plugin.js +21 -0
  54. package/plugins/weixin-plugin.js +278 -29
  55. package/skills/find-skills/AGENTS.md +162 -162
  56. package/skills/find-skills/SKILL.md +133 -133
  57. package/skills/foliko-dev/SKILL.md +67 -0
  58. package/skills/python-plugin-dev/SKILL.md +238 -238
  59. package/src/core/agent-chat.js +106 -58
  60. package/src/core/agent.js +3 -61
  61. package/src/utils/index.js +1 -1
  62. package/.agent/.shared/ui-ux-pro-max/data/charts.csv +0 -26
  63. package/.agent/.shared/ui-ux-pro-max/data/colors.csv +0 -97
  64. package/.agent/.shared/ui-ux-pro-max/data/icons.csv +0 -101
  65. package/.agent/.shared/ui-ux-pro-max/data/landing.csv +0 -31
  66. package/.agent/.shared/ui-ux-pro-max/data/products.csv +0 -97
  67. package/.agent/.shared/ui-ux-pro-max/data/prompts.csv +0 -24
  68. package/.agent/.shared/ui-ux-pro-max/data/react-performance.csv +0 -45
  69. package/.agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +0 -53
  70. package/.agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +0 -56
  71. package/.agent/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +0 -53
  72. package/.agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +0 -53
  73. package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +0 -51
  74. package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +0 -59
  75. package/.agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +0 -52
  76. package/.agent/.shared/ui-ux-pro-max/data/stacks/react.csv +0 -54
  77. package/.agent/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +0 -61
  78. package/.agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +0 -54
  79. package/.agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +0 -51
  80. package/.agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +0 -50
  81. package/.agent/.shared/ui-ux-pro-max/data/styles.csv +0 -59
  82. package/.agent/.shared/ui-ux-pro-max/data/typography.csv +0 -58
  83. package/.agent/.shared/ui-ux-pro-max/data/ui-reasoning.csv +0 -101
  84. package/.agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +0 -100
  85. package/.agent/.shared/ui-ux-pro-max/data/web-interface.csv +0 -31
  86. package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
  87. package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
  88. package/.agent/.shared/ui-ux-pro-max/scripts/core.py +0 -258
  89. package/.agent/.shared/ui-ux-pro-max/scripts/design_system.py +0 -1067
  90. package/.agent/.shared/ui-ux-pro-max/scripts/search.py +0 -106
  91. package/.agent/ARCHITECTURE.md +0 -288
  92. package/.agent/agents/ambient-agent.md +0 -57
  93. package/.agent/agents/debugger.md +0 -55
  94. package/.agent/agents/email-assistant.md +0 -49
  95. package/.agent/agents/file-manager.md +0 -42
  96. package/.agent/agents/python-developer.md +0 -60
  97. package/.agent/agents/scheduler.md +0 -59
  98. package/.agent/agents/web-developer.md +0 -45
  99. package/.agent/data/puppeteer-sessions/undefined.json +0 -6
  100. package/.agent/mcp_config_updated.json +0 -12
  101. package/.agent/rules/GEMINI.md +0 -273
  102. package/.agent/rules/allow-rule.md +0 -77
  103. package/.agent/rules/log-rule.md +0 -83
  104. package/.agent/rules/security-rule.md +0 -93
  105. package/.agent/scripts/auto_preview.py +0 -148
  106. package/.agent/scripts/checklist.py +0 -217
  107. package/.agent/scripts/session_manager.py +0 -120
  108. package/.agent/scripts/verify_all.py +0 -327
  109. package/.agent/skills/api-patterns/SKILL.md +0 -81
  110. package/.agent/skills/api-patterns/api-style.md +0 -42
  111. package/.agent/skills/api-patterns/auth.md +0 -24
  112. package/.agent/skills/api-patterns/documentation.md +0 -26
  113. package/.agent/skills/api-patterns/graphql.md +0 -41
  114. package/.agent/skills/api-patterns/rate-limiting.md +0 -31
  115. package/.agent/skills/api-patterns/response.md +0 -37
  116. package/.agent/skills/api-patterns/rest.md +0 -40
  117. package/.agent/skills/api-patterns/scripts/api_validator.py +0 -211
  118. package/.agent/skills/api-patterns/security-testing.md +0 -122
  119. package/.agent/skills/api-patterns/trpc.md +0 -41
  120. package/.agent/skills/api-patterns/versioning.md +0 -22
  121. package/.agent/skills/app-builder/SKILL.md +0 -75
  122. package/.agent/skills/app-builder/agent-coordination.md +0 -71
  123. package/.agent/skills/app-builder/feature-building.md +0 -53
  124. package/.agent/skills/app-builder/project-detection.md +0 -34
  125. package/.agent/skills/app-builder/scaffolding.md +0 -118
  126. package/.agent/skills/app-builder/tech-stack.md +0 -40
  127. package/.agent/skills/app-builder/templates/SKILL.md +0 -39
  128. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
  129. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
  130. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
  131. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
  132. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
  133. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
  134. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
  135. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
  136. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
  137. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
  138. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
  139. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
  140. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
  141. package/.agent/skills/architecture/SKILL.md +0 -55
  142. package/.agent/skills/architecture/context-discovery.md +0 -43
  143. package/.agent/skills/architecture/examples.md +0 -94
  144. package/.agent/skills/architecture/pattern-selection.md +0 -68
  145. package/.agent/skills/architecture/patterns-reference.md +0 -50
  146. package/.agent/skills/architecture/trade-off-analysis.md +0 -77
  147. package/.agent/skills/clean-code/SKILL.md +0 -201
  148. package/.agent/skills/doc.md +0 -177
  149. package/.agent/skills/frontend-design/SKILL.md +0 -418
  150. package/.agent/skills/frontend-design/animation-guide.md +0 -331
  151. package/.agent/skills/frontend-design/color-system.md +0 -311
  152. package/.agent/skills/frontend-design/decision-trees.md +0 -418
  153. package/.agent/skills/frontend-design/motion-graphics.md +0 -306
  154. package/.agent/skills/frontend-design/scripts/accessibility_checker.py +0 -183
  155. package/.agent/skills/frontend-design/scripts/ux_audit.py +0 -722
  156. package/.agent/skills/frontend-design/typography-system.md +0 -345
  157. package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
  158. package/.agent/skills/frontend-design/visual-effects.md +0 -383
  159. package/.agent/skills/i18n-localization/SKILL.md +0 -154
  160. package/.agent/skills/i18n-localization/scripts/i18n_checker.py +0 -241
  161. package/.agent/skills/mcp-builder/SKILL.md +0 -176
  162. package/.agent/skills/web-design-guidelines/SKILL.md +0 -57
  163. package/.agent/workflows/brainstorm.md +0 -113
  164. package/.agent/workflows/create.md +0 -59
  165. package/.agent/workflows/debug.md +0 -103
  166. package/.agent/workflows/deploy.md +0 -176
  167. package/.agent/workflows/enhance.md +0 -63
  168. package/.agent/workflows/orchestrate.md +0 -237
  169. package/.agent/workflows/plan.md +0 -89
  170. package/.agent/workflows/preview.md +0 -81
  171. package/.agent/workflows/simple-test.md +0 -42
  172. package/.agent/workflows/status.md +0 -86
  173. package/.agent/workflows/structured-orchestrate.md +0 -180
  174. package/.agent/workflows/test.md +0 -144
  175. package/.agent/workflows/ui-ux-pro-max.md +0 -296
  176. /package/.agent/plugins/{puppeteer-plugin → temp-repo/puppeteer-plugin}/README.md +0 -0
  177. /package/.agent/plugins/{puppeteer-plugin → temp-repo/puppeteer-plugin}/index.js +0 -0
  178. /package/.agent/plugins/{puppeteer-plugin → temp-repo/puppeteer-plugin}/package.json +0 -0
@@ -1,148 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Auto Preview - Antigravity Kit
4
- ==============================
5
- Manages (start/stop/status) the local development server for previewing the application.
6
-
7
- Usage:
8
- python .agent/scripts/auto_preview.py start [port]
9
- python .agent/scripts/auto_preview.py stop
10
- python .agent/scripts/auto_preview.py status
11
- """
12
-
13
- import os
14
- import sys
15
- import time
16
- import json
17
- import signal
18
- import argparse
19
- import subprocess
20
- from pathlib import Path
21
-
22
- AGENT_DIR = Path(".agent")
23
- PID_FILE = AGENT_DIR / "preview.pid"
24
- LOG_FILE = AGENT_DIR / "preview.log"
25
-
26
- def get_project_root():
27
- return Path(".").resolve()
28
-
29
- def is_running(pid):
30
- try:
31
- os.kill(pid, 0)
32
- return True
33
- except OSError:
34
- return False
35
-
36
- def get_start_command(root):
37
- pkg_file = root / "package.json"
38
- if not pkg_file.exists():
39
- return None
40
-
41
- with open(pkg_file, 'r') as f:
42
- data = json.load(f)
43
-
44
- scripts = data.get("scripts", {})
45
- if "dev" in scripts:
46
- return ["npm", "run", "dev"]
47
- elif "start" in scripts:
48
- return ["npm", "start"]
49
- return None
50
-
51
- def start_server(port=3000):
52
- if PID_FILE.exists():
53
- try:
54
- pid = int(PID_FILE.read_text().strip())
55
- if is_running(pid):
56
- print(f"āš ļø Preview already running (PID: {pid})")
57
- return
58
- except:
59
- pass # Invalid PID file
60
-
61
- root = get_project_root()
62
- cmd = get_start_command(root)
63
-
64
- if not cmd:
65
- print("āŒ No 'dev' or 'start' script found in package.json")
66
- sys.exit(1)
67
-
68
- # Add port env var if needed (simple heuristic)
69
- env = os.environ.copy()
70
- env["PORT"] = str(port)
71
-
72
- print(f"šŸš€ Starting preview on port {port}...")
73
-
74
- with open(LOG_FILE, "w") as log:
75
- process = subprocess.Popen(
76
- cmd,
77
- cwd=str(root),
78
- stdout=log,
79
- stderr=log,
80
- env=env,
81
- shell=True # Required for npm on windows often, or consistent path handling
82
- )
83
-
84
- PID_FILE.write_text(str(process.pid))
85
- print(f"āœ… Preview started! (PID: {process.pid})")
86
- print(f" Logs: {LOG_FILE}")
87
- print(f" URL: http://localhost:{port}")
88
-
89
- def stop_server():
90
- if not PID_FILE.exists():
91
- print("ā„¹ļø No preview server found.")
92
- return
93
-
94
- try:
95
- pid = int(PID_FILE.read_text().strip())
96
- if is_running(pid):
97
- # Try gentle kill first
98
- os.kill(pid, signal.SIGTERM) if sys.platform != 'win32' else subprocess.call(['taskkill', '/F', '/T', '/PID', str(pid)])
99
- print(f"šŸ›‘ Preview stopped (PID: {pid})")
100
- else:
101
- print("ā„¹ļø Process was not running.")
102
- except Exception as e:
103
- print(f"āŒ Error stopping server: {e}")
104
- finally:
105
- if PID_FILE.exists():
106
- PID_FILE.unlink()
107
-
108
- def status_server():
109
- running = False
110
- pid = None
111
- url = "Unknown"
112
-
113
- if PID_FILE.exists():
114
- try:
115
- pid = int(PID_FILE.read_text().strip())
116
- if is_running(pid):
117
- running = True
118
- # Heuristic for URL, strictly we should save it
119
- url = "http://localhost:3000"
120
- except:
121
- pass
122
-
123
- print("\n=== Preview Status ===")
124
- if running:
125
- print(f"āœ… Status: Running")
126
- print(f"šŸ”¢ PID: {pid}")
127
- print(f"🌐 URL: {url} (Likely)")
128
- print(f"šŸ“ Logs: {LOG_FILE}")
129
- else:
130
- print("⚪ Status: Stopped")
131
- print("===================\n")
132
-
133
- def main():
134
- parser = argparse.ArgumentParser()
135
- parser.add_argument("action", choices=["start", "stop", "status"])
136
- parser.add_argument("port", nargs="?", default="3000")
137
-
138
- args = parser.parse_args()
139
-
140
- if args.action == "start":
141
- start_server(int(args.port))
142
- elif args.action == "stop":
143
- stop_server()
144
- elif args.action == "status":
145
- status_server()
146
-
147
- if __name__ == "__main__":
148
- main()
@@ -1,217 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Master Checklist Runner - Antigravity Kit
4
- ==========================================
5
-
6
- Orchestrates all validation scripts in priority order.
7
- Use this for incremental validation during development.
8
-
9
- Usage:
10
- python scripts/checklist.py . # Run core checks
11
- python scripts/checklist.py . --url <URL> # Include performance checks
12
-
13
- Priority Order:
14
- P0: Security Scan (vulnerabilities, secrets)
15
- P1: Lint & Type Check (code quality)
16
- P2: Schema Validation (if database exists)
17
- P3: Test Runner (unit/integration tests)
18
- P4: UX Audit (psychology laws, accessibility)
19
- P5: SEO Check (meta tags, structure)
20
- P6: Performance (lighthouse - requires URL)
21
- """
22
-
23
- import sys
24
- import subprocess
25
- import argparse
26
- from pathlib import Path
27
- from typing import List, Tuple, Optional
28
-
29
- # ANSI colors for terminal output
30
- class Colors:
31
- HEADER = '\033[95m'
32
- BLUE = '\033[94m'
33
- CYAN = '\033[96m'
34
- GREEN = '\033[92m'
35
- YELLOW = '\033[93m'
36
- RED = '\033[91m'
37
- ENDC = '\033[0m'
38
- BOLD = '\033[1m'
39
-
40
- def print_header(text: str):
41
- print(f"\n{Colors.BOLD}{Colors.CYAN}{'='*60}{Colors.ENDC}")
42
- print(f"{Colors.BOLD}{Colors.CYAN}{text.center(60)}{Colors.ENDC}")
43
- print(f"{Colors.BOLD}{Colors.CYAN}{'='*60}{Colors.ENDC}\n")
44
-
45
- def print_step(text: str):
46
- print(f"{Colors.BOLD}{Colors.BLUE}šŸ”„ {text}{Colors.ENDC}")
47
-
48
- def print_success(text: str):
49
- print(f"{Colors.GREEN}āœ… {text}{Colors.ENDC}")
50
-
51
- def print_warning(text: str):
52
- print(f"{Colors.YELLOW}āš ļø {text}{Colors.ENDC}")
53
-
54
- def print_error(text: str):
55
- print(f"{Colors.RED}āŒ {text}{Colors.ENDC}")
56
-
57
- # Define priority-ordered checks
58
- CORE_CHECKS = [
59
- ("Security Scan", ".agent/skills/vulnerability-scanner/scripts/security_scan.py", True),
60
- ("Lint Check", ".agent/skills/lint-and-validate/scripts/lint_runner.py", True),
61
- ("Schema Validation", ".agent/skills/database-design/scripts/schema_validator.py", False),
62
- ("Test Runner", ".agent/skills/testing-patterns/scripts/test_runner.py", False),
63
- ("UX Audit", ".agent/skills/frontend-design/scripts/ux_audit.py", False),
64
- ("SEO Check", ".agent/skills/seo-fundamentals/scripts/seo_checker.py", False),
65
- ]
66
-
67
- PERFORMANCE_CHECKS = [
68
- ("Lighthouse Audit", ".agent/skills/performance-profiling/scripts/lighthouse_audit.py", True),
69
- ("Playwright E2E", ".agent/skills/webapp-testing/scripts/playwright_runner.py", False),
70
- ]
71
-
72
- def check_script_exists(script_path: Path) -> bool:
73
- """Check if script file exists"""
74
- return script_path.exists() and script_path.is_file()
75
-
76
- def run_script(name: str, script_path: Path, project_path: str, url: Optional[str] = None) -> dict:
77
- """
78
- Run a validation script and capture results
79
-
80
- Returns:
81
- dict with keys: name, passed, output, skipped
82
- """
83
- if not check_script_exists(script_path):
84
- print_warning(f"{name}: Script not found, skipping")
85
- return {"name": name, "passed": True, "output": "", "skipped": True}
86
-
87
- print_step(f"Running: {name}")
88
-
89
- # Build command
90
- cmd = ["python", str(script_path), project_path]
91
- if url and ("lighthouse" in script_path.name.lower() or "playwright" in script_path.name.lower()):
92
- cmd.append(url)
93
-
94
- # Run script
95
- try:
96
- result = subprocess.run(
97
- cmd,
98
- capture_output=True,
99
- text=True,
100
- timeout=300 # 5 minute timeout
101
- )
102
-
103
- passed = result.returncode == 0
104
-
105
- if passed:
106
- print_success(f"{name}: PASSED")
107
- else:
108
- print_error(f"{name}: FAILED")
109
- if result.stderr:
110
- print(f" Error: {result.stderr[:200]}")
111
-
112
- return {
113
- "name": name,
114
- "passed": passed,
115
- "output": result.stdout,
116
- "error": result.stderr,
117
- "skipped": False
118
- }
119
-
120
- except subprocess.TimeoutExpired:
121
- print_error(f"{name}: TIMEOUT (>5 minutes)")
122
- return {"name": name, "passed": False, "output": "", "error": "Timeout", "skipped": False}
123
-
124
- except Exception as e:
125
- print_error(f"{name}: ERROR - {str(e)}")
126
- return {"name": name, "passed": False, "output": "", "error": str(e), "skipped": False}
127
-
128
- def print_summary(results: List[dict]):
129
- """Print final summary report"""
130
- print_header("šŸ“Š CHECKLIST SUMMARY")
131
-
132
- passed_count = sum(1 for r in results if r["passed"] and not r.get("skipped"))
133
- failed_count = sum(1 for r in results if not r["passed"] and not r.get("skipped"))
134
- skipped_count = sum(1 for r in results if r.get("skipped"))
135
-
136
- print(f"Total Checks: {len(results)}")
137
- print(f"{Colors.GREEN}āœ… Passed: {passed_count}{Colors.ENDC}")
138
- print(f"{Colors.RED}āŒ Failed: {failed_count}{Colors.ENDC}")
139
- print(f"{Colors.YELLOW}ā­ļø Skipped: {skipped_count}{Colors.ENDC}")
140
- print()
141
-
142
- # Detailed results
143
- for r in results:
144
- if r.get("skipped"):
145
- status = f"{Colors.YELLOW}ā­ļø {Colors.ENDC}"
146
- elif r["passed"]:
147
- status = f"{Colors.GREEN}āœ…{Colors.ENDC}"
148
- else:
149
- status = f"{Colors.RED}āŒ{Colors.ENDC}"
150
-
151
- print(f"{status} {r['name']}")
152
-
153
- print()
154
-
155
- if failed_count > 0:
156
- print_error(f"{failed_count} check(s) FAILED - Please fix before proceeding")
157
- return False
158
- else:
159
- print_success("All checks PASSED ✨")
160
- return True
161
-
162
- def main():
163
- parser = argparse.ArgumentParser(
164
- description="Run Antigravity Kit validation checklist",
165
- formatter_class=argparse.RawDescriptionHelpFormatter,
166
- epilog="""
167
- Examples:
168
- python scripts/checklist.py . # Core checks only
169
- python scripts/checklist.py . --url http://localhost:3000 # Include performance
170
- """
171
- )
172
- parser.add_argument("project", help="Project path to validate")
173
- parser.add_argument("--url", help="URL for performance checks (lighthouse, playwright)")
174
- parser.add_argument("--skip-performance", action="store_true", help="Skip performance checks even if URL provided")
175
-
176
- args = parser.parse_args()
177
-
178
- project_path = Path(args.project).resolve()
179
-
180
- if not project_path.exists():
181
- print_error(f"Project path does not exist: {project_path}")
182
- sys.exit(1)
183
-
184
- print_header("šŸš€ ANTIGRAVITY KIT - MASTER CHECKLIST")
185
- print(f"Project: {project_path}")
186
- print(f"URL: {args.url if args.url else 'Not provided (performance checks skipped)'}")
187
-
188
- results = []
189
-
190
- # Run core checks
191
- print_header("šŸ“‹ CORE CHECKS")
192
- for name, script_path, required in CORE_CHECKS:
193
- script = project_path / script_path
194
- result = run_script(name, script, str(project_path))
195
- results.append(result)
196
-
197
- # If required check fails, stop
198
- if required and not result["passed"] and not result.get("skipped"):
199
- print_error(f"CRITICAL: {name} failed. Stopping checklist.")
200
- print_summary(results)
201
- sys.exit(1)
202
-
203
- # Run performance checks if URL provided
204
- if args.url and not args.skip_performance:
205
- print_header("⚔ PERFORMANCE CHECKS")
206
- for name, script_path, required in PERFORMANCE_CHECKS:
207
- script = project_path / script_path
208
- result = run_script(name, script, str(project_path), args.url)
209
- results.append(result)
210
-
211
- # Print summary
212
- all_passed = print_summary(results)
213
-
214
- sys.exit(0 if all_passed else 1)
215
-
216
- if __name__ == "__main__":
217
- main()
@@ -1,120 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Session Manager - Antigravity Kit
4
- =================================
5
- Analyzes project state, detects tech stack, tracks file statistics, and provides
6
- a summary of the current session.
7
-
8
- Usage:
9
- python .agent/scripts/session_manager.py status [path]
10
- python .agent/scripts/session_manager.py info [path]
11
- """
12
-
13
- import os
14
- import json
15
- import argparse
16
- from pathlib import Path
17
- from typing import Dict, Any, List
18
-
19
- def get_project_root(path: str) -> Path:
20
- return Path(path).resolve()
21
-
22
- def analyze_package_json(root: Path) -> Dict[str, Any]:
23
- pkg_file = root / "package.json"
24
- if not pkg_file.exists():
25
- return {"type": "unknown", "dependencies": {}}
26
-
27
- try:
28
- with open(pkg_file, 'r', encoding='utf-8') as f:
29
- data = json.load(f)
30
-
31
- deps = data.get("dependencies", {})
32
- dev_deps = data.get("devDependencies", {})
33
- all_deps = {**deps, **dev_deps}
34
-
35
- stack = []
36
- if "next" in all_deps: stack.append("Next.js")
37
- elif "react" in all_deps: stack.append("React")
38
- elif "vue" in all_deps: stack.append("Vue")
39
- elif "svelte" in all_deps: stack.append("Svelte")
40
- elif "express" in all_deps: stack.append("Express")
41
- elif "nestjs" in all_deps or "@nestjs/core" in all_deps: stack.append("NestJS")
42
-
43
- if "tailwindcss" in all_deps: stack.append("Tailwind CSS")
44
- if "prisma" in all_deps: stack.append("Prisma")
45
- if "typescript" in all_deps: stack.append("TypeScript")
46
-
47
- return {
48
- "name": data.get("name", "unnamed"),
49
- "version": data.get("version", "0.0.0"),
50
- "stack": stack,
51
- "scripts": list(data.get("scripts", {}).keys())
52
- }
53
- except Exception as e:
54
- return {"error": str(e)}
55
-
56
- def count_files(root: Path) -> Dict[str, int]:
57
- stats = {"created": 0, "modified": 0, "total": 0}
58
- # Simple count for now, comprehensive tracking would require git diff or extensive history
59
- exclude = {".git", "node_modules", ".next", "dist", "build", ".agent", ".gemini", "__pycache__"}
60
-
61
- for root_dir, dirs, files in os.walk(root):
62
- dirs[:] = [d for d in dirs if d not in exclude]
63
- stats["total"] += len(files)
64
-
65
- return stats
66
-
67
- def detect_features(root: Path) -> List[str]:
68
- # Heuristic: look at folder names in src/
69
- features = []
70
- src = root / "src"
71
- if src.exists():
72
- possible_dirs = ["components", "modules", "features", "app", "pages", "services"]
73
- for d in possible_dirs:
74
- p = src / d
75
- if p.exists() and p.is_dir():
76
- # List subdirectories as likely features
77
- for child in p.iterdir():
78
- if child.is_dir():
79
- features.append(child.name)
80
- return features[:10] # Limit to top 10
81
-
82
- def print_status(root: Path):
83
- info = analyze_package_json(root)
84
- stats = count_files(root)
85
- features = detect_features(root)
86
-
87
- print("\n=== Project Status ===")
88
- print(f"\nšŸ“ Project: {info.get('name', root.name)}")
89
- print(f"šŸ“‚ Path: {root}")
90
- print(f"šŸ·ļø Type: {', '.join(info.get('stack', ['Generic']))}")
91
- print(f"šŸ“Š Status: Active")
92
-
93
- print("\nšŸ”§ Tech Stack:")
94
- for tech in info.get('stack', []):
95
- print(f" • {tech}")
96
-
97
- print(f"\nāœ… Detected Modules/Features ({len(features)}):")
98
- for feat in features:
99
- print(f" • {feat}")
100
- if not features:
101
- print(" (No distinct feature modules detected)")
102
-
103
- print(f"\nšŸ“„ Files: {stats['total']} total files tracked")
104
- print("\n====================\n")
105
-
106
- def main():
107
- parser = argparse.ArgumentParser(description="Session Manager")
108
- parser.add_argument("command", choices=["status", "info"], help="Command to run")
109
- parser.add_argument("path", nargs="?", default=".", help="Project path")
110
-
111
- args = parser.parse_args()
112
- root = get_project_root(args.path)
113
-
114
- if args.command == "status":
115
- print_status(root)
116
- elif args.command == "info":
117
- print(json.dumps(analyze_package_json(root), indent=2))
118
-
119
- if __name__ == "__main__":
120
- main()