@heyai-rules/pilo-masterkit 1.2.2
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/.agent/agents/PILO_MASTER.md +77 -0
- package/.agent/agents/architect.md +211 -0
- package/.agent/agents/backend-specialist.md +263 -0
- package/.agent/agents/build-error-resolver.md +114 -0
- package/.agent/agents/chief-of-staff.md +151 -0
- package/.agent/agents/code-archaeologist.md +106 -0
- package/.agent/agents/code-reviewer.md +237 -0
- package/.agent/agents/cpp-build-resolver.md +90 -0
- package/.agent/agents/cpp-reviewer.md +72 -0
- package/.agent/agents/database-architect.md +226 -0
- package/.agent/agents/database-reviewer.md +91 -0
- package/.agent/agents/debugger.md +225 -0
- package/.agent/agents/devops-engineer.md +242 -0
- package/.agent/agents/doc-updater.md +107 -0
- package/.agent/agents/docs-lookup.md +68 -0
- package/.agent/agents/documentation-writer.md +104 -0
- package/.agent/agents/e2e-runner.md +107 -0
- package/.agent/agents/explorer-agent.md +73 -0
- package/.agent/agents/flutter-reviewer.md +243 -0
- package/.agent/agents/frontend-specialist.md +593 -0
- package/.agent/agents/game-developer.md +162 -0
- package/.agent/agents/go-build-resolver.md +94 -0
- package/.agent/agents/go-reviewer.md +76 -0
- package/.agent/agents/harness-optimizer.md +35 -0
- package/.agent/agents/java-build-resolver.md +153 -0
- package/.agent/agents/java-reviewer.md +92 -0
- package/.agent/agents/kotlin-build-resolver.md +118 -0
- package/.agent/agents/kotlin-reviewer.md +159 -0
- package/.agent/agents/loop-operator.md +36 -0
- package/.agent/agents/mobile-developer.md +377 -0
- package/.agent/agents/orchestrator.md +416 -0
- package/.agent/agents/penetration-tester.md +188 -0
- package/.agent/agents/performance-optimizer.md +187 -0
- package/.agent/agents/planner.md +212 -0
- package/.agent/agents/product-manager.md +112 -0
- package/.agent/agents/product-owner.md +95 -0
- package/.agent/agents/project-planner.md +406 -0
- package/.agent/agents/python-reviewer.md +98 -0
- package/.agent/agents/pytorch-build-resolver.md +120 -0
- package/.agent/agents/qa-automation-engineer.md +103 -0
- package/.agent/agents/refactor-cleaner.md +85 -0
- package/.agent/agents/rust-build-resolver.md +148 -0
- package/.agent/agents/rust-reviewer.md +94 -0
- package/.agent/agents/security-auditor.md +170 -0
- package/.agent/agents/security-reviewer.md +108 -0
- package/.agent/agents/seo-specialist.md +111 -0
- package/.agent/agents/tdd-guide.md +91 -0
- package/.agent/agents/test-engineer.md +158 -0
- package/.agent/agents/typescript-reviewer.md +112 -0
- package/.agent/rules/ARCHITECTURAL_BLUEPRINTS.md +62 -0
- package/.agent/rules/CODE_CRAFTSMANSHIP.md +69 -0
- package/.agent/rules/CORE_RULES.md +72 -0
- package/.agent/rules/PROJECT_MAP.md +58 -0
- package/.agent/rules/QUALITY_ASSURANCE.md +54 -0
- package/.agent/rules/SECURITY_ARMOR.md +44 -0
- package/.agent/rules/VERSION_ORCHESTRATION.md +64 -0
- package/.agent/rules/WORKFLOW_ORCHESTRATION.md +55 -0
- package/.agent/scripts/auto_preview.py +148 -0
- package/.agent/scripts/checklist.py +217 -0
- package/.agent/scripts/session_manager.py +120 -0
- package/.agent/scripts/verify_all.py +327 -0
- package/.agent/skills/api-patterns/SKILL.md +81 -0
- package/.agent/skills/api-patterns/api-style.md +42 -0
- package/.agent/skills/api-patterns/auth.md +24 -0
- package/.agent/skills/api-patterns/documentation.md +26 -0
- package/.agent/skills/api-patterns/graphql.md +41 -0
- package/.agent/skills/api-patterns/rate-limiting.md +31 -0
- package/.agent/skills/api-patterns/response.md +37 -0
- package/.agent/skills/api-patterns/rest.md +40 -0
- package/.agent/skills/api-patterns/scripts/api_validator.py +211 -0
- package/.agent/skills/api-patterns/security-testing.md +122 -0
- package/.agent/skills/api-patterns/trpc.md +41 -0
- package/.agent/skills/api-patterns/versioning.md +22 -0
- package/.agent/skills/app-builder/SKILL.md +75 -0
- package/.agent/skills/app-builder/agent-coordination.md +71 -0
- package/.agent/skills/app-builder/feature-building.md +53 -0
- package/.agent/skills/app-builder/project-detection.md +34 -0
- package/.agent/skills/app-builder/scaffolding.md +118 -0
- package/.agent/skills/app-builder/tech-stack.md +41 -0
- package/.agent/skills/app-builder/templates/SKILL.md +39 -0
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
- package/.agent/skills/architecture/SKILL.md +55 -0
- package/.agent/skills/architecture/context-discovery.md +43 -0
- package/.agent/skills/architecture/examples.md +94 -0
- package/.agent/skills/architecture/pattern-selection.md +68 -0
- package/.agent/skills/architecture/patterns-reference.md +50 -0
- package/.agent/skills/architecture/trade-off-analysis.md +77 -0
- package/.agent/skills/bash-linux/SKILL.md +199 -0
- package/.agent/skills/behavioral-modes/SKILL.md +242 -0
- package/.agent/skills/brainstorming/SKILL.md +163 -0
- package/.agent/skills/brainstorming/dynamic-questioning.md +350 -0
- package/.agent/skills/clean-code/SKILL.md +201 -0
- package/.agent/skills/code-review-checklist/SKILL.md +109 -0
- package/.agent/skills/database-design/SKILL.md +52 -0
- package/.agent/skills/database-design/database-selection.md +43 -0
- package/.agent/skills/database-design/indexing.md +39 -0
- package/.agent/skills/database-design/migrations.md +48 -0
- package/.agent/skills/database-design/optimization.md +36 -0
- package/.agent/skills/database-design/orm-selection.md +30 -0
- package/.agent/skills/database-design/schema-design.md +56 -0
- package/.agent/skills/database-design/scripts/schema_validator.py +172 -0
- package/.agent/skills/deployment-procedures/SKILL.md +241 -0
- package/.agent/skills/doc.md +177 -0
- package/.agent/skills/documentation-templates/SKILL.md +194 -0
- package/.agent/skills/frontend-design/SKILL.md +452 -0
- package/.agent/skills/frontend-design/animation-guide.md +331 -0
- package/.agent/skills/frontend-design/color-system.md +311 -0
- package/.agent/skills/frontend-design/decision-trees.md +418 -0
- package/.agent/skills/frontend-design/motion-graphics.md +306 -0
- package/.agent/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/.agent/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/.agent/skills/frontend-design/typography-system.md +345 -0
- package/.agent/skills/frontend-design/ux-psychology.md +1116 -0
- package/.agent/skills/frontend-design/visual-effects.md +383 -0
- package/.agent/skills/game-development/2d-games/SKILL.md +119 -0
- package/.agent/skills/game-development/3d-games/SKILL.md +135 -0
- package/.agent/skills/game-development/SKILL.md +167 -0
- package/.agent/skills/game-development/game-art/SKILL.md +185 -0
- package/.agent/skills/game-development/game-audio/SKILL.md +190 -0
- package/.agent/skills/game-development/game-design/SKILL.md +129 -0
- package/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
- package/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
- package/.agent/skills/game-development/pc-games/SKILL.md +144 -0
- package/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
- package/.agent/skills/game-development/web-games/SKILL.md +150 -0
- package/.agent/skills/geo-fundamentals/SKILL.md +156 -0
- package/.agent/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/.agent/skills/i18n-localization/SKILL.md +154 -0
- package/.agent/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/.agent/skills/intelligent-routing/SKILL.md +335 -0
- package/.agent/skills/lint-and-validate/SKILL.md +45 -0
- package/.agent/skills/lint-and-validate/scripts/lint_runner.py +184 -0
- package/.agent/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/.agent/skills/mcp-builder/SKILL.md +176 -0
- package/.agent/skills/mobile-design/SKILL.md +394 -0
- package/.agent/skills/mobile-design/decision-trees.md +516 -0
- package/.agent/skills/mobile-design/mobile-backend.md +491 -0
- package/.agent/skills/mobile-design/mobile-color-system.md +420 -0
- package/.agent/skills/mobile-design/mobile-debugging.md +122 -0
- package/.agent/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/.agent/skills/mobile-design/mobile-navigation.md +458 -0
- package/.agent/skills/mobile-design/mobile-performance.md +767 -0
- package/.agent/skills/mobile-design/mobile-testing.md +356 -0
- package/.agent/skills/mobile-design/mobile-typography.md +433 -0
- package/.agent/skills/mobile-design/platform-android.md +666 -0
- package/.agent/skills/mobile-design/platform-ios.md +561 -0
- package/.agent/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/.agent/skills/mobile-design/touch-psychology.md +537 -0
- package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +351 -0
- package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
- package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
- package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
- package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
- package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
- package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
- package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
- package/.agent/skills/nextjs-react-expert/9-cache-components.md +103 -0
- package/.agent/skills/nextjs-react-expert/SKILL.md +293 -0
- package/.agent/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
- package/.agent/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
- package/.agent/skills/nodejs-best-practices/SKILL.md +333 -0
- package/.agent/skills/parallel-agents/SKILL.md +175 -0
- package/.agent/skills/performance-profiling/SKILL.md +143 -0
- package/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/.agent/skills/plan-writing/SKILL.md +152 -0
- package/.agent/skills/powershell-windows/SKILL.md +167 -0
- package/.agent/skills/python-patterns/SKILL.md +441 -0
- package/.agent/skills/red-team-tactics/SKILL.md +199 -0
- package/.agent/skills/rust-pro/SKILL.md +176 -0
- package/.agent/skills/seo-fundamentals/SKILL.md +129 -0
- package/.agent/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/.agent/skills/server-management/SKILL.md +161 -0
- package/.agent/skills/systematic-debugging/SKILL.md +109 -0
- package/.agent/skills/tailwind-patterns/SKILL.md +269 -0
- package/.agent/skills/tdd-workflow/SKILL.md +149 -0
- package/.agent/skills/testing-patterns/SKILL.md +178 -0
- package/.agent/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/.agent/skills/ui-ux-pro-max/SKILL.md +292 -0
- package/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/.agent/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/.agent/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.agent/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/.agent/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.agent/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/.agent/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-314.pyc +0 -0
- package/.agent/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-314.pyc +0 -0
- package/.agent/skills/ui-ux-pro-max/scripts/__pycache__/search.cpython-314.pyc +0 -0
- package/.agent/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/.agent/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/.agent/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/.agent/skills/vulnerability-scanner/SKILL.md +276 -0
- package/.agent/skills/vulnerability-scanner/checklists.md +121 -0
- package/.agent/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/.agent/skills/web-design-guidelines/SKILL.md +57 -0
- package/.agent/skills/webapp-testing/SKILL.md +187 -0
- package/.agent/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/.agent/tasks/lessons.md +40 -0
- package/.agent/tasks/todo.md +33 -0
- package/.agent/workflows/aside.md +164 -0
- package/.agent/workflows/brainstorm.md +113 -0
- package/.agent/workflows/build-fix.md +62 -0
- package/.agent/workflows/checkpoint.md +74 -0
- package/.agent/workflows/claw.md +51 -0
- package/.agent/workflows/code-review.md +40 -0
- package/.agent/workflows/context-budget.md +29 -0
- package/.agent/workflows/cpp-build.md +173 -0
- package/.agent/workflows/cpp-review.md +132 -0
- package/.agent/workflows/cpp-test.md +251 -0
- package/.agent/workflows/create.md +59 -0
- package/.agent/workflows/debug.md +103 -0
- package/.agent/workflows/deploy.md +176 -0
- package/.agent/workflows/devfleet.md +92 -0
- package/.agent/workflows/docs.md +31 -0
- package/.agent/workflows/e2e.md +365 -0
- package/.agent/workflows/enhance.md +63 -0
- package/.agent/workflows/eval.md +120 -0
- package/.agent/workflows/evolve.md +178 -0
- package/.agent/workflows/go-build.md +183 -0
- package/.agent/workflows/go-review.md +148 -0
- package/.agent/workflows/go-test.md +268 -0
- package/.agent/workflows/gradle-build.md +70 -0
- package/.agent/workflows/harness-audit.md +71 -0
- package/.agent/workflows/init-docs.md +46 -0
- package/.agent/workflows/instinct-export.md +66 -0
- package/.agent/workflows/instinct-import.md +114 -0
- package/.agent/workflows/instinct-status.md +59 -0
- package/.agent/workflows/kotlin-build.md +174 -0
- package/.agent/workflows/kotlin-review.md +140 -0
- package/.agent/workflows/kotlin-test.md +312 -0
- package/.agent/workflows/learn-eval.md +116 -0
- package/.agent/workflows/learn.md +70 -0
- package/.agent/workflows/loop-start.md +32 -0
- package/.agent/workflows/loop-status.md +24 -0
- package/.agent/workflows/model-route.md +26 -0
- package/.agent/workflows/multi-backend.md +158 -0
- package/.agent/workflows/multi-execute.md +315 -0
- package/.agent/workflows/multi-frontend.md +158 -0
- package/.agent/workflows/multi-plan.md +268 -0
- package/.agent/workflows/multi-workflow.md +191 -0
- package/.agent/workflows/orchestrate.md +231 -0
- package/.agent/workflows/plan.md +115 -0
- package/.agent/workflows/pm2.md +272 -0
- package/.agent/workflows/preview.md +81 -0
- package/.agent/workflows/projects.md +39 -0
- package/.agent/workflows/promote.md +41 -0
- package/.agent/workflows/prompt-optimize.md +38 -0
- package/.agent/workflows/prune.md +31 -0
- package/.agent/workflows/python-review.md +297 -0
- package/.agent/workflows/quality-gate.md +29 -0
- package/.agent/workflows/refactor-clean.md +80 -0
- package/.agent/workflows/resume-session.md +156 -0
- package/.agent/workflows/rules-distill.md +11 -0
- package/.agent/workflows/rust-build.md +187 -0
- package/.agent/workflows/rust-review.md +142 -0
- package/.agent/workflows/rust-test.md +308 -0
- package/.agent/workflows/save-session.md +275 -0
- package/.agent/workflows/sessions.md +333 -0
- package/.agent/workflows/setup-pm.md +80 -0
- package/.agent/workflows/skill-create.md +174 -0
- package/.agent/workflows/skill-health.md +54 -0
- package/.agent/workflows/status.md +86 -0
- package/.agent/workflows/tdd.md +328 -0
- package/.agent/workflows/test-coverage.md +69 -0
- package/.agent/workflows/test.md +144 -0
- package/.agent/workflows/ui-ux-pro-max.md +296 -0
- package/.agent/workflows/update-codemaps.md +72 -0
- package/.agent/workflows/update-docs.md +84 -0
- package/.agent/workflows/verify.md +59 -0
- package/LICENSE +176 -0
- package/README.md +136 -0
- package/RELEASE.md +36 -0
- package/package.json +79 -0
- package/scripts/release-check.js +55 -0
- package/src/bin/cli.js +78 -0
- package/src/lib/installer.js +140 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Skill: webapp-testing
|
|
4
|
+
Script: playwright_runner.py
|
|
5
|
+
Purpose: Run basic Playwright browser tests
|
|
6
|
+
Usage: python playwright_runner.py <url> [--screenshot]
|
|
7
|
+
Output: JSON with page info, health status, and optional screenshot path
|
|
8
|
+
Note: Requires playwright (pip install playwright && playwright install chromium)
|
|
9
|
+
Screenshots: Saved to system temp directory (auto-cleaned by OS)
|
|
10
|
+
"""
|
|
11
|
+
import sys
|
|
12
|
+
import json
|
|
13
|
+
import os
|
|
14
|
+
import tempfile
|
|
15
|
+
from datetime import datetime
|
|
16
|
+
|
|
17
|
+
# Fix Windows console encoding for Unicode output
|
|
18
|
+
try:
|
|
19
|
+
sys.stdout.reconfigure(encoding='utf-8', errors='replace')
|
|
20
|
+
sys.stderr.reconfigure(encoding='utf-8', errors='replace')
|
|
21
|
+
except AttributeError:
|
|
22
|
+
pass # Python < 3.7
|
|
23
|
+
|
|
24
|
+
try:
|
|
25
|
+
from playwright.sync_api import sync_playwright
|
|
26
|
+
PLAYWRIGHT_AVAILABLE = True
|
|
27
|
+
except ImportError:
|
|
28
|
+
PLAYWRIGHT_AVAILABLE = False
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def run_basic_test(url: str, take_screenshot: bool = False) -> dict:
|
|
32
|
+
"""Run basic browser test on URL."""
|
|
33
|
+
if not PLAYWRIGHT_AVAILABLE:
|
|
34
|
+
return {
|
|
35
|
+
"error": "Playwright not installed",
|
|
36
|
+
"fix": "pip install playwright && playwright install chromium"
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
result = {
|
|
40
|
+
"url": url,
|
|
41
|
+
"timestamp": datetime.now().isoformat(),
|
|
42
|
+
"status": "pending"
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
try:
|
|
46
|
+
with sync_playwright() as p:
|
|
47
|
+
browser = p.chromium.launch(headless=True)
|
|
48
|
+
context = browser.new_context(
|
|
49
|
+
viewport={"width": 1280, "height": 720},
|
|
50
|
+
user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
|
|
51
|
+
)
|
|
52
|
+
page = context.new_page()
|
|
53
|
+
|
|
54
|
+
# Navigate
|
|
55
|
+
response = page.goto(url, wait_until="networkidle", timeout=30000)
|
|
56
|
+
|
|
57
|
+
# Basic info
|
|
58
|
+
result["page"] = {
|
|
59
|
+
"title": page.title(),
|
|
60
|
+
"url": page.url,
|
|
61
|
+
"status_code": response.status if response else None
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
# Health checks
|
|
65
|
+
result["health"] = {
|
|
66
|
+
"loaded": response.ok if response else False,
|
|
67
|
+
"has_title": bool(page.title()),
|
|
68
|
+
"has_h1": page.locator("h1").count() > 0,
|
|
69
|
+
"has_links": page.locator("a").count() > 0,
|
|
70
|
+
"has_images": page.locator("img").count() > 0
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
# Console errors
|
|
74
|
+
console_errors = []
|
|
75
|
+
page.on("console", lambda msg: console_errors.append(msg.text) if msg.type == "error" else None)
|
|
76
|
+
|
|
77
|
+
# Performance metrics
|
|
78
|
+
result["performance"] = {
|
|
79
|
+
"dom_content_loaded": page.evaluate("window.performance.timing.domContentLoadedEventEnd - window.performance.timing.navigationStart"),
|
|
80
|
+
"load_complete": page.evaluate("window.performance.timing.loadEventEnd - window.performance.timing.navigationStart")
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
# Screenshot - uses system temp directory (cross-platform, auto-cleaned)
|
|
84
|
+
if take_screenshot:
|
|
85
|
+
# Cross-platform: Windows=%TEMP%, Linux/macOS=/tmp
|
|
86
|
+
screenshot_dir = os.path.join(tempfile.gettempdir(), "maestro_screenshots")
|
|
87
|
+
os.makedirs(screenshot_dir, exist_ok=True)
|
|
88
|
+
screenshot_path = os.path.join(screenshot_dir, f"screenshot_{datetime.now().strftime('%Y%m%d_%H%M%S')}.png")
|
|
89
|
+
page.screenshot(path=screenshot_path, full_page=True)
|
|
90
|
+
result["screenshot"] = screenshot_path
|
|
91
|
+
result["screenshot_note"] = "Saved to temp directory (auto-cleaned by OS)"
|
|
92
|
+
|
|
93
|
+
# Element counts
|
|
94
|
+
result["elements"] = {
|
|
95
|
+
"links": page.locator("a").count(),
|
|
96
|
+
"buttons": page.locator("button").count(),
|
|
97
|
+
"inputs": page.locator("input").count(),
|
|
98
|
+
"images": page.locator("img").count(),
|
|
99
|
+
"forms": page.locator("form").count()
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
browser.close()
|
|
103
|
+
|
|
104
|
+
result["status"] = "success" if result["health"]["loaded"] else "failed"
|
|
105
|
+
result["summary"] = "[OK] Page loaded successfully" if result["status"] == "success" else "[X] Page failed to load"
|
|
106
|
+
|
|
107
|
+
except Exception as e:
|
|
108
|
+
result["status"] = "error"
|
|
109
|
+
result["error"] = str(e)
|
|
110
|
+
result["summary"] = f"[X] Error: {str(e)[:100]}"
|
|
111
|
+
|
|
112
|
+
return result
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def run_accessibility_check(url: str) -> dict:
|
|
116
|
+
"""Run basic accessibility check."""
|
|
117
|
+
if not PLAYWRIGHT_AVAILABLE:
|
|
118
|
+
return {"error": "Playwright not installed"}
|
|
119
|
+
|
|
120
|
+
result = {"url": url, "accessibility": {}}
|
|
121
|
+
|
|
122
|
+
try:
|
|
123
|
+
with sync_playwright() as p:
|
|
124
|
+
browser = p.chromium.launch(headless=True)
|
|
125
|
+
page = browser.new_page()
|
|
126
|
+
page.goto(url, wait_until="networkidle", timeout=30000)
|
|
127
|
+
|
|
128
|
+
# Basic a11y checks
|
|
129
|
+
result["accessibility"] = {
|
|
130
|
+
"images_with_alt": page.locator("img[alt]").count(),
|
|
131
|
+
"images_without_alt": page.locator("img:not([alt])").count(),
|
|
132
|
+
"buttons_with_label": page.locator("button[aria-label], button:has-text('')").count(),
|
|
133
|
+
"links_with_text": page.locator("a:has-text('')").count(),
|
|
134
|
+
"form_labels": page.locator("label").count(),
|
|
135
|
+
"headings": {
|
|
136
|
+
"h1": page.locator("h1").count(),
|
|
137
|
+
"h2": page.locator("h2").count(),
|
|
138
|
+
"h3": page.locator("h3").count()
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
browser.close()
|
|
143
|
+
result["status"] = "success"
|
|
144
|
+
|
|
145
|
+
except Exception as e:
|
|
146
|
+
result["status"] = "error"
|
|
147
|
+
result["error"] = str(e)
|
|
148
|
+
|
|
149
|
+
return result
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
if __name__ == "__main__":
|
|
153
|
+
if len(sys.argv) < 2:
|
|
154
|
+
print(json.dumps({
|
|
155
|
+
"error": "Usage: python playwright_runner.py <url> [--screenshot] [--a11y]",
|
|
156
|
+
"examples": [
|
|
157
|
+
"python playwright_runner.py https://example.com",
|
|
158
|
+
"python playwright_runner.py https://example.com --screenshot",
|
|
159
|
+
"python playwright_runner.py https://example.com --a11y"
|
|
160
|
+
]
|
|
161
|
+
}, indent=2))
|
|
162
|
+
sys.exit(1)
|
|
163
|
+
|
|
164
|
+
url = sys.argv[1]
|
|
165
|
+
take_screenshot = "--screenshot" in sys.argv
|
|
166
|
+
check_a11y = "--a11y" in sys.argv
|
|
167
|
+
|
|
168
|
+
if check_a11y:
|
|
169
|
+
result = run_accessibility_check(url)
|
|
170
|
+
else:
|
|
171
|
+
result = run_basic_test(url, take_screenshot)
|
|
172
|
+
|
|
173
|
+
print(json.dumps(result, indent=2))
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# 💡 Lessons Learned / Nhật ký Học tập
|
|
2
|
+
|
|
3
|
+
> **Dự án**: Pilo Masterkit
|
|
4
|
+
> **Vai trò**: Lưu trữ tri thức, quyết định quan trọng và bài học rút ra giữa các phiên làm việc.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 📅 [2026-03-29] - Khởi tạo Pilo Masterkit (Refactor v1.0.0)
|
|
9
|
+
|
|
10
|
+
### 🎯 Mục tiêu
|
|
11
|
+
- **Thay đổi thương hiệu**: Đổi tên từ `heyai-ruleset` sang `pilo-masterkit` để chuyên nghiệp hơn.
|
|
12
|
+
- **Mô-đun hóa cực hạn**: Áp dụng cấu trúc `.agent/` chuẩn (Agents, Skills, Workflows, Rules, Scripts).
|
|
13
|
+
- **Hợp nhất tri thức**: Tích hợp các quy tắc tinh hoa từ Antigravity, UI/UX Pro và Claude ECC.
|
|
14
|
+
|
|
15
|
+
### ✅ Quyết định Cốt lõi
|
|
16
|
+
- **Chỉ định Nhân dạng**: `PILO_MASTER.md` trở thành nhân dạng trung tâm điều phối.
|
|
17
|
+
- **Quy tắc Ưu tiên**: Thiết lập `CORE_RULES.md` (P0) làm hiến chương bất biến (PDCA, Socratic Gate).
|
|
18
|
+
- **Copy-Paste Thông minh**: Tận dụng trực tiếp các bộ kỹ năng (Skills) và kịch bản (Scripts) chuẩn của thế giới thay vì tự tạo lại.
|
|
19
|
+
|
|
20
|
+
### 💡 Bài học kinh nghiệm
|
|
21
|
+
- **Markdown Linting**: Sử dụng cách tiếp cận "Clean Rewrite" (dùng `write_to_file`) cho các file rule quan trọng để đảm bảo tính nhất quán cao nhất.
|
|
22
|
+
- **Tên thư mục ẩn**: Việc sử dụng `.agent/` giúp AI dễ dàng nhận diện và tự động nạp tri thức mà không cần người dùng chỉ định thủ công.
|
|
23
|
+
|
|
24
|
+
### 🚀 Nhiệm vụ Chờ thực hiện (Pending)
|
|
25
|
+
- Cần chạy hậu kiểm tất cả các kỹ năng vừa copy để đảm bảo đường dẫn tài sản (`assets/`) và tham chiếu chéo (`references/`) không bị hỏng.
|
|
26
|
+
- Nâng cấp `SYSTEM_DESIGN.md` theo mô hình "Master + Overrides" của UI/UX Pro.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 📅 [2026-03-18] - Standardizing AI Identity & Operations (Từ bộ tài liệu cũ)
|
|
31
|
+
|
|
32
|
+
### ✅ Quyết định quan trọng
|
|
33
|
+
- **Standardized Navigation**: Di chuyển các file lẻ tẻ vào `documentation/` (tại thời điểm đó).
|
|
34
|
+
- **Identity Enforcement**: Hợp nhất danh tính và triết lý vận hành vào `IDENTITY_SOUL.md`.
|
|
35
|
+
|
|
36
|
+
### 💡 Bài học kinh nghiệm
|
|
37
|
+
- Việc sử dụng `multi_replace_file_content` đôi khi gây ra sự trùng lặp nếu phạm vi không chuẩn.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
> *"Memory is the bridge between instructions and execution."*
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# 📋 Task List / Danh sách Nhiệm vụ
|
|
2
|
+
|
|
3
|
+
> **Dự án**: Pilo Masterkit
|
|
4
|
+
> **Trạng thái**: Đang thực hiện Refactor tổng thể v1.0.0
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 🏃 Nhiệm vụ hiện tại: Project Refactor
|
|
9
|
+
|
|
10
|
+
- [x] Đổi tên dự án trong `package.json` thành `pilo-masterkit`.
|
|
11
|
+
- [x] Khởi tạo cấu trúc thư mục `.agent/`.
|
|
12
|
+
- [x] Di chuyển 125+ kỹ năng tinh hoa (Antigravity & UI/UX Pro).
|
|
13
|
+
- [x] Di chuyển 20+ nhân dạng Agent chuyên gia (Antigravity & ECC).
|
|
14
|
+
- [x] Di chuyển 60+ quy trình lệnh Slash Command.
|
|
15
|
+
- [x] Di chuyển 4 kịch bản Master Audit (`checklist.py`, `verify_all.py`).
|
|
16
|
+
- [x] Refactor `IDENTITY_SOUL.md` -> `.agent/agents/PILO_MASTER.md`.
|
|
17
|
+
- [x] Refactor `PROTOCOLS.md` & `RULES.md` -> `.agent/rules/CORE_RULES.md`.
|
|
18
|
+
- [x] Refactor `MAP.md` -> `.agent/rules/PROJECT_MAP.md`.
|
|
19
|
+
- [x] Refactor `SECURITY.md` -> `.agent/rules/SECURITY_ARMOR.md`.
|
|
20
|
+
- [/] Refactor `MEMORIES.md` -> `.agent/tasks/lessons.md`.
|
|
21
|
+
- [ ] Refactor `SYSTEM_DESIGN.md`, `CODE_STANDARDS.md`, `TESTING_POLICY.md`, `GIT_WORKFLOW.md`.
|
|
22
|
+
- [ ] Dọn dẹp thư mục `products/` (Xóa các file đã refactor xong).
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 🚀 Nhiệm vụ tiếp theo
|
|
27
|
+
|
|
28
|
+
1. **Hoàn thiện bộ tiêu chuẩn kỹ thuật**: Nâng cấp các file tiêu chuẩn (Code, Design, Test, Git) lên chuẩn chuyên nghiệp.
|
|
29
|
+
2. **Xác minh hệ thống**: Chạy thử các Agent và Kỹ năng mới nạp.
|
|
30
|
+
3. **Cập nhật README.md**: Phản ánh đầy đủ cấu trúc và tên mới của dự án.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
> *"Plan before you execute. Measure before you commit."*
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Answer a quick side question without interrupting or losing context from the current task. Resume work automatically after answering.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Aside Command
|
|
6
|
+
|
|
7
|
+
Ask a question mid-task and get an immediate, focused answer — then continue right where you left off. The current task, files, and context are never modified.
|
|
8
|
+
|
|
9
|
+
## When to Use
|
|
10
|
+
|
|
11
|
+
- You're curious about something while Claude is working and don't want to lose momentum
|
|
12
|
+
- You need a quick explanation of code Claude is currently editing
|
|
13
|
+
- You want a second opinion or clarification on a decision without derailing the task
|
|
14
|
+
- You need to understand an error, concept, or pattern before Claude proceeds
|
|
15
|
+
- You want to ask something unrelated to the current task without starting a new session
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/aside <your question>
|
|
21
|
+
/aside what does this function actually return?
|
|
22
|
+
/aside is this pattern thread-safe?
|
|
23
|
+
/aside why are we using X instead of Y here?
|
|
24
|
+
/aside what's the difference between foo() and bar()?
|
|
25
|
+
/aside should we be worried about the N+1 query we just added?
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Process
|
|
29
|
+
|
|
30
|
+
### Step 1: Freeze the current task state
|
|
31
|
+
|
|
32
|
+
Before answering anything, mentally note:
|
|
33
|
+
- What is the active task? (what file, feature, or problem was being worked on)
|
|
34
|
+
- What step was in progress at the moment `/aside` was invoked?
|
|
35
|
+
- What was about to happen next?
|
|
36
|
+
|
|
37
|
+
Do NOT touch, edit, create, or delete any files during the aside.
|
|
38
|
+
|
|
39
|
+
### Step 2: Answer the question directly
|
|
40
|
+
|
|
41
|
+
Answer the question in the most concise form that is still complete and useful.
|
|
42
|
+
|
|
43
|
+
- Lead with the answer, not the reasoning
|
|
44
|
+
- Keep it short — if a full explanation is needed, offer to go deeper after the task
|
|
45
|
+
- If the question is about the current file or code being worked on, reference it precisely (file path and line number if relevant)
|
|
46
|
+
- If answering requires reading a file, read it — but read only, never write
|
|
47
|
+
|
|
48
|
+
Format the response as:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
ASIDE: [restate the question briefly]
|
|
52
|
+
|
|
53
|
+
[Your answer here]
|
|
54
|
+
|
|
55
|
+
— Back to task: [one-line description of what was being done]
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Step 3: Resume the main task
|
|
59
|
+
|
|
60
|
+
After delivering the answer, immediately continue the active task from the exact point it was paused. Do not ask for permission to resume unless the aside answer revealed a blocker or a reason to reconsider the current approach (see Edge Cases).
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Edge Cases
|
|
65
|
+
|
|
66
|
+
**No question provided (`/aside` with nothing after it):**
|
|
67
|
+
Respond:
|
|
68
|
+
```
|
|
69
|
+
ASIDE: no question provided
|
|
70
|
+
|
|
71
|
+
What would you like to know? (ask your question and I'll answer without losing the current task context)
|
|
72
|
+
|
|
73
|
+
— Back to task: [one-line description of what was being done]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Question reveals a potential problem with the current task:**
|
|
77
|
+
Flag it clearly before resuming:
|
|
78
|
+
```
|
|
79
|
+
ASIDE: [answer]
|
|
80
|
+
|
|
81
|
+
⚠️ Note: This answer suggests [issue] with the current approach. Want to address this before continuing, or proceed as planned?
|
|
82
|
+
```
|
|
83
|
+
Wait for the user's decision before resuming.
|
|
84
|
+
|
|
85
|
+
**Question is actually a task redirect (not a side question):**
|
|
86
|
+
If the question implies changing what is being built (e.g., `/aside actually, let's use Redis instead`), clarify:
|
|
87
|
+
```
|
|
88
|
+
ASIDE: That sounds like a direction change, not just a side question.
|
|
89
|
+
Do you want to:
|
|
90
|
+
(a) Answer this as information only and keep the current plan
|
|
91
|
+
(b) Pause the current task and change approach
|
|
92
|
+
```
|
|
93
|
+
Wait for the user's answer — do not make assumptions.
|
|
94
|
+
|
|
95
|
+
**Question is about the currently open file or code:**
|
|
96
|
+
Answer from the live context. If the file was read earlier in the session, reference it directly. If not, read it now (read-only) and answer with a file:line reference.
|
|
97
|
+
|
|
98
|
+
**No active task (nothing in progress when `/aside` is invoked):**
|
|
99
|
+
Still use the standard wrapper so the response shape stays consistent:
|
|
100
|
+
```
|
|
101
|
+
ASIDE: [restate the question briefly]
|
|
102
|
+
|
|
103
|
+
[Your answer here]
|
|
104
|
+
|
|
105
|
+
— Back to task: no active task to resume
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Question requires a long answer:**
|
|
109
|
+
Give the essential answer concisely, then offer:
|
|
110
|
+
```
|
|
111
|
+
That's the short version. Want a deeper explanation after we finish [current task]?
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Multiple `/aside` questions in a row:**
|
|
115
|
+
Answer each one in sequence. After the last answer, resume the main task. Do not lose task state across a chain of asides.
|
|
116
|
+
|
|
117
|
+
**Aside answer implies a code change is needed:**
|
|
118
|
+
Note the change needed but do not make it during the aside:
|
|
119
|
+
```
|
|
120
|
+
ASIDE: [answer]
|
|
121
|
+
|
|
122
|
+
📝 Worth fixing: [what should be changed]. I'll flag this after the current task unless you want to address it now.
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Question is ambiguous or too vague:**
|
|
126
|
+
Ask one clarifying question — the shortest question that gets the information needed to answer. Do not ask multiple questions.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Example Output
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
User: /aside what does fetchWithRetry() actually do?
|
|
134
|
+
|
|
135
|
+
ASIDE: what does fetchWithRetry() do?
|
|
136
|
+
|
|
137
|
+
fetchWithRetry() (src/api/retry.ts:12) attempts the request up to 3 times with
|
|
138
|
+
exponential backoff (250ms → 500ms → 1s). It only retries on 5xx responses and
|
|
139
|
+
network errors — 4xx errors are treated as final and not retried.
|
|
140
|
+
|
|
141
|
+
— Back to task: refactoring the auth middleware in src/middleware/auth.ts
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
User: /aside is the approach we're taking thread-safe?
|
|
146
|
+
|
|
147
|
+
ASIDE: is the current approach thread-safe?
|
|
148
|
+
|
|
149
|
+
No — the shared cache object in src/cache/store.ts:34 is mutated without locking.
|
|
150
|
+
Under concurrent requests this is a race condition. It's low risk in a single-process
|
|
151
|
+
Node.js server but would be a real problem with worker threads or clustering.
|
|
152
|
+
|
|
153
|
+
⚠️ Note: This could affect the feature we're building. Want to address this now or continue and fix it in a follow-up?
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Notes
|
|
159
|
+
|
|
160
|
+
- Never modify files during an aside — read-only access only
|
|
161
|
+
- The aside is a conversation pause, not a new task — the original task must always resume
|
|
162
|
+
- Keep answers focused: the goal is to unblock the user quickly, not to deliver a lecture
|
|
163
|
+
- If an aside sparks a larger discussion, finish the current task first unless the aside reveals a blocker
|
|
164
|
+
- Asides are not saved to session files unless explicitly relevant to the task outcome
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Structured brainstorming for projects and features. Explores multiple options before implementation.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /brainstorm - Structured Idea Exploration
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Purpose
|
|
12
|
+
|
|
13
|
+
This command activates BRAINSTORM mode for structured idea exploration. Use when you need to explore options before committing to an implementation.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Behavior
|
|
18
|
+
|
|
19
|
+
When `/brainstorm` is triggered:
|
|
20
|
+
|
|
21
|
+
1. **Understand the goal**
|
|
22
|
+
- What problem are we solving?
|
|
23
|
+
- Who is the user?
|
|
24
|
+
- What constraints exist?
|
|
25
|
+
|
|
26
|
+
2. **Generate options**
|
|
27
|
+
- Provide at least 3 different approaches
|
|
28
|
+
- Each with pros and cons
|
|
29
|
+
- Consider unconventional solutions
|
|
30
|
+
|
|
31
|
+
3. **Compare and recommend**
|
|
32
|
+
- Summarize tradeoffs
|
|
33
|
+
- Give a recommendation with reasoning
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Output Format
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
## 🧠 Brainstorm: [Topic]
|
|
41
|
+
|
|
42
|
+
### Context
|
|
43
|
+
[Brief problem statement]
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
### Option A: [Name]
|
|
48
|
+
[Description]
|
|
49
|
+
|
|
50
|
+
✅ **Pros:**
|
|
51
|
+
- [benefit 1]
|
|
52
|
+
- [benefit 2]
|
|
53
|
+
|
|
54
|
+
❌ **Cons:**
|
|
55
|
+
- [drawback 1]
|
|
56
|
+
|
|
57
|
+
📊 **Effort:** Low | Medium | High
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
### Option B: [Name]
|
|
62
|
+
[Description]
|
|
63
|
+
|
|
64
|
+
✅ **Pros:**
|
|
65
|
+
- [benefit 1]
|
|
66
|
+
|
|
67
|
+
❌ **Cons:**
|
|
68
|
+
- [drawback 1]
|
|
69
|
+
- [drawback 2]
|
|
70
|
+
|
|
71
|
+
📊 **Effort:** Low | Medium | High
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
### Option C: [Name]
|
|
76
|
+
[Description]
|
|
77
|
+
|
|
78
|
+
✅ **Pros:**
|
|
79
|
+
- [benefit 1]
|
|
80
|
+
|
|
81
|
+
❌ **Cons:**
|
|
82
|
+
- [drawback 1]
|
|
83
|
+
|
|
84
|
+
📊 **Effort:** Low | Medium | High
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 💡 Recommendation
|
|
89
|
+
|
|
90
|
+
**Option [X]** because [reasoning].
|
|
91
|
+
|
|
92
|
+
What direction would you like to explore?
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Examples
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
/brainstorm authentication system
|
|
101
|
+
/brainstorm state management for complex form
|
|
102
|
+
/brainstorm database schema for social app
|
|
103
|
+
/brainstorm caching strategy
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Key Principles
|
|
109
|
+
|
|
110
|
+
- **No code** - this is about ideas, not implementation
|
|
111
|
+
- **Visual when helpful** - use diagrams for architecture
|
|
112
|
+
- **Honest tradeoffs** - don't hide complexity
|
|
113
|
+
- **Defer to user** - present options, let them decide
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Build and Fix
|
|
2
|
+
|
|
3
|
+
Incrementally fix build and type errors with minimal, safe changes.
|
|
4
|
+
|
|
5
|
+
## Step 1: Detect Build System
|
|
6
|
+
|
|
7
|
+
Identify the project's build tool and run the build:
|
|
8
|
+
|
|
9
|
+
| Indicator | Build Command |
|
|
10
|
+
|-----------|---------------|
|
|
11
|
+
| `package.json` with `build` script | `npm run build` or `pnpm build` |
|
|
12
|
+
| `tsconfig.json` (TypeScript only) | `npx tsc --noEmit` |
|
|
13
|
+
| `Cargo.toml` | `cargo build 2>&1` |
|
|
14
|
+
| `pom.xml` | `mvn compile` |
|
|
15
|
+
| `build.gradle` | `./gradlew compileJava` |
|
|
16
|
+
| `go.mod` | `go build ./...` |
|
|
17
|
+
| `pyproject.toml` | `python -m compileall -q .` or `mypy .` |
|
|
18
|
+
|
|
19
|
+
## Step 2: Parse and Group Errors
|
|
20
|
+
|
|
21
|
+
1. Run the build command and capture stderr
|
|
22
|
+
2. Group errors by file path
|
|
23
|
+
3. Sort by dependency order (fix imports/types before logic errors)
|
|
24
|
+
4. Count total errors for progress tracking
|
|
25
|
+
|
|
26
|
+
## Step 3: Fix Loop (One Error at a Time)
|
|
27
|
+
|
|
28
|
+
For each error:
|
|
29
|
+
|
|
30
|
+
1. **Read the file** — Use Read tool to see error context (10 lines around the error)
|
|
31
|
+
2. **Diagnose** — Identify root cause (missing import, wrong type, syntax error)
|
|
32
|
+
3. **Fix minimally** — Use Edit tool for the smallest change that resolves the error
|
|
33
|
+
4. **Re-run build** — Verify the error is gone and no new errors introduced
|
|
34
|
+
5. **Move to next** — Continue with remaining errors
|
|
35
|
+
|
|
36
|
+
## Step 4: Guardrails
|
|
37
|
+
|
|
38
|
+
Stop and ask the user if:
|
|
39
|
+
- A fix introduces **more errors than it resolves**
|
|
40
|
+
- The **same error persists after 3 attempts** (likely a deeper issue)
|
|
41
|
+
- The fix requires **architectural changes** (not just a build fix)
|
|
42
|
+
- Build errors stem from **missing dependencies** (need `npm install`, `cargo add`, etc.)
|
|
43
|
+
|
|
44
|
+
## Step 5: Summary
|
|
45
|
+
|
|
46
|
+
Show results:
|
|
47
|
+
- Errors fixed (with file paths)
|
|
48
|
+
- Errors remaining (if any)
|
|
49
|
+
- New errors introduced (should be zero)
|
|
50
|
+
- Suggested next steps for unresolved issues
|
|
51
|
+
|
|
52
|
+
## Recovery Strategies
|
|
53
|
+
|
|
54
|
+
| Situation | Action |
|
|
55
|
+
|-----------|--------|
|
|
56
|
+
| Missing module/import | Check if package is installed; suggest install command |
|
|
57
|
+
| Type mismatch | Read both type definitions; fix the narrower type |
|
|
58
|
+
| Circular dependency | Identify cycle with import graph; suggest extraction |
|
|
59
|
+
| Version conflict | Check `package.json` / `Cargo.toml` for version constraints |
|
|
60
|
+
| Build tool misconfiguration | Read config file; compare with working defaults |
|
|
61
|
+
|
|
62
|
+
Fix one error at a time for safety. Prefer minimal diffs over refactoring.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Checkpoint Command
|
|
2
|
+
|
|
3
|
+
Create or verify a checkpoint in your workflow.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
`/checkpoint [create|verify|list] [name]`
|
|
8
|
+
|
|
9
|
+
## Create Checkpoint
|
|
10
|
+
|
|
11
|
+
When creating a checkpoint:
|
|
12
|
+
|
|
13
|
+
1. Run `/verify quick` to ensure current state is clean
|
|
14
|
+
2. Create a git stash or commit with checkpoint name
|
|
15
|
+
3. Log checkpoint to `.claude/checkpoints.log`:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
echo "$(date +%Y-%m-%d-%H:%M) | $CHECKPOINT_NAME | $(git rev-parse --short HEAD)" >> .claude/checkpoints.log
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
4. Report checkpoint created
|
|
22
|
+
|
|
23
|
+
## Verify Checkpoint
|
|
24
|
+
|
|
25
|
+
When verifying against a checkpoint:
|
|
26
|
+
|
|
27
|
+
1. Read checkpoint from log
|
|
28
|
+
2. Compare current state to checkpoint:
|
|
29
|
+
- Files added since checkpoint
|
|
30
|
+
- Files modified since checkpoint
|
|
31
|
+
- Test pass rate now vs then
|
|
32
|
+
- Coverage now vs then
|
|
33
|
+
|
|
34
|
+
3. Report:
|
|
35
|
+
```
|
|
36
|
+
CHECKPOINT COMPARISON: $NAME
|
|
37
|
+
============================
|
|
38
|
+
Files changed: X
|
|
39
|
+
Tests: +Y passed / -Z failed
|
|
40
|
+
Coverage: +X% / -Y%
|
|
41
|
+
Build: [PASS/FAIL]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## List Checkpoints
|
|
45
|
+
|
|
46
|
+
Show all checkpoints with:
|
|
47
|
+
- Name
|
|
48
|
+
- Timestamp
|
|
49
|
+
- Git SHA
|
|
50
|
+
- Status (current, behind, ahead)
|
|
51
|
+
|
|
52
|
+
## Workflow
|
|
53
|
+
|
|
54
|
+
Typical checkpoint flow:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
[Start] --> /checkpoint create "feature-start"
|
|
58
|
+
|
|
|
59
|
+
[Implement] --> /checkpoint create "core-done"
|
|
60
|
+
|
|
|
61
|
+
[Test] --> /checkpoint verify "core-done"
|
|
62
|
+
|
|
|
63
|
+
[Refactor] --> /checkpoint create "refactor-done"
|
|
64
|
+
|
|
|
65
|
+
[PR] --> /checkpoint verify "feature-start"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Arguments
|
|
69
|
+
|
|
70
|
+
$ARGUMENTS:
|
|
71
|
+
- `create <name>` - Create named checkpoint
|
|
72
|
+
- `verify <name>` - Verify against named checkpoint
|
|
73
|
+
- `list` - Show all checkpoints
|
|
74
|
+
- `clear` - Remove old checkpoints (keeps last 5)
|