@neyugn/agent-kits 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.
- package/LICENSE +21 -0
- package/README.md +514 -0
- package/README.vi.md +410 -0
- package/README.zh.md +410 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +422 -0
- package/kits/coder/ARCHITECTURE.md +289 -0
- package/kits/coder/agents/ai-engineer.md +344 -0
- package/kits/coder/agents/backend-specialist.md +270 -0
- package/kits/coder/agents/cloud-architect.md +363 -0
- package/kits/coder/agents/code-reviewer.md +284 -0
- package/kits/coder/agents/data-engineer.md +401 -0
- package/kits/coder/agents/database-specialist.md +251 -0
- package/kits/coder/agents/debugger.md +209 -0
- package/kits/coder/agents/devops-engineer.md +281 -0
- package/kits/coder/agents/documentation-writer.md +296 -0
- package/kits/coder/agents/frontend-specialist.md +298 -0
- package/kits/coder/agents/i18n-specialist.md +348 -0
- package/kits/coder/agents/integration-specialist.md +314 -0
- package/kits/coder/agents/mobile-developer.md +271 -0
- package/kits/coder/agents/multi-tenant-architect.md +281 -0
- package/kits/coder/agents/orchestrator.md +263 -0
- package/kits/coder/agents/performance-analyst.md +327 -0
- package/kits/coder/agents/project-planner.md +277 -0
- package/kits/coder/agents/queue-specialist.md +282 -0
- package/kits/coder/agents/realtime-specialist.md +267 -0
- package/kits/coder/agents/security-auditor.md +253 -0
- package/kits/coder/agents/test-engineer.md +315 -0
- package/kits/coder/agents/ux-researcher.md +388 -0
- package/kits/coder/rules/.cursorrules +287 -0
- package/kits/coder/rules/CLAUDE.md +287 -0
- package/kits/coder/rules/CODEX.md +287 -0
- package/kits/coder/rules/GEMINI.md +287 -0
- package/kits/coder/scripts/checklist.py +318 -0
- package/kits/coder/scripts/kit_status.py +292 -0
- package/kits/coder/scripts/skills_manager.py +243 -0
- package/kits/coder/scripts/verify_all.py +391 -0
- package/kits/coder/skills/accessibility-patterns/SKILL.md +372 -0
- package/kits/coder/skills/accessibility-patterns/scripts/a11y_checker.py +211 -0
- package/kits/coder/skills/ai-rag-patterns/SKILL.md +444 -0
- package/kits/coder/skills/api-patterns/SKILL.md +316 -0
- package/kits/coder/skills/api-patterns/assets/.gitkeep +1 -0
- package/kits/coder/skills/api-patterns/references/deep-dive.md +21 -0
- package/kits/coder/skills/api-patterns/scripts/api_validator.py +253 -0
- package/kits/coder/skills/api-patterns/scripts/validate.py +56 -0
- package/kits/coder/skills/auth-patterns/SKILL.md +267 -0
- package/kits/coder/skills/aws-patterns/SKILL.md +576 -0
- package/kits/coder/skills/brainstorming/SKILL.md +370 -0
- package/kits/coder/skills/brainstorming/assets/.gitkeep +1 -0
- package/kits/coder/skills/brainstorming/references/deep-dive.md +21 -0
- package/kits/coder/skills/brainstorming/scripts/validate.py +56 -0
- package/kits/coder/skills/clean-code/SKILL.md +240 -0
- package/kits/coder/skills/clean-code/assets/.gitkeep +1 -0
- package/kits/coder/skills/clean-code/references/deep-dive.md +21 -0
- package/kits/coder/skills/clean-code/scripts/lint_runner.py +186 -0
- package/kits/coder/skills/clean-code/scripts/validate.py +56 -0
- package/kits/coder/skills/database-design/SKILL.md +255 -0
- package/kits/coder/skills/database-design/assets/.gitkeep +1 -0
- package/kits/coder/skills/database-design/references/deep-dive.md +21 -0
- package/kits/coder/skills/database-design/scripts/schema_validator.py +272 -0
- package/kits/coder/skills/database-design/scripts/validate.py +56 -0
- package/kits/coder/skills/docker-patterns/SKILL.md +240 -0
- package/kits/coder/skills/documentation-templates/SKILL.md +441 -0
- package/kits/coder/skills/e2e-testing/SKILL.md +457 -0
- package/kits/coder/skills/flutter-patterns/SKILL.md +330 -0
- package/kits/coder/skills/frontend-design/SKILL.md +127 -0
- package/kits/coder/skills/github-actions/SKILL.md +349 -0
- package/kits/coder/skills/gitlab-ci-patterns/SKILL.md +466 -0
- package/kits/coder/skills/graphql-patterns/SKILL.md +558 -0
- package/kits/coder/skills/i18n-localization/SKILL.md +345 -0
- package/kits/coder/skills/i18n-localization/scripts/i18n_checker.py +267 -0
- package/kits/coder/skills/kubernetes-patterns/SKILL.md +357 -0
- package/kits/coder/skills/mermaid-diagrams/SKILL.md +351 -0
- package/kits/coder/skills/mobile-design/SKILL.md +305 -0
- package/kits/coder/skills/monitoring-observability/SKILL.md +458 -0
- package/kits/coder/skills/multi-tenancy/SKILL.md +317 -0
- package/kits/coder/skills/multi-tenancy/assets/.gitkeep +1 -0
- package/kits/coder/skills/multi-tenancy/references/deep-dive.md +21 -0
- package/kits/coder/skills/multi-tenancy/scripts/validate.py +56 -0
- package/kits/coder/skills/nodejs-best-practices/SKILL.md +220 -0
- package/kits/coder/skills/performance-profiling/SKILL.md +333 -0
- package/kits/coder/skills/performance-profiling/assets/.gitkeep +1 -0
- package/kits/coder/skills/performance-profiling/references/deep-dive.md +21 -0
- package/kits/coder/skills/performance-profiling/scripts/validate.py +56 -0
- package/kits/coder/skills/plan-writing/SKILL.md +360 -0
- package/kits/coder/skills/plan-writing/assets/.gitkeep +1 -0
- package/kits/coder/skills/plan-writing/references/deep-dive.md +21 -0
- package/kits/coder/skills/plan-writing/scripts/validate.py +56 -0
- package/kits/coder/skills/postgres-patterns/SKILL.md +361 -0
- package/kits/coder/skills/prompt-engineering/SKILL.md +277 -0
- package/kits/coder/skills/queue-patterns/SKILL.md +359 -0
- package/kits/coder/skills/queue-patterns/assets/.gitkeep +1 -0
- package/kits/coder/skills/queue-patterns/references/deep-dive.md +21 -0
- package/kits/coder/skills/queue-patterns/scripts/validate.py +56 -0
- package/kits/coder/skills/react-native-patterns/SKILL.md +393 -0
- package/kits/coder/skills/react-patterns/SKILL.md +319 -0
- package/kits/coder/skills/realtime-patterns/SKILL.md +506 -0
- package/kits/coder/skills/realtime-patterns/assets/.gitkeep +1 -0
- package/kits/coder/skills/realtime-patterns/references/deep-dive.md +21 -0
- package/kits/coder/skills/realtime-patterns/scripts/validate.py +56 -0
- package/kits/coder/skills/redis-patterns/SKILL.md +484 -0
- package/kits/coder/skills/security-fundamentals/SKILL.md +363 -0
- package/kits/coder/skills/security-fundamentals/assets/.gitkeep +1 -0
- package/kits/coder/skills/security-fundamentals/references/deep-dive.md +21 -0
- package/kits/coder/skills/security-fundamentals/scripts/security_scan.py +326 -0
- package/kits/coder/skills/security-fundamentals/scripts/validate.py +56 -0
- package/kits/coder/skills/seo-patterns/SKILL.md +262 -0
- package/kits/coder/skills/seo-patterns/scripts/seo_checker.py +211 -0
- package/kits/coder/skills/systematic-debugging/SKILL.md +478 -0
- package/kits/coder/skills/systematic-debugging/assets/.gitkeep +1 -0
- package/kits/coder/skills/systematic-debugging/references/deep-dive.md +21 -0
- package/kits/coder/skills/systematic-debugging/scripts/validate.py +56 -0
- package/kits/coder/skills/tailwind-patterns/SKILL.md +395 -0
- package/kits/coder/skills/terraform-patterns/SKILL.md +470 -0
- package/kits/coder/skills/testing-patterns/SKILL.md +285 -0
- package/kits/coder/skills/testing-patterns/assets/.gitkeep +1 -0
- package/kits/coder/skills/testing-patterns/references/deep-dive.md +21 -0
- package/kits/coder/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/kits/coder/skills/testing-patterns/scripts/validate.py +56 -0
- package/kits/coder/skills/typescript-patterns/SKILL.md +417 -0
- package/kits/coder/skills/ui-ux-pro-max/SKILL.md +364 -0
- package/kits/coder/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/kits/coder/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/kits/coder/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/kits/coder/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/kits/coder/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/kits/coder/skills/ui-ux-pro-max/data/prompts.csv +24 -0
- package/kits/coder/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/kits/coder/skills/ui-ux-pro-max/data/styles.csv +59 -0
- package/kits/coder/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/kits/coder/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/kits/coder/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/kits/coder/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/kits/coder/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-314.pyc +0 -0
- package/kits/coder/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-314.pyc +0 -0
- package/kits/coder/skills/ui-ux-pro-max/scripts/core.py +257 -0
- package/kits/coder/skills/ui-ux-pro-max/scripts/design_system.py +488 -0
- package/kits/coder/skills/ui-ux-pro-max/scripts/search.py +76 -0
- package/kits/coder/workflows/.gitkeep +20 -0
- package/kits/coder/workflows/create.md +152 -0
- package/kits/coder/workflows/debug.md +223 -0
- package/kits/coder/workflows/deploy.md +283 -0
- package/kits/coder/workflows/orchestrate.md +243 -0
- package/kits/coder/workflows/plan.md +134 -0
- package/kits/coder/workflows/test.md +237 -0
- package/kits/coder/workflows/ui-ux-pro-max.md +109 -0
- package/package.json +49 -0
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
AGT-Kit Full Verification Suite
|
|
4
|
+
=================================
|
|
5
|
+
|
|
6
|
+
Runs COMPLETE validation including all checks + performance + E2E.
|
|
7
|
+
Use this before deployment or major releases.
|
|
8
|
+
|
|
9
|
+
Usage:
|
|
10
|
+
python .agent/scripts/verify_all.py <project_path> --url <URL>
|
|
11
|
+
python .agent/scripts/verify_all.py . --url http://localhost:3000
|
|
12
|
+
|
|
13
|
+
Includes ALL checks from AGT-Kit skills:
|
|
14
|
+
✅ Security (security-fundamentals, auth-patterns)
|
|
15
|
+
✅ Code Quality (clean-code, testing-patterns)
|
|
16
|
+
✅ Database (database-design, postgres-patterns)
|
|
17
|
+
✅ Frontend (frontend-design, accessibility-patterns)
|
|
18
|
+
✅ SEO (seo-patterns)
|
|
19
|
+
✅ Performance (performance-profiling)
|
|
20
|
+
✅ E2E Testing (e2e-testing)
|
|
21
|
+
✅ Mobile (mobile-design) - if applicable
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
import sys
|
|
25
|
+
import subprocess
|
|
26
|
+
import argparse
|
|
27
|
+
import json
|
|
28
|
+
from pathlib import Path
|
|
29
|
+
from typing import List, Dict, Any, Optional
|
|
30
|
+
from datetime import datetime
|
|
31
|
+
|
|
32
|
+
# ANSI colors
|
|
33
|
+
class Colors:
|
|
34
|
+
HEADER = '\033[95m'
|
|
35
|
+
BLUE = '\033[94m'
|
|
36
|
+
CYAN = '\033[96m'
|
|
37
|
+
GREEN = '\033[92m'
|
|
38
|
+
YELLOW = '\033[93m'
|
|
39
|
+
RED = '\033[91m'
|
|
40
|
+
ENDC = '\033[0m'
|
|
41
|
+
BOLD = '\033[1m'
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def print_header(text: str):
|
|
45
|
+
print(f"\n{Colors.BOLD}{Colors.CYAN}{'='*70}{Colors.ENDC}")
|
|
46
|
+
print(f"{Colors.BOLD}{Colors.CYAN}{text.center(70)}{Colors.ENDC}")
|
|
47
|
+
print(f"{Colors.BOLD}{Colors.CYAN}{'='*70}{Colors.ENDC}\n")
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def print_step(text: str):
|
|
51
|
+
print(f"{Colors.BOLD}{Colors.BLUE}🔄 {text}{Colors.ENDC}")
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def print_success(text: str):
|
|
55
|
+
print(f"{Colors.GREEN}✅ {text}{Colors.ENDC}")
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def print_warning(text: str):
|
|
59
|
+
print(f"{Colors.YELLOW}⚠️ {text}{Colors.ENDC}")
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def print_error(text: str):
|
|
63
|
+
print(f"{Colors.RED}❌ {text}{Colors.ENDC}")
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
# Complete verification suite organized by category
|
|
67
|
+
VERIFICATION_SUITE = [
|
|
68
|
+
# P0: Security (CRITICAL)
|
|
69
|
+
{
|
|
70
|
+
"category": "Security",
|
|
71
|
+
"priority": 0,
|
|
72
|
+
"checks": [
|
|
73
|
+
{"name": "Security Scan", "skill": "security-fundamentals", "script": ".agent/skills/security-fundamentals/scripts/security_scan.py", "required": True},
|
|
74
|
+
{"name": "Dependency Audit", "skill": "security-fundamentals", "script": ".agent/skills/security-fundamentals/scripts/dependency_audit.py", "required": False},
|
|
75
|
+
{"name": "Auth Validation", "skill": "auth-patterns", "script": ".agent/skills/auth-patterns/scripts/auth_validator.py", "required": False},
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
# P1: Code Quality (CRITICAL)
|
|
80
|
+
{
|
|
81
|
+
"category": "Code Quality",
|
|
82
|
+
"priority": 1,
|
|
83
|
+
"checks": [
|
|
84
|
+
{"name": "Lint Check", "skill": "clean-code", "script": ".agent/skills/clean-code/scripts/lint_runner.py", "required": True},
|
|
85
|
+
{"name": "Type Coverage", "skill": "typescript-patterns", "script": ".agent/skills/typescript-patterns/scripts/type_coverage.py", "required": False},
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
# P2: Data Layer
|
|
90
|
+
{
|
|
91
|
+
"category": "Data Layer",
|
|
92
|
+
"priority": 2,
|
|
93
|
+
"checks": [
|
|
94
|
+
{"name": "Schema Validation", "skill": "database-design", "script": ".agent/skills/database-design/scripts/schema_validator.py", "required": False},
|
|
95
|
+
{"name": "PostgreSQL Audit", "skill": "postgres-patterns", "script": ".agent/skills/postgres-patterns/scripts/postgres_audit.py", "required": False},
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
# P3: Testing
|
|
100
|
+
{
|
|
101
|
+
"category": "Testing",
|
|
102
|
+
"priority": 3,
|
|
103
|
+
"checks": [
|
|
104
|
+
{"name": "Test Suite", "skill": "testing-patterns", "script": ".agent/skills/testing-patterns/scripts/test_runner.py", "required": False},
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
# P4: UX & Accessibility
|
|
109
|
+
{
|
|
110
|
+
"category": "UX & Accessibility",
|
|
111
|
+
"priority": 4,
|
|
112
|
+
"checks": [
|
|
113
|
+
{"name": "UX Audit", "skill": "frontend-design", "script": ".agent/skills/frontend-design/scripts/ux_audit.py", "required": False},
|
|
114
|
+
{"name": "Accessibility Check", "skill": "accessibility-patterns", "script": ".agent/skills/accessibility-patterns/scripts/accessibility_checker.py", "required": False},
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
# P5: SEO
|
|
119
|
+
{
|
|
120
|
+
"category": "SEO",
|
|
121
|
+
"priority": 5,
|
|
122
|
+
"checks": [
|
|
123
|
+
{"name": "SEO Check", "skill": "seo-patterns", "script": ".agent/skills/seo-patterns/scripts/seo_checker.py", "required": False},
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
# P6: Performance (requires URL)
|
|
128
|
+
{
|
|
129
|
+
"category": "Performance",
|
|
130
|
+
"priority": 6,
|
|
131
|
+
"requires_url": True,
|
|
132
|
+
"checks": [
|
|
133
|
+
{"name": "Lighthouse Audit", "skill": "performance-profiling", "script": ".agent/skills/performance-profiling/scripts/lighthouse_audit.py", "required": True, "needs_url": True},
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
# P7: E2E Testing (requires URL)
|
|
138
|
+
{
|
|
139
|
+
"category": "E2E Testing",
|
|
140
|
+
"priority": 7,
|
|
141
|
+
"requires_url": True,
|
|
142
|
+
"checks": [
|
|
143
|
+
{"name": "Playwright E2E", "skill": "e2e-testing", "script": ".agent/skills/e2e-testing/scripts/playwright_runner.py", "required": False, "needs_url": True},
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
# P8: Mobile (if applicable)
|
|
148
|
+
{
|
|
149
|
+
"category": "Mobile",
|
|
150
|
+
"priority": 8,
|
|
151
|
+
"checks": [
|
|
152
|
+
{"name": "Mobile Audit", "skill": "mobile-design", "script": ".agent/skills/mobile-design/scripts/mobile_audit.py", "required": False},
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
# P9: API (if applicable)
|
|
157
|
+
{
|
|
158
|
+
"category": "API",
|
|
159
|
+
"priority": 9,
|
|
160
|
+
"checks": [
|
|
161
|
+
{"name": "API Validator", "skill": "api-patterns", "script": ".agent/skills/api-patterns/scripts/api_validator.py", "required": False},
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
]
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
def detect_project_type(project_path: Path) -> Dict[str, Any]:
|
|
168
|
+
"""Detect project type and relevant categories."""
|
|
169
|
+
info = {"type": "unknown", "categories": ["Security", "Code Quality", "Testing"]}
|
|
170
|
+
|
|
171
|
+
if (project_path / "package.json").exists():
|
|
172
|
+
try:
|
|
173
|
+
pkg = json.loads((project_path / "package.json").read_text())
|
|
174
|
+
deps = {**pkg.get("dependencies", {}), **pkg.get("devDependencies", {})}
|
|
175
|
+
|
|
176
|
+
if "next" in deps or "react" in deps:
|
|
177
|
+
info["type"] = "web-frontend"
|
|
178
|
+
info["categories"].extend(["UX & Accessibility", "SEO", "Performance", "E2E Testing"])
|
|
179
|
+
elif "express" in deps or "fastify" in deps:
|
|
180
|
+
info["type"] = "node-backend"
|
|
181
|
+
info["categories"].extend(["Data Layer", "API"])
|
|
182
|
+
else:
|
|
183
|
+
info["type"] = "node"
|
|
184
|
+
except:
|
|
185
|
+
info["type"] = "node"
|
|
186
|
+
|
|
187
|
+
if (project_path / "pubspec.yaml").exists():
|
|
188
|
+
info["type"] = "flutter"
|
|
189
|
+
info["categories"].append("Mobile")
|
|
190
|
+
|
|
191
|
+
if (project_path / "pyproject.toml").exists():
|
|
192
|
+
info["type"] = "python"
|
|
193
|
+
info["categories"].extend(["Data Layer", "API"])
|
|
194
|
+
|
|
195
|
+
return info
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
def run_script(check: Dict[str, Any], project_path: Path, url: Optional[str] = None) -> Dict[str, Any]:
|
|
199
|
+
"""Run validation script."""
|
|
200
|
+
script_path = project_path / check["script"]
|
|
201
|
+
|
|
202
|
+
if not script_path.exists():
|
|
203
|
+
print_warning(f"{check['name']}: Script not found")
|
|
204
|
+
return {
|
|
205
|
+
"name": check["name"],
|
|
206
|
+
"skill": check["skill"],
|
|
207
|
+
"passed": True,
|
|
208
|
+
"skipped": True,
|
|
209
|
+
"duration": 0
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
print_step(f"Running: {check['name']}")
|
|
213
|
+
start_time = datetime.now()
|
|
214
|
+
|
|
215
|
+
# Build command
|
|
216
|
+
cmd = ["python", str(script_path), str(project_path)]
|
|
217
|
+
if url and check.get("needs_url"):
|
|
218
|
+
cmd.append(url)
|
|
219
|
+
|
|
220
|
+
try:
|
|
221
|
+
result = subprocess.run(
|
|
222
|
+
cmd,
|
|
223
|
+
capture_output=True,
|
|
224
|
+
text=True,
|
|
225
|
+
timeout=600 # 10 minute timeout
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
duration = (datetime.now() - start_time).total_seconds()
|
|
229
|
+
passed = result.returncode == 0
|
|
230
|
+
|
|
231
|
+
if passed:
|
|
232
|
+
print_success(f"{check['name']}: PASSED ({duration:.1f}s)")
|
|
233
|
+
else:
|
|
234
|
+
print_error(f"{check['name']}: FAILED ({duration:.1f}s)")
|
|
235
|
+
if result.stderr:
|
|
236
|
+
print(f" {result.stderr[:300]}")
|
|
237
|
+
|
|
238
|
+
return {
|
|
239
|
+
"name": check["name"],
|
|
240
|
+
"skill": check["skill"],
|
|
241
|
+
"passed": passed,
|
|
242
|
+
"output": result.stdout[:2000] if result.stdout else "",
|
|
243
|
+
"error": result.stderr[:500] if result.stderr else "",
|
|
244
|
+
"skipped": False,
|
|
245
|
+
"duration": duration
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
except subprocess.TimeoutExpired:
|
|
249
|
+
duration = (datetime.now() - start_time).total_seconds()
|
|
250
|
+
print_error(f"{check['name']}: TIMEOUT (>{duration:.0f}s)")
|
|
251
|
+
return {"name": check["name"], "skill": check["skill"], "passed": False, "skipped": False, "duration": duration, "error": "Timeout"}
|
|
252
|
+
|
|
253
|
+
except Exception as e:
|
|
254
|
+
duration = (datetime.now() - start_time).total_seconds()
|
|
255
|
+
print_error(f"{check['name']}: ERROR - {str(e)}")
|
|
256
|
+
return {"name": check["name"], "skill": check["skill"], "passed": False, "skipped": False, "duration": duration, "error": str(e)}
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
def print_final_report(results: List[Dict], start_time: datetime, project_info: Dict) -> bool:
|
|
260
|
+
"""Print comprehensive final report."""
|
|
261
|
+
total_duration = (datetime.now() - start_time).total_seconds()
|
|
262
|
+
|
|
263
|
+
print_header("📊 AGT-KIT FULL VERIFICATION REPORT")
|
|
264
|
+
|
|
265
|
+
# Statistics
|
|
266
|
+
total = len(results)
|
|
267
|
+
passed = sum(1 for r in results if r["passed"] and not r.get("skipped"))
|
|
268
|
+
failed = sum(1 for r in results if not r["passed"] and not r.get("skipped"))
|
|
269
|
+
skipped = sum(1 for r in results if r.get("skipped"))
|
|
270
|
+
|
|
271
|
+
print(f"Project Type: {project_info['type']}")
|
|
272
|
+
print(f"Total Duration: {total_duration:.1f}s")
|
|
273
|
+
print(f"Total Checks: {total}")
|
|
274
|
+
print(f"{Colors.GREEN}✅ Passed: {passed}{Colors.ENDC}")
|
|
275
|
+
print(f"{Colors.RED}❌ Failed: {failed}{Colors.ENDC}")
|
|
276
|
+
print(f"{Colors.YELLOW}⏭️ Skipped: {skipped}{Colors.ENDC}")
|
|
277
|
+
print()
|
|
278
|
+
|
|
279
|
+
# Category breakdown
|
|
280
|
+
print(f"{Colors.BOLD}Results by Category:{Colors.ENDC}")
|
|
281
|
+
current_category = None
|
|
282
|
+
for r in results:
|
|
283
|
+
if r.get("category") and r["category"] != current_category:
|
|
284
|
+
current_category = r["category"]
|
|
285
|
+
print(f"\n{Colors.BOLD}{Colors.CYAN}{current_category}:{Colors.ENDC}")
|
|
286
|
+
|
|
287
|
+
if r.get("skipped"):
|
|
288
|
+
status = f"{Colors.YELLOW}⏭️ {Colors.ENDC}"
|
|
289
|
+
elif r["passed"]:
|
|
290
|
+
status = f"{Colors.GREEN}✅{Colors.ENDC}"
|
|
291
|
+
else:
|
|
292
|
+
status = f"{Colors.RED}❌{Colors.ENDC}"
|
|
293
|
+
|
|
294
|
+
duration_str = f"({r.get('duration', 0):.1f}s)" if not r.get("skipped") else ""
|
|
295
|
+
print(f" {status} {r['name']} [{r['skill']}] {duration_str}")
|
|
296
|
+
|
|
297
|
+
print()
|
|
298
|
+
|
|
299
|
+
# Failed checks detail
|
|
300
|
+
if failed > 0:
|
|
301
|
+
print(f"{Colors.BOLD}{Colors.RED}❌ FAILED CHECKS:{Colors.ENDC}")
|
|
302
|
+
for r in results:
|
|
303
|
+
if not r["passed"] and not r.get("skipped"):
|
|
304
|
+
print(f"\n{Colors.RED}✗ {r['name']} ({r['skill']}){Colors.ENDC}")
|
|
305
|
+
if r.get("error"):
|
|
306
|
+
print(f" Error: {r['error'][:200]}")
|
|
307
|
+
print()
|
|
308
|
+
|
|
309
|
+
# Final verdict
|
|
310
|
+
if failed > 0:
|
|
311
|
+
print_error(f"VERIFICATION FAILED - {failed} check(s) need attention")
|
|
312
|
+
print(f"\n{Colors.YELLOW}💡 Tip: Fix critical (Security, Lint) issues first{Colors.ENDC}")
|
|
313
|
+
return False
|
|
314
|
+
else:
|
|
315
|
+
print_success("✨ ALL CHECKS PASSED - Ready for deployment! ✨")
|
|
316
|
+
return True
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
def main():
|
|
320
|
+
parser = argparse.ArgumentParser(
|
|
321
|
+
description="AGT-Kit Full Verification Suite",
|
|
322
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
323
|
+
epilog="""
|
|
324
|
+
Examples:
|
|
325
|
+
python .agent/scripts/verify_all.py . --url http://localhost:3000
|
|
326
|
+
python .agent/scripts/verify_all.py . --url https://staging.example.com --no-e2e
|
|
327
|
+
"""
|
|
328
|
+
)
|
|
329
|
+
parser.add_argument("project", help="Project path to validate")
|
|
330
|
+
parser.add_argument("--url", required=True, help="URL for performance & E2E checks")
|
|
331
|
+
parser.add_argument("--no-e2e", action="store_true", help="Skip E2E tests")
|
|
332
|
+
parser.add_argument("--stop-on-fail", action="store_true", help="Stop on first critical failure")
|
|
333
|
+
|
|
334
|
+
args = parser.parse_args()
|
|
335
|
+
|
|
336
|
+
project_path = Path(args.project).resolve()
|
|
337
|
+
|
|
338
|
+
if not project_path.exists():
|
|
339
|
+
print_error(f"Project path does not exist: {project_path}")
|
|
340
|
+
sys.exit(1)
|
|
341
|
+
|
|
342
|
+
project_info = detect_project_type(project_path)
|
|
343
|
+
|
|
344
|
+
print_header("🚀 AGT-KIT FULL VERIFICATION SUITE")
|
|
345
|
+
print(f"Project: {project_path}")
|
|
346
|
+
print(f"Type: {project_info['type']}")
|
|
347
|
+
print(f"URL: {args.url}")
|
|
348
|
+
print(f"Started: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
|
|
349
|
+
print(f"Relevant Categories: {', '.join(project_info['categories'])}")
|
|
350
|
+
|
|
351
|
+
start_time = datetime.now()
|
|
352
|
+
results = []
|
|
353
|
+
|
|
354
|
+
# Run all verification categories
|
|
355
|
+
for suite in sorted(VERIFICATION_SUITE, key=lambda x: x["priority"]):
|
|
356
|
+
category = suite["category"]
|
|
357
|
+
requires_url = suite.get("requires_url", False)
|
|
358
|
+
|
|
359
|
+
# Skip if category not relevant to project type
|
|
360
|
+
if category not in project_info["categories"]:
|
|
361
|
+
continue
|
|
362
|
+
|
|
363
|
+
# Skip if requires URL and not provided
|
|
364
|
+
if requires_url and not args.url:
|
|
365
|
+
continue
|
|
366
|
+
|
|
367
|
+
# Skip E2E if flag set
|
|
368
|
+
if args.no_e2e and category == "E2E Testing":
|
|
369
|
+
continue
|
|
370
|
+
|
|
371
|
+
print_header(f"📋 {category.upper()}")
|
|
372
|
+
|
|
373
|
+
for check in suite["checks"]:
|
|
374
|
+
result = run_script(check, project_path, args.url)
|
|
375
|
+
result["category"] = category
|
|
376
|
+
results.append(result)
|
|
377
|
+
|
|
378
|
+
# Stop on critical failure if flag set
|
|
379
|
+
if args.stop_on_fail and check["required"] and not result["passed"] and not result.get("skipped"):
|
|
380
|
+
print_error(f"CRITICAL: {check['name']} failed. Stopping.")
|
|
381
|
+
print_final_report(results, start_time, project_info)
|
|
382
|
+
sys.exit(1)
|
|
383
|
+
|
|
384
|
+
# Print final report
|
|
385
|
+
all_passed = print_final_report(results, start_time, project_info)
|
|
386
|
+
|
|
387
|
+
sys.exit(0 if all_passed else 1)
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
if __name__ == "__main__":
|
|
391
|
+
main()
|